diff -ur tuxracer-0.61-original/src/game_config.c tuxracer-0.61/src/game_config.c --- tuxracer-0.61-original/src/game_config.c 2001-01-30 20:04:43.000000000 +0000 +++ tuxracer-0.61/src/game_config.c 2021-12-26 13:41:33.341076372 +0000 @@ -114,26 +114,26 @@ */ #define INIT_PARAM( nam, val, typename, commnt ) \ - Params. ## nam ## .loaded = False; \ - Params. ## nam ## .name = #nam; \ - Params. ## nam ## .deflt. ## typename ## _val = val; \ - Params. ## nam ## .comment = commnt; + Params.nam.loaded = False; \ + Params.nam.name = #nam; \ + Params.nam.deflt.typename ## _val = val; \ + Params.nam.comment = commnt; #define INIT_PARAM_STRING( nam, val, commnt ) \ INIT_PARAM( nam, val, string, commnt ); \ - Params. ## nam ## .type = PARAM_STRING; + Params.nam.type = PARAM_STRING; #define INIT_PARAM_CHAR( nam, val, commnt ) \ INIT_PARAM( nam, val, char, commnt ); \ - Params. ## nam ## .type = PARAM_CHAR; + Params.nam.type = PARAM_CHAR; #define INIT_PARAM_INT( nam, val, commnt ) \ INIT_PARAM( nam, val, int, commnt ); \ - Params. ## nam ## .type = PARAM_INT; + Params.nam.type = PARAM_INT; #define INIT_PARAM_BOOL( nam, val, commnt ) \ INIT_PARAM( nam, val, bool, commnt ); \ - Params. ## nam ## .type = PARAM_BOOL; + Params.nam.type = PARAM_BOOL; /* @@ -310,13 +310,13 @@ */ #define FN_PARAM( name, typename, type ) \ type getparam_ ## name() { \ - if ( !Params. ## name ## .loaded ) { \ - fetch_param_ ## typename( &( Params. ## name ) ); \ + if ( !Params.name.loaded ) { \ + fetch_param_ ## typename( &( Params.name ) ); \ } \ - return Params. ## name ## .val. ## typename ## _val; \ + return Params.name.val.typename ## _val; \ } \ void setparam_ ## name( type val) { \ - set_param_ ## typename( &( Params. ## name ), val ); } + set_param_ ## typename( &( Params.name ), val ); } #define FN_PARAM_STRING( name ) \ FN_PARAM( name, string, char* ) @@ -505,7 +505,7 @@ "# decreasing this number, at the cost of lower image quality." ); INIT_PARAM_BOOL( - fullscreen, True, + fullscreen, False, "# If true then the game will run in full-screen mode." ); INIT_PARAM_INT( diff -ur tuxracer-0.61-original/src/keyboard.c tuxracer-0.61/src/keyboard.c --- tuxracer-0.61-original/src/keyboard.c 2001-01-13 22:09:51.000000000 +0000 +++ tuxracer-0.61/src/keyboard.c 2021-12-26 13:41:33.341076372 +0000 @@ -23,11 +23,17 @@ #include "loop.h" #define KEYMAP_SIZE 1000 -#define KEYTABLE_SIZE WSK_LAST -#define SPECIAL_KEYTABLE_SIZE WSK_LAST +#define KEYTABLE_SIZE 100 -static key_cb_t keytable[KEYTABLE_SIZE]; -static key_cb_t special_keytable[SPECIAL_KEYTABLE_SIZE]; +static key_cb_t keytable_callback[KEYTABLE_SIZE]; +static int keytable_key[KEYTABLE_SIZE]; +static int num_keytable_entries = 0; + +static key_cb_t special_keytable_callback[KEYTABLE_SIZE]; +static int special_keytable_key[KEYTABLE_SIZE]; +static int num_special_keytable_entries = 0; + +static key_cb_t default_keytable_callback = NULL; static keymap_t keymap[KEYMAP_SIZE]; static int num_keymap_entries = 0; @@ -50,19 +56,6 @@ return 0; /* success */ } -static void fill_keytable( key_cb_t value ) -{ - int i; - - for (i=0; i 0 ) { for ( i=0; i