Browse Source

Unifcy a chunk of Hellfire's code pathts

pull/956/head
Anders Jenbo 5 years ago
parent
commit
d20eddf48e
  1. 12
      Source/automap.cpp
  2. 31
      Source/control.cpp
  3. 26
      Source/cursor.cpp
  4. 2
      Source/cursor.h
  5. 30
      Source/diablo.cpp
  6. 2
      Source/diablo.h
  7. 34
      Source/doom.cpp
  8. 2
      Source/drlg_l1.h
  9. 60
      Source/drlg_l3.cpp
  10. 2
      Source/error.cpp
  11. 8
      Source/gamemenu.cpp
  12. 8
      Source/gendung.cpp
  13. 2
      Source/gmenu.cpp
  14. 4
      Source/init.cpp
  15. 2
      Source/init.h
  16. 22
      Source/interfac.cpp
  17. 2
      Source/inv.cpp
  18. 2
      Source/inv.h
  19. 34
      Source/items.cpp
  20. 14
      Source/items.h
  21. 4
      Source/lighting.cpp
  22. 2
      Source/objdat.cpp
  23. 2
      Source/objdat.h
  24. 29
      Source/objects.cpp
  25. 2
      Source/objects.h
  26. 2
      Source/pack.h
  27. 2
      Source/palette.cpp
  28. 2
      Source/palette.h
  29. 2
      Source/player.cpp
  30. 4
      Source/scrollrt.cpp
  31. 4
      Source/sync.cpp
  32. 2
      Source/textdat.cpp
  33. 4
      Source/themes.cpp
  34. 2
      SourceX/storm/storm.cpp
  35. 6
      enums.h
  36. 9
      structs.h

12
Source/automap.cpp

@ -78,27 +78,19 @@ void InitAutomap()
switch (leveltype) { switch (leveltype) {
case DTYPE_CATHEDRAL: case DTYPE_CATHEDRAL:
#ifdef HELLFIRE
if (currlevel < 21) if (currlevel < 21)
pAFile = LoadFileInMem("Levels\\L1Data\\L1.AMP", &dwTiles); pAFile = LoadFileInMem("Levels\\L1Data\\L1.AMP", &dwTiles);
else else
pAFile = LoadFileInMem("NLevels\\L5Data\\L5.AMP", &dwTiles); pAFile = LoadFileInMem("NLevels\\L5Data\\L5.AMP", &dwTiles);
#else
pAFile = LoadFileInMem("Levels\\L1Data\\L1.AMP", &dwTiles);
#endif
break; break;
case DTYPE_CATACOMBS: case DTYPE_CATACOMBS:
pAFile = LoadFileInMem("Levels\\L2Data\\L2.AMP", &dwTiles); pAFile = LoadFileInMem("Levels\\L2Data\\L2.AMP", &dwTiles);
break; break;
case DTYPE_CAVES: case DTYPE_CAVES:
#ifdef HELLFIRE
if (currlevel < 17) if (currlevel < 17)
pAFile = LoadFileInMem("Levels\\L3Data\\L3.AMP", &dwTiles); pAFile = LoadFileInMem("Levels\\L3Data\\L3.AMP", &dwTiles);
else else
pAFile = LoadFileInMem("NLevels\\L6Data\\L6.AMP", &dwTiles); pAFile = LoadFileInMem("NLevels\\L6Data\\L6.AMP", &dwTiles);
#else
pAFile = LoadFileInMem("Levels\\L3Data\\L3.AMP", &dwTiles);
#endif
break; break;
case DTYPE_HELL: case DTYPE_HELL:
pAFile = LoadFileInMem("Levels\\L4Data\\L4.AMP", &dwTiles); pAFile = LoadFileInMem("Levels\\L4Data\\L4.AMP", &dwTiles);
@ -615,7 +607,6 @@ static void DrawAutomapText()
if (setlevel) { if (setlevel) {
PrintGameStr(8, nextline, quest_level_names[(BYTE)setlvlnum], COL_GOLD); PrintGameStr(8, nextline, quest_level_names[(BYTE)setlvlnum], COL_GOLD);
} else if (currlevel != 0) { } else if (currlevel != 0) {
#ifdef HELLFIRE
if (currlevel < 17 || currlevel > 20) { if (currlevel < 17 || currlevel > 20) {
if (currlevel < 21 || currlevel > 24) if (currlevel < 21 || currlevel > 24)
sprintf(desc, "Level: %i", currlevel); sprintf(desc, "Level: %i", currlevel);
@ -624,9 +615,6 @@ static void DrawAutomapText()
} else { } else {
sprintf(desc, "Level: Nest %i", currlevel - 16); sprintf(desc, "Level: Nest %i", currlevel - 16);
} }
#else
sprintf(desc, "Level: %i", currlevel);
#endif
PrintGameStr(8, nextline, desc, COL_GOLD); PrintGameStr(8, nextline, desc, COL_GOLD);
} }
} }

31
Source/control.cpp

@ -686,22 +686,16 @@ void DrawLifeFlask()
double p; double p;
int filled; int filled;
#ifdef HELLFIRE p = 0.0;
if (plr[myplr]._pMaxHP <= 0) { if (plr[myplr]._pMaxHP > 0) {
p = 0.0;
} else {
p = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0; p = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0;
} }
#else
p = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0;
#endif
plr[myplr]._pHPPer = p; plr[myplr]._pHPPer = p;
filled = plr[myplr]._pHPPer; filled = plr[myplr]._pHPPer;
#ifndef HELLFIRE
if (filled > 80) if (filled > 80)
filled = 80; filled = 80;
#endif
filled = 80 - filled; filled = 80 - filled;
if (filled > 11) if (filled > 11)
filled = 11; filled = 11;
@ -722,24 +716,17 @@ void UpdateLifeFlask()
double p; double p;
int filled; int filled;
#ifdef HELLFIRE p = 0.0;
if (plr[myplr]._pMaxHP <= 0) { if (plr[myplr]._pMaxHP > 0) {
p = 0.0;
} else {
p = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0; p = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0;
} }
#else
p = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0;
#endif
filled = p; filled = p;
plr[myplr]._pHPPer = filled; plr[myplr]._pHPPer = filled;
if (filled > 69) if (filled > 69)
filled = 69; filled = 69;
#ifndef HELLFIRE
else if (filled < 0) else if (filled < 0)
filled = 0; filled = 0;
#endif
if (filled != 69) if (filled != 69)
SetFlaskHeight(pLifeBuff, 16, 85 - filled, 96 + PANEL_X, PANEL_Y); SetFlaskHeight(pLifeBuff, 16, 85 - filled, 96 + PANEL_X, PANEL_Y);
if (filled != 0) if (filled != 0)
@ -749,10 +736,8 @@ void UpdateLifeFlask()
void DrawManaFlask() void DrawManaFlask()
{ {
int filled = plr[myplr]._pManaPer; int filled = plr[myplr]._pManaPer;
#ifndef HELLFIRE
if (filled > 80) if (filled > 80)
filled = 80; filled = 80;
#endif
filled = 80 - filled; filled = 80 - filled;
if (filled > 11) if (filled > 11)
filled = 11; filled = 11;
@ -2010,15 +1995,13 @@ void CheckSBook()
force_redraw = 255; force_redraw = 255;
} }
} }
if (MouseX >= RIGHT_PANEL + 7 && MouseX < RIGHT_PANEL + 311 && MouseY >= SPANEL_WIDTH && MouseY < 349) {
#ifdef HELLFIRE #ifdef HELLFIRE
if (MouseX >= RIGHT_PANEL + 7 && MouseX < RIGHT_PANEL + 312 && MouseY >= 320 && MouseY < 349) {
sbooktab = (MouseX - (RIGHT_PANEL + 7)) / 61; sbooktab = (MouseX - (RIGHT_PANEL + 7)) / 61;
}
#else #else
if (MouseX >= RIGHT_PANEL + 7 && MouseX < RIGHT_PANEL + 311 && MouseY >= SPANEL_WIDTH && MouseY < 349) { /// BUGFIX: change `< 313` to `< 311` (fixed)
sbooktab = (MouseX - (RIGHT_PANEL + 7)) / 76; sbooktab = (MouseX - (RIGHT_PANEL + 7)) / 76;
}
#endif #endif
}
} }
const char *get_pieces_str(int nGold) const char *get_pieces_str(int nGold)

26
Source/cursor.cpp

@ -19,9 +19,7 @@ int icursW28;
int icursH28; int icursH28;
/** Cursor images CEL */ /** Cursor images CEL */
BYTE *pCursCels; BYTE *pCursCels;
#ifdef HELLFIRE
BYTE *pCursCels2; BYTE *pCursCels2;
#endif
/** inv_item value */ /** inv_item value */
char pcursinvitem; char pcursinvitem;
@ -68,14 +66,12 @@ const int InvItemWidth[] = {
2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28,
2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28,
2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28,
#ifdef HELLFIRE
1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28,
1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28,
1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28,
2 * 28, 2 * 28, 1 * 28, 1 * 28, 1 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 1 * 28, 1 * 28, 1 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28,
2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28,
2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28
#endif
// clang-format on // clang-format on
}; };
@ -102,14 +98,12 @@ const int InvItemHeight[] = {
3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28,
3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28,
3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28,
#ifdef HELLFIRE
1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28,
1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28,
1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28, 1 * 28,
2 * 28, 2 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 2 * 28, 2 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28,
3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28,
3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28
#endif
// clang-format on // clang-format on
}; };
@ -126,9 +120,7 @@ void InitCursor()
void FreeCursor() void FreeCursor()
{ {
MemFreeDbg(pCursCels); MemFreeDbg(pCursCels);
#ifdef HELLFIRE
MemFreeDbg(pCursCels2); MemFreeDbg(pCursCels2);
#endif
ClearCursor(); ClearCursor();
} }
@ -427,15 +419,9 @@ void CheckCursMove()
cursmx = mx; cursmx = mx;
cursmy = my; cursmy = my;
} }
#ifdef HELLFIRE
if (pcursmonst != -1 && monster[pcursmonst]._mFlags & MFLAG_GOLEM && !(monster[pcursmonst]._mFlags & MFLAG_BERSERK)) { if (pcursmonst != -1 && monster[pcursmonst]._mFlags & MFLAG_GOLEM && !(monster[pcursmonst]._mFlags & MFLAG_BERSERK)) {
pcursmonst = -1; pcursmonst = -1;
} }
#else
if (pcursmonst != -1 && monster[pcursmonst]._mFlags & MFLAG_GOLEM) {
pcursmonst = -1;
}
#endif
if (pcursmonst != -1) { if (pcursmonst != -1) {
return; return;
} }
@ -501,15 +487,9 @@ void CheckCursMove()
cursmx = mx; cursmx = mx;
cursmy = my; cursmy = my;
} }
#ifdef HELLFIRE
if (pcursmonst != -1 && monster[pcursmonst]._mFlags & MFLAG_GOLEM && !(monster[pcursmonst]._mFlags & MFLAG_BERSERK)) { if (pcursmonst != -1 && monster[pcursmonst]._mFlags & MFLAG_GOLEM && !(monster[pcursmonst]._mFlags & MFLAG_BERSERK)) {
pcursmonst = -1; pcursmonst = -1;
} }
#else
if (pcursmonst != -1 && monster[pcursmonst]._mFlags & MFLAG_GOLEM) {
pcursmonst = -1;
}
#endif
} else { } else {
if (!flipflag && mx + 1 < MAXDUNX && dMonster[mx + 1][my] > 0) { if (!flipflag && mx + 1 < MAXDUNX && dMonster[mx + 1][my] > 0) {
pcursmonst = dMonster[mx + 1][my] - 1; pcursmonst = dMonster[mx + 1][my] - 1;
@ -677,15 +657,9 @@ void CheckCursMove()
cursmx = mx; cursmx = mx;
cursmy = my; cursmy = my;
} }
#ifdef HELLFIRE
if (pcursmonst != -1 && monster[pcursmonst]._mFlags & MFLAG_GOLEM && !(monster[pcursmonst]._mFlags & MFLAG_BERSERK)) { if (pcursmonst != -1 && monster[pcursmonst]._mFlags & MFLAG_GOLEM && !(monster[pcursmonst]._mFlags & MFLAG_BERSERK)) {
pcursmonst = -1; pcursmonst = -1;
} }
#else
if (pcursmonst != -1 && monster[pcursmonst]._mFlags & MFLAG_GOLEM) {
pcursmonst = -1;
}
#endif
} }
DEVILUTION_END_NAMESPACE DEVILUTION_END_NAMESPACE

2
Source/cursor.h

@ -18,9 +18,7 @@ extern int pcursmonst;
extern int icursW28; extern int icursW28;
extern int icursH28; extern int icursH28;
extern BYTE *pCursCels; extern BYTE *pCursCels;
#ifdef HELLFIRE
extern BYTE *pCursCels2; extern BYTE *pCursCels2;
#endif
extern int icursH; extern int icursH;
extern char pcursinvitem; extern char pcursinvitem;
extern int icursW; extern int icursW;

30
Source/diablo.cpp

@ -48,14 +48,12 @@ int setseed;
int debugmonsttypes; int debugmonsttypes;
int PauseMode; int PauseMode;
bool forceSpawn; bool forceSpawn;
#ifdef HELLFIRE
BOOLEAN UseTheoQuest; BOOLEAN UseTheoQuest;
BOOLEAN UseCowFarmer; BOOLEAN UseCowFarmer;
BOOLEAN UseNestArt; BOOLEAN UseNestArt;
BOOLEAN UseBardTest; BOOLEAN UseBardTest;
BOOLEAN UseBarbarianTest; BOOLEAN UseBarbarianTest;
BOOLEAN UseMultiTest; BOOLEAN UseMultiTest;
#endif
int sgnTimeoutCurs; int sgnTimeoutCurs;
char sgbMouseDown; char sgbMouseDown;
int color_cycle_timer; int color_cycle_timer;
@ -619,7 +617,6 @@ BOOL TryIconCurs()
return TRUE; return TRUE;
} }
#ifdef HELLFIRE
if (pcurs == CURSOR_OIL) { if (pcurs == CURSOR_OIL) {
if (pcursinvitem != -1) if (pcursinvitem != -1)
DoOil(myplr, pcursinvitem); DoOil(myplr, pcursinvitem);
@ -628,7 +625,6 @@ BOOL TryIconCurs()
return TRUE; return TRUE;
} }
#endif
if (pcurs == CURSOR_TELEPORT) { if (pcurs == CURSOR_TELEPORT) {
if (pcursmonst != -1) if (pcursmonst != -1)
NetSendCmdParam3(TRUE, CMD_TSPELLID, pcursmonst, plr[myplr]._pTSpell, GetSpellLevel(myplr, plr[myplr]._pTSpell)); NetSendCmdParam3(TRUE, CMD_TSPELLID, pcursmonst, plr[myplr]._pTSpell, GetSpellLevel(myplr, plr[myplr]._pTSpell));
@ -741,14 +737,10 @@ static void RightMouseDown()
} else if (stextflag == STORE_NONE) { } else if (stextflag == STORE_NONE) {
if (spselflag) { if (spselflag) {
SetSpell(); SetSpell();
#ifdef HELLFIRE
} else if ((!sbookflag || MouseX <= RIGHT_PANEL) && (MouseY >= SPANEL_HEIGHT || (!TryIconCurs() && (pcursinvitem == -1 || !UseInvItem(myplr, pcursinvitem))))) {
#else
} else if (MouseY >= SPANEL_HEIGHT } else if (MouseY >= SPANEL_HEIGHT
|| (!sbookflag || MouseX <= RIGHT_PANEL) || (!sbookflag || MouseX <= RIGHT_PANEL)
&& !TryIconCurs() && !TryIconCurs()
&& (pcursinvitem == -1 || !UseInvItem(myplr, pcursinvitem))) { && (pcursinvitem == -1 || !UseInvItem(myplr, pcursinvitem))) {
#endif
if (pcurs == CURSOR_HAND) { if (pcurs == CURSOR_HAND) {
if (pcursinvitem == -1 || !UseInvItem(myplr, pcursinvitem)) if (pcursinvitem == -1 || !UseInvItem(myplr, pcursinvitem))
CheckPlrSpell(); CheckPlrSpell();
@ -1481,21 +1473,17 @@ void LoadLvlGFX()
pSpecialCels = LoadFileInMem("Levels\\TownData\\TownS.CEL", NULL); pSpecialCels = LoadFileInMem("Levels\\TownData\\TownS.CEL", NULL);
break; break;
case DTYPE_CATHEDRAL: case DTYPE_CATHEDRAL:
#ifdef HELLFIRE
if (currlevel < 21) { if (currlevel < 21) {
#endif
pDungeonCels = LoadFileInMem("Levels\\L1Data\\L1.CEL", NULL); pDungeonCels = LoadFileInMem("Levels\\L1Data\\L1.CEL", NULL);
pMegaTiles = LoadFileInMem("Levels\\L1Data\\L1.TIL", NULL); pMegaTiles = LoadFileInMem("Levels\\L1Data\\L1.TIL", NULL);
pLevelPieces = LoadFileInMem("Levels\\L1Data\\L1.MIN", NULL); pLevelPieces = LoadFileInMem("Levels\\L1Data\\L1.MIN", NULL);
pSpecialCels = LoadFileInMem("Levels\\L1Data\\L1S.CEL", NULL); pSpecialCels = LoadFileInMem("Levels\\L1Data\\L1S.CEL", NULL);
#ifdef HELLFIRE
} else { } else {
pDungeonCels = LoadFileInMem("NLevels\\L5Data\\L5.CEL", NULL); pDungeonCels = LoadFileInMem("NLevels\\L5Data\\L5.CEL", NULL);
pMegaTiles = LoadFileInMem("NLevels\\L5Data\\L5.TIL", NULL); pMegaTiles = LoadFileInMem("NLevels\\L5Data\\L5.TIL", NULL);
pLevelPieces = LoadFileInMem("NLevels\\L5Data\\L5.MIN", NULL); pLevelPieces = LoadFileInMem("NLevels\\L5Data\\L5.MIN", NULL);
pSpecialCels = LoadFileInMem("NLevels\\L5Data\\L5S.CEL", NULL); pSpecialCels = LoadFileInMem("NLevels\\L5Data\\L5S.CEL", NULL);
} }
#endif
break; break;
case DTYPE_CATACOMBS: case DTYPE_CATACOMBS:
pDungeonCels = LoadFileInMem("Levels\\L2Data\\L2.CEL", NULL); pDungeonCels = LoadFileInMem("Levels\\L2Data\\L2.CEL", NULL);
@ -1504,19 +1492,15 @@ void LoadLvlGFX()
pSpecialCels = LoadFileInMem("Levels\\L2Data\\L2S.CEL", NULL); pSpecialCels = LoadFileInMem("Levels\\L2Data\\L2S.CEL", NULL);
break; break;
case DTYPE_CAVES: case DTYPE_CAVES:
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
pDungeonCels = LoadFileInMem("Levels\\L3Data\\L3.CEL", NULL); pDungeonCels = LoadFileInMem("Levels\\L3Data\\L3.CEL", NULL);
pMegaTiles = LoadFileInMem("Levels\\L3Data\\L3.TIL", NULL); pMegaTiles = LoadFileInMem("Levels\\L3Data\\L3.TIL", NULL);
pLevelPieces = LoadFileInMem("Levels\\L3Data\\L3.MIN", NULL); pLevelPieces = LoadFileInMem("Levels\\L3Data\\L3.MIN", NULL);
#ifdef HELLFIRE
} else { } else {
pDungeonCels = LoadFileInMem("NLevels\\L6Data\\L6.CEL", NULL); pDungeonCels = LoadFileInMem("NLevels\\L6Data\\L6.CEL", NULL);
pMegaTiles = LoadFileInMem("NLevels\\L6Data\\L6.TIL", NULL); pMegaTiles = LoadFileInMem("NLevels\\L6Data\\L6.TIL", NULL);
pLevelPieces = LoadFileInMem("NLevels\\L6Data\\L6.MIN", NULL); pLevelPieces = LoadFileInMem("NLevels\\L6Data\\L6.MIN", NULL);
} }
#endif
pSpecialCels = LoadFileInMem("Levels\\L1Data\\L1S.CEL", NULL); pSpecialCels = LoadFileInMem("Levels\\L1Data\\L1S.CEL", NULL);
break; break;
case DTYPE_HELL: case DTYPE_HELL:
@ -1556,15 +1540,11 @@ void CreateLevel(int lvldir)
CreateL5Dungeon(glSeedTbl[currlevel], lvldir); CreateL5Dungeon(glSeedTbl[currlevel], lvldir);
InitL1Triggers(); InitL1Triggers();
Freeupstairs(); Freeupstairs();
#ifdef HELLFIRE
if (currlevel < 21) { if (currlevel < 21) {
LoadRndLvlPal(1); LoadRndLvlPal(1);
} else { } else {
LoadRndLvlPal(5); LoadRndLvlPal(5);
} }
#else
LoadRndLvlPal(1);
#endif
break; break;
case DTYPE_CATACOMBS: case DTYPE_CATACOMBS:
CreateL2Dungeon(glSeedTbl[currlevel], lvldir); CreateL2Dungeon(glSeedTbl[currlevel], lvldir);
@ -1576,15 +1556,11 @@ void CreateLevel(int lvldir)
CreateL3Dungeon(glSeedTbl[currlevel], lvldir); CreateL3Dungeon(glSeedTbl[currlevel], lvldir);
InitL3Triggers(); InitL3Triggers();
Freeupstairs(); Freeupstairs();
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
LoadRndLvlPal(3); LoadRndLvlPal(3);
} else { } else {
LoadRndLvlPal(6); LoadRndLvlPal(6);
} }
#else
LoadRndLvlPal(3);
#endif
break; break;
case DTYPE_HELL: case DTYPE_HELL:
CreateL4Dungeon(glSeedTbl[currlevel], lvldir); CreateL4Dungeon(glSeedTbl[currlevel], lvldir);
@ -1699,9 +1675,7 @@ void LoadGameLevel(BOOL firstflag, int lvldir)
IncProgress(); IncProgress();
InitObjects(); InitObjects();
InitItems(); InitItems();
#ifdef HELLFIRE
if (currlevel < 17) if (currlevel < 17)
#endif
CreateThemeRooms(); CreateThemeRooms();
IncProgress(); IncProgress();
glMid3Seed[currlevel] = GetRndSeed(); glMid3Seed[currlevel] = GetRndSeed();
@ -1815,7 +1789,6 @@ void LoadGameLevel(BOOL firstflag, int lvldir)
ProcessVisionList(); ProcessVisionList();
} }
#ifdef HELLFIRE
if (currlevel >= 21) { if (currlevel >= 21) {
if (currlevel == 21) { if (currlevel == 21) {
items_427ABA(CornerStone.x, CornerStone.y); items_427ABA(CornerStone.x, CornerStone.y);
@ -1824,7 +1797,6 @@ void LoadGameLevel(BOOL firstflag, int lvldir)
objects_454BA8(); objects_454BA8();
} }
} }
#endif
#ifdef HELLFIRE #ifdef HELLFIRE
if (currlevel >= 17) if (currlevel >= 17)
@ -1929,12 +1901,10 @@ void diablo_color_cyc_logic()
if (leveltype == DTYPE_HELL) { if (leveltype == DTYPE_HELL) {
lighting_color_cycling(); lighting_color_cycling();
#ifdef HELLFIRE
} else if (currlevel >= 21) { } else if (currlevel >= 21) {
palette_update_crypt(); palette_update_crypt();
} else if (currlevel >= 17) { } else if (currlevel >= 17) {
palette_update_hive(); palette_update_hive();
#endif
} else if (leveltype == DTYPE_CAVES) { } else if (leveltype == DTYPE_CAVES) {
palette_update_caves(); palette_update_caves();
} }

2
Source/diablo.h

@ -37,14 +37,12 @@ extern BOOL monstdebug;
/** unused */ /** unused */
extern int debugmonsttypes; extern int debugmonsttypes;
extern int PauseMode; extern int PauseMode;
#ifdef HELLFIRE
extern BOOLEAN UseTheoQuest; extern BOOLEAN UseTheoQuest;
extern BOOLEAN UseCowFarmer; extern BOOLEAN UseCowFarmer;
extern BOOLEAN UseNestArt; extern BOOLEAN UseNestArt;
extern BOOLEAN UseBardTest; extern BOOLEAN UseBardTest;
extern BOOLEAN UseBarbarianTest; extern BOOLEAN UseBarbarianTest;
extern BOOLEAN UseMultiTest; extern BOOLEAN UseMultiTest;
#endif
extern char sgbMouseDown; extern char sgbMouseDown;
extern int ticks_per_sec; extern int ticks_per_sec;
extern WORD tick_delay; extern WORD tick_delay;

34
Source/doom.cpp

@ -44,38 +44,21 @@ int doom_get_frame_from_time()
void doom_cleanup() void doom_cleanup()
{ {
#ifdef HELLFIRE
if (pDoomCel != NULL) { if (pDoomCel != NULL) {
MemFreeDbg(pDoomCel); MemFreeDbg(pDoomCel);
pDoomCel = NULL; pDoomCel = NULL;
} }
#else
MemFreeDbg(pDoomCel);
#endif
} }
#ifdef HELLFIRE
static BOOLEAN doom_alloc_cel() static BOOLEAN doom_alloc_cel()
#else
static void doom_alloc_cel()
#endif
{ {
#ifdef HELLFIRE
doom_cleanup(); doom_cleanup();
pDoomCel = DiabloAllocPtr(0x39000); pDoomCel = DiabloAllocPtr(0x39000);
return pDoomCel ? TRUE : FALSE; return pDoomCel ? TRUE : FALSE;
#else
pDoomCel = DiabloAllocPtr(0x38000);
#endif
} }
#ifdef HELLFIRE
static BOOLEAN doom_load_graphics() static BOOLEAN doom_load_graphics()
#else
static void doom_load_graphics()
#endif
{ {
#ifdef HELLFIRE
BOOLEAN ret; BOOLEAN ret;
ret = FALSE; ret = FALSE;
@ -83,21 +66,10 @@ static void doom_load_graphics()
if (LoadFileWithMem(tempstr, pDoomCel)) if (LoadFileWithMem(tempstr, pDoomCel))
ret = TRUE; ret = TRUE;
return ret; return ret;
#else
if (doom_quest_time == 31) {
strcpy(tempstr, "Items\\Map\\MapZDoom.CEL");
} else if (doom_quest_time < 10) {
sprintf(tempstr, "Items\\Map\\MapZ000%i.CEL", doom_quest_time);
} else {
sprintf(tempstr, "Items\\Map\\MapZ00%i.CEL", doom_quest_time);
}
LoadFileWithMem(tempstr, pDoomCel);
#endif
} }
void doom_init() void doom_init()
{ {
#ifdef HELLFIRE
if (doom_alloc_cel()) { if (doom_alloc_cel()) {
doom_quest_time = doom_get_frame_from_time() == 31 ? 31 : 0; doom_quest_time = doom_get_frame_from_time() == 31 ? 31 : 0;
if (doom_load_graphics()) { if (doom_load_graphics()) {
@ -106,12 +78,6 @@ void doom_init()
doom_close(); doom_close();
} }
} }
#else
doomflag = TRUE;
doom_alloc_cel();
doom_quest_time = doom_get_frame_from_time() == 31 ? 31 : 0;
doom_load_graphics();
#endif
} }
void doom_close() void doom_close()

2
Source/drlg_l1.h

@ -24,7 +24,6 @@ void DRLG_Init_Globals();
void LoadL1Dungeon(const char *sFileName, int vx, int vy); void LoadL1Dungeon(const char *sFileName, int vx, int vy);
void LoadPreL1Dungeon(const char *sFileName, int vx, int vy); void LoadPreL1Dungeon(const char *sFileName, int vx, int vy);
void CreateL5Dungeon(DWORD rseed, int entry); void CreateL5Dungeon(DWORD rseed, int entry);
#ifdef HELLFIRE
void drlg_l1_set_crypt_room(int rx1, int ry1); void drlg_l1_set_crypt_room(int rx1, int ry1);
void drlg_l1_set_corner_room(int rx1, int ry1); void drlg_l1_set_corner_room(int rx1, int ry1);
void drlg_l1_crypt_pattern1(int rndper); void drlg_l1_crypt_pattern1(int rndper);
@ -34,7 +33,6 @@ void drlg_l1_crypt_pattern4(int rndper);
void drlg_l1_crypt_pattern5(int rndper); void drlg_l1_crypt_pattern5(int rndper);
void drlg_l1_crypt_pattern6(int rndper); void drlg_l1_crypt_pattern6(int rndper);
void drlg_l1_crypt_pattern7(int rndper); void drlg_l1_crypt_pattern7(int rndper);
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

60
Source/drlg_l3.cpp

@ -36,7 +36,6 @@ const BYTE L3UP[] = {
0, 0, 0, 0, 0, 0,
// clang-format on // clang-format on
}; };
#ifdef HELLFIRE
const BYTE L6UP[] = { const BYTE L6UP[] = {
// clang-format off // clang-format off
3, 3, // width, height 3, 3, // width, height
@ -50,7 +49,6 @@ const BYTE L6UP[] = {
0, 0, 0, 0, 0, 0,
// clang-format on // clang-format on
}; };
#endif
/** Miniset: Stairs down. */ /** Miniset: Stairs down. */
const BYTE L3DOWN[] = { const BYTE L3DOWN[] = {
// clang-format off // clang-format off
@ -65,7 +63,6 @@ const BYTE L3DOWN[] = {
0, 0, 0, 0, 0, 0,
// clang-format on // clang-format on
}; };
#ifdef HELLFIRE
const BYTE L6DOWN[] = { const BYTE L6DOWN[] = {
// clang-format off // clang-format off
3, 3, // width, height 3, 3, // width, height
@ -79,7 +76,6 @@ const BYTE L6DOWN[] = {
0, 0, 0, 0, 0, 0,
// clang-format on // clang-format on
}; };
#endif
/** Miniset: Stairs up to town. */ /** Miniset: Stairs up to town. */
const BYTE L3HOLDWARP[] = { const BYTE L3HOLDWARP[] = {
// clang-format off // clang-format off
@ -94,7 +90,6 @@ const BYTE L3HOLDWARP[] = {
0, 0, 0, 0, 0, 0,
// clang-format on // clang-format on
}; };
#ifdef HELLFIRE
const BYTE L6HOLDWARP[] = { const BYTE L6HOLDWARP[] = {
// clang-format off // clang-format off
3, 3, // width, height 3, 3, // width, height
@ -108,7 +103,6 @@ const BYTE L6HOLDWARP[] = {
0, 0, 0, 0, 0, 0,
// clang-format on // clang-format on
}; };
#endif
/** Miniset: Stalagmite white stalactite 1. */ /** Miniset: Stalagmite white stalactite 1. */
const BYTE L3TITE1[] = { const BYTE L3TITE1[] = {
// clang-format off // clang-format off
@ -534,7 +528,6 @@ const BYTE L3ANVIL[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// clang-format on // clang-format on
}; };
#ifdef HELLFIRE
const BYTE byte_48A76C[] = { 1, 1, 8, 25 }; const BYTE byte_48A76C[] = { 1, 1, 8, 25 };
const BYTE byte_48A770[] = { 1, 1, 8, 26 }; const BYTE byte_48A770[] = { 1, 1, 8, 26 };
const BYTE byte_48A774[] = { 1, 1, 8, 27 }; const BYTE byte_48A774[] = { 1, 1, 8, 27 };
@ -840,7 +833,6 @@ const BYTE byte_48A9C8[] = {
7, 7, 7, 7, 7, 7, 7, 7,
// clang-format on // clang-format on
}; };
#endif
static void InitL3Dungeon() static void InitL3Dungeon()
{ {
@ -1749,7 +1741,6 @@ static void DRLG_L3PlaceRndSet(const BYTE *miniset, int rndper)
} }
} }
#ifdef HELLFIRE
BOOLEAN drlg_l3_hive_rnd_piece(const BYTE *miniset, int rndper) BOOLEAN drlg_l3_hive_rnd_piece(const BYTE *miniset, int rndper)
{ {
int sx, sy, sw, sh, xx, yy, ii, kk; int sx, sy, sw, sh, xx, yy, ii, kk;
@ -1808,7 +1799,6 @@ BOOLEAN drlg_l3_hive_rnd_piece(const BYTE *miniset, int rndper)
return placed; return placed;
} }
#endif
static BOOL WoodVertU(int i, int y) static BOOL WoodVertU(int i, int y)
{ {
@ -2359,54 +2349,39 @@ static void DRLG_L3(int entry)
} while (!found); } while (!found);
DRLG_L3MakeMegas(); DRLG_L3MakeMegas();
if (entry == ENTRY_MAIN) { if (entry == ENTRY_MAIN) {
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
genok = DRLG_L3PlaceMiniSet(L3UP, 1, 1, -1, -1, TRUE, 0); genok = DRLG_L3PlaceMiniSet(L3UP, 1, 1, -1, -1, TRUE, 0);
#ifdef HELLFIRE
} else { } else {
if (currlevel != 17) if (currlevel != 17)
genok = DRLG_L3PlaceMiniSet(L6UP, 1, 1, -1, -1, TRUE, 0); genok = DRLG_L3PlaceMiniSet(L6UP, 1, 1, -1, -1, TRUE, 0);
else else
genok = DRLG_L3PlaceMiniSet(L6HOLDWARP, 1, 1, -1, -1, TRUE, 6); genok = DRLG_L3PlaceMiniSet(L6HOLDWARP, 1, 1, -1, -1, TRUE, 6);
} }
#endif
if (!genok) { if (!genok) {
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, FALSE, 1); genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, FALSE, 1);
#ifdef HELLFIRE
} else { } else {
if (currlevel != 20) if (currlevel != 20)
genok = DRLG_L3PlaceMiniSet(L6DOWN, 1, 1, -1, -1, FALSE, 1); genok = DRLG_L3PlaceMiniSet(L6DOWN, 1, 1, -1, -1, FALSE, 1);
} }
#endif
if (!genok && currlevel == 9) { if (!genok && currlevel == 9) {
genok = DRLG_L3PlaceMiniSet(L3HOLDWARP, 1, 1, -1, -1, FALSE, 6); genok = DRLG_L3PlaceMiniSet(L3HOLDWARP, 1, 1, -1, -1, FALSE, 6);
} }
} }
} else if (entry == ENTRY_PREV) { } else if (entry == ENTRY_PREV) {
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
genok = DRLG_L3PlaceMiniSet(L3UP, 1, 1, -1, -1, FALSE, 0); genok = DRLG_L3PlaceMiniSet(L3UP, 1, 1, -1, -1, FALSE, 0);
#ifdef HELLFIRE
} else { } else {
if (currlevel != 17) if (currlevel != 17)
genok = DRLG_L3PlaceMiniSet(L6UP, 1, 1, -1, -1, FALSE, 0); genok = DRLG_L3PlaceMiniSet(L6UP, 1, 1, -1, -1, FALSE, 0);
else else
genok = DRLG_L3PlaceMiniSet(L6HOLDWARP, 1, 1, -1, -1, FALSE, 6); genok = DRLG_L3PlaceMiniSet(L6HOLDWARP, 1, 1, -1, -1, FALSE, 6);
} }
#endif
if (!genok) { if (!genok) {
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, TRUE, 1); genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, TRUE, 1);
ViewX += 2; ViewX += 2;
ViewY -= 2; ViewY -= 2;
#ifdef HELLFIRE
} else { } else {
if (currlevel != 20) { if (currlevel != 20) {
genok = DRLG_L3PlaceMiniSet(L6DOWN, 1, 1, -1, -1, TRUE, 1); genok = DRLG_L3PlaceMiniSet(L6DOWN, 1, 1, -1, -1, TRUE, 1);
@ -2414,35 +2389,26 @@ static void DRLG_L3(int entry)
ViewY -= 2; ViewY -= 2;
} }
} }
#endif
if (!genok && currlevel == 9) { if (!genok && currlevel == 9) {
genok = DRLG_L3PlaceMiniSet(L3HOLDWARP, 1, 1, -1, -1, FALSE, 6); genok = DRLG_L3PlaceMiniSet(L3HOLDWARP, 1, 1, -1, -1, FALSE, 6);
} }
} }
} else { } else {
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
genok = DRLG_L3PlaceMiniSet(L3UP, 1, 1, -1, -1, FALSE, 0); genok = DRLG_L3PlaceMiniSet(L3UP, 1, 1, -1, -1, FALSE, 0);
#ifdef HELLFIRE
} else { } else {
if (currlevel != 17) if (currlevel != 17)
genok = DRLG_L3PlaceMiniSet(L6UP, 1, 1, -1, -1, FALSE, 0); genok = DRLG_L3PlaceMiniSet(L6UP, 1, 1, -1, -1, FALSE, 0);
else else
genok = DRLG_L3PlaceMiniSet(L6HOLDWARP, 1, 1, -1, -1, TRUE, 6); genok = DRLG_L3PlaceMiniSet(L6HOLDWARP, 1, 1, -1, -1, TRUE, 6);
} }
#endif
if (!genok) { if (!genok) {
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, FALSE, 1); genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, FALSE, 1);
#ifdef HELLFIRE
} else { } else {
if (currlevel != 20) if (currlevel != 20)
genok = DRLG_L3PlaceMiniSet(L6DOWN, 1, 1, -1, -1, FALSE, 1); genok = DRLG_L3PlaceMiniSet(L6DOWN, 1, 1, -1, -1, FALSE, 1);
} }
#endif
if (!genok && currlevel == 9) { if (!genok && currlevel == 9) {
genok = DRLG_L3PlaceMiniSet(L3HOLDWARP, 1, 1, -1, -1, TRUE, 6); genok = DRLG_L3PlaceMiniSet(L3HOLDWARP, 1, 1, -1, -1, TRUE, 6);
} }
@ -2452,11 +2418,8 @@ static void DRLG_L3(int entry)
genok = DRLG_L3Anvil(); genok = DRLG_L3Anvil();
} }
} while (genok == TRUE); } while (genok == TRUE);
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
DRLG_L3Pool(); DRLG_L3Pool();
#ifdef HELLFIRE
} else { } else {
lavapool += drlg_l3_hive_rnd_piece(byte_48A998, 30); lavapool += drlg_l3_hive_rnd_piece(byte_48A998, 30);
lavapool += drlg_l3_hive_rnd_piece(byte_48A9C8, 40); lavapool += drlg_l3_hive_rnd_piece(byte_48A9C8, 40);
@ -2465,21 +2428,14 @@ static void DRLG_L3(int entry)
if (lavapool < 3) if (lavapool < 3)
lavapool = FALSE; lavapool = FALSE;
} }
#endif
} while (!lavapool); } while (!lavapool);
#ifdef HELLFIRE
if (currlevel < 17) if (currlevel < 17)
#endif
DRLG_L3PoolFix(); DRLG_L3PoolFix();
#ifdef HELLFIRE
if (currlevel < 17) if (currlevel < 17)
#endif
FixL3Warp(); FixL3Warp();
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
DRLG_L3PlaceRndSet(L3ISLE1, 70); DRLG_L3PlaceRndSet(L3ISLE1, 70);
DRLG_L3PlaceRndSet(L3ISLE2, 70); DRLG_L3PlaceRndSet(L3ISLE2, 70);
DRLG_L3PlaceRndSet(L3ISLE3, 30); DRLG_L3PlaceRndSet(L3ISLE3, 30);
@ -2487,7 +2443,6 @@ static void DRLG_L3(int entry)
DRLG_L3PlaceRndSet(L3ISLE1, 100); DRLG_L3PlaceRndSet(L3ISLE1, 100);
DRLG_L3PlaceRndSet(L3ISLE2, 100); DRLG_L3PlaceRndSet(L3ISLE2, 100);
DRLG_L3PlaceRndSet(L3ISLE5, 90); DRLG_L3PlaceRndSet(L3ISLE5, 90);
#ifdef HELLFIRE
} else { } else {
DRLG_L3PlaceRndSet(L6ISLE1, 70); DRLG_L3PlaceRndSet(L6ISLE1, 70);
DRLG_L3PlaceRndSet(L6ISLE2, 70); DRLG_L3PlaceRndSet(L6ISLE2, 70);
@ -2497,15 +2452,10 @@ static void DRLG_L3(int entry)
DRLG_L3PlaceRndSet(L6ISLE2, 100); DRLG_L3PlaceRndSet(L6ISLE2, 100);
DRLG_L3PlaceRndSet(L6ISLE5, 90); DRLG_L3PlaceRndSet(L6ISLE5, 90);
} }
#endif
#ifdef HELLFIRE
if (currlevel < 17) if (currlevel < 17)
#endif
FixL3HallofHeroes(); FixL3HallofHeroes();
#ifdef HELLFIRE
if (currlevel < 17) if (currlevel < 17)
#endif
DRLG_L3River(); DRLG_L3River();
if (QuestStatus(Q_ANVIL)) { if (QuestStatus(Q_ANVIL)) {
@ -2517,14 +2467,10 @@ static void DRLG_L3(int entry)
} }
} }
#ifdef HELLFIRE
if (currlevel < 17) if (currlevel < 17)
#endif
DRLG_PlaceThemeRooms(5, 10, 7, 0, 0); DRLG_PlaceThemeRooms(5, 10, 7, 0, 0);
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
DRLG_L3Wood(); DRLG_L3Wood();
DRLG_L3PlaceRndSet(L3TITE1, 10); DRLG_L3PlaceRndSet(L3TITE1, 10);
DRLG_L3PlaceRndSet(L3TITE2, 10); DRLG_L3PlaceRndSet(L3TITE2, 10);
@ -2553,7 +2499,6 @@ static void DRLG_L3(int entry)
DRLG_L3PlaceRndSet(L3XTRA3, 25); DRLG_L3PlaceRndSet(L3XTRA3, 25);
DRLG_L3PlaceRndSet(L3XTRA4, 25); DRLG_L3PlaceRndSet(L3XTRA4, 25);
DRLG_L3PlaceRndSet(L3XTRA5, 25); DRLG_L3PlaceRndSet(L3XTRA5, 25);
#ifdef HELLFIRE
} else { } else {
DRLG_L3PlaceRndSet(byte_48A76C, 20); DRLG_L3PlaceRndSet(byte_48A76C, 20);
DRLG_L3PlaceRndSet(byte_48A770, 20); DRLG_L3PlaceRndSet(byte_48A770, 20);
@ -2604,7 +2549,6 @@ static void DRLG_L3(int entry)
DRLG_L3PlaceRndSet(byte_48A7FC, 25); DRLG_L3PlaceRndSet(byte_48A7FC, 25);
DRLG_L3PlaceRndSet(byte_48A800, 25); DRLG_L3PlaceRndSet(byte_48A800, 25);
} }
#endif
for (j = 0; j < DMAXY; j++) { for (j = 0; j < DMAXY; j++) {
for (i = 0; i < DMAXX; i++) { for (i = 0; i < DMAXX; i++) {
@ -2679,9 +2623,7 @@ void CreateL3Dungeon(DWORD rseed, int entry)
DRLG_L3(entry); DRLG_L3(entry);
DRLG_L3Pass3(); DRLG_L3Pass3();
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
for (j = 0; j < MAXDUNY; j++) { for (j = 0; j < MAXDUNY; j++) {
for (i = 0; i < MAXDUNX; i++) { for (i = 0; i < MAXDUNX; i++) {
if (dPiece[i][j] >= 56 && dPiece[i][j] <= 147) { if (dPiece[i][j] >= 56 && dPiece[i][j] <= 147) {
@ -2695,7 +2637,6 @@ void CreateL3Dungeon(DWORD rseed, int entry)
} }
} }
} }
#ifdef HELLFIRE
} else { } else {
for (j = 0; j < MAXDUNY; j++) { for (j = 0; j < MAXDUNY; j++) {
for (i = 0; i < MAXDUNX; i++) { for (i = 0; i < MAXDUNX; i++) {
@ -2705,7 +2646,6 @@ void CreateL3Dungeon(DWORD rseed, int entry)
} }
} }
} }
#endif
DRLG_SetPC(); DRLG_SetPC();
} }

2
Source/error.cpp

@ -58,7 +58,6 @@ const char *const MsgStrings[] = {
"You must be at least level 13 to use this.", "You must be at least level 13 to use this.",
"You must be at least level 17 to use this.", "You must be at least level 17 to use this.",
"Arcane knowledge gained!", "Arcane knowledge gained!",
#ifdef HELLFIRE
"That which does not kill you...", "That which does not kill you...",
"Knowledge is power.", "Knowledge is power.",
"Give and you shall receive.", "Give and you shall receive.",
@ -70,7 +69,6 @@ const char *const MsgStrings[] = {
"You feel wiser.", "You feel wiser.",
"You feel refreshed.", "You feel refreshed.",
"That which can break will.", "That which can break will.",
#endif
}; };
void InitDiabloMsg(char e) void InitDiabloMsg(char e)

8
Source/gamemenu.cpp

@ -9,9 +9,7 @@
DEVILUTION_BEGIN_NAMESPACE DEVILUTION_BEGIN_NAMESPACE
#ifdef HELLFIRE
BOOL jogging_opt = TRUE; BOOL jogging_opt = TRUE;
#endif
/** Contains the game menu items of the single player menu. */ /** Contains the game menu items of the single player menu. */
TMenuItem sgSingleMenu[] = { TMenuItem sgSingleMenu[] = {
@ -70,13 +68,11 @@ const char *const sound_toggle_names[] = {
"Sound", "Sound",
"Sound Disabled", "Sound Disabled",
}; };
#ifdef HELLFIRE
char *jogging_toggle_names[] = { char *jogging_toggle_names[] = {
"Jog", "Jog",
"Walk", "Walk",
}; };
char *jogging_title = "Fast Walk"; char *jogging_title = "Fast Walk";
#endif
/** Specifies the menu names for colour cycling disabled and enabled. */ /** Specifies the menu names for colour cycling disabled and enabled. */
const char *const color_cycling_toggle_names[] = { "Color Cycling Off", "Color Cycling On" }; const char *const color_cycling_toggle_names[] = { "Color Cycling Off", "Color Cycling On" };
@ -238,14 +234,12 @@ static void gamemenu_get_sound()
gamemenu_sound_music_toggle(sound_toggle_names, &sgOptionsMenu[1], sound_get_or_set_sound_volume(1)); gamemenu_sound_music_toggle(sound_toggle_names, &sgOptionsMenu[1], sound_get_or_set_sound_volume(1));
} }
#ifdef HELLFIRE
static void gamemenu_jogging() static void gamemenu_jogging()
{ {
gmenu_slider_steps(&sgOptionsMenu[3], 2); gmenu_slider_steps(&sgOptionsMenu[3], 2);
gmenu_slider_set(&sgOptionsMenu[3], 0, 1, jogging_opt); gmenu_slider_set(&sgOptionsMenu[3], 0, 1, jogging_opt);
sgOptionsMenu[3].pszStr = jogging_toggle_names[!jogging_opt ? 1 : 0]; sgOptionsMenu[3].pszStr = jogging_toggle_names[!jogging_opt ? 1 : 0];
} }
#endif
static void gamemenu_get_gamma() static void gamemenu_get_gamma()
{ {
@ -382,7 +376,6 @@ void gamemenu_sound_volume(BOOL bActivate)
gamemenu_get_sound(); gamemenu_get_sound();
} }
#ifdef HELLFIRE
void gamemenu_loadjog(BOOL bActivate) void gamemenu_loadjog(BOOL bActivate)
{ {
if (gbMaxPlayers == 1) { if (gbMaxPlayers == 1) {
@ -392,7 +385,6 @@ void gamemenu_loadjog(BOOL bActivate)
gamemenu_jogging(); gamemenu_jogging();
} }
} }
#endif
void gamemenu_gamma(BOOL bActivate) void gamemenu_gamma(BOOL bActivate)
{ {

8
Source/gendung.cpp

@ -177,27 +177,19 @@ void FillSolidBlockTbls()
#endif #endif
break; break;
case DTYPE_CATHEDRAL: case DTYPE_CATHEDRAL:
#ifdef HELLFIRE
if (currlevel < 17) if (currlevel < 17)
pSBFile = LoadFileInMem("Levels\\L1Data\\L1.SOL", &dwTiles); pSBFile = LoadFileInMem("Levels\\L1Data\\L1.SOL", &dwTiles);
else else
pSBFile = LoadFileInMem("NLevels\\L5Data\\L5.SOL", &dwTiles); pSBFile = LoadFileInMem("NLevels\\L5Data\\L5.SOL", &dwTiles);
#else
pSBFile = LoadFileInMem("Levels\\L1Data\\L1.SOL", &dwTiles);
#endif
break; break;
case DTYPE_CATACOMBS: case DTYPE_CATACOMBS:
pSBFile = LoadFileInMem("Levels\\L2Data\\L2.SOL", &dwTiles); pSBFile = LoadFileInMem("Levels\\L2Data\\L2.SOL", &dwTiles);
break; break;
case DTYPE_CAVES: case DTYPE_CAVES:
#ifdef HELLFIRE
if (currlevel < 17) if (currlevel < 17)
pSBFile = LoadFileInMem("Levels\\L3Data\\L3.SOL", &dwTiles); pSBFile = LoadFileInMem("Levels\\L3Data\\L3.SOL", &dwTiles);
else else
pSBFile = LoadFileInMem("NLevels\\L6Data\\L6.SOL", &dwTiles); pSBFile = LoadFileInMem("NLevels\\L6Data\\L6.SOL", &dwTiles);
#else
pSBFile = LoadFileInMem("Levels\\L3Data\\L3.SOL", &dwTiles);
#endif
break; break;
case DTYPE_HELL: case DTYPE_HELL:
pSBFile = LoadFileInMem("Levels\\L4Data\\L4.SOL", &dwTiles); pSBFile = LoadFileInMem("Levels\\L4Data\\L4.SOL", &dwTiles);

2
Source/gmenu.cpp

@ -12,10 +12,8 @@ BOOLEAN mouseNavigation;
BYTE *PentSpin_cel; BYTE *PentSpin_cel;
TMenuItem *sgpCurrItem; TMenuItem *sgpCurrItem;
BYTE *BigTGold_cel; BYTE *BigTGold_cel;
#ifdef HELLFIRE
int LogoAnim_tick; int LogoAnim_tick;
BYTE LogoAnim_frame; BYTE LogoAnim_frame;
#endif
int PentSpin_tick; int PentSpin_tick;
void (*dword_63447C)(TMenuItem *); void (*dword_63447C)(TMenuItem *);
TMenuItem *sgpCurrentMenu; TMenuItem *sgpCurrentMenu;

4
Source/init.cpp

@ -27,7 +27,6 @@ HANDLE diabdat_mpq;
HANDLE patch_rt_mpq; HANDLE patch_rt_mpq;
/** Indicate if we only have access to demo data */ /** Indicate if we only have access to demo data */
bool gbIsSpawn; bool gbIsSpawn;
#ifdef HELLFIRE
HANDLE hfmonk_mpq; HANDLE hfmonk_mpq;
HANDLE hfbard_mpq; HANDLE hfbard_mpq;
HANDLE hfbarb_mpq; HANDLE hfbarb_mpq;
@ -35,7 +34,6 @@ HANDLE hfmusic_mpq;
HANDLE hfvoice_mpq; HANDLE hfvoice_mpq;
HANDLE hfopt1_mpq; HANDLE hfopt1_mpq;
HANDLE hfopt2_mpq; HANDLE hfopt2_mpq;
#endif
namespace { namespace {
@ -82,7 +80,6 @@ void init_cleanup()
SFileCloseArchive(hellfire_mpq); SFileCloseArchive(hellfire_mpq);
hellfire_mpq = NULL; hellfire_mpq = NULL;
} }
#ifdef HELLFIRE
if (hfmonk_mpq) { if (hfmonk_mpq) {
SFileCloseArchive(hfmonk_mpq); SFileCloseArchive(hfmonk_mpq);
hfmonk_mpq = NULL; hfmonk_mpq = NULL;
@ -111,7 +108,6 @@ void init_cleanup()
SFileCloseArchive(hfopt2_mpq); SFileCloseArchive(hfopt2_mpq);
hfopt2_mpq = NULL; hfopt2_mpq = NULL;
} }
#endif
NetClose(); NetClose();
} }

2
Source/init.h

@ -19,7 +19,6 @@ extern WNDPROC CurrentProc;
extern HANDLE diabdat_mpq; extern HANDLE diabdat_mpq;
extern bool gbIsSpawn; extern bool gbIsSpawn;
extern HANDLE patch_rt_mpq; extern HANDLE patch_rt_mpq;
#ifdef HELLFIRE
extern HANDLE hfmonk_mpq; extern HANDLE hfmonk_mpq;
extern HANDLE hfbard_mpq; extern HANDLE hfbard_mpq;
extern HANDLE hfbarb_mpq; extern HANDLE hfbarb_mpq;
@ -27,7 +26,6 @@ extern HANDLE hfmusic_mpq;
extern HANDLE hfvoice_mpq; extern HANDLE hfvoice_mpq;
extern HANDLE hfopt1_mpq; extern HANDLE hfopt1_mpq;
extern HANDLE hfopt2_mpq; extern HANDLE hfopt2_mpq;
#endif
void init_cleanup(); void init_cleanup();
void init_archives(); void init_archives();

22
Source/interfac.cpp

@ -34,19 +34,15 @@ static void InitCutscene(unsigned int uMsg)
progress_id = 1; progress_id = 1;
break; break;
case DTYPE_CATHEDRAL: case DTYPE_CATHEDRAL:
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
sgpBackCel = LoadFileInMem("Gendata\\Cutl1d.CEL", NULL); sgpBackCel = LoadFileInMem("Gendata\\Cutl1d.CEL", NULL);
LoadPalette("Gendata\\Cutl1d.pal"); LoadPalette("Gendata\\Cutl1d.pal");
progress_id = 0; progress_id = 0;
#ifdef HELLFIRE
} else { } else {
sgpBackCel = LoadFileInMem("Nlevels\\cutl5.CEL", NULL); sgpBackCel = LoadFileInMem("Nlevels\\cutl5.CEL", NULL);
LoadPalette("Nlevels\\cutl5.pal"); LoadPalette("Nlevels\\cutl5.pal");
progress_id = 1; progress_id = 1;
} }
#endif
break; break;
case DTYPE_CATACOMBS: case DTYPE_CATACOMBS:
sgpBackCel = LoadFileInMem("Gendata\\Cut2.CEL", NULL); sgpBackCel = LoadFileInMem("Gendata\\Cut2.CEL", NULL);
@ -54,19 +50,15 @@ static void InitCutscene(unsigned int uMsg)
progress_id = 2; progress_id = 2;
break; break;
case DTYPE_CAVES: case DTYPE_CAVES:
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
sgpBackCel = LoadFileInMem("Gendata\\Cut3.CEL", NULL); sgpBackCel = LoadFileInMem("Gendata\\Cut3.CEL", NULL);
LoadPalette("Gendata\\Cut3.pal"); LoadPalette("Gendata\\Cut3.pal");
progress_id = 1; progress_id = 1;
#ifdef HELLFIRE
} else { } else {
sgpBackCel = LoadFileInMem("Nlevels\\cutl6.CEL", NULL); sgpBackCel = LoadFileInMem("Nlevels\\cutl6.CEL", NULL);
LoadPalette("Nlevels\\cutl6.pal"); LoadPalette("Nlevels\\cutl6.pal");
progress_id = 1; progress_id = 1;
} }
#endif
break; break;
case DTYPE_HELL: case DTYPE_HELL:
if (currlevel < 15) { if (currlevel < 15) {
@ -99,19 +91,15 @@ static void InitCutscene(unsigned int uMsg)
progress_id = 1; progress_id = 1;
break; break;
case DTYPE_CATHEDRAL: case DTYPE_CATHEDRAL:
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
sgpBackCel = LoadFileInMem("Gendata\\Cutl1d.CEL", NULL); sgpBackCel = LoadFileInMem("Gendata\\Cutl1d.CEL", NULL);
LoadPalette("Gendata\\Cutl1d.pal"); LoadPalette("Gendata\\Cutl1d.pal");
progress_id = 0; progress_id = 0;
#ifdef HELLFIRE
} else { } else {
sgpBackCel = LoadFileInMem("Nlevels\\cutl5.CEL", NULL); sgpBackCel = LoadFileInMem("Nlevels\\cutl5.CEL", NULL);
LoadPalette("Nlevels\\cutl5.pal"); LoadPalette("Nlevels\\cutl5.pal");
progress_id = 1; progress_id = 1;
} }
#endif
break; break;
case DTYPE_CATACOMBS: case DTYPE_CATACOMBS:
sgpBackCel = LoadFileInMem("Gendata\\Cut2.CEL", NULL); sgpBackCel = LoadFileInMem("Gendata\\Cut2.CEL", NULL);
@ -119,19 +107,15 @@ static void InitCutscene(unsigned int uMsg)
progress_id = 2; progress_id = 2;
break; break;
case DTYPE_CAVES: case DTYPE_CAVES:
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
sgpBackCel = LoadFileInMem("Gendata\\Cut3.CEL", NULL); sgpBackCel = LoadFileInMem("Gendata\\Cut3.CEL", NULL);
LoadPalette("Gendata\\Cut3.pal"); LoadPalette("Gendata\\Cut3.pal");
progress_id = 1; progress_id = 1;
#ifdef HELLFIRE
} else { } else {
sgpBackCel = LoadFileInMem("Nlevels\\cutl6.CEL", NULL); sgpBackCel = LoadFileInMem("Nlevels\\cutl6.CEL", NULL);
LoadPalette("Nlevels\\cutl6.pal"); LoadPalette("Nlevels\\cutl6.pal");
progress_id = 1; progress_id = 1;
} }
#endif
break; break;
case DTYPE_HELL: case DTYPE_HELL:
sgpBackCel = LoadFileInMem("Gendata\\Cut4.CEL", NULL); sgpBackCel = LoadFileInMem("Gendata\\Cut4.CEL", NULL);
@ -199,7 +183,6 @@ static void InitCutscene(unsigned int uMsg)
LoadPalette("Gendata\\Cuttt.pal"); LoadPalette("Gendata\\Cuttt.pal");
progress_id = 1; progress_id = 1;
break; break;
#ifdef HELLFIRE
case DTYPE_CATHEDRAL: case DTYPE_CATHEDRAL:
if (plr[myplr].plrlevel < 17) { if (plr[myplr].plrlevel < 17) {
sgpBackCel = LoadFileInMem("Gendata\\Cutl1d.CEL", NULL); sgpBackCel = LoadFileInMem("Gendata\\Cutl1d.CEL", NULL);
@ -211,26 +194,21 @@ static void InitCutscene(unsigned int uMsg)
progress_id = 1; progress_id = 1;
} }
break; break;
#endif
case DTYPE_CATACOMBS: case DTYPE_CATACOMBS:
sgpBackCel = LoadFileInMem("Gendata\\Cut2.CEL", NULL); sgpBackCel = LoadFileInMem("Gendata\\Cut2.CEL", NULL);
LoadPalette("Gendata\\Cut2.pal"); LoadPalette("Gendata\\Cut2.pal");
progress_id = 2; progress_id = 2;
break; break;
case DTYPE_CAVES: case DTYPE_CAVES:
#ifdef HELLFIRE
if (plr[myplr].plrlevel < 17) { if (plr[myplr].plrlevel < 17) {
#endif
sgpBackCel = LoadFileInMem("Gendata\\Cut3.CEL", NULL); sgpBackCel = LoadFileInMem("Gendata\\Cut3.CEL", NULL);
LoadPalette("Gendata\\Cut3.pal"); LoadPalette("Gendata\\Cut3.pal");
progress_id = 1; progress_id = 1;
#ifdef HELLFIRE
} else { } else {
sgpBackCel = LoadFileInMem("Nlevels\\Cutl6.CEL", NULL); sgpBackCel = LoadFileInMem("Nlevels\\Cutl6.CEL", NULL);
LoadPalette("Nlevels\\Cutl6.pal"); LoadPalette("Nlevels\\Cutl6.pal");
progress_id = 1; progress_id = 1;
} }
#endif
break; break;
case DTYPE_HELL: case DTYPE_HELL:
sgpBackCel = LoadFileInMem("Gendata\\Cut4.CEL", NULL); sgpBackCel = LoadFileInMem("Gendata\\Cut4.CEL", NULL);

2
Source/inv.cpp

@ -1698,7 +1698,6 @@ void RemoveInvItem(int pnum, int iv)
CalcPlrScrolls(pnum); CalcPlrScrolls(pnum);
} }
#ifdef HELLFIRE
/** /**
* @brief This destroyes all items except gold * @brief This destroyes all items except gold
*/ */
@ -1739,7 +1738,6 @@ BOOL inv_diablo_to_hellfire(int pnum)
CalcPlrItemVals(pnum, FALSE); CalcPlrItemVals(pnum, FALSE);
return FALSE; return FALSE;
} }
#endif
void RemoveSpdBarItem(int pnum, int iv) void RemoveSpdBarItem(int pnum, int iv)
{ {

2
Source/inv.h

@ -27,9 +27,7 @@ int SwapItem(ItemStruct *a, ItemStruct *b);
void CheckInvSwap(int pnum, BYTE bLoc, int idx, WORD wCI, int seed, BOOL bId); void CheckInvSwap(int pnum, BYTE bLoc, int idx, WORD wCI, int seed, BOOL bId);
void inv_update_rem_item(int pnum, BYTE iv); void inv_update_rem_item(int pnum, BYTE iv);
void RemoveInvItem(int pnum, int iv); void RemoveInvItem(int pnum, int iv);
#ifdef HELLFIRE
BOOL inv_diablo_to_hellfire(int pnum); BOOL inv_diablo_to_hellfire(int pnum);
#endif
void RemoveSpdBarItem(int pnum, int iv); void RemoveSpdBarItem(int pnum, int iv);
void CheckInvItem(); void CheckInvItem();
void CheckInvScrn(); void CheckInvScrn();

34
Source/items.cpp

@ -4,9 +4,7 @@
* Implementation of item functionality. * Implementation of item functionality.
*/ */
#include "all.h" #include "all.h"
#ifdef HELLFIRE
#include "../3rdParty/Storm/Source/storm.h" #include "../3rdParty/Storm/Source/storm.h"
#endif
DEVILUTION_BEGIN_NAMESPACE DEVILUTION_BEGIN_NAMESPACE
@ -18,20 +16,15 @@ ItemGetRecordStruct itemrecord[MAXITEMS];
/** Contains the items on ground in the current game. */ /** Contains the items on ground in the current game. */
ItemStruct item[MAXITEMS + 1]; ItemStruct item[MAXITEMS + 1];
BOOL itemhold[3][3]; BOOL itemhold[3][3];
#ifdef HELLFIRE
CornerStoneStruct CornerStone; CornerStoneStruct CornerStone;
#endif
BYTE *itemanims[ITEMTYPES]; BYTE *itemanims[ITEMTYPES];
BOOL UniqueItemFlag[128]; BOOL UniqueItemFlag[128];
#ifdef HELLFIRE
int auricGold = 10000; int auricGold = 10000;
#endif
int numitems; int numitems;
int gnNumGetRecords; int gnNumGetRecords;
/* data */ /* data */
#ifdef HELLFIRE
int OilLevels[] = { 1, 10, 1, 10, 4, 1, 5, 17, 1, 10 }; int OilLevels[] = { 1, 10, 1, 10, 4, 1, 5, 17, 1, 10 };
int OilValues[] = { 500, 2500, 500, 2500, 1500, 100, 2500, 15000, 500, 2500 }; int OilValues[] = { 500, 2500, 500, 2500, 1500, 100, 2500, 15000, 500, 2500 };
int OilMagic[] = { int OilMagic[] = {
@ -59,7 +52,6 @@ char OilNames[10][25] = {
"Oil of Imperviousness" "Oil of Imperviousness"
}; };
int MaxGold = GOLD_MAX_LIMIT; int MaxGold = GOLD_MAX_LIMIT;
#endif
/** Maps from item_cursor_graphic to in-memory item type. */ /** Maps from item_cursor_graphic to in-memory item type. */
BYTE ItemCAnimTbl[] = { BYTE ItemCAnimTbl[] = {
@ -299,9 +291,7 @@ int ItemInvSnds[] = {
IS_ILARM, IS_ILARM,
#endif #endif
}; };
#ifdef HELLFIRE
char *off_4A5AC4 = "SItem"; char *off_4A5AC4 = "SItem";
#endif
/** Specifies the current Y-coordinate used for validation of items on ground. */ /** Specifies the current Y-coordinate used for validation of items on ground. */
int idoppely = 16; int idoppely = 16;
/** Maps from Griswold premium item number to a quality level delta as added to the base quality level. */ /** Maps from Griswold premium item number to a quality level delta as added to the base quality level. */
@ -331,7 +321,6 @@ int premiumlvladd[SMITH_PREMIUM_ITEMS] = {
// clang-format on // clang-format on
}; };
#ifdef HELLFIRE
int get_ring_max_value(int i) int get_ring_max_value(int i)
{ {
int j, res; int j, res;
@ -518,7 +507,6 @@ int items_get_currlevel()
return lvl; return lvl;
} }
#endif
void InitItemGFX() void InitItemGFX()
{ {
@ -599,7 +587,6 @@ void AddInitItems()
} }
} }
#ifdef HELLFIRE
static void items_42390F() static void items_42390F()
{ {
int x, y, id; int x, y, id;
@ -623,7 +610,6 @@ static void items_42390F()
} }
SpawnQuestItem(id, x, y, 0, 1); SpawnQuestItem(id, x, y, 0, 1);
} }
#endif
void InitItems() void InitItems()
{ {
@ -785,8 +771,8 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
#ifdef HELLFIRE #ifdef HELLFIRE
if (plr[p]._pClass == PC_MONK) { if (plr[p]._pClass == PC_MONK) {
mind = max(mind, plr[p]._pLevel >> 1); mind = std::max(mind, plr[p]._pLevel >> 1);
maxd = max(maxd, plr[p]._pLevel); maxd = std::max(maxd, (int)plr[p]._pLevel);
} }
#endif #endif
} }
@ -1865,7 +1851,6 @@ void GetStaffSpell(int i, int lvl, BOOL onlygood)
} }
} }
#ifdef HELLFIRE
void GetOilType(int i, int max_lvl) void GetOilType(int i, int max_lvl)
{ {
int cnt, t, j, r; int cnt, t, j, r;
@ -1894,7 +1879,6 @@ void GetOilType(int i, int max_lvl)
item[i]._ivalue = OilValues[t]; item[i]._ivalue = OilValues[t];
item[i]._iIvalue = OilValues[t]; item[i]._iIvalue = OilValues[t];
} }
#endif
void GetItemAttrs(int i, int idata, int lvl) void GetItemAttrs(int i, int idata, int lvl)
{ {
@ -3232,7 +3216,6 @@ void RecreateEar(int ii, WORD ic, int iseed, int Id, int dur, int mdur, int ch,
item[ii]._iSeed = iseed; item[ii]._iSeed = iseed;
} }
#ifdef HELLFIRE
void items_427A72() void items_427A72()
{ {
PkItemStruct id; PkItemStruct id;
@ -3284,7 +3267,6 @@ void items_427ABA(int x, int y)
} }
} }
} }
#endif
void SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag) void SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag)
{ {
@ -3372,7 +3354,6 @@ void SpawnRock()
} }
} }
#ifdef HELLFIRE
void SpawnRewardItem(int itemid, int xx, int yy) void SpawnRewardItem(int itemid, int xx, int yy)
{ {
int i; int i;
@ -3408,7 +3389,6 @@ void SpawnTheodore(int xx, int yy)
{ {
SpawnRewardItem(IDI_THEODORE, xx, yy); SpawnRewardItem(IDI_THEODORE, xx, yy);
} }
#endif
void RespawnItem(int i, BOOL FlipFlag) void RespawnItem(int i, BOOL FlipFlag)
{ {
@ -3498,13 +3478,7 @@ void ProcessItems()
void FreeItemGFX() void FreeItemGFX()
{ {
#ifdef HELLFIRE for (int i = 0; i < ITEMTYPES; i++) {
DWORD i;
#else
int i;
#endif
for (i = 0; i < ITEMTYPES; i++) {
MemFreeDbg(itemanims[i]); MemFreeDbg(itemanims[i]);
} }
} }
@ -3640,7 +3614,6 @@ void DoRecharge(int pnum, int cii)
SetCursor_(CURSOR_HAND); SetCursor_(CURSOR_HAND);
} }
#ifdef HELLFIRE
static BOOL OilItem(ItemStruct *x, PlayerStruct *p) static BOOL OilItem(ItemStruct *x, PlayerStruct *p)
{ {
int dur, r; int dur, r;
@ -3774,7 +3747,6 @@ void DoOil(int pnum, int cii)
} }
} }
} }
#endif
void PrintItemOil(char IDidx) void PrintItemOil(char IDidx)
{ {

14
Source/items.h

@ -17,16 +17,11 @@ extern BOOL uitemflag;
extern int itemavail[MAXITEMS]; extern int itemavail[MAXITEMS];
extern ItemGetRecordStruct itemrecord[MAXITEMS]; extern ItemGetRecordStruct itemrecord[MAXITEMS];
extern ItemStruct item[MAXITEMS + 1]; extern ItemStruct item[MAXITEMS + 1];
#ifdef HELLFIRE
extern CornerStoneStruct CornerStone; extern CornerStoneStruct CornerStone;
#endif
extern BOOL UniqueItemFlag[128]; extern BOOL UniqueItemFlag[128];
#ifdef HELLFIRE
extern int auricGold; extern int auricGold;
#endif
extern int numitems; extern int numitems;
#ifdef HELLFIRE
int get_ring_max_value(int i); int get_ring_max_value(int i);
int get_bow_max_value(int i); int get_bow_max_value(int i);
int get_staff_max_value(int i); int get_staff_max_value(int i);
@ -37,7 +32,6 @@ int get_armor_max_value(int i);
int get_mace_max_value(int i); int get_mace_max_value(int i);
int get_amulet_max_value(int i); int get_amulet_max_value(int i);
int get_axe_max_value(int i); int get_axe_max_value(int i);
#endif
void InitItemGFX(); void InitItemGFX();
void InitItems(); void InitItems();
void CalcPlrItemVals(int p, BOOL Loadgfx); void CalcPlrItemVals(int p, BOOL Loadgfx);
@ -64,18 +58,14 @@ void CreateRndUseful(int pnum, int x, int y, BOOL sendmsg);
void CreateTypeItem(int x, int y, BOOL onlygood, int itype, int imisc, BOOL sendmsg, BOOL delta); void CreateTypeItem(int x, int y, BOOL onlygood, int itype, int imisc, BOOL sendmsg, BOOL delta);
void RecreateItem(int ii, int idx, WORD icreateinfo, int iseed, int ivalue); void RecreateItem(int ii, int idx, WORD icreateinfo, int iseed, int ivalue);
void RecreateEar(int ii, WORD ic, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, int ibuff); void RecreateEar(int ii, WORD ic, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, int ibuff);
#ifdef HELLFIRE
void items_427A72(); void items_427A72();
void items_427ABA(int x, int y); void items_427ABA(int x, int y);
#endif
void SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag); void SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag);
void SpawnRock(); void SpawnRock();
#ifdef HELLFIRE
void SpawnRewardItem(int itemid, int xx, int yy); void SpawnRewardItem(int itemid, int xx, int yy);
void SpawnMapOfDoom(int xx, int yy); void SpawnMapOfDoom(int xx, int yy);
void SpawnRuneBomb(int xx, int yy); void SpawnRuneBomb(int xx, int yy);
void SpawnTheodore(int xx, int yy); void SpawnTheodore(int xx, int yy);
#endif
void RespawnItem(int i, BOOL FlipFlag); void RespawnItem(int i, BOOL FlipFlag);
void DeleteItem(int ii, int i); void DeleteItem(int ii, int i);
void ProcessItems(); void ProcessItems();
@ -85,9 +75,7 @@ void GetItemStr(int i);
void CheckIdentify(int pnum, int cii); void CheckIdentify(int pnum, int cii);
void DoRepair(int pnum, int cii); void DoRepair(int pnum, int cii);
void DoRecharge(int pnum, int cii); void DoRecharge(int pnum, int cii);
#ifdef HELLFIRE
void DoOil(int pnum, int cii); void DoOil(int pnum, int cii);
#endif
void PrintItemPower(char plidx, ItemStruct *x); void PrintItemPower(char plidx, ItemStruct *x);
void DrawUniqueInfo(); void DrawUniqueInfo();
void PrintItemDetails(ItemStruct *x); void PrintItemDetails(ItemStruct *x);
@ -120,9 +108,7 @@ void PutItemRecord(int nSeed, WORD wCI, int nIndex);
/* data */ /* data */
#ifdef HELLFIRE
extern int MaxGold; extern int MaxGold;
#endif
extern BYTE ItemCAnimTbl[]; extern BYTE ItemCAnimTbl[];
extern int ItemInvSnds[]; extern int ItemInvSnds[];

4
Source/lighting.cpp

@ -919,7 +919,6 @@ void MakeLightTable()
} }
tbl += 224; tbl += 224;
} }
#ifdef HELLFIRE
if (currlevel >= 17) { if (currlevel >= 17) {
tbl = pLightTbl; tbl = pLightTbl;
for (i = 0; i < lights; i++) { for (i = 0; i < lights; i++) {
@ -933,7 +932,6 @@ void MakeLightTable()
*tbl++ = 1; *tbl++ = 1;
tbl += 240; tbl += 240;
} }
#endif
trn = LoadFileInMem("PlrGFX\\Infra.TRN", NULL); trn = LoadFileInMem("PlrGFX\\Infra.TRN", NULL);
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
@ -984,7 +982,6 @@ void MakeLightTable()
} }
} }
#ifdef HELLFIRE
if (currlevel >= 17) { if (currlevel >= 17) {
for (j = 0; j < 16; j++) { for (j = 0; j < 16; j++) {
fa = (sqrt((double)(16 - j))) / 128; fa = (sqrt((double)(16 - j))) / 128;
@ -999,7 +996,6 @@ void MakeLightTable()
} }
} }
} }
#endif
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
for (k = 0; k < 16; k++) { for (k = 0; k < 16; k++) {

2
Source/objdat.cpp

@ -320,7 +320,6 @@ const char *const ObjMasterLoadList[] = {
"Mushptch", "Mushptch",
"LzStand" "LzStand"
}; };
#ifdef HELLFIRE
/** Maps from object_graphic_id to object CEL name (Hellfire Crypt overwrite). */ /** Maps from object_graphic_id to object CEL name (Hellfire Crypt overwrite). */
char *ObjCryptLoadList[] = { char *ObjCryptLoadList[] = {
"L1Braz", "L1Braz",
@ -439,6 +438,5 @@ char *ObjHiveLoadList[] = {
"Mushptch", "Mushptch",
"LzStand", "LzStand",
}; };
#endif
DEVILUTION_END_NAMESPACE DEVILUTION_END_NAMESPACE

2
Source/objdat.h

@ -15,10 +15,8 @@ extern "C" {
extern int ObjTypeConv[]; extern int ObjTypeConv[];
extern ObjDataStruct AllObjects[]; extern ObjDataStruct AllObjects[];
extern const char *const ObjMasterLoadList[]; extern const char *const ObjMasterLoadList[];
#ifdef HELLFIRE
extern char *ObjCryptLoadList[]; extern char *ObjCryptLoadList[];
extern char *ObjHiveLoadList[]; extern char *ObjHiveLoadList[];
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

29
Source/objects.cpp

@ -198,7 +198,6 @@ const char *const StoryBookName[] = {
"The Realms Beyond", "The Realms Beyond",
"Tale of the Three", "Tale of the Three",
"The Black King", "The Black King",
#ifdef HELLFIRE
"Journal: The Ensorcellment", "Journal: The Ensorcellment",
"Journal: The Meeting", "Journal: The Meeting",
"Journal: The Tirade", "Journal: The Tirade",
@ -206,7 +205,6 @@ const char *const StoryBookName[] = {
"Journal: NA-KRUL", "Journal: NA-KRUL",
"Journal: The End", "Journal: The End",
"A Spellbook", "A Spellbook",
#endif
}; };
/** Specifies the speech IDs of each dungeon type narrator book, for each player class. */ /** Specifies the speech IDs of each dungeon type narrator book, for each player class. */
int StoryText[3][3] = { int StoryText[3][3] = {
@ -223,22 +221,15 @@ void InitObjectGFX()
memset(fileload, FALSE, sizeof(fileload)); memset(fileload, FALSE, sizeof(fileload));
#ifdef HELLFIRE
int lvl = currlevel; int lvl = currlevel;
if (currlevel >= 21 && currlevel <= 24) if (currlevel >= 21 && currlevel <= 24)
lvl -= 20; lvl -= 20;
else if (currlevel >= 17 && currlevel <= 20) else if (currlevel >= 17 && currlevel <= 20)
lvl -= 8; lvl -= 8;
#endif
for (i = 0; AllObjects[i].oload != -1; i++) { for (i = 0; AllObjects[i].oload != -1; i++) {
if (AllObjects[i].oload == 1 if (AllObjects[i].oload == 1
#ifdef HELLFIRE
&& (int)lvl >= AllObjects[i].ominlvl && (int)lvl >= AllObjects[i].ominlvl
&& (int)lvl <= AllObjects[i].omaxlvl) { && (int)lvl <= AllObjects[i].omaxlvl) {
#else
&& (int)currlevel >= AllObjects[i].ominlvl
&& (int)currlevel <= AllObjects[i].omaxlvl) {
#endif
fileload[AllObjects[i].ofindex] = TRUE; fileload[AllObjects[i].ofindex] = TRUE;
} }
if (AllObjects[i].otheme != THEME_NONE) { if (AllObjects[i].otheme != THEME_NONE) {
@ -258,12 +249,10 @@ void InitObjectGFX()
if (fileload[i]) { if (fileload[i]) {
ObjFileList[numobjfiles] = i; ObjFileList[numobjfiles] = i;
sprintf(filestr, "Objects\\%s.CEL", ObjMasterLoadList[i]); sprintf(filestr, "Objects\\%s.CEL", ObjMasterLoadList[i]);
#ifdef HELLFIRE
if (currlevel >= 17 && currlevel < 21) if (currlevel >= 17 && currlevel < 21)
sprintf(filestr, "Objects\\%s.CEL", ObjHiveLoadList[i]); sprintf(filestr, "Objects\\%s.CEL", ObjHiveLoadList[i]);
else if (currlevel >= 21) else if (currlevel >= 21)
sprintf(filestr, "Objects\\%s.CEL", ObjCryptLoadList[i]); sprintf(filestr, "Objects\\%s.CEL", ObjCryptLoadList[i]);
#endif
pObjCels[numobjfiles] = LoadFileInMem(filestr, NULL); pObjCels[numobjfiles] = LoadFileInMem(filestr, NULL);
numobjfiles++; numobjfiles++;
} }
@ -567,7 +556,6 @@ void AddL1Objs(int x1, int y1, int x2, int y2)
} }
} }
#ifdef HELLFIRE
void add_crypt_objs(int x1, int y1, int x2, int y2) void add_crypt_objs(int x1, int y1, int x2, int y2)
{ {
int i, j, pn; int i, j, pn;
@ -583,7 +571,6 @@ void add_crypt_objs(int x1, int y1, int x2, int y2)
} }
} }
#endif
void AddL2Objs(int x1, int y1, int x2, int y2) void AddL2Objs(int x1, int y1, int x2, int y2)
{ {
int i, j, pn; int i, j, pn;
@ -1429,11 +1416,7 @@ void AddShrine(int i)
{ {
int val; int val;
DIABOOL slist[NUM_SHRINETYPE]; DIABOOL slist[NUM_SHRINETYPE];
#ifdef HELLFIRE
unsigned int j;
#else
int j; int j;
#endif
object[i]._oPreFlag = TRUE; object[i]._oPreFlag = TRUE;
for (j = 0; j < NUM_SHRINETYPE; j++) { for (j = 0; j < NUM_SHRINETYPE; j++) {
if (currlevel < shrinemin[j] || currlevel > shrinemax[j]) { if (currlevel < shrinemin[j] || currlevel > shrinemax[j]) {
@ -1566,17 +1549,9 @@ void AddStoryBook(int i)
object[i]._oVar1 = random_(0, 3); object[i]._oVar1 = random_(0, 3);
if (currlevel == 4) if (currlevel == 4)
object[i]._oVar2 = StoryText[object[i]._oVar1][0]; object[i]._oVar2 = StoryText[object[i]._oVar1][0];
#ifdef HELLFIRE
if (currlevel == 8)
#else
else if (currlevel == 8) else if (currlevel == 8)
#endif
object[i]._oVar2 = StoryText[object[i]._oVar1][1]; object[i]._oVar2 = StoryText[object[i]._oVar1][1];
#ifdef HELLFIRE
if (currlevel == 12)
#else
else if (currlevel == 12) else if (currlevel == 12)
#endif
object[i]._oVar2 = StoryText[object[i]._oVar1][2]; object[i]._oVar2 = StoryText[object[i]._oVar1][2];
object[i]._oVar3 = (currlevel >> 2) + 3 * object[i]._oVar1 - 1; object[i]._oVar3 = (currlevel >> 2) + 3 * object[i]._oVar1 - 1;
object[i]._oAnimFrame = 5 - 2 * object[i]._oVar1; object[i]._oAnimFrame = 5 - 2 * object[i]._oVar1;
@ -2986,14 +2961,12 @@ void OperateLever(int pnum, int i)
} }
} }
} }
#ifdef HELLFIRE
if (currlevel == 24) { if (currlevel == 24) {
operate_lv24_lever(); operate_lv24_lever();
IsUberLeverActivated = 1; IsUberLeverActivated = 1;
mapflag = FALSE; mapflag = FALSE;
quests[Q_NAKRUL]._qactive = 3; quests[Q_NAKRUL]._qactive = 3;
} }
#endif
if (mapflag) if (mapflag)
ObjChangeMap(object[i]._oVar1, object[i]._oVar2, object[i]._oVar3, object[i]._oVar4); ObjChangeMap(object[i]._oVar1, object[i]._oVar2, object[i]._oVar3, object[i]._oVar4);
if (pnum == myplr) if (pnum == myplr)
@ -5230,13 +5203,11 @@ void GetObjectStr(int i)
break; break;
case OBJ_BARREL: case OBJ_BARREL:
case OBJ_BARRELEX: case OBJ_BARRELEX:
#ifdef HELLFIRE
if (currlevel > 16 && currlevel < 21) // for hive levels if (currlevel > 16 && currlevel < 21) // for hive levels
strcpy(infostr, "Pod"); //Then a barrel is called a pod strcpy(infostr, "Pod"); //Then a barrel is called a pod
else if (currlevel > 20 && currlevel < 25) // for crypt levels else if (currlevel > 20 && currlevel < 25) // for crypt levels
strcpy(infostr, "Urn"); //Then a barrel is called an urn strcpy(infostr, "Urn"); //Then a barrel is called an urn
else else
#endif
strcpy(infostr, "Barrel"); strcpy(infostr, "Barrel");
break; break;
case OBJ_SKELBOOK: case OBJ_SKELBOOK:

2
Source/objects.h

@ -29,11 +29,9 @@ void SetBookMsg(int i, int msg);
void GetRndObjLoc(int randarea, int *xx, int *yy); void GetRndObjLoc(int randarea, int *xx, int *yy);
void AddMushPatch(); void AddMushPatch();
void AddSlainHero(); void AddSlainHero();
#ifdef HELLFIRE
void objects_44D8C5(int ot, int v2, int ox, int oy); void objects_44D8C5(int ot, int v2, int ox, int oy);
void objects_44DA68(int a1, int a2); void objects_44DA68(int a1, int a2);
void objects_454AF0(int a1, int a2, int a3); void objects_454AF0(int a1, int a2, int a3);
#endif
void AddObject(int ot, int ox, int oy); void AddObject(int ot, int ox, int oy);
void Obj_Trap(int i); void Obj_Trap(int i);
void ProcessObjects(); void ProcessObjects();

2
Source/pack.h

@ -14,10 +14,8 @@ extern "C" {
void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield); void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield);
void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok); void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok);
#ifdef HELLFIRE
void PackItem(PkItemStruct *id, ItemStruct *is); void PackItem(PkItemStruct *id, ItemStruct *is);
void UnPackItem(PkItemStruct *is, ItemStruct *id); void UnPackItem(PkItemStruct *is, ItemStruct *id);
#endif
/* rdata */ /* rdata */
#ifdef __cplusplus #ifdef __cplusplus

2
Source/palette.cpp

@ -115,7 +115,6 @@ void LoadRndLvlPal(int l)
} else { } else {
rv = random_(0, 4) + 1; rv = random_(0, 4) + 1;
sprintf(szFileName, "Levels\\L%iData\\L%i_%i.PAL", l, l, rv); sprintf(szFileName, "Levels\\L%iData\\L%i_%i.PAL", l, l, rv);
#ifdef HELLFIRE
if (l == 5) { if (l == 5) {
sprintf(szFileName, "NLevels\\L5Data\\L5Base.PAL"); sprintf(szFileName, "NLevels\\L5Data\\L5Base.PAL");
} }
@ -125,7 +124,6 @@ void LoadRndLvlPal(int l)
} }
sprintf(szFileName, "NLevels\\L%iData\\L%iBase%i.PAL", 6, 6, rv); sprintf(szFileName, "NLevels\\L%iData\\L%iBase%i.PAL", 6, 6, rv);
} }
#endif
LoadPalette(szFileName); LoadPalette(szFileName);
} }
} }

2
Source/palette.h

@ -31,10 +31,8 @@ void SetFadeLevel(DWORD fadeval);
void PaletteFadeIn(int fr); void PaletteFadeIn(int fr);
void PaletteFadeOut(int fr); void PaletteFadeOut(int fr);
void palette_update_caves(); void palette_update_caves();
#ifdef HELLFIRE
void palette_update_crypt(); void palette_update_crypt();
void palette_update_hive(); void palette_update_hive();
#endif
void palette_update_quest_palette(int n); void palette_update_quest_palette(int n);
BOOL palette_get_color_cycling(); BOOL palette_get_color_cycling();
BOOL palette_set_color_cycling(BOOL enabled); BOOL palette_set_color_cycling(BOOL enabled);

2
Source/player.cpp

@ -4614,7 +4614,6 @@ void PlayDungMsgs()
} }
} }
#ifdef HELLFIRE
int get_max_strength(int i) int get_max_strength(int i)
{ {
return MaxStats[i][ATTRIB_STR]; return MaxStats[i][ATTRIB_STR];
@ -4629,6 +4628,5 @@ int get_max_dexterity(int i)
{ {
return MaxStats[i][ATTRIB_DEX]; return MaxStats[i][ATTRIB_DEX];
} }
#endif
DEVILUTION_END_NAMESPACE DEVILUTION_END_NAMESPACE

4
Source/scrollrt.cpp

@ -207,16 +207,13 @@ static void scrollrt_draw_cursor_item()
if (!plr[myplr].HoldItem._iStatFlag) { if (!plr[myplr].HoldItem._iStatFlag) {
col = PAL16_RED + 5; col = PAL16_RED + 5;
} }
#ifdef HELLFIRE
if (pcurs <= 179) { if (pcurs <= 179) {
#endif
CelBlitOutline(col, mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW); CelBlitOutline(col, mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW);
if (col != PAL16_RED + 5) { if (col != PAL16_RED + 5) {
CelClippedDrawSafe(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW); CelClippedDrawSafe(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW);
} else { } else {
CelDrawLightRedSafe(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW, 1); CelDrawLightRedSafe(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW, 1);
} }
#ifdef HELLFIRE
} else { } else {
CelBlitOutline(col, mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels2, pcurs - 179, cursW); CelBlitOutline(col, mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels2, pcurs - 179, cursW);
if (col != PAL16_RED + 5) { if (col != PAL16_RED + 5) {
@ -225,7 +222,6 @@ static void scrollrt_draw_cursor_item()
CelDrawLightRedSafe(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels2, pcurs - 179, cursW, 0); CelDrawLightRedSafe(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels2, pcurs - 179, cursW, 0);
} }
} }
#endif
} else { } else {
CelClippedDrawSafe(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW); CelClippedDrawSafe(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW);
} }

4
Source/sync.cpp

@ -200,11 +200,7 @@ static void sync_monster(int pnum, const TSyncMonster *p)
ndx = p->_mndx; ndx = p->_mndx;
#ifdef HELLFIRE
if (monster[ndx]._mhitpoints <= 0) { if (monster[ndx]._mhitpoints <= 0) {
#else
if (monster[ndx]._mhitpoints == 0) {
#endif
return; return;
} }

2
Source/textdat.cpp

@ -513,7 +513,6 @@ const TextDataStruct alltext[] = {
1, 3, PS_NAR9 }, 1, 3, PS_NAR9 },
{ "Thank goodness you've returned!\nMuch has changed since you lived here, my friend. All was peaceful until the dark riders came and destroyed our village. Many were cut down where they stood, and those who took up arms were slain or dragged away to become slaves - or worse. The church at the edge of town has been desecrated and is being used for dark rituals. The screams that echo in the night are inhuman, but some of our townsfolk may yet survive. Follow the path that lies between my tavern and the blacksmith shop to find the church and save who you can. \n \nPerhaps I can tell you more if we speak again. Good luck.|", { "Thank goodness you've returned!\nMuch has changed since you lived here, my friend. All was peaceful until the dark riders came and destroyed our village. Many were cut down where they stood, and those who took up arms were slain or dragged away to become slaves - or worse. The church at the edge of town has been desecrated and is being used for dark rituals. The screams that echo in the night are inhuman, but some of our townsfolk may yet survive. Follow the path that lies between my tavern and the blacksmith shop to find the church and save who you can. \n \nPerhaps I can tell you more if we speak again. Good luck.|",
1, 5, TSFX_TAVERN0 }, 1, 5, TSFX_TAVERN0 },
#ifdef HELLFIRE
{ "Beyond the Hall of Heroes lies the Chamber of Bone. Eternal death awaits any who would seek to steal the treasures secured within this room. So speaks the Lord of Terror, and so it is written. |", { "Beyond the Hall of Heroes lies the Chamber of Bone. Eternal death awaits any who would seek to steal the treasures secured within this room. So speaks the Lord of Terror, and so it is written. |",
1, 5, PS_MONK1 }, 1, 5, PS_MONK1 },
{ "...and so, locked beyond the Gateway of Blood and past the Hall of Fire, Valor awaits for the Hero of Light to awaken... |", { "...and so, locked beyond the Gateway of Blood and past the Hall of Fire, Valor awaits for the Hero of Light to awaken... |",
@ -646,7 +645,6 @@ const TextDataStruct alltext[] = {
{ "In Spiritu Sanctum. |", 1, 5, PS_ROGUE54 }, { "In Spiritu Sanctum. |", 1, 5, PS_ROGUE54 },
{ "Praedictum Otium. |", 1, 5, PS_ROGUE55 }, { "Praedictum Otium. |", 1, 5, PS_ROGUE55 },
{ "Efficio Obitus Ut Inimicus. |", 1, 5, PS_ROGUE56 }, { "Efficio Obitus Ut Inimicus. |", 1, 5, PS_ROGUE56 },
#endif
}; };
/** unused */ /** unused */
const DWORD gdwAllTextEntries = 259; const DWORD gdwAllTextEntries = 259;

4
Source/themes.cpp

@ -494,11 +494,7 @@ void HoldThemeRooms()
void PlaceThemeMonsts(int t, int f) void PlaceThemeMonsts(int t, int f)
{ {
int xp, yp; int xp, yp;
#ifdef HELLFIRE
int scattertypes[138]; int scattertypes[138];
#else
int scattertypes[111];
#endif
int numscattypes, mtype, i; int numscattypes, mtype, i;
numscattypes = 0; numscattypes = 0;

2
SourceX/storm/storm.cpp

@ -152,7 +152,6 @@ BOOL SFileOpenFile(const char *filename, HANDLE *phFile)
result = SFileOpenFileEx((HANDLE)0, path.c_str(), 0xFFFFFFFF, phFile); result = SFileOpenFileEx((HANDLE)0, path.c_str(), 0xFFFFFFFF, phFile);
} }
#ifdef HELLFIRE
if (!result) { if (!result) {
result = SFileOpenFileEx((HANDLE)hfopt2_mpq, filename, 0, phFile); result = SFileOpenFileEx((HANDLE)hfopt2_mpq, filename, 0, phFile);
} }
@ -177,7 +176,6 @@ BOOL SFileOpenFile(const char *filename, HANDLE *phFile)
if (!result) { if (!result) {
result = SFileOpenFileEx((HANDLE)hellfire_mpq, filename, 0, phFile); result = SFileOpenFileEx((HANDLE)hellfire_mpq, filename, 0, phFile);
} }
#endif
if (!result && patch_rt_mpq) { if (!result && patch_rt_mpq) {
result = SFileOpenFileEx((HANDLE)patch_rt_mpq, filename, 0, phFile); result = SFileOpenFileEx((HANDLE)patch_rt_mpq, filename, 0, phFile);
} }

6
enums.h

@ -203,9 +203,7 @@ typedef enum item_cursor_graphic {
ICURS_EAR_WARRIOR = 20, ICURS_EAR_WARRIOR = 20,
ICURS_EAR_ROGUE = 21, ICURS_EAR_ROGUE = 21,
ICURS_BLOOD_STONE = 25, ICURS_BLOOD_STONE = 25,
#ifdef HELLFIRE
ICURS_OIL = 30, ICURS_OIL = 30,
#endif
ICURS_ELIXIR_OF_VITALITY = 31, ICURS_ELIXIR_OF_VITALITY = 31,
ICURS_POTION_OF_HEALING = 32, ICURS_POTION_OF_HEALING = 32,
ICURS_POTION_OF_FULL_REJUVENATION = 33, ICURS_POTION_OF_FULL_REJUVENATION = 33,
@ -1521,7 +1519,6 @@ typedef enum missile_graphic_id {
MFILE_SCBSEXPC, MFILE_SCBSEXPC,
MFILE_SCUBMISD, MFILE_SCUBMISD,
MFILE_SCBSEXPD, MFILE_SCBSEXPD,
#ifdef HELLFIRE
MFILE_SPAWNS, MFILE_SPAWNS,
MFILE_REFLECT, MFILE_REFLECT,
MFILE_LICH, MFILE_LICH,
@ -1535,7 +1532,6 @@ typedef enum missile_graphic_id {
MFILE_BONEDEMON, MFILE_BONEDEMON,
MFILE_EXORA1, MFILE_EXORA1,
MFILE_EXBL3, MFILE_EXBL3,
#endif
MFILE_NULL, MFILE_NULL,
MFILE_NONE = 0xFF, // BUGFIX: should be `MFILE_NONE = MFILE_SCBSEXPD+1`, i.e. MFILE_NULL, since there would otherwise be an out-of-bounds in SetMissAnim when accessing misfiledata for any of the missiles that have MFILE_NONE as mFileNum in missiledata. MFILE_NONE = 0xFF, // BUGFIX: should be `MFILE_NONE = MFILE_SCBSEXPD+1`, i.e. MFILE_NULL, since there would otherwise be an out-of-bounds in SetMissAnim when accessing misfiledata for any of the missiles that have MFILE_NONE as mFileNum in missiledata.
} missile_graphic_id; } missile_graphic_id;
@ -2761,9 +2757,7 @@ typedef enum _mainmenu_selections {
MAINMENU_SINGLE_PLAYER = 1, MAINMENU_SINGLE_PLAYER = 1,
MAINMENU_MULTIPLAYER, MAINMENU_MULTIPLAYER,
MAINMENU_REPLAY_INTRO, MAINMENU_REPLAY_INTRO,
#ifdef HELLFIRE
MAINMENU_SHOW_SUPPORT, MAINMENU_SHOW_SUPPORT,
#endif
MAINMENU_SHOW_CREDITS, MAINMENU_SHOW_CREDITS,
MAINMENU_EXIT_DIABLO, MAINMENU_EXIT_DIABLO,
MAINMENU_ATTRACT_MODE, MAINMENU_ATTRACT_MODE,

9
structs.h

@ -536,13 +536,8 @@ typedef struct CMonster {
TSnd *Snds[4][2]; TSnd *Snds[4][2];
int width; int width;
int width2; int width2;
#ifdef HELLFIRE
int mMinHP;
int mMaxHP;
#else
unsigned char mMinHP; unsigned char mMinHP;
unsigned char mMaxHP; unsigned char mMaxHP;
#endif
BOOL has_special; BOOL has_special;
unsigned char mAFNum; unsigned char mAFNum;
char mdeadval; char mdeadval;
@ -868,13 +863,11 @@ typedef struct TCmdDamage {
DWORD dwDam; DWORD dwDam;
} TCmdDamage; } TCmdDamage;
#ifdef HELLFIRE
typedef struct TCmdMonDamage { typedef struct TCmdMonDamage {
BYTE bCmd; BYTE bCmd;
WORD wMon; WORD wMon;
DWORD dwDam; DWORD dwDam;
} TCmdMonDamage; } TCmdMonDamage;
#endif
typedef struct TCmdPlrInfoHdr { typedef struct TCmdPlrInfoHdr {
BYTE bCmd; BYTE bCmd;
@ -1050,14 +1043,12 @@ typedef struct QuestData {
const char *_qlstr; const char *_qlstr;
} QuestData; } QuestData;
#ifdef HELLFIRE
typedef struct CornerStoneStruct { typedef struct CornerStoneStruct {
int x; int x;
int y; int y;
BOOL activated; BOOL activated;
ItemStruct item; ItemStruct item;
} CornerStoneStruct; } CornerStoneStruct;
#endif
////////////////////////////////////////////////// //////////////////////////////////////////////////
// gamemenu/gmenu // gamemenu/gmenu

Loading…
Cancel
Save