string_has_parameter(value, "pingpong") ? ANIM_PINGPONG :
string_has_parameter(value, "pingpong2") ? ANIM_PINGPONG2 :
string_has_parameter(value, "random") ? ANIM_RANDOM :
+ string_has_parameter(value, "random_static") ? ANIM_RANDOM_STATIC :
string_has_parameter(value, "ce_value") ? ANIM_CE_VALUE :
string_has_parameter(value, "ce_score") ? ANIM_CE_SCORE :
string_has_parameter(value, "ce_delay") ? ANIM_CE_DELAY :
GfxFrame[x][y] = 0;
GfxRandom[x][y] = INIT_GFX_RANDOM();
+ GfxRandomStatic[x][y] = INIT_GFX_RANDOM();
GfxElement[x][y] = EL_UNDEFINED;
GfxAction[x][y] = ACTION_DEFAULT;
GfxDir[x][y] = MV_NONE;
SaveSnapshotBuffer(&buffers, ARGS_ADDRESS_AND_SIZEOF(GfxFrame));
SaveSnapshotBuffer(&buffers, ARGS_ADDRESS_AND_SIZEOF(GfxRandom));
+ SaveSnapshotBuffer(&buffers, ARGS_ADDRESS_AND_SIZEOF(GfxRandomStatic));
SaveSnapshotBuffer(&buffers, ARGS_ADDRESS_AND_SIZEOF(GfxElement));
SaveSnapshotBuffer(&buffers, ARGS_ADDRESS_AND_SIZEOF(GfxAction));
SaveSnapshotBuffer(&buffers, ARGS_ADDRESS_AND_SIZEOF(GfxDir));
#define ANIM_ALL (1 << 14)
#define ANIM_ONCE (1 << 15)
#define ANIM_TILED (1 << 16)
+#define ANIM_RANDOM_STATIC (1 << 17)
#define ANIM_DEFAULT ANIM_LOOP
int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int GfxRandomStatic[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern int GfxRandomStatic[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern int GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern int GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
return sync_frame % g->anim_frames;
}
+ else if (graphic_info[graphic].anim_mode & ANIM_RANDOM_STATIC)
+ {
+ struct GraphicInfo *g = &graphic_info[graphic];
+ int x = (lx + lev_fieldx) % lev_fieldx;
+ int y = (ly + lev_fieldy) % lev_fieldy;
+ int sync_frame = GfxRandomStatic[x][y];
+
+ return sync_frame % g->anim_frames;
+ }
return getGraphicAnimationFrame(graphic, GfxFrame[lx][ly]);
}
if (!IS_NEW_FRAME(GfxFrame[x][y], graphic))
return;
- if (ANIM_MODE(graphic) & ANIM_TILED)
+ if (ANIM_MODE(graphic) & (ANIM_TILED | ANIM_RANDOM_STATIC))
return;
DrawGraphicAnimation(sx, sy, graphic);