-#define COMPILE_DATE_STRING "2009-10-24 01:44"
+#define COMPILE_DATE_STRING "2009-10-24 22:25"
Buffer.BltColorFill(EmptyRect, BackColor);
}
-void DDScrollBuffer_Blt()
+void DDScrollBuffer_Blt_Ext(Bitmap *target_bitmap)
{
RECT DR, SR;
long tX, tY, L;
SR.left, SR.top, mScrollX, mScrollY, mDestXOff, mDestYOff);
#endif
-#if 0
- BlitBitmap(screenBitmap, window,
- 1600, 320,
- SCR_FIELDX * TILEX, SCR_FIELDY * TILEY, SX, SY);
-#else
- BlitBitmap(screenBitmap, window,
+#if 1
+ BlitBitmap(screenBitmap, target_bitmap,
SR.left, SR.top,
SCR_FIELDX * TILEX, SCR_FIELDY * TILEY, SX, SY);
#endif
// BltEH:
}
+void DDScrollBuffer_Blt()
+{
+ DDScrollBuffer_Blt_Ext(window);
+}
+
void DDScrollBuffer_ScrollTo(int X, int Y)
{
if (NoDisplayFlag)
#include "global.h"
+extern void DDScrollBuffer_Blt_Ext(Bitmap *);
extern void DDScrollBuffer_Blt();
extern void DDScrollBuffer_Cls(int BackColor);
extern long DDScrollBuffer_CreateAtSize(long Width, long Height, long hWndViewPort);
printf("::: DDSpriteBuffer.c: Blt(): %d, %d\n", DR.left, DR.top);
#endif
+#if 0
+ if (pX == 0 * StretchWidth && pY == 0 * StretchWidth)
+ printf("::: TEST: drawing topleft corner ...\n");
+ if (pX == 59 * StretchWidth && pY == 23 * StretchWidth)
+ printf("::: TEST: drawing bottomright corner ...\n");
+#endif
+
#if 1
BlitBitmap(sp_objects, screenBitmap,
SR.left, SR.top,
LevelNumber = level_nr;
+#if 0
if (!DemoFlag || !DemoAvailable)
subRandomize();
+#endif
LevelLoaded = True;
}
// Sound.h
// ----------------------------------------------------------------------------
-#ifndef SOUND_H
-#define SOUND_H
+#ifndef GAME_SP_SOUND_H
+#define GAME_SP_SOUND_H
#include "vb_types.h"
#include "vb_defs.h"
extern int FXOnFlag;
extern int MusicOnFlag;
-#endif /* SOUND_H */
+#endif /* GAME_SP_SOUND_H */
GravityFlag = LInfo.InitialGravity;
FreezeZonks = LInfo.InitialFreezeZonks;
+#if 1
+ /* set by main game tape code directly */
+#else
+
+#if 1
+ printf("::: file.c: copyInternalEngineVars_SP(): RandomSeed = LInfo.DemoRandomSeed\n");
+#endif
+
RandomSeed = LInfo.DemoRandomSeed;
+#endif
+
LevelLoaded = True;
}
#ifndef GAME_SP_GLOBAL_H
#define GAME_SP_GLOBAL_H
+#include "main_sp.h"
+
#include "ASM.h"
#include "BitMapObject.h"
#include "BugsTerminals.h"
#include "modGeneralTricks.h"
#include "modMPX.h"
-
-#include "main_sp.h"
-
-
#endif /* GAME_SP_GLOBAL_H */
Bitmap *screenBitmap;
-#if 0
-static void BlitScreenToBitmap_SP__Stage_Blt()
-{
- BlitScreenToBitmap_SP(window);
-}
-#endif
-
static void init_struct_functions()
{
-#if 1
- Stage.Blt = &DDScrollBuffer_Blt;
-#else
- Stage.Blt = &BlitScreenToBitmap_SP__Stage_Blt;
-#endif
-
+ Stage.Blt = &DDScrollBuffer_Blt;
Stage.ScrollTo = &DDScrollBuffer_ScrollTo;
Stage.ScrollTowards = &DDScrollBuffer_ScrollTowards;
Stage.SoftScrollTo = &DDScrollBuffer_SoftScrollTo;
SetBitmaps_SP(&sp_objects);
#if 1
+ /* too small for oversized levels, but too big for graphics performance */
+ /* (the whole playfield is drawn/updated, not only visible/scrolled area) */
+ /* !!! FIX THIS !!! */
screenBitmap = CreateBitmap(60 * TILEX, 24 * TILEY,
DEFAULT_DEPTH);
#else
{
if (seed == NEW_RANDOMIZE)
{
+#if 1
+ printf("::: init.c: InitEngineRandom_SP(): subRandomize()\n");
+#endif
+
subRandomize();
seed = (long)RandomSeed;
RandomSeed = (short)seed;
+#if 1
+ printf("::: init.c: InitEngineRandom_SP(): RandomSeed == %d\n", RandomSeed);
+#endif
+
return (unsigned int) seed;
}
game_sp_info.LevelSolved = FALSE;
game_sp_info.GameOver = FALSE;
-#if 0
+#if 1
menPlay_Click();
#else
menPlayDemo_Click();
void BlitScreenToBitmap_SP(Bitmap *target_bitmap)
{
- BlitBitmap(screenBitmap, target_bitmap, 15 * 32, 7 * 32,
- SCR_FIELDX * TILEX, SCR_FIELDY * TILEY, SX, SY);
+ DDScrollBuffer_Blt_Ext(target_bitmap);
}
void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode)