From 2b60c78c535fadcd5168d4829098d560f8a67eca Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 16 Feb 2005 00:18:52 +0000 Subject: "make dist" now produces distributions that compile and run, upped version to 0.0.10 for next release and some minor changes. --- src/Makefile.am | 1 + src/game.cpp | 53 ++++++++++++++++++++++++++--------------------------- 2 files changed, 27 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index b4c4ad97..7cdf49a9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -75,6 +75,7 @@ tmw_SOURCES = graphic/graphic.cpp \ net/network.h \ net/protocol.cpp \ net/protocol.h \ + net/win2linux.h \ resources/image.cpp \ resources/image.h \ resources/resource.cpp \ diff --git a/src/game.cpp b/src/game.cpp index 9044a711..2d9c4cc7 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -120,7 +120,8 @@ void game() { close_session(); } -void do_init() { +void do_init() +{ if (!tiledMap.load(map_path)) { error("Could not find map file"); } @@ -130,8 +131,6 @@ void do_init() { // Initialize timers tick_time = 0; - - // The SDL way SDL_AddTimer(10, refresh_time, NULL); SDL_AddTimer(1000, second, NULL); @@ -242,31 +241,31 @@ void do_input() if (keysym.mod & KMOD_CTRL) { // Workaround for Win and else - #if __USE_UNIX98 - SDL_WM_ToggleFullScreen(screen); - if ((int)config.getValue("screen", 0) == 0) { - config.setValue("screen", 1); - } - else { - config.setValue("screen", 0); - } - #else - int displayFlags = 0; - if ((int)config.getValue("screen", 0) == 0) { +#if __USE_UNIX98 + SDL_WM_ToggleFullScreen(screen); + if ((int)config.getValue("screen", 0) == 0) { + config.setValue("screen", 1); + } + else { + config.setValue("screen", 0); + } +#else + int displayFlags = 0; + if ((int)config.getValue("screen", 0) == 0) { displayFlags |= SDL_FULLSCREEN; - config.setValue("screen", 1); - } - else { - config.setValue("screen", 0); - } - if ((int)config.getValue("hwaccel", 0)) { - displayFlags |= SDL_HWSURFACE | SDL_DOUBLEBUF; - } - else { - displayFlags |= SDL_SWSURFACE; - } - screen = SDL_SetVideoMode(800, 600, 32, displayFlags); - #endif + config.setValue("screen", 1); + } + else { + config.setValue("screen", 0); + } + if ((int)config.getValue("hwaccel", 0)) { + displayFlags |= SDL_HWSURFACE | SDL_DOUBLEBUF; + } + else { + displayFlags |= SDL_SWSURFACE; + } + screen = SDL_SetVideoMode(800, 600, 32, displayFlags); +#endif } } } // End key down -- cgit v1.2.3-70-g09d2