-#define COMPILE_DATE_STRING "[2003-01-08 01:08]"
+#define COMPILE_DATE_STRING "[2003-01-10 20:34]"
checksum += mult++ * Store[x][y];
checksum += mult++ * Store2[x][y];
checksum += mult++ * StorePlayer[x][y];
- checksum += mult++ * Frame[x][y];
+ checksum += mult++ * ExplodePhase[x][y];
checksum += mult++ * AmoebaNr[x][y];
checksum += mult++ * JustStopped[x][y];
checksum += mult++ * Stop[x][y];
Feld[x][y] = Ur[x][y];
MovPos[x][y] = MovDir[x][y] = MovDelay[x][y] = 0;
Store[x][y] = Store2[x][y] = StorePlayer[x][y] = 0;
- Frame[x][y] = 0;
- GfxAction[x][y] = GFX_ACTION_DEFAULT;
AmoebaNr[x][y] = 0;
JustStopped[x][y] = 0;
Stop[x][y] = FALSE;
+ ExplodePhase[x][y] = 0;
ExplodeField[x][y] = EX_NO_EXPLOSION;
+
+ GfxFrame[x][y] = 0;
+ GfxAction[x][y] = GFX_ACTION_DEFAULT;
}
}
int newx = x + (direction == MV_LEFT ? -1 : direction == MV_RIGHT ? +1 : 0);
int newy = y + (direction == MV_UP ? -1 : direction == MV_DOWN ? +1 : 0);
+ if (!JustStopped[x][y] || direction != MovDir[x][y])
+ GfxFrame[x][y] = 0;
+
MovDir[x][y] = direction;
MovDir[newx][newy] = direction;
Feld[x][y] = EL_EXPLOSION;
MovDir[x][y] = MovPos[x][y] = 0;
AmoebaNr[x][y] = 0;
- Frame[x][y] = 1;
+ ExplodePhase[x][y] = 1;
Stop[x][y] = TRUE;
}
x = ex;
y = ey;
- Frame[x][y] = (phase < last_phase ? phase + 1 : 0);
+ ExplodePhase[x][y] = (phase < last_phase ? phase + 1 : 0);
if (phase == first_phase_after_start)
{
if (JustStopped[x][y] > 0)
JustStopped[x][y]--;
+ GfxFrame[x][y]++;
+
#if DEBUG
if (IS_BLOCKED(x, y))
{
CheckDynamite(x, y);
#if 0
else if (element == EL_EXPLOSION && !game.explosions_delayed)
- Explode(x, y, Frame[x][y], EX_NORMAL);
+ Explode(x, y, ExplodePhase[x][y], EX_NORMAL);
#endif
else if (element == EL_AMOEBA_CREATING)
AmoebeWaechst(x, y);
if (ExplodeField[x][y])
Explode(x, y, EX_PHASE_START, ExplodeField[x][y]);
else if (element == EL_EXPLOSION)
- Explode(x, y, Frame[x][y], EX_NORMAL);
+ Explode(x, y, ExplodePhase[x][y], EX_NORMAL);
ExplodeField[x][y] = EX_NO_EXPLOSION;
}
short Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short Frame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
boolean Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short JustStopped[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short AmoebaCnt[MAX_NUM_AMOEBA], AmoebaCnt2[MAX_NUM_AMOEBA];
+short ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
unsigned long Elementeigenschaften1[MAX_ELEMENTS];
unsigned long Elementeigenschaften2[MAX_ELEMENTS];
+int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+
int lev_fieldx,lev_fieldy, scroll_x,scroll_y;
int FX = SX, FY = SY, ScrollStepSize;
extern short Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short Frame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern boolean Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short JustStopped[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short AmoebaCnt[MAX_NUM_AMOEBA], AmoebaCnt2[MAX_NUM_AMOEBA];
+extern short ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern unsigned long Elementeigenschaften1[MAX_ELEMENTS];
extern unsigned long Elementeigenschaften2[MAX_ELEMENTS];
+extern int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+
extern int lev_fieldx,lev_fieldy, scroll_x,scroll_y;
extern int FX,FY, ScrollStepSize;
stored == EL_SP_INFOTRON ? IMG_SP_EXPLOSION_INFOTRON :
IMG_SP_EXPLOSION);
int delay = (game.emulation == EMU_SUPAPLEX ? 3 : 2);
- int phase = Frame[last_jx][last_jy] - 1;
+ int phase = ExplodePhase[last_jx][last_jy] - 1;
int frame = getGraphicAnimationFrame(graphic, phase - delay);
if (phase >= delay)
void DrawGraphicAnimation(int x, int y, int graphic)
{
+ int ux = LEVELX(x), uy = LEVELY(y);
+
if (!IN_SCR_FIELD(x, y) ||
- (FrameCounter % new_graphic_info[graphic].anim_delay) != 0)
+ (GfxFrame[ux][uy] % new_graphic_info[graphic].anim_delay) != 0)
return;
DrawGraphicAnimationExt(drawto_field, FX + x * TILEX, FY + y * TILEY,
else if (IS_MOVING(x, y) || CAN_MOVE(element) || CAN_FALL(element))
frame_pos = ABS(MovPos[x][y]) / (TILEX / 8);
#else
+
frame_pos = ABS(MovPos[x][y]) / (TILEX / 8);
+
+ frame_pos = GfxFrame[x][y];
+
#endif
return frame_pos;