From b7cd9c2b3bbb8aca38626c113142f39781498869 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Sat, 20 Mar 2004 14:42:51 +0000 Subject: [PATCH] - replaced #ifdef LINUX with #ifndef WIN32, should be easier to handle for other posix systems this way SVN-Revision: 277 --- src/gameloop.cpp | 2 +- src/high_scores.cpp | 6 +----- src/intro.cpp | 2 +- src/menu.cpp | 2 +- src/screen.cpp | 2 +- src/setup.cpp | 8 ++------ src/title.cpp | 2 +- src/worldmap.cpp | 5 ++--- 8 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/gameloop.cpp b/src/gameloop.cpp index 638219bb4..05171b124 100644 --- a/src/gameloop.cpp +++ b/src/gameloop.cpp @@ -18,7 +18,7 @@ #include #include -#ifdef LINUX +#ifndef WIN32 #include #include #include diff --git a/src/high_scores.cpp b/src/high_scores.cpp index 741dc6227..33836d471 100644 --- a/src/high_scores.cpp +++ b/src/high_scores.cpp @@ -31,15 +31,11 @@ FILE * opendata(char * mode) strcpy(filename, st_dir); /* Open the high score file: */ -#ifdef LINUX - +#ifndef WIN32 strcat(filename, "/highscore"); #else -#ifdef WIN32 - strcat(filename, "/st_highscore.dat"); #endif -#endif /* Try opening the file: */ diff --git a/src/intro.cpp b/src/intro.cpp index c608d807b..451170a8f 100644 --- a/src/intro.cpp +++ b/src/intro.cpp @@ -18,7 +18,7 @@ #include #include -#ifdef LINUX +#ifndef LINUX #include #include #include diff --git a/src/menu.cpp b/src/menu.cpp index edfb20517..df4dc7d7d 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -10,7 +10,7 @@ December 20, 2003 - March 15, 2004 */ -#ifdef LINUX +#ifndef WIN32 #include #include #include diff --git a/src/screen.cpp b/src/screen.cpp index 40d1e7bdf..390e70acb 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -18,7 +18,7 @@ #include #include -#ifdef LINUX +#ifndef WIN32 #include #include #include diff --git a/src/setup.cpp b/src/setup.cpp index 604e40862..45fd99bb9 100644 --- a/src/setup.cpp +++ b/src/setup.cpp @@ -21,7 +21,7 @@ #include #endif -#ifdef LINUX +#ifndef WIN32 #include #include #include @@ -273,22 +273,18 @@ void st_directory_setup(void) strcat(st_save_dir,"/save"); /* Create them. In the case they exist they won't destroy anything. */ -#ifdef LINUX - +#ifndef WIN32 mkdir(st_dir, 0755); mkdir(st_save_dir, 0755); sprintf(str, "%s/levels", st_dir); mkdir(str, 0755); #else - #ifdef WIN32 - mkdir(st_dir); mkdir(st_save_dir); sprintf(str, "%s/levels", st_dir); mkdir(str); #endif -#endif } diff --git a/src/title.cpp b/src/title.cpp index ea74ca864..ba6e6c0ca 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -18,7 +18,7 @@ #include #include -#ifdef LINUX +#ifndef WIN32 #include #include #include diff --git a/src/worldmap.cpp b/src/worldmap.cpp index 4cbd378bb..2b132760e 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -210,8 +210,7 @@ WorldMap::get_input() break; case SDLK_LCTRL: case SDLK_RETURN: - if (!tux_moving) - enter_level = true; + enter_level = true; break; default: break; @@ -295,7 +294,7 @@ WorldMap::update() { float speed = 4.5; - if (enter_level) + if (enter_level && !tux_moving) { for(Levels::iterator i = levels.begin(); i != levels.end(); ++i) { -- 2.11.0