X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fmisc.cpp;h=9a44e2b90c05006b1020e4ea395f1e8245a3891d;hb=ad4cc7039db0c05354df820cbd62f5ca7e651193;hp=b03fca10b8e03723f98bc026ba3d0962139beec3;hpb=d46c78c842ab4090a3f46e560c891234167f124b;p=supertux.git diff --git a/src/misc.cpp b/src/misc.cpp index b03fca10b..9a44e2b90 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -20,15 +20,16 @@ #include "misc.h" #include "app/globals.h" -void MyConfig::customload(LispReader& reader) +void MyConfig::customload(const lisp::Lisp& reader) { - reader.read_int ("keyboard-up", keymap.up); - reader.read_int ("keyboard-down", keymap.down); - reader.read_int ("keyboard-left", keymap.left); - reader.read_int ("keyboard-right", keymap.right); - reader.read_int ("keyboard-jump", keymap.jump); - reader.read_int ("keyboard-power", keymap.power); + reader.get("keyboard-up", keymap.up); + reader.get("keyboard-down", keymap.down); + reader.get("keyboard-left", keymap.left); + reader.get("keyboard-right", keymap.right); + reader.get("keyboard-jump", keymap.jump); + reader.get("keyboard-power", keymap.power); } + void MyConfig::customsave(FILE * config) { fprintf(config, "\t(keyboard-up %d)\n", keymap.up); @@ -48,7 +49,7 @@ void process_options_menu(void) if(use_gl != options_menu->isToggled(MNID_OPENGL)) { use_gl = !use_gl; - Setup::video(screen->w,screen->h); + Setup::video(SCREEN_WIDTH,SCREEN_HEIGHT); } #else options_menu->get_item_by_id(MNID_OPENGL).toggled = false; @@ -58,7 +59,7 @@ void process_options_menu(void) if(use_fullscreen != options_menu->isToggled(MNID_FULLSCREEN)) { use_fullscreen = !use_fullscreen; - Setup::video(screen->w,screen->h); + Setup::video(SCREEN_WIDTH,SCREEN_HEIGHT); } break; case MNID_SOUND: @@ -92,7 +93,7 @@ void st_menu(void) contrib_subset_menu = new Menu(); worldmap_menu = new Menu(); - main_menu->set_pos(screen->w/2, 335); + main_menu->set_pos(SCREEN_WIDTH/2, 335); main_menu->additem(MN_GOTO, _("Start Game"),0,load_game_menu, MNID_STARTGAME); main_menu->additem(MN_GOTO, _("Contrib Levels"),0,contrib_menu, MNID_LEVELS_CONTRIB); main_menu->additem(MN_GOTO, _("Options"),0,options_menu, MNID_OPTIONMENU);