Browse Source

DIABOOL (#1768)

pull/876/head
qndel 7 years ago committed by Anders Jenbo
parent
commit
124b8a60c3
  1. 6
      Source/doom.cpp
  2. 6
      Source/doom.h
  3. 12
      Source/init.cpp
  4. 24
      Source/objects.cpp
  5. 6
      Source/objects.h
  6. 9
      defs.h

6
Source/doom.cpp

@ -3,11 +3,7 @@
int doom_quest_time;
int doom_stars_drawn;
BYTE *pDoomCel;
#ifdef HELLFIRE
BOOLEAN doomflag;
#else
BOOL doomflag;
#endif
DIABOOL doomflag;
int DoomQuestState;
/*

6
Source/doom.h

@ -5,11 +5,7 @@
extern int doom_quest_time;
extern int doom_stars_drawn;
extern BYTE *pDoomCel;
#ifdef HELLFIRE
extern BOOLEAN doomflag;
#else
extern BOOL doomflag;
#endif
extern DIABOOL doomflag;
extern int DoomQuestState;
/*

12
Source/init.cpp

@ -201,11 +201,7 @@ void init_create_window(int nCmdShow)
wcex.hIcon = LoadIcon(ghInst, MAKEINTRESOURCE(IDI_ICON1));
wcex.hCursor = LoadCursor(0, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
#ifdef HELLFIRE
wcex.lpszMenuName = "HELLFIRE";
#else
wcex.lpszMenuName = "DIABLO";
#endif
wcex.lpszMenuName = GAME_NAME;
wcex.lpszClassName = "DIABLO";
wcex.hIconSm = (HICON)LoadImage(ghInst, MAKEINTRESOURCE(IDI_ICON1), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
if (!RegisterClassEx(&wcex))
@ -218,11 +214,7 @@ void init_create_window(int nCmdShow)
nHeight = SCREEN_HEIGHT;
else
nHeight = GetSystemMetrics(SM_CYSCREEN);
#ifdef HELLFIRE
hWnd = CreateWindowEx(0, "DIABLO", "HELLFIRE", WS_POPUP, 0, 0, nWidth, nHeight, NULL, NULL, ghInst, NULL);
#else
hWnd = CreateWindowEx(0, "DIABLO", "DIABLO", WS_POPUP, 0, 0, nWidth, nHeight, NULL, NULL, ghInst, NULL);
#endif
hWnd = CreateWindowEx(0, "DIABLO", GAME_NAME, WS_POPUP, 0, 0, nWidth, nHeight, NULL, NULL, ghInst, NULL);
if (!hWnd)
app_fatal("Unable to create main window");
ShowWindow(hWnd, SW_SHOWNORMAL); // nCmdShow used only in beta: ShowWindow(hWnd, nCmdShow)

24
Source/objects.cpp

@ -122,11 +122,7 @@ void FreeObjectGFX()
numobjfiles = 0;
}
#ifdef HELLFIRE
BOOLEAN RndLocOk(int xp, int yp)
#else
BOOL RndLocOk(int xp, int yp)
#endif
DIABOOL RndLocOk(int xp, int yp)
{
if (dMonster[xp][yp])
return FALSE;
@ -341,11 +337,7 @@ void InitRndBarrels()
int numobjs; // number of groups of barrels to generate
int xp, yp;
_object_id o;
#ifdef HELLFIRE
BOOLEAN found;
#else
BOOL found;
#endif
DIABOOL found;
int p; // regulates chance to stop placing barrels in current group
int dir;
int t; // number of tries of placing next barrel in current group
@ -4092,11 +4084,7 @@ void SyncOpObject(int pnum, int cmd, int i)
void BreakCrux(int i)
{
int j, oi;
#ifdef HELLFIRE
BOOLEAN triggered;
#else
BOOL triggered;
#endif
DIABOOL triggered;
object[i]._oAnimFlag = 1;
object[i]._oAnimFrame = 1;
@ -4253,11 +4241,7 @@ void SyncL1Doors(int i)
void SyncCrux(int i)
{
#ifdef HELLFIRE
BOOLEAN found;
#else
BOOL found;
#endif
DIABOOL found;
int j, oi, type;
found = TRUE;

6
Source/objects.h

@ -16,11 +16,7 @@ extern int numobjfiles;
void InitObjectGFX();
void FreeObjectGFX();
#ifdef HELLFIRE
BOOLEAN RndLocOk(int xp, int yp);
#else
BOOL RndLocOk(int xp, int yp);
#endif
DIABOOL RndLocOk(int xp, int yp);
void InitRndLocObj(int min, int max, int objtype);
void InitRndLocBigObj(int min, int max, int objtype);
void InitRndLocObj5x5(int min, int max, int objtype);

9
defs.h

@ -1,5 +1,14 @@
// some global definitions, found in debug release
#ifdef HELLFIRE
#define DIABOOL BOOLEAN
#define GAME_NAME "HELLFIRE"
#else
#define DIABOOL BOOL
#define GAME_NAME "DIABLO"
#endif
#define DMAXX 40
#define DMAXY 40

Loading…
Cancel
Save