Skip to content

Commit

Permalink
DIABOOL (#1768)
Browse files Browse the repository at this point in the history
  • Loading branch information
qndel authored and AJenbo committed Oct 5, 2019
1 parent 473f621 commit 124b8a6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 45 deletions.
6 changes: 1 addition & 5 deletions Source/doom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down
6 changes: 1 addition & 5 deletions Source/doom.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down
12 changes: 2 additions & 10 deletions Source/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand Down
24 changes: 4 additions & 20 deletions Source/objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 1 addition & 5 deletions Source/objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 9 additions & 0 deletions defs.h
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 124b8a6

Please sign in to comment.