X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame_sp%2FMurphy.c;h=e104a5c7d1b4b4d3fd8f32010d941363dd2e58fa;hp=b00aef58f70eb9bb4b41ee1d5f36525146b368fc;hb=f7b79b71faf7e5fbe38df38d26d1156f3ba2f0ce;hpb=61ca162f9268de1fa4fe0df3f561189b1a71770d diff --git a/src/game_sp/Murphy.c b/src/game_sp/Murphy.c index b00aef58..e104a5c7 100644 --- a/src/game_sp/Murphy.c +++ b/src/game_sp/Murphy.c @@ -28,10 +28,8 @@ static boolean subMoveKillsMurphy(int si, int ax, int bl); // 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; #if 1 @@ -44,12 +42,14 @@ int subAnimateMurphy(int *si) // 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); @@ -67,12 +67,15 @@ int subAnimateMurphy(int *si) if (al != fiMurphy) { MurphyMoveCounter = 0; // We have no Murphy! Exit! - return subAnimateMurphy; + + return; } 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 @@ -80,6 +83,7 @@ int subAnimateMurphy(int *si) MurphyDY = 0; ClearPos = *si; dxPos = *si; + dx1 = -1; dx2 = -1; SeqPos = 0; // end of FS @@ -114,7 +118,7 @@ int subAnimateMurphy(int *si) #if 0 ax = (TimerVar & 3); if (ax != 0) - return subAnimateMurphy; + return; #endif // ------------------------------------------------------------------ @@ -123,33 +127,33 @@ int subAnimateMurphy(int *si) YawnSleepCounter = YawnSleepCounter + 1; if (YawnSleepCounter < 16) - return subAnimateMurphy; + return; if (YawnSleepCounter < 2000) { // normal grin // (default: single graphic, no animation) - subCopyImageToScreen(*si, aniMurphy, YawnSleepCounter - 16); + subCopyAnimToScreen(*si, aniMurphy, YawnSleepCounter - 16); - return subAnimateMurphy; + return; } if (YawnSleepCounter < 4000) { // yawn! and look depressed afterwards... // (default: 12 animation frames with delay of 8) - subCopyImageToScreen(*si, aniMurphyYawn, YawnSleepCounter - 2000); + subCopyAnimToScreen(*si, aniMurphyYawn, YawnSleepCounter - 2000); - return subAnimateMurphy; + return; } if (YawnSleepCounter < 6400) { // yawn again! // (default: 12 animation frames with delay of 8) - subCopyImageToScreen(*si, aniMurphyYawn, YawnSleepCounter - 4000); + subCopyAnimToScreen(*si, aniMurphyYawn, YawnSleepCounter - 4000); - return subAnimateMurphy; + return; } // time1 = 6400 + 12 * 8; // (default: 6496 == 6400 + 12 * 8) @@ -159,16 +163,16 @@ int subAnimateMurphy(int *si) { // yawn again! - third time // (default: 12 animation frames with delay of 8) - subCopyImageToScreen(*si, aniMurphyYawn, YawnSleepCounter - 6400); + subCopyAnimToScreen(*si, aniMurphyYawn, YawnSleepCounter - 6400); - 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 subAnimateMurphy; + return; if (PlayField16[*si - 1] == 0) { @@ -177,23 +181,23 @@ int subAnimateMurphy(int *si) // no sleep -- go back to "wait and start yawning" phase YawnSleepCounter = 144; - return subAnimateMurphy; + return; } else { // go to sleep (right side) // (default: 3 animation frames with delay of 64) - subCopyImageToScreen(*si, aniMurphySleepRight, YawnSleepCounter - time1); + subCopyAnimToScreen(*si, aniMurphySleepRight, YawnSleepCounter - time1); - return subAnimateMurphy; + return; } } // go to sleep (left side) // (default: 3 animation frames with delay of 64) - subCopyImageToScreen(*si, aniMurphySleepLeft, YawnSleepCounter - time1); + subCopyAnimToScreen(*si, aniMurphySleepLeft, YawnSleepCounter - time1); - return subAnimateMurphy; + return; // end of YAWN-SLEEP-Sequence @@ -201,7 +205,7 @@ int subAnimateMurphy(int *si) ax = (TimerVar & 3); if (ax != 0) - return subAnimateMurphy; + return; // ------------------------------------------------------------------ // Murphy's YAWN & SLEEP sequence, counted down by YawnSleepCounter: @@ -209,62 +213,62 @@ int subAnimateMurphy(int *si) if (YawnSleepCounter == 4) { subCopyFieldToScreen(*si, fiMurphy); // normal grin - return subAnimateMurphy; + return; } // loc_g_5ECE: if (YawnSleepCounter <= 500) // loc_g_5ED7: - return subAnimateMurphy; + return; if (YawnSleepCounter <= 522) { bx = (YawnSleepCounter - 500) / 2; subCopyFieldToScreen(*si, aniMurphyYawn + bx); // yawn! and look depressed afterwards... - return subAnimateMurphy; + return; } // loc_g_5F00: if (YawnSleepCounter <= 1000) - return subAnimateMurphy; + return; if (YawnSleepCounter <= 1022) { bx = (YawnSleepCounter - 1000) / 2; subCopyFieldToScreen(*si, aniMurphyYawn + bx); // yawn again! - return subAnimateMurphy; + return; } // loc_g_5F32: if (YawnSleepCounter <= 1600) // loc_g_5F3B: - return subAnimateMurphy; + return; if (YawnSleepCounter <= 1622) { bx = (YawnSleepCounter - 1600) / 2; subCopyFieldToScreen(*si, aniMurphyYawn + bx); // yawn again! - third time - return subAnimateMurphy; + return; } // loc_g_5F64: if (YawnSleepCounter > 1654) - return subAnimateMurphy; + return; if (PlayField16[*si - 1] == 0) { if (PlayField16[*si + 1] == 0) { YawnSleepCounter = 36; - return subAnimateMurphy; + return; } else { bx = (YawnSleepCounter - 1622) / 16; subCopyFieldToScreen(*si, aniMurphySleepRight + bx); // go to sleep - return subAnimateMurphy; + return; } } // loc_g_5F81: bx = (YawnSleepCounter - 1622) / 16; subCopyFieldToScreen(*si, aniMurphySleepLeft + bx); // go to sleep - return subAnimateMurphy; + return; // end of YAWN-SLEEP-Sequence @@ -359,7 +363,7 @@ loc_g_6003: default: RedDiskReleaseFlag = 0; - return subAnimateMurphy; + return; break; } @@ -403,7 +407,7 @@ loc_g_6078: if (! subMoveKillsMurphy(*si - FieldWidth, ax, bl)) goto loc_g_6078; - return subAnimateMurphy; + return; // ========================================================================== // moving right to left ... @@ -452,7 +456,7 @@ loc_g_60DA: if (! subMoveKillsMurphy(*si - 1, ax, bl)) goto loc_g_60DA; - return subAnimateMurphy; + return; // ========================================================================== // moving up to down ... @@ -494,7 +498,7 @@ loc_g_6154: if (! subMoveKillsMurphy(*si + FieldWidth, ax, bl)) goto loc_g_6154; - return subAnimateMurphy; + return; // ========================================================================== // moving left to right ... @@ -543,7 +547,7 @@ loc_g_61B6: if (! subMoveKillsMurphy(*si + 1, ax, bl)) goto loc_g_61B6; - return subAnimateMurphy; + return; // ========================================================================== // touching down to up ... @@ -572,7 +576,7 @@ loc_g_622E: if (al == fiRedDisk) goto loc_g_6A48; - return subAnimateMurphy; + return; // ========================================================================== // touching right to left ... @@ -601,7 +605,7 @@ loc_g_6258: if (al == fiRedDisk) goto loc_g_6A64; - return subAnimateMurphy; + return; // ========================================================================== // touching up to down ... @@ -629,7 +633,7 @@ loc_g_6288: if (al == fiRedDisk) goto loc_g_6A80; - return subAnimateMurphy; + return; // ========================================================================== // touching left to right ... @@ -658,7 +662,7 @@ loc_g_62B2: if (al == fiRedDisk) goto loc_g_6A9C; - return subAnimateMurphy; + return; // ========================================================================== // Release Red disk: no move ... @@ -669,17 +673,18 @@ loc_g_62E2: ClearPos = -1; // end of FS if (LowByte(RedDiskCount) == 0) - return subAnimateMurphy; + return; if (LowByte(RedDiskReleasePhase) != 0) - return subAnimateMurphy; + return; if (LowByte(RedDiskReleaseFlag) != 1) - return subAnimateMurphy; + return; 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; @@ -689,7 +694,8 @@ loc_g_62E2: // ========================================================================== 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; @@ -700,7 +706,8 @@ loc_g_6312: // ========================================================================== loc_g_6341: - dx = aniMurphyEatLeft; + dx = aniFramesMurphyEatLeft; + dx1 = aniMurphyMoveLeft; PlayField16[*si - 1] = 0x203; PlayField16[*si] = 0x300; *si = *si - 1; @@ -711,7 +718,8 @@ loc_g_6341: // ========================================================================== 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; @@ -722,7 +730,8 @@ loc_g_6364: // ========================================================================== loc_g_6399: - dx = aniMurphyEatRight; + dx = aniFramesMurphyEatRight; + dx1 = aniMurphyMoveRight; PlayField16[*si + 1] = 0x403; PlayField16[*si] = 0x300; *si = *si + 1; @@ -736,7 +745,8 @@ loc_g_63C2: if (SgnHighByte(PlayField16[*si - FieldWidth]) >= 0) { ExplodeFieldSP(*si); // Explode - return subAnimateMurphy; + + return; } PlayField16[*si - FieldWidth] = fiBase; @@ -746,7 +756,8 @@ loc_g_63C2: 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; @@ -760,7 +771,8 @@ loc_g_640B: if (SgnHighByte(PlayField16[*si - 1]) >= 0) { ExplodeFieldSP(*si); // Explode - return subAnimateMurphy; + + return; } PlayField16[*si - 1] = fiBase; @@ -770,7 +782,8 @@ loc_g_640B: loc_g_641C: subSoundFXBase(); - dx = aniMurphyEatLeft; + dx = aniFramesMurphyEatLeft; + dx1 = aniMurphyDigLeft; PlayField16[*si - 1] = 0x203; PlayField16[*si] = 0x300; *si = *si - 1; @@ -784,7 +797,8 @@ loc_g_6448: if (SgnHighByte(PlayField16[*si + FieldWidth]) >= 0) { ExplodeFieldSP(*si); // Explode - return subAnimateMurphy; + + return; } PlayField16[*si + FieldWidth] = fiBase; @@ -794,7 +808,8 @@ loc_g_6448: 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; @@ -808,7 +823,8 @@ loc_g_6491: if (SgnHighByte(PlayField16[*si + 1]) >= 0) { ExplodeFieldSP(*si); // Explode - return subAnimateMurphy; + + return; } PlayField16[*si + 1] = fiBase; @@ -818,7 +834,8 @@ loc_g_6491: loc_g_64A2: subSoundFXBase(); - dx = aniMurphyEatRight; + dx = aniFramesMurphyEatRight; + dx1 = aniMurphyDigRight; PlayField16[*si + 1] = 0x803; PlayField16[*si] = 0x300; *si = *si + 1; @@ -832,7 +849,8 @@ loc_g_64CE: if (SgnHighByte(PlayField16[*si - FieldWidth]) >= 0) { ExplodeFieldSP(*si); // Explode - return subAnimateMurphy; + + return; } PlayField16[*si - FieldWidth] = fiBase; @@ -841,9 +859,10 @@ loc_g_64CE: // ========================================================================== loc_g_64DF: - subCopyFieldToScreen(*si, aniMurphyTouchUp); + subCopyImageToScreen(*si, aniMurphyTouchUp); subSoundFXBase(); - dx = aniTouchBase; + dx = aniFramesTouchBase; + dx1 = aniTouchBase; dxPos = *si - FieldWidth; MovHighByte(&PlayField16[*si], 0x10); goto loc_StopNoSplit; @@ -856,7 +875,8 @@ loc_g_650C: if (SgnHighByte(PlayField16[*si - 1]) >= 0) { ExplodeFieldSP(*si); // Explode - return subAnimateMurphy; + + return; } PlayField16[*si - 1] = fiBase; @@ -865,9 +885,10 @@ loc_g_650C: // ========================================================================== loc_g_651D: - subCopyFieldToScreen(*si, aniMurphyTouchLeft); + subCopyImageToScreen(*si, aniMurphyTouchLeft); subSoundFXBase(); - dx = aniTouchBase; + dx = aniFramesTouchBase; + dx1 = aniTouchBase; dxPos = *si - 1; MovHighByte(&PlayField16[*si], 0x11); goto loc_StopNoSplit; @@ -880,7 +901,8 @@ loc_g_654A: if (SgnHighByte(PlayField16[*si + FieldWidth]) >= 0) { ExplodeFieldSP(*si); // Explode - return subAnimateMurphy; + + return; } PlayField16[*si + FieldWidth] = fiBase; @@ -889,9 +911,10 @@ loc_g_654A: // ========================================================================== loc_g_655B: - subCopyFieldToScreen(*si, aniMurphyTouchDown); + subCopyImageToScreen(*si, aniMurphyTouchDown); subSoundFXBase(); - dx = aniTouchBase; + dx = aniFramesTouchBase; + dx1 = aniTouchBase; dxPos = *si + FieldWidth; MovHighByte(&PlayField16[*si], 0x12); goto loc_StopNoSplit; @@ -904,7 +927,8 @@ loc_g_6588: if (SgnHighByte(PlayField16[*si + 1]) >= 0) { ExplodeFieldSP(*si); // Explode - return subAnimateMurphy; + + return; } PlayField16[*si + 1] = fiBase; @@ -913,9 +937,10 @@ loc_g_6588: // ========================================================================== loc_g_6599: - subCopyFieldToScreen(*si, aniMurphyTouchRight); + subCopyImageToScreen(*si, aniMurphyTouchRight); subSoundFXBase(); - dx = aniTouchBase; + dx = aniFramesTouchBase; + dx1 = aniTouchBase; dxPos = *si + 1; MovHighByte(&PlayField16[*si], 0x13); goto loc_StopNoSplit; @@ -926,7 +951,8 @@ loc_g_6599: 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; @@ -938,10 +964,13 @@ loc_g_65C6: 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; @@ -953,7 +982,8 @@ loc_g_65FE: 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; @@ -965,10 +995,13 @@ loc_g_662A: 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; @@ -979,9 +1012,10 @@ loc_g_6662: // ========================================================================== loc_g_668E: - subCopyFieldToScreen(*si, aniMurphyTouchUp); + subCopyImageToScreen(*si, aniMurphyTouchUp); subSoundFXInfotron(); - dx = aniTouchInfotron; + dx = aniFramesTouchInfotron; + dx1 = aniTouchInfotron; MovHighByte(&PlayField16[*si], 0x14); MovHighByte(&PlayField16[*si - FieldWidth], 0xFF); goto loc_StopNoSplit; @@ -991,9 +1025,10 @@ loc_g_668E: // ========================================================================== loc_g_66C0: - subCopyFieldToScreen(*si, aniMurphyTouchLeft); + subCopyImageToScreen(*si, aniMurphyTouchLeft); subSoundFXInfotron(); - dx = aniTouchInfotron; + dx = aniFramesTouchInfotron; + dx1 = aniTouchInfotron; MovHighByte(&PlayField16[*si], 0x15); MovHighByte(&PlayField16[*si - 1], 0xFF); goto loc_StopNoSplit; @@ -1003,9 +1038,10 @@ loc_g_66C0: // ========================================================================== loc_g_66F2: - subCopyFieldToScreen(*si, aniMurphyTouchDown); + subCopyImageToScreen(*si, aniMurphyTouchDown); subSoundFXInfotron(); - dx = aniTouchInfotron; + dx = aniFramesTouchInfotron; + dx1 = aniTouchInfotron; MovHighByte(&PlayField16[*si], 0x16); MovHighByte(&PlayField16[*si + FieldWidth], 0xFF); goto loc_StopNoSplit; @@ -1015,9 +1051,10 @@ loc_g_66F2: // ========================================================================== loc_g_6724: - subCopyFieldToScreen(*si, aniMurphyTouchRight); + subCopyImageToScreen(*si, aniMurphyTouchRight); subSoundFXInfotron(); - dx = aniTouchInfotron; + dx = aniFramesTouchInfotron; + dx1 = aniTouchInfotron; MovHighByte(&PlayField16[*si], 0x17); MovHighByte(&PlayField16[*si + 1], 0xFF); goto loc_StopNoSplit; @@ -1033,7 +1070,7 @@ loc_g_6756: MurphyDY = 0; // end of FS if (LowByte(InfotronsNeeded) != 0) - return subAnimateMurphy; + return; #if 1 if (!game_sp_info.LevelSolved) @@ -1062,7 +1099,8 @@ loc_g_6756: #endif LeadOutCounter = 0x40; // quit: start lead-out - dx = aniMurphyExit; + dx = aniFramesMurphyExit; + dx1 = aniMurphyExit; MovHighByte(&PlayField16[*si], 0xD); goto loc_StopNoSplit; @@ -1073,11 +1111,12 @@ loc_g_6756: loc_g_679B: ax = PlayField16[*si - 2]; if (ax != 0) - return subAnimateMurphy; + return; MovHighByte(&PlayField16[*si - 2], 1); - subCopyFieldToScreen(*si, aniPushLeft); // draw pushing murphy - dx = aniZonkRollLeft; + subCopyImageToScreen(*si, aniPushLeft); // draw pushing murphy + dx = aniFramesZonkRollLeft; + dx1 = aniZonkRollLeft; dxPos = *si - 1; dx2 = aniPushLeft; dx2Step = 1; @@ -1091,15 +1130,16 @@ loc_g_679B: loc_g_67D4: ax = PlayField16[*si + 2]; if (ax != 0) - return subAnimateMurphy; + return; ax = PlayField16[*si + FieldWidth + 1]; if (ax == 0) // zonk falls - return subAnimateMurphy; + return; MovHighByte(&PlayField16[*si + 2], 1); - subCopyFieldToScreen(*si, aniPushRight); // draw pushing murphy - dx = aniZonkRollRight; + subCopyImageToScreen(*si, aniPushRight); // draw pushing murphy + dx = aniFramesZonkRollRight; + dx1 = aniZonkRollRight; dxPos = *si + 1; dx2 = aniPushRight; dx2Step = -1; @@ -1111,14 +1151,24 @@ loc_g_67D4: // ========================================================================== loc_g_6817: - subCopyFieldToScreen(*si, aniMurphyTouchUp); + subCopyImageToScreen(*si, aniMurphyTouchUp); if (YellowDisksExploded != 0) { YawnSleepCounter = 40; // stay hypnotized - return subAnimateMurphy; + + return; } // loc_g_6838: +#if 1 + // draw new terminal type +#if 1 + GfxGraphic[GetX(*si - FieldWidth)][GetY(*si - FieldWidth)] = aniTerminalActive; +#else + subCopyImageToScreen(*si - FieldWidth, aniTerminalActive); +#endif +#else subCopyFieldToScreen(*si - FieldWidth, 0x88); // draw new terminal type +#endif TerminalState[*si - FieldWidth] = 8; goto loc_g_68F0; @@ -1127,14 +1177,24 @@ loc_g_6817: // ========================================================================== loc_g_684E: - subCopyFieldToScreen(*si, aniMurphyTouchLeft); + subCopyImageToScreen(*si, aniMurphyTouchLeft); if (YellowDisksExploded != 0) { YawnSleepCounter = 40; // stay hypnotized - return subAnimateMurphy; + + return; } // loc_g_6838: +#if 1 + // draw new terminal type +#if 1 + GfxGraphic[GetX(*si - 1)][GetY(*si - 1)] = aniTerminalActive; +#else + subCopyImageToScreen(*si - 1, aniTerminalActive); +#endif +#else subCopyFieldToScreen(*si - 1, 0x88); // draw new terminal type +#endif TerminalState[*si - 1] = 8; goto loc_g_68F0; @@ -1143,14 +1203,24 @@ loc_g_684E: // ========================================================================== loc_g_6884: - subCopyFieldToScreen(*si, aniMurphyTouchDown); + subCopyImageToScreen(*si, aniMurphyTouchDown); if (YellowDisksExploded != 0) { YawnSleepCounter = 40; // stay hypnotized - return subAnimateMurphy; + + return; } // loc_g_6838: +#if 1 + // draw new terminal type +#if 1 + GfxGraphic[GetX(*si + FieldWidth)][GetY(*si + FieldWidth)] = aniTerminalActive; +#else + subCopyImageToScreen(*si + FieldWidth, aniTerminalActive); +#endif +#else subCopyFieldToScreen(*si + FieldWidth, 0x88); // draw new terminal type +#endif TerminalState[*si + FieldWidth] = 8; goto loc_g_68F0; @@ -1159,14 +1229,24 @@ loc_g_6884: // ========================================================================== loc_g_68BA: - subCopyFieldToScreen(*si, aniMurphyTouchRight); + subCopyImageToScreen(*si, aniMurphyTouchRight); if (YellowDisksExploded != 0) { YawnSleepCounter = 40; // stay hypnotized - return subAnimateMurphy; + + return; } // loc_g_6838: +#if 1 + // draw new terminal type +#if 1 + GfxGraphic[GetX(*si + 1)][GetY(*si + 1)] = aniTerminalActive; +#else + subCopyImageToScreen(*si + 1, aniTerminalActive); +#endif +#else subCopyFieldToScreen(*si + 1, 0x88); // draw new terminal type +#endif TerminalState[*si + 1] = 8; // ========================================================================== // common TERMINAL stuff moving/touching from all directions @@ -1181,7 +1261,7 @@ loc_g_68F0: ExplodeFieldSP (i); } - return subAnimateMurphy; + return; // ========================================================================== // PORT down to up, VERTICAL PORT, CROSS PORT all moving down to up @@ -1189,9 +1269,10 @@ loc_g_68F0: loc_g_6916: if (PlayField16[*si - 2 * FieldWidth] != 0) - return subAnimateMurphy; + return; - dx = aniSplitUpDown; + dx = aniFramesSplitUpDown; + dx1 = aniSplitUpDown; dx2Step = -FieldWidth; PlayField16[*si] = 0x1803; PlayField16[*si - 2 * FieldWidth] = 0x300; @@ -1203,9 +1284,10 @@ loc_g_6916: loc_g_693A: if (PlayField16[*si - 2] != 0) - return subAnimateMurphy; + return; - dx = aniMurphyEatLeft; + dx = aniFramesMurphyEatLeft; + dx1 = aniMurphyMoveLeft; dx2Step = -1; PlayField16[*si] = 0x1903; PlayField16[*si - 2] = 0x300; @@ -1217,9 +1299,10 @@ loc_g_693A: loc_g_695E: if (PlayField16[*si + 2 * FieldWidth] != 0) - return subAnimateMurphy; + return; - dx = aniSplitUpDown; + dx = aniFramesSplitUpDown; + dx1 = aniSplitUpDown; dx2Step = FieldWidth; PlayField16[*si] = 0x1A03; PlayField16[*si + 2 * FieldWidth] = 0x300; @@ -1231,9 +1314,10 @@ loc_g_695E: loc_g_6982: if (PlayField16[*si + 2] != 0) - return subAnimateMurphy; + return; - dx = aniMurphyEatRight; + dx = aniFramesMurphyEatRight; + dx1 = aniMurphyMoveRight; dx2Step = 1; PlayField16[*si] = 0x1B03; PlayField16[*si + 2] = 0x300; @@ -1248,7 +1332,8 @@ loc_StopSplit: // ========================================================================== 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; @@ -1258,7 +1343,8 @@ loc_g_69A6: // ========================================================================== 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; @@ -1269,7 +1355,8 @@ loc_g_69CE: // ========================================================================== 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; @@ -1279,8 +1366,9 @@ loc_g_69F7: // ========================================================================== 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: @@ -1314,7 +1402,8 @@ loc_g_6A1F: // ========================================================================== loc_g_6A48: - dx = aniTouchRedDisk; + dx = aniFramesTouchRedDisk; + dx1 = aniTouchRedDisk; MovHighByte(&PlayField16[*si], 0x20); MovHighByte(&PlayField16[*si - FieldWidth], 3); goto loc_StopNoSplit; @@ -1324,7 +1413,8 @@ loc_g_6A48: // ========================================================================== loc_g_6A64: - dx = aniTouchRedDisk; + dx = aniFramesTouchRedDisk; + dx1 = aniTouchRedDisk; MovHighByte(&PlayField16[*si], 0x21); MovHighByte(&PlayField16[*si - 1], 3); goto loc_StopNoSplit; @@ -1334,7 +1424,8 @@ loc_g_6A64: // ========================================================================== loc_g_6A80: - dx = aniTouchRedDisk; + dx = aniFramesTouchRedDisk; + dx1 = aniTouchRedDisk; MovHighByte(&PlayField16[*si], 0x22); MovHighByte(&PlayField16[*si + FieldWidth], 3); goto loc_StopNoSplit; @@ -1344,7 +1435,8 @@ loc_g_6A80: // ========================================================================== loc_g_6A9C: - dx = aniTouchRedDisk; + dx = aniFramesTouchRedDisk; + dx1 = aniTouchRedDisk; MovHighByte(&PlayField16[*si], 0x23); MovHighByte(&PlayField16[*si + 1], 3); @@ -1358,15 +1450,25 @@ loc_StopNoSplit: loc_g_6AB8: if (PlayField16[*si - 2 * FieldWidth] != 0) - return subAnimateMurphy; + return; PlayField16[*si - 2 * FieldWidth] = 0x1200; - subCopyFieldToScreen(*si, aniPushRight); - dx = aniYellowDisk; +#if 0 + subCopyImageToScreen(*si, aniPushRight); +#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; // ========================================================================== @@ -1375,11 +1477,12 @@ loc_g_6AB8: loc_g_6AF1: if (PlayField16[*si - 2] != 0) - return subAnimateMurphy; + return; PlayField16[*si - 2] = 0x1200; - subCopyFieldToScreen(*si, aniPushLeft); - dx = aniYellowDisk; + subCopyImageToScreen(*si, aniPushLeft); + dx = aniFramesYellowDisk; + dx1 = aniYellowDisk; dxPos = *si - 1; dx2 = aniPushLeft; dx2Step = 1; @@ -1392,15 +1495,25 @@ loc_g_6AF1: loc_g_6B2A: if (PlayField16[*si + 2 * FieldWidth] != 0) - return subAnimateMurphy; + return; PlayField16[*si + 2 * FieldWidth] = 0x1200; - subCopyFieldToScreen(*si, aniPushRight); - dx = aniYellowDisk; +#if 0 + subCopyImageToScreen(*si, aniPushRight); +#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; // ========================================================================== @@ -1409,11 +1522,12 @@ loc_g_6B2A: loc_g_6B63: if (PlayField16[*si + 2] != 0) - return subAnimateMurphy; + return; PlayField16[*si + 2] = 0x1200; - subCopyFieldToScreen(*si, aniPushRight); - dx = aniYellowDisk; + subCopyImageToScreen(*si, aniPushRight); + dx = aniFramesYellowDisk; + dx1 = aniYellowDisk; dxPos = *si + 1; dx2 = aniPushRight; dx2Step = -1; @@ -1426,11 +1540,12 @@ loc_g_6B63: loc_g_6B9B: if (PlayField16[*si - 2] != 0) - return subAnimateMurphy; + return; PlayField16[*si - 2] = 0x800; - subCopyFieldToScreen(*si, aniPushLeft); - dx = aniOrangeDisk; + subCopyImageToScreen(*si, aniPushLeft); + dx = aniFramesOrangeDisk; + dx1 = aniOrangeDisk; dxPos = *si - 1; dx2 = aniPushLeft; dx2Step = 1; @@ -1443,14 +1558,15 @@ loc_g_6B9B: loc_g_6BD3: if (PlayField16[*si + 2] != 0) - return subAnimateMurphy; + return; if (PlayField16[*si + FieldWidth + 1] == 0) // falling goes before pushing - return subAnimateMurphy; + return; PlayField16[*si + 2] = 0x100; - subCopyFieldToScreen(*si, aniPushRight); - dx = aniOrangeDisk; + subCopyImageToScreen(*si, aniPushRight); + dx = aniFramesOrangeDisk; + dx1 = aniOrangeDisk; dxPos = *si + 1; dx2 = aniPushRight; dx2Step = -1; @@ -1512,13 +1628,19 @@ locProceedMovingMurphy: // proceed moving murphy if (bl == 0x2A) // Red disk release timer goto loc_g_716E; - return subAnimateMurphy; + return; // ========================================================================== // Paint frame of MOVING.DAT sequence // ========================================================================== loc_g_6C8F: + +#if 1 + if (SeqPos <= 0) + dx1SequenceLength = getSequenceLength(dx1); +#endif + if (SplitMoveFlag == 0) { // ++++++++++++++++++++++++++ @@ -1558,7 +1680,7 @@ loc_g_6C8F: #if 1 if (!(ClearPos < 0)) // clear field that murphy is leaving - subCopyFieldToScreen(ClearPos, 0); + subCopyImageToScreen(ClearPos, aniSpace); #else if (! ClearPos < 0) // clear field that murphy is leaving subCopyFieldToScreen(ClearPos, 0); @@ -1583,7 +1705,20 @@ loc_g_6C8F: 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); + GfxGraphic[GetX(*si)][GetY(*si)] = -1; // (Murphy's position) + GfxGraphic[GetX(dxPos)][GetY(dxPos)] = -1; // (snapping position) + // printf("::: Tmp: %d\n", Tmp); +#else StretchedSprites.BltEx(X, Y, dx[Tmp]); +#endif #if 1 if (!(dx2 < 0)) @@ -1600,7 +1735,13 @@ loc_g_6C8F: } else // pushing something { +#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 } } @@ -1618,7 +1759,7 @@ loc_g_6C8F: MurphyScreenXPos = MurphyScreenXPos + 2 * MurphyDX; MurphyScreenYPos = MurphyScreenYPos + 2 * MurphyDY; #endif - subCopyFieldToScreen(ClearPos, 0); // clear the field that murphy leaves + subCopyImageToScreen(ClearPos, aniSpace); // clear the field that murphy leaves tDeltaX = MurphyDX * LocalStretch * (SeqPos + 1); tDeltaY = MurphyDY * LocalStretch * (SeqPos + 1); X = GetStretchX(dxPos) + tDeltaX; @@ -1634,8 +1775,13 @@ loc_g_6C8F: } // loc_g_6D1E:'loc_g_6D28: SeqPos = SeqPos + 1; +#if 1 + if (SeqPos < dx1SequenceLength) + return; +#else if (dx[SeqPos] > -1) - return subAnimateMurphy; + return; +#endif // Follow-up after movement completed 'loc_g_6D35: MurphyXPos = MurphyXPos + MurphyDX; @@ -1770,7 +1916,8 @@ loc_g_6C8F: goto loc_g_747F; ExitToMenuFlag = 1; - return subAnimateMurphy; + + return; // ========================================================================== // infotron, moving up @@ -1784,7 +1931,8 @@ loc_g_6EBA: loc_g_6EC8: // space, base PlayField16[*si] = fiMurphy; subAdjustZonksInfotronsAboveMurphy(*si + FieldWidth); - return subAnimateMurphy; + + return; // ========================================================================== // infotron, moving left @@ -1798,7 +1946,8 @@ loc_g_6ED8: loc_g_6EE6: // space, base PlayField16[*si] = fiMurphy; subAdjustZonksInfotronsAboveMurphy(*si + 1); - return subAnimateMurphy; + + return; // ========================================================================== // infotron, moving down @@ -1814,7 +1963,8 @@ loc_g_6F04: // space, base PlayField16[*si - FieldWidth] = 0; PlayField16[*si] = fiMurphy; - return subAnimateMurphy; + + return; // ========================================================================== // infotron, moving right @@ -1828,7 +1978,8 @@ loc_g_71B6: loc_g_71C4: // space, base subAdjustZonksInfotronsAboveMurphy(*si - 1); PlayField16[*si] = fiMurphy; - return subAnimateMurphy; + + return; // ========================================================================== // infotron, touching up @@ -1843,7 +1994,7 @@ loc_g_71E2: // base if (LowByte(PlayField16[*si - FieldWidth]) != fiExplosion) PlayField16[*si - FieldWidth] = 0; - return subAnimateMurphy; + return; // ========================================================================== // infotron, touching left @@ -1858,7 +2009,7 @@ loc_g_71FE: // base if (LowByte(PlayField16[*si - 1]) != fiExplosion) PlayField16[*si - 1] = 0; - return subAnimateMurphy; + return; // ========================================================================== // infotron, touching down @@ -1873,7 +2024,7 @@ loc_g_721A: // base if (LowByte(PlayField16[*si + FieldWidth]) != fiExplosion) PlayField16[*si + FieldWidth] = 0; - return subAnimateMurphy; + return; // ========================================================================== // infotron, touching right @@ -1888,7 +2039,7 @@ loc_g_7236: // base if (LowByte(PlayField16[*si + 1]) != fiExplosion) PlayField16[*si + 1] = 0; - return subAnimateMurphy; + return; // ========================================================================== // zonk, pushing left @@ -1902,7 +2053,8 @@ loc_g_6F18: PlayField16[*si - 2] = fiZonk; subExplodeSnikSnaksBelow(*si - 2); *si = *si - 1; - return subAnimateMurphy; + + return; // ========================================================================== // zonk, pushing right @@ -1916,7 +2068,8 @@ loc_g_6F3B: PlayField16[*si + 2] = fiZonk; subExplodeSnikSnaksBelow(*si + 2); *si = *si + 1; - return subAnimateMurphy; + + return; // ========================================================================== // exit @@ -1929,7 +2082,7 @@ loc_g_6F77: PlayField16[*si] = fiSpace; // remove Murphy from playfield after exiting #endif - return subAnimateMurphy; + return; // ========================================================================== // Push Zonk from right to left @@ -1937,15 +2090,16 @@ loc_g_6F77: 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; - subCopyFieldToScreen(*si, fiMurphy); - return subAnimateMurphy; + subCopyImageToScreen(*si, aniMurphy); + + return; // ========================================================================== // Push Zonk from left to right @@ -1953,15 +2107,16 @@ loc_g_6F7E: 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; - subCopyFieldToScreen(*si, fiMurphy); - return subAnimateMurphy; + subCopyImageToScreen(*si, aniMurphy); + + return; // ========================================================================== // Push orange disk from right to left @@ -1969,15 +2124,16 @@ loc_g_6FBC: 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; - subCopyFieldToScreen(*si, fiMurphy); - return subAnimateMurphy; + subCopyImageToScreen(*si, aniMurphy); + + return; // ========================================================================== // Push orange disk from left to right @@ -1985,15 +2141,16 @@ loc_g_6FFA: 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; - subCopyFieldToScreen(*si, fiMurphy); - return subAnimateMurphy; + subCopyImageToScreen(*si, aniMurphy); + + return; // ========================================================================== // Push yellow disk from down to up @@ -2001,15 +2158,16 @@ loc_g_7038: 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; - subCopyFieldToScreen(*si, fiMurphy); - return subAnimateMurphy; + subCopyImageToScreen(*si, aniMurphy); + + return; // ========================================================================== // Push yellow disk from right to left @@ -2017,15 +2175,16 @@ loc_g_7076: 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; - subCopyFieldToScreen(*si, fiMurphy); - return subAnimateMurphy; + subCopyImageToScreen(*si, aniMurphy); + + return; // ========================================================================== // Push yellow disk from up to down @@ -2033,15 +2192,16 @@ loc_g_70B4: 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; - subCopyFieldToScreen(*si, fiMurphy); - return subAnimateMurphy; + subCopyImageToScreen(*si, aniMurphy); + + return; // ========================================================================== // Push yellow disk from left to right @@ -2049,15 +2209,16 @@ loc_g_70F2: 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; - subCopyFieldToScreen(*si, fiMurphy); - return subAnimateMurphy; + subCopyImageToScreen(*si, aniMurphy); + + return; // ========================================================================== // time red disk release (space) @@ -2067,16 +2228,21 @@ loc_g_716E: if (DemoKeyCode != keySpace) { PlayField16[*si] = fiMurphy; - subCopyFieldToScreen(*si, fiMurphy); + subCopyImageToScreen(*si, aniMurphy); RedDiskReleasePhase = 0; } else if (MovingPictureSequencePhase == 0x20) { +#if 1 + // anxious murphy, dropping red disk + subCopyImageToScreen(*si, aniMurphyDropping); +#else subCopyFieldToScreen(*si, 43); // anxious murphy +#endif RedDiskReleasePhase = 1; } - return subAnimateMurphy; + return; // ========================================================================== // Special port down to up @@ -2093,7 +2259,8 @@ loc_g_7244: subSpPortTest(*si); *si = *si - FieldWidth; - return subAnimateMurphy; + + return; // ========================================================================== // Special port right to left @@ -2110,7 +2277,8 @@ loc_g_7272: subSpPortTest(*si); *si = *si - 1; - return subAnimateMurphy; + + return; // ========================================================================== // Special port up to down @@ -2127,7 +2295,8 @@ loc_g_729F: subSpPortTest(*si); *si = *si + FieldWidth; - return subAnimateMurphy; + + return; // ========================================================================== // Special port left to right @@ -2144,7 +2313,8 @@ loc_g_72CD: subSpPortTest(*si); *si = *si + 1; - return subAnimateMurphy; + + return; // ========================================================================== // Move Red Disk up @@ -2157,7 +2327,8 @@ loc_g_72FA: *si = *si - FieldWidth; PlayField16[*si] = fiMurphy; subEatRedDisk(*si); // inc+show Murphy's red disks - return subAnimateMurphy; + + return; // ========================================================================== // Move Red Disk left @@ -2169,7 +2340,8 @@ loc_g_7318: PlayField16[*si] = fiMurphy; subEatRedDisk(*si); // inc+show Murphy's red disks - return subAnimateMurphy; + + return; // ========================================================================== // Move Red Disk down @@ -2182,7 +2354,8 @@ loc_g_7333: *si = *si + FieldWidth; PlayField16[*si] = fiMurphy; subEatRedDisk(*si); // inc+show Murphy's red disks - return subAnimateMurphy; + + return; // ========================================================================== // Move Red Disk right @@ -2194,7 +2367,8 @@ loc_g_7351: PlayField16[*si] = fiMurphy; subEatRedDisk(*si); // inc+show Murphy's red disks - return subAnimateMurphy; + + return; // ========================================================================== // Eat Red Disk up @@ -2205,7 +2379,8 @@ loc_g_736C: PlayField16[*si - FieldWidth] = 0; subEatRedDisk(*si - FieldWidth); // inc+show Murphy's red disks - return subAnimateMurphy; + + return; // ========================================================================== // Eat Red Disk left @@ -2216,7 +2391,8 @@ loc_g_7381: PlayField16[*si - 1] = 0; subEatRedDisk(*si - 1); // inc+show Murphy's red disks - return subAnimateMurphy; + + return; // ========================================================================== // Eat Red Disk down @@ -2227,7 +2403,8 @@ loc_g_7396: PlayField16[*si + FieldWidth] = 0; subEatRedDisk(*si + FieldWidth); // inc+show Murphy's red disks - return subAnimateMurphy; + + return; // ========================================================================== // Eat Red Disk right @@ -2238,7 +2415,8 @@ loc_g_73AB: PlayField16[*si + 1] = 0; subEatRedDisk(*si + 1); // inc+show Murphy's red disks - return subAnimateMurphy; + + return; // ========================================================================== // yellow disk, pushing up @@ -2251,7 +2429,8 @@ loc_g_73C0: *si = *si - FieldWidth; PlayField16[*si] = fiMurphy; PlayField16[*si - FieldWidth] = fiYellowDisk; - return subAnimateMurphy; + + return; // ========================================================================== // yellow disk, pushing left @@ -2264,7 +2443,8 @@ loc_g_73DD: *si = *si - 1; PlayField16[*si] = fiMurphy; PlayField16[*si - 1] = fiYellowDisk; - return subAnimateMurphy; + + return; // ========================================================================== // yellow disk, pushing down @@ -2277,7 +2457,8 @@ loc_g_73FA: *si = *si + FieldWidth; PlayField16[*si] = fiMurphy; PlayField16[*si + FieldWidth] = fiYellowDisk; - return subAnimateMurphy; + + return; // ========================================================================== // yellow disk pushing right @@ -2290,7 +2471,8 @@ loc_g_7417: *si = *si + 1; PlayField16[*si] = fiMurphy; PlayField16[*si + 1] = fiYellowDisk; - return subAnimateMurphy; + + return; // ========================================================================== // orange disk, pushing left @@ -2303,7 +2485,8 @@ loc_g_7434: *si = *si - 1; PlayField16[*si] = fiMurphy; PlayField16[*si - 1] = fiOrangeDisk; - return subAnimateMurphy; + + return; // ========================================================================== // orange disk, pushing right @@ -2322,7 +2505,7 @@ loc_g_7451: MovHighByte(&PlayField16[*si + FieldWidth + 1], fiOrangeDisk); } - return subAnimateMurphy; + return; // ========================================================================== // Release a red disk @@ -2334,24 +2517,18 @@ loc_g_747F: RedDiskCount = RedDiskCount - 1; subDisplayRedDiskCount(); subSoundFXPush(); // Sound effects - - return subAnimateMurphy; } // 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); - - return subExplodeSnikSnaksBelow; } // subExplodeSnikSnaksBelow // ========================================================================== @@ -2502,7 +2679,7 @@ void subCopyFieldToScreen(int si, int fi) // +++++++++++++++++++++++++++++++++++++++++ } -void subCopyImageToScreen(int si, int graphic, int sync_frame) +void subCopyAnimToScreen(int si, int graphic, int sync_frame) { int X, Y; @@ -2513,6 +2690,11 @@ void subCopyImageToScreen(int si, int graphic, int sync_frame) // +++++++++++++++++++++++++++++++++++++++++ } +void subCopyImageToScreen(int si, int graphic) +{ + subCopyAnimToScreen(si, graphic, 0); +} + static void subEatRedDisk(int si) { if (AllowRedDiskCheat == 0) @@ -2528,10 +2710,8 @@ static void subEatRedDisk(int si) subDisplayRedDiskCount(); } -int subAdjustZonksInfotronsAboveMurphy(int si) +void subAdjustZonksInfotronsAboveMurphy(int si) { - int subAdjustZonksInfotronsAboveMurphy; - int ax; if (LowByte(PlayField16[si]) != fiExplosion) @@ -2546,7 +2726,7 @@ int subAdjustZonksInfotronsAboveMurphy(int si) MovHighByte(&PlayField16[si - FieldWidth], 0x40); // make falling straigt down } - return subAdjustZonksInfotronsAboveMurphy; + return; loc_g_15A8: // empty above ax = PlayField16[si - FieldWidth - 1]; @@ -2558,7 +2738,7 @@ loc_g_15B6: if (ax == fiZonk || ax == fiInfotron) goto loc_g_15E8; - return subAdjustZonksInfotronsAboveMurphy; + return; loc_g_15C5: // zonk/infotron above left ax = PlayField16[si - 1]; @@ -2567,7 +2747,8 @@ loc_g_15C5: // zonk/infotron above left 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]; @@ -2576,6 +2757,4 @@ loc_g_15E8: // zonk/infotron above right MovHighByte(&PlayField16[si - FieldWidth + 1], 0x50); // make roll left PlayField16[si - FieldWidth] = 0x8888; } - - return subAdjustZonksInfotronsAboveMurphy; } // subAdjustZonksInfotronsAboveMurphy