summaryrefslogtreecommitdiffstats
path: root/src/game.c
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-08-25 13:51:06 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-08-25 13:51:06 (EDT)
commitc024cd0128acf4faab48a355d81f09b3c1f9ebae (patch)
tree5942e8583682a80e52e49feac74088db18bc8e5d /src/game.c
parentc1598e9441cb9e125616dbef5e090e1f32fcdfb2 (diff)
downloadoverworld-rpg-c024cd0128acf4faab48a355d81f09b3c1f9ebae.zip
overworld-rpg-c024cd0128acf4faab48a355d81f09b3c1f9ebae.tar.gz
overworld-rpg-c024cd0128acf4faab48a355d81f09b3c1f9ebae.tar.bz2
game_run(): Use FFI functions
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game.c b/src/game.c
index a98d336..c2a65f1 100644
--- a/src/game.c
+++ b/src/game.c
@@ -17,6 +17,7 @@
*/
#include "resources/script.h"
+#include "scripting/ffi.h"
#include "logging.h"
#include "game.h"
@@ -46,5 +47,7 @@ game_load(const char *dirname)
void
game_run(struct game *g)
{
- script_call(g->init_script, "on_init");
+ ffi_context_switch(g->init_script);
+ ffi_prepare_call("on_init");
+ ffi_call();
}