{
SetMouseCursor(CURSOR_DEFAULT);
- DelayReached(&special_cursor_delay, 0);
+ ResetDelayCounter(&special_cursor_delay);
cursor_mode_last = CURSOR_DEFAULT;
}
while (NextValidEvent(&event))
{
+ int game_status_last = game_status;
+
switch (event.type)
{
case EVENT_BUTTONPRESS:
break;
}
+ // always handle events within delay period if game status has changed
+ if (game_status != game_status_last)
+ ResetDelayCounter(&event_frame_delay);
+
// do not handle events for longer than standard frame delay period
if (DelayReached(&event_frame_delay, event_frame_delay_value))
break;
// display normal pointer if mouse pressed
if (button_status != MB_RELEASED)
- DelayReached(&special_cursor_delay, 0);
+ ResetDelayCounter(&special_cursor_delay);
if (gfx.cursor_mode != CURSOR_PLAYFIELD &&
cursor_inside_playfield &&
if (key_status == KEY_PRESSED)
SetOverlayEnabled(!GetOverlayEnabled());
}
- else
+ else if (!textinput_status)
{
// for any other "real" key event, disable virtual buttons
SetOverlayEnabled(FALSE);
break;
case GAME_MODE_PSEUDO_TYPENAME:
- HandleTypeName(0, KSYM_Return);
+ case GAME_MODE_PSEUDO_TYPENAMES:
+ HandleTypeName(KSYM_Return);
+ break;
+
+ case GAME_MODE_NAMES:
+ HandleChoosePlayerName(mx, my, 0, 0, button);
break;
case GAME_MODE_LEVELS:
{
global.show_frames_per_second = !global.show_frames_per_second;
}
+ else if (strSuffix(cheat_input, ":xsn"))
+ {
+ tile_cursor.xsn_debug = TRUE;
+ }
}
else if (game_status == GAME_MODE_PLAYING)
{
{
key_action |= key_info[i].action | JOY_BUTTON_SNAP;
key_snap_action |= key_info[i].action;
+
+ tape.property_bits |= TAPE_PROPERTY_TAS_KEYS;
}
}
}
switch (game_status)
{
case GAME_MODE_PSEUDO_TYPENAME:
- HandleTypeName(0, key);
+ case GAME_MODE_PSEUDO_TYPENAMES:
+ HandleTypeName(key);
break;
case GAME_MODE_TITLE:
case GAME_MODE_MAIN:
+ case GAME_MODE_NAMES:
case GAME_MODE_LEVELS:
case GAME_MODE_LEVELNR:
case GAME_MODE_SETUP:
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_NAMES)
+ HandleChoosePlayerName(0, 0, 0, 0, MB_MENU_CHOICE);
else if (game_status == GAME_MODE_LEVELS)
HandleChooseLevelSet(0, 0, 0, 0, MB_MENU_CHOICE);
else if (game_status == GAME_MODE_LEVELNR)
if (game_status == GAME_MODE_TITLE)
HandleTitleScreen(0, 0, 0, 0, MB_MENU_LEAVE);
+ else if (game_status == GAME_MODE_NAMES)
+ HandleChoosePlayerName(0, 0, 0, 0, MB_MENU_LEAVE);
else if (game_status == GAME_MODE_LEVELS)
HandleChooseLevelSet(0, 0, 0, 0, MB_MENU_LEAVE);
else if (game_status == GAME_MODE_LEVELNR)
break;
case KSYM_Page_Up:
- if (game_status == GAME_MODE_LEVELS)
+ if (game_status == GAME_MODE_NAMES)
+ HandleChoosePlayerName(0, 0, 0, -1 * SCROLL_PAGE, MB_MENU_MARK);
+ else if (game_status == GAME_MODE_LEVELS)
HandleChooseLevelSet(0, 0, 0, -1 * SCROLL_PAGE, MB_MENU_MARK);
else if (game_status == GAME_MODE_LEVELNR)
HandleChooseLevelNr(0, 0, 0, -1 * SCROLL_PAGE, MB_MENU_MARK);
break;
case KSYM_Page_Down:
- if (game_status == GAME_MODE_LEVELS)
+ if (game_status == GAME_MODE_NAMES)
+ HandleChoosePlayerName(0, 0, 0, +1 * SCROLL_PAGE, MB_MENU_MARK);
+ else if (game_status == GAME_MODE_LEVELS)
HandleChooseLevelSet(0, 0, 0, +1 * SCROLL_PAGE, MB_MENU_MARK);
else if (game_status == GAME_MODE_LEVELNR)
HandleChooseLevelNr(0, 0, 0, +1 * SCROLL_PAGE, MB_MENU_MARK);
switch (key)
{
case KSYM_Escape:
- RequestQuitGame(setup.ask_on_escape);
+ RequestQuitGame(TRUE);
break;
default:
}
if (newbutton && (game_status == GAME_MODE_PSEUDO_TYPENAME ||
+ game_status == GAME_MODE_PSEUDO_TYPENAMES ||
anyTextGadgetActive()))
{
// leave name input in main menu or text input gadget
{
case GAME_MODE_TITLE:
case GAME_MODE_MAIN:
+ case GAME_MODE_NAMES:
case GAME_MODE_LEVELS:
case GAME_MODE_LEVELNR:
case GAME_MODE_SETUP:
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_NAMES)
+ HandleChoosePlayerName(0,0,dx,dy,newbutton?MB_MENU_CHOICE:MB_MENU_MARK);
else if (game_status == GAME_MODE_LEVELS)
HandleChooseLevelSet(0,0,dx,dy,newbutton?MB_MENU_CHOICE : MB_MENU_MARK);
else if (game_status == GAME_MODE_LEVELNR)