+2010-02-14
+ * done integrating R'n'D graphics engine into file "Murphy.c"
+
2010-02-07
* started integrating R'n'D graphics engine into Supaplex game engine
{ "sp_murphy.moving.left.frames", "3" },
{ "sp_murphy.moving.left.anim_mode", "pingpong" },
{ "sp_murphy.moving.left.delay", "2" },
+ { "sp_murphy.moving.left.start_frame", "1" },
{ "sp_murphy.moving.right", "RocksSP.pcx" },
{ "sp_murphy.moving.right.xpos", "11" },
{ "sp_murphy.moving.right.ypos", "0" },
{ "sp_murphy.moving.right.frames", "3" },
{ "sp_murphy.moving.right.anim_mode", "pingpong" },
{ "sp_murphy.moving.right.delay", "2" },
+ { "sp_murphy.moving.right.start_frame", "1" },
{ "sp_murphy.digging.left", "RocksSP.pcx" },
{ "sp_murphy.digging.left.xpos", "8" },
{ "sp_murphy.digging.left.ypos", "0" },
{ "sp_murphy.digging.left.frames", "3" },
{ "sp_murphy.digging.left.anim_mode", "pingpong" },
{ "sp_murphy.digging.left.delay", "2" },
+ { "sp_murphy.digging.left.start_frame", "1" },
{ "sp_murphy.digging.right", "RocksSP.pcx" },
{ "sp_murphy.digging.right.xpos", "11" },
{ "sp_murphy.digging.right.ypos", "0" },
{ "sp_murphy.digging.right.frames", "3" },
{ "sp_murphy.digging.right.anim_mode", "pingpong" },
{ "sp_murphy.digging.right.delay", "2" },
+ { "sp_murphy.digging.right.start_frame", "1" },
{ "sp_murphy.collecting.left", "RocksSP.pcx" },
{ "sp_murphy.collecting.left.xpos", "8" },
{ "sp_murphy.collecting.left.ypos", "0" },
{ "sp_murphy.collecting.left.frames", "3" },
{ "sp_murphy.collecting.left.anim_mode", "pingpong" },
{ "sp_murphy.collecting.left.delay", "2" },
+ { "sp_murphy.collecting.left.start_frame", "1" },
{ "sp_murphy.collecting.right", "RocksSP.pcx" },
{ "sp_murphy.collecting.right.xpos", "11" },
{ "sp_murphy.collecting.right.ypos", "0" },
{ "sp_murphy.collecting.right.frames", "3" },
{ "sp_murphy.collecting.right.anim_mode", "pingpong" },
{ "sp_murphy.collecting.right.delay", "2" },
+ { "sp_murphy.collecting.right.start_frame", "1" },
{ "sp_murphy.pushing.left", "RocksSP.pcx" },
{ "sp_murphy.pushing.left.xpos", "11" },
{ "sp_murphy.pushing.left.ypos", "1" },
{ "sp_murphy.shrinking.xpos", "8" },
{ "sp_murphy.shrinking.ypos", "14" },
{ "sp_murphy.shrinking.frames", "8" },
+ { "sp_murphy.shrinking.delay", "4" },
+ { "sp_murphy.shrinking.anim_mode", "linear" },
{ "sp_murphy_clone", "RocksSP.pcx" },
{ "sp_murphy_clone.xpos", "3" },
{ "sp_disk_red.ypos", "2" },
{ "sp_disk_red.frames", "1" },
{ "sp_disk_red.collecting", "RocksSP.pcx" },
- { "sp_disk_red.collecting.xpos", "8" },
+ { "sp_disk_red.collecting.xpos", "9" },
{ "sp_disk_red.collecting.ypos", "5" },
- { "sp_disk_red.collecting.frames", "8" },
+ { "sp_disk_red.collecting.frames", "7" },
{ "sp_disk_red.collecting.anim_mode", "linear" },
{ "sp_disk_red.active", "RocksSP.pcx" },
{ "sp_disk_red.active.xpos", "4" },
-#define COMPILE_DATE_STRING "2010-02-13 14:15"
+#define COMPILE_DATE_STRING "2010-02-14 00:55"
markDisplay:
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- cx = aniBug[bl];
+ cx = aniFramesBug[bl];
StretchedSprites.BltEx(GetStretchX(si), GetStretchY(si), cx);
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, aniElectron[bx]);
+ StretchedSprites.BltEx(X, Y, aniFramesElectron[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bx = (bx + 1) & 0x7;
MovHighByte(&PlayField16[si], bx);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, aniElectron[0x10 - bx]);
+ StretchedSprites.BltEx(X, Y, aniFramesElectron[0x10 - bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bx = ((bx + 1) & 0x7) | 8;
MovHighByte(&PlayField16[si], bx);
X = GetStretchX(si);
Y = GetStretchY(si + FieldWidth);
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X, Y - bx * TwoPixels, aniElectron[bx]);
+ StretchedSprites.BltEx(X, Y - bx * TwoPixels, aniFramesElectron[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si + FieldWidth]) != fiExplosion)
X = GetStretchX(si + 1);
Y = GetStretchY(si);
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X - bx * TwoPixels, Y, aniElectron[bx]);
+ StretchedSprites.BltEx(X - bx * TwoPixels, Y, aniFramesElectron[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si + 1]) != fiExplosion)
X = GetStretchX(si);
Y = GetStretchY(si - FieldWidth);
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X, Y + bx * TwoPixels, aniElectron[bx]);
+ StretchedSprites.BltEx(X, Y + bx * TwoPixels, aniFramesElectron[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si - FieldWidth]) != fiExplosion)
X = GetStretchX(si - 1);
Y = GetStretchY(si);
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X + bx * TwoPixels, Y, aniElectron[bx]);
+ StretchedSprites.BltEx(X + bx * TwoPixels, Y, aniFramesElectron[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = LowByte(bx);
if (bl == 7 && LowByte(PlayField16[si - 1]) != fiExplosion)
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, aniElectron[bx]);
+ StretchedSprites.BltEx(X, Y, aniFramesElectron[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
return subDrawElectronTurnLeft;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, aniElectron[0x10 - bx]);
+ StretchedSprites.BltEx(X, Y, aniFramesElectron[0x10 - bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
return subDrawElectronTurnRight;
X = GetStretchX(si);
Y = GetStretchY(si + FieldWidth);
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X, Y - bx * TwoPixels, aniElectron[bx]);
+ StretchedSprites.BltEx(X, Y - bx * TwoPixels, aniFramesElectron[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
return subDrawElectronFromBelow;
X = GetStretchX(si + 1);
Y = GetStretchY(si);
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X - bx * TwoPixels, Y, aniElectron[bx]);
+ StretchedSprites.BltEx(X - bx * TwoPixels, Y, aniFramesElectron[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
return subDrawElectronFromRight;
X = GetStretchX(si);
Y = GetStretchY(si - FieldWidth);
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X, Y + bx * TwoPixels, aniElectron[bx]);
+ StretchedSprites.BltEx(X, Y + bx * TwoPixels, aniFramesElectron[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
return subDrawElectronFromAbove;
X = GetStretchX(si - 1);
Y = GetStretchY(si);
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X + bx * TwoPixels, Y, aniElectron[bx]);
+ StretchedSprites.BltEx(X + bx * TwoPixels, Y, aniFramesElectron[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
return subDrawElectronFromLeft;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, aniExplosion[bl]);
+ StretchedSprites.BltEx(X, Y, aniFramesExplosion[bl]);
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if (bl == 8)
{
#endif
#if 1
-int aniBug[] = { 74, 75, 76, 77, 78, 77, 76, 77, 78, 77, 76, 75, 74, 25 };
-int aniZonkRollRight[] = { 198, 197, 196, 195, 194, 193, 192, 1, -1 };
-int aniZonkRollLeft[] = { 192, 193, 194, 195, 196, 197, 198, 1, -1 };
-int aniInfotronRollRight[] = { 206, 205, 204, 203, 202, 201, 200, 4 };
-int aniInfotronRollLeft[] = { 200, 201, 202, 203, 204, 205, 206, 4 };
-int aniSnikSnak[] = { 121, 122, 123, 124, 125, 126, 127, 120, 121 };
-int aniElectron[] = { 144, 145, 146, 147, 148, 149, 150, 151, 144 };
-int aniExplosion[] = { 3, 103, 104, 105, 106, 107, 108, 109, 0 };
-int aniTouchBase[] = { 80, 81, 82, 83, 84, 85, 86, 0, -1 };
-int aniTouchInfotron[] = { 87, 88, 89, 91, 92, 93, 0, -1 }; // Only seven frames!!!!
-int aniTouchRedDisk[] = { 96, 97, 98, 99, 100, 101, 102, 0, -1 };
-int aniMurphyExit[] = { 46, 46, 46, 46, 47, 47, 47, 47, 48, 48, 48, 48, 49, 49, 49, 49, 50, 50, 50, 50, 51, 51, 51, 51, 52, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 54, 0, 0, 0, 0, -1 };
-int aniMurphyEatLeft[] = { 176, 177, 178, 179, 180, 181, 182, 183, -1 };
-int aniMurphyEatRight[] = { 184, 185, 186, 187, 188, 189, 190, 191, -1 };
-int aniMurphyEatUpLeft[] = { 183, 182, 181, 180, 179, 178, 177, 176, -1 };
-int aniMurphyEatUpRight[] = { 191, 190, 189, 188, 187, 186, 185, 184, -1 };
- // aniMurphyEatRightRedDisk = { 184, 184, 185, 186, 187, 188, 189, 190, 191, -1) '9 frames!
-int aniEatInfotronLeft[] = { 209, 211, 213, 215, 217, 219, 221, 223, -1 };
-int aniEatInfotronRight[] = { 224, 226, 228, 230, 232, 234, 236, 238, -1 };
-int aniSplitUpDown[] = { 3, 3, 3, 3, 3, 3, 3, 3, -1 };
-int aniYellowDisk[] = { 18, 18, 18, 18, 18, 18, 18, 18, -1 };
-int aniOrangeDisk[] = { 8, 8, 8, 8, 8, 8, 8, 8, -1 };
-int aniRedDisk[] = { 20, -1 };
+int aniFramesBug[] = { 74, 75, 76, 77, 78, 77, 76, 77, 78, 77, 76, 75, 74, 25 };
+int aniFramesZonkRollRight[] = { 198, 197, 196, 195, 194, 193, 192, 1, -1 };
+int aniFramesZonkRollLeft[] = { 192, 193, 194, 195, 196, 197, 198, 1, -1 };
+int aniFramesInfotronRollRight[] = { 206, 205, 204, 203, 202, 201, 200, 4 };
+int aniFramesInfotronRollLeft[] = { 200, 201, 202, 203, 204, 205, 206, 4 };
+int aniFramesSnikSnak[] = { 121, 122, 123, 124, 125, 126, 127, 120, 121 };
+int aniFramesElectron[] = { 144, 145, 146, 147, 148, 149, 150, 151, 144 };
+int aniFramesExplosion[] = { 3, 103, 104, 105, 106, 107, 108, 109, 0 };
+int aniFramesTouchBase[] = { 80, 81, 82, 83, 84, 85, 86, 0, -1 };
+int aniFramesTouchInfotron[] = { 87, 88, 89, 91, 92, 93, 0, -1 }; // Only seven frames!!!!
+int aniFramesTouchRedDisk[] = { 96, 97, 98, 99, 100, 101, 102, 0, -1 };
+int aniFramesMurphyExit[] = { 46, 46, 46, 46, 47, 47, 47, 47, 48, 48, 48, 48, 49, 49, 49, 49, 50, 50, 50, 50, 51, 51, 51, 51, 52, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 54, 0, 0, 0, 0, -1 };
+int aniFramesMurphyEatLeft[] = { 176, 177, 178, 179, 180, 181, 182, 183, -1 };
+int aniFramesMurphyEatRight[] = { 184, 185, 186, 187, 188, 189, 190, 191, -1 };
+int aniFramesMurphyEatUpLeft[] = { 183, 182, 181, 180, 179, 178, 177, 176, -1 };
+int aniFramesMurphyEatUpRight[] = { 191, 190, 189, 188, 187, 186, 185, 184, -1 };
+ // aniFramesMurphyEatRightRedDisk = { 184, 184, 185, 186, 187, 188, 189, 190, 191, -1) '9 frames!
+int aniFramesEatInfotronLeft[] = { 209, 211, 213, 215, 217, 219, 221, 223, -1 };
+int aniFramesEatInfotronRight[] = { 224, 226, 228, 230, 232, 234, 236, 238, -1 };
+int aniFramesSplitUpDown[] = { 3, 3, 3, 3, 3, 3, 3, 3, -1 };
+int aniFramesYellowDisk[] = { 18, 18, 18, 18, 18, 18, 18, 18, -1 };
+int aniFramesOrangeDisk[] = { 8, 8, 8, 8, 8, 8, 8, 8, -1 };
+int aniFramesRedDisk[] = { 20, -1 };
+#endif
+
+#if 1
+
+int getSequenceLength(int sequence)
+{
+ switch (sequence)
+ {
+ case aniBug:
+ return 14;
+
+ case aniElectron:
+ case aniExplosion:
+ return 9;
+
+ case aniTouchInfotron:
+ return 7;
+
+ case aniMurphyExit:
+ return 40;
+
+ case aniRedDisk:
+ return 1;
+
+ default:
+ return 8;
+ }
+}
+
+boolean isSnappingSequence(int sequence)
+{
+ switch (sequence)
+ {
+ case aniTouchBase:
+ case aniTouchInfotron:
+ case aniTouchRedDisk:
+ return TRUE;
+
+ default:
+ return FALSE;
+ }
+}
+
#endif
void InitGlobals()
#define fiRAMLeft (26)
#define fiRAMRight (27)
#define fiHWFirst (28)
-
-#define fiHW_0 (fiHWFirst + 0)
-#define fiHW_1 (fiHWFirst + 1)
-#define fiHW_2 (fiHWFirst + 2)
-#define fiHW_3 (fiHWFirst + 3)
-#define fiHW_4 (fiHWFirst + 4)
-#define fiHW_5 (fiHWFirst + 5)
-#define fiHW_6 (fiHWFirst + 6)
-#define fiHW_7 (fiHWFirst + 7)
-#define fiHW_8 (fiHWFirst + 8)
-#define fiHW_9 (fiHWFirst + 9)
-
+#define fiHW0 (fiHWFirst + 0) // fiHWFirst
+#define fiHW1 (fiHWFirst + 1)
+#define fiHW2 (fiHWFirst + 2)
+#define fiHW3 (fiHWFirst + 3)
+#define fiHW4 (fiHWFirst + 4)
+#define fiHW5 (fiHWFirst + 5)
+#define fiHW6 (fiHWFirst + 6)
+#define fiHW7 (fiHWFirst + 7)
+#define fiHW8 (fiHWFirst + 8)
+#define fiHW9 (fiHWFirst + 9) // fiHWLast
#define fiHWLast (37)
#define fiRAMTop (38)
#define fiRAMBottom (39)
#define aniMurphySleepLeft IMG_SP_MURPHY_SLEEPING_LEFT
#define aniMurphySleepRight IMG_SP_MURPHY_SLEEPING_RIGHT
-#define aniMurphyTouchDown IMG_SP_MURPHY_SNAPPING_DOWN
#define aniMurphyTouchLeft IMG_SP_MURPHY_SNAPPING_LEFT
#define aniMurphyTouchRight IMG_SP_MURPHY_SNAPPING_RIGHT
#define aniMurphyTouchUp IMG_SP_MURPHY_SNAPPING_UP
+#define aniMurphyTouchDown IMG_SP_MURPHY_SNAPPING_DOWN
#define aniMurphyYawn IMG_SP_MURPHY_BORING_1
#define aniPushLeft IMG_SP_MURPHY_PUSHING_LEFT
#define aniPushRight IMG_SP_MURPHY_PUSHING_RIGHT
#define aniPushUpDown IMG_SP_MURPHY_PUSHING_RIGHT
+#define aniBug IMG_SP_BUGGY_BASE
+#define aniBugActive IMG_SP_BUGGY_BASE_ACTIVE
+#define aniZonkRollLeft IMG_SP_ZONK_MOVING_LEFT
+#define aniZonkRollRight IMG_SP_ZONK_MOVING_RIGHT
+#define aniEatInfotronLeft IMG_SP_MURPHY_COLLECTING_LEFT
+#define aniEatInfotronRight IMG_SP_MURPHY_COLLECTING_RIGHT
+#define aniInfotronRollLeft IMG_SP_INFOTRON_MOVING_LEFT
+#define aniInfotronRollRight IMG_SP_INFOTRON_MOVING_RIGHT
+#define aniMurphyMoveLeft IMG_SP_MURPHY_MOVING_LEFT
+#define aniMurphyMoveRight IMG_SP_MURPHY_MOVING_RIGHT
+#define aniMurphyMoveUpLeft IMG_SP_MURPHY_MOVING_LEFT
+#define aniMurphyMoveUpRight IMG_SP_MURPHY_MOVING_RIGHT
+#define aniMurphyDigLeft IMG_SP_MURPHY_DIGGING_LEFT
+#define aniMurphyDigRight IMG_SP_MURPHY_DIGGING_RIGHT
+#define aniMurphyDigUpLeft IMG_SP_MURPHY_DIGGING_LEFT
+#define aniMurphyDigUpRight IMG_SP_MURPHY_DIGGING_RIGHT
+#define aniMurphyEatLeft IMG_SP_MURPHY_COLLECTING_LEFT
+#define aniMurphyEatRight IMG_SP_MURPHY_COLLECTING_RIGHT
+#define aniMurphyEatUpLeft IMG_SP_MURPHY_COLLECTING_LEFT
+#define aniMurphyEatUpRight IMG_SP_MURPHY_COLLECTING_RIGHT
+#define aniSplitUpDown IMG_SP_MURPHY
+#define aniMurphyExit IMG_SP_MURPHY_SHRINKING
+#define aniElectron IMG_SP_ELECTRON
+#define aniExplosion IMG_SP_DEFAULT_EXPLODING
+#define aniTouchBase IMG_SP_BASE_SNAPPING
+#define aniTouchInfotron IMG_SP_INFOTRON_COLLECTING
+#define aniTouchRedDisk IMG_SP_DISK_RED_COLLECTING
+#define aniYellowDisk IMG_SP_DISK_YELLOW
+#define aniOrangeDisk IMG_SP_DISK_ORANGE
+#define aniRedDisk IMG_SP_DISK_RED
+
#define aniSnikSnakDown 167
#define aniSnikSnakLeft 239
#define aniSnikSnakRight 247
#if 1
-extern int aniBug[], aniZonkRollRight[], aniZonkRollLeft[];
-extern int aniEatInfotronLeft[], aniEatInfotronRight[];
-extern int aniInfotronRollRight[], aniInfotronRollLeft[];
-extern int aniMurphyEatLeft[], aniMurphyEatRight[];
-extern int aniMurphyEatUpLeft[], aniMurphyEatUpRight[], aniSplitUpDown[];
-extern int aniMurphyExit[];
-extern int aniSnikSnak[], aniElectron[], aniExplosion[];
-extern int aniTouchBase[], aniTouchInfotron[], aniTouchRedDisk[];
-extern int aniYellowDisk[], aniOrangeDisk[], aniRedDisk[];
+extern int aniFramesBug[], aniFramesZonkRollRight[], aniFramesZonkRollLeft[];
+extern int aniFramesEatInfotronLeft[], aniFramesEatInfotronRight[];
+extern int aniFramesInfotronRollRight[], aniFramesInfotronRollLeft[];
+extern int aniFramesMurphyEatLeft[], aniFramesMurphyEatRight[];
+extern int aniFramesMurphyEatUpLeft[], aniFramesMurphyEatUpRight[], aniFramesSplitUpDown[];
+extern int aniFramesMurphyExit[];
+extern int aniFramesSnikSnak[], aniFramesElectron[], aniFramesExplosion[];
+extern int aniFramesTouchBase[], aniFramesTouchInfotron[], aniFramesTouchRedDisk[];
+extern int aniFramesYellowDisk[], aniFramesOrangeDisk[], aniFramesRedDisk[];
#else
extern void ReadLevel();
+extern int getSequenceLength(int sequence);
+extern boolean isSnappingSequence(int sequence);
+
extern boolean Alignments;
extern boolean BlockingSpeed;
extern boolean Cracked;
Y = GetStretchY(si);
dx = (bl & 0x7) + 1;
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniInfotronRollLeft[dx - 1]);
+ StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniFramesInfotronRollLeft[dx - 1]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = HighByte(PlayField16[si]) + 1; // get and increment sequence#
if (bl == 0x24)
Y = GetStretchY(si);
dx = (bl & 0x7) + 1;
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniInfotronRollRight[dx - 1]);
+ StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniFramesInfotronRollRight[dx - 1]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = HighByte(PlayField16[si]) + 1;
if (bl == 0x34)
Y = GetStretchY(si);
dx = (bl & 0xF) + 1;
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniInfotronRollLeft[dx - 1]);
+ StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniFramesInfotronRollLeft[dx - 1]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = HighByte(PlayField16[si]) + 1; // retrieve and increment sequence#
if (bl < 0x52)
Y = GetStretchY(si);
dx = (bl & 0x7) + 1;
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniInfotronRollRight[dx - 1]);
+ StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniFramesInfotronRollRight[dx - 1]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = HighByte(PlayField16[si]) + 1;
if (bl < 0x62)
// Variables that hold information about the animation sequence
static int *dx = 0; // an array of image positions in moving.mpx, finalized with -1
+ 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
static int SeqPos = 0; // index into dx()
static int ClearPos = 0; // Position to clear before blitting sprites, none=-1
static int dxPos = 0; // field-position to draw dx(SeqPos)
static int dx2Step = 0; // position of dx2 relative to dx-position
+ static int dx1SequenceLength = 0;
ax = PlayField16[*si];
al = LowByte(ax);
MurphyMoveCounter = 1; // We have a Murphy!
MurphyExplodePos = *si;
- if (ax != 3) // yes--go proceed moving murphy?
+
+ // (check if high byte of PlayField16 has stored movement information)
+ if (ax != fiMurphy) // yes--go proceed moving murphy?
goto locProceedMovingMurphy;
// FS: reset moving sequence variables
MurphyDY = 0;
ClearPos = *si;
dxPos = *si;
+ dx1 = -1;
dx2 = -1;
SeqPos = 0;
// end of FS
MovHighByte(&PlayField16[*si], 0x2A);
MovingPictureSequencePhase = 0x40; // init picture move sequence
- dx = aniRedDisk;
+ dx = aniFramesRedDisk;
+ dx1 = aniRedDisk;
MovLowByte(&RedDiskReleasePhase, 1);
Mov(&RedDiskReleaseMurphyPos, *si); // remember Murphy's location
goto loc_Split;
// ==========================================================================
loc_g_6312:
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+ dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyMoveUpRight : aniMurphyMoveUpLeft);
PlayField16[*si - FieldWidth] = 0x103;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
// ==========================================================================
loc_g_6341:
- dx = aniMurphyEatLeft;
+ dx = aniFramesMurphyEatLeft;
+ dx1 = aniMurphyMoveLeft;
PlayField16[*si - 1] = 0x203;
PlayField16[*si] = 0x300;
*si = *si - 1;
// ==========================================================================
loc_g_6364:
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+ dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyMoveUpRight : aniMurphyMoveUpLeft);
PlayField16[*si + FieldWidth] = 0x303;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
// ==========================================================================
loc_g_6399:
- dx = aniMurphyEatRight;
+ dx = aniFramesMurphyEatRight;
+ dx1 = aniMurphyMoveRight;
PlayField16[*si + 1] = 0x403;
PlayField16[*si] = 0x300;
*si = *si + 1;
loc_g_63D3:
subSoundFXBase();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+ dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyDigUpRight : aniMurphyDigUpLeft);
PlayField16[*si - FieldWidth] = 0x503;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
loc_g_641C:
subSoundFXBase();
- dx = aniMurphyEatLeft;
+ dx = aniFramesMurphyEatLeft;
+ dx1 = aniMurphyDigLeft;
PlayField16[*si - 1] = 0x203;
PlayField16[*si] = 0x300;
*si = *si - 1;
loc_g_6459:
subSoundFXBase();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+ dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyDigUpRight : aniMurphyDigUpLeft);
PlayField16[*si + FieldWidth] = 0x703;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
loc_g_64A2:
subSoundFXBase();
- dx = aniMurphyEatRight;
+ dx = aniFramesMurphyEatRight;
+ dx1 = aniMurphyDigRight;
PlayField16[*si + 1] = 0x803;
PlayField16[*si] = 0x300;
*si = *si + 1;
loc_g_64DF:
subCopyImageToScreen(*si, aniMurphyTouchUp);
subSoundFXBase();
- dx = aniTouchBase;
+ dx = aniFramesTouchBase;
+ dx1 = aniTouchBase;
dxPos = *si - FieldWidth;
MovHighByte(&PlayField16[*si], 0x10);
goto loc_StopNoSplit;
loc_g_651D:
subCopyImageToScreen(*si, aniMurphyTouchLeft);
subSoundFXBase();
- dx = aniTouchBase;
+ dx = aniFramesTouchBase;
+ dx1 = aniTouchBase;
dxPos = *si - 1;
MovHighByte(&PlayField16[*si], 0x11);
goto loc_StopNoSplit;
loc_g_655B:
subCopyImageToScreen(*si, aniMurphyTouchDown);
subSoundFXBase();
- dx = aniTouchBase;
+ dx = aniFramesTouchBase;
+ dx1 = aniTouchBase;
dxPos = *si + FieldWidth;
MovHighByte(&PlayField16[*si], 0x12);
goto loc_StopNoSplit;
loc_g_6599:
subCopyImageToScreen(*si, aniMurphyTouchRight);
subSoundFXBase();
- dx = aniTouchBase;
+ dx = aniFramesTouchBase;
+ dx1 = aniTouchBase;
dxPos = *si + 1;
MovHighByte(&PlayField16[*si], 0x13);
goto loc_StopNoSplit;
loc_g_65C6:
subSoundFXInfotron();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+ dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si - FieldWidth] = 0x903;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
loc_g_65FE:
subSoundFXInfotron();
- dx = aniEatInfotronLeft;
+ dx = aniFramesEatInfotronLeft;
+ dx1 = aniEatInfotronLeft;
+#if 0
dx2 = fiInfotron;
dx2Step = -1;
ClearPos = -1;
+#endif
PlayField16[*si - 1] = 0xA03;
PlayField16[*si] = 0x300;
*si = *si - 1;
loc_g_662A:
subSoundFXInfotron();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+ dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si + FieldWidth] = 0xB03;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
loc_g_6662:
subSoundFXInfotron();
- dx = aniEatInfotronRight;
+ dx = aniFramesEatInfotronRight;
+ dx1 = aniEatInfotronRight;
+#if 0
dx2 = fiInfotron;
dx2Step = 1;
ClearPos = -1;
+#endif
PlayField16[*si + 1] = 0xC03;
PlayField16[*si] = 0x300;
*si = *si + 1;
loc_g_668E:
subCopyImageToScreen(*si, aniMurphyTouchUp);
subSoundFXInfotron();
- dx = aniTouchInfotron;
+ dx = aniFramesTouchInfotron;
+ dx1 = aniTouchInfotron;
MovHighByte(&PlayField16[*si], 0x14);
MovHighByte(&PlayField16[*si - FieldWidth], 0xFF);
goto loc_StopNoSplit;
loc_g_66C0:
subCopyImageToScreen(*si, aniMurphyTouchLeft);
subSoundFXInfotron();
- dx = aniTouchInfotron;
+ dx = aniFramesTouchInfotron;
+ dx1 = aniTouchInfotron;
MovHighByte(&PlayField16[*si], 0x15);
MovHighByte(&PlayField16[*si - 1], 0xFF);
goto loc_StopNoSplit;
loc_g_66F2:
subCopyImageToScreen(*si, aniMurphyTouchDown);
subSoundFXInfotron();
- dx = aniTouchInfotron;
+ dx = aniFramesTouchInfotron;
+ dx1 = aniTouchInfotron;
MovHighByte(&PlayField16[*si], 0x16);
MovHighByte(&PlayField16[*si + FieldWidth], 0xFF);
goto loc_StopNoSplit;
loc_g_6724:
subCopyImageToScreen(*si, aniMurphyTouchRight);
subSoundFXInfotron();
- dx = aniTouchInfotron;
+ dx = aniFramesTouchInfotron;
+ dx1 = aniTouchInfotron;
MovHighByte(&PlayField16[*si], 0x17);
MovHighByte(&PlayField16[*si + 1], 0xFF);
goto loc_StopNoSplit;
#endif
LeadOutCounter = 0x40; // quit: start lead-out
- dx = aniMurphyExit;
+ dx = aniFramesMurphyExit;
+ dx1 = aniMurphyExit;
MovHighByte(&PlayField16[*si], 0xD);
goto loc_StopNoSplit;
MovHighByte(&PlayField16[*si - 2], 1);
subCopyImageToScreen(*si, aniPushLeft); // draw pushing murphy
- dx = aniZonkRollLeft;
+ dx = aniFramesZonkRollLeft;
+ dx1 = aniZonkRollLeft;
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
MovHighByte(&PlayField16[*si + 2], 1);
subCopyImageToScreen(*si, aniPushRight); // draw pushing murphy
- dx = aniZonkRollRight;
+ dx = aniFramesZonkRollRight;
+ dx1 = aniZonkRollRight;
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
if (PlayField16[*si - 2 * FieldWidth] != 0)
return;
- dx = aniSplitUpDown;
+ dx = aniFramesSplitUpDown;
+ dx1 = aniSplitUpDown;
dx2Step = -FieldWidth;
PlayField16[*si] = 0x1803;
PlayField16[*si - 2 * FieldWidth] = 0x300;
if (PlayField16[*si - 2] != 0)
return;
- dx = aniMurphyEatLeft;
+ dx = aniFramesMurphyEatLeft;
+ dx1 = aniMurphyMoveLeft;
dx2Step = -1;
PlayField16[*si] = 0x1903;
PlayField16[*si - 2] = 0x300;
if (PlayField16[*si + 2 * FieldWidth] != 0)
return;
- dx = aniSplitUpDown;
+ dx = aniFramesSplitUpDown;
+ dx1 = aniSplitUpDown;
dx2Step = FieldWidth;
PlayField16[*si] = 0x1A03;
PlayField16[*si + 2 * FieldWidth] = 0x300;
if (PlayField16[*si + 2] != 0)
return;
- dx = aniMurphyEatRight;
+ dx = aniFramesMurphyEatRight;
+ dx1 = aniMurphyMoveRight;
dx2Step = 1;
PlayField16[*si] = 0x1B03;
PlayField16[*si + 2] = 0x300;
// ==========================================================================
loc_g_69A6:
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+ dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si] = 0x1C03;
PlayField16[*si - FieldWidth] = 0x300;
goto loc_StopNoSplit;
// ==========================================================================
loc_g_69CE:
- dx = aniMurphyEatLeft;
+ dx = aniFramesMurphyEatLeft;
+ dx1 = aniMurphyEatLeft;
PlayField16[*si] = 0x300; // !!!!!! this time we move murphy at sequence-start!
PlayField16[*si - 1] = 0x1D03;
*si = *si - 1;
// ==========================================================================
loc_g_69F7:
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
+ dx = (MurphyVarFaceLeft == 0 ? aniFramesMurphyEatUpRight : aniFramesMurphyEatUpLeft);
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si] = 0x1E03;
PlayField16[*si + FieldWidth] = 0x300;
goto loc_StopNoSplit;
// ==========================================================================
loc_g_6A1F:
- // dx = aniMurphyEatRightRedDisk 'this sequence is 9 steps long!
- dx = aniMurphyEatRight;
+ // dx = aniFramesMurphyEatRightRedDisk 'this sequence is 9 steps long!
+ dx = aniFramesMurphyEatRight;
+ dx1 = aniMurphyEatRight;
// --------------------------------------------------------------------------
// BugFix
// Table data_h_145A, pointed to by table data_h_105E, has a severe bug:
// ==========================================================================
loc_g_6A48:
- dx = aniTouchRedDisk;
+ dx = aniFramesTouchRedDisk;
+ dx1 = aniTouchRedDisk;
MovHighByte(&PlayField16[*si], 0x20);
MovHighByte(&PlayField16[*si - FieldWidth], 3);
goto loc_StopNoSplit;
// ==========================================================================
loc_g_6A64:
- dx = aniTouchRedDisk;
+ dx = aniFramesTouchRedDisk;
+ dx1 = aniTouchRedDisk;
MovHighByte(&PlayField16[*si], 0x21);
MovHighByte(&PlayField16[*si - 1], 3);
goto loc_StopNoSplit;
// ==========================================================================
loc_g_6A80:
- dx = aniTouchRedDisk;
+ dx = aniFramesTouchRedDisk;
+ dx1 = aniTouchRedDisk;
MovHighByte(&PlayField16[*si], 0x22);
MovHighByte(&PlayField16[*si + FieldWidth], 3);
goto loc_StopNoSplit;
// ==========================================================================
loc_g_6A9C:
- dx = aniTouchRedDisk;
+ dx = aniFramesTouchRedDisk;
+ dx1 = aniTouchRedDisk;
MovHighByte(&PlayField16[*si], 0x23);
MovHighByte(&PlayField16[*si + 1], 3);
return;
PlayField16[*si - 2 * FieldWidth] = 0x1200;
+#if 0
subCopyImageToScreen(*si, aniPushRight);
- dx = aniYellowDisk;
+#endif
+ dx = aniFramesYellowDisk;
+ dx1 = aniYellowDisk;
dxPos = *si - FieldWidth;
+#if 1
+ dx2 = (MurphyVarFaceLeft == 0 ? aniPushRight : aniPushLeft);
+#else
dx2 = aniPushUpDown;
+#endif
dx2Step = FieldWidth;
PlayField16[*si] = 0x2403;
+#if 1
+ subCopyImageToScreen(*si, dx2);
+#endif
goto loc_MoveNoSplit;
// ==========================================================================
PlayField16[*si - 2] = 0x1200;
subCopyImageToScreen(*si, aniPushLeft);
- dx = aniYellowDisk;
+ dx = aniFramesYellowDisk;
+ dx1 = aniYellowDisk;
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
return;
PlayField16[*si + 2 * FieldWidth] = 0x1200;
+#if 0
subCopyImageToScreen(*si, aniPushRight);
- dx = aniYellowDisk;
+#endif
+ dx = aniFramesYellowDisk;
+ dx1 = aniYellowDisk;
dxPos = *si + FieldWidth;
+#if 1
+ dx2 = (MurphyVarFaceLeft == 0 ? aniPushRight : aniPushLeft);
+#else
dx2 = aniPushUpDown;
+#endif
dx2Step = -FieldWidth;
PlayField16[*si] = 0x2703;
+#if 1
+ subCopyImageToScreen(*si, dx2);
+#endif
goto loc_MoveNoSplit;
// ==========================================================================
PlayField16[*si + 2] = 0x1200;
subCopyImageToScreen(*si, aniPushRight);
- dx = aniYellowDisk;
+ dx = aniFramesYellowDisk;
+ dx1 = aniYellowDisk;
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
PlayField16[*si - 2] = 0x800;
subCopyImageToScreen(*si, aniPushLeft);
- dx = aniOrangeDisk;
+ dx = aniFramesOrangeDisk;
+ dx1 = aniOrangeDisk;
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
PlayField16[*si + 2] = 0x100;
subCopyImageToScreen(*si, aniPushRight);
- dx = aniOrangeDisk;
+ dx = aniFramesOrangeDisk;
+ dx1 = aniOrangeDisk;
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
// ==========================================================================
loc_g_6C8F:
+
+#if 1
+ if (SeqPos <= 0)
+ dx1SequenceLength = getSequenceLength(dx1);
+#endif
+
if (SplitMoveFlag == 0)
{
// ++++++++++++++++++++++++++
X = GetStretchX(dxPos) + tDeltaX;
Y = GetStretchY(dxPos) + tDeltaY;
Tmp = (SeqPos < 0 ? 0 : SeqPos); // 9StepBugFix!(red disk move right)
+
+#if 1
+ if (isSnappingSequence(dx1) && SeqPos == dx1SequenceLength - 1)
+ dx1 = aniSpace;
+#endif
+
+#if 1
+ StretchedSprites.BltImg(X, Y, dx1, Tmp);
+ // printf("::: Tmp: %d\n", Tmp);
+#else
StretchedSprites.BltEx(X, Y, dx[Tmp]);
+#endif
#if 1
if (!(dx2 < 0))
#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
} // loc_g_6D1E:'loc_g_6D28:
SeqPos = SeqPos + 1;
+#if 1
+ if (SeqPos < dx1SequenceLength)
+ return;
+#else
if (dx[SeqPos] > -1)
return;
+#endif
// Follow-up after movement completed 'loc_g_6D35:
MurphyXPos = MurphyXPos + MurphyDX;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, aniSnikSnak[bx]);
+ StretchedSprites.BltEx(X, Y, aniFramesSnikSnak[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bx = (bx + 1) & 0x7;
MovHighByte(&PlayField16[si], bx);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, aniSnikSnak[0x10 - bx]);
+ StretchedSprites.BltEx(X, Y, aniFramesSnikSnak[0x10 - bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bx = ((bx + 1) & 0x7) | 8;
MovHighByte(&PlayField16[si], bx);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, aniSnikSnak[bx]);
+ StretchedSprites.BltEx(X, Y, aniFramesSnikSnak[bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
return subDrawSnikSnakTurnLeft;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
- StretchedSprites.BltEx(X, Y, aniSnikSnak[0x10 - bx]);
+ StretchedSprites.BltEx(X, Y, aniFramesSnikSnak[0x10 - bx]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
return subDrawSnikSnakTurnRight;
Y = GetStretchY(si);
dx = (bl & 0x7) + 1;
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniZonkRollLeft[dx - 1]);
+ StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniFramesZonkRollLeft[dx - 1]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = HighByte(PlayField16[si]) + 1; // get and increment sequence#
if (bl == 0x24)
Y = GetStretchY(si);
dx = (bl & 0x7) + 1;
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniZonkRollRight[dx - 1]);
+ StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniFramesZonkRollRight[dx - 1]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = HighByte(PlayField16[si]) + 1;
if (bl == 0x34)
Y = GetStretchY(si);
dx = (bl & 0xF) + 1;
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniZonkRollLeft[dx - 1]);
+ StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniFramesZonkRollLeft[dx - 1]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = HighByte(PlayField16[si]) + 1; // retrieve and increment sequence#
if (bl < 0x52)
Y = GetStretchY(si);
dx = (bl & 0x7) + 1;
StretchedSprites.BltEx(X, Y, 0);
- StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniZonkRollRight[dx - 1]);
+ StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniFramesZonkRollRight[dx - 1]);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
bl = HighByte(PlayField16[si]) + 1;
if (bl < 0x62)