X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=98e60731333f9add8584999855c3ee65459e3e1f;hb=a7a3a417929449b5d1c32a5ef9e67693015d187b;hp=627c77c61f842840eefe6ca162e4482776df9728;hpb=9e5b242142cda73a8b1ae8ae52aa927999b5481d;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 627c77c6..98e60731 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1492,6 +1492,8 @@ int getGraphicAnimationFrame(int graphic, int sync_frame) // animation synchronized with global frame counter, not move position if (graphic_info[graphic].anim_global_sync || sync_frame < 0) sync_frame = FrameCounter; + else if (graphic_info[graphic].anim_global_anim_sync) + sync_frame = getGlobalAnimSyncFrame(); return getAnimationFrame(graphic_info[graphic].anim_frames, graphic_info[graphic].anim_delay, @@ -8786,6 +8788,8 @@ void SetGfxAnimation_EM(struct GraphicInfo_EM *g_em, if (graphic_info[graphic].anim_global_sync) sync_frame = FrameCounter; + else if (graphic_info[graphic].anim_global_anim_sync) + sync_frame = getGlobalAnimSyncFrame(); else if (IN_FIELD(x, y, MAX_LEV_FIELDX, MAX_LEV_FIELDY)) sync_frame = GfxFrame[x][y]; else @@ -8845,6 +8849,8 @@ void getGraphicSourceObjectExt_EM(struct GraphicInfo_EM *g_em, if (graphic_info[graphic].anim_global_sync) sync_frame = FrameCounter; + else if (graphic_info[graphic].anim_global_anim_sync) + sync_frame = getGlobalAnimSyncFrame(); else if (IN_FIELD(x, y, MAX_LEV_FIELDX, MAX_LEV_FIELDY)) sync_frame = GfxFrame[x][y]; else @@ -9308,7 +9314,7 @@ void InitGraphicInfo_EM(void) } } -static void CheckSaveEngineSnapshot_EM(byte action[MAX_PLAYERS], int frame, +static void CheckSaveEngineSnapshot_EM(int frame, boolean any_player_moving, boolean any_player_snapping, boolean any_player_dropping) @@ -9365,7 +9371,7 @@ static void CheckSaveEngineSnapshot_MM(boolean element_clicked, } } -boolean CheckSingleStepMode_EM(byte action[MAX_PLAYERS], int frame, +boolean CheckSingleStepMode_EM(int frame, boolean any_player_moving, boolean any_player_snapping, boolean any_player_dropping) @@ -9374,7 +9380,7 @@ boolean CheckSingleStepMode_EM(byte action[MAX_PLAYERS], int frame, if (frame == 7 && !any_player_dropping && FrameCounter > 6) TapeTogglePause(TAPE_TOGGLE_AUTOMATIC); - CheckSaveEngineSnapshot_EM(action, frame, any_player_moving, + CheckSaveEngineSnapshot_EM(frame, any_player_moving, any_player_snapping, any_player_dropping); return tape.pausing; @@ -9408,7 +9414,7 @@ void CheckSingleStepMode_MM(boolean element_clicked, } void getGraphicSource_SP(struct GraphicInfo_SP *g_sp, - int graphic, int sync_frame, int x, int y) + int graphic, int sync_frame) { int frame = getGraphicAnimationFrame(graphic, sync_frame);