// int ax, al, ah, bx, bl, i, X, Y;
// int tX, tY, tDeltaX, tDeltaY, tPos, Tmp;
+#if 1
+ int ax, al, bl, i, X, Y;
+ int time1, time2;
+#else
int ax, al, bx, bl, i, X, Y;
+#endif
int tDeltaX, tDeltaY, tPos, Tmp;
// Variables that hold information about the animation sequence
*si, *si % 60, *si / 60, ax, al, (al == fiMurphy));
#endif
+#if 0
+ printf("::: Murphy.c: subAnimateMurphy(): %d [%d] [%d]\n",
+ YawnSleepCounter, FrameCounter, TimerVar);
+#endif
+
if (al != fiMurphy)
{
MurphyMoveCounter = 0; // We have no Murphy! Exit!
goto loc_g_6364;
}
+#if 1
+
+#if 0
+ ax = (TimerVar & 3);
+ if (ax != 0)
+ return subAnimateMurphy;
+#endif
+
+ // ------------------------------------------------------------------
+ // Murphy's YAWN & SLEEP sequence, counted down by YawnSleepCounter:
+
+ YawnSleepCounter = YawnSleepCounter + 1;
+
+ if (YawnSleepCounter < 16)
+ return subAnimateMurphy;
+
+ if (YawnSleepCounter < 2000)
+ {
+ // normal grin
+ // (default: single graphic, no animation)
+ subCopyImageToScreen(*si, aniMurphy, YawnSleepCounter - 16);
+
+ return subAnimateMurphy;
+ }
+
+ if (YawnSleepCounter < 4000)
+ {
+ // yawn! and look depressed afterwards...
+ // (default: 12 animation frames with delay of 8)
+ subCopyImageToScreen(*si, aniMurphyYawn, YawnSleepCounter - 2000);
+
+ return subAnimateMurphy;
+ }
+
+ if (YawnSleepCounter < 6400)
+ {
+ // yawn again!
+ // (default: 12 animation frames with delay of 8)
+ subCopyImageToScreen(*si, aniMurphyYawn, YawnSleepCounter - 4000);
+
+ return subAnimateMurphy;
+ }
+
+ // time1 = 6400 + 12 * 8; // (default: 6496 == 6400 + 12 * 8)
+ time1 = 6400 + 12 * 10;
+
+ if (YawnSleepCounter < time1)
+ {
+ // yawn again! - third time
+ // (default: 12 animation frames with delay of 8)
+ subCopyImageToScreen(*si, aniMurphyYawn, YawnSleepCounter - 6400);
+
+ return subAnimateMurphy;
+ }
+
+ // time2 = 6496 + 3 * 64; // (default: 6688 == 6496 + 3 * 64)
+ time2 = 6496 + 3 * 100;
+
+ if (YawnSleepCounter > time2) // Murphy already went to sleep
+ return subAnimateMurphy;
+
+ if (PlayField16[*si - 1] == 0)
+ {
+ if (PlayField16[*si + 1] == 0)
+ {
+ // no sleep -- go back to "wait and start yawning" phase
+ YawnSleepCounter = 144;
+
+ return subAnimateMurphy;
+ }
+ else
+ {
+ // go to sleep (right side)
+ // (default: 3 animation frames with delay of 64)
+ subCopyImageToScreen(*si, aniMurphySleepRight, YawnSleepCounter - time1);
+
+ return subAnimateMurphy;
+ }
+ }
+
+ // go to sleep (left side)
+ // (default: 3 animation frames with delay of 64)
+ subCopyImageToScreen(*si, aniMurphySleepLeft, YawnSleepCounter - time1);
+
+ return subAnimateMurphy;
+
+ // end of YAWN-SLEEP-Sequence
+
+#else
+
ax = (TimerVar & 3);
if (ax != 0)
return subAnimateMurphy;
bx = (YawnSleepCounter - 1622) / 16;
subCopyFieldToScreen(*si, aniMurphySleepLeft + bx); // go to sleep
+
return subAnimateMurphy;
// end of YAWN-SLEEP-Sequence
+
+#endif
+
// ------------------------------------------------------------------
// ==========================================================================
// (Direct Jump) a key was pressed
return subAnimateMurphy;
#if 1
- printf("::: Murphy.c: !!!!!!!!!! GAME SOLVED !!!!!!!!!!\n");
+ if (!game_sp_info.LevelSolved)
+ printf("::: Murphy.c: !!!!!!!!!! LEVEL %d SOLVED !!!!!!!!!!\n",LevelNumber);
+#endif
+
+#if 1
+ game_sp_info.LevelSolved = TRUE;
#endif
subSoundFXExit();
subCopyFieldToScreen(*si, aniMurphyTouchUp);
if (YellowDisksExploded != 0)
{
- YawnSleepCounter = 10; // stay hypnotized
+ YawnSleepCounter = 40; // stay hypnotized
return subAnimateMurphy;
} // loc_g_6838:
subCopyFieldToScreen(*si, aniMurphyTouchLeft);
if (YellowDisksExploded != 0)
{
- YawnSleepCounter = 10; // stay hypnotized
+ YawnSleepCounter = 40; // stay hypnotized
return subAnimateMurphy;
} // loc_g_6838:
subCopyFieldToScreen(*si, aniMurphyTouchDown);
if (YellowDisksExploded != 0)
{
- YawnSleepCounter = 10; // stay hypnotized
+ YawnSleepCounter = 40; // stay hypnotized
return subAnimateMurphy;
} // loc_g_6838:
subCopyFieldToScreen(*si, aniMurphyTouchRight);
if (YellowDisksExploded != 0)
{
- YawnSleepCounter = 10; // stay hypnotized
+ YawnSleepCounter = 40; // stay hypnotized
return subAnimateMurphy;
} // loc_g_6838:
loc_g_6F77:
ExitToMenuFlag = 1;
+
+#if 1
+ PlayField16[*si] = fiSpace; // remove Murphy from playfield after exiting
+#endif
+
return subAnimateMurphy;
// ==========================================================================
int i, cx, bx;
+#if 1
+ cx = LInfo.SpecialPortCount; // number of special ports
+
+ for (i = 0; i < cx; i++)
+ {
+#if 1
+ /* this assumes that PortLocation is stored as big endian */
+ bx = LInfo.SpecialPort[i].PortLocation;
+#else
+ /* this assumes that PortLocation is stored as little endian */
+ bx = HighByte(LInfo.SpecialPort[i].PortLocation);
+ MovHighByte(&bx, LowByte(LInfo.SpecialPort[i].PortLocation));
+#endif
+
+ 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!
+
+ break;
+ }
+ }
+
+#else
+
cx = LInfo.SpecialPortCount; // number of special ports
for (i = 1; i <= cx; i++)
{
// RandomTime = RandomTime Xor RandomSeed 'is RandomTime used at all? no!
i = cx + 1;
}
-
}
}
+#endif
return subSpPortTest;
} // subSpPortTest
// +++++++++++++++++++++++++++++++++++++++++
}
+void subCopyImageToScreen(int si, int graphic, int sync_frame)
+{
+ int X, Y;
+
+ // +++++++++++++++++++++++++++++++++++++++++
+ X = GetStretchX(si);
+ Y = GetStretchY(si);
+ StretchedSprites.BltImg(X, Y, graphic, sync_frame);
+ // +++++++++++++++++++++++++++++++++++++++++
+}
+
static void subEatRedDisk(int si)
{
if (AllowRedDiskCheat == 0)