+2009-12-08
+ * fixed some problems with Supaplex engine when compiling for Windows
+
+2009-12-05
+ * added special mode to convert elements of Sokoban XSB levels to CEs
+
2009-12-01
* added reading native Sokoban levels and level packages (XSB files)
-#define COMPILE_DATE_STRING "2009-12-05 22:18"
+#define COMPILE_DATE_STRING "2009-12-08 22:09"
// --- Option Explicit
-long GetTickCount();
+long MyGetTickCount();
byte *TerminalState;
int TerminalMaxCycles;
long Tick, Tmp;
- Tick = GetTickCount();
+ Tick = MyGetTickCount();
Tmp = ((Tick ^ (long)(Tick / (1 << 16))) & 0xFFFF);
RandomSeed = 0x7FFF & Tmp;
if ((Tmp & 0x8000) != 0)
#include "Capture.h"
+#if 0
+
// static char *VB_Name = "CaptureModule";
// --------------------------------------------------------------------
long RealizePalette(long hDC);
long GetWindowDC(long hWnd);
long GetDC(long hWnd);
+#if 0
long GetWindowRect(long hWnd, RECT lpRect);
+#endif
long ReleaseDC(long hWnd, long hDC);
long GetDesktopWindow();
int RealizePalette(int hDC);
int GetWindowDC(int hWnd);
int GetDC(int hWnd);
+#if 0
int GetWindowRect(int hWnd, RECT lpRect);
+#endif
int ReleaseDC(int hWnd, int hDC);
int GetDesktopWindow();
return CaptureClient;
}
+#if 0
+
// ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//
// CaptureActiveWindow
return CaptureActiveWindow;
}
+#endif
+
// ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//
// --------------------------------------------------------------------
+#endif
#include "global.h"
+#if 0
+
#ifndef HAS_PALETTEENTRY
typedef struct
{
extern Picture CreateBitmapPicture(int hBmp, int hPal);
extern void PrintPictureToFitPage(Printer Prn, Picture pic);
+#endif
+
#endif /* CAPTURE_H */
return Height;
}
+#if 0
+
long DDScrollBuffer_CreateAtSize(long Width, long Height, long hWndViewPort)
{
long CreateAtSize;
Buffer.BltColorFill(EmptyRect, BackColor);
}
+#endif
/* copy the entire screen to the window at the scroll position */
void DDScrollBuffer_Blt_Ext(Bitmap *target_bitmap)
{
- RECT DR, SR;
+ MyRECT DR, SR;
+#if 1
+ long tX, tY;
+#else
long tX, tY, L;
+#endif
int sX, sY;
// RECT ERect;
// long Restore;
if (IS_NOTHING(&Buffer, sizeof(Buffer)))
return;
+#if 0
if (IS_NOTHING(&PrimarySurface, sizeof(PrimarySurface)))
return;
+#endif
+
+#if 0
L = PrimarySurface.Blt(DR, &Buffer, SR, DDBLT_WAIT);
if (L != DD_OK)
break;
#endif
+#if 0
case DDERR_SURFACELOST:
DDraw.RestoreAllSurfaces();
if (! PrimarySurface.isLost())
// RestorePrimarySurface
// ClipToWindow 0
break;
+#endif
#if 0
case DDERR_UNSUPPORTED:
}
}
+#endif
+
#if 0
// Buffer.UpdateOverlay SR, PrimarySurface, DR, DDOVER_SHOW
if (EditFlag)
return CreateFromFile;
}
+#if 0
+
boolean DDSpriteBuffer_CreateAtSize(long Width, long Height, long xSprites, long ySprites)
{
boolean CreateAtSize;
return CreateAtSize;
}
+#endif
+
+#if 0
+
void DDSpriteBuffer_Cls(int BackColor)
{
RECT EmptyRect;
Buffer.BltColorFill(EmptyRect, BackColor);
}
+#endif
+
static void Blt(int pX, int pY, int SpriteX, int SpriteY)
{
- RECT DR, SR;
+ MyRECT DR, SR;
#if 0
long Tmp;
#endif
#include "global.h"
+#if 0
+
extern void ClipToWindow(long hWnd);
extern void InitDirectDraw(long hWndClip);
extern void ReleaseDirectDraw();
extern DirectDrawSurface7 PrimarySurface;
extern DirectX7 DirectX;
+#endif
+
#endif /* DIRECTDRAWGLOBALS_H */
// --- Option Explicit
+#if 0
+
DirectX7 DirectX;
DirectX7 DirectXS;
DirectDraw7 DDraw;
// Public DKeyboard As DirectInputDevice
DirectDrawSurface7 PrimarySurface;
+#endif
+
+#if 0
+
void InitDirectX(long hWndForm, long hWndClip)
{
// DirectX = New DirectX7; // (handle this later, if needed)
// Set Pal = PrimarySurface.GetPalette()
// End Sub
+#endif
#include "global.h"
+#if 0
+
extern void ClipToWindow(long hWnd);
extern void InitDirectX(long hWndForm, long hWndClip);
extern void ReleaseDirectDraw();
extern DirectX7 DirectX;
extern DirectX7 DirectXS;
+#endif
+
#endif /* DIRECTXGLOBALS_H */
// --- Option Explicit
// --- Option Compare Text
+#if 0
+
long SetParent(long hWndChild, long hWndNewParent);
long SetWindowLong(long hWnd, long nIndex, long dwNewLong);
long GetWindowLong(long hWnd, long nIndex);
+#if 0
long GetTempPath(long nBufferLength, char *lpBuffer);
+#endif
long GetWindowText(long hWnd, char *lpString, long cch);
+#endif
+
+#if 0
+
#define GWL_STYLE ((-16))
#define WS_CHILD (0x40000000)
#define WS_POPUP (0x80000000)
+#endif
+
// [UNCOMMENTED] Dim StretchWidth2&
char *MpxBmp;
extern void DrawFieldAnimated(int X, int Y);
extern void DrawFieldNoAnimated(int X, int Y);
extern void DrawSprite(int X, int Y, int SpritePos);
+#if 0
extern void InvalidateRect(long XMin, long YMin, long XMax, long YMax);
+#endif
extern void Let_PanelVisible(boolean NewVal);
extern void ReLoadStretchSprites();
extern void SaveSnapshot(currency Number);
int MusicOnFlag;
int FXOnFlag;
+#if 0
+
DirectSoundBuffer ZonkFX[1 + 1];
DirectSoundBuffer InfotronFX[1 + 1];
DirectSoundBuffer BugFX[1 + 1];
DirectSoundBuffer ExitFX;
DirectSoundBuffer BaseFX;
+#endif
+
void LoadSoundFX()
{
void subSoundFXZonk()
{
+#if 0
+
int i;
if (FXOnFlag == 0)
}
}
}
+
+#endif
}
void subSoundFXBug()
{
+#if 0
+
int i;
if (FXOnFlag == 0)
}
}
}
+
+#endif
}
void subSoundFXInfotron()
{
+#if 0
+
int i;
if (FXOnFlag == 0)
}
}
}
+
+#endif
}
void subSoundFXExplosion()
{
+#if 0
+
int i;
if (FXOnFlag == 0)
}
}
}
+
+#endif
}
void subSoundFXBase()
{
+#if 0
+
if (FXOnFlag == 0)
return;
{
BaseFX.Play DSBPLAY_DEFAULT;
}
+
+#endif
}
void subSoundFXPush()
{
+#if 0
+
if (FXOnFlag == 0)
return;
{
PushFX.Play DSBPLAY_DEFAULT;
}
+
+#endif
}
void subSoundFXExit()
{
+#if 0
+
if (FXOnFlag == 0)
return;
{
ExitFX.Play DSBPLAY_DEFAULT;
}
+
+#endif
}
void subMusicInit()
#define LongMin (-(double)2147483648UL) // the "#" sign is a bug of the VB environment AutoFormat function but causes no real problems; don't worry 'bout it!
#define LongMax (2147483647UL)
-long GetTickCount();
+#if 0
+
+long MyGetTickCount();
long QueryPerformanceCounter(currency lpPerformanceCount);
long QueryPerformanceFrequency(currency lpFrequency);
+#endif
+
boolean DelayLoopActive;
boolean MPause, bHighPerf;
currency PFreq; // LARGE_INTEGER
double sFactor, msFactor, usFactor;
+#if 0
+
boolean TickCountObject_Get_Active()
{
boolean Active;
}
else
{
- TickNow = GetTickCount();
+ TickNow = MyGetTickCount();
}
return TickNow;
}
else
{
- NewTick = GetTickCount();
+ NewTick = MyGetTickCount();
if (NewTick < TickStart)
{
// Overflow occured and needs to be handled
}
else
{
- NewTick = GetTickCount();
+ NewTick = MyGetTickCount();
if (NewTick < TickStart)
{
// Overflow occured and needs to be handled
}
else
{
- NewTick = GetTickCount();
+ NewTick = MyGetTickCount();
if (NewTick < TickStart)
{
// Overflow occured and needs to be handled
return TickDiffUS;
}
+#endif
+
#if 0
static void Class_Initialize()
#include "TopMost.h"
+#if 0
+
// static char *VB_Name = "TopMost_Module";
// --- Option Explicit
// --- const int SWP_FRAMECHANGED = 0x20;
i = SetWindowPos(hWnd, HWND_BOTTOM, 100, 100, 200, 200, SWP_HIDEWINDOW);
}
+#endif
#include "global.h"
+#if 0
+
#define HWND_BOTTOM (1)
#define HWND_BROADCAST (0xFFFF)
#define HWND_DESKTOP (0)
extern void TopMost(Object obj);
extern void UnTopMost(Object obj);
+#endif
+
#endif /* TOPMOST_H */
#define DDERR_UNSUPPORTED (VALUE_START_DD_ERR + 17)
#define DDERR_WASSTILLDRAWING (VALUE_START_DD_ERR + 18)
+#if 0
+
#define DSSCL_PRIORITY (VALUE_START_DS + 1)
#define DSBCAPS_CTRLFREQUENCY (VALUE_START_DS + 2)
#define DSBCAPS_CTRLPAN (VALUE_START_DS + 3)
#define DSBSTATUS_PLAYING (VALUE_START_DS + 7)
#define DSBPLAY_DEFAULT (VALUE_START_DS + 8)
+#endif
+
#endif /* VB_DEFS_H */
}
}
-long GetTickCount()
+long MyGetTickCount()
{
return random_linux_libc(RANDOM_SIMPLE);
}
return;
}
+#if 0
+
long GetTempPath(long a, char *b)
{
return 0;
}
+
+#endif
extern int FileLen(char *);
-extern long GetTickCount();
+extern long MyGetTickCount();
extern int GetAttr(char *);
extern void SaveSetting(const char *, const char *, char *, int);
+#if 0
extern long GetTempPath(long, char *);
+#endif
#endif /* VB_LIB_H */
int top;
int right;
int bottom;
-} RECT;
+} MyRECT;
#define HAS_RECT
#endif
boolean (*isLost)(void);
void (*GetSurfaceDesc)(DDSURFACEDESC2);
void (*SetClipper)(DirectDrawClipper);
- // long (*Blt)(RECT, DirectDrawSurface7, RECT, int);
- long (*Blt)(RECT, void *, RECT, int);
- void (*BltColorFill)(RECT, int);
+ // long (*Blt)(MyRECT, DirectDrawSurface7, MyRECT, int);
+ long (*Blt)(MyRECT, void *, MyRECT, int);
+ void (*BltColorFill)(MyRECT, int);
} DirectDrawSurface7;
typedef struct
int lFlags;
} DSBUFFERDESC;
+#if 0
+
typedef struct
{
int nFormatTag;
{
DirectDraw7 (*DirectDrawCreate)(char *);
DirectSound (*DirectSoundCreate)(char *);
- void (*GetWindowRect)(long, RECT);
+ void (*GetWindowRect)(long, MyRECT);
} DirectX7;
+#endif
+
typedef struct
{
int Left;