Added calls to set the preferred interpreter
authorP. F. Chimento <philip.chimento@gmail.com>
Sun, 30 Jan 2011 16:40:26 +0000 (17:40 +0100)
committerP. F. Chimento <philip.chimento@gmail.com>
Sun, 30 Jan 2011 16:40:26 +0000 (17:40 +0100)
The preferred interpreter can now be set in player/main.c by simply
changing one of the calls to chimara_if_set_preferred_interpreter().

player/main.c

index 7eef7f740c8228db1fb2a050faa4c542bcc853fb..9bfcb6fa6a096670ce113cf623ef968df5fc6f20 100644 (file)
@@ -176,7 +176,10 @@ create_window(void)
        }
        
        glk = chimara_if_new();
-       g_object_set(glk, "ignore-errors", TRUE, NULL);
+       g_object_set(glk,
+           "ignore-errors", TRUE,
+           /*"interpreter-number", CHIMARA_IF_ZMACHINE_TANDY_COLOR,*/
+           NULL);
        if( !chimara_glk_set_css_from_file(CHIMARA_GLK(glk), PACKAGE_DATA_DIR "/style.css", &error) ) {
 #ifdef DEBUG
                g_error_free(error);
@@ -189,6 +192,24 @@ create_window(void)
                }
 #endif /* DEBUG */
        }
+       chimara_if_set_preferred_interpreter(CHIMARA_IF(glk),
+           CHIMARA_IF_FORMAT_Z5,
+           CHIMARA_IF_INTERPRETER_FROTZ);
+       chimara_if_set_preferred_interpreter(CHIMARA_IF(glk),
+           CHIMARA_IF_FORMAT_Z6,
+           CHIMARA_IF_INTERPRETER_NITFOL);
+       chimara_if_set_preferred_interpreter(CHIMARA_IF(glk),
+           CHIMARA_IF_FORMAT_Z8,
+           CHIMARA_IF_INTERPRETER_FROTZ);
+       chimara_if_set_preferred_interpreter(CHIMARA_IF(glk),
+           CHIMARA_IF_FORMAT_Z_BLORB,
+           CHIMARA_IF_INTERPRETER_FROTZ);
+       chimara_if_set_preferred_interpreter(CHIMARA_IF(glk),
+           CHIMARA_IF_FORMAT_GLULX,
+           CHIMARA_IF_INTERPRETER_GLULXE);
+       chimara_if_set_preferred_interpreter(CHIMARA_IF(glk),
+           CHIMARA_IF_FORMAT_GLULX_BLORB,
+           CHIMARA_IF_INTERPRETER_GLULXE);
        
        /* DON'T UNCOMMENT THIS your eyes will burn
         but it is a good test of programmatically altering just one style