int tDeltaX, tDeltaY, tPos, Tmp;
// Variables that hold information about the animation sequence
+#if 0
static int *dx = 0; // an array of image positions in moving.mpx, finalized with -1
+#endif
static int dx1 = 0; // same as "*dx" above, but as image/animation token
static int dx2 = 0; // an additional image position of a second sprite, for instance: yellow disk if pushed
static int MurphyDX = 0, MurphyDY = 0; // murphys move steps
MovHighByte(&PlayField16[*si], 0x2A);
MovingPictureSequencePhase = 0x40; // init picture move sequence
+#if 0
dx = aniFramesRedDisk;
+#else
dx1 = aniRedDisk;
+#endif
MovLowByte(&RedDiskReleasePhase, 1);
RedDiskReleaseMurphyPos = *si; // remember Murphy's location
goto loc_Split;
// ==========================================================================
loc_g_6312:
+#if 0
dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+#else
dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyMoveUpRight : aniMurphyMoveUpLeft);
+#endif
PlayField16[*si - FieldWidth] = 0x103;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
// ==========================================================================
loc_g_6341:
+#if 0
dx = aniFramesMurphyEatLeft;
+#else
dx1 = aniMurphyMoveLeft;
+#endif
PlayField16[*si - 1] = 0x203;
PlayField16[*si] = 0x300;
*si = *si - 1;
// ==========================================================================
loc_g_6364:
+#if 0
dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+#else
dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyMoveUpRight : aniMurphyMoveUpLeft);
+#endif
PlayField16[*si + FieldWidth] = 0x303;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
// ==========================================================================
loc_g_6399:
+#if 0
dx = aniFramesMurphyEatRight;
+#else
dx1 = aniMurphyMoveRight;
+#endif
PlayField16[*si + 1] = 0x403;
PlayField16[*si] = 0x300;
*si = *si + 1;
subSoundFXBase();
#endif
+#if 0
dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+#else
dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyDigUpRight : aniMurphyDigUpLeft);
+#endif
PlayField16[*si - FieldWidth] = 0x503;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
subSoundFXBase();
#endif
+#if 0
dx = aniFramesMurphyEatLeft;
+#else
dx1 = aniMurphyDigLeft;
+#endif
PlayField16[*si - 1] = 0x203;
PlayField16[*si] = 0x300;
*si = *si - 1;
subSoundFXBase();
#endif
+#if 0
dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+#else
dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyDigUpRight : aniMurphyDigUpLeft);
+#endif
PlayField16[*si + FieldWidth] = 0x703;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
subSoundFXBase();
#endif
+#if 0
dx = aniFramesMurphyEatRight;
+#else
dx1 = aniMurphyDigRight;
+#endif
PlayField16[*si + 1] = 0x803;
PlayField16[*si] = 0x300;
*si = *si + 1;
subSoundFXBase();
#endif
+#if 0
dx = aniFramesTouchBase;
+#else
dx1 = aniTouchBase;
+#endif
dxPos = *si - FieldWidth;
MovHighByte(&PlayField16[*si], 0x10);
goto loc_StopNoSplit;
subSoundFXBase();
#endif
+#if 0
dx = aniFramesTouchBase;
+#else
dx1 = aniTouchBase;
+#endif
dxPos = *si - 1;
MovHighByte(&PlayField16[*si], 0x11);
goto loc_StopNoSplit;
subSoundFXBase();
#endif
+#if 0
dx = aniFramesTouchBase;
+#else
dx1 = aniTouchBase;
+#endif
dxPos = *si + FieldWidth;
MovHighByte(&PlayField16[*si], 0x12);
goto loc_StopNoSplit;
subSoundFXBase();
#endif
+#if 0
dx = aniFramesTouchBase;
+#else
dx1 = aniTouchBase;
+#endif
dxPos = *si + 1;
MovHighByte(&PlayField16[*si], 0x13);
goto loc_StopNoSplit;
subSoundFXInfotron();
#endif
+#if 0
dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+#else
dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+#endif
PlayField16[*si - FieldWidth] = 0x903;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
subSoundFXInfotron();
#endif
+#if 0
dx = aniFramesEatInfotronLeft;
+#else
dx1 = aniEatInfotronLeft;
+#endif
#if 0
dx2 = fiInfotron;
dx2Step = -1;
subSoundFXInfotron();
#endif
+#if 0
dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+#else
dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+#endif
PlayField16[*si + FieldWidth] = 0xB03;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
subSoundFXInfotron();
#endif
+#if 0
dx = aniFramesEatInfotronRight;
+#else
dx1 = aniEatInfotronRight;
+#endif
#if 0
dx2 = fiInfotron;
dx2Step = 1;
subSoundFXInfotron();
#endif
+#if 0
dx = aniFramesTouchInfotron;
+#else
dx1 = aniTouchInfotron;
+#endif
MovHighByte(&PlayField16[*si], 0x14);
MovHighByte(&PlayField16[*si - FieldWidth], 0xFF);
goto loc_StopNoSplit;
subSoundFXInfotron();
#endif
+#if 0
dx = aniFramesTouchInfotron;
+#else
dx1 = aniTouchInfotron;
+#endif
MovHighByte(&PlayField16[*si], 0x15);
MovHighByte(&PlayField16[*si - 1], 0xFF);
goto loc_StopNoSplit;
subSoundFXInfotron();
#endif
+#if 0
dx = aniFramesTouchInfotron;
+#else
dx1 = aniTouchInfotron;
+#endif
MovHighByte(&PlayField16[*si], 0x16);
MovHighByte(&PlayField16[*si + FieldWidth], 0xFF);
goto loc_StopNoSplit;
subSoundFXInfotron();
#endif
+#if 0
dx = aniFramesTouchInfotron;
+#else
dx1 = aniTouchInfotron;
+#endif
MovHighByte(&PlayField16[*si], 0x17);
MovHighByte(&PlayField16[*si + 1], 0xFF);
goto loc_StopNoSplit;
subSoundFXExit();
#endif
- data_h_DemoDone = 1; // EP set level success bytes
- LevelStatus = 1; // set Level Status DONE
- EP_GameDemoVar0DAA = 0; // force demo for lead-out
- if (SavedGameFlag == 0) // saved game running?
- {
- if (UpdateTimeFlag != 0) // update time?
- {
- UpdatedFlag = 1; // prevent double update
- }
- }
-
-#if 0
- subUpdateHallOfFame(); // update time + Hall-Of-Fame
-#endif
-
LeadOutCounter = 0x40; // quit: start lead-out
+#if 0
dx = aniFramesMurphyExit;
+#else
dx1 = aniMurphyExit;
+#endif
MovHighByte(&PlayField16[*si], 0xD);
goto loc_StopNoSplit;
MovHighByte(&PlayField16[*si - 2], 1);
subCopyImageToScreen(*si, aniPushLeft); // draw pushing murphy
+#if 0
dx = aniFramesZonkRollLeft;
+#else
dx1 = aniZonkRollLeft;
+#endif
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
MovHighByte(&PlayField16[*si + 2], 1);
subCopyImageToScreen(*si, aniPushRight); // draw pushing murphy
+#if 0
dx = aniFramesZonkRollRight;
+#else
dx1 = aniZonkRollRight;
+#endif
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
if (PlayField16[*si - 2 * FieldWidth] != 0)
return;
+#if 0
dx = aniFramesSplitUpDown;
+#else
dx1 = aniSplitUpDown;
+#endif
dx2Step = -FieldWidth;
PlayField16[*si] = 0x1803;
PlayField16[*si - 2 * FieldWidth] = 0x300;
if (PlayField16[*si - 2] != 0)
return;
+#if 0
dx = aniFramesMurphyEatLeft;
+#else
dx1 = aniMurphyMoveLeft;
+#endif
dx2Step = -1;
PlayField16[*si] = 0x1903;
PlayField16[*si - 2] = 0x300;
if (PlayField16[*si + 2 * FieldWidth] != 0)
return;
+#if 0
dx = aniFramesSplitUpDown;
+#else
dx1 = aniSplitUpDown;
+#endif
dx2Step = FieldWidth;
PlayField16[*si] = 0x1A03;
PlayField16[*si + 2 * FieldWidth] = 0x300;
if (PlayField16[*si + 2] != 0)
return;
+#if 0
dx = aniFramesMurphyEatRight;
+#else
dx1 = aniMurphyMoveRight;
+#endif
dx2Step = 1;
PlayField16[*si] = 0x1B03;
PlayField16[*si + 2] = 0x300;
// ==========================================================================
loc_g_69A6:
+#if 0
dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+#else
dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+#endif
PlayField16[*si] = 0x1C03;
PlayField16[*si - FieldWidth] = 0x300;
goto loc_StopNoSplit;
// ==========================================================================
loc_g_69CE:
+#if 0
dx = aniFramesMurphyEatLeft;
+#else
dx1 = aniMurphyEatLeft;
+#endif
PlayField16[*si] = 0x300; // !!!!!! this time we move murphy at sequence-start!
PlayField16[*si - 1] = 0x1D03;
*si = *si - 1;
// ==========================================================================
loc_g_69F7:
+#if 0
dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+#else
dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+#endif
PlayField16[*si] = 0x1E03;
PlayField16[*si + FieldWidth] = 0x300;
goto loc_StopNoSplit;
// ==========================================================================
loc_g_6A1F:
+#if 0
// dx = aniFramesMurphyEatRightRedDisk 'this sequence is 9 steps long!
dx = aniFramesMurphyEatRight;
+#else
dx1 = aniMurphyEatRight;
+#endif
// --------------------------------------------------------------------------
// BugFix
// Table data_h_145A, pointed to by table data_h_105E, has a severe bug:
// Remember that this is not the real bug-fix, but we must live with
// this existing bug and correct for the consequences of it.
-#if 1
- if (0 == AllowEatRightRedDiskBug) // Murphy's screen x-position
+ if (AllowEatRightRedDiskBug == 0) // Murphy's screen x-position
MurphyScreenXPos = MurphyScreenXPos - 2 * MurphyZoomFactor;
-#else
- if (0 == AllowEatRightRedDiskBug) // Murphy's screen x-position
- MurphyScreenXPos = MurphyScreenXPos - 2;
-#endif
SeqPos = -1;
// FS: for me this means to blit the first animation frame twice
// ==========================================================================
loc_g_6A48:
+#if 0
dx = aniFramesTouchRedDisk;
+#else
dx1 = aniTouchRedDisk;
+#endif
MovHighByte(&PlayField16[*si], 0x20);
MovHighByte(&PlayField16[*si - FieldWidth], 3);
goto loc_StopNoSplit;
// ==========================================================================
loc_g_6A64:
+#if 0
dx = aniFramesTouchRedDisk;
+#else
dx1 = aniTouchRedDisk;
+#endif
MovHighByte(&PlayField16[*si], 0x21);
MovHighByte(&PlayField16[*si - 1], 3);
goto loc_StopNoSplit;
// ==========================================================================
loc_g_6A80:
+#if 0
dx = aniFramesTouchRedDisk;
+#else
dx1 = aniTouchRedDisk;
+#endif
MovHighByte(&PlayField16[*si], 0x22);
MovHighByte(&PlayField16[*si + FieldWidth], 3);
goto loc_StopNoSplit;
// ==========================================================================
loc_g_6A9C:
+#if 0
dx = aniFramesTouchRedDisk;
+#else
dx1 = aniTouchRedDisk;
+#endif
MovHighByte(&PlayField16[*si], 0x23);
MovHighByte(&PlayField16[*si + 1], 3);
#if 0
subCopyImageToScreen(*si, aniPushRight);
#endif
+#if 0
dx = aniFramesYellowDisk;
+#else
dx1 = aniYellowDisk;
+#endif
dxPos = *si - FieldWidth;
#if 1
dx2 = (MurphyVarFaceLeft == 0 ? aniPushRight : aniPushLeft);
PlayField16[*si - 2] = 0x1200;
subCopyImageToScreen(*si, aniPushLeft);
+#if 0
dx = aniFramesYellowDisk;
+#else
dx1 = aniYellowDisk;
+#endif
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
#if 0
subCopyImageToScreen(*si, aniPushRight);
#endif
+#if 0
dx = aniFramesYellowDisk;
+#else
dx1 = aniYellowDisk;
+#endif
dxPos = *si + FieldWidth;
#if 1
dx2 = (MurphyVarFaceLeft == 0 ? aniPushRight : aniPushLeft);
PlayField16[*si + 2] = 0x1200;
subCopyImageToScreen(*si, aniPushRight);
+#if 0
dx = aniFramesYellowDisk;
+#else
dx1 = aniYellowDisk;
+#endif
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
PlayField16[*si - 2] = 0x800;
subCopyImageToScreen(*si, aniPushLeft);
+#if 0
dx = aniFramesOrangeDisk;
+#else
dx1 = aniOrangeDisk;
+#endif
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
PlayField16[*si + 2] = 0x100;
subCopyImageToScreen(*si, aniPushRight);
+#if 0
dx = aniFramesOrangeDisk;
+#else
dx1 = aniOrangeDisk;
+#endif
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
{
// ++++++++++++++++++++++++++
// Begin of normal movement
-#if 1
MurphyScreenXPos = MurphyScreenXPos + MurphyDX * MurphyZoomFactor;
MurphyScreenYPos = MurphyScreenYPos + MurphyDY * MurphyZoomFactor;
-#else
- MurphyScreenXPos = MurphyScreenXPos + MurphyDX;
- MurphyScreenYPos = MurphyScreenYPos + MurphyDY;
-#endif
-
-
-#if 0
- printf("::: %04d [%03ld, %02d] ----------> %s [%d] [%d, %d] [%d, %d] [%d]\n",
- TimerVar,
- DemoOffset - DemoPointer, DemoKeyRepeatCounter,
- (DemoKeyCode == keyNone ? "(none)" :
- DemoKeyCode == keyLeft ? "left" :
- DemoKeyCode == keyRight ? "right" :
- DemoKeyCode == keyUp ? "up" :
- DemoKeyCode == keyDown ? "down" :
- DemoKeyCode == keySpace ? "space" :
- DemoKeyCode == keySpaceLeft ? "space + left" :
- DemoKeyCode == keySpaceRight ? "space + right" :
- DemoKeyCode == keySpaceUp ? "space + up" :
- DemoKeyCode == keySpaceDown ? "space + down" : "(unknown)"),
- DemoKeyCode,
- MurphyScreenXPos, MurphyScreenYPos,
- MurphyPosIndex % 60, MurphyPosIndex / 60,
- ClearPos);
-#endif
-
-#if 0
- Delay(500);
-#endif
-#if 1
if (!(ClearPos < 0)) // clear field that murphy is leaving
subCopyImageToScreen(ClearPos, aniSpace);
-#else
- if (! ClearPos < 0) // clear field that murphy is leaving
- subCopyFieldToScreen(ClearPos, 0);
-#endif
-
-#if 0
- printf("::: ---------------> %d, %d [%d, %d]\n",
- MurphyScreenXPos, MurphyScreenYPos, MurphyDX, MurphyDY);
-#endif
#if 0
// !!! special two-tile animation currently not used !!!
#endif
#if 1
- StretchedSprites.BltImg(X, Y, dx1, Tmp);
+ DDSpriteBuffer_BltImg(X, Y, dx1, Tmp);
GfxGraphic[GetX(*si)][GetY(*si)] = -1; // (Murphy's position)
GfxGraphic[GetX(dxPos)][GetY(dxPos)] = -1; // (snapping position)
// printf("::: Tmp: %d\n", Tmp);
else // pushing something
#endif
{
-#if 1
// (SeqPos iterates from 0 to 7 while pushing)
- StretchedSprites.BltImg(X + tDeltaX, Y + tDeltaY, dx2, SeqPos);
- // printf("::: SeqPos: %d\n", SeqPos);
-#else
- StretchedSprites.BltEx(X + tDeltaX, Y + tDeltaY, dx2);
-#endif
+ DDSpriteBuffer_BltImg(X + tDeltaX, Y + tDeltaY, dx2, SeqPos);
}
}
{
// ++++++++++++++++++++++++++++++++
// Begin of split movement (port)
-#if 1
MurphyScreenXPos = MurphyScreenXPos + 2 * MurphyDX * MurphyZoomFactor;
MurphyScreenYPos = MurphyScreenYPos + 2 * MurphyDY * MurphyZoomFactor;
-#else
- MurphyScreenXPos = MurphyScreenXPos + 2 * MurphyDX;
- MurphyScreenYPos = MurphyScreenYPos + 2 * MurphyDY;
-#endif
subCopyImageToScreen(ClearPos, aniSpace); // clear the field that murphy leaves
tDeltaX = MurphyDX * LocalStretch * (SeqPos + 1);
tDeltaY = MurphyDY * LocalStretch * (SeqPos + 1);
X = GetStretchX(dxPos) + tDeltaX;
Y = GetStretchY(dxPos) + tDeltaY;
-#if 1
- StretchedSprites.BltImg(X, Y, dx1, SeqPos); // plot first murphy
-#else
- StretchedSprites.BltEx(X, Y, dx[SeqPos]); // plot first murphy
-#endif
+ DDSpriteBuffer_BltImg(X, Y, dx1, SeqPos); // plot first murphy
+
tPos = dxPos + dx2Step;
X = GetStretchX(tPos);
Y = GetStretchY(tPos);
-#if 1
- StretchedSprites.BltImg(X + tDeltaX, Y + tDeltaY, dx1, SeqPos); // plot second murphy
- StretchedSprites.BltImg(X, Y, fiGraphic[LowByte(PlayField16[tPos])], 0); // replot the port on top
-#else
- StretchedSprites.BltEx(X + tDeltaX, Y + tDeltaY, dx[SeqPos]); // plot second murphy
- StretchedSprites.BltEx(X, Y, LowByte(PlayField16[tPos])); // replot the port on top
-#endif
+ DDSpriteBuffer_BltImg(X + tDeltaX, Y + tDeltaY, dx1, SeqPos); // plot second murphy
+ DDSpriteBuffer_BltImg(X, Y, fiGraphic[LowByte(PlayField16[tPos])], 0); // replot the port on top
// End of split movement (port)
// ------------------------------
} // loc_g_6D1E:'loc_g_6D28:
// +++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
- StretchedSprites.BltImg(X, Y, graphic, sync_frame);
+ DDSpriteBuffer_BltImg(X, Y, graphic, sync_frame);
// +++++++++++++++++++++++++++++++++++++++++
}