X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgameconfig.cpp;h=43f2ce0a0932ff8851be67f73f1d595990a13354;hb=ecb5b95cae951c0dddc73c4ec76bbbc328d17d4a;hp=447c58b4e8ca10cd45164cfc5938653f7a03648c;hpb=7124d68eaa9f9f2099361c7073e4355d4f004339;p=supertux.git diff --git a/src/gameconfig.cpp b/src/gameconfig.cpp index 447c58b4e..43f2ce0a0 100644 --- a/src/gameconfig.cpp +++ b/src/gameconfig.cpp @@ -1,7 +1,7 @@ -// $Id: configfile.cpp 2212 2004-11-28 14:57:45Z matzebraun $ +// $Id$ // // SuperTux - A Jump'n Run -// Copyright (C) 2004 Michael George +// Copyright (C) 2006 Matthias Braun // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -39,10 +39,15 @@ Config::Config() show_fps = false; sound_enabled = true; music_enabled = true; - cheats_enabled = false; + console_enabled = false; + random_seed = 0; // set by time(), by default (unless in config) screenwidth = 800; screenheight = 600; + aspectwidth = 4; + aspectheight = 3; + + enable_script_debugger = false; } Config::~Config() @@ -59,13 +64,16 @@ Config::load() throw std::runtime_error("File is not a supertux-config file"); config_lisp->get("show_fps", show_fps); - config_lisp->get("cheats", cheats_enabled); + config_lisp->get("console", console_enabled); + config_lisp->get("random_seed", random_seed); const lisp::Lisp* config_video_lisp = config_lisp->get_lisp("video"); if(config_video_lisp) { config_video_lisp->get("fullscreen", use_fullscreen); config_video_lisp->get("width", screenwidth); config_video_lisp->get("height", screenheight); + config_video_lisp->get("aspectwidth", aspectwidth); + config_video_lisp->get("aspectheight", aspectheight); } const lisp::Lisp* config_audio_lisp = config_lisp->get_lisp("audio"); @@ -88,12 +96,14 @@ Config::save() writer.start_list("supertux-config"); writer.write_bool("show_fps", show_fps); - writer.write_bool("cheats", cheats_enabled); + writer.write_bool("console", console_enabled); writer.start_list("video"); writer.write_bool("fullscreen", use_fullscreen); writer.write_int("width", screenwidth); writer.write_int("height", screenheight); + writer.write_int("aspectwidth", aspectwidth); + writer.write_int("aspectheight", aspectheight); writer.end_list("video"); writer.start_list("audio"); @@ -106,6 +116,6 @@ Config::save() main_controller->write(writer); writer.end_list("control"); } - + writer.end_list("supertux-config"); }