From 19454b27ca8b08df8982ae604aee893971b093a8 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 2 Nov 2022 15:12:38 +0100 Subject: [PATCH] added functions to advance game and tile frame counter for MM engine --- src/engines.h | 5 +++++ src/game.c | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/engines.h b/src/engines.h index 65a9798f..c90cc0a1 100644 --- a/src/engines.h +++ b/src/engines.h @@ -65,9 +65,14 @@ int el2img_mm(int); void CheckSingleStepMode_MM(boolean, boolean); int getGraphicAnimationFrame(int, int); +int getGraphicAnimationFrameXY(int, int, int); + void getGraphicSource(int, int, Bitmap **, int *, int *); void getMiniGraphicSource(int, Bitmap **, int *, int *); void getSizedGraphicSource(int, int, int, Bitmap **, int *, int *); +void AdvanceFrameCounter(void); +void AdvanceGfxFrame(void); + #endif // ENGINES_H diff --git a/src/game.c b/src/game.c index 178f35de..31a52004 100644 --- a/src/game.c +++ b/src/game.c @@ -11678,6 +11678,21 @@ void AdvanceFrameAndPlayerCounters(int player_nr) } } +void AdvanceFrameCounter(void) +{ + FrameCounter++; +} + +void AdvanceGfxFrame(void) +{ + int x, y; + + SCAN_PLAYFIELD(x, y) + { + GfxFrame[x][y]++; + } +} + void StartGameActions(boolean init_network_game, boolean record_tape, int random_seed) { @@ -12025,6 +12040,8 @@ void GameActions_SP_Main(void) void GameActions_MM_Main(void) { + AdvanceGfxFrame(); + GameActions_MM(local_player->effective_mouse_action); } -- 2.34.1