+2014-01-15
+ * fixed toons stopping on continuous touch events on Mac OS X
+
2014-01-14
* fixed bug when displaying game envelope with even sized playfield
* added graphic configuration options for request (dialog) buttons
-#define COMPILE_DATE_STRING "2014-01-15 19:23"
+#define COMPILE_DATE_STRING "2014-01-15 20:15"
}
}
}
-
- // !!! 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 */
{
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();
void HandleWindowManagerEvent(Event *);
void HandleNoEvent(void);
+void HandleToonAnimations(void);
void HandleButton(int, int, int, int);
void HandleKey(Key, int);
InitializeMainControls();
DrawCursorAndText_Main(-1, FALSE);
- DrawPreviewLevel(TRUE);
+ DrawPreviewLevelInitial();
HandleMainMenu(0, 0, 0, 0, MB_MENU_INITIALIZE);
mci->pos_text->font);
LoadLevel(level_nr);
- DrawPreviewLevel(TRUE);
+ DrawPreviewLevelInitial();
TapeErase();
LoadTape(level_nr);
DrawCompleteVideoDisplay();
- /* needed because DrawPreviewLevel() takes some time */
+ /* needed because DrawPreviewLevelInitial() takes some time */
BackToFront();
SyncDisplay();
}
}
}
+#if 0
if (game_status == GAME_MODE_MAIN)
{
- DrawPreviewLevel(FALSE);
+ DrawPreviewLevelAnimation();
DoAnimation();
}
+#endif
}
else
HandleInfoScreen_Main(mx, my, dx, dy, button);
+#if 0
DoAnimation();
+#endif
}
{
HandleChooseTree(mx, my, dx, dy, button, &leveldir_current);
+#if 0
DoAnimation();
+#endif
}
void DrawChooseLevelNr()
HandleChooseTree(mx, my, dx, dy, button, &leveldir_current);
#endif
+#if 0
DoAnimation();
+#endif
}
void DrawHallOfFame(int highlight_position)
if (game_status == GAME_MODE_SCORES)
PlayMenuSoundIfLoop();
+#if 0
DoAnimation();
+#endif
}
else
HandleSetupScreen_Generic(mx, my, dx, dy, button);
+#if 0
DoAnimation();
+#endif
}
void HandleGameActions()
redraw_mask |= REDRAW_FIELD;
}
-static void DrawPreviewLevelExt(int from_x, int from_y)
+static void DrawPreviewLevelPlayfieldExt(int from_x, int from_y)
{
boolean show_level_border = (BorderElement != EL_EMPTY);
int level_xsize = lev_fieldx + (show_level_border ? 2 : 0);
redraw_mask |= REDRAW_MICROLEVEL;
}
-void DrawPreviewLevel(boolean restart)
+static void DrawPreviewLevelExt(boolean restart)
{
static unsigned int scroll_delay = 0;
static unsigned int label_delay = 0;
label_state = 1;
label_counter = 0;
- DrawPreviewLevelExt(from_x, from_y);
+ DrawPreviewLevelPlayfieldExt(from_x, from_y);
DrawPreviewLevelLabelExt(label_state);
/* initialize delay counters */
break;
}
- DrawPreviewLevelExt(from_x, from_y);
+ DrawPreviewLevelPlayfieldExt(from_x, from_y);
}
/* !!! THIS ALL SUCKS -- SHOULD BE CLEANLY REWRITTEN !!! */
game_status = last_game_status; /* restore current game status */
}
+void DrawPreviewLevelInitial()
+{
+ DrawPreviewLevelExt(TRUE);
+}
+
+void DrawPreviewLevelAnimation()
+{
+ DrawPreviewLevelExt(FALSE);
+}
+
inline void DrawGraphicAnimationExt(DrawBuffer *dst_bitmap, int x, int y,
int graphic, int sync_frame, int mask_mode)
{
void DrawLevel(void);
void DrawMiniLevel(int, int, int, int);
-void DrawPreviewLevel(boolean);
+void DrawPreviewLevelInitial(void);
+void DrawPreviewLevelAnimation(void);
void WaitForEventToContinue();
boolean Request(char *, unsigned int);