projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
version number set to 4.0.1.0
[rocksndiamonds.git]
/
src
/
game_sp
/
Murphy.c
diff --git
a/src/game_sp/Murphy.c
b/src/game_sp/Murphy.c
index 1d3c74c102544040060d88964bc4e2d8f661c213..bf590db0fd22da5b5dfe0991a440be88b764cb52 100644
(file)
--- a/
src/game_sp/Murphy.c
+++ b/
src/game_sp/Murphy.c
@@
-4,55
+4,49
@@
#include "Murphy.h"
#include "Murphy.h"
+
static void subEatRedDisk(int si);
static boolean subMoveKillsMurphy(int si, int ax, int bl);
static void subEatRedDisk(int si);
static boolean subMoveKillsMurphy(int si, int ax, int bl);
-// static char *VB_Name = "modMurphy";
-
-// --- Option Explicit
-
-#define LocalStretch (1)
+#define LocalStretch (2)
+#define MurphyZoomFactor (ZoomFactor)
// ==========================================================================
// SUBROUTINE
// Move Murphy in any direction
// ==========================================================================
// ==========================================================================
// SUBROUTINE
// Move Murphy in any direction
// ==========================================================================
-
int
subAnimateMurphy(int *si)
+
void
subAnimateMurphy(int *si)
{
{
- int subAnimateMurphy;
-
- // int ax, al, ah, bx, bl, i, X, Y;
- // int tX, tY, tDeltaX, tDeltaY, tPos, Tmp;
- int ax, al, bx, bl, i, X, Y;
+ int ax, al, bl, i, X, Y;
+ int time1, time2;
int tDeltaX, tDeltaY, tPos, Tmp;
// Variables that hold information about the animation sequence
int tDeltaX, tDeltaY, tPos, Tmp;
// 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; // 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 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);
ax = PlayField16[*si];
al = LowByte(ax);
-#if 1
- printf("::: Murphy.c: subAnimateMurphy(): %d [%d, %d] %d, %d [%d]\n",
- *si, *si % 60, *si / 60, ax, al, (al == fiMurphy));
-#endif
-
if (al != fiMurphy)
{
MurphyMoveCounter = 0; // We have no Murphy! Exit!
if (al != fiMurphy)
{
MurphyMoveCounter = 0; // We have no Murphy! Exit!
- return subAnimateMurphy;
+
+ return;
}
MurphyMoveCounter = 1; // We have a Murphy!
MurphyExplodePos = *si;
}
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
goto locProceedMovingMurphy;
// FS: reset moving sequence variables
@@
-60,14
+54,18
@@
int subAnimateMurphy(int *si)
MurphyDY = 0;
ClearPos = *si;
dxPos = *si;
MurphyDY = 0;
ClearPos = *si;
dxPos = *si;
+ dx1 = -1;
dx2 = -1;
SeqPos = 0;
// end of FS
dx2 = -1;
SeqPos = 0;
// end of FS
+
ScratchGravity = 0; // scratch gravity off
if (GravityFlag != 0) // Gravity? (1=gravity on)
{
bl = LowByte(PlayField16[*si - FieldWidth]); // check above
ScratchGravity = 0; // scratch gravity off
if (GravityFlag != 0) // Gravity? (1=gravity on)
{
bl = LowByte(PlayField16[*si - FieldWidth]); // check above
- if (! (bl == fiPortUp || bl == fiPortUpAndDown || bl == fiPortAllDirections))
+ if (! (bl == fiPortUp ||
+ bl == fiPortUpAndDown ||
+ bl == fiPortAllDirections))
{
if (PlayField16[*si + FieldWidth] == 0) // gravity on and space below!
ScratchGravity = 1;
{
if (PlayField16[*si + FieldWidth] == 0) // gravity on and space below!
ScratchGravity = 1;
@@
-85,73
+83,86
@@
int subAnimateMurphy(int *si)
goto loc_g_6364;
}
goto loc_g_6364;
}
- ax = (TimerVar & 3);
- if (ax != 0)
- return subAnimateMurphy;
-
// ------------------------------------------------------------------
// Murphy's YAWN & SLEEP sequence, counted down by YawnSleepCounter:
// ------------------------------------------------------------------
// Murphy's YAWN & SLEEP sequence, counted down by YawnSleepCounter:
+
YawnSleepCounter = YawnSleepCounter + 1;
YawnSleepCounter = YawnSleepCounter + 1;
- if (YawnSleepCounter == 4)
+
+ if (YawnSleepCounter < 16)
+ return;
+
+ if (YawnSleepCounter < 2000)
{
{
-
subCopyFieldToScreen(*si, fiMurphy);
// normal grin
- return subAnimateMurphy;
- } // loc_g_5ECE:
+ // normal grin
+ // (default: single graphic, no animation)
+ subCopyAnimToScreen(*si, aniMurphy, YawnSleepCounter - 16);
- if (YawnSleepCounter <= 500) // loc_g_5ED7:
- return subAnimateMurphy;
+ return;
+ }
- if (YawnSleepCounter <
= 522
)
+ if (YawnSleepCounter <
4000
)
{
{
- bx = (YawnSleepCounter - 500) / 2;
- subCopyFieldToScreen(*si, aniMurphyYawn + bx); // yawn! and look depressed afterwards...
- return subAnimateMurphy;
- } // loc_g_5F00:
+ // yawn! and look depressed afterwards...
+ // (default: 12 animation frames with delay of 8)
+ subCopyAnimToScreen(*si, aniMurphyYawn, YawnSleepCounter - 2000);
- if (YawnSleepCounter <= 1000)
- return subAnimateMurphy;
+ return;
+ }
- if (YawnSleepCounter <
= 1022
)
+ if (YawnSleepCounter <
6400
)
{
{
- bx = (YawnSleepCounter - 1000) / 2;
- subCopyFieldToScreen(*si, aniMurphyYawn + bx); // yawn again!
- return subAnimateMurphy;
- } // loc_g_5F32:
+ // yawn again!
+ // (default: 12 animation frames with delay of 8)
+ subCopyAnimToScreen(*si, aniMurphyYawn, YawnSleepCounter - 4000);
+
+ return;
+ }
- if (YawnSleepCounter <= 1600) // loc_g_5F3B:
-
return subAnimateMurphy
;
+ // time1 = 6400 + 12 * 8; // (default: 6496 == 6400 + 12 * 8)
+
time1 = 6400 + 12 * 10
;
- if (YawnSleepCounter <
= 1622
)
+ if (YawnSleepCounter <
time1
)
{
{
- bx = (YawnSleepCounter - 1600) / 2;
- subCopyFieldToScreen(*si, aniMurphyYawn + bx); // yawn again! - third time
- return subAnimateMurphy;
- } // loc_g_5F64:
+ // yawn again! - third time
+ // (default: 12 animation frames with delay of 8)
+ subCopyAnimToScreen(*si, aniMurphyYawn, YawnSleepCounter - 6400);
- if (YawnSleepCounter > 1654)
- return subAnimateMurphy;
+ return;
+ }
+
+ // time2 = 6496 + 3 * 64; // (default: 6688 == 6496 + 3 * 64)
+ time2 = 6496 + 3 * 100;
+
+ if (YawnSleepCounter > time2) // Murphy already went to sleep
+ return;
if (PlayField16[*si - 1] == 0)
{
if (PlayField16[*si + 1] == 0)
{
if (PlayField16[*si - 1] == 0)
{
if (PlayField16[*si + 1] == 0)
{
- YawnSleepCounter = 36;
-
return subAnimateMurphy
;
+ // no sleep -- go back to "wait and start yawning" phase
+
YawnSleepCounter = 144
;
+ return;
}
else
{
}
else
{
- bx = (YawnSleepCounter - 1622) / 16;
- subCopyFieldToScreen(*si, aniMurphySleepRight + bx); // go to sleep
- return subAnimateMurphy;
+ // go to sleep (right side)
+ // (default: 3 animation frames with delay of 64)
+ subCopyAnimToScreen(*si, aniMurphySleepRight, YawnSleepCounter - time1);
+
+ return;
}
}
- } // loc_g_5F81:
+ }
+
+ // go to sleep (left side)
+ // (default: 3 animation frames with delay of 64)
+ subCopyAnimToScreen(*si, aniMurphySleepLeft, YawnSleepCounter - time1);
- bx = (YawnSleepCounter - 1622) / 16;
- subCopyFieldToScreen(*si, aniMurphySleepLeft + bx); // go to sleep
- return subAnimateMurphy;
+ return;
// end of YAWN-SLEEP-Sequence
// end of YAWN-SLEEP-Sequence
+
// ------------------------------------------------------------------
// ==========================================================================
// (Direct Jump) a key was pressed
// ------------------------------------------------------------------
// ==========================================================================
// (Direct Jump) a key was pressed
@@
-241,7
+252,7
@@
loc_g_6003:
default:
RedDiskReleaseFlag = 0;
default:
RedDiskReleaseFlag = 0;
- return
subAnimateMurphy
;
+ return;
break;
}
break;
}
@@
-285,7
+296,7
@@
loc_g_6078:
if (! subMoveKillsMurphy(*si - FieldWidth, ax, bl))
goto loc_g_6078;
if (! subMoveKillsMurphy(*si - FieldWidth, ax, bl))
goto loc_g_6078;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// moving right to left ...
// ==========================================================================
// moving right to left ...
@@
-334,7
+345,7
@@
loc_g_60DA:
if (! subMoveKillsMurphy(*si - 1, ax, bl))
goto loc_g_60DA;
if (! subMoveKillsMurphy(*si - 1, ax, bl))
goto loc_g_60DA;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// moving up to down ...
// ==========================================================================
// moving up to down ...
@@
-376,7
+387,7
@@
loc_g_6154:
if (! subMoveKillsMurphy(*si + FieldWidth, ax, bl))
goto loc_g_6154;
if (! subMoveKillsMurphy(*si + FieldWidth, ax, bl))
goto loc_g_6154;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// moving left to right ...
// ==========================================================================
// moving left to right ...
@@
-425,7
+436,7
@@
loc_g_61B6:
if (! subMoveKillsMurphy(*si + 1, ax, bl))
goto loc_g_61B6;
if (! subMoveKillsMurphy(*si + 1, ax, bl))
goto loc_g_61B6;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// touching down to up ...
// ==========================================================================
// touching down to up ...
@@
-454,7
+465,7
@@
loc_g_622E:
if (al == fiRedDisk)
goto loc_g_6A48;
if (al == fiRedDisk)
goto loc_g_6A48;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// touching right to left ...
// ==========================================================================
// touching right to left ...
@@
-483,7
+494,7
@@
loc_g_6258:
if (al == fiRedDisk)
goto loc_g_6A64;
if (al == fiRedDisk)
goto loc_g_6A64;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// touching up to down ...
// ==========================================================================
// touching up to down ...
@@
-511,7
+522,7
@@
loc_g_6288:
if (al == fiRedDisk)
goto loc_g_6A80;
if (al == fiRedDisk)
goto loc_g_6A80;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// touching left to right ...
// ==========================================================================
// touching left to right ...
@@
-540,7
+551,7
@@
loc_g_62B2:
if (al == fiRedDisk)
goto loc_g_6A9C;
if (al == fiRedDisk)
goto loc_g_6A9C;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// Release Red disk: no move ...
// ==========================================================================
// Release Red disk: no move ...
@@
-551,19
+562,19
@@
loc_g_62E2:
ClearPos = -1;
// end of FS
if (LowByte(RedDiskCount) == 0)
ClearPos = -1;
// end of FS
if (LowByte(RedDiskCount) == 0)
- return
subAnimateMurphy
;
+ return;
if (LowByte(RedDiskReleasePhase) != 0)
if (LowByte(RedDiskReleasePhase) != 0)
- return
subAnimateMurphy
;
+ return;
if (LowByte(RedDiskReleaseFlag) != 1)
if (LowByte(RedDiskReleaseFlag) != 1)
- return
subAnimateMurphy
;
+ return;
MovHighByte(&PlayField16[*si], 0x2A);
MovingPictureSequencePhase = 0x40; // init picture move sequence
MovHighByte(&PlayField16[*si], 0x2A);
MovingPictureSequencePhase = 0x40; // init picture move sequence
- dx = aniRedDisk;
+ dx
1
= aniRedDisk;
MovLowByte(&RedDiskReleasePhase, 1);
MovLowByte(&RedDiskReleasePhase, 1);
-
Mov(&RedDiskReleaseMurphyPos, *si)
; // remember Murphy's location
+
RedDiskReleaseMurphyPos = *si
; // remember Murphy's location
goto loc_Split;
// ==========================================================================
goto loc_Split;
// ==========================================================================
@@
-571,7
+582,7
@@
loc_g_62E2:
// ==========================================================================
loc_g_6312:
// ==========================================================================
loc_g_6312:
- dx
= (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRigh
t);
+ dx
1 = (MurphyVarFaceLeft == 0 ? aniMurphyMoveUpRight : aniMurphyMoveUpLef
t);
PlayField16[*si - FieldWidth] = 0x103;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
PlayField16[*si - FieldWidth] = 0x103;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
@@
-582,7
+593,7
@@
loc_g_6312:
// ==========================================================================
loc_g_6341:
// ==========================================================================
loc_g_6341:
- dx
= aniMurphyEat
Left;
+ dx
1 = aniMurphyMove
Left;
PlayField16[*si - 1] = 0x203;
PlayField16[*si] = 0x300;
*si = *si - 1;
PlayField16[*si - 1] = 0x203;
PlayField16[*si] = 0x300;
*si = *si - 1;
@@
-593,7
+604,7
@@
loc_g_6341:
// ==========================================================================
loc_g_6364:
// ==========================================================================
loc_g_6364:
- dx
= (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRigh
t);
+ dx
1 = (MurphyVarFaceLeft == 0 ? aniMurphyMoveUpRight : aniMurphyMoveUpLef
t);
PlayField16[*si + FieldWidth] = 0x303;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
PlayField16[*si + FieldWidth] = 0x303;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
@@
-604,7
+615,7
@@
loc_g_6364:
// ==========================================================================
loc_g_6399:
// ==========================================================================
loc_g_6399:
- dx
= aniMurphyEat
Right;
+ dx
1 = aniMurphyMove
Right;
PlayField16[*si + 1] = 0x403;
PlayField16[*si] = 0x300;
*si = *si + 1;
PlayField16[*si + 1] = 0x403;
PlayField16[*si] = 0x300;
*si = *si + 1;
@@
-618,7
+629,8
@@
loc_g_63C2:
if (SgnHighByte(PlayField16[*si - FieldWidth]) >= 0)
{
ExplodeFieldSP(*si); // Explode
if (SgnHighByte(PlayField16[*si - FieldWidth]) >= 0)
{
ExplodeFieldSP(*si); // Explode
- return subAnimateMurphy;
+
+ return;
}
PlayField16[*si - FieldWidth] = fiBase;
}
PlayField16[*si - FieldWidth] = fiBase;
@@
-627,8
+639,9
@@
loc_g_63C2:
// ==========================================================================
loc_g_63D3:
// ==========================================================================
loc_g_63D3:
- subSoundFXBase();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ subSoundFX(*si, fiBase, actDigging);
+
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyDigUpRight : aniMurphyDigUpLeft);
PlayField16[*si - FieldWidth] = 0x503;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
PlayField16[*si - FieldWidth] = 0x503;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
@@
-642,7
+655,8
@@
loc_g_640B:
if (SgnHighByte(PlayField16[*si - 1]) >= 0)
{
ExplodeFieldSP(*si); // Explode
if (SgnHighByte(PlayField16[*si - 1]) >= 0)
{
ExplodeFieldSP(*si); // Explode
- return subAnimateMurphy;
+
+ return;
}
PlayField16[*si - 1] = fiBase;
}
PlayField16[*si - 1] = fiBase;
@@
-651,8
+665,9
@@
loc_g_640B:
// ==========================================================================
loc_g_641C:
// ==========================================================================
loc_g_641C:
- subSoundFXBase();
- dx = aniMurphyEatLeft;
+ subSoundFX(*si, fiBase, actDigging);
+
+ dx1 = aniMurphyDigLeft;
PlayField16[*si - 1] = 0x203;
PlayField16[*si] = 0x300;
*si = *si - 1;
PlayField16[*si - 1] = 0x203;
PlayField16[*si] = 0x300;
*si = *si - 1;
@@
-666,7
+681,8
@@
loc_g_6448:
if (SgnHighByte(PlayField16[*si + FieldWidth]) >= 0)
{
ExplodeFieldSP(*si); // Explode
if (SgnHighByte(PlayField16[*si + FieldWidth]) >= 0)
{
ExplodeFieldSP(*si); // Explode
- return subAnimateMurphy;
+
+ return;
}
PlayField16[*si + FieldWidth] = fiBase;
}
PlayField16[*si + FieldWidth] = fiBase;
@@
-675,8
+691,9
@@
loc_g_6448:
// ==========================================================================
loc_g_6459:
// ==========================================================================
loc_g_6459:
- subSoundFXBase();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ subSoundFX(*si, fiBase, actDigging);
+
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyDigUpRight : aniMurphyDigUpLeft);
PlayField16[*si + FieldWidth] = 0x703;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
PlayField16[*si + FieldWidth] = 0x703;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
@@
-690,7
+707,8
@@
loc_g_6491:
if (SgnHighByte(PlayField16[*si + 1]) >= 0)
{
ExplodeFieldSP(*si); // Explode
if (SgnHighByte(PlayField16[*si + 1]) >= 0)
{
ExplodeFieldSP(*si); // Explode
- return subAnimateMurphy;
+
+ return;
}
PlayField16[*si + 1] = fiBase;
}
PlayField16[*si + 1] = fiBase;
@@
-699,8
+717,9
@@
loc_g_6491:
// ==========================================================================
loc_g_64A2:
// ==========================================================================
loc_g_64A2:
- subSoundFXBase();
- dx = aniMurphyEatRight;
+ subSoundFX(*si, fiBase, actDigging);
+
+ dx1 = aniMurphyDigRight;
PlayField16[*si + 1] = 0x803;
PlayField16[*si] = 0x300;
*si = *si + 1;
PlayField16[*si + 1] = 0x803;
PlayField16[*si] = 0x300;
*si = *si + 1;
@@
-714,7
+733,8
@@
loc_g_64CE:
if (SgnHighByte(PlayField16[*si - FieldWidth]) >= 0)
{
ExplodeFieldSP(*si); // Explode
if (SgnHighByte(PlayField16[*si - FieldWidth]) >= 0)
{
ExplodeFieldSP(*si); // Explode
- return subAnimateMurphy;
+
+ return;
}
PlayField16[*si - FieldWidth] = fiBase;
}
PlayField16[*si - FieldWidth] = fiBase;
@@
-723,9
+743,10
@@
loc_g_64CE:
// ==========================================================================
loc_g_64DF:
// ==========================================================================
loc_g_64DF:
- subCopyFieldToScreen(*si, aniMurphyTouchUp);
- subSoundFXBase();
- dx = aniTouchBase;
+ subCopyImageToScreen(*si, aniMurphyTouchUp);
+ subSoundFX(*si, fiBase, actDigging);
+
+ dx1 = aniTouchBase;
dxPos = *si - FieldWidth;
MovHighByte(&PlayField16[*si], 0x10);
goto loc_StopNoSplit;
dxPos = *si - FieldWidth;
MovHighByte(&PlayField16[*si], 0x10);
goto loc_StopNoSplit;
@@
-738,7
+759,8
@@
loc_g_650C:
if (SgnHighByte(PlayField16[*si - 1]) >= 0)
{
ExplodeFieldSP(*si); // Explode
if (SgnHighByte(PlayField16[*si - 1]) >= 0)
{
ExplodeFieldSP(*si); // Explode
- return subAnimateMurphy;
+
+ return;
}
PlayField16[*si - 1] = fiBase;
}
PlayField16[*si - 1] = fiBase;
@@
-747,9
+769,10
@@
loc_g_650C:
// ==========================================================================
loc_g_651D:
// ==========================================================================
loc_g_651D:
- subCopyFieldToScreen(*si, aniMurphyTouchLeft);
- subSoundFXBase();
- dx = aniTouchBase;
+ subCopyImageToScreen(*si, aniMurphyTouchLeft);
+ subSoundFX(*si, fiBase, actDigging);
+
+ dx1 = aniTouchBase;
dxPos = *si - 1;
MovHighByte(&PlayField16[*si], 0x11);
goto loc_StopNoSplit;
dxPos = *si - 1;
MovHighByte(&PlayField16[*si], 0x11);
goto loc_StopNoSplit;
@@
-762,7
+785,8
@@
loc_g_654A:
if (SgnHighByte(PlayField16[*si + FieldWidth]) >= 0)
{
ExplodeFieldSP(*si); // Explode
if (SgnHighByte(PlayField16[*si + FieldWidth]) >= 0)
{
ExplodeFieldSP(*si); // Explode
- return subAnimateMurphy;
+
+ return;
}
PlayField16[*si + FieldWidth] = fiBase;
}
PlayField16[*si + FieldWidth] = fiBase;
@@
-771,9
+795,10
@@
loc_g_654A:
// ==========================================================================
loc_g_655B:
// ==========================================================================
loc_g_655B:
- subCopyFieldToScreen(*si, aniMurphyTouchDown);
- subSoundFXBase();
- dx = aniTouchBase;
+ subCopyImageToScreen(*si, aniMurphyTouchDown);
+ subSoundFX(*si, fiBase, actDigging);
+
+ dx1 = aniTouchBase;
dxPos = *si + FieldWidth;
MovHighByte(&PlayField16[*si], 0x12);
goto loc_StopNoSplit;
dxPos = *si + FieldWidth;
MovHighByte(&PlayField16[*si], 0x12);
goto loc_StopNoSplit;
@@
-786,7
+811,8
@@
loc_g_6588:
if (SgnHighByte(PlayField16[*si + 1]) >= 0)
{
ExplodeFieldSP(*si); // Explode
if (SgnHighByte(PlayField16[*si + 1]) >= 0)
{
ExplodeFieldSP(*si); // Explode
- return subAnimateMurphy;
+
+ return;
}
PlayField16[*si + 1] = fiBase;
}
PlayField16[*si + 1] = fiBase;
@@
-795,9
+821,10
@@
loc_g_6588:
// ==========================================================================
loc_g_6599:
// ==========================================================================
loc_g_6599:
- subCopyFieldToScreen(*si, aniMurphyTouchRight);
- subSoundFXBase();
- dx = aniTouchBase;
+ subCopyImageToScreen(*si, aniMurphyTouchRight);
+ subSoundFX(*si, fiBase, actDigging);
+
+ dx1 = aniTouchBase;
dxPos = *si + 1;
MovHighByte(&PlayField16[*si], 0x13);
goto loc_StopNoSplit;
dxPos = *si + 1;
MovHighByte(&PlayField16[*si], 0x13);
goto loc_StopNoSplit;
@@
-807,8
+834,9
@@
loc_g_6599:
// ==========================================================================
loc_g_65C6:
// ==========================================================================
loc_g_65C6:
- subSoundFXInfotron();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ subSoundFX(*si, fiInfotron, actCollecting);
+
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si - FieldWidth] = 0x903;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
PlayField16[*si - FieldWidth] = 0x903;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
@@
-819,11
+847,9
@@
loc_g_65C6:
// ==========================================================================
loc_g_65FE:
// ==========================================================================
loc_g_65FE:
- subSoundFXInfotron();
- dx = aniEatInfotronLeft;
- dx2 = fiInfotron;
- dx2Step = -1;
- ClearPos = -1;
+ subSoundFX(*si, fiInfotron, actCollecting);
+
+ dx1 = aniEatInfotronLeft;
PlayField16[*si - 1] = 0xA03;
PlayField16[*si] = 0x300;
*si = *si - 1;
PlayField16[*si - 1] = 0xA03;
PlayField16[*si] = 0x300;
*si = *si - 1;
@@
-834,8
+860,9
@@
loc_g_65FE:
// ==========================================================================
loc_g_662A:
// ==========================================================================
loc_g_662A:
- subSoundFXInfotron();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ subSoundFX(*si, fiInfotron, actCollecting);
+
+ dx1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si + FieldWidth] = 0xB03;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
PlayField16[*si + FieldWidth] = 0xB03;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
@@
-846,11
+873,9
@@
loc_g_662A:
// ==========================================================================
loc_g_6662:
// ==========================================================================
loc_g_6662:
- subSoundFXInfotron();
- dx = aniEatInfotronRight;
- dx2 = fiInfotron;
- dx2Step = 1;
- ClearPos = -1;
+ subSoundFX(*si, fiInfotron, actCollecting);
+
+ dx1 = aniEatInfotronRight;
PlayField16[*si + 1] = 0xC03;
PlayField16[*si] = 0x300;
*si = *si + 1;
PlayField16[*si + 1] = 0xC03;
PlayField16[*si] = 0x300;
*si = *si + 1;
@@
-861,9
+886,10
@@
loc_g_6662:
// ==========================================================================
loc_g_668E:
// ==========================================================================
loc_g_668E:
- subCopyFieldToScreen(*si, aniMurphyTouchUp);
- subSoundFXInfotron();
- dx = aniTouchInfotron;
+ subCopyImageToScreen(*si, aniMurphyTouchUp);
+ subSoundFX(*si, fiInfotron, actCollecting);
+
+ dx1 = aniTouchInfotron;
MovHighByte(&PlayField16[*si], 0x14);
MovHighByte(&PlayField16[*si - FieldWidth], 0xFF);
goto loc_StopNoSplit;
MovHighByte(&PlayField16[*si], 0x14);
MovHighByte(&PlayField16[*si - FieldWidth], 0xFF);
goto loc_StopNoSplit;
@@
-873,9
+899,10
@@
loc_g_668E:
// ==========================================================================
loc_g_66C0:
// ==========================================================================
loc_g_66C0:
- subCopyFieldToScreen(*si, aniMurphyTouchLeft);
- subSoundFXInfotron();
- dx = aniTouchInfotron;
+ subCopyImageToScreen(*si, aniMurphyTouchLeft);
+ subSoundFX(*si, fiInfotron, actCollecting);
+
+ dx1 = aniTouchInfotron;
MovHighByte(&PlayField16[*si], 0x15);
MovHighByte(&PlayField16[*si - 1], 0xFF);
goto loc_StopNoSplit;
MovHighByte(&PlayField16[*si], 0x15);
MovHighByte(&PlayField16[*si - 1], 0xFF);
goto loc_StopNoSplit;
@@
-885,9
+912,10
@@
loc_g_66C0:
// ==========================================================================
loc_g_66F2:
// ==========================================================================
loc_g_66F2:
- subCopyFieldToScreen(*si, aniMurphyTouchDown);
- subSoundFXInfotron();
- dx = aniTouchInfotron;
+ subCopyImageToScreen(*si, aniMurphyTouchDown);
+ subSoundFX(*si, fiInfotron, actCollecting);
+
+ dx1 = aniTouchInfotron;
MovHighByte(&PlayField16[*si], 0x16);
MovHighByte(&PlayField16[*si + FieldWidth], 0xFF);
goto loc_StopNoSplit;
MovHighByte(&PlayField16[*si], 0x16);
MovHighByte(&PlayField16[*si + FieldWidth], 0xFF);
goto loc_StopNoSplit;
@@
-897,9
+925,10
@@
loc_g_66F2:
// ==========================================================================
loc_g_6724:
// ==========================================================================
loc_g_6724:
- subCopyFieldToScreen(*si, aniMurphyTouchRight);
- subSoundFXInfotron();
- dx = aniTouchInfotron;
+ subCopyImageToScreen(*si, aniMurphyTouchRight);
+ subSoundFX(*si, fiInfotron, actCollecting);
+
+ dx1 = aniTouchInfotron;
MovHighByte(&PlayField16[*si], 0x17);
MovHighByte(&PlayField16[*si + 1], 0xFF);
goto loc_StopNoSplit;
MovHighByte(&PlayField16[*si], 0x17);
MovHighByte(&PlayField16[*si + 1], 0xFF);
goto loc_StopNoSplit;
@@
-915,27
+944,14
@@
loc_g_6756:
MurphyDY = 0;
// end of FS
if (LowByte(InfotronsNeeded) != 0)
MurphyDY = 0;
// end of FS
if (LowByte(InfotronsNeeded) != 0)
- return
subAnimateMurphy
;
+ return;
- subSoundFXExit();
- 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
- subUpdatePlayingTime(); // update playing time
- }
- }
+ game_sp.LevelSolved = TRUE;
-#if 0
- subUpdateHallOfFame(); // update time + Hall-Of-Fame
-#endif
+ subSoundFX(*si, fiExit, actPassing);
LeadOutCounter = 0x40; // quit: start lead-out
LeadOutCounter = 0x40; // quit: start lead-out
- dx = aniMurphyExit;
+ dx
1
= aniMurphyExit;
MovHighByte(&PlayField16[*si], 0xD);
goto loc_StopNoSplit;
MovHighByte(&PlayField16[*si], 0xD);
goto loc_StopNoSplit;
@@
-946,11
+962,11
@@
loc_g_6756:
loc_g_679B:
ax = PlayField16[*si - 2];
if (ax != 0)
loc_g_679B:
ax = PlayField16[*si - 2];
if (ax != 0)
- return
subAnimateMurphy
;
+ return;
MovHighByte(&PlayField16[*si - 2], 1);
MovHighByte(&PlayField16[*si - 2], 1);
- subCopy
Field
ToScreen(*si, aniPushLeft); // draw pushing murphy
- dx = aniZonkRollLeft;
+ subCopy
Image
ToScreen(*si, aniPushLeft); // draw pushing murphy
+ dx
1
= aniZonkRollLeft;
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
@@
-964,15
+980,15
@@
loc_g_679B:
loc_g_67D4:
ax = PlayField16[*si + 2];
if (ax != 0)
loc_g_67D4:
ax = PlayField16[*si + 2];
if (ax != 0)
- return
subAnimateMurphy
;
+ return;
ax = PlayField16[*si + FieldWidth + 1];
if (ax == 0) // zonk falls
ax = PlayField16[*si + FieldWidth + 1];
if (ax == 0) // zonk falls
- return
subAnimateMurphy
;
+ return;
MovHighByte(&PlayField16[*si + 2], 1);
MovHighByte(&PlayField16[*si + 2], 1);
- subCopy
Field
ToScreen(*si, aniPushRight); // draw pushing murphy
- dx = aniZonkRollRight;
+ subCopy
Image
ToScreen(*si, aniPushRight); // draw pushing murphy
+ dx
1
= aniZonkRollRight;
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
@@
-984,14
+1000,16
@@
loc_g_67D4:
// ==========================================================================
loc_g_6817:
// ==========================================================================
loc_g_6817:
- subCopy
Field
ToScreen(*si, aniMurphyTouchUp);
+ subCopy
Image
ToScreen(*si, aniMurphyTouchUp);
if (YellowDisksExploded != 0)
{
if (YellowDisksExploded != 0)
{
- YawnSleepCounter = 10; // stay hypnotized
- return subAnimateMurphy;
+ YawnSleepCounter = 40; // stay hypnotized
+
+ return;
} // loc_g_6838:
} // loc_g_6838:
- subCopyFieldToScreen(*si - FieldWidth, 0x88); // draw new terminal type
+ // draw new terminal type
+ GfxGraphic[GetX(*si - FieldWidth)][GetY(*si - FieldWidth)] = aniTerminalActive;
TerminalState[*si - FieldWidth] = 8;
goto loc_g_68F0;
TerminalState[*si - FieldWidth] = 8;
goto loc_g_68F0;
@@
-1000,14
+1018,16
@@
loc_g_6817:
// ==========================================================================
loc_g_684E:
// ==========================================================================
loc_g_684E:
- subCopy
Field
ToScreen(*si, aniMurphyTouchLeft);
+ subCopy
Image
ToScreen(*si, aniMurphyTouchLeft);
if (YellowDisksExploded != 0)
{
if (YellowDisksExploded != 0)
{
- YawnSleepCounter = 10; // stay hypnotized
- return subAnimateMurphy;
+ YawnSleepCounter = 40; // stay hypnotized
+
+ return;
} // loc_g_6838:
} // loc_g_6838:
- subCopyFieldToScreen(*si - 1, 0x88); // draw new terminal type
+ // draw new terminal type
+ GfxGraphic[GetX(*si - 1)][GetY(*si - 1)] = aniTerminalActive;
TerminalState[*si - 1] = 8;
goto loc_g_68F0;
TerminalState[*si - 1] = 8;
goto loc_g_68F0;
@@
-1016,14
+1036,16
@@
loc_g_684E:
// ==========================================================================
loc_g_6884:
// ==========================================================================
loc_g_6884:
- subCopy
Field
ToScreen(*si, aniMurphyTouchDown);
+ subCopy
Image
ToScreen(*si, aniMurphyTouchDown);
if (YellowDisksExploded != 0)
{
if (YellowDisksExploded != 0)
{
- YawnSleepCounter = 10; // stay hypnotized
- return subAnimateMurphy;
+ YawnSleepCounter = 40; // stay hypnotized
+
+ return;
} // loc_g_6838:
} // loc_g_6838:
- subCopyFieldToScreen(*si + FieldWidth, 0x88); // draw new terminal type
+ // draw new terminal type
+ GfxGraphic[GetX(*si + FieldWidth)][GetY(*si + FieldWidth)] = aniTerminalActive;
TerminalState[*si + FieldWidth] = 8;
goto loc_g_68F0;
TerminalState[*si + FieldWidth] = 8;
goto loc_g_68F0;
@@
-1032,14
+1054,16
@@
loc_g_6884:
// ==========================================================================
loc_g_68BA:
// ==========================================================================
loc_g_68BA:
- subCopy
Field
ToScreen(*si, aniMurphyTouchRight);
+ subCopy
Image
ToScreen(*si, aniMurphyTouchRight);
if (YellowDisksExploded != 0)
{
if (YellowDisksExploded != 0)
{
- YawnSleepCounter = 10; // stay hypnotized
- return subAnimateMurphy;
+ YawnSleepCounter = 40; // stay hypnotized
+
+ return;
} // loc_g_6838:
} // loc_g_6838:
- subCopyFieldToScreen(*si + 1, 0x88); // draw new terminal type
+ // draw new terminal type
+ GfxGraphic[GetX(*si + 1)][GetY(*si + 1)] = aniTerminalActive;
TerminalState[*si + 1] = 8;
// ==========================================================================
// common TERMINAL stuff moving/touching from all directions
TerminalState[*si + 1] = 8;
// ==========================================================================
// common TERMINAL stuff moving/touching from all directions
@@
-1054,7
+1078,7
@@
loc_g_68F0:
ExplodeFieldSP (i);
}
ExplodeFieldSP (i);
}
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// PORT down to up, VERTICAL PORT, CROSS PORT all moving down to up
// ==========================================================================
// PORT down to up, VERTICAL PORT, CROSS PORT all moving down to up
@@
-1062,9
+1086,9
@@
loc_g_68F0:
loc_g_6916:
if (PlayField16[*si - 2 * FieldWidth] != 0)
loc_g_6916:
if (PlayField16[*si - 2 * FieldWidth] != 0)
- return
subAnimateMurphy
;
+ return;
- dx = aniSplitUpDown;
+ dx
1
= aniSplitUpDown;
dx2Step = -FieldWidth;
PlayField16[*si] = 0x1803;
PlayField16[*si - 2 * FieldWidth] = 0x300;
dx2Step = -FieldWidth;
PlayField16[*si] = 0x1803;
PlayField16[*si - 2 * FieldWidth] = 0x300;
@@
-1076,9
+1100,9
@@
loc_g_6916:
loc_g_693A:
if (PlayField16[*si - 2] != 0)
loc_g_693A:
if (PlayField16[*si - 2] != 0)
- return
subAnimateMurphy
;
+ return;
- dx
= aniMurphyEat
Left;
+ dx
1 = aniMurphyMove
Left;
dx2Step = -1;
PlayField16[*si] = 0x1903;
PlayField16[*si - 2] = 0x300;
dx2Step = -1;
PlayField16[*si] = 0x1903;
PlayField16[*si - 2] = 0x300;
@@
-1090,9
+1114,9
@@
loc_g_693A:
loc_g_695E:
if (PlayField16[*si + 2 * FieldWidth] != 0)
loc_g_695E:
if (PlayField16[*si + 2 * FieldWidth] != 0)
- return
subAnimateMurphy
;
+ return;
- dx = aniSplitUpDown;
+ dx
1
= aniSplitUpDown;
dx2Step = FieldWidth;
PlayField16[*si] = 0x1A03;
PlayField16[*si + 2 * FieldWidth] = 0x300;
dx2Step = FieldWidth;
PlayField16[*si] = 0x1A03;
PlayField16[*si + 2 * FieldWidth] = 0x300;
@@
-1104,9
+1128,9
@@
loc_g_695E:
loc_g_6982:
if (PlayField16[*si + 2] != 0)
loc_g_6982:
if (PlayField16[*si + 2] != 0)
- return
subAnimateMurphy
;
+ return;
- dx
= aniMurphyEat
Right;
+ dx
1 = aniMurphyMove
Right;
dx2Step = 1;
PlayField16[*si] = 0x1B03;
PlayField16[*si + 2] = 0x300;
dx2Step = 1;
PlayField16[*si] = 0x1B03;
PlayField16[*si + 2] = 0x300;
@@
-1121,7
+1145,7
@@
loc_StopSplit:
// ==========================================================================
loc_g_69A6:
// ==========================================================================
loc_g_69A6:
- dx
= (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRigh
t);
+ dx
1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLef
t);
PlayField16[*si] = 0x1C03;
PlayField16[*si - FieldWidth] = 0x300;
goto loc_StopNoSplit;
PlayField16[*si] = 0x1C03;
PlayField16[*si - FieldWidth] = 0x300;
goto loc_StopNoSplit;
@@
-1131,7
+1155,7
@@
loc_g_69A6:
// ==========================================================================
loc_g_69CE:
// ==========================================================================
loc_g_69CE:
- dx = aniMurphyEatLeft;
+ dx
1
= aniMurphyEatLeft;
PlayField16[*si] = 0x300; // !!!!!! this time we move murphy at sequence-start!
PlayField16[*si - 1] = 0x1D03;
*si = *si - 1;
PlayField16[*si] = 0x300; // !!!!!! this time we move murphy at sequence-start!
PlayField16[*si - 1] = 0x1D03;
*si = *si - 1;
@@
-1142,7
+1166,7
@@
loc_g_69CE:
// ==========================================================================
loc_g_69F7:
// ==========================================================================
loc_g_69F7:
- dx
= (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRigh
t);
+ dx
1 = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLef
t);
PlayField16[*si] = 0x1E03;
PlayField16[*si + FieldWidth] = 0x300;
goto loc_StopNoSplit;
PlayField16[*si] = 0x1E03;
PlayField16[*si + FieldWidth] = 0x300;
goto loc_StopNoSplit;
@@
-1153,7
+1177,7
@@
loc_g_69F7:
loc_g_6A1F:
// dx = aniMurphyEatRightRedDisk 'this sequence is 9 steps long!
loc_g_6A1F:
// dx = aniMurphyEatRightRedDisk 'this sequence is 9 steps long!
- dx = aniMurphyEatRight;
+ dx
1
= aniMurphyEatRight;
// --------------------------------------------------------------------------
// BugFix
// Table data_h_145A, pointed to by table data_h_105E, has a severe bug:
// --------------------------------------------------------------------------
// BugFix
// Table data_h_145A, pointed to by table data_h_105E, has a severe bug:
@@
-1164,8
+1188,9
@@
loc_g_6A1F:
// We only correct Murphies x-location here, when the sequence starts.
// Remember that this is not the real bug-fix, but we must live with
// this existing bug and correct for the consequences of it.
// We only correct Murphies x-location here, when the sequence starts.
// 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 (0 == AllowEatRightRedDiskBug) // Murphy's screen x-position
- MurphyScreenXPos = MurphyScreenXPos - 2;
+
+ if (AllowEatRightRedDiskBug == 0) // Murphy's screen x-position
+ MurphyScreenXPos = MurphyScreenXPos - 2 * MurphyZoomFactor;
SeqPos = -1;
// FS: for me this means to blit the first animation frame twice
SeqPos = -1;
// FS: for me this means to blit the first animation frame twice
@@
-1181,7
+1206,7
@@
loc_g_6A1F:
// ==========================================================================
loc_g_6A48:
// ==========================================================================
loc_g_6A48:
- dx = aniTouchRedDisk;
+ dx
1
= aniTouchRedDisk;
MovHighByte(&PlayField16[*si], 0x20);
MovHighByte(&PlayField16[*si - FieldWidth], 3);
goto loc_StopNoSplit;
MovHighByte(&PlayField16[*si], 0x20);
MovHighByte(&PlayField16[*si - FieldWidth], 3);
goto loc_StopNoSplit;
@@
-1191,7
+1216,7
@@
loc_g_6A48:
// ==========================================================================
loc_g_6A64:
// ==========================================================================
loc_g_6A64:
- dx = aniTouchRedDisk;
+ dx
1
= aniTouchRedDisk;
MovHighByte(&PlayField16[*si], 0x21);
MovHighByte(&PlayField16[*si - 1], 3);
goto loc_StopNoSplit;
MovHighByte(&PlayField16[*si], 0x21);
MovHighByte(&PlayField16[*si - 1], 3);
goto loc_StopNoSplit;
@@
-1201,7
+1226,7
@@
loc_g_6A64:
// ==========================================================================
loc_g_6A80:
// ==========================================================================
loc_g_6A80:
- dx = aniTouchRedDisk;
+ dx
1
= aniTouchRedDisk;
MovHighByte(&PlayField16[*si], 0x22);
MovHighByte(&PlayField16[*si + FieldWidth], 3);
goto loc_StopNoSplit;
MovHighByte(&PlayField16[*si], 0x22);
MovHighByte(&PlayField16[*si + FieldWidth], 3);
goto loc_StopNoSplit;
@@
-1211,7
+1236,7
@@
loc_g_6A80:
// ==========================================================================
loc_g_6A9C:
// ==========================================================================
loc_g_6A9C:
- dx = aniTouchRedDisk;
+ dx
1
= aniTouchRedDisk;
MovHighByte(&PlayField16[*si], 0x23);
MovHighByte(&PlayField16[*si + 1], 3);
MovHighByte(&PlayField16[*si], 0x23);
MovHighByte(&PlayField16[*si + 1], 3);
@@
-1225,15
+1250,15
@@
loc_StopNoSplit:
loc_g_6AB8:
if (PlayField16[*si - 2 * FieldWidth] != 0)
loc_g_6AB8:
if (PlayField16[*si - 2 * FieldWidth] != 0)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si - 2 * FieldWidth] = 0x1200;
PlayField16[*si - 2 * FieldWidth] = 0x1200;
- subCopyFieldToScreen(*si, aniPushRight);
- dx = aniYellowDisk;
+ dx1 = aniYellowDisk;
dxPos = *si - FieldWidth;
dxPos = *si - FieldWidth;
- dx2 =
aniPushUpDown
;
+ dx2 =
(MurphyVarFaceLeft == 0 ? aniPushRight : aniPushLeft)
;
dx2Step = FieldWidth;
PlayField16[*si] = 0x2403;
dx2Step = FieldWidth;
PlayField16[*si] = 0x2403;
+ subCopyImageToScreen(*si, dx2);
goto loc_MoveNoSplit;
// ==========================================================================
goto loc_MoveNoSplit;
// ==========================================================================
@@
-1242,11
+1267,11
@@
loc_g_6AB8:
loc_g_6AF1:
if (PlayField16[*si - 2] != 0)
loc_g_6AF1:
if (PlayField16[*si - 2] != 0)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si - 2] = 0x1200;
PlayField16[*si - 2] = 0x1200;
- subCopy
Field
ToScreen(*si, aniPushLeft);
- dx = aniYellowDisk;
+ subCopy
Image
ToScreen(*si, aniPushLeft);
+ dx
1
= aniYellowDisk;
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
@@
-1259,15
+1284,15
@@
loc_g_6AF1:
loc_g_6B2A:
if (PlayField16[*si + 2 * FieldWidth] != 0)
loc_g_6B2A:
if (PlayField16[*si + 2 * FieldWidth] != 0)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si + 2 * FieldWidth] = 0x1200;
PlayField16[*si + 2 * FieldWidth] = 0x1200;
- subCopyFieldToScreen(*si, aniPushRight);
- dx = aniYellowDisk;
+ dx1 = aniYellowDisk;
dxPos = *si + FieldWidth;
dxPos = *si + FieldWidth;
- dx2 =
aniPushUpDown
;
+ dx2 =
(MurphyVarFaceLeft == 0 ? aniPushRight : aniPushLeft)
;
dx2Step = -FieldWidth;
PlayField16[*si] = 0x2703;
dx2Step = -FieldWidth;
PlayField16[*si] = 0x2703;
+ subCopyImageToScreen(*si, dx2);
goto loc_MoveNoSplit;
// ==========================================================================
goto loc_MoveNoSplit;
// ==========================================================================
@@
-1276,11
+1301,11
@@
loc_g_6B2A:
loc_g_6B63:
if (PlayField16[*si + 2] != 0)
loc_g_6B63:
if (PlayField16[*si + 2] != 0)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si + 2] = 0x1200;
PlayField16[*si + 2] = 0x1200;
- subCopy
Field
ToScreen(*si, aniPushRight);
- dx = aniYellowDisk;
+ subCopy
Image
ToScreen(*si, aniPushRight);
+ dx
1
= aniYellowDisk;
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
@@
-1293,11
+1318,11
@@
loc_g_6B63:
loc_g_6B9B:
if (PlayField16[*si - 2] != 0)
loc_g_6B9B:
if (PlayField16[*si - 2] != 0)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si - 2] = 0x800;
PlayField16[*si - 2] = 0x800;
- subCopy
Field
ToScreen(*si, aniPushLeft);
- dx = aniOrangeDisk;
+ subCopy
Image
ToScreen(*si, aniPushLeft);
+ dx
1
= aniOrangeDisk;
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
dxPos = *si - 1;
dx2 = aniPushLeft;
dx2Step = 1;
@@
-1310,14
+1335,14
@@
loc_g_6B9B:
loc_g_6BD3:
if (PlayField16[*si + 2] != 0)
loc_g_6BD3:
if (PlayField16[*si + 2] != 0)
- return
subAnimateMurphy
;
+ return;
if (PlayField16[*si + FieldWidth + 1] == 0) // falling goes before pushing
if (PlayField16[*si + FieldWidth + 1] == 0) // falling goes before pushing
- return
subAnimateMurphy
;
+ return;
PlayField16[*si + 2] = 0x100;
PlayField16[*si + 2] = 0x100;
- subCopy
Field
ToScreen(*si, aniPushRight);
- dx = aniOrangeDisk;
+ subCopy
Image
ToScreen(*si, aniPushRight);
+ dx
1
= aniOrangeDisk;
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
dxPos = *si + 1;
dx2 = aniPushRight;
dx2Step = -1;
@@
-1348,8
+1373,32
@@
locProceedMovingMurphy: // proceed moving murphy
ax = ax - 1; // next picture of sequence
MovingPictureSequencePhase = ax; // store for later
ax = ax - 1; // next picture of sequence
MovingPictureSequencePhase = ax; // store for later
+
if (ax == 0) // Sound effects
if (ax == 0) // Sound effects
- subSoundFXPush();
+ {
+ switch (HighByte(PlayField16[*si]))
+ {
+ case 0xE:
+ case 0xF:
+ subSoundFX(*si, fiZonk, actPushing);
+ break;
+
+ case 0x28:
+ case 0x29:
+ subSoundFX(*si, fiOrangeDisk, actPushing);
+ break;
+
+ case 0x24:
+ case 0x25:
+ case 0x26:
+ case 0x27:
+ subSoundFX(*si, fiYellowDisk, actPushing);
+ break;
+
+ default:
+ break;
+ }
+ }
bl = HighByte(PlayField16[*si]);
if (bl == 0xE) // Push Zonk to left
bl = HighByte(PlayField16[*si]);
if (bl == 0xE) // Push Zonk to left
@@
-1379,50
+1428,49
@@
locProceedMovingMurphy: // proceed moving murphy
if (bl == 0x2A) // Red disk release timer
goto loc_g_716E;
if (bl == 0x2A) // Red disk release timer
goto loc_g_716E;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// Paint frame of MOVING.DAT sequence
// ==========================================================================
loc_g_6C8F:
// ==========================================================================
// Paint frame of MOVING.DAT sequence
// ==========================================================================
loc_g_6C8F:
+
+ if (SeqPos <= 0)
+ dx1SequenceLength = getSequenceLength(dx1);
+
if (SplitMoveFlag == 0)
{
// ++++++++++++++++++++++++++
// Begin of normal movement
if (SplitMoveFlag == 0)
{
// ++++++++++++++++++++++++++
// Begin of normal movement
- MurphyScreenXPos = MurphyScreenXPos + MurphyDX;
- MurphyScreenYPos = MurphyScreenYPos + MurphyDY;
- if (! ClearPos < 0) // clear field that murphy is leaving
- subCopyFieldToScreen(ClearPos, 0);
+ MurphyScreenXPos = MurphyScreenXPos + MurphyDX * MurphyZoomFactor;
+ MurphyScreenYPos = MurphyScreenYPos + MurphyDY * MurphyZoomFactor;
- if (dx2 == fiInfotron) // special case of infotron moving left or right
- {
- tDeltaX = 0;
- tDeltaY = 0;
- }
- else
- {
- tDeltaX = MurphyDX * LocalStretch * (SeqPos + 1);
- tDeltaY = MurphyDY * LocalStretch * (SeqPos + 1);
- }
+ if (!(ClearPos < 0)) // clear field that murphy is leaving
+ subCopyImageToScreen(ClearPos, aniSpace);
+
+ tDeltaX = MurphyDX * LocalStretch * (SeqPos + 1);
+ tDeltaY = MurphyDY * LocalStretch * (SeqPos + 1);
X = GetStretchX(dxPos) + tDeltaX;
Y = GetStretchY(dxPos) + tDeltaY;
X = GetStretchX(dxPos) + tDeltaX;
Y = GetStretchY(dxPos) + tDeltaY;
- Tmp = (SeqPos < 0 ? 0 : 0); // 9StepBugFix!(red disk move right)
- StretchedSprites.BltEx(X, Y, dx[Tmp]);
- if (! dx2 < 0)
+ Tmp = (SeqPos < 0 ? 0 : SeqPos); // 9StepBugFix!(red disk move right)
+
+ if (isSnappingSequence(dx1) && SeqPos == dx1SequenceLength - 1)
+ dx1 = aniSpace;
+
+ DDSpriteBuffer_BltImg(X, Y, dx1, Tmp);
+ GfxGraphic[GetX(*si)][GetY(*si)] = -1; // (Murphy's position)
+ GfxGraphic[GetX(dxPos)][GetY(dxPos)] = -1; // (snapping position)
+
+ if (!(dx2 < 0))
{
tPos = dxPos + dx2Step;
X = GetStretchX(tPos);
Y = GetStretchY(tPos);
{
tPos = dxPos + dx2Step;
X = GetStretchX(tPos);
Y = GetStretchY(tPos);
- if (dx2 == fiInfotron) // special case of infotron moving left or right
- {
- StretchedSprites.BltEx(X, Y, dx[SeqPos] + dx2Step);
- }
- else // pushing something
- {
- StretchedSprites.BltEx(X + tDeltaX, Y + tDeltaY, dx2);
- }
+
+ // (SeqPos iterates from 0 to 7 while pushing)
+ DDSpriteBuffer_BltImg(X + tDeltaX, Y + tDeltaY, dx2, SeqPos);
}
// End of normal movement
}
// End of normal movement
@@
-1432,26
+1480,27
@@
loc_g_6C8F:
{
// ++++++++++++++++++++++++++++++++
// Begin of split movement (port)
{
// ++++++++++++++++++++++++++++++++
// Begin of split movement (port)
- MurphyScreenXPos = MurphyScreenXPos + 2 * MurphyDX;
- MurphyScreenYPos = MurphyScreenYPos + 2 * MurphyDY;
- subCopy
FieldToScreen(ClearPos, 0
); // clear the field that murphy leaves
+ MurphyScreenXPos = MurphyScreenXPos + 2 * MurphyDX
* MurphyZoomFactor
;
+ MurphyScreenYPos = MurphyScreenYPos + 2 * MurphyDY
* MurphyZoomFactor
;
+ subCopy
ImageToScreen(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;
tDeltaX = MurphyDX * LocalStretch * (SeqPos + 1);
tDeltaY = MurphyDY * LocalStretch * (SeqPos + 1);
X = GetStretchX(dxPos) + tDeltaX;
Y = GetStretchY(dxPos) + tDeltaY;
- StretchedSprites.BltEx(X, Y, dx[SeqPos]); // plot first murphy
+ DDSpriteBuffer_BltImg(X, Y, dx1, SeqPos); // plot first murphy
+
tPos = dxPos + dx2Step;
X = GetStretchX(tPos);
Y = GetStretchY(tPos);
tPos = dxPos + dx2Step;
X = GetStretchX(tPos);
Y = GetStretchY(tPos);
-
StretchedSprites.BltEx(X + tDeltaX, Y + tDeltaY, dx[SeqPos]
); // plot second murphy
-
StretchedSprites.BltEx(X, Y, LowByte(PlayField16[tPos])
); // replot the port on top
+
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:
SeqPos = SeqPos + 1;
// End of split movement (port)
// ------------------------------
} // loc_g_6D1E:'loc_g_6D28:
SeqPos = SeqPos + 1;
- if (
dx[SeqPos] > -1
)
- return
subAnimateMurphy
;
+ if (
SeqPos < dx1SequenceLength
)
+ return;
// Follow-up after movement completed 'loc_g_6D35:
MurphyXPos = MurphyXPos + MurphyDX;
// Follow-up after movement completed 'loc_g_6D35:
MurphyXPos = MurphyXPos + MurphyDX;
@@
-1586,7
+1635,8
@@
loc_g_6C8F:
goto loc_g_747F;
ExitToMenuFlag = 1;
goto loc_g_747F;
ExitToMenuFlag = 1;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// infotron, moving up
// ==========================================================================
// infotron, moving up
@@
-1596,11
+1646,11
@@
loc_g_6EBA:
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
- subDisplayInfotronsNeeded();
loc_g_6EC8: // space, base
PlayField16[*si] = fiMurphy;
subAdjustZonksInfotronsAboveMurphy(*si + FieldWidth);
loc_g_6EC8: // space, base
PlayField16[*si] = fiMurphy;
subAdjustZonksInfotronsAboveMurphy(*si + FieldWidth);
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// infotron, moving left
// ==========================================================================
// infotron, moving left
@@
-1610,11
+1660,11
@@
loc_g_6ED8:
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
- subDisplayInfotronsNeeded();
loc_g_6EE6: // space, base
PlayField16[*si] = fiMurphy;
subAdjustZonksInfotronsAboveMurphy(*si + 1);
loc_g_6EE6: // space, base
PlayField16[*si] = fiMurphy;
subAdjustZonksInfotronsAboveMurphy(*si + 1);
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// infotron, moving down
// ==========================================================================
// infotron, moving down
@@
-1624,13
+1674,13
@@
loc_g_6EF6:
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
- subDisplayInfotronsNeeded();
loc_g_6F04: // space, base
if (LowByte(PlayField16[*si - FieldWidth]) != fiExplosion)
PlayField16[*si - FieldWidth] = 0;
PlayField16[*si] = fiMurphy;
loc_g_6F04: // space, base
if (LowByte(PlayField16[*si - FieldWidth]) != fiExplosion)
PlayField16[*si - FieldWidth] = 0;
PlayField16[*si] = fiMurphy;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// infotron, moving right
// ==========================================================================
// infotron, moving right
@@
-1640,11
+1690,11
@@
loc_g_71B6:
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
- subDisplayInfotronsNeeded();
loc_g_71C4: // space, base
subAdjustZonksInfotronsAboveMurphy(*si - 1);
PlayField16[*si] = fiMurphy;
loc_g_71C4: // space, base
subAdjustZonksInfotronsAboveMurphy(*si - 1);
PlayField16[*si] = fiMurphy;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// infotron, touching up
// ==========================================================================
// infotron, touching up
@@
-1654,12
+1704,11
@@
loc_g_71D4:
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
- subDisplayInfotronsNeeded();
loc_g_71E2: // base
if (LowByte(PlayField16[*si - FieldWidth]) != fiExplosion)
PlayField16[*si - FieldWidth] = 0;
loc_g_71E2: // base
if (LowByte(PlayField16[*si - FieldWidth]) != fiExplosion)
PlayField16[*si - FieldWidth] = 0;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// infotron, touching left
// ==========================================================================
// infotron, touching left
@@
-1669,12
+1718,11
@@
loc_g_71F0:
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
- subDisplayInfotronsNeeded();
loc_g_71FE: // base
if (LowByte(PlayField16[*si - 1]) != fiExplosion)
PlayField16[*si - 1] = 0;
loc_g_71FE: // base
if (LowByte(PlayField16[*si - 1]) != fiExplosion)
PlayField16[*si - 1] = 0;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// infotron, touching down
// ==========================================================================
// infotron, touching down
@@
-1684,12
+1732,11
@@
loc_g_720C:
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
- subDisplayInfotronsNeeded();
loc_g_721A: // base
if (LowByte(PlayField16[*si + FieldWidth]) != fiExplosion)
PlayField16[*si + FieldWidth] = 0;
loc_g_721A: // base
if (LowByte(PlayField16[*si + FieldWidth]) != fiExplosion)
PlayField16[*si + FieldWidth] = 0;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// infotron, touching right
// ==========================================================================
// infotron, touching right
@@
-1699,12
+1746,11
@@
loc_g_7228:
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
if (0 < LowByte(InfotronsNeeded))
InfotronsNeeded = InfotronsNeeded - 1;
- subDisplayInfotronsNeeded();
loc_g_7236: // base
if (LowByte(PlayField16[*si + 1]) != fiExplosion)
PlayField16[*si + 1] = 0;
loc_g_7236: // base
if (LowByte(PlayField16[*si + 1]) != fiExplosion)
PlayField16[*si + 1] = 0;
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// zonk, pushing left
// ==========================================================================
// zonk, pushing left
@@
-1718,7
+1764,8
@@
loc_g_6F18:
PlayField16[*si - 2] = fiZonk;
subExplodeSnikSnaksBelow(*si - 2);
*si = *si - 1;
PlayField16[*si - 2] = fiZonk;
subExplodeSnikSnaksBelow(*si - 2);
*si = *si - 1;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// zonk, pushing right
// ==========================================================================
// zonk, pushing right
@@
-1732,7
+1779,8
@@
loc_g_6F3B:
PlayField16[*si + 2] = fiZonk;
subExplodeSnikSnaksBelow(*si + 2);
*si = *si + 1;
PlayField16[*si + 2] = fiZonk;
subExplodeSnikSnaksBelow(*si + 2);
*si = *si + 1;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// exit
// ==========================================================================
// exit
@@
-1740,7
+1788,10
@@
loc_g_6F3B:
loc_g_6F77:
ExitToMenuFlag = 1;
loc_g_6F77:
ExitToMenuFlag = 1;
- return subAnimateMurphy;
+
+ PlayField16[*si] = fiSpace; // remove Murphy from playfield after exiting
+
+ return;
// ==========================================================================
// Push Zonk from right to left
// ==========================================================================
// Push Zonk from right to left
@@
-1748,15
+1799,16
@@
loc_g_6F77:
loc_g_6F7E:
if (DemoKeyCode == keyLeft && PlayField16[*si - 1] == fiZonk)
loc_g_6F7E:
if (DemoKeyCode == keyLeft && PlayField16[*si - 1] == fiZonk)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si] = fiMurphy; // else restore - no more zonk pushing!
PlayField16[*si - 1] = fiZonk;
if (LowByte(PlayField16[*si - 2]) != fiExplosion)
PlayField16[*si - 2] = 0;
PlayField16[*si] = fiMurphy; // else restore - no more zonk pushing!
PlayField16[*si - 1] = fiZonk;
if (LowByte(PlayField16[*si - 2]) != fiExplosion)
PlayField16[*si - 2] = 0;
- subCopyFieldToScreen(*si, fiMurphy);
- return subAnimateMurphy;
+ subCopyImageToScreen(*si, aniMurphy);
+
+ return;
// ==========================================================================
// Push Zonk from left to right
// ==========================================================================
// Push Zonk from left to right
@@
-1764,15
+1816,16
@@
loc_g_6F7E:
loc_g_6FBC:
if (DemoKeyCode == keyRight && PlayField16[*si + 1] == fiZonk)
loc_g_6FBC:
if (DemoKeyCode == keyRight && PlayField16[*si + 1] == fiZonk)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si] = fiMurphy; // else restore - no more zonk pushing!
PlayField16[*si + 1] = fiZonk;
if (LowByte(PlayField16[*si + 2]) != fiExplosion)
PlayField16[*si + 2] = 0;
PlayField16[*si] = fiMurphy; // else restore - no more zonk pushing!
PlayField16[*si + 1] = fiZonk;
if (LowByte(PlayField16[*si + 2]) != fiExplosion)
PlayField16[*si + 2] = 0;
- subCopyFieldToScreen(*si, fiMurphy);
- return subAnimateMurphy;
+ subCopyImageToScreen(*si, aniMurphy);
+
+ return;
// ==========================================================================
// Push orange disk from right to left
// ==========================================================================
// Push orange disk from right to left
@@
-1780,15
+1833,16
@@
loc_g_6FBC:
loc_g_6FFA:
if (DemoKeyCode == keyLeft && PlayField16[*si - 1] == fiOrangeDisk)
loc_g_6FFA:
if (DemoKeyCode == keyLeft && PlayField16[*si - 1] == fiOrangeDisk)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si - 1] = fiOrangeDisk;
if (LowByte(PlayField16[*si - 2]) != fiExplosion)
PlayField16[*si - 2] = 0;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si - 1] = fiOrangeDisk;
if (LowByte(PlayField16[*si - 2]) != fiExplosion)
PlayField16[*si - 2] = 0;
- subCopyFieldToScreen(*si, fiMurphy);
- return subAnimateMurphy;
+ subCopyImageToScreen(*si, aniMurphy);
+
+ return;
// ==========================================================================
// Push orange disk from left to right
// ==========================================================================
// Push orange disk from left to right
@@
-1796,15
+1850,16
@@
loc_g_6FFA:
loc_g_7038:
if (DemoKeyCode == keyRight && PlayField16[*si + 1] == fiOrangeDisk)
loc_g_7038:
if (DemoKeyCode == keyRight && PlayField16[*si + 1] == fiOrangeDisk)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si + 1] = fiOrangeDisk;
if (LowByte(PlayField16[*si + 2]) != fiExplosion)
PlayField16[*si + 2] = 0;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si + 1] = fiOrangeDisk;
if (LowByte(PlayField16[*si + 2]) != fiExplosion)
PlayField16[*si + 2] = 0;
- subCopyFieldToScreen(*si, fiMurphy);
- return subAnimateMurphy;
+ subCopyImageToScreen(*si, aniMurphy);
+
+ return;
// ==========================================================================
// Push yellow disk from down to up
// ==========================================================================
// Push yellow disk from down to up
@@
-1812,15
+1867,16
@@
loc_g_7038:
loc_g_7076:
if (DemoKeyCode == keyUp && PlayField16[*si - FieldWidth] == fiYellowDisk)
loc_g_7076:
if (DemoKeyCode == keyUp && PlayField16[*si - FieldWidth] == fiYellowDisk)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si - FieldWidth] = fiYellowDisk;
if (LowByte(PlayField16[*si - 2 * FieldWidth]) != fiExplosion)
PlayField16[*si - 2 * FieldWidth] = 0;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si - FieldWidth] = fiYellowDisk;
if (LowByte(PlayField16[*si - 2 * FieldWidth]) != fiExplosion)
PlayField16[*si - 2 * FieldWidth] = 0;
- subCopyFieldToScreen(*si, fiMurphy);
- return subAnimateMurphy;
+ subCopyImageToScreen(*si, aniMurphy);
+
+ return;
// ==========================================================================
// Push yellow disk from right to left
// ==========================================================================
// Push yellow disk from right to left
@@
-1828,15
+1884,16
@@
loc_g_7076:
loc_g_70B4:
if (DemoKeyCode == keyLeft && PlayField16[*si - 1] == fiYellowDisk)
loc_g_70B4:
if (DemoKeyCode == keyLeft && PlayField16[*si - 1] == fiYellowDisk)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si - 1] = fiYellowDisk;
if (LowByte(PlayField16[*si - 2]) != fiExplosion)
PlayField16[*si - 2] = 0;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si - 1] = fiYellowDisk;
if (LowByte(PlayField16[*si - 2]) != fiExplosion)
PlayField16[*si - 2] = 0;
- subCopyFieldToScreen(*si, fiMurphy);
- return subAnimateMurphy;
+ subCopyImageToScreen(*si, aniMurphy);
+
+ return;
// ==========================================================================
// Push yellow disk from up to down
// ==========================================================================
// Push yellow disk from up to down
@@
-1844,15
+1901,16
@@
loc_g_70B4:
loc_g_70F2:
if (DemoKeyCode == keyDown && PlayField16[*si + FieldWidth] == fiYellowDisk)
loc_g_70F2:
if (DemoKeyCode == keyDown && PlayField16[*si + FieldWidth] == fiYellowDisk)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si + FieldWidth] = fiYellowDisk;
if (LowByte(PlayField16[*si + 2 * FieldWidth]) != fiExplosion)
PlayField16[*si + 2 * FieldWidth] = 0;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si + FieldWidth] = fiYellowDisk;
if (LowByte(PlayField16[*si + 2 * FieldWidth]) != fiExplosion)
PlayField16[*si + 2 * FieldWidth] = 0;
- subCopyFieldToScreen(*si, fiMurphy);
- return subAnimateMurphy;
+ subCopyImageToScreen(*si, aniMurphy);
+
+ return;
// ==========================================================================
// Push yellow disk from left to right
// ==========================================================================
// Push yellow disk from left to right
@@
-1860,15
+1918,16
@@
loc_g_70F2:
loc_g_7130:
if (DemoKeyCode == keyRight && PlayField16[*si + 1] == fiYellowDisk)
loc_g_7130:
if (DemoKeyCode == keyRight && PlayField16[*si + 1] == fiYellowDisk)
- return
subAnimateMurphy
;
+ return;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si + 1] = fiYellowDisk;
if (LowByte(PlayField16[*si + 2]) != fiExplosion)
PlayField16[*si + 2] = 0;
PlayField16[*si] = fiMurphy; // else restore - no more pushing!
PlayField16[*si + 1] = fiYellowDisk;
if (LowByte(PlayField16[*si + 2]) != fiExplosion)
PlayField16[*si + 2] = 0;
- subCopyFieldToScreen(*si, fiMurphy);
- return subAnimateMurphy;
+ subCopyImageToScreen(*si, aniMurphy);
+
+ return;
// ==========================================================================
// time red disk release (space)
// ==========================================================================
// time red disk release (space)
@@
-1878,16
+1937,17
@@
loc_g_716E:
if (DemoKeyCode != keySpace)
{
PlayField16[*si] = fiMurphy;
if (DemoKeyCode != keySpace)
{
PlayField16[*si] = fiMurphy;
- subCopy
FieldToScreen(*si, f
iMurphy);
+ subCopy
ImageToScreen(*si, an
iMurphy);
RedDiskReleasePhase = 0;
}
else if (MovingPictureSequencePhase == 0x20)
{
RedDiskReleasePhase = 0;
}
else if (MovingPictureSequencePhase == 0x20)
{
- subCopyFieldToScreen(*si, 43); // anxious murphy
+ // anxious murphy, dropping red disk
+ subCopyImageToScreen(*si, aniMurphyDropping);
RedDiskReleasePhase = 1;
}
RedDiskReleasePhase = 1;
}
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// Special port down to up
// ==========================================================================
// Special port down to up
@@
-1904,7
+1964,8
@@
loc_g_7244:
subSpPortTest(*si);
*si = *si - FieldWidth;
subSpPortTest(*si);
*si = *si - FieldWidth;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// Special port right to left
// ==========================================================================
// Special port right to left
@@
-1921,7
+1982,8
@@
loc_g_7272:
subSpPortTest(*si);
*si = *si - 1;
subSpPortTest(*si);
*si = *si - 1;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// Special port up to down
// ==========================================================================
// Special port up to down
@@
-1938,7
+2000,8
@@
loc_g_729F:
subSpPortTest(*si);
*si = *si + FieldWidth;
subSpPortTest(*si);
*si = *si + FieldWidth;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// Special port left to right
// ==========================================================================
// Special port left to right
@@
-1955,7
+2018,8
@@
loc_g_72CD:
subSpPortTest(*si);
*si = *si + 1;
subSpPortTest(*si);
*si = *si + 1;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// Move Red Disk up
// ==========================================================================
// Move Red Disk up
@@
-1968,7
+2032,8
@@
loc_g_72FA:
*si = *si - FieldWidth;
PlayField16[*si] = fiMurphy;
subEatRedDisk(*si); // inc+show Murphy's red disks
*si = *si - FieldWidth;
PlayField16[*si] = fiMurphy;
subEatRedDisk(*si); // inc+show Murphy's red disks
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// Move Red Disk left
// ==========================================================================
// Move Red Disk left
@@
-1980,7
+2045,8
@@
loc_g_7318:
PlayField16[*si] = fiMurphy;
subEatRedDisk(*si); // inc+show Murphy's red disks
PlayField16[*si] = fiMurphy;
subEatRedDisk(*si); // inc+show Murphy's red disks
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// Move Red Disk down
// ==========================================================================
// Move Red Disk down
@@
-1993,7
+2059,8
@@
loc_g_7333:
*si = *si + FieldWidth;
PlayField16[*si] = fiMurphy;
subEatRedDisk(*si); // inc+show Murphy's red disks
*si = *si + FieldWidth;
PlayField16[*si] = fiMurphy;
subEatRedDisk(*si); // inc+show Murphy's red disks
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// Move Red Disk right
// ==========================================================================
// Move Red Disk right
@@
-2005,7
+2072,8
@@
loc_g_7351:
PlayField16[*si] = fiMurphy;
subEatRedDisk(*si); // inc+show Murphy's red disks
PlayField16[*si] = fiMurphy;
subEatRedDisk(*si); // inc+show Murphy's red disks
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// Eat Red Disk up
// ==========================================================================
// Eat Red Disk up
@@
-2016,7
+2084,8
@@
loc_g_736C:
PlayField16[*si - FieldWidth] = 0;
subEatRedDisk(*si - FieldWidth); // inc+show Murphy's red disks
PlayField16[*si - FieldWidth] = 0;
subEatRedDisk(*si - FieldWidth); // inc+show Murphy's red disks
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// Eat Red Disk left
// ==========================================================================
// Eat Red Disk left
@@
-2027,7
+2096,8
@@
loc_g_7381:
PlayField16[*si - 1] = 0;
subEatRedDisk(*si - 1); // inc+show Murphy's red disks
PlayField16[*si - 1] = 0;
subEatRedDisk(*si - 1); // inc+show Murphy's red disks
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// Eat Red Disk down
// ==========================================================================
// Eat Red Disk down
@@
-2038,7
+2108,8
@@
loc_g_7396:
PlayField16[*si + FieldWidth] = 0;
subEatRedDisk(*si + FieldWidth); // inc+show Murphy's red disks
PlayField16[*si + FieldWidth] = 0;
subEatRedDisk(*si + FieldWidth); // inc+show Murphy's red disks
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// Eat Red Disk right
// ==========================================================================
// Eat Red Disk right
@@
-2049,7
+2120,8
@@
loc_g_73AB:
PlayField16[*si + 1] = 0;
subEatRedDisk(*si + 1); // inc+show Murphy's red disks
PlayField16[*si + 1] = 0;
subEatRedDisk(*si + 1); // inc+show Murphy's red disks
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// yellow disk, pushing up
// ==========================================================================
// yellow disk, pushing up
@@
-2062,7
+2134,8
@@
loc_g_73C0:
*si = *si - FieldWidth;
PlayField16[*si] = fiMurphy;
PlayField16[*si - FieldWidth] = fiYellowDisk;
*si = *si - FieldWidth;
PlayField16[*si] = fiMurphy;
PlayField16[*si - FieldWidth] = fiYellowDisk;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// yellow disk, pushing left
// ==========================================================================
// yellow disk, pushing left
@@
-2075,7
+2148,8
@@
loc_g_73DD:
*si = *si - 1;
PlayField16[*si] = fiMurphy;
PlayField16[*si - 1] = fiYellowDisk;
*si = *si - 1;
PlayField16[*si] = fiMurphy;
PlayField16[*si - 1] = fiYellowDisk;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// yellow disk, pushing down
// ==========================================================================
// yellow disk, pushing down
@@
-2088,7
+2162,8
@@
loc_g_73FA:
*si = *si + FieldWidth;
PlayField16[*si] = fiMurphy;
PlayField16[*si + FieldWidth] = fiYellowDisk;
*si = *si + FieldWidth;
PlayField16[*si] = fiMurphy;
PlayField16[*si + FieldWidth] = fiYellowDisk;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// yellow disk pushing right
// ==========================================================================
// yellow disk pushing right
@@
-2101,7
+2176,8
@@
loc_g_7417:
*si = *si + 1;
PlayField16[*si] = fiMurphy;
PlayField16[*si + 1] = fiYellowDisk;
*si = *si + 1;
PlayField16[*si] = fiMurphy;
PlayField16[*si + 1] = fiYellowDisk;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// orange disk, pushing left
// ==========================================================================
// orange disk, pushing left
@@
-2114,7
+2190,8
@@
loc_g_7434:
*si = *si - 1;
PlayField16[*si] = fiMurphy;
PlayField16[*si - 1] = fiOrangeDisk;
*si = *si - 1;
PlayField16[*si] = fiMurphy;
PlayField16[*si - 1] = fiOrangeDisk;
- return subAnimateMurphy;
+
+ return;
// ==========================================================================
// orange disk, pushing right
// ==========================================================================
// orange disk, pushing right
@@
-2133,7
+2210,7
@@
loc_g_7451:
MovHighByte(&PlayField16[*si + FieldWidth + 1], fiOrangeDisk);
}
MovHighByte(&PlayField16[*si + FieldWidth + 1], fiOrangeDisk);
}
- return
subAnimateMurphy
;
+ return;
// ==========================================================================
// Release a red disk
// ==========================================================================
// Release a red disk
@@
-2143,26
+2220,20
@@
loc_g_747F:
PlayField16[*si] = fiMurphy;
RedDiskReleasePhase = 2;
RedDiskCount = RedDiskCount - 1;
PlayField16[*si] = fiMurphy;
RedDiskReleasePhase = 2;
RedDiskCount = RedDiskCount - 1;
- subDisplayRedDiskCount();
- subSoundFXPush(); // Sound effects
-
return subAnimateMurphy
;
+
subSoundFX(*si, fiRedDisk, actDropping)
;
} // subAnimateMurphy
// ==========================================================================
// SUBROUTINE
// ==========================================================================
} // subAnimateMurphy
// ==========================================================================
// SUBROUTINE
// ==========================================================================
-
int
subExplodeSnikSnaksBelow(int si)
+
void
subExplodeSnikSnaksBelow(int si)
{
{
- int subExplodeSnikSnaksBelow;
-
int ax;
ax = LowByte(PlayField16[si + FieldWidth]);
if (ax == 0x11 || ax == 0xBB)
ExplodeFieldSP(si + FieldWidth);
int ax;
ax = LowByte(PlayField16[si + FieldWidth]);
if (ax == 0x11 || ax == 0xBB)
ExplodeFieldSP(si + FieldWidth);
-
- return subExplodeSnikSnaksBelow;
} // subExplodeSnikSnaksBelow
// ==========================================================================
} // subExplodeSnikSnaksBelow
// ==========================================================================
@@
-2247,44
+2318,40
@@
loc_g_753F:
// The 10-port data base is at data_h_0D28, 10 entries of 6 bytes each:
// (hi),(lo),(gravity),(freeze zonks),(freeze enemies),(unused)
// ==========================================================================
// The 10-port data base is at data_h_0D28, 10 entries of 6 bytes each:
// (hi),(lo),(gravity),(freeze zonks),(freeze enemies),(unused)
// ==========================================================================
-int subSpPortTest(int si)
-{
- int subSpPortTest;
- int i, cx, bx;
+void subSpPortTest(int si)
+{
+ int i;
- cx = LInfo.SpecialPortCount; // number of special ports
- for (i = 1; i <= cx; i++)
+ for (i = 0; i < LInfo.SpecialPortCount; i++)
{
{
+ if (LInfo.SpecialPort[i].PortLocation / 2 == si)
{
{
- bx = HighByte(LInfo.SpecialPort[i].PortLocation);
- MovHighByte(&bx, LowByte(LInfo.SpecialPort[i].PortLocation));
- if (bx / 2 == si)
- {
- GravityFlag = LInfo.SpecialPort[i].Gravity;
- FreezeZonks = LInfo.SpecialPort[i].FreezeZonks;
- SnikSnaksElectronsFrozen = LInfo.SpecialPort[i].FreezeEnemies;
- // RandomTime = RandomTime Xor RandomSeed 'is RandomTime used at all? no!
- i = cx + 1;
- }
+ GravityFlag = LInfo.SpecialPort[i].Gravity;
+ FreezeZonks = LInfo.SpecialPort[i].FreezeZonks;
+ SnikSnaksElectronsFrozen = LInfo.SpecialPort[i].FreezeEnemies;
+ break;
}
}
}
}
+}
- return subSpPortTest;
-} // subSpPortTest
-
-void subCopyFieldToScreen(int si, int fi)
+void subCopyAnimToScreen(int si, int graphic, int sync_frame)
{
int X, Y;
// +++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
{
int X, Y;
// +++++++++++++++++++++++++++++++++++++++++
X = GetStretchX(si);
Y = GetStretchY(si);
-
StretchedSprites.BltEx(X, Y, fi
);
+
DDSpriteBuffer_BltImg(X, Y, graphic, sync_frame
);
// +++++++++++++++++++++++++++++++++++++++++
}
// +++++++++++++++++++++++++++++++++++++++++
}
+void subCopyImageToScreen(int si, int graphic)
+{
+ subCopyAnimToScreen(si, graphic, 0);
+}
+
static void subEatRedDisk(int si)
{
if (AllowRedDiskCheat == 0)
static void subEatRedDisk(int si)
{
if (AllowRedDiskCheat == 0)
@@
-2297,13
+2364,10
@@
static void subEatRedDisk(int si)
}
RedDiskCount = (RedDiskCount + 1) % 256;
}
RedDiskCount = (RedDiskCount + 1) % 256;
- subDisplayRedDiskCount();
}
}
-
int
subAdjustZonksInfotronsAboveMurphy(int si)
+
void
subAdjustZonksInfotronsAboveMurphy(int si)
{
{
- int subAdjustZonksInfotronsAboveMurphy;
-
int ax;
if (LowByte(PlayField16[si]) != fiExplosion)
int ax;
if (LowByte(PlayField16[si]) != fiExplosion)
@@
-2318,7
+2382,7
@@
int subAdjustZonksInfotronsAboveMurphy(int si)
MovHighByte(&PlayField16[si - FieldWidth], 0x40); // make falling straigt down
}
MovHighByte(&PlayField16[si - FieldWidth], 0x40); // make falling straigt down
}
- return
subAdjustZonksInfotronsAboveMurphy
;
+ return;
loc_g_15A8: // empty above
ax = PlayField16[si - FieldWidth - 1];
loc_g_15A8: // empty above
ax = PlayField16[si - FieldWidth - 1];
@@
-2330,7
+2394,7
@@
loc_g_15B6:
if (ax == fiZonk || ax == fiInfotron)
goto loc_g_15E8;
if (ax == fiZonk || ax == fiInfotron)
goto loc_g_15E8;
- return
subAdjustZonksInfotronsAboveMurphy
;
+ return;
loc_g_15C5: // zonk/infotron above left
ax = PlayField16[si - 1];
loc_g_15C5: // zonk/infotron above left
ax = PlayField16[si - 1];
@@
-2339,7
+2403,8
@@
loc_g_15C5: // zonk/infotron above left
MovHighByte(&PlayField16[si - FieldWidth - 1], 0x60); // make roll right
PlayField16[si - FieldWidth] = 0x8888;
MovHighByte(&PlayField16[si - FieldWidth - 1], 0x60); // make roll right
PlayField16[si - FieldWidth] = 0x8888;
- return subAdjustZonksInfotronsAboveMurphy;
+
+ return;
loc_g_15E8: // zonk/infotron above right
ax = PlayField16[si + 1];
loc_g_15E8: // zonk/infotron above right
ax = PlayField16[si + 1];
@@
-2348,6
+2413,4
@@
loc_g_15E8: // zonk/infotron above right
MovHighByte(&PlayField16[si - FieldWidth + 1], 0x50); // make roll left
PlayField16[si - FieldWidth] = 0x8888;
}
MovHighByte(&PlayField16[si - FieldWidth + 1], 0x50); // make roll left
PlayField16[si - FieldWidth] = 0x8888;
}
-
- return subAdjustZonksInfotronsAboveMurphy;
-} // subAdjustZonksInfotronsAboveMurphy
+}