summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-16 00:18:52 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-16 00:18:52 +0000
commit2b60c78c535fadcd5168d4829098d560f8a67eca (patch)
tree7575c0f4336a1b2323eeb49f3bd2a2f4b221551d /src
parenta01b40aae0b738fc19e8305837d11acb47e6e47d (diff)
downloadmana-2b60c78c535fadcd5168d4829098d560f8a67eca.tar.gz
mana-2b60c78c535fadcd5168d4829098d560f8a67eca.tar.bz2
mana-2b60c78c535fadcd5168d4829098d560f8a67eca.tar.xz
mana-2b60c78c535fadcd5168d4829098d560f8a67eca.zip
"make dist" now produces distributions that compile and run, upped version to
0.0.10 for next release and some minor changes.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am1
-rw-r--r--src/game.cpp53
2 files changed, 27 insertions, 27 deletions
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