projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20100325-1-src
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index 2dc5a01623be8323f34e618098d016283adf66d0..3284723c75fbba3298cd7a3bb66e7e94eae104ad 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-223,6
+223,10
@@
void HandleOtherEvents(Event *event)
case SDL_JOYBUTTONUP:
HandleJoystickEvent(event);
break;
case SDL_JOYBUTTONUP:
HandleJoystickEvent(event);
break;
+
+ case SDL_SYSWMEVENT:
+ HandleWindowManagerEvent(event);
+ break;
#endif
default:
#endif
default:
@@
-413,6
+417,13
@@
void HandleClientMessageEvent(ClientMessageEvent *event)
CloseAllAndExit(0);
}
CloseAllAndExit(0);
}
+void HandleWindowManagerEvent(Event *event)
+{
+#if defined(TARGET_SDL)
+ SDLHandleWindowManagerEvent(event);
+#endif
+}
+
void HandleButton(int mx, int my, int button, int button_nr)
{
static int old_mx = 0, old_my = 0;
void HandleButton(int mx, int my, int button, int button_nr)
{
static int old_mx = 0, old_my = 0;
@@
-566,6
+577,11
@@
static void HandleKeysSpecial(Key key)
{
DumpTape(&tape);
}
{
DumpTape(&tape);
}
+ else if (is_string_suffix(cheat_input, ":save-native-level") ||
+ is_string_suffix(cheat_input, ":snl"))
+ {
+ SaveNativeLevel(&level);
+ }
}
else if (game_status == GAME_MODE_PLAYING)
{
}
else if (game_status == GAME_MODE_PLAYING)
{
@@
-733,7
+749,7
@@
void HandleKey(Key key, int key_status)
if (game_status == GAME_MODE_MAIN &&
(key == setup.shortcut.toggle_pause || key == KSYM_space))
{
if (game_status == GAME_MODE_MAIN &&
(key == setup.shortcut.toggle_pause || key == KSYM_space))
{
- StartGameActions(options.network, setup.autorecord,
NEW_RANDOMIZE
);
+ StartGameActions(options.network, setup.autorecord,
level.random_seed
);
return;
}
return;
}
@@
-746,6
+762,9
@@
void HandleKey(Key key, int key_status)
TapeQuickLoad();
else if (key == setup.shortcut.toggle_pause)
TapeTogglePause(TAPE_TOGGLE_MANUAL);
TapeQuickLoad();
else if (key == setup.shortcut.toggle_pause)
TapeTogglePause(TAPE_TOGGLE_MANUAL);
+
+ HandleTapeButtonKeys(key);
+ HandleSoundButtonKeys(key);
}
if (game_status == GAME_MODE_PLAYING && !network_playing)
}
if (game_status == GAME_MODE_PLAYING && !network_playing)
@@
-811,7
+830,8
@@
void HandleKey(Key key, int key_status)
break;
case KSYM_Escape:
break;
case KSYM_Escape:
- FadeSkipNextFadeIn();
+ if (game_status != GAME_MODE_MAIN)
+ FadeSkipNextFadeIn();
if (game_status == GAME_MODE_TITLE)
HandleTitleScreen(0, 0, 0, 0, MB_MENU_LEAVE);
if (game_status == GAME_MODE_TITLE)
HandleTitleScreen(0, 0, 0, 0, MB_MENU_LEAVE);