has its own synchronization and is CPU friendly, too */
if (game_status == GAME_MODE_PLAYING)
+ {
HandleGameActions();
+ }
else
{
SyncDisplay();
switch(game_status)
{
+ case GAME_MODE_TITLE:
+ HandleTitleScreen(mx,my, 0,0, button);
+ break;
+
case GAME_MODE_MAIN:
HandleMainMenu(mx,my, 0,0, button);
break;
if (suffix_len > string_len)
return FALSE;
- return (strcmp(&string[string_len - suffix_len], suffix) == 0);
+ return (strEqual(&string[string_len - suffix_len], suffix));
}
#define MAX_CHEAT_INPUT_LEN 32
{
#ifdef DEBUG
if (is_string_suffix(cheat_input, ".q"))
- for (i = 0; i < MAX_INVENTORY_SIZE; i++)
- if (local_player->inventory_size < MAX_INVENTORY_SIZE)
- local_player->inventory_element[local_player->inventory_size++] =
- EL_DYNAMITE;
+ DEBUG_SetMaximumDynamite();
#endif
}
else if (game_status == GAME_MODE_EDITOR)
TapeTogglePause(TAPE_TOGGLE_MANUAL);
}
- if (game_status == GAME_MODE_PLAYING)
+ if (game_status == GAME_MODE_PLAYING && !network_playing)
{
- for (i = 0; i < MAX_PLAYERS; i++)
- if (key == KSYM_1 + i)
- game.centered_to_player_next = i;
+ int centered_player_nr_next = -999;
+
+ if (key == setup.shortcut.focus_player_all)
+ centered_player_nr_next = -1;
+ else
+ for (i = 0; i < MAX_PLAYERS; i++)
+ if (key == setup.shortcut.focus_player[i])
+ centered_player_nr_next = i;
+
+ if (centered_player_nr_next != -999)
+ {
+ game.centered_player_nr_next = centered_player_nr_next;
+ game.set_centered_player = TRUE;
+
+ if (tape.recording)
+ {
+ tape.centered_player_nr_next = game.centered_player_nr_next;
+ tape.set_centered_player = TRUE;
+ }
+ }
}
HandleKeysSpecial(key);
HandleTypeName(0, key);
break;
+ case GAME_MODE_TITLE:
case GAME_MODE_MAIN:
case GAME_MODE_LEVELS:
case GAME_MODE_SETUP:
case KSYM_space:
#endif
case KSYM_Return:
- if (game_status == GAME_MODE_MAIN)
+ if (game_status == GAME_MODE_TITLE)
+ HandleTitleScreen(0,0, 0,0, MB_MENU_CHOICE);
+ else if (game_status == GAME_MODE_MAIN)
HandleMainMenu(0,0, 0,0, MB_MENU_CHOICE);
else if (game_status == GAME_MODE_LEVELS)
HandleChooseLevel(0,0, 0,0, MB_MENU_CHOICE);
break;
case KSYM_Escape:
- if (game_status == GAME_MODE_LEVELS)
+ if (game_status == GAME_MODE_TITLE)
+ HandleTitleScreen(0,0, 0,0, MB_MENU_LEAVE);
+ else if (game_status == GAME_MODE_LEVELS)
HandleChooseLevel(0,0, 0,0, MB_MENU_LEAVE);
else if (game_status == GAME_MODE_SETUP)
HandleSetupScreen(0,0, 0,0, MB_MENU_LEAVE);
switch(game_status)
{
+ case GAME_MODE_TITLE:
case GAME_MODE_MAIN:
case GAME_MODE_LEVELS:
case GAME_MODE_SETUP:
!DelayReached(&joystickmove_delay, GADGET_FRAME_DELAY))
newbutton = dx = dy = 0;
- if (game_status == GAME_MODE_MAIN)
+ if (game_status == GAME_MODE_TITLE)
+ HandleTitleScreen(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
+ else if (game_status == GAME_MODE_MAIN)
HandleMainMenu(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
else if (game_status == GAME_MODE_LEVELS)
HandleChooseLevel(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);