+2010-01-06
+ * fixed bug in Supaplex engine regarding initial screen scroll position
+
2009-12-17
* fixed EMC style pushing animations in the R'n'D graphics engine (when
using ".2nd_movement_tile" for animations having start and end tile)
-#define COMPILE_DATE_STRING "2009-12-18 23:21"
+#define COMPILE_DATE_STRING "2010-01-07 00:44"
long oldX, oldY, maxD;
static boolean AlreadyRunning = False;
+#if 0
+ printf(":a: %d, %d [%d, %d] [%d, %d] [%d, %d]\n",
+ mScrollX, mScrollY,
+ mScrollX_last, mScrollY_last,
+ ScreenScrollXPos, ScreenScrollYPos,
+ ScrollX, ScrollY);
+#endif
+
if (NoDisplayFlag)
return;
mScrollY = oldY + T * dY;
ScrollX = mScrollX;
ScrollY = mScrollY;
- // Blt();
+
+#if 0
+ Blt();
+#endif
}
+#if 0
+ printf(":x: %d, %d [%d, %d] [%d, %d] [%d, %d]\n",
+ mScrollX, mScrollY,
+ mScrollX_last, mScrollY_last,
+ ScreenScrollXPos, ScreenScrollYPos,
+ ScrollX, ScrollY);
+#endif
+
if (UserDragFlag)
goto SoftScrollEH;
mScrollY = Y;
ScrollX = mScrollX;
ScrollY = mScrollY;
- // Blt();
+
+#if 0
+ Blt();
+#endif
SoftScrollEH:
AlreadyRunning = False;
mScrollX, mScrollY);
#endif
+#if 0
+ printf(":y: %d, %d [%d, %d] [%d, %d] [%d, %d]\n",
+ mScrollX, mScrollY,
+ mScrollX_last, mScrollY_last,
+ ScreenScrollXPos, ScreenScrollYPos,
+ ScrollX, ScrollY);
+#endif
+
#if 1
ScrollPlayfieldIfNeeded();
#endif
+
+#if 0
+ printf(":z: %d, %d [%d, %d] [%d, %d] [%d, %d]\n",
+ mScrollX, mScrollY,
+ mScrollX_last, mScrollY_last,
+ ScreenScrollXPos, ScreenScrollYPos,
+ ScrollX, ScrollY);
+#endif
}
if (NoDisplayFlag)
return;
+#if 0
+ printf(":(: %d, %d [%d, %d - %d, %d] [%d]\n",
+ X, Y, ScrollMinX, ScrollMinY, ScrollMaxX, ScrollMaxY,
+ ScrollDelta);
+#endif
+
oldX = ScrollX;
oldY = ScrollY;
X = ScrollDelta * (X / ScrollDelta);
// ScrollX = X
// ScrollY = Y
+#if 0
+ printf(":): %d, %d [%d, %d - %d, %d] [%d]\n",
+ X, Y, ScrollMinX, ScrollMinY, ScrollMaxX, ScrollMaxY,
+ ScrollDelta);
+#endif
+
Stage.SoftScrollTo(X, Y, TimeMS, FPS);
}
copyInternalEngineVars_SP();
+#if 1
+ SetDisplayRegion();
+ SetScrollEdges();
+#endif
+
LevelNumber = level_nr;
#if 0
subCalculateScreenScrollPos(); // calculate screen start addrs
+#if 0
+ printf(":1: %d, %d [%d, %d] [%d, %d] [%d, %d]\n",
+ mScrollX, mScrollY,
+ mScrollX_last, mScrollY_last,
+ ScreenScrollXPos, ScreenScrollYPos,
+ ScrollX, ScrollY);
+#endif
+
if (AutoScrollFlag)
{
if (bPlaying)
}
}
+#if 0
+ printf(":2: %d, %d [%d, %d] [%d, %d] [%d, %d]\n",
+ mScrollX, mScrollY,
+ mScrollX_last, mScrollY_last,
+ ScreenScrollXPos, ScreenScrollYPos,
+ ScrollX, ScrollY);
+#endif
+
return InitMurphyPosB;
} // InitMurphyPosB
UpdateDeltaT();
#endif
+#if 1
+#endif
+
#if 0
printf("::: MainForm.c: menPlay_Click(): subFetchAndInitLevelB(): ...\n");
#endif
#endif
}
+#if 0
static void SetScrollEdges()
+#else
+void SetScrollEdges()
+#endif
{
#if 0
printf("::: MainForm.c: SetScrollEdges() ... [%ld, %ld, %ld, %ld] [%f, %d] [%d, %d, %d, %d]\n",
extern void ReLoadStretchSprites();
extern void SaveSnapshot(currency Number);
extern void SetDisplayRegion();
+extern void SetScrollEdges();
extern void ShowKey(int KeyVar);
extern void menDemoSpeed_Click(int Index);
extern void menEdit_Click();
InitScrollPlayfield();
+#if 0
+ printf(":A: %d, %d [%d, %d]\n",
+ mScrollX, mScrollY, mScrollX_last, mScrollY_last);
+#endif
+
#if 1
menPlay_Click();
#else
menPlayDemo_Click();
#endif
+
+#if 0
+ printf(":B: %d, %d [%d, %d]\n",
+ mScrollX, mScrollY, mScrollX_last, mScrollY_last);
+#endif
}
#if 0