1 // ----------------------------------------------------------------------------
3 // ----------------------------------------------------------------------------
7 // static char *VB_Name = "modDemo";
11 // Public Function subCloseDemoRecordingFile()
14 int RecDemoRandomSeed;
18 void subGetNextDemoKey()
22 if (0 < DemoKeyRepeatCounter)
24 DemoKeyRepeatCounter = DemoKeyRepeatCounter - 1;
28 DemoOffset = DemoOffset + 1;
29 if (DemoOffset <= FileMax)
31 ax = PlayField8[DemoOffset];
39 DemoKeyCode = ax & 0xF;
40 DemoKeyRepeatCounter = (ax & 0xF0) / 0x10;
51 printf("::: %04d [%03ld, %02d] ----------> %s [%d] [%d, %d] [%d, %d]\n",
53 DemoOffset - DemoPointer, DemoKeyRepeatCounter,
54 (DemoKeyCode == keyNone ? "(none)" :
55 DemoKeyCode == keyLeft ? "left" :
56 DemoKeyCode == keyRight ? "right" :
57 DemoKeyCode == keyUp ? "up" :
58 DemoKeyCode == keyDown ? "down" :
59 DemoKeyCode == keySpace ? "space" :
60 DemoKeyCode == keySpaceLeft ? "space + left" :
61 DemoKeyCode == keySpaceRight ? "space + right" :
62 DemoKeyCode == keySpaceUp ? "space + up" :
63 DemoKeyCode == keySpaceDown ? "space + down" : "(unknown)"),
65 MurphyScreenXPos, MurphyScreenYPos,
66 MurphyPosIndex % 60, MurphyPosIndex / 60);
71 currency GetTotalFramesOfDemo()
73 currency GetTotalFramesOfDemo;
79 GetTotalFramesOfDemo = 0;
81 return GetTotalFramesOfDemo;
86 // --- On Error GoTo GetTotalFramesOfDemoEH
90 nFrames = nFrames + (db & 0xF0) / 0x10 + 1;
95 GetTotalFramesOfDemo = nFrames;
96 return GetTotalFramesOfDemo;
98 // GetTotalFramesOfDemoEH:
99 // ReportError "GetTotalFramesOfDemo()", "invalid data detected in file " & OrigPath
100 GetTotalFramesOfDemo = 0;
101 DemoAvailable = False;
103 return GetTotalFramesOfDemo;