FADE_SXSIZE = FULL_SXSIZE;
FADE_SYSIZE = FULL_SYSIZE;
- if (game_status == GAME_MODE_PLAYING &&
- strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS))
+ // activate virtual buttons depending on upcoming game status
+ if (strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS) &&
+ game_status == GAME_MODE_PLAYING && !tape.playing)
SetOverlayActive(TRUE);
SetScreenStates_AfterFadingIn();
int x2 = x + SIGN(dx);
int y2 = y + SIGN(dy);
- /* movement with two-tile animations must be sync'ed with movement position,
- not with current GfxFrame (which can be higher when using slow movement) */
+ // movement with two-tile animations must be sync'ed with movement position,
+ // not with current GfxFrame (which can be higher when using slow movement)
int anim_pos = (dx ? ABS(dx) : ABS(dy));
int anim_frames = graphic_info[graphic].anim_frames;
int last_player_frame = player->Frame;
int frame = 0;
- /* GfxElement[][] is set to the element the player is digging or collecting;
- remove also for off-screen player if the player is not moving anymore */
+ // GfxElement[][] is set to the element the player is digging or collecting;
+ // remove also for off-screen player if the player is not moving anymore
if (IN_LEV_FIELD(jx, jy) && !player_is_moving)
GfxElement[jx][jy] = EL_UNDEFINED;
graphic = getPlayerGraphic(player, move_dir);
- /* in the case of changed player action or direction, prevent the current
- animation frame from being restarted for identical animations */
+ // in the case of changed player action or direction, prevent the current
+ // animation frame from being restarted for identical animations
if (player->Frame == 0 && equalGraphics(graphic, last_player_graphic))
player->Frame = last_player_frame;
graphic = getPlayerGraphic(player, move_dir);
- /* in the case of changed player action or direction, prevent the current
- animation frame from being restarted for identical animations */
+ // in the case of changed player action or direction, prevent the current
+ // animation frame from being restarted for identical animations
if (player->Frame == 0 && equalGraphics(graphic, last_player_graphic))
player->Frame = last_player_frame;
{
case EVENT_BUTTONRELEASE:
case EVENT_KEYPRESS:
-#if defined(TARGET_SDL2)
case SDL_CONTROLLERBUTTONDOWN:
-#endif
case SDL_JOYBUTTONDOWN:
still_wait = FALSE;
break;
break;
}
-#if defined(TARGET_SDL2)
case SDL_WINDOWEVENT:
HandleWindowEvent((WindowEvent *) &event);
break;
case SDL_APP_DIDENTERFOREGROUND:
HandlePauseResumeEvent((PauseResumeEvent *) &event);
break;
-#endif
case EVENT_KEYPRESS:
{
case KSYM_Return:
case KSYM_y:
-#if defined(TARGET_SDL2)
case KSYM_Y:
case KSYM_Select:
case KSYM_Menu:
#if defined(KSYM_Rewind)
case KSYM_Rewind: // for Amazon Fire TV remote
-#endif
#endif
result = 1;
break;
case KSYM_Escape:
case KSYM_n:
-#if defined(TARGET_SDL2)
case KSYM_N:
case KSYM_Back:
#if defined(KSYM_FastForward)
case KSYM_FastForward: // for Amazon Fire TV remote
-#endif
#endif
result = 0;
break;
ClearPlayerAction();
break;
-#if defined(TARGET_SDL2)
case SDL_CONTROLLERBUTTONDOWN:
switch (event.cbutton.button)
{
HandleJoystickEvent(&event);
ClearPlayerAction();
break;
-#endif
default:
HandleOtherEvents(&event);
// pause network game while waiting for request to answer
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
- !AllPlayersGone &&
+ !game.all_players_gone &&
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_PausePlaying();
// continue network game after request
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
- !AllPlayersGone &&
+ !game.all_players_gone &&
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_ContinuePlaying();
// pause network game while waiting for request to answer
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
- !AllPlayersGone &&
+ !game.all_players_gone &&
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_PausePlaying();
// continue network game after request
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
- !AllPlayersGone &&
+ !game.all_players_gone &&
req_state & REQUEST_WAIT_FOR_INPUT)
SendToServer_ContinuePlaying();
boolean has_crumbled_graphics,
int crumbled, int sync_frame)
{
- /* if element can be crumbled, but certain action graphics are just empty
- space (like instantly snapping sand to empty space in 1 frame), do not
- treat these empty space graphics as crumbled graphics in EMC engine */
+ // if element can be crumbled, but certain action graphics are just empty
+ // space (like instantly snapping sand to empty space in 1 frame), do not
+ // treat these empty space graphics as crumbled graphics in EMC engine
if (crumbled == IMG_EMPTY_SPACE)
has_crumbled_graphics = FALSE;
action == ACTION_FILLING ||
action == ACTION_EMPTYING);
- /* special case: graphic uses "2nd movement tile" and has defined
- 7 frames for movement animation (or less) => use default graphic
- for last (8th) frame which ends the movement animation */
+ // special case: graphic uses "2nd movement tile" and has defined
+ // 7 frames for movement animation (or less) => use default graphic
+ // for last (8th) frame which ends the movement animation
if (g->double_movement && g->anim_frames < 8 && frame_em == 7)
{
action = ACTION_DEFAULT; // (keep action_* unchanged for now)
struct GraphicInfo *g = &graphic_info[graphic];
int sync_frame;
- /* special case: graphic uses "2nd movement tile" and has defined
- 7 frames for movement animation (or less) => use default graphic
- for last (8th) frame which ends the movement animation */
+ // special case: graphic uses "2nd movement tile" and has defined
+ // 7 frames for movement animation (or less) => use default graphic
+ // for last (8th) frame which ends the movement animation
if (g->double_movement && g->anim_frames < 8 && frame_em == 7)
{
effective_action = ACTION_DEFAULT;
getGraphicSourceExt(graphic, frame, &g_em->bitmap, &g_em->src_x, &g_em->src_y,
g->double_movement && is_backside);
- /* (updating the "crumbled" graphic definitions is probably not really needed,
- as animations for crumbled graphics can't be longer than one EMC cycle) */
+ // (updating the "crumbled" graphic definitions is probably not really needed,
+ // as animations for crumbled graphics can't be longer than one EMC cycle)
set_crumbled_graphics_EM(g_em, has_crumbled_graphics, crumbled,
sync_frame);
}
if (!change_window_scaling_percent && !video.fullscreen_available)
return;
-#if defined(TARGET_SDL2)
if (change_window_scaling_percent)
{
SDLSetWindowScaling(setup.window_scaling_percent);
return;
}
-#endif
if (change_fullscreen ||
change_window_scaling_percent)