From: Holger Schemel Date: Fri, 22 Apr 2016 19:37:53 +0000 (+0200) Subject: removed empty (obsolete) functions to init/do/stop toon animations X-Git-Tag: 4.0.0.0-rc2~7 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=abf8e6bd629101604d463aa8f669b9a5c879440a removed empty (obsolete) functions to init/do/stop toon animations --- diff --git a/src/cartoons.c b/src/cartoons.c index 101d0ef1..95b12ecb 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -1107,14 +1107,6 @@ static void HandleGlobalAnim(int action, int game_mode) HandleGlobalAnim_Mode(&global_anim_ctrl[game_mode], action); } -void InitAnimation() -{ -} - -void StopAnimation() -{ -} - static void DoAnimationExt() { int i; @@ -1134,13 +1126,3 @@ static void DoAnimationExt() redraw_mask = REDRAW_ALL; #endif } - -void DoAnimation() -{ - // HandleAnimation(ANIM_CONTINUE); - -#if 1 - // force screen redraw in next frame to continue drawing global animations - redraw_mask = REDRAW_ALL; -#endif -} diff --git a/src/cartoons.h b/src/cartoons.h index 2b7680d1..612c6a34 100644 --- a/src/cartoons.h +++ b/src/cartoons.h @@ -25,8 +25,4 @@ void InitGlobalAnimations(void); void DrawGlobalAnim(int); -void InitAnimation(void); -void StopAnimation(void); -void DoAnimation(void); - #endif diff --git a/src/events.c b/src/events.c index 9af9d459..2d6e7f85 100644 --- a/src/events.c +++ b/src/events.c @@ -1623,15 +1623,6 @@ void HandleNoEvent() { 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: diff --git a/src/screens.c b/src/screens.c index ec7d7b66..d5e65265 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1361,8 +1361,6 @@ void DrawTitleScreen() KeyboardAutoRepeatOff(); HandleTitleScreen(0, 0, 0, 0, MB_MENU_INITIALIZE); - - StopAnimation(); } boolean CheckTitleScreen(boolean levelset_has_changed) @@ -1521,8 +1519,6 @@ void DrawMainMenu() SetMouseCursor(CURSOR_DEFAULT); - InitAnimation(); - OpenDoor(DOOR_CLOSE_1 | DOOR_OPEN_2); } @@ -1848,8 +1844,6 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) } else if (pos == MAIN_CONTROL_LEVEL_NUMBER && !button) { - StopAnimation(); - CloseDoor(DOOR_CLOSE_2); SetGameStatus(GAME_MODE_LEVELNR); @@ -1886,8 +1880,6 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) { if (leveldir_first) { - StopAnimation(); - CloseDoor(DOOR_CLOSE_2); SetGameStatus(GAME_MODE_LEVELS); @@ -1905,8 +1897,6 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) } else if (pos == MAIN_CONTROL_SCORES) { - StopAnimation(); - CloseDoor(DOOR_CLOSE_2); SetGameStatus(GAME_MODE_SCORES); @@ -1919,8 +1909,6 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) !strEqual(setup.player_name, "Artsoft")) Request("This level is read only!", REQ_CONFIRM); - StopAnimation(); - CloseDoor(DOOR_CLOSE_2); SetGameStatus(GAME_MODE_EDITOR); @@ -1931,8 +1919,6 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) } else if (pos == MAIN_CONTROL_INFO) { - StopAnimation(); - CloseDoor(DOOR_CLOSE_2); SetGameStatus(GAME_MODE_INFO); @@ -1945,14 +1931,10 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) } else if (pos == MAIN_CONTROL_GAME) { - StopAnimation(); - StartGameActions(options.network, setup.autorecord, level.random_seed); } else if (pos == MAIN_CONTROL_SETUP) { - StopAnimation(); - CloseDoor(DOOR_CLOSE_2); SetGameStatus(GAME_MODE_SETUP); @@ -2209,8 +2191,6 @@ static void DrawInfoScreen_Main() DrawMaskedBorder(fade_mask); FadeIn(fade_mask); - - InitAnimation(); } static void changeSetupValue(int, int, int); @@ -2708,8 +2688,6 @@ void DrawInfoScreen_Elements() HandleInfoScreen_Elements(MB_MENU_INITIALIZE); FadeIn(REDRAW_FIELD); - - InitAnimation(); } void HandleInfoScreen_Elements(int button) @@ -3689,8 +3667,6 @@ static void DrawChooseTree(TreeInfo **ti_ptr) DrawMaskedBorder(fade_mask); FadeIn(fade_mask); - - InitAnimation(); } static void drawChooseTreeList(int first_entry, int num_page_entries, @@ -4179,8 +4155,6 @@ void DrawHallOfFame(int highlight_position) FadeOut(fade_mask); - InitAnimation(); - PlayMenuSound(); PlayMenuMusic(); @@ -5588,7 +5562,6 @@ static Key getSetupKey() } } - DoAnimation(); BackToFront(); } @@ -5888,8 +5861,6 @@ static void DrawSetupScreen_Generic() DrawMaskedBorder(fade_mask); FadeIn(fade_mask); - - InitAnimation(); } void HandleSetupScreen_Generic(int mx, int my, int dx, int dy, int button) @@ -5937,8 +5908,6 @@ void DrawSetupScreen_Input() HandleSetupScreen_Input(0, 0, 0, 0, MB_MENU_INITIALIZE); FadeIn(REDRAW_FIELD); - - InitAnimation(); } static void setJoystickDeviceToNr(char *device_name, int device_nr) @@ -6219,8 +6188,6 @@ void CustomizeKeyboard(int player_nr) FadeIn(REDRAW_FIELD); - InitAnimation(); - while (!finished) { if (PendingEvent()) /* got event */ @@ -6302,14 +6269,12 @@ void CustomizeKeyboard(int player_nr) } } - DoAnimation(); BackToFront(); } /* write new key bindings back to player setup */ setup.input[player_nr].key = custom_key; - StopAnimation(); DrawSetupScreen_Input(); } @@ -6373,7 +6338,6 @@ static boolean CalibrateJoystickMain(int player_nr) FadeIn(REDRAW_FIELD); while (Joystick(player_nr) & JOY_BUTTON); /* wait for released button */ - InitAnimation(); while (result < 0) { @@ -6455,7 +6419,6 @@ static boolean CalibrateJoystickMain(int player_nr) } } - DoAnimation(); BackToFront(); } @@ -6466,8 +6429,6 @@ static boolean CalibrateJoystickMain(int player_nr) new_joystick_xmiddle = joy_x; new_joystick_ymiddle = joy_y; - StopAnimation(); - /* wait until the last pressed button was released */ while (Joystick(player_nr) & JOY_BUTTON) { diff --git a/src/tools.c b/src/tools.c index 7f870a64..d7c39688 100644 --- a/src/tools.c +++ b/src/tools.c @@ -2600,7 +2600,6 @@ void AnimateEnvelopeRequest(int anim_mode, int action) redraw_mask |= REDRAW_FIELD; - DoAnimation(); BackToFront(); SkipUntilDelayReached(&anim_delay, anim_delay_value, &i, last_frame); @@ -2647,9 +2646,6 @@ void ShowEnvelopeRequest(char *text, unsigned int req_state, int action) } DrawEnvelopeRequest(text); - - if (game_status != GAME_MODE_MAIN) - InitAnimation(); } game.envelope_active = TRUE; /* needed for RedrawPlayfield() events */ @@ -2677,20 +2673,12 @@ void ShowEnvelopeRequest(char *text, unsigned int req_state, int action) game.envelope_active = FALSE; if (action == ACTION_CLOSING) - { - if (game_status != GAME_MODE_MAIN) - StopAnimation(); - BlitBitmap(bitmap_db_store, backbuffer, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0); - } // SetDrawBackgroundMask(last_draw_background_mask); redraw_mask |= REDRAW_FIELD; - if (game_status == GAME_MODE_MAIN) - DoAnimation(); - BackToFront(); if (action == ACTION_CLOSING && @@ -3553,8 +3541,6 @@ void WaitForEventToContinue() still_wait = FALSE; } - DoAnimation(); - BackToFront(); } } @@ -3723,10 +3709,6 @@ static int RequestHandleEvents(unsigned int req_state) BlitBitmap(drawto, bitmap_db_cross, sx, sy, width, height, sx, sy); } } - else - { - DoAnimation(); - } BackToFront(); } @@ -3872,17 +3854,11 @@ static boolean RequestDoor(char *text, unsigned int req_state) return FALSE; } - if (game_status != GAME_MODE_MAIN) - InitAnimation(); - SetDrawBackgroundMask(REDRAW_FIELD | REDRAW_DOOR_1); // ---------- handle request buttons ---------- result = RequestHandleEvents(req_state); - if (game_status != GAME_MODE_MAIN) - StopAnimation(); - UnmapToolButtons(); if (!(req_state & REQ_STAY_OPEN)) @@ -3977,9 +3953,6 @@ static boolean RequestEnvelope(char *text, unsigned int req_state) // ---------- handle request buttons ---------- result = RequestHandleEvents(req_state); - if (game_status != GAME_MODE_MAIN) - StopAnimation(); - UnmapToolButtons(); ShowEnvelopeRequest(text, req_state, ACTION_CLOSING); @@ -4573,9 +4546,6 @@ unsigned int MoveDoor(unsigned int door_state) { BackToFront(); - if (game_status == GAME_MODE_MAIN) - DoAnimation(); - SkipUntilDelayReached(&door_delay, door_delay_value, &k, last_frame); current_move_delay += max_step_delay;