diff --git a/src/gamelogic.c b/src/gamelogic.c index 421ebcd..3195147 100644 --- a/src/gamelogic.c +++ b/src/gamelogic.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "queue.h" #include "constants.h" #include "gamelogic.h" @@ -22,6 +23,7 @@ void * gameLogicHandler(void * parameters) gameLogicParameters * threadParameters = parameters; inputMessage * currentInput = NULL; queue * commandQueue = createQueue(); + scm_init_guile(); while (true) { // Evaluate remaining commands: diff --git a/src/schemeintegration.c b/src/schemeintegration.c index 7643b97..63c9312 100644 --- a/src/schemeintegration.c +++ b/src/schemeintegration.c @@ -54,7 +54,7 @@ SCM scheme_create_path(SCM path_name, SCM from_area_index, SCM to_area_index, SC } // Check if the areas exist: - playerArea * fromArea = getFromList(areaList, scm_to_size_t(from_area_index))->area; +1 playerArea * fromArea = getFromList(areaList, scm_to_size_t(from_area_index))->area; playerArea * toArea = getFromList(areaList, scm_to_size_t(to_area_index))->area; if (fromArea == NULL || toArea == NULL) @@ -204,6 +204,9 @@ void * schemeHandler(void * parameters) scm_c_define("skill-list", scm_from_pointer(schemeThreadParameters->skillList, NULL)); scm_c_define("output-queue", scm_from_pointer(schemeThreadParameters->outputQueue, NULL)); + // Enable readline support: + scm_c_eval_string("(begin (use-modules (ice-9 readline)) (activate-readline))"); + // Drop into the Scheme interpreter: scm_shell(0, NULL);