X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fmisc.cpp;h=9a44e2b90c05006b1020e4ea395f1e8245a3891d;hb=16ed8c7ce29177a68fbf64d4cfc03739ae75c094;hp=ce553ede9d06164258aa3dcdee32c3c3f79dc53c;hpb=716a056398189ee131bf1179056c2a1ea71d432c;p=supertux.git diff --git a/src/misc.cpp b/src/misc.cpp index ce553ede9..9a44e2b90 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -15,17 +15,21 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +#include + #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); @@ -45,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; @@ -55,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: @@ -89,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);