+2009-08-01
+ * first classic Supaplex level running and solved by solution/demo tape
+
2009-06-20
* started with integration of native Supaplex engine, using source code
of Megaplex from Frank Schindler, based on original Supaplex engine
-#define COMPILE_DATE_STRING "2009-07-31 18:31"
+#define COMPILE_DATE_STRING "2009-08-01 00:01"
Y = Y / Stretch;
dx = X - mScrollX;
dY = Y - mScrollY;
- maxD = (Abs(dx) < Abs(dY) ? Abs(dY) : Abs(dY));
+ maxD = (Abs(dx) < Abs(dY) ? Abs(dY) : Abs(dx));
StepCount = FPS * (TimeMS / (double)1000);
if (StepCount > maxD)
StepCount = maxD;
{
long Size;
- Size = (nSize < 1 ? 0 : 0);
+ Size = (nSize < 1 ? 0 : nSize);
if (! IS_NOTHING(&SubBuffer, sizeof(SubBuffer)))
Size = Size + SubBuffer.Size;
MovLowByte(&data_SPtorunavail, 0); // no SP file
data_scr_demo = 0;
- UpdatePlayTime = (0 == demo_stopped ? True : True);
+ UpdatePlayTime = (0 == demo_stopped ? True : False);
demo_stopped = 0;
subFetchAndInitLevelA(UpdatePlayTime);
// NW = ScaleWidth - 2 * Space: If NW < 0 Then NW = 0
// NH = ScaleHeight - 3 * Space - cmbLevel.Height: If NH < 0 Then NH = 0
// picViewPort.Move Space, Space, NW, NH
- Tmp = (ShowPanel != 0 ? ScaleHeight - Panel.Height : ScaleHeight - Panel.Height);
+ Tmp = (ShowPanel != 0 ? ScaleHeight - Panel.Height : ScaleHeight);
if (Tmp < 0)
Tmp = 0;
if (! bPlaying)
return;
- DeltaT = (DemoFlag != 0 ? DeltaTDemo : DeltaTDemo);
+ DeltaT = (DemoFlag != 0 ? DeltaTDemo : DeltaTPlay);
if (DeltaT < 0)
{
Stage.Blt();
*/
LFilt = LastOpenFilter;
- cmDlg.FilterIndex = (0 < LFilt & LFilt < 5 ? LFilt : LFilt);
+ cmDlg.FilterIndex = (0 < LFilt & LFilt < 5 ? LFilt : 1);
if (FileExists(CurPath))
cmDlg.InitDir = WithSlash(StripDir(CurPath));
static StdPicture OldPic;
static char *OldText = 0;
- PauseMode = (PauseMode != 0 ? 0 : 0);
+ PauseMode = (PauseMode != 0 ? 0 : 1);
if (PauseMode != 0)
{
if (IS_NOTHING(&OldPic, sizeof(OldPic)))
{
{
menSoundFX.Checked = ! menSoundFX.Checked;
- FXOnFlag = (menSoundFX.Checked ? -1 : -1);
+ FXOnFlag = (menSoundFX.Checked ? -1 : 0);
}
}
Tmp = Panel.Height;
if (PanelSeq < Panel.Height && -1 < PanelSeq)
{
- PanelSeq = (ShowPanel != 0 ? PanelSeq + 2 : PanelSeq + 2);
+ PanelSeq = (ShowPanel != 0 ? PanelSeq + 2 : PanelSeq - 2);
Tmp = ScaleHeight - Tmp + PanelSeq;
Panel.top = Tmp;
picViewPort.Height = Tmp;
else
{
PanelTim.Enabled = False;
- PanelSeq = (PanelSeq < 0 ? 0 : 0);
- ShowPanel = (ShowPanel == 0 ? 1 : 1);
+ PanelSeq = (PanelSeq < 0 ? 0 : PanelSeq - );
+ ShowPanel = (ShowPanel == 0 ? 1 : 0);
menPanel.Checked = (ShowPanel != 0);
}
}
Tmp = State[i];
if (Tmp ^ LastState[i])
{
- Col = (i == 5 ? vbRed : vbRed);
- shpKey(i).FillColor = (Tmp ? Col : Col);
+ Col = (i == 5 ? vbRed : vbGreen);
+ shpKey(i).FillColor = (Tmp ? Col : vbButtonFace);
shpKey(i).Refresh;
LastState[i] = Tmp;
}
}
Flag = CBool(s.Read("SoundFX", True));
- FXOnFlag = (Flag ? -1 : -1);
+ FXOnFlag = (Flag ? -1 : 0);
menSoundFX.Checked = Flag;
SignatureDelay = CLng(s.Read("SignatureDelay", 3000));
AllowRedDiskCheat = CInt(s.Read("AllowRedDiskCheat", 1));
int i;
{
- s.Save "LastPath", (ModifiedFlag ? OrigPath : OrigPath);
+ s.Save "LastPath", (ModifiedFlag ? OrigPath : CurPath);
if (WindowState != vbMinimized)
{
s.Save "Width", Width;
{
// int Tmp;
- XMin = (X2 < X1 ? X2 : X2);
- YMin = (Y2 < Y1 ? Y2 : Y2);
+ XMin = (X2 < X1 ? X2 : X1);
+ YMin = (Y2 < Y1 ? Y2 : Y1);
}
#if 0
// ==========================================================================
loc_g_6312:
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si - FieldWidth] = 0x103;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
// ==========================================================================
loc_g_6364:
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si + FieldWidth] = 0x303;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
loc_g_63D3:
subSoundFXBase();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si - FieldWidth] = 0x503;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
loc_g_6459:
subSoundFXBase();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si + FieldWidth] = 0x703;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
loc_g_65C6:
subSoundFXInfotron();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si - FieldWidth] = 0x903;
PlayField16[*si] = 0x300;
*si = *si - FieldWidth;
loc_g_662A:
subSoundFXInfotron();
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si + FieldWidth] = 0xB03;
PlayField16[*si] = 0x300;
*si = *si + FieldWidth;
// ==========================================================================
loc_g_69A6:
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si] = 0x1C03;
PlayField16[*si - FieldWidth] = 0x300;
goto loc_StopNoSplit;
// ==========================================================================
loc_g_69F7:
- dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpRight);
+ dx = (MurphyVarFaceLeft == 0 ? aniMurphyEatUpRight : aniMurphyEatUpLeft);
PlayField16[*si] = 0x1E03;
PlayField16[*si + FieldWidth] = 0x300;
goto loc_StopNoSplit;
MurphyScreenYPos = MurphyScreenYPos + MurphyDY;
#endif
+
+#if 0
+ printf("::: %04d [%03ld, %02d] ----------> %s [%d] [%d, %d] [%d, %d] [%d]\n",
+ TimerVar,
+ DemoOffset - DemoPointer, DemoKeyRepeatCounter,
+ (DemoKeyCode == keyNone ? "(none)" :
+ DemoKeyCode == keyLeft ? "left" :
+ DemoKeyCode == keyRight ? "right" :
+ DemoKeyCode == keyUp ? "up" :
+ DemoKeyCode == keyDown ? "down" :
+ DemoKeyCode == keySpace ? "space" :
+ DemoKeyCode == keySpaceLeft ? "space + left" :
+ DemoKeyCode == keySpaceRight ? "space + right" :
+ DemoKeyCode == keySpaceUp ? "space + up" :
+ DemoKeyCode == keySpaceDown ? "space + down" : "(unknown)"),
+ DemoKeyCode,
+ MurphyScreenXPos, MurphyScreenYPos,
+ MurphyPosIndex % 60, MurphyPosIndex / 60,
+ ClearPos);
+#endif
+
+#if 0
+ Delay(500);
+#endif
+
#if 1
if (!(ClearPos < 0)) // clear field that murphy is leaving
subCopyFieldToScreen(ClearPos, 0);
X = GetStretchX(dxPos) + tDeltaX;
Y = GetStretchY(dxPos) + tDeltaY;
- Tmp = (SeqPos < 0 ? 0 : 0); // 9StepBugFix!(red disk move right)
+ Tmp = (SeqPos < 0 ? 0 : SeqPos); // 9StepBugFix!(red disk move right)
StretchedSprites.BltEx(X, Y, dx[Tmp]);
#if 1
T = StripFileName(Path);
T2 = StripExtension(Path);
- StripExtensionlessFileName = Left(T, strlen(T) - strlen(T2) - (0 < strlen(T2) ? 1 : 1));
+ StripExtensionlessFileName = Left(T, strlen(T) - strlen(T2) - (0 < strlen(T2) ? 1 : 0));
return StripExtensionlessFileName;
}