}
}
}
-
- // !!! CHECK THIS:
- // !!! this may result in "HandleNoEvent()" never being called
- // !!! (especially due to continuously processed tocuh events)
- // !!! and therefore toon animations being stopped while events
- // !!! are being processed (even if they are all thrown away)
-
else
{
/* when playing, display a special mouse pointer inside the playfield */
playfield_cursor_set = FALSE;
}
+#if 0
HandleNoEvent();
+#endif
}
+#if 1
+ HandleNoEvent();
+#endif
+
/* don't use all CPU time when idle; the main loop while playing
has its own synchronization and is CPU friendly, too */
int new_window_width = event->data1;
int new_window_height = event->data2;
- printf("::: RESIZED from %d, %d to %d, %d\n",
- video.window_width, video.window_height,
- new_window_width, new_window_height);
-
// if window size has changed after resizing, calculate new scaling factor
if (new_window_width != video.window_width ||
new_window_height != video.window_height)
int new_xpercent = (100 * new_window_width / video.width);
int new_ypercent = (100 * new_window_height / video.height);
+ printf("::: RESIZED from %d, %d to %d, %d\n",
+ video.window_width, video.window_height,
+ new_window_width, new_window_height);
+
setup.window_scaling_percent = video.window_scaling_percent =
MIN(MAX(MIN_WINDOW_SCALING_PERCENT, MIN(new_xpercent, new_ypercent)),
MAX_WINDOW_SCALING_PERCENT);
printf("::: %d\n", setup.window_scaling_percent);
#endif
- ToggleFullscreenIfNeeded();
+ ToggleFullscreenOrChangeWindowScalingIfNeeded();
if (game_status == GAME_MODE_SETUP)
RedrawSetupScreenAfterFullscreenToggle();
}
if ((key == KSYM_minus || key == KSYM_plus || key == KSYM_0) &&
- (GetKeyModState() & KMOD_Control) && video.window_scaling_available &&
+ (GetKeyModState() & KMOD_Alt) && video.window_scaling_available &&
!video.fullscreen_enabled)
{
if (key == KSYM_0)
else if (setup.window_scaling_percent > MAX_WINDOW_SCALING_PERCENT)
setup.window_scaling_percent = MAX_WINDOW_SCALING_PERCENT;
- ToggleFullscreenIfNeeded();
+ ToggleFullscreenOrChangeWindowScalingIfNeeded();
if (game_status == GAME_MODE_SETUP)
RedrawSetupScreenAfterFullscreenToggle();
{
HandleButton(0, 0, -button_status, button_status);
+#if 0
return;
+#endif
+ }
+ else
+ {
+ HandleJoystick();
}
#if defined(NETWORK_AVALIABLE)
HandleNetworking();
#endif
- HandleJoystick();
+ switch (game_status)
+ {
+ case GAME_MODE_MAIN:
+ DrawPreviewLevelAnimation();
+ DoAnimation();
+ break;
+
+ case GAME_MODE_LEVELS:
+ case GAME_MODE_LEVELNR:
+ case GAME_MODE_SETUP:
+ case GAME_MODE_INFO:
+ case GAME_MODE_SCORES:
+ DoAnimation();
+ break;
+
+ case GAME_MODE_EDITOR:
+ HandleLevelEditorIdle();
+ break;
+
+ default:
+ break;
+ }
}
static int HandleJoystickForAllPlayers()
HandleHallOfFame(0, 0, dx, dy, !newbutton);
break;
+#if 0
case GAME_MODE_EDITOR:
HandleLevelEditorIdle();
break;
+#endif
case GAME_MODE_PLAYING:
if (tape.playing || keyboard)
newbutton = ((joy & JOY_BUTTON) != 0);
#if 0
- if (local_player->LevelSolved_GameEnd && newbutton)
+ if (newbutton && local_player->LevelSolved_GameEnd)
#else
- if (AllPlayersGone && newbutton)
+ if (newbutton && AllPlayersGone)
#endif
{
GameEnd();