Browse Source

Merge a large chunk of Hellfire the code paths

pull/973/head
Anders Jenbo 5 years ago
parent
commit
e609e170d0
  1. 6
      Source/control.cpp
  2. 23
      Source/doom.cpp
  3. 39
      Source/drlg_l1.cpp
  4. 7
      Source/effects.cpp
  5. 197
      Source/inv.cpp
  6. 73
      Source/items.cpp
  7. 22
      Source/loadsave.cpp
  8. 4
      Source/misdat.cpp
  9. 15
      Source/missiles.cpp
  10. 5
      Source/missiles.h
  11. 6
      Source/monster.cpp
  12. 18
      Source/objects.cpp
  13. 62
      Source/pfile.cpp
  14. 2
      Source/pfile.h
  15. 59
      Source/player.cpp
  16. 39
      Source/quests.cpp
  17. 2
      Source/quests.h
  18. 18
      Source/spelldat.cpp
  19. 32
      Source/spells.cpp
  20. 6
      Source/towners.cpp
  21. 29
      Source/trigs.cpp
  22. 16
      SourceX/DiabloUI/diabloui.cpp
  23. 26
      SourceX/DiabloUI/mainmenu.cpp
  24. 37
      SourceX/DiabloUI/selhero.cpp
  25. 31
      SourceX/DiabloUI/title.cpp
  26. 7
      defs.h
  27. 24
      enums.h
  28. 4
      structs.h

6
Source/control.cpp

@ -396,10 +396,8 @@ void DrawSpellList()
if (MouseX >= lx && MouseX < lx + SPLICONLENGTH && MouseY >= ly && MouseY < ly + SPLICONLENGTH) { if (MouseX >= lx && MouseX < lx + SPLICONLENGTH && MouseY >= ly && MouseY < ly + SPLICONLENGTH) {
pSpell = j; pSpell = j;
pSplType = i; pSplType = i;
#ifdef HELLFIRE
if (plr[myplr]._pClass == PC_MONK && j == SPL_SEARCH) if (plr[myplr]._pClass == PC_MONK && j == SPL_SEARCH)
pSplType = RSPLTYPE_SKILL; pSplType = RSPLTYPE_SKILL;
#endif
DrawSpellCel(x, y, pSpellCels, c, SPLICONLENGTH); DrawSpellCel(x, y, pSpellCels, c, SPLICONLENGTH);
switch (pSplType) { switch (pSplType) {
case RSPLTYPE_SKILL: case RSPLTYPE_SKILL:
@ -867,14 +865,12 @@ void InitControlPan()
SpellPages[0][0] = SPL_DISARM; SpellPages[0][0] = SPL_DISARM;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
SpellPages[0][0] = SPL_RECHARGE; SpellPages[0][0] = SPL_RECHARGE;
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
SpellPages[0][0] = SPL_SEARCH; SpellPages[0][0] = SPL_SEARCH;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
SpellPages[0][0] = SPL_IDENTIFY; SpellPages[0][0] = SPL_IDENTIFY;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
SpellPages[0][0] = SPL_BLODBOIL; SpellPages[0][0] = SPL_BLODBOIL;
#endif
} }
pQLogCel = LoadFileInMem("Data\\Quest.CEL", NULL); pQLogCel = LoadFileInMem("Data\\Quest.CEL", NULL);
pGBoxBuff = LoadFileInMem("CtrlPan\\Golddrop.cel", NULL); pGBoxBuff = LoadFileInMem("CtrlPan\\Golddrop.cel", NULL);
@ -1864,10 +1860,8 @@ char GetSBookTrans(int ii, BOOL townok)
{ {
char st; char st;
#ifdef HELLFIRE
if ((plr[myplr]._pClass == PC_MONK) && (ii == SPL_SEARCH)) if ((plr[myplr]._pClass == PC_MONK) && (ii == SPL_SEARCH))
return RSPLTYPE_SKILL; return RSPLTYPE_SKILL;
#endif
st = RSPLTYPE_SPELL; st = RSPLTYPE_SPELL;
if (plr[myplr]._pISpells & SPELLBIT(ii)) { if (plr[myplr]._pISpells & SPELLBIT(ii)) {
st = RSPLTYPE_CHARGES; st = RSPLTYPE_CHARGES;

23
Source/doom.cpp

@ -82,14 +82,8 @@ void doom_init()
void doom_close() void doom_close()
{ {
#ifndef HELLFIRE doomflag = FALSE;
if (doomflag) { doom_cleanup();
#endif
doomflag = FALSE;
doom_cleanup();
#ifndef HELLFIRE
}
#endif
} }
void doom_draw() void doom_draw()
@ -97,19 +91,6 @@ void doom_draw()
if (!doomflag) { if (!doomflag) {
return; return;
} }
#ifndef HELLFIRE
if (doom_quest_time != 31) {
doom_stars_drawn++;
if (doom_stars_drawn >= 5) {
doom_stars_drawn = 0;
doom_quest_time++;
if (doom_quest_time > doom_get_frame_from_time()) {
doom_quest_time = 0;
}
doom_load_graphics();
}
}
#endif
CelDraw(PANEL_X, PANEL_Y - 1, pDoomCel, 1, 640); CelDraw(PANEL_X, PANEL_Y - 1, pDoomCel, 1, 640);
} }

39
Source/drlg_l1.cpp

@ -196,7 +196,6 @@ const BYTE STAIRSDOWN[] = {
0, 0, 0, 0, 0, 0, 0, 0,
// clang-format on // clang-format on
}; };
#ifdef HELLFIRE
const BYTE L5STAIRSDOWN[] = { const BYTE L5STAIRSDOWN[] = {
// clang-format off // clang-format off
4, 5, // width, height 4, 5, // width, height
@ -231,7 +230,6 @@ const BYTE L5STAIRSTOWN[] = {
0, 0, 0, 0, 0, 0, 0, 0,
// clang-format on // clang-format on
}; };
#endif
/** Miniset: candlestick. */ /** Miniset: candlestick. */
const BYTE LAMPS[] = { const BYTE LAMPS[] = {
// clang-format off // clang-format off
@ -264,7 +262,6 @@ const BYTE PWATERIN[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// clang-format on // clang-format on
}; };
#ifdef HELLFIRE
const BYTE byte_48A1B4[4] = { 1, 1, 11, 95 }; const BYTE byte_48A1B4[4] = { 1, 1, 11, 95 };
const BYTE byte_48A1B8[8] = { 1, 1, 12, 96 }; const BYTE byte_48A1B8[8] = { 1, 1, 12, 96 };
const BYTE byte_48A1C0[8] = { const BYTE byte_48A1C0[8] = {
@ -468,21 +465,17 @@ const BYTE byte_48A3C8[4] = { 1, 1, 1, 199 };
const BYTE byte_48A3CC[4] = { 1, 1, 1, 201 }; const BYTE byte_48A3CC[4] = { 1, 1, 1, 201 };
const BYTE byte_48A3D0[4] = { 1, 1, 2, 200 }; const BYTE byte_48A3D0[4] = { 1, 1, 2, 200 };
const BYTE byte_48A3D4[4] = { 1, 1, 2, 202 }; const BYTE byte_48A3D4[4] = { 1, 1, 2, 202 };
#endif
/* data */ /* data */
#ifdef HELLFIRE
BYTE UberRoomPattern[32] = { 4, 6, 115, 130, 6, 13, 129, 108, 1, 13, 1, 107, 103, 13, 146, 106, 102, 13, 129, 168, 1, 13, 7, 2, 3, 13, 0, 0, 0, 0, 0, 0 }; BYTE UberRoomPattern[32] = { 4, 6, 115, 130, 6, 13, 129, 108, 1, 13, 1, 107, 103, 13, 146, 106, 102, 13, 129, 168, 1, 13, 7, 2, 3, 13, 0, 0, 0, 0, 0, 0 };
BYTE CornerstoneRoomPattern[32] = { 5, 5, 4, 2, 2, 2, 6, 1, 111, 172, 0, 1, 1, 172, 0, 0, 25, 1, 0, 0, 0, 1, 7, 2, 2, 2, 3, 0, 0, 0, 0, 0 }; BYTE CornerstoneRoomPattern[32] = { 5, 5, 4, 2, 2, 2, 6, 1, 111, 172, 0, 1, 1, 172, 0, 0, 25, 1, 0, 0, 0, 1, 7, 2, 2, 2, 3, 0, 0, 0, 0, 0 };
#endif
/** /**
* A lookup table for the 16 possible patterns of a 2x2 area, * A lookup table for the 16 possible patterns of a 2x2 area,
* where each cell either contains a SW wall or it doesn't. * where each cell either contains a SW wall or it doesn't.
*/ */
BYTE L5ConvTbl[16] = { 22, 13, 1, 13, 2, 13, 13, 13, 4, 13, 1, 13, 2, 13, 16, 13 }; BYTE L5ConvTbl[16] = { 22, 13, 1, 13, 2, 13, 13, 13, 4, 13, 1, 13, 2, 13, 16, 13 };
#ifdef HELLFIRE
void DRLG_InitL5Vals() void DRLG_InitL5Vals()
{ {
int i, j, pc; int i, j, pc;
@ -500,7 +493,6 @@ void DRLG_InitL5Vals()
} }
} }
} }
#endif
static void DRLG_PlaceDoor(int x, int y) static void DRLG_PlaceDoor(int x, int y)
{ {
@ -561,7 +553,6 @@ static void DRLG_PlaceDoor(int x, int y)
L5dflags[x][y] = DLRG_PROTECTED; L5dflags[x][y] = DLRG_PROTECTED;
} }
#ifdef HELLFIRE
void drlg_l1_crypt_lavafloor() void drlg_l1_crypt_lavafloor()
{ {
int i, j; int i, j;
@ -851,7 +842,6 @@ void drlg_l1_crypt_lavafloor()
} }
} }
} }
#endif
static void DRLG_L1Shadows() static void DRLG_L1Shadows()
{ {
@ -1253,9 +1243,7 @@ void LoadL1Dungeon(const char *sFileName, int vx, int vy)
ViewY = vy; ViewY = vy;
DRLG_L1Pass3(); DRLG_L1Pass3();
DRLG_Init_Globals(); DRLG_Init_Globals();
#ifdef HELLFIRE
if (currlevel < 17) if (currlevel < 17)
#endif
DRLG_InitL1Vals(); DRLG_InitL1Vals();
SetMapMonsters(pLevelMap, 0, 0); SetMapMonsters(pLevelMap, 0, 0);
SetMapObjects(pLevelMap, 0, 0); SetMapObjects(pLevelMap, 0, 0);
@ -1953,7 +1941,6 @@ static void L5tileFix()
} }
} }
#ifdef HELLFIRE
void drlg_l1_crypt_rndset(const BYTE *miniset, int rndper) void drlg_l1_crypt_rndset(const BYTE *miniset, int rndper)
{ {
int sx, sy, sw, sh, xx, yy, ii, kk; int sx, sy, sw, sh, xx, yy, ii, kk;
@ -2007,7 +1994,6 @@ void drlg_l1_crypt_rndset(const BYTE *miniset, int rndper)
} }
} }
} }
#endif
static void DRLG_L5Subs() static void DRLG_L5Subs()
{ {
@ -2127,7 +2113,6 @@ static void L5FillChambers()
if (VR1 && !VR2 && VR3) if (VR1 && !VR2 && VR3)
DRLG_L5GHall(18, 12, 18, 28); DRLG_L5GHall(18, 12, 18, 28);
#ifdef HELLFIRE
if (currlevel == 24) { if (currlevel == 24) {
if (VR1 || VR2 || VR3) { if (VR1 || VR2 || VR3) {
c = 1; c = 1;
@ -2246,7 +2231,6 @@ static void L5FillChambers()
} }
} }
} }
#endif
if (L5setloadflag) { if (L5setloadflag) {
if (VR1 || VR2 || VR3) { if (VR1 || VR2 || VR3) {
c = 1; c = 1;
@ -2308,7 +2292,6 @@ static void L5FillChambers()
} }
} }
#ifdef HELLFIRE
void drlg_l1_set_crypt_room(int rx1, int ry1) void drlg_l1_set_crypt_room(int rx1, int ry1)
{ {
int rw, rh, i, j, sp; int rw, rh, i, j, sp;
@ -2367,7 +2350,6 @@ void drlg_l1_set_corner_room(int rx1, int ry1)
} }
} }
} }
#endif
static void DRLG_L5FTVR(int i, int j, int x, int y, int d) static void DRLG_L5FTVR(int i, int j, int x, int y, int d)
{ {
@ -2559,15 +2541,9 @@ static void DRLG_L5(int entry)
case 2: case 2:
minarea = 693; minarea = 693;
break; break;
case 3:
case 4:
minarea = 761;
break;
#ifdef HELLFIRE
default: default:
minarea = 761; minarea = 761;
break; break;
#endif
} }
do { do {
@ -2767,18 +2743,11 @@ static void DRLG_L5(int entry)
DRLG_L5Subs(); DRLG_L5Subs();
#endif #endif
#ifdef HELLFIRE if (currlevel < 21) {
if (currlevel < 21)
#endif
DRLG_L1Shadows(); DRLG_L1Shadows();
#ifdef HELLFIRE
if (currlevel < 21)
#endif
DRLG_PlaceMiniSet(LAMPS, 5, 10, 0, 0, FALSE, -1, 4); DRLG_PlaceMiniSet(LAMPS, 5, 10, 0, 0, FALSE, -1, 4);
#ifdef HELLFIRE
if (currlevel < 21)
#endif
DRLG_L1Floor(); DRLG_L1Floor();
}
for (j = 0; j < DMAXY; j++) { for (j = 0; j < DMAXY; j++) {
for (i = 0; i < DMAXX; i++) { for (i = 0; i < DMAXX; i++) {
@ -2803,7 +2772,6 @@ void CreateL5Dungeon(DWORD rseed, int entry)
dmaxx = 96; dmaxx = 96;
dmaxy = 96; dmaxy = 96;
#ifdef HELLFIRE
UberRow = 0; UberRow = 0;
UberCol = 0; UberCol = 0;
IsUberRoomOpened = 0; IsUberRoomOpened = 0;
@ -2812,7 +2780,6 @@ void CreateL5Dungeon(DWORD rseed, int entry)
UberLeverCol = 0; UberLeverCol = 0;
IsUberLeverActivated = 0; IsUberLeverActivated = 0;
UberDiabloMonsterIndex = 0; UberDiabloMonsterIndex = 0;
#endif
DRLG_InitTrans(); DRLG_InitTrans();
DRLG_InitSetPC(); DRLG_InitSetPC();
@ -2847,7 +2814,6 @@ void CreateL5Dungeon(DWORD rseed, int entry)
#endif #endif
} }
#ifdef HELLFIRE
void drlg_l1_crypt_pattern1(int rndper) void drlg_l1_crypt_pattern1(int rndper)
{ {
drlg_l1_crypt_rndset(byte_48A3C8, rndper); drlg_l1_crypt_rndset(byte_48A3C8, rndper);
@ -2970,6 +2936,5 @@ void drlg_l1_crypt_pattern7(int rndper)
drlg_l1_crypt_rndset(byte_48A1D8, rndper); drlg_l1_crypt_rndset(byte_48A1D8, rndper);
drlg_l1_crypt_rndset(byte_48A1DC, rndper); drlg_l1_crypt_rndset(byte_48A1DC, rndper);
} }
#endif
DEVILUTION_END_NAMESPACE DEVILUTION_END_NAMESPACE

7
Source/effects.cpp

@ -1370,23 +1370,20 @@ void sound_init()
mask |= sfx_WARRIOR; mask |= sfx_WARRIOR;
if (!gbIsSpawn) if (!gbIsSpawn)
mask |= (sfx_ROGUE | sfx_SORCEROR); mask |= (sfx_ROGUE | sfx_SORCEROR);
#ifdef HELLFIRE if (gbIsHellfire)
mask |= sfx_MONK; mask |= sfx_MONK;
#endif
} else if (plr[myplr]._pClass == PC_WARRIOR) { } else if (plr[myplr]._pClass == PC_WARRIOR) {
mask |= sfx_WARRIOR; mask |= sfx_WARRIOR;
} else if (plr[myplr]._pClass == PC_ROGUE) { } else if (plr[myplr]._pClass == PC_ROGUE) {
mask |= sfx_ROGUE; mask |= sfx_ROGUE;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
mask |= sfx_SORCEROR; mask |= sfx_SORCEROR;
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
mask |= sfx_MONK; mask |= sfx_MONK;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
mask |= sfx_ROGUE; mask |= sfx_ROGUE;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
mask |= sfx_WARRIOR; mask |= sfx_WARRIOR;
#endif
} else { } else {
app_fatal("effects:1"); app_fatal("effects:1");
} }

197
Source/inv.cpp

@ -124,7 +124,6 @@ void InitInv()
pInvCels = LoadFileInMem("Data\\Inv\\Inv_rog.CEL", NULL); pInvCels = LoadFileInMem("Data\\Inv\\Inv_rog.CEL", NULL);
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
pInvCels = LoadFileInMem("Data\\Inv\\Inv_Sor.CEL", NULL); pInvCels = LoadFileInMem("Data\\Inv\\Inv_Sor.CEL", NULL);
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
if (gbIsSpawn) if (gbIsSpawn)
pInvCels = LoadFileInMem("Data\\Inv\\Inv_Sor.CEL", NULL); pInvCels = LoadFileInMem("Data\\Inv\\Inv_Sor.CEL", NULL);
@ -134,7 +133,6 @@ void InitInv()
pInvCels = LoadFileInMem("Data\\Inv\\Inv_rog.CEL", NULL); pInvCels = LoadFileInMem("Data\\Inv\\Inv_rog.CEL", NULL);
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
pInvCels = LoadFileInMem("Data\\Inv\\Inv.CEL", NULL); pInvCels = LoadFileInMem("Data\\Inv\\Inv.CEL", NULL);
#endif
} }
invflag = FALSE; invflag = FALSE;
@ -191,37 +189,25 @@ void DrawInv()
if (!plr[myplr].InvBody[INVLOC_HEAD]._iStatFlag) { if (!plr[myplr].InvBody[INVLOC_HEAD]._iStatFlag) {
color = ICOL_RED; color = ICOL_RED;
} }
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelBlitOutline(color, RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width); CelBlitOutline(color, RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelBlitOutline(color, RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width); CelBlitOutline(color, RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width);
} }
#endif
} }
if (plr[myplr].InvBody[INVLOC_HEAD]._iStatFlag) { if (plr[myplr].InvBody[INVLOC_HEAD]._iStatFlag) {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelClippedDraw(RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width); CelClippedDraw(RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelClippedDraw(RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width); CelClippedDraw(RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width);
} }
#endif
} else { } else {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelDrawLightRed(RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width, 1); CelDrawLightRed(RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width, 1);
#ifdef HELLFIRE
} else { } else {
CelDrawLightRed(RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 1); CelDrawLightRed(RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 1);
} }
#endif
} }
} }
@ -239,37 +225,25 @@ void DrawInv()
if (!plr[myplr].InvBody[INVLOC_RING_LEFT]._iStatFlag) { if (!plr[myplr].InvBody[INVLOC_RING_LEFT]._iStatFlag) {
color = ICOL_RED; color = ICOL_RED;
} }
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelBlitOutline(color, RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width); CelBlitOutline(color, RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelBlitOutline(color, RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width); CelBlitOutline(color, RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width);
} }
#endif
} }
if (plr[myplr].InvBody[INVLOC_RING_LEFT]._iStatFlag) { if (plr[myplr].InvBody[INVLOC_RING_LEFT]._iStatFlag) {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelClippedDraw(RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width); CelClippedDraw(RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelClippedDraw(RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width); CelClippedDraw(RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width);
} }
#endif
} else { } else {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelDrawLightRed(RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width, 1); CelDrawLightRed(RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width, 1);
#ifdef HELLFIRE
} else { } else {
CelDrawLightRed(RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 1); CelDrawLightRed(RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 1);
} }
#endif
} }
} }
@ -287,37 +261,25 @@ void DrawInv()
if (!plr[myplr].InvBody[INVLOC_RING_RIGHT]._iStatFlag) { if (!plr[myplr].InvBody[INVLOC_RING_RIGHT]._iStatFlag) {
color = ICOL_RED; color = ICOL_RED;
} }
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelBlitOutline(color, RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width); CelBlitOutline(color, RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelBlitOutline(color, RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width); CelBlitOutline(color, RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width);
} }
#endif
} }
if (plr[myplr].InvBody[INVLOC_RING_RIGHT]._iStatFlag) { if (plr[myplr].InvBody[INVLOC_RING_RIGHT]._iStatFlag) {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelClippedDraw(RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width); CelClippedDraw(RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelClippedDraw(RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width); CelClippedDraw(RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width);
} }
#endif
} else { } else {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelDrawLightRed(RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width, 1); CelDrawLightRed(RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width, 1);
#ifdef HELLFIRE
} else { } else {
CelDrawLightRed(RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 1); CelDrawLightRed(RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 1);
} }
#endif
} }
} }
@ -335,37 +297,25 @@ void DrawInv()
if (!plr[myplr].InvBody[INVLOC_AMULET]._iStatFlag) { if (!plr[myplr].InvBody[INVLOC_AMULET]._iStatFlag) {
color = ICOL_RED; color = ICOL_RED;
} }
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelBlitOutline(color, RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width); CelBlitOutline(color, RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelBlitOutline(color, RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width); CelBlitOutline(color, RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width);
} }
#endif
} }
if (plr[myplr].InvBody[INVLOC_AMULET]._iStatFlag) { if (plr[myplr].InvBody[INVLOC_AMULET]._iStatFlag) {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelClippedDraw(RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width); CelClippedDraw(RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelClippedDraw(RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width); CelClippedDraw(RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width);
} }
#endif
} else { } else {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelDrawLightRed(RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width, 1); CelDrawLightRed(RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width, 1);
#ifdef HELLFIRE
} else { } else {
CelDrawLightRed(RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 1); CelDrawLightRed(RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 1);
} }
#endif
} }
} }
@ -386,37 +336,25 @@ void DrawInv()
if (!plr[myplr].InvBody[INVLOC_HAND_LEFT]._iStatFlag) { if (!plr[myplr].InvBody[INVLOC_HAND_LEFT]._iStatFlag) {
color = ICOL_RED; color = ICOL_RED;
} }
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelBlitOutline(color, screen_x, screen_y, pCursCels, frame, frame_width); CelBlitOutline(color, screen_x, screen_y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelBlitOutline(color, screen_x, screen_y, pCursCels2, frame - 179, frame_width); CelBlitOutline(color, screen_x, screen_y, pCursCels2, frame - 179, frame_width);
} }
#endif
} }
if (plr[myplr].InvBody[INVLOC_HAND_LEFT]._iStatFlag) { if (plr[myplr].InvBody[INVLOC_HAND_LEFT]._iStatFlag) {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelClippedDraw(screen_x, screen_y, pCursCels, frame, frame_width); CelClippedDraw(screen_x, screen_y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelClippedDraw(screen_x, screen_y, pCursCels2, frame - 179, frame_width); CelClippedDraw(screen_x, screen_y, pCursCels2, frame - 179, frame_width);
} }
#endif
} else { } else {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelDrawLightRed(screen_x, screen_y, pCursCels, frame, frame_width, 1); CelDrawLightRed(screen_x, screen_y, pCursCels, frame, frame_width, 1);
#ifdef HELLFIRE
} else { } else {
CelDrawLightRed(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 1); CelDrawLightRed(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 1);
} }
#endif
} }
if (plr[myplr].InvBody[INVLOC_HAND_LEFT]._iLoc == ILOC_TWOHAND) { if (plr[myplr].InvBody[INVLOC_HAND_LEFT]._iLoc == ILOC_TWOHAND) {
@ -432,15 +370,11 @@ void DrawInv()
pBuff = frame_width == INV_SLOT_SIZE_PX pBuff = frame_width == INV_SLOT_SIZE_PX
? &gpBuffer[SCREENXY(RIGHT_PANEL_X + 197, SCREEN_Y)] ? &gpBuffer[SCREENXY(RIGHT_PANEL_X + 197, SCREEN_Y)]
: &gpBuffer[SCREENXY(RIGHT_PANEL_X + 183, SCREEN_Y)]; : &gpBuffer[SCREENXY(RIGHT_PANEL_X + 183, SCREEN_Y)];
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelClippedBlitLightTrans(pBuff, pCursCels, frame, frame_width); CelClippedBlitLightTrans(pBuff, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelClippedBlitLightTrans(pBuff, pCursCels2, frame - 179, frame_width); CelClippedBlitLightTrans(pBuff, pCursCels2, frame - 179, frame_width);
} }
#endif
cel_transparency_active = FALSE; cel_transparency_active = FALSE;
#ifdef HELLFIRE #ifdef HELLFIRE
@ -465,37 +399,25 @@ void DrawInv()
if (!plr[myplr].InvBody[INVLOC_HAND_RIGHT]._iStatFlag) { if (!plr[myplr].InvBody[INVLOC_HAND_RIGHT]._iStatFlag) {
color = ICOL_RED; color = ICOL_RED;
} }
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelBlitOutline(color, screen_x, screen_y, pCursCels, frame, frame_width); CelBlitOutline(color, screen_x, screen_y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelBlitOutline(color, screen_x, screen_y, pCursCels2, frame - 179, frame_width); CelBlitOutline(color, screen_x, screen_y, pCursCels2, frame - 179, frame_width);
} }
#endif
} }
if (plr[myplr].InvBody[INVLOC_HAND_RIGHT]._iStatFlag) { if (plr[myplr].InvBody[INVLOC_HAND_RIGHT]._iStatFlag) {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelClippedDraw(screen_x, screen_y, pCursCels, frame, frame_width); CelClippedDraw(screen_x, screen_y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelClippedDraw(screen_x, screen_y, pCursCels2, frame - 179, frame_width); CelClippedDraw(screen_x, screen_y, pCursCels2, frame - 179, frame_width);
} }
#endif
} else { } else {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelDrawLightRed(screen_x, screen_y, pCursCels, frame, frame_width, 1); CelDrawLightRed(screen_x, screen_y, pCursCels, frame, frame_width, 1);
#ifdef HELLFIRE
} else { } else {
CelDrawLightRed(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 1); CelDrawLightRed(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 1);
} }
#endif
} }
} }
@ -513,37 +435,25 @@ void DrawInv()
if (!plr[myplr].InvBody[INVLOC_CHEST]._iStatFlag) { if (!plr[myplr].InvBody[INVLOC_CHEST]._iStatFlag) {
color = ICOL_RED; color = ICOL_RED;
} }
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelBlitOutline(color, RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width); CelBlitOutline(color, RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelBlitOutline(color, RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width); CelBlitOutline(color, RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width);
} }
#endif
} }
if (plr[myplr].InvBody[INVLOC_CHEST]._iStatFlag) { if (plr[myplr].InvBody[INVLOC_CHEST]._iStatFlag) {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelClippedDraw(RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width); CelClippedDraw(RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelClippedDraw(RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width); CelClippedDraw(RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width);
} }
#endif
} else { } else {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelDrawLightRed(RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width, 1); CelDrawLightRed(RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width, 1);
#ifdef HELLFIRE
} else { } else {
CelDrawLightRed(RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 1); CelDrawLightRed(RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 1);
} }
#endif
} }
} }
@ -575,15 +485,12 @@ void DrawInv()
if (!plr[myplr].InvList[ii]._iStatFlag) { if (!plr[myplr].InvList[ii]._iStatFlag) {
color = ICOL_RED; color = ICOL_RED;
} }
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelBlitOutline( CelBlitOutline(
color, color,
InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X, InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels, frame, frame_width); pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelBlitOutline( CelBlitOutline(
color, color,
@ -591,41 +498,32 @@ void DrawInv()
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels2, frame - 179, frame_width); pCursCels2, frame - 179, frame_width);
} }
#endif
} }
if (plr[myplr].InvList[ii]._iStatFlag) { if (plr[myplr].InvList[ii]._iStatFlag) {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelClippedDraw( CelClippedDraw(
InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X, InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels, frame, frame_width); pCursCels, frame, frame_width);
#ifdef HELLFIRE
} else { } else {
CelClippedDraw( CelClippedDraw(
InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X, InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels2, frame - 179, frame_width); pCursCels2, frame - 179, frame_width);
} }
#endif
} else { } else {
#ifdef HELLFIRE
if (frame <= 179) { if (frame <= 179) {
#endif
CelDrawLightRed( CelDrawLightRed(
InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X, InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels, frame, frame_width, 1); pCursCels, frame, frame_width, 1);
#ifdef HELLFIRE
} else { } else {
CelDrawLightRed( CelDrawLightRed(
InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X, InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels2, frame - 179, frame_width, 1); pCursCels2, frame - 179, frame_width, 1);
} }
#endif
} }
} }
} }
@ -658,35 +556,23 @@ void DrawInvBelt()
if (!plr[myplr].SpdList[i]._iStatFlag) if (!plr[myplr].SpdList[i]._iStatFlag)
color = ICOL_RED; color = ICOL_RED;
if (!sgbControllerActive || invflag) { if (!sgbControllerActive || invflag) {
#ifdef HELLFIRE
if (frame <= 179) if (frame <= 179)
#endif
CelBlitOutline(color, InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels, frame, frame_width); CelBlitOutline(color, InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels, frame, frame_width);
#ifdef HELLFIRE
else else
CelBlitOutline(color, InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels2, frame - 179, frame_width); CelBlitOutline(color, InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels2, frame - 179, frame_width);
#endif
} }
} }
if (plr[myplr].SpdList[i]._iStatFlag) { if (plr[myplr].SpdList[i]._iStatFlag) {
#ifdef HELLFIRE
if (frame <= 179) if (frame <= 179)
#endif
CelClippedDraw(InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels, frame, frame_width); CelClippedDraw(InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels, frame, frame_width);
#ifdef HELLFIRE
else else
CelClippedDraw(InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels2, frame - 179, frame_width); CelClippedDraw(InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels2, frame - 179, frame_width);
#endif
} else { } else {
#ifdef HELLFIRE
if (frame <= 179) if (frame <= 179)
#endif
CelDrawLightRed(InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels, frame, frame_width, 1); CelDrawLightRed(InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels, frame, frame_width, 1);
#ifdef HELLFIRE
else else
CelDrawLightRed(InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels2, frame - 179, frame_width, 1); CelDrawLightRed(InvRect[i + SLOTXY_BELT_FIRST].X + PANEL_X, InvRect[i + SLOTXY_BELT_FIRST].Y + PANEL_Y - 1, pCursCels2, frame - 179, frame_width, 1);
#endif
} }
if (AllItemsList[plr[myplr].SpdList[i].IDidx].iUsable if (AllItemsList[plr[myplr].SpdList[i].IDidx].iUsable
@ -963,19 +849,11 @@ BOOL GoldAutoPlace(int pnum)
BOOL WeaponAutoPlace(int pnum) BOOL WeaponAutoPlace(int pnum)
{ {
#ifdef HELLFIRE
if (plr[pnum]._pClass == PC_MONK) if (plr[pnum]._pClass == PC_MONK)
return FALSE; return FALSE;
#endif
if (plr[pnum].HoldItem._iLoc != ILOC_TWOHAND if (plr[pnum].HoldItem._iLoc != ILOC_TWOHAND
#ifdef HELLFIRE || (plr[pnum]._pClass == PC_BARBARIAN && (plr[pnum].HoldItem._itype == ITYPE_SWORD || plr[pnum].HoldItem._itype == ITYPE_MACE))) {
|| (plr[pnum]._pClass == PC_BARBARIAN && (plr[pnum].HoldItem._itype == ITYPE_SWORD || plr[pnum].HoldItem._itype == ITYPE_MACE)) if (plr[pnum]._pClass != PC_BARD) {
#endif
) {
#ifdef HELLFIRE
if (plr[pnum]._pClass != PC_BARD)
#endif
{
if (plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iClass == ICLASS_WEAPON) if (plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iClass == ICLASS_WEAPON)
return FALSE; return FALSE;
if (plr[pnum].InvBody[INVLOC_HAND_RIGHT]._itype != ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iClass == ICLASS_WEAPON) if (plr[pnum].InvBody[INVLOC_HAND_RIGHT]._itype != ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iClass == ICLASS_WEAPON)
@ -1068,12 +946,10 @@ void CheckInvPaste(int pnum, int mx, int my)
if (plr[pnum].HoldItem._iLoc == il) if (plr[pnum].HoldItem._iLoc == il)
done = TRUE; done = TRUE;
if (il == ILOC_ONEHAND && plr[pnum].HoldItem._iLoc == ILOC_TWOHAND) { if (il == ILOC_ONEHAND && plr[pnum].HoldItem._iLoc == ILOC_TWOHAND) {
#ifdef HELLFIRE
if (plr[pnum]._pClass == PC_BARBARIAN if (plr[pnum]._pClass == PC_BARBARIAN
&& (plr[pnum].HoldItem._itype == ITYPE_SWORD || plr[pnum].HoldItem._itype == ITYPE_MACE)) && (plr[pnum].HoldItem._itype == ITYPE_SWORD || plr[pnum].HoldItem._itype == ITYPE_MACE))
il = ILOC_ONEHAND; il = ILOC_ONEHAND;
else else
#endif
il = ILOC_TWOHAND; il = ILOC_TWOHAND;
done = TRUE; done = TRUE;
} }
@ -1149,14 +1025,12 @@ void CheckInvPaste(int pnum, int mx, int my)
PlaySFX(PS_ROGUE13); PlaySFX(PS_ROGUE13);
else if (plr[pnum]._pClass == PC_SORCERER) else if (plr[pnum]._pClass == PC_SORCERER)
PlaySFX(PS_MAGE13); PlaySFX(PS_MAGE13);
#ifdef HELLFIRE
else if (plr[pnum]._pClass == PC_MONK) else if (plr[pnum]._pClass == PC_MONK)
PlaySFX(PS_MONK13); PlaySFX(PS_MONK13);
else if (plr[pnum]._pClass == PC_BARD) else if (plr[pnum]._pClass == PC_BARD)
PlaySFX(PS_ROGUE13); PlaySFX(PS_ROGUE13);
else if (plr[pnum]._pClass == PC_BARBARIAN) else if (plr[pnum]._pClass == PC_BARBARIAN)
PlaySFX(PS_MAGE13); PlaySFX(PS_MAGE13);
#endif
} }
if (!done) if (!done)
@ -1228,15 +1102,9 @@ void CheckInvPaste(int pnum, int mx, int my)
} }
if (plr[pnum].InvBody[INVLOC_HAND_RIGHT]._itype == ITYPE_NONE) { if (plr[pnum].InvBody[INVLOC_HAND_RIGHT]._itype == ITYPE_NONE) {
if ((plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_NONE || plr[pnum].InvBody[INVLOC_HAND_LEFT]._iLoc != ILOC_TWOHAND) if ((plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_NONE || plr[pnum].InvBody[INVLOC_HAND_LEFT]._iLoc != ILOC_TWOHAND)
#ifdef HELLFIRE || (plr[pnum]._pClass == PC_BARBARIAN && (plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_SWORD || plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_MACE))) {
|| (plr[pnum]._pClass == PC_BARBARIAN && (plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_SWORD || plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_MACE))
#endif
) {
if ((plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_NONE || plr[pnum].InvBody[INVLOC_HAND_LEFT]._iClass != plr[pnum].HoldItem._iClass) if ((plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_NONE || plr[pnum].InvBody[INVLOC_HAND_LEFT]._iClass != plr[pnum].HoldItem._iClass)
#ifdef HELLFIRE || (plr[pnum]._pClass == PC_BARD && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iClass == ICLASS_WEAPON && plr[pnum].HoldItem._iClass == ICLASS_WEAPON)) {
|| (plr[pnum]._pClass == PC_BARD && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iClass == ICLASS_WEAPON && plr[pnum].HoldItem._iClass == ICLASS_WEAPON)
#endif
) {
NetSendCmdChItem(FALSE, INVLOC_HAND_RIGHT); NetSendCmdChItem(FALSE, INVLOC_HAND_RIGHT);
plr[pnum].InvBody[INVLOC_HAND_RIGHT] = plr[pnum].HoldItem; plr[pnum].InvBody[INVLOC_HAND_RIGHT] = plr[pnum].HoldItem;
break; break;
@ -1365,10 +1233,8 @@ void CheckInvPaste(int pnum, int mx, int my)
plr[pnum].InvList[il]._iCurs = ICURS_GOLD_SMALL; plr[pnum].InvList[il]._iCurs = ICURS_GOLD_SMALL;
else else
plr[pnum].InvList[il]._iCurs = ICURS_GOLD_MEDIUM; plr[pnum].InvList[il]._iCurs = ICURS_GOLD_MEDIUM;
#ifdef HELLFIRE
} else { } else {
plr[pnum].InvList[ii]._iCurs = ICURS_GOLD_LARGE; plr[pnum].InvList[ii]._iCurs = ICURS_GOLD_LARGE;
#endif
} }
} }
} else { } else {
@ -1769,16 +1635,13 @@ void CheckQuestItem(int pnum)
sfxdnum = PS_ROGUE95; sfxdnum = PS_ROGUE95;
} else if (plr[pnum]._pClass == PC_SORCERER) { } else if (plr[pnum]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE95; sfxdnum = PS_MAGE95;
} } else if (plr[pnum]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[pnum]._pClass == PC_MONK) {
sfxdnum = PS_MONK95; sfxdnum = PS_MONK95;
} else if (plr[pnum]._pClass == PC_BARD) { } else if (plr[pnum]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE95; sfxdnum = PS_ROGUE95;
} else if (plr[pnum]._pClass == PC_BARBARIAN) { } else if (plr[pnum]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR95; sfxdnum = PS_WARR95;
} }
#endif
quests[Q_MUSHROOM]._qvar1 = QS_MUSHPICKED; quests[Q_MUSHROOM]._qvar1 = QS_MUSHPICKED;
} }
if (plr[pnum].HoldItem.IDidx == IDI_ANVIL) { if (plr[pnum].HoldItem.IDidx == IDI_ANVIL) {
@ -1794,16 +1657,13 @@ void CheckQuestItem(int pnum)
sfxdnum = PS_ROGUE89; sfxdnum = PS_ROGUE89;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE89; sfxdnum = PS_MAGE89;
} } else if (plr[myplr]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK89; sfxdnum = PS_MONK89;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE89; sfxdnum = PS_ROGUE89;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR89; sfxdnum = PS_WARR89;
} }
#endif
} }
} }
if (plr[pnum].HoldItem.IDidx == IDI_GLDNELIX) { if (plr[pnum].HoldItem.IDidx == IDI_GLDNELIX) {
@ -1814,16 +1674,13 @@ void CheckQuestItem(int pnum)
sfxdnum = PS_ROGUE88; sfxdnum = PS_ROGUE88;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE88; sfxdnum = PS_MAGE88;
} } else if (plr[myplr]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK88; sfxdnum = PS_MONK88;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE88; sfxdnum = PS_ROGUE88;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR88; sfxdnum = PS_WARR88;
} }
#endif
} }
if (plr[pnum].HoldItem.IDidx == IDI_ROCK) { if (plr[pnum].HoldItem.IDidx == IDI_ROCK) {
if (quests[Q_ROCK]._qactive == QUEST_INIT) { if (quests[Q_ROCK]._qactive == QUEST_INIT) {
@ -1838,16 +1695,13 @@ void CheckQuestItem(int pnum)
sfxdnum = PS_ROGUE87; sfxdnum = PS_ROGUE87;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE87; sfxdnum = PS_MAGE87;
} } else if (plr[myplr]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK87; sfxdnum = PS_MONK87;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE87; sfxdnum = PS_ROGUE87;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR87; sfxdnum = PS_WARR87;
} }
#endif
} }
} }
if (plr[pnum].HoldItem.IDidx == IDI_ARMOFVAL) { if (plr[pnum].HoldItem.IDidx == IDI_ARMOFVAL) {
@ -1859,17 +1713,14 @@ void CheckQuestItem(int pnum)
sfxdnum = PS_ROGUE91; sfxdnum = PS_ROGUE91;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE91; sfxdnum = PS_MAGE91;
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK91; sfxdnum = PS_MONK91;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE91; sfxdnum = PS_ROGUE91;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR91; sfxdnum = PS_WARR91;
#endif
} }
} }
#ifdef HELLFIRE
if (plr[pnum].HoldItem.IDidx == IDI_MAPOFDOOM) { if (plr[pnum].HoldItem.IDidx == IDI_MAPOFDOOM) {
quests[Q_GRAVE]._qlog = FALSE; quests[Q_GRAVE]._qlog = FALSE;
quests[Q_GRAVE]._qactive = QUEST_ACTIVE; quests[Q_GRAVE]._qactive = QUEST_ACTIVE;
@ -1944,7 +1795,6 @@ void CheckQuestItem(int pnum)
item[item_num] = tmp; item[item_num] = tmp;
} }
} }
#endif
} }
void InvGetItem(int pnum, int ii) void InvGetItem(int pnum, int ii)
@ -2126,7 +1976,6 @@ void AutoGetItem(int pnum, int ii)
} }
if (done) { if (done) {
dItem[item[ii]._ix][item[ii]._iy] = 0; dItem[item[ii]._ix][item[ii]._iy] = 0;
#ifdef HELLFIRE
if (currlevel == 21 && item[ii]._ix == CornerStone.x && item[ii]._iy == CornerStone.y) { if (currlevel == 21 && item[ii]._ix == CornerStone.x && item[ii]._iy == CornerStone.y) {
CornerStone.item.IDidx = -1; CornerStone.item.IDidx = -1;
CornerStone.item._itype = ITYPE_MISC; CornerStone.item._itype = ITYPE_MISC;
@ -2137,7 +1986,6 @@ void AutoGetItem(int pnum, int ii)
CornerStone.item._iIdentified = FALSE; CornerStone.item._iIdentified = FALSE;
CornerStone.item._iPostDraw = FALSE; CornerStone.item._iPostDraw = FALSE;
} }
#endif
i = 0; i = 0;
while (i < numitems) { while (i < numitems) {
if (itemactive[i] == ii) { if (itemactive[i] == ii) {
@ -2155,14 +2003,12 @@ void AutoGetItem(int pnum, int ii)
PlaySFX(random_(0, 3) + PS_ROGUE14); PlaySFX(random_(0, 3) + PS_ROGUE14);
} else if (plr[pnum]._pClass == PC_SORCERER) { } else if (plr[pnum]._pClass == PC_SORCERER) {
PlaySFX(random_(0, 3) + PS_MAGE14); PlaySFX(random_(0, 3) + PS_MAGE14);
#ifdef HELLFIRE
} else if (plr[pnum]._pClass == PC_MONK) { } else if (plr[pnum]._pClass == PC_MONK) {
PlaySFX(random_(0, 3) + PS_MONK14); PlaySFX(random_(0, 3) + PS_MONK14);
} else if (plr[pnum]._pClass == PC_BARD) { } else if (plr[pnum]._pClass == PC_BARD) {
PlaySFX(random_(0, 3) + PS_ROGUE14); PlaySFX(random_(0, 3) + PS_ROGUE14);
} else if (plr[pnum]._pClass == PC_BARBARIAN) { } else if (plr[pnum]._pClass == PC_BARBARIAN) {
PlaySFX(random_(0, 3) + PS_WARR14); PlaySFX(random_(0, 3) + PS_WARR14);
#endif
} }
} }
plr[pnum].HoldItem = item[ii]; plr[pnum].HoldItem = item[ii];
@ -2216,7 +2062,6 @@ void SyncGetItem(int x, int y, int idx, WORD ci, int iseed)
if (ii != -1) { if (ii != -1) {
dItem[item[ii]._ix][item[ii]._iy] = 0; dItem[item[ii]._ix][item[ii]._iy] = 0;
#ifdef HELLFIRE
if (currlevel == 21 && item[ii]._ix == CornerStone.x && item[ii]._iy == CornerStone.y) { if (currlevel == 21 && item[ii]._ix == CornerStone.x && item[ii]._iy == CornerStone.y) {
CornerStone.item.IDidx = -1; CornerStone.item.IDidx = -1;
CornerStone.item._itype = ITYPE_MISC; CornerStone.item._itype = ITYPE_MISC;
@ -2227,7 +2072,6 @@ void SyncGetItem(int x, int y, int idx, WORD ci, int iseed)
CornerStone.item._iIdentified = FALSE; CornerStone.item._iIdentified = FALSE;
CornerStone.item._iPostDraw = FALSE; CornerStone.item._iPostDraw = FALSE;
} }
#endif
i = 0; i = 0;
while (i < numitems) { while (i < numitems) {
if (itemactive[i] == ii) { if (itemactive[i] == ii) {
@ -2372,8 +2216,7 @@ int InvPutItem(int pnum, int x, int y)
} }
} }
#ifdef HELLFIRE if (gbIsHellfire && currlevel == 0) {
if (currlevel == 0) {
yp = cursmy; yp = cursmy;
xp = cursmx; xp = cursmx;
if (plr[pnum].HoldItem._iCurs == ICURS_RUNE_BOMB && xp >= 79 && xp <= 82 && yp >= 61 && yp <= 64) { if (plr[pnum].HoldItem._iCurs == ICURS_RUNE_BOMB && xp >= 79 && xp <= 82 && yp >= 61 && yp <= 64) {
@ -2394,7 +2237,6 @@ int InvPutItem(int pnum, int x, int y)
return -1; return -1;
} }
} }
#endif
CanPut(x, y); //if (!CanPut(x, y)) { CanPut(x, y); //if (!CanPut(x, y)) {
// assertion_failed(__LINE__, __FILE__, "CanPut(x,y)"); // assertion_failed(__LINE__, __FILE__, "CanPut(x,y)");
//} //}
@ -2408,14 +2250,14 @@ int InvPutItem(int pnum, int x, int y)
item[ii]._iy = y; item[ii]._iy = y;
RespawnItem(ii, TRUE); RespawnItem(ii, TRUE);
numitems++; numitems++;
#ifdef HELLFIRE
if (currlevel == 21 && x == CornerStone.x && y == CornerStone.y) { if (currlevel == 21 && x == CornerStone.x && y == CornerStone.y) {
CornerStone.item = item[ii]; CornerStone.item = item[ii];
InitQTextMsg(296); InitQTextMsg(296);
quests[Q_CORNSTN]._qlog = FALSE; quests[Q_CORNSTN]._qlog = FALSE;
quests[Q_CORNSTN]._qactive = QUEST_DONE; quests[Q_CORNSTN]._qactive = QUEST_DONE;
} }
#endif
NewCursor(CURSOR_HAND); NewCursor(CURSOR_HAND);
return ii; return ii;
} }
@ -2508,14 +2350,12 @@ int SyncPutItem(int pnum, int x, int y, int idx, WORD icreateinfo, int iseed, in
item[ii]._iy = y; item[ii]._iy = y;
RespawnItem(ii, TRUE); RespawnItem(ii, TRUE);
numitems++; numitems++;
#ifdef HELLFIRE
if (currlevel == 21 && x == CornerStone.x && y == CornerStone.y) { if (currlevel == 21 && x == CornerStone.x && y == CornerStone.y) {
CornerStone.item = item[ii]; CornerStone.item = item[ii];
InitQTextMsg(296); InitQTextMsg(296);
quests[Q_CORNSTN]._qlog = 0; quests[Q_CORNSTN]._qlog = 0;
quests[Q_CORNSTN]._qactive = 3; quests[Q_CORNSTN]._qactive = 3;
} }
#endif
return ii; return ii;
} }
@ -2762,16 +2602,13 @@ BOOL UseInvItem(int pnum, int cii)
sfxdnum = PS_ROGUE95; sfxdnum = PS_ROGUE95;
} else if (plr[pnum]._pClass == PC_SORCERER) { } else if (plr[pnum]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE95; sfxdnum = PS_MAGE95;
} } else if (plr[pnum]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[pnum]._pClass == PC_MONK) {
sfxdnum = PS_MONK95; sfxdnum = PS_MONK95;
} else if (plr[pnum]._pClass == PC_BARD) { } else if (plr[pnum]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE95; sfxdnum = PS_ROGUE95;
} else if (plr[pnum]._pClass == PC_BARBARIAN) { } else if (plr[pnum]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR95; sfxdnum = PS_WARR95;
} }
#endif
return TRUE; return TRUE;
case IDI_FUNGALTM: case IDI_FUNGALTM:
PlaySFX(IS_IBOOK); PlaySFX(IS_IBOOK);
@ -2782,14 +2619,12 @@ BOOL UseInvItem(int pnum, int cii)
sfxdnum = PS_ROGUE29; sfxdnum = PS_ROGUE29;
} else if (plr[pnum]._pClass == PC_SORCERER) { } else if (plr[pnum]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE29; sfxdnum = PS_MAGE29;
#ifdef HELLFIRE
} else if (plr[pnum]._pClass == PC_MONK) { } else if (plr[pnum]._pClass == PC_MONK) {
sfxdnum = PS_MONK29; sfxdnum = PS_MONK29;
} else if (plr[pnum]._pClass == PC_BARD) { } else if (plr[pnum]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE29; sfxdnum = PS_ROGUE29;
} else if (plr[pnum]._pClass == PC_BARBARIAN) { } else if (plr[pnum]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR29; sfxdnum = PS_WARR29;
#endif
} }
return TRUE; return TRUE;
} }
@ -2804,14 +2639,12 @@ BOOL UseInvItem(int pnum, int cii)
PlaySFX(PS_ROGUE13); PlaySFX(PS_ROGUE13);
} else if (plr[pnum]._pClass == PC_SORCERER) { } else if (plr[pnum]._pClass == PC_SORCERER) {
PlaySFX(PS_MAGE13); PlaySFX(PS_MAGE13);
#ifdef HELLFIRE
} else if (plr[pnum]._pClass == PC_MONK) { } else if (plr[pnum]._pClass == PC_MONK) {
PlaySFX(PS_MONK13); PlaySFX(PS_MONK13);
} else if (plr[pnum]._pClass == PC_BARD) { } else if (plr[pnum]._pClass == PC_BARD) {
PlaySFX(PS_ROGUE13); PlaySFX(PS_ROGUE13);
} else if (plr[pnum]._pClass == PC_BARBARIAN) { } else if (plr[pnum]._pClass == PC_BARBARIAN) {
PlaySFX(PS_WARR13); PlaySFX(PS_WARR13);
#endif
} }
return TRUE; return TRUE;
} }
@ -2834,11 +2667,9 @@ BOOL UseInvItem(int pnum, int cii)
return TRUE; return TRUE;
} }
#ifdef HELLFIRE
if (Item->_iMiscId > IMISC_RUNEFIRST && Item->_iMiscId < IMISC_RUNELAST && currlevel == 0) { if (Item->_iMiscId > IMISC_RUNEFIRST && Item->_iMiscId < IMISC_RUNELAST && currlevel == 0) {
return TRUE; return TRUE;
} }
#endif
idata = ItemCAnimTbl[Item->_iCurs]; idata = ItemCAnimTbl[Item->_iCurs];
if (Item->_iMiscId == IMISC_BOOK) if (Item->_iMiscId == IMISC_BOOK)
@ -2849,25 +2680,21 @@ BOOL UseInvItem(int pnum, int cii)
UseItem(pnum, Item->_iMiscId, Item->_iSpell); UseItem(pnum, Item->_iMiscId, Item->_iSpell);
if (speedlist) { if (speedlist) {
#ifdef HELLFIRE
if (plr[pnum].SpdList[c]._iMiscId == IMISC_NOTE) { if (plr[pnum].SpdList[c]._iMiscId == IMISC_NOTE) {
InitQTextMsg(322); InitQTextMsg(322);
invflag = FALSE; invflag = FALSE;
return TRUE; return TRUE;
} }
#endif
RemoveSpdBarItem(pnum, c); RemoveSpdBarItem(pnum, c);
return TRUE; return TRUE;
} else { } else {
if (plr[pnum].InvList[c]._iMiscId == IMISC_MAPOFDOOM) if (plr[pnum].InvList[c]._iMiscId == IMISC_MAPOFDOOM)
return TRUE; return TRUE;
#ifdef HELLFIRE
if (plr[pnum].InvList[c]._iMiscId == IMISC_NOTE) { if (plr[pnum].InvList[c]._iMiscId == IMISC_NOTE) {
InitQTextMsg(322); InitQTextMsg(322);
invflag = FALSE; invflag = FALSE;
return TRUE; return TRUE;
} }
#endif
RemoveInvItem(pnum, c); RemoveInvItem(pnum, c);
} }
return TRUE; return TRUE;

73
Source/items.cpp

@ -769,12 +769,10 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
maxd = 3; maxd = 3;
} }
#ifdef HELLFIRE
if (plr[p]._pClass == PC_MONK) { if (plr[p]._pClass == PC_MONK) {
mind = std::max(mind, plr[p]._pLevel >> 1); mind = std::max(mind, plr[p]._pLevel >> 1);
maxd = std::max(maxd, (int)plr[p]._pLevel); maxd = std::max(maxd, (int)plr[p]._pLevel);
} }
#endif
} }
#ifdef HELLFIRE #ifdef HELLFIRE
@ -844,9 +842,7 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
if (plr[p]._pClass == PC_ROGUE) { if (plr[p]._pClass == PC_ROGUE) {
plr[p]._pDamageMod = plr[p]._pLevel * (plr[p]._pStrength + plr[p]._pDexterity) / 200; plr[p]._pDamageMod = plr[p]._pLevel * (plr[p]._pStrength + plr[p]._pDexterity) / 200;
} } else if (plr[p]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[p]._pClass == PC_MONK) {
if (plr[p].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_STAFF) { if (plr[p].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_STAFF) {
if (plr[p].InvBody[INVLOC_HAND_RIGHT]._itype != ITYPE_STAFF && (plr[p].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_NONE || plr[p].InvBody[INVLOC_HAND_RIGHT]._itype != ITYPE_NONE)) { if (plr[p].InvBody[INVLOC_HAND_RIGHT]._itype != ITYPE_STAFF && (plr[p].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_NONE || plr[p].InvBody[INVLOC_HAND_RIGHT]._itype != ITYPE_NONE)) {
plr[p]._pDamageMod = plr[p]._pLevel * (plr[p]._pStrength + plr[p]._pDexterity) / 300; plr[p]._pDamageMod = plr[p]._pLevel * (plr[p]._pStrength + plr[p]._pDexterity) / 300;
@ -885,9 +881,7 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
plr[p]._pDamageMod += plr[p]._pLevel * plr[p]._pVitality / 100; plr[p]._pDamageMod += plr[p]._pLevel * plr[p]._pVitality / 100;
} }
plr[p]._pIAC += plr[p]._pLevel / 4; plr[p]._pIAC += plr[p]._pLevel / 4;
} } else {
#endif
else {
plr[p]._pDamageMod = plr[p]._pLevel * plr[p]._pStrength / 100; plr[p]._pDamageMod = plr[p]._pLevel * plr[p]._pStrength / 100;
} }
@ -898,13 +892,13 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
plr[p]._pISplLvlAdd = spllvladd; plr[p]._pISplLvlAdd = spllvladd;
plr[p]._pIEnAc = enac; plr[p]._pIEnAc = enac;
#ifdef HELLFIRE
if (plr[p]._pClass == PC_BARBARIAN) { if (plr[p]._pClass == PC_BARBARIAN) {
mr += plr[p]._pLevel; mr += plr[p]._pLevel;
fr += plr[p]._pLevel; fr += plr[p]._pLevel;
lr += plr[p]._pLevel; lr += plr[p]._pLevel;
} }
#ifdef HELLFIRE
if ((plr[p]._pSpellFlags & 4) == 4) { if ((plr[p]._pSpellFlags & 4) == 4) {
mr -= plr[p]._pLevel; mr -= plr[p]._pLevel;
fr -= plr[p]._pLevel; fr -= plr[p]._pLevel;
@ -929,31 +923,22 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
if (fr > MAXRESIST) if (fr > MAXRESIST)
fr = MAXRESIST; fr = MAXRESIST;
#ifdef HELLFIRE
else if (fr < 0) else if (fr < 0)
fr = 0; fr = 0;
#endif
plr[p]._pFireResist = fr; plr[p]._pFireResist = fr;
if (lr > MAXRESIST) if (lr > MAXRESIST)
lr = MAXRESIST; lr = MAXRESIST;
#ifdef HELLFIRE
else if (lr < 0) else if (lr < 0)
lr = 0; lr = 0;
#endif
plr[p]._pLghtResist = lr; plr[p]._pLghtResist = lr;
if (plr[p]._pClass == PC_WARRIOR) { if (plr[p]._pClass == PC_WARRIOR) {
vadd <<= 1; vadd <<= 1;
} } else if (plr[p]._pClass == PC_BARBARIAN) {
#ifdef HELLFIRE
else if (plr[p]._pClass == PC_BARBARIAN) {
vadd += vadd; vadd += vadd;
vadd += (vadd >> 2); vadd += (vadd >> 2);
} else if (plr[p]._pClass == PC_ROGUE || plr[p]._pClass == PC_MONK || plr[p]._pClass == PC_BARD) { } else if (plr[p]._pClass == PC_ROGUE || plr[p]._pClass == PC_MONK || plr[p]._pClass == PC_BARD) {
#else
if (plr[p]._pClass == PC_ROGUE) {
#endif
vadd += vadd >> 1; vadd += vadd >> 1;
} }
ihp += (vadd << 6); ihp += (vadd << 6);
@ -961,26 +946,17 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
if (plr[p]._pClass == PC_SORCERER) { if (plr[p]._pClass == PC_SORCERER) {
madd <<= 1; madd <<= 1;
} }
#ifdef HELLFIRE
if (plr[p]._pClass == PC_ROGUE || plr[p]._pClass == PC_MONK) { if (plr[p]._pClass == PC_ROGUE || plr[p]._pClass == PC_MONK) {
#else
if (plr[p]._pClass == PC_ROGUE) {
#endif
madd += madd >> 1; madd += madd >> 1;
} } else if (plr[p]._pClass == PC_BARD) {
#ifdef HELLFIRE
else if (plr[p]._pClass == PC_BARD) {
madd += (madd >> 2) + (madd >> 1); madd += (madd >> 2) + (madd >> 1);
} }
#endif
imana += (madd << 6); imana += (madd << 6);
plr[p]._pHitPoints = ihp + plr[p]._pHPBase; plr[p]._pHitPoints = ihp + plr[p]._pHPBase;
plr[p]._pMaxHP = ihp + plr[p]._pMaxHPBase; plr[p]._pMaxHP = ihp + plr[p]._pMaxHPBase;
#ifdef HELLFIRE
if (plr[p]._pHitPoints > plr[p]._pMaxHP) if (plr[p]._pHitPoints > plr[p]._pMaxHP)
plr[p]._pHitPoints = plr[p]._pMaxHP; plr[p]._pHitPoints = plr[p]._pMaxHP;
#endif
if (p == myplr && (plr[p]._pHitPoints >> 6) <= 0) { if (p == myplr && (plr[p]._pHitPoints >> 6) <= 0) {
SetPlayerHitPoints(p, 0); SetPlayerHitPoints(p, 0);
@ -988,10 +964,8 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
plr[p]._pMana = imana + plr[p]._pManaBase; plr[p]._pMana = imana + plr[p]._pManaBase;
plr[p]._pMaxMana = imana + plr[p]._pMaxManaBase; plr[p]._pMaxMana = imana + plr[p]._pMaxManaBase;
#ifdef HELLFIRE
if (plr[p]._pMana > plr[p]._pMaxMana) if (plr[p]._pMana > plr[p]._pMaxMana)
plr[p]._pMana = plr[p]._pMaxMana; plr[p]._pMana = plr[p]._pMaxMana;
#endif
plr[p]._pIFMinDam = fmin; plr[p]._pIFMinDam = fmin;
plr[p]._pIFMaxDam = fmax; plr[p]._pIFMaxDam = fmax;
@ -1005,7 +979,6 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
} }
plr[p]._pBlockFlag = FALSE; plr[p]._pBlockFlag = FALSE;
#ifdef HELLFIRE
if (plr[p]._pClass == PC_MONK) { if (plr[p]._pClass == PC_MONK) {
if (plr[p].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_STAFF && plr[p].InvBody[INVLOC_HAND_LEFT]._iStatFlag) { if (plr[p].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_STAFF && plr[p].InvBody[INVLOC_HAND_LEFT]._iStatFlag) {
plr[p]._pBlockFlag = TRUE; plr[p]._pBlockFlag = TRUE;
@ -1022,7 +995,6 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
if (plr[p].InvBody[INVLOC_HAND_RIGHT]._iClass == ICLASS_WEAPON && plr[p].InvBody[INVLOC_HAND_RIGHT]._iLoc != ILOC_TWOHAND && plr[p].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_NONE) if (plr[p].InvBody[INVLOC_HAND_RIGHT]._iClass == ICLASS_WEAPON && plr[p].InvBody[INVLOC_HAND_RIGHT]._iLoc != ILOC_TWOHAND && plr[p].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_NONE)
plr[p]._pBlockFlag = TRUE; plr[p]._pBlockFlag = TRUE;
} }
#endif
plr[p]._pwtype = WT_MELEE; plr[p]._pwtype = WT_MELEE;
g = 0; g = 0;
@ -1067,7 +1039,6 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
g++; g++;
} }
#ifdef HELLFIRE
if (plr[p].InvBody[INVLOC_CHEST]._itype == ITYPE_HARMOR && plr[p].InvBody[INVLOC_CHEST]._iStatFlag) { if (plr[p].InvBody[INVLOC_CHEST]._itype == ITYPE_HARMOR && plr[p].InvBody[INVLOC_CHEST]._iStatFlag) {
if (plr[p]._pClass == PC_MONK && plr[p].InvBody[INVLOC_CHEST]._iMagical == ITEM_QUALITY_UNIQUE) if (plr[p]._pClass == PC_MONK && plr[p].InvBody[INVLOC_CHEST]._iMagical == ITEM_QUALITY_UNIQUE)
plr[p]._pIAC += plr[p]._pLevel >> 1; plr[p]._pIAC += plr[p]._pLevel >> 1;
@ -1083,14 +1054,6 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
} else if (plr[p]._pClass == PC_MONK) { } else if (plr[p]._pClass == PC_MONK) {
plr[p]._pIAC += plr[p]._pLevel << 1; plr[p]._pIAC += plr[p]._pLevel << 1;
} }
#else
if (plr[p].InvBody[INVLOC_CHEST]._itype == ITYPE_MARMOR && plr[p].InvBody[INVLOC_CHEST]._iStatFlag) {
g += ANIM_ID_MEDIUM_ARMOR;
}
if (plr[p].InvBody[INVLOC_CHEST]._itype == ITYPE_HARMOR && plr[p].InvBody[INVLOC_CHEST]._iStatFlag) {
g += ANIM_ID_HEAVY_ARMOR;
}
#endif
if (plr[p]._pgfxnum != g && Loadgfx) { if (plr[p]._pgfxnum != g && Loadgfx) {
plr[p]._pgfxnum = g; plr[p]._pgfxnum = g;
@ -1457,22 +1420,13 @@ void CreatePlrItems(int p)
SetPlrHandItem(&plr[p].InvBody[INVLOC_HAND_LEFT], IDI_SORCEROR); SetPlrHandItem(&plr[p].InvBody[INVLOC_HAND_LEFT], IDI_SORCEROR);
GetPlrHandSeed(&plr[p].InvBody[INVLOC_HAND_LEFT]); GetPlrHandSeed(&plr[p].InvBody[INVLOC_HAND_LEFT]);
#ifdef HELLFIRE SetPlrHandItem(&plr[p].SpdList[0], gbIsHellfire ? IDI_HEAL : IDI_MANA);
SetPlrHandItem(&plr[p].SpdList[0], IDI_HEAL);
GetPlrHandSeed(&plr[p].SpdList[0]);
SetPlrHandItem(&plr[p].SpdList[1], IDI_HEAL);
GetPlrHandSeed(&plr[p].SpdList[1]);
#else
SetPlrHandItem(&plr[p].SpdList[0], IDI_MANA);
GetPlrHandSeed(&plr[p].SpdList[0]); GetPlrHandSeed(&plr[p].SpdList[0]);
SetPlrHandItem(&plr[p].SpdList[1], IDI_MANA); SetPlrHandItem(&plr[p].SpdList[1], gbIsHellfire ? IDI_HEAL : IDI_MANA);
GetPlrHandSeed(&plr[p].SpdList[1]); GetPlrHandSeed(&plr[p].SpdList[1]);
#endif
break; break;
#ifdef HELLFIRE
case PC_MONK: case PC_MONK:
SetPlrHandItem(&plr[p].InvBody[INVLOC_HAND_LEFT], IDI_SHORTSTAFF); SetPlrHandItem(&plr[p].InvBody[INVLOC_HAND_LEFT], IDI_SHORTSTAFF);
GetPlrHandSeed(&plr[p].InvBody[INVLOC_HAND_LEFT]); GetPlrHandSeed(&plr[p].InvBody[INVLOC_HAND_LEFT]);
@ -1506,7 +1460,6 @@ void CreatePlrItems(int p)
SetPlrHandItem(&plr[p].SpdList[1], IDI_HEAL); SetPlrHandItem(&plr[p].SpdList[1], IDI_HEAL);
GetPlrHandSeed(&plr[p].SpdList[1]); GetPlrHandSeed(&plr[p].SpdList[1]);
break; break;
#endif
} }
SetPlrHandItem(&plr[p].HoldItem, IDI_GOLD); SetPlrHandItem(&plr[p].HoldItem, IDI_GOLD);
@ -4519,17 +4472,9 @@ void UseItem(int p, int Mid, int spl)
case IMISC_MEAT: case IMISC_MEAT:
j = plr[p]._pMaxHP >> 8; j = plr[p]._pMaxHP >> 8;
l = ((j >> 1) + random_(39, j)) << 6; l = ((j >> 1) + random_(39, j)) << 6;
#ifdef HELLFIRE
if (plr[p]._pClass == PC_WARRIOR || plr[p]._pClass == PC_BARBARIAN) if (plr[p]._pClass == PC_WARRIOR || plr[p]._pClass == PC_BARBARIAN)
#else
if (plr[p]._pClass == PC_WARRIOR)
#endif
l <<= 1; l <<= 1;
#ifdef HELLFIRE
if (plr[p]._pClass == PC_ROGUE || plr[p]._pClass == PC_MONK || plr[p]._pClass == PC_BARD) if (plr[p]._pClass == PC_ROGUE || plr[p]._pClass == PC_MONK || plr[p]._pClass == PC_BARD)
#else
if (plr[p]._pClass == PC_ROGUE)
#endif
l += l >> 1; l += l >> 1;
plr[p]._pHitPoints += l; plr[p]._pHitPoints += l;
if (plr[p]._pHitPoints > plr[p]._pMaxHP) if (plr[p]._pHitPoints > plr[p]._pMaxHP)
@ -4549,11 +4494,7 @@ void UseItem(int p, int Mid, int spl)
l = ((j >> 1) + random_(40, j)) << 6; l = ((j >> 1) + random_(40, j)) << 6;
if (plr[p]._pClass == PC_SORCERER) if (plr[p]._pClass == PC_SORCERER)
l <<= 1; l <<= 1;
#ifdef HELLFIRE
if (plr[p]._pClass == PC_ROGUE || plr[p]._pClass == PC_MONK || plr[p]._pClass == PC_BARD) if (plr[p]._pClass == PC_ROGUE || plr[p]._pClass == PC_MONK || plr[p]._pClass == PC_BARD)
#else
if (plr[p]._pClass == PC_ROGUE)
#endif
l += l >> 1; l += l >> 1;
if (!(plr[p]._pIFlags & ISPL_NOMANA)) { if (!(plr[p]._pIFlags & ISPL_NOMANA)) {
plr[p]._pMana += l; plr[p]._pMana += l;

22
Source/loadsave.cpp

@ -1127,9 +1127,9 @@ static void SavePlayer(int i)
CopyInt(&pPlayer->_pVar6, tbuff); CopyInt(&pPlayer->_pVar6, tbuff);
CopyInt(&pPlayer->_pVar7, tbuff); CopyInt(&pPlayer->_pVar7, tbuff);
CopyInt(&pPlayer->_pVar8, tbuff); CopyInt(&pPlayer->_pVar8, tbuff);
CopyBytes(&pPlayer->_pLvlVisited, NUMLEVELS, tbuff); CopyBytes(&pPlayer->_pLvlVisited, giNumberOfLevels, tbuff);
CopyBytes(&pPlayer->_pSLvlVisited, NUMLEVELS, tbuff); // only 10 used CopyBytes(&pPlayer->_pSLvlVisited, giNumberOfLevels, tbuff); // only 10 used
tbuff += 2; // Alignment tbuff += 2; // Alignment
CopyInt(&pPlayer->_pGFXLoad, tbuff); CopyInt(&pPlayer->_pGFXLoad, tbuff);
tbuff += 4 * 8; // Skip pointers _pNAnim tbuff += 4 * 8; // Skip pointers _pNAnim
@ -1513,6 +1513,16 @@ void SaveGame()
else else
app_fatal("Invalid game state"); app_fatal("Invalid game state");
if (gbIsHellfire) {
giNumberOfLevels = 25;
giNumberQuests = 24;
giNumberOfSmithPremiumItems = 15;
} else {
giNumberOfLevels = 17;
giNumberQuests = 16;
giNumberOfSmithPremiumItems = 6;
}
OSave(setlevel); OSave(setlevel);
WSave(setlvlnum); WSave(setlvlnum);
WSave(currlevel); WSave(currlevel);
@ -1526,7 +1536,7 @@ void SaveGame()
WSave(nummissiles); WSave(nummissiles);
WSave(nobjects); WSave(nobjects);
for (i = 0; i < NUMLEVELS; i++) { for (i = 0; i < giNumberOfLevels; i++) {
ISave(glSeedTbl[i]); ISave(glSeedTbl[i]);
WSave(gnLevelTypeTbl[i]); WSave(gnLevelTypeTbl[i]);
} }
@ -1534,7 +1544,7 @@ void SaveGame()
plr[myplr].pDifficulty = gnDifficulty; plr[myplr].pDifficulty = gnDifficulty;
SavePlayer(myplr); SavePlayer(myplr);
for (i = 0; i < MAXQUESTS; i++) for (i = 0; i < giNumberQuests; i++)
SaveQuest(i); SaveQuest(i);
for (i = 0; i < MAXPORTAL; i++) for (i = 0; i < MAXPORTAL; i++)
SavePortal(i); SavePortal(i);
@ -1633,7 +1643,7 @@ void SaveGame()
WSave(numpremium); WSave(numpremium);
WSave(premiumlevel); WSave(premiumlevel);
for (i = 0; i < SMITH_PREMIUM_ITEMS; i++) for (i = 0; i < giNumberOfSmithPremiumItems; i++)
SavePremium(i); SavePremium(i);
OSave(automapflag); OSave(automapflag);

4
Source/misdat.cpp

@ -58,11 +58,7 @@ MissileData missiledata[] = {
{ MIS_IDENTIFY, &AddIdentify, &MI_Dummy, FALSE, 1, MISR_NONE, MFILE_NONE, -1, -1 }, { MIS_IDENTIFY, &AddIdentify, &MI_Dummy, FALSE, 1, MISR_NONE, MFILE_NONE, -1, -1 },
{ MIS_WAVE, &AddWave, &MI_Wave, TRUE, 1, MISR_FIRE, MFILE_FIREWAL, LS_FLAMWAVE, -1 }, { MIS_WAVE, &AddWave, &MI_Wave, TRUE, 1, MISR_FIRE, MFILE_FIREWAL, LS_FLAMWAVE, -1 },
{ MIS_NOVA, &AddNova, &MI_Nova, TRUE, 1, MISR_LIGHTNING, MFILE_LGHNING, LS_NOVA, -1 }, { MIS_NOVA, &AddNova, &MI_Nova, TRUE, 1, MISR_LIGHTNING, MFILE_LGHNING, LS_NOVA, -1 },
#ifdef HELLFIRE
{ MIS_BLODBOIL, &miss_null_1F, &MI_Blodboil, FALSE, 1, MISR_NONE, MFILE_NONE, -1, -1 },
#else
{ MIS_BLODBOIL, &AddBlodboil, &MI_Blodboil, TRUE, 1, MISR_NONE, MFILE_NONE, -1, LS_BLODBOIL }, { MIS_BLODBOIL, &AddBlodboil, &MI_Blodboil, TRUE, 1, MISR_NONE, MFILE_NONE, -1, LS_BLODBOIL },
#endif
{ MIS_APOCA, &AddApoca, &MI_Apoca, TRUE, 1, MISR_MAGIC, MFILE_NEWEXP, LS_APOC, -1 }, { MIS_APOCA, &AddApoca, &MI_Apoca, TRUE, 1, MISR_MAGIC, MFILE_NEWEXP, LS_APOC, -1 },
{ MIS_REPAIR, &AddRepair, &MI_Dummy, FALSE, 2, MISR_NONE, MFILE_NONE, -1, -1 }, { MIS_REPAIR, &AddRepair, &MI_Dummy, FALSE, 2, MISR_NONE, MFILE_NONE, -1, -1 },
{ MIS_RECHARGE, &AddRecharge, &MI_Dummy, FALSE, 2, MISR_NONE, MFILE_NONE, -1, -1 }, { MIS_RECHARGE, &AddRecharge, &MI_Dummy, FALSE, 2, MISR_NONE, MFILE_NONE, -1, -1 },

15
Source/missiles.cpp

@ -933,14 +933,12 @@ BOOL PlayerMHit(int pnum, int m, int dist, int mind, int maxd, int mtype, BOOLEA
PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py); PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py);
} else if (plr[pnum]._pClass == PC_SORCERER) { } else if (plr[pnum]._pClass == PC_SORCERER) {
PlaySfxLoc(PS_MAGE69, plr[pnum]._px, plr[pnum]._py); PlaySfxLoc(PS_MAGE69, plr[pnum]._px, plr[pnum]._py);
#ifdef HELLFIRE
} else if (plr[pnum]._pClass == PC_MONK) { } else if (plr[pnum]._pClass == PC_MONK) {
PlaySfxLoc(PS_MONK69, plr[pnum]._px, plr[pnum]._py); PlaySfxLoc(PS_MONK69, plr[pnum]._px, plr[pnum]._py);
} else if (plr[pnum]._pClass == PC_BARD) { } else if (plr[pnum]._pClass == PC_BARD) {
PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py); PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py);
} else if (plr[pnum]._pClass == PC_BARBARIAN) { } else if (plr[pnum]._pClass == PC_BARBARIAN) {
PlaySfxLoc(PS_WARR69, plr[pnum]._px, plr[pnum]._py); PlaySfxLoc(PS_WARR69, plr[pnum]._px, plr[pnum]._py);
#endif
} }
drawhpflag = TRUE; drawhpflag = TRUE;
} }
@ -1081,14 +1079,12 @@ BOOL Plr2PlrMHit(int pnum, int p, int mindam, int maxdam, int dist, int mtype, B
PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py); PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py);
} else if (plr[pnum]._pClass == PC_SORCERER) { } else if (plr[pnum]._pClass == PC_SORCERER) {
PlaySfxLoc(PS_MAGE69, plr[pnum]._px, plr[pnum]._py); PlaySfxLoc(PS_MAGE69, plr[pnum]._px, plr[pnum]._py);
#ifdef HELLFIRE
} else if (plr[pnum]._pClass == PC_MONK) { } else if (plr[pnum]._pClass == PC_MONK) {
PlaySfxLoc(PS_MONK69, plr[pnum]._px, plr[pnum]._py); PlaySfxLoc(PS_MONK69, plr[pnum]._px, plr[pnum]._py);
} else if (plr[pnum]._pClass == PC_BARD) { } else if (plr[pnum]._pClass == PC_BARD) {
PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py); PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py);
} else if (plr[pnum]._pClass == PC_BARBARIAN) { } else if (plr[pnum]._pClass == PC_BARBARIAN) {
PlaySfxLoc(PS_WARR69, plr[pnum]._px, plr[pnum]._py); PlaySfxLoc(PS_WARR69, plr[pnum]._px, plr[pnum]._py);
#endif
} }
return TRUE; return TRUE;
} else { } else {
@ -3285,7 +3281,6 @@ void AddNova(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, in
void AddBlodboil(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) void AddBlodboil(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam)
{ {
#ifdef HELLFIRE
int lvl; int lvl;
if (id == -1 || plr[id]._pSpellFlags & 6 || plr[id]._pHitPoints <= plr[id]._pLevel << 6) { if (id == -1 || plr[id]._pSpellFlags & 6 || plr[id]._pHitPoints <= plr[id]._pLevel << 6) {
@ -3314,9 +3309,6 @@ void AddBlodboil(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy
force_redraw = 255; force_redraw = 255;
PlaySfxLoc(blodboilSFX[plr[id]._pClass], plr[id]._px, plr[id]._py); PlaySfxLoc(blodboilSFX[plr[id]._pClass], plr[id]._px, plr[id]._py);
} }
#else
missile[mi]._miDelFlag = 1;
#endif
} }
void AddRepair(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam) void AddRepair(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam)
@ -5514,7 +5506,6 @@ void MI_Nova(int i)
missile[i]._miDelFlag = TRUE; missile[i]._miDelFlag = TRUE;
} }
#ifdef HELLFIRE
void MI_Blodboil(int i) void MI_Blodboil(int i)
{ {
int lvl, id, hpdif; int lvl, id, hpdif;
@ -5566,12 +5557,6 @@ void MI_Blodboil(int i)
} }
} }
} }
#else
void MI_Blodboil(int i)
{
missile[i]._miDelFlag = TRUE;
}
#endif
void MI_Flame(int i) void MI_Flame(int i)
{ {

5
Source/missiles.h

@ -30,7 +30,6 @@ void InitMissileGFX();
void FreeMissiles(); void FreeMissiles();
void FreeMissiles2(); void FreeMissiles2();
void InitMissiles(); void InitMissiles();
#ifdef HELLFIRE
void missiles_hive_explosion(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); void missiles_hive_explosion(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
void missiles_fire_rune(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); void missiles_fire_rune(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
void missiles_light_rune(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); void missiles_light_rune(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
@ -58,8 +57,6 @@ void missiles_ring(int mi, int sx, int sy, int dx, int dy, int midir, char miene
void missiles_search(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); void missiles_search(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
void missiles_cbolt_arrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); void missiles_cbolt_arrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
void missiles_hbolt_arrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); void missiles_hbolt_arrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
void AddBlodboil(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
#endif
void AddLArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); void AddLArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
void AddArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); void AddArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
void AddRndTeleport(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam); void AddRndTeleport(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
@ -131,7 +128,6 @@ void mi_null_33(int i);
void MI_Acidpud(int i); void MI_Acidpud(int i);
void MI_Firewall(int i); void MI_Firewall(int i);
void MI_Fireball(int i); void MI_Fireball(int i);
#ifdef HELLFIRE
void missiles_4359A0(int i); void missiles_4359A0(int i);
void MI_Rune(int i); void MI_Rune(int i);
void mi_light_wall(int i); void mi_light_wall(int i);
@ -147,7 +143,6 @@ void mi_search(int i);
void mi_lightning_wall(int i); void mi_lightning_wall(int i);
void mi_fire_nova(int i); void mi_fire_nova(int i);
void mi_spec_arrow(int i); void mi_spec_arrow(int i);
#endif
void MI_Lightctrl(int i); void MI_Lightctrl(int i);
void MI_Lightning(int i); void MI_Lightning(int i);
void MI_Town(int i); void MI_Town(int i);

6
Source/monster.cpp

@ -3008,18 +3008,12 @@ void DoEnding()
if (gbIsSpawn) if (gbIsSpawn)
return; return;
#ifdef HELLFIRE
if (plr[myplr]._pClass == PC_WARRIOR || plr[myplr]._pClass == PC_BARBARIAN) { if (plr[myplr]._pClass == PC_WARRIOR || plr[myplr]._pClass == PC_BARBARIAN) {
#else
if (plr[myplr]._pClass == PC_WARRIOR) {
#endif
play_movie("gendata\\DiabVic2.smk", FALSE); play_movie("gendata\\DiabVic2.smk", FALSE);
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
play_movie("gendata\\DiabVic1.smk", FALSE); play_movie("gendata\\DiabVic1.smk", FALSE);
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
play_movie("gendata\\DiabVic1.smk", FALSE); play_movie("gendata\\DiabVic1.smk", FALSE);
#endif
} else { } else {
play_movie("gendata\\DiabVic3.smk", FALSE); play_movie("gendata\\DiabVic3.smk", FALSE);
} }

18
Source/objects.cpp

@ -1042,14 +1042,12 @@ void InitObjects()
sp_id = TEXT_RBLINDING; sp_id = TEXT_RBLINDING;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sp_id = TEXT_MBLINDING; sp_id = TEXT_MBLINDING;
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
sp_id = TEXT_HBLINDING; sp_id = TEXT_HBLINDING;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sp_id = TEXT_BBLINDING; sp_id = TEXT_BBLINDING;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sp_id = TEXT_BLINDING; sp_id = TEXT_BLINDING;
#endif
} }
quests[Q_BLIND]._qmsg = sp_id; quests[Q_BLIND]._qmsg = sp_id;
AddBookLever(0, 0, MAXDUNX, MAXDUNY, setpc_x, setpc_y, setpc_w + setpc_x + 1, setpc_h + setpc_y + 1, sp_id); AddBookLever(0, 0, MAXDUNX, MAXDUNY, setpc_x, setpc_y, setpc_w + setpc_x + 1, setpc_h + setpc_y + 1, sp_id);
@ -1064,14 +1062,12 @@ void InitObjects()
sp_id = TEXT_RBLOODY; sp_id = TEXT_RBLOODY;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sp_id = TEXT_MBLOODY; sp_id = TEXT_MBLOODY;
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
sp_id = TEXT_HBLOODY; sp_id = TEXT_HBLOODY;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sp_id = TEXT_BBLOODY; sp_id = TEXT_BBLOODY;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sp_id = TEXT_BLOODY; sp_id = TEXT_BLOODY;
#endif
} }
quests[Q_BLOOD]._qmsg = sp_id; quests[Q_BLOOD]._qmsg = sp_id;
AddBookLever(0, 0, MAXDUNX, MAXDUNY, setpc_x, setpc_y + 3, setpc_x + 2, setpc_y + 7, sp_id); AddBookLever(0, 0, MAXDUNX, MAXDUNY, setpc_x, setpc_y + 3, setpc_x + 2, setpc_y + 7, sp_id);
@ -1091,14 +1087,12 @@ void InitObjects()
sp_id = TEXT_RBLOODWAR; sp_id = TEXT_RBLOODWAR;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sp_id = TEXT_MBLOODWAR; sp_id = TEXT_MBLOODWAR;
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
sp_id = TEXT_HBLOODWAR; sp_id = TEXT_HBLOODWAR;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sp_id = TEXT_BBLOODWAR; sp_id = TEXT_BBLOODWAR;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sp_id = TEXT_BLOODWAR; sp_id = TEXT_BLOODWAR;
#endif
} }
quests[Q_WARLORD]._qmsg = sp_id; quests[Q_WARLORD]._qmsg = sp_id;
AddBookLever(0, 0, MAXDUNX, MAXDUNY, setpc_x, setpc_y, setpc_x + setpc_w, setpc_y + setpc_h, sp_id); AddBookLever(0, 0, MAXDUNX, MAXDUNY, setpc_x, setpc_y, setpc_x + setpc_w, setpc_y + setpc_h, sp_id);
@ -2096,14 +2090,12 @@ void Obj_BCrossDamage(int i)
PlaySfxLoc(PS_ROGUE68, plr[myplr]._px, plr[myplr]._py); PlaySfxLoc(PS_ROGUE68, plr[myplr]._px, plr[myplr]._py);
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
PlaySfxLoc(PS_MAGE68, plr[myplr]._px, plr[myplr]._py); PlaySfxLoc(PS_MAGE68, plr[myplr]._px, plr[myplr]._py);
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
PlaySfxLoc(PS_MONK68, plr[myplr]._px, plr[myplr]._py); PlaySfxLoc(PS_MONK68, plr[myplr]._px, plr[myplr]._py);
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
PlaySfxLoc(PS_ROGUE68, plr[myplr]._px, plr[myplr]._py); PlaySfxLoc(PS_ROGUE68, plr[myplr]._px, plr[myplr]._py);
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
PlaySfxLoc(PS_WARR68, plr[myplr]._px, plr[myplr]._py); PlaySfxLoc(PS_WARR68, plr[myplr]._px, plr[myplr]._py);
#endif
} }
} }
drawhpflag = TRUE; drawhpflag = TRUE;
@ -2469,7 +2461,7 @@ void OperateL1RDoor(int pnum, int oi, bool sendflag)
if (dok) { if (dok) {
#else #else
if (!deltaload) if (!deltaload)
if (((dDead[xp][yp] != 0 ? 0 : 1) & (dMonster[xp][yp] != 0 ? 0 : 1) & (dItem[xp][yp] != 0 ? 0 : 1)) != 0) { if (((dDead[xp][yp] != 0 ? 0 : 1) & (dMonster[xp][yp] != 0 ? 0 : 1) & (dItem[xp][yp] != 0 ? 0 : 1)) != 0) {
#endif #endif
if (pnum == myplr && sendflag) if (pnum == myplr && sendflag)
NetSendCmdParam1(TRUE, CMD_CLOSEDOOR, oi); NetSendCmdParam1(TRUE, CMD_CLOSEDOOR, oi);
@ -3041,14 +3033,12 @@ void OperateSChambBk(int pnum, int i)
textdef = TEXT_RBONER; textdef = TEXT_RBONER;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
textdef = TEXT_MBONER; textdef = TEXT_MBONER;
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
textdef = TEXT_HBONER; textdef = TEXT_HBONER;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
textdef = TEXT_BBONER; textdef = TEXT_BBONER;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
textdef = TEXT_BONER; textdef = TEXT_BONER;
#endif
} }
quests[Q_SCHAMB]._qmsg = textdef; quests[Q_SCHAMB]._qmsg = textdef;
InitQTextMsg(textdef); InitQTextMsg(textdef);
@ -3124,14 +3114,12 @@ void OperateMushPatch(int pnum, int i)
PlaySFX(PS_ROGUE13); PlaySFX(PS_ROGUE13);
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
PlaySFX(PS_MAGE13); PlaySFX(PS_MAGE13);
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
PlaySFX(PS_MONK13); PlaySFX(PS_MONK13);
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
PlaySFX(PS_ROGUE13); PlaySFX(PS_ROGUE13);
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
PlaySFX(PS_WARR13); PlaySFX(PS_WARR13);
#endif
} }
} }
} else { } else {
@ -3161,14 +3149,12 @@ void OperateInnSignChest(int pnum, int i)
PlaySFX(PS_ROGUE24); PlaySFX(PS_ROGUE24);
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
PlaySFX(PS_MAGE24); PlaySFX(PS_MAGE24);
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
PlaySFX(PS_MONK24); PlaySFX(PS_MONK24);
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
PlaySFX(PS_ROGUE24); PlaySFX(PS_ROGUE24);
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
PlaySFX(PS_WARR24); PlaySFX(PS_WARR24);
#endif
} }
} }
} else { } else {
@ -3199,7 +3185,6 @@ void OperateSlainHero(int pnum, int i, bool sendmsg)
} else if (plr[pnum]._pClass == PC_SORCERER) { } else if (plr[pnum]._pClass == PC_SORCERER) {
CreateSpellBook(object[i]._ox, object[i]._oy, SPL_LIGHTNING, FALSE, TRUE); CreateSpellBook(object[i]._ox, object[i]._oy, SPL_LIGHTNING, FALSE, TRUE);
PlaySfxLoc(PS_MAGE9, plr[myplr]._px, plr[myplr]._py); PlaySfxLoc(PS_MAGE9, plr[myplr]._px, plr[myplr]._py);
#ifdef HELLFIRE
} else if (plr[pnum]._pClass == PC_MONK) { } else if (plr[pnum]._pClass == PC_MONK) {
CreateMagicWeapon(object[i]._ox, object[i]._oy, ITYPE_STAFF, ICURS_WAR_STAFF, FALSE, TRUE); CreateMagicWeapon(object[i]._ox, object[i]._oy, ITYPE_STAFF, ICURS_WAR_STAFF, FALSE, TRUE);
PlaySfxLoc(PS_MONK9, plr[myplr]._px, plr[myplr]._py); PlaySfxLoc(PS_MONK9, plr[myplr]._px, plr[myplr]._py);
@ -3209,7 +3194,6 @@ void OperateSlainHero(int pnum, int i, bool sendmsg)
} else if (plr[pnum]._pClass == PC_BARBARIAN) { } else if (plr[pnum]._pClass == PC_BARBARIAN) {
CreateMagicWeapon(object[i]._ox, object[i]._oy, ITYPE_AXE, ICURS_BATTLE_AXE, FALSE, TRUE); CreateMagicWeapon(object[i]._ox, object[i]._oy, ITYPE_AXE, ICURS_BATTLE_AXE, FALSE, TRUE);
PlaySfxLoc(PS_WARR9, plr[myplr]._px, plr[myplr]._py); PlaySfxLoc(PS_WARR9, plr[myplr]._px, plr[myplr]._py);
#endif
} }
if (pnum == myplr) if (pnum == myplr)
NetSendCmdParam1(FALSE, CMD_OPERATEOBJ, i); NetSendCmdParam1(FALSE, CMD_OPERATEOBJ, i);

62
Source/pfile.cpp

@ -230,55 +230,13 @@ void pfile_flush_W()
pfile_flush(TRUE, pfile_get_save_num_from_name(plr[myplr]._pName)); pfile_flush(TRUE, pfile_get_save_num_from_name(plr[myplr]._pName));
} }
static char pfile_get_player_class(unsigned int player_class_nr)
{
char pc_class;
if (player_class_nr == UI_WARRIOR)
pc_class = PC_WARRIOR;
else if (player_class_nr == UI_ROGUE)
pc_class = PC_ROGUE;
#ifdef HELLFIRE
else if (player_class_nr == 3)
pc_class = PC_MONK;
else if (player_class_nr == 4)
pc_class = PC_BARD;
else if (player_class_nr == 5)
pc_class = PC_BARBARIAN;
#endif
else
pc_class = PC_SORCERER;
return pc_class;
}
static BYTE game_2_ui_class(const PlayerStruct *p) // game_2_ui_class
{
BYTE uiclass;
if (p->_pClass == PC_WARRIOR)
uiclass = UI_WARRIOR;
else if (p->_pClass == PC_ROGUE)
uiclass = UI_ROGUE;
#ifdef HELLFIRE
else if (p->_pClass == PC_MONK)
uiclass = UI_MONK;
else if (p->_pClass == PC_BARD)
uiclass = UI_BARD;
else if (p->_pClass == PC_BARBARIAN)
uiclass = UI_BARBARIAN;
#endif
else
uiclass = UI_SORCERER;
return uiclass;
}
void game_2_ui_player(const PlayerStruct *p, _uiheroinfo *heroinfo, BOOL bHasSaveFile) void game_2_ui_player(const PlayerStruct *p, _uiheroinfo *heroinfo, BOOL bHasSaveFile)
{ {
memset(heroinfo, 0, sizeof(*heroinfo)); memset(heroinfo, 0, sizeof(*heroinfo));
strncpy(heroinfo->name, p->_pName, sizeof(heroinfo->name) - 1); strncpy(heroinfo->name, p->_pName, sizeof(heroinfo->name) - 1);
heroinfo->name[sizeof(heroinfo->name) - 1] = '\0'; heroinfo->name[sizeof(heroinfo->name) - 1] = '\0';
heroinfo->level = p->_pLevel; heroinfo->level = p->_pLevel;
heroinfo->heroclass = game_2_ui_class(p); heroinfo->heroclass = p->_pClass;
heroinfo->strength = p->_pStrength; heroinfo->strength = p->_pStrength;
heroinfo->magic = p->_pMagic; heroinfo->magic = p->_pMagic;
heroinfo->dexterity = p->_pDexterity; heroinfo->dexterity = p->_pDexterity;
@ -329,22 +287,17 @@ BOOL pfile_archive_contains_game(HANDLE hsArchive, DWORD save_num)
return TRUE; return TRUE;
} }
BOOL pfile_ui_set_class_stats(unsigned int player_class_nr, _uidefaultstats *class_stats) void pfile_ui_set_class_stats(unsigned int player_class_nr, _uidefaultstats *class_stats)
{ {
int c; class_stats->strength = StrengthTbl[player_class_nr];
class_stats->magic = MagicTbl[player_class_nr];
c = pfile_get_player_class(player_class_nr); class_stats->dexterity = DexterityTbl[player_class_nr];
class_stats->strength = StrengthTbl[c]; class_stats->vitality = VitalityTbl[player_class_nr];
class_stats->magic = MagicTbl[c];
class_stats->dexterity = DexterityTbl[c];
class_stats->vitality = VitalityTbl[c];
return TRUE;
} }
BOOL pfile_ui_save_create(_uiheroinfo *heroinfo) BOOL pfile_ui_save_create(_uiheroinfo *heroinfo)
{ {
DWORD save_num; DWORD save_num;
char cl;
PkPlayerStruct pkplr; PkPlayerStruct pkplr;
save_num = pfile_get_save_num_from_name(heroinfo->name); save_num = pfile_get_save_num_from_name(heroinfo->name);
@ -369,8 +322,7 @@ BOOL pfile_ui_save_create(_uiheroinfo *heroinfo)
mpqapi_remove_hash_entries(pfile_get_file_name); mpqapi_remove_hash_entries(pfile_get_file_name);
strncpy(hero_names[save_num], heroinfo->name, PLR_NAME_LEN); strncpy(hero_names[save_num], heroinfo->name, PLR_NAME_LEN);
hero_names[save_num][PLR_NAME_LEN - 1] = '\0'; hero_names[save_num][PLR_NAME_LEN - 1] = '\0';
cl = pfile_get_player_class(heroinfo->heroclass); CreatePlayer(0, heroinfo->heroclass);
CreatePlayer(0, cl);
strncpy(plr[0]._pName, heroinfo->name, PLR_NAME_LEN); strncpy(plr[0]._pName, heroinfo->name, PLR_NAME_LEN);
plr[0]._pName[PLR_NAME_LEN - 1] = '\0'; plr[0]._pName[PLR_NAME_LEN - 1] = '\0';
PackPlayer(&pkplr, 0, TRUE); PackPlayer(&pkplr, 0, TRUE);

2
Source/pfile.h

@ -22,7 +22,7 @@ void pfile_flush_W();
void game_2_ui_player(const PlayerStruct *p, _uiheroinfo *heroinfo, BOOL bHasSaveFile); void game_2_ui_player(const PlayerStruct *p, _uiheroinfo *heroinfo, BOOL bHasSaveFile);
BOOL pfile_ui_set_hero_infos(BOOL (*ui_add_hero_info)(_uiheroinfo *)); BOOL pfile_ui_set_hero_infos(BOOL (*ui_add_hero_info)(_uiheroinfo *));
BOOL pfile_archive_contains_game(HANDLE hsArchive, DWORD save_num); BOOL pfile_archive_contains_game(HANDLE hsArchive, DWORD save_num);
BOOL pfile_ui_set_class_stats(unsigned int player_class_nr, _uidefaultstats *class_stats); void pfile_ui_set_class_stats(unsigned int player_class_nr, _uidefaultstats *class_stats);
BOOL pfile_ui_save_create(_uiheroinfo *heroinfo); BOOL pfile_ui_save_create(_uiheroinfo *heroinfo);
BOOL pfile_get_file_name(DWORD lvl, char *dst); BOOL pfile_get_file_name(DWORD lvl, char *dst);
BOOL pfile_delete_save(_uiheroinfo *hero_info); BOOL pfile_delete_save(_uiheroinfo *hero_info);

59
Source/player.cpp

@ -32,7 +32,6 @@ const char CharChar[] = {
'W', 'W',
'R', 'R',
'S', 'S',
#ifdef HELLFIRE
'M', 'M',
'R', 'R',
'W', 'W',
@ -45,7 +44,6 @@ const char CharCharHF[] = {
'M', 'M',
'B', 'B',
'C', 'C',
#endif
0 0
}; };
@ -64,44 +62,36 @@ char PlrGFXAnimLens[NUM_CLASSES][11] = {
{ 10, 16, 8, 2, 20, 20, 6, 20, 8, 9, 14 }, { 10, 16, 8, 2, 20, 20, 6, 20, 8, 9, 14 },
{ 8, 18, 8, 4, 20, 16, 7, 20, 8, 10, 12 }, { 8, 18, 8, 4, 20, 16, 7, 20, 8, 10, 12 },
{ 8, 16, 8, 6, 20, 12, 8, 20, 8, 12, 8 }, { 8, 16, 8, 6, 20, 12, 8, 20, 8, 12, 8 },
#ifdef HELLFIRE
{ 8, 16, 8, 3, 20, 18, 6, 20, 8, 12, 13 }, { 8, 16, 8, 3, 20, 18, 6, 20, 8, 12, 13 },
{ 8, 18, 8, 4, 20, 16, 7, 20, 8, 10, 12 }, { 8, 18, 8, 4, 20, 16, 7, 20, 8, 10, 12 },
{ 10, 16, 8, 2, 20, 20, 6, 20, 8, 9, 14 }, { 10, 16, 8, 2, 20, 20, 6, 20, 8, 9, 14 },
#endif
}; };
/** Maps from player class to player velocity. */ /** Maps from player class to player velocity. */
int PWVel[NUM_CLASSES][3] = { int PWVel[NUM_CLASSES][3] = {
{ 2048, 1024, 512 }, { 2048, 1024, 512 },
{ 2048, 1024, 512 }, { 2048, 1024, 512 },
{ 2048, 1024, 512 }, { 2048, 1024, 512 },
#ifdef HELLFIRE
{ 2048, 1024, 512 }, { 2048, 1024, 512 },
{ 2048, 1024, 512 }, { 2048, 1024, 512 },
{ 2048, 1024, 512 }, { 2048, 1024, 512 },
#endif
}; };
/** Total number of frames in walk animation. */ /** Total number of frames in walk animation. */
int AnimLenFromClass[NUM_CLASSES] = { int AnimLenFromClass[NUM_CLASSES] = {
8, 8,
8, 8,
8, 8,
#ifdef HELLFIRE
8, 8,
8, 8,
8, 8,
#endif
}; };
/** Maps from player_class to starting stat in strength. */ /** Maps from player_class to starting stat in strength. */
int StrengthTbl[NUM_CLASSES] = { int StrengthTbl[NUM_CLASSES] = {
30, 30,
20, 20,
15, 15,
#ifdef HELLFIRE
25, 25,
20, 20,
40, 40,
#endif
}; };
/** Maps from player_class to starting stat in magic. */ /** Maps from player_class to starting stat in magic. */
int MagicTbl[NUM_CLASSES] = { int MagicTbl[NUM_CLASSES] = {
@ -109,11 +99,9 @@ int MagicTbl[NUM_CLASSES] = {
10, 10,
15, 15,
35, 35,
#ifdef HELLFIRE
15, 15,
20, 20,
0, 0,
#endif
// clang-format on // clang-format on
}; };
/** Maps from player_class to starting stat in dexterity. */ /** Maps from player_class to starting stat in dexterity. */
@ -121,33 +109,27 @@ int DexterityTbl[NUM_CLASSES] = {
20, 20,
30, 30,
15, 15,
#ifdef HELLFIRE
25, 25,
25, 25,
20, 20,
#endif
}; };
/** Maps from player_class to starting stat in vitality. */ /** Maps from player_class to starting stat in vitality. */
int VitalityTbl[NUM_CLASSES] = { int VitalityTbl[NUM_CLASSES] = {
25, 25,
20, 20,
20, 20,
#ifdef HELLFIRE
20, 20,
20, 20,
25, 25,
#endif
}; };
/** Specifies the chance to block bonus of each player class.*/ /** Specifies the chance to block bonus of each player class.*/
int ToBlkTbl[NUM_CLASSES] = { int ToBlkTbl[NUM_CLASSES] = {
30, 30,
20, 20,
10, 10,
#ifdef HELLFIRE
25, 25,
25, 25,
30, 30,
#endif
}; };
const char *const ClassStrTblOld[] = { const char *const ClassStrTblOld[] = {
"Warrior", "Warrior",
@ -165,11 +147,9 @@ int MaxStats[NUM_CLASSES][4] = {
{ 250, 50, 60, 100 }, { 250, 50, 60, 100 },
{ 55, 70, 250, 80 }, { 55, 70, 250, 80 },
{ 45, 250, 85, 80 }, { 45, 250, 85, 80 },
#ifdef HELLFIRE
{ 150, 80, 150, 80 }, { 150, 80, 150, 80 },
{ 120, 120, 120, 100 }, { 120, 120, 120, 100 },
{ 255, 0, 55, 150 }, { 255, 0, 55, 150 },
#endif
// clang-format on // clang-format on
}; };
/** Specifies the experience point limit of each level. */ /** Specifies the experience point limit of each level. */
@ -230,11 +210,9 @@ const char *const ClassStrTbl[NUM_CLASSES] = {
"Warrior", "Warrior",
"Rogue", "Rogue",
"Sorceror", "Sorceror",
#ifdef HELLFIRE
"Monk", "Monk",
"Rogue", "Rogue",
"Warrior", "Warrior",
#endif
}; };
/** Unused local of PM_ChangeLightOff, originally for computing light radius. */ /** Unused local of PM_ChangeLightOff, originally for computing light radius. */
BYTE fix[9] = { 0, 0, 3, 3, 3, 6, 6, 6, 8 }; BYTE fix[9] = { 0, 0, 3, 3, 3, 6, 6, 6, 8 };
@ -263,18 +241,13 @@ void LoadPlrGFX(int pnum, player_graphic gfxflag)
} }
p = &plr[pnum]; p = &plr[pnum];
#ifdef HELLFIRE
if ((p->_pClass != PC_BARD || hfbard_mpq == NULL) && (p->_pClass != PC_BARBARIAN || hfbarb_mpq == NULL)) { if ((p->_pClass != PC_BARD || hfbard_mpq == NULL) && (p->_pClass != PC_BARBARIAN || hfbarb_mpq == NULL)) {
#endif
sprintf(prefix, "%c%c%c", CharChar[p->_pClass], ArmourChar[p->_pgfxnum >> 4], WepChar[p->_pgfxnum & 0xF]); sprintf(prefix, "%c%c%c", CharChar[p->_pClass], ArmourChar[p->_pgfxnum >> 4], WepChar[p->_pgfxnum & 0xF]);
cs = ClassStrTbl[p->_pClass]; cs = ClassStrTbl[p->_pClass];
#ifdef HELLFIRE
} else { } else {
sprintf(prefix, "%c%c%c", CharCharHF[p->_pClass], ArmourChar[p->_pgfxnum >> 4], WepChar[p->_pgfxnum & 0xF]); sprintf(prefix, "%c%c%c", CharCharHF[p->_pClass], ArmourChar[p->_pgfxnum >> 4], WepChar[p->_pgfxnum & 0xF]);
cs = ClassStrTbl[p->_pClass];
cs = ClassStrTblOld[p->_pClass]; cs = ClassStrTblOld[p->_pClass];
} }
#endif
for (i = 1; i <= PFILE_NONDEATH; i <<= 1) { for (i = 1; i <= PFILE_NONDEATH; i <<= 1) {
if (!(i & gfxflag)) { if (!(i & gfxflag)) {
@ -395,7 +368,9 @@ static DWORD GetPlrGFXSize(const char *szCel)
dwMaxSize = 0; dwMaxSize = 0;
for (c = 0; c < NUM_CLASSES; c++) { int classesToLoad = gbIsHellfire ? NUM_CLASSES : 3;
for (c = 0; c < classesToLoad; c++) {
if (gbIsSpawn && c != 0) if (gbIsSpawn && c != 0)
continue; continue;
for (a = &ArmourChar[0]; *a; a++) { for (a = &ArmourChar[0]; *a; a++) {
@ -408,17 +383,13 @@ static DWORD GetPlrGFXSize(const char *szCel)
if (szCel[0] == 'B' && szCel[1] == 'L' && (*w != 'U' && *w != 'D' && *w != 'H')) { if (szCel[0] == 'B' && szCel[1] == 'L' && (*w != 'U' && *w != 'D' && *w != 'H')) {
continue; //No block without weapon continue; //No block without weapon
} }
#ifdef HELLFIRE
if ((c == PC_BARD && hfbard_mpq == NULL) || (c == PC_BARBARIAN && hfbarb_mpq == NULL)) { if ((c == PC_BARD && hfbard_mpq == NULL) || (c == PC_BARBARIAN && hfbarb_mpq == NULL)) {
#endif
sprintf(Type, "%c%c%c", CharChar[c], *a, *w); sprintf(Type, "%c%c%c", CharChar[c], *a, *w);
sprintf(pszName, "PlrGFX\\%s\\%s\\%s%s.CL2", ClassStrTbl[c], Type, Type, szCel); sprintf(pszName, "PlrGFX\\%s\\%s\\%s%s.CL2", ClassStrTbl[c], Type, Type, szCel);
#ifdef HELLFIRE
} else { } else {
sprintf(Type, "%c%c%c", CharCharHF[c], *a, *w); sprintf(Type, "%c%c%c", CharCharHF[c], *a, *w);
sprintf(pszName, "PlrGFX\\%s\\%s\\%s%s.CL2", ClassStrTblOld[c], Type, Type, szCel); sprintf(pszName, "PlrGFX\\%s\\%s\\%s%s.CL2", ClassStrTblOld[c], Type, Type, szCel);
} }
#endif
if (WOpenFile(pszName, &hsFile, TRUE)) { if (WOpenFile(pszName, &hsFile, TRUE)) {
/// ASSERT: assert(hsFile); /// ASSERT: assert(hsFile);
dwSize = WGetFileSize(hsFile, NULL, pszName); dwSize = WGetFileSize(hsFile, NULL, pszName);
@ -1112,14 +1083,12 @@ void InitPlayer(int pnum, BOOL FirstTime)
plr[pnum]._pAblSpells = SPELLBIT(SPL_DISARM); plr[pnum]._pAblSpells = SPELLBIT(SPL_DISARM);
} else if (plr[pnum]._pClass == PC_SORCERER) { } else if (plr[pnum]._pClass == PC_SORCERER) {
plr[pnum]._pAblSpells = SPELLBIT(SPL_RECHARGE); plr[pnum]._pAblSpells = SPELLBIT(SPL_RECHARGE);
#ifdef HELLFIRE
} else if (plr[pnum]._pClass == PC_MONK) { } else if (plr[pnum]._pClass == PC_MONK) {
plr[pnum]._pAblSpells = SPELLBIT(SPL_SEARCH); plr[pnum]._pAblSpells = SPELLBIT(SPL_SEARCH);
} else if (plr[pnum]._pClass == PC_BARD) { } else if (plr[pnum]._pClass == PC_BARD) {
plr[pnum]._pAblSpells = SPELLBIT(SPL_IDENTIFY); plr[pnum]._pAblSpells = SPELLBIT(SPL_IDENTIFY);
} else if (plr[pnum]._pClass == PC_BARBARIAN) { } else if (plr[pnum]._pClass == PC_BARBARIAN) {
plr[pnum]._pAblSpells = SPELLBIT(SPL_BLODBOIL); plr[pnum]._pAblSpells = SPELLBIT(SPL_BLODBOIL);
#endif
} }
#ifdef _DEBUG #ifdef _DEBUG
@ -1900,14 +1869,12 @@ StartPlayerKill(int pnum, int earflag)
PlaySfxLoc(PS_ROGUE71, p->_px, p->_py); PlaySfxLoc(PS_ROGUE71, p->_px, p->_py);
} else if (plr[pnum]._pClass == PC_SORCERER) { } else if (plr[pnum]._pClass == PC_SORCERER) {
PlaySfxLoc(PS_MAGE71, p->_px, p->_py); PlaySfxLoc(PS_MAGE71, p->_px, p->_py);
#ifdef HELLFIRE
} else if (plr[pnum]._pClass == PC_MONK) { } else if (plr[pnum]._pClass == PC_MONK) {
PlaySfxLoc(PS_MONK71, p->_px, p->_py); PlaySfxLoc(PS_MONK71, p->_px, p->_py);
} else if (plr[pnum]._pClass == PC_BARD) { } else if (plr[pnum]._pClass == PC_BARD) {
PlaySfxLoc(PS_ROGUE71, p->_px, p->_py); PlaySfxLoc(PS_ROGUE71, p->_px, p->_py);
} else if (plr[pnum]._pClass == PC_BARBARIAN) { } else if (plr[pnum]._pClass == PC_BARBARIAN) {
PlaySfxLoc(PS_WARR71, p->_px, p->_py); PlaySfxLoc(PS_WARR71, p->_px, p->_py);
#endif
} }
if (p->_pgfxnum) { if (p->_pgfxnum) {
@ -3977,14 +3944,12 @@ void CheckPlrSpell()
PlaySFX(PS_ROGUE34); PlaySFX(PS_ROGUE34);
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
PlaySFX(PS_MAGE34); PlaySFX(PS_MAGE34);
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
PlaySFX(PS_MONK34); PlaySFX(PS_MONK34);
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
PlaySFX(PS_ROGUE34); PlaySFX(PS_ROGUE34);
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
PlaySFX(PS_WARR34); PlaySFX(PS_WARR34);
#endif
} }
return; return;
} }
@ -3996,14 +3961,12 @@ void CheckPlrSpell()
PlaySFX(PS_ROGUE27); PlaySFX(PS_ROGUE27);
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
PlaySFX(PS_MAGE27); PlaySFX(PS_MAGE27);
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
PlaySFX(PS_MONK27); PlaySFX(PS_MONK27);
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
PlaySFX(PS_ROGUE27); PlaySFX(PS_ROGUE27);
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
PlaySFX(PS_WARR27); PlaySFX(PS_WARR27);
#endif
} }
return; return;
} }
@ -4070,14 +4033,12 @@ void CheckPlrSpell()
PlaySFX(PS_ROGUE35); PlaySFX(PS_ROGUE35);
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
PlaySFX(PS_MAGE35); PlaySFX(PS_MAGE35);
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
PlaySFX(PS_MONK35); PlaySFX(PS_MONK35);
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
PlaySFX(PS_ROGUE35); PlaySFX(PS_ROGUE35);
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
PlaySFX(PS_WARR35); PlaySFX(PS_WARR35);
#endif
} }
} }
} }
@ -4533,14 +4494,12 @@ void PlayDungMsgs()
sfxdnum = PS_ROGUE97; sfxdnum = PS_ROGUE97;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE97; sfxdnum = PS_MAGE97;
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK97; sfxdnum = PS_MONK97;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE97; sfxdnum = PS_ROGUE97;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR97; sfxdnum = PS_WARR97;
#endif
} }
plr[myplr].pDungMsgs = plr[myplr].pDungMsgs | DMSG_CATHEDRAL; plr[myplr].pDungMsgs = plr[myplr].pDungMsgs | DMSG_CATHEDRAL;
} else if (currlevel == 5 && !plr[myplr]._pLvlVisited[5] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_CATACOMBS)) { } else if (currlevel == 5 && !plr[myplr]._pLvlVisited[5] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_CATACOMBS)) {
@ -4551,14 +4510,12 @@ void PlayDungMsgs()
sfxdnum = PS_ROGUE96; sfxdnum = PS_ROGUE96;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE96; sfxdnum = PS_MAGE96;
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK96; sfxdnum = PS_MONK96;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE96; sfxdnum = PS_ROGUE96;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR96B; sfxdnum = PS_WARR96B;
#endif
} }
plr[myplr].pDungMsgs |= DMSG_CATACOMBS; plr[myplr].pDungMsgs |= DMSG_CATACOMBS;
} else if (currlevel == 9 && !plr[myplr]._pLvlVisited[9] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_CAVES)) { } else if (currlevel == 9 && !plr[myplr]._pLvlVisited[9] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_CAVES)) {
@ -4569,14 +4526,12 @@ void PlayDungMsgs()
sfxdnum = PS_ROGUE98; sfxdnum = PS_ROGUE98;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE98; sfxdnum = PS_MAGE98;
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK98; sfxdnum = PS_MONK98;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE98; sfxdnum = PS_ROGUE98;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR98; sfxdnum = PS_WARR98;
#endif
} }
plr[myplr].pDungMsgs |= DMSG_CAVES; plr[myplr].pDungMsgs |= DMSG_CAVES;
} else if (currlevel == 13 && !plr[myplr]._pLvlVisited[13] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_HELL)) { } else if (currlevel == 13 && !plr[myplr]._pLvlVisited[13] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_HELL)) {
@ -4587,27 +4542,20 @@ void PlayDungMsgs()
sfxdnum = PS_ROGUE99; sfxdnum = PS_ROGUE99;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE99; sfxdnum = PS_MAGE99;
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) { } else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK99; sfxdnum = PS_MONK99;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE99; sfxdnum = PS_ROGUE99;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR99; sfxdnum = PS_WARR99;
#endif
} }
plr[myplr].pDungMsgs |= DMSG_HELL; plr[myplr].pDungMsgs |= DMSG_HELL;
} else if (currlevel == 16 && !plr[myplr]._pLvlVisited[15] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_DIABLO)) { // BUGFIX: _pLvlVisited should check 16 or this message will never play } else if (currlevel == 16 && !plr[myplr]._pLvlVisited[15] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_DIABLO)) { // BUGFIX: _pLvlVisited should check 16 or this message will never play
sfxdelay = 40; sfxdelay = 40;
#ifdef HELLFIRE
if (plr[myplr]._pClass == PC_WARRIOR || plr[myplr]._pClass == PC_ROGUE || plr[myplr]._pClass == PC_SORCERER || plr[myplr]._pClass == PC_MONK || plr[myplr]._pClass == PC_BARD || plr[myplr]._pClass == PC_BARBARIAN) { if (plr[myplr]._pClass == PC_WARRIOR || plr[myplr]._pClass == PC_ROGUE || plr[myplr]._pClass == PC_SORCERER || plr[myplr]._pClass == PC_MONK || plr[myplr]._pClass == PC_BARD || plr[myplr]._pClass == PC_BARBARIAN) {
#else
if (plr[myplr]._pClass == PC_WARRIOR || plr[myplr]._pClass == PC_ROGUE || plr[myplr]._pClass == PC_SORCERER) {
#endif
sfxdnum = PS_DIABLVLINT; sfxdnum = PS_DIABLVLINT;
} }
plr[myplr].pDungMsgs |= DMSG_DIABLO; plr[myplr].pDungMsgs |= DMSG_DIABLO;
#ifdef HELLFIRE
} else if (currlevel == 17 && !plr[myplr]._pLvlVisited[17] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs2 & 1)) { } else if (currlevel == 17 && !plr[myplr]._pLvlVisited[17] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs2 & 1)) {
sfxdelay = 10; sfxdelay = 10;
sfxdnum = USFX_DEFILER1; sfxdnum = USFX_DEFILER1;
@ -4635,7 +4583,6 @@ void PlayDungMsgs()
sfxdnum = PS_WARR92; sfxdnum = PS_WARR92;
} }
plr[myplr].pDungMsgs |= 32; plr[myplr].pDungMsgs |= 32;
#endif
} else { } else {
sfxdelay = 0; sfxdelay = 0;
} }

39
Source/quests.cpp

@ -22,7 +22,7 @@ int ReturnLvlT;
int ReturnLvl; int ReturnLvl;
/** Contains the data related to each quest_id. */ /** Contains the data related to each quest_id. */
QuestData questlist[MAXQUESTS] = { QuestData questlist[] = {
// clang-format off // clang-format off
// _qdlvl, _qdmultlvl, _qlvlt, _qdtype, _qdrnd, _qslvl, _qflags, _qdmsg, _qlstr // _qdlvl, _qdmultlvl, _qlvlt, _qdtype, _qdrnd, _qslvl, _qflags, _qdmsg, _qlstr
{ 5, -1, DTYPE_NONE, Q_ROCK, 100, 0, QUEST_SINGLE, TEXT_INFRA5, "The Magic Rock" }, { 5, -1, DTYPE_NONE, Q_ROCK, 100, 0, QUEST_SINGLE, TEXT_INFRA5, "The Magic Rock" },
@ -41,7 +41,6 @@ QuestData questlist[MAXQUESTS] = {
{ 2, -1, DTYPE_CAVES, Q_PWATER, 100, 4, QUEST_SINGLE, TEXT_POISON3, "Poisoned Water Supply" }, { 2, -1, DTYPE_CAVES, Q_PWATER, 100, 4, QUEST_SINGLE, TEXT_POISON3, "Poisoned Water Supply" },
{ 6, -1, DTYPE_CATACOMBS, Q_SCHAMB, 100, 2, QUEST_SINGLE, TEXT_BONER, "The Chamber of Bone" }, { 6, -1, DTYPE_CATACOMBS, Q_SCHAMB, 100, 2, QUEST_SINGLE, TEXT_BONER, "The Chamber of Bone" },
{ 15, 15, DTYPE_CATHEDRAL, Q_BETRAYER, 100, 5, QUEST_ANY, TEXT_VILE1, "Archbishop Lazarus" }, { 15, 15, DTYPE_CATHEDRAL, Q_BETRAYER, 100, 5, QUEST_ANY, TEXT_VILE1, "Archbishop Lazarus" },
#ifdef HELLFIRE
{ 17, 17, DTYPE_NONE, Q_GRAVE, 100, 0, QUEST_ANY, TEXT_GRAVE7, "Grave Matters" }, { 17, 17, DTYPE_NONE, Q_GRAVE, 100, 0, QUEST_ANY, TEXT_GRAVE7, "Grave Matters" },
{ 9, 9, DTYPE_NONE, Q_FARMER, 100, 0, QUEST_ANY, TEXT_FARMER1, "Farmer's Orchard" }, { 9, 9, DTYPE_NONE, Q_FARMER, 100, 0, QUEST_ANY, TEXT_FARMER1, "Farmer's Orchard" },
{ 17, -1, DTYPE_NONE, Q_GIRL, 100, 0, QUEST_SINGLE, TEXT_GIRL2, "Little Girl" }, { 17, -1, DTYPE_NONE, Q_GIRL, 100, 0, QUEST_SINGLE, TEXT_GIRL2, "Little Girl" },
@ -50,7 +49,6 @@ QuestData questlist[MAXQUESTS] = {
{ 21, 21, DTYPE_NONE, Q_NAKRUL, 100, 0, QUEST_ANY, TEXT_NAKRUL1, "Na-Krul" }, { 21, 21, DTYPE_NONE, Q_NAKRUL, 100, 0, QUEST_ANY, TEXT_NAKRUL1, "Na-Krul" },
{ 21, -1, DTYPE_NONE, Q_CORNSTN, 100, 0, QUEST_SINGLE, TEXT_CORNSTN, "Cornerstone of the World" }, { 21, -1, DTYPE_NONE, Q_CORNSTN, 100, 0, QUEST_SINGLE, TEXT_CORNSTN, "Cornerstone of the World" },
{ 9, 9, DTYPE_NONE, Q_JERSEY, 100, 0, QUEST_ANY, TEXT_JERSEY4, "The Jersey's Jersey" }, { 9, 9, DTYPE_NONE, Q_JERSEY, 100, 0, QUEST_ANY, TEXT_JERSEY4, "The Jersey's Jersey" },
#endif
// clang-format on // clang-format on
}; };
/** /**
@ -311,16 +309,13 @@ void CheckQuestKill(int m, BOOL sendmsg)
sfxdnum = PS_ROGUE82; sfxdnum = PS_ROGUE82;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE82; sfxdnum = PS_MAGE82;
} } else if (plr[myplr]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK82; sfxdnum = PS_MONK82;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE82; sfxdnum = PS_ROGUE82;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR82; sfxdnum = PS_WARR82;
} }
#endif
if (sendmsg) if (sendmsg)
NetSendCmdQuest(TRUE, Q_SKELKING); NetSendCmdQuest(TRUE, Q_SKELKING);
@ -333,16 +328,13 @@ void CheckQuestKill(int m, BOOL sendmsg)
sfxdnum = PS_ROGUE80; sfxdnum = PS_ROGUE80;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE80; sfxdnum = PS_MAGE80;
} } else if (plr[myplr]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK80; sfxdnum = PS_MONK80;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE80; sfxdnum = PS_ROGUE80;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR80; sfxdnum = PS_WARR80;
} }
#endif
if (sendmsg) if (sendmsg)
NetSendCmdQuest(TRUE, Q_BUTCHER); NetSendCmdQuest(TRUE, Q_BUTCHER);
} else if (monster[m].mName == UniqMonst[UMT_GARBUD].mName) { //"Gharbad the Weak" } else if (monster[m].mName == UniqMonst[UMT_GARBUD].mName) { //"Gharbad the Weak"
@ -354,16 +346,13 @@ void CheckQuestKill(int m, BOOL sendmsg)
sfxdnum = PS_ROGUE61; sfxdnum = PS_ROGUE61;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE61; sfxdnum = PS_MAGE61;
} } else if (plr[myplr]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK61; sfxdnum = PS_MONK61;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE61; sfxdnum = PS_ROGUE61;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR61; sfxdnum = PS_WARR61;
} }
#endif
} else if (monster[m].mName == UniqMonst[UMT_ZHAR].mName) { //"Zhar the Mad" } else if (monster[m].mName == UniqMonst[UMT_ZHAR].mName) { //"Zhar the Mad"
quests[Q_ZHAR]._qactive = QUEST_DONE; quests[Q_ZHAR]._qactive = QUEST_DONE;
sfxdelay = 30; sfxdelay = 30;
@ -373,16 +362,13 @@ void CheckQuestKill(int m, BOOL sendmsg)
sfxdnum = PS_ROGUE62; sfxdnum = PS_ROGUE62;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE62; sfxdnum = PS_MAGE62;
} } else if (plr[myplr]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK62; sfxdnum = PS_MONK62;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE62; sfxdnum = PS_ROGUE62;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR62; sfxdnum = PS_WARR62;
} }
#endif
} else if (monster[m].mName == UniqMonst[UMT_LAZURUS].mName && gbMaxPlayers != 1) { //"Arch-Bishop Lazarus" } else if (monster[m].mName == UniqMonst[UMT_LAZURUS].mName && gbMaxPlayers != 1) { //"Arch-Bishop Lazarus"
quests[Q_BETRAYER]._qactive = QUEST_DONE; quests[Q_BETRAYER]._qactive = QUEST_DONE;
quests[Q_BETRAYER]._qvar1 = 7; quests[Q_BETRAYER]._qvar1 = 7;
@ -405,16 +391,13 @@ void CheckQuestKill(int m, BOOL sendmsg)
sfxdnum = PS_ROGUE83; sfxdnum = PS_ROGUE83;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE83; sfxdnum = PS_MAGE83;
} } else if (plr[myplr]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK83; sfxdnum = PS_MONK83;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE83; sfxdnum = PS_ROGUE83;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR83; sfxdnum = PS_WARR83;
} }
#endif
if (sendmsg) { if (sendmsg) {
NetSendCmdQuest(TRUE, Q_BETRAYER); NetSendCmdQuest(TRUE, Q_BETRAYER);
NetSendCmdQuest(TRUE, Q_DIABLO); NetSendCmdQuest(TRUE, Q_DIABLO);
@ -433,16 +416,13 @@ void CheckQuestKill(int m, BOOL sendmsg)
sfxdnum = PS_ROGUE83; sfxdnum = PS_ROGUE83;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE83; sfxdnum = PS_MAGE83;
} } else if (plr[myplr]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK83; sfxdnum = PS_MONK83;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE83; sfxdnum = PS_ROGUE83;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR83; sfxdnum = PS_WARR83;
} }
#endif
} else if (monster[m].mName == UniqMonst[UMT_WARLORD].mName) { //"Warlord of Blood" } else if (monster[m].mName == UniqMonst[UMT_WARLORD].mName) { //"Warlord of Blood"
quests[Q_WARLORD]._qactive = QUEST_DONE; quests[Q_WARLORD]._qactive = QUEST_DONE;
sfxdelay = 30; sfxdelay = 30;
@ -452,16 +432,13 @@ void CheckQuestKill(int m, BOOL sendmsg)
sfxdnum = PS_ROGUE94; sfxdnum = PS_ROGUE94;
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE94; sfxdnum = PS_MAGE94;
} } else if (plr[myplr]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK94; sfxdnum = PS_MONK94;
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE94; sfxdnum = PS_ROGUE94;
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR94; sfxdnum = PS_WARR94;
} }
#endif
} }
} }

2
Source/quests.h

@ -40,7 +40,7 @@ void QuestlogESC();
void SetMultiQuest(int q, int s, int l, int v1); void SetMultiQuest(int q, int s, int l, int v1);
/* rdata */ /* rdata */
extern QuestData questlist[MAXQUESTS]; extern QuestData questlist[];
#ifdef __cplusplus #ifdef __cplusplus
} }

18
Source/spelldat.cpp

@ -29,34 +29,18 @@ SpellData spelldata[] = {
{ SPL_WAVE, 35, STYPE_FIRE, "Flame Wave", NULL, 9, 8, TRUE, FALSE, 54, IS_CAST2, { MIS_WAVE, 0, 0 }, 3, 20, 20, 40, 10000, 650 }, { SPL_WAVE, 35, STYPE_FIRE, "Flame Wave", NULL, 9, 8, TRUE, FALSE, 54, IS_CAST2, { MIS_WAVE, 0, 0 }, 3, 20, 20, 40, 10000, 650 },
{ SPL_DOOMSERP, 0, STYPE_LIGHTNING, "Doom Serpents", NULL, -1, -1, FALSE, FALSE, 0, IS_CAST2, { 0, 0, 0 }, 0, 0, 40, 80, 0, 0 }, { SPL_DOOMSERP, 0, STYPE_LIGHTNING, "Doom Serpents", NULL, -1, -1, FALSE, FALSE, 0, IS_CAST2, { 0, 0, 0 }, 0, 0, 40, 80, 0, 0 },
{ SPL_BLODRIT, 0, STYPE_MAGIC, "Blood Ritual", NULL, -1, -1, FALSE, FALSE, 0, IS_CAST2, { 0, 0, 0 }, 0, 0, 40, 80, 0, 0 }, { SPL_BLODRIT, 0, STYPE_MAGIC, "Blood Ritual", NULL, -1, -1, FALSE, FALSE, 0, IS_CAST2, { 0, 0, 0 }, 0, 0, 40, 80, 0, 0 },
#ifndef HELLFIRE
{ SPL_NOVA, 60, STYPE_MAGIC, "Nova", NULL, -1, 10, FALSE, FALSE, 87, IS_CAST4, { MIS_NOVA, 0, 0 }, 3, 35, 16, 32, 21000, 1300 },
#else
{ SPL_NOVA, 60, STYPE_MAGIC, "Nova", NULL, 14, 10, FALSE, FALSE, 87, IS_CAST4, { MIS_NOVA, 0, 0 }, 3, 35, 16, 32, 21000, 1300 }, { SPL_NOVA, 60, STYPE_MAGIC, "Nova", NULL, 14, 10, FALSE, FALSE, 87, IS_CAST4, { MIS_NOVA, 0, 0 }, 3, 35, 16, 32, 21000, 1300 },
#endif
{ SPL_INVISIBIL, 0, STYPE_MAGIC, "Invisibility", NULL, -1, -1, FALSE, FALSE, 0, IS_CAST2, { 0, 0, 0 }, 0, 0, 40, 80, 0, 0 }, { SPL_INVISIBIL, 0, STYPE_MAGIC, "Invisibility", NULL, -1, -1, FALSE, FALSE, 0, IS_CAST2, { 0, 0, 0 }, 0, 0, 40, 80, 0, 0 },
{ SPL_FLAME, 11, STYPE_FIRE, "Inferno", NULL, 3, 2, TRUE, FALSE, 20, IS_CAST2, { MIS_FLAMEC, 0, 0 }, 1, 6, 20, 40, 2000, 100 }, { SPL_FLAME, 11, STYPE_FIRE, "Inferno", NULL, 3, 2, TRUE, FALSE, 20, IS_CAST2, { MIS_FLAMEC, 0, 0 }, 1, 6, 20, 40, 2000, 100 },
{ SPL_GOLEM, 100, STYPE_FIRE, "Golem", NULL, 11, 9, FALSE, FALSE, 81, IS_CAST2, { MIS_GOLEM, 0, 0 }, 6, 60, 16, 32, 18000, 1100 }, { SPL_GOLEM, 100, STYPE_FIRE, "Golem", NULL, 11, 9, FALSE, FALSE, 81, IS_CAST2, { MIS_GOLEM, 0, 0 }, 6, 60, 16, 32, 18000, 1100 },
#ifndef HELLFIRE
{ SPL_BLODBOIL, 0, STYPE_LIGHTNING, "Blood Boil", NULL, -1, -1, TRUE, FALSE, 0, IS_CAST8, { 0, 0, 0 }, 0, 0, 0, 0, 0, 0 },
#else
{ SPL_BLODBOIL, 15, STYPE_MAGIC, "Rage", "Rage", -1, -1, FALSE, FALSE, 0, IS_CAST8, { MIS_BLODBOIL, 0, 0 }, 1, 1, 0, 0, 0, 0 }, { SPL_BLODBOIL, 15, STYPE_MAGIC, "Rage", "Rage", -1, -1, FALSE, FALSE, 0, IS_CAST8, { MIS_BLODBOIL, 0, 0 }, 1, 1, 0, 0, 0, 0 },
#endif
{ SPL_TELEPORT, 35, STYPE_MAGIC, "Teleport", NULL, 14, 12, TRUE, FALSE, 105, IS_CAST6, { MIS_TELEPORT, 0, 0 }, 3, 15, 16, 32, 20000, 1250 }, { SPL_TELEPORT, 35, STYPE_MAGIC, "Teleport", NULL, 14, 12, TRUE, FALSE, 105, IS_CAST6, { MIS_TELEPORT, 0, 0 }, 3, 15, 16, 32, 20000, 1250 },
#ifndef HELLFIRE
{ SPL_APOCA, 150, STYPE_FIRE, "Apocalypse", NULL, -1, 15, FALSE, FALSE, 149, IS_CAST2, { MIS_APOCA, 0, 0 }, 6, 90, 8, 12, 30000, 2000 },
#else
{ SPL_APOCA, 150, STYPE_FIRE, "Apocalypse", NULL, 19, 15, FALSE, FALSE, 149, IS_CAST2, { MIS_APOCA, 0, 0 }, 6, 90, 8, 12, 30000, 2000 }, { SPL_APOCA, 150, STYPE_FIRE, "Apocalypse", NULL, 19, 15, FALSE, FALSE, 149, IS_CAST2, { MIS_APOCA, 0, 0 }, 6, 90, 8, 12, 30000, 2000 },
#endif
{ SPL_ETHEREALIZE, 100, STYPE_MAGIC, "Etherealize", NULL, -1, -1, FALSE, FALSE, 93, IS_CAST2, { MIS_ETHEREALIZE, 0, 0 }, 0, 100, 2, 6, 26000, 1600 }, { SPL_ETHEREALIZE, 100, STYPE_MAGIC, "Etherealize", NULL, -1, -1, FALSE, FALSE, 93, IS_CAST2, { MIS_ETHEREALIZE, 0, 0 }, 0, 100, 2, 6, 26000, 1600 },
{ SPL_REPAIR, 0, STYPE_MAGIC, "Item Repair", "Item Repair", -1, -1, FALSE, TRUE, -1, IS_CAST6, { MIS_REPAIR, 0, 0 }, 0, 0, 40, 80, 0, 0 }, { SPL_REPAIR, 0, STYPE_MAGIC, "Item Repair", "Item Repair", -1, -1, FALSE, TRUE, -1, IS_CAST6, { MIS_REPAIR, 0, 0 }, 0, 0, 40, 80, 0, 0 },
{ SPL_RECHARGE, 0, STYPE_MAGIC, "Staff Recharge", "Staff Recharge", -1, -1, FALSE, TRUE, -1, IS_CAST6, { MIS_RECHARGE, 0, 0 }, 0, 0, 40, 80, 0, 0 }, { SPL_RECHARGE, 0, STYPE_MAGIC, "Staff Recharge", "Staff Recharge", -1, -1, FALSE, TRUE, -1, IS_CAST6, { MIS_RECHARGE, 0, 0 }, 0, 0, 40, 80, 0, 0 },
{ SPL_DISARM, 0, STYPE_MAGIC, "Trap Disarm", "Trap Disarm", -1, -1, FALSE, FALSE, -1, IS_CAST6, { MIS_DISARM, 0, 0 }, 0, 0, 40, 80, 0, 0 }, { SPL_DISARM, 0, STYPE_MAGIC, "Trap Disarm", "Trap Disarm", -1, -1, FALSE, FALSE, -1, IS_CAST6, { MIS_DISARM, 0, 0 }, 0, 0, 40, 80, 0, 0 },
#ifndef HELLFIRE
{ SPL_ELEMENT, 35, STYPE_FIRE, "Elemental", NULL, 8, 6, FALSE, FALSE, 68, IS_CAST2, { MIS_ELEMENT, 0, 0 }, 2, 20, 20, 60, 10500, 700 }, { SPL_ELEMENT, 35, STYPE_FIRE, "Elemental", NULL, 8, 6, FALSE, FALSE, 68, IS_CAST2, { MIS_ELEMENT, 0, 0 }, 2, 20, 20, 60, 10500, 700 },
#else
{ SPL_ELEMENT, 35, STYPE_FIRE, "Elemental", NULL, -1, -1, FALSE, FALSE, 68, IS_CAST2, { MIS_ELEMENT, 0, 0 }, 2, 20, 20, 60, 10500, 700 },
#endif
{ SPL_CBOLT, 6, STYPE_LIGHTNING, "Charged Bolt", NULL, 1, 1, TRUE, FALSE, 25, IS_CAST2, { MIS_CBOLT, 0, 0 }, 1, 6, 40, 80, 1000, 50 }, { SPL_CBOLT, 6, STYPE_LIGHTNING, "Charged Bolt", NULL, 1, 1, TRUE, FALSE, 25, IS_CAST2, { MIS_CBOLT, 0, 0 }, 1, 6, 40, 80, 1000, 50 },
{ SPL_HBOLT, 7, STYPE_MAGIC, "Holy Bolt", NULL, 1, 1, TRUE, FALSE, 20, IS_CAST2, { MIS_HBOLT, 0, 0 }, 1, 3, 40, 80, 1000, 50 }, { SPL_HBOLT, 7, STYPE_MAGIC, "Holy Bolt", NULL, 1, 1, TRUE, FALSE, 20, IS_CAST2, { MIS_HBOLT, 0, 0 }, 1, 3, 40, 80, 1000, 50 },
{ SPL_RESURRECT, 20, STYPE_MAGIC, "Resurrect", NULL, -1, 5, FALSE, TRUE, 30, IS_CAST8, { MIS_RESURRECT, 0, 0 }, 0, 20, 4, 10, 4000, 250 }, { SPL_RESURRECT, 20, STYPE_MAGIC, "Resurrect", NULL, -1, 5, FALSE, TRUE, 30, IS_CAST8, { MIS_RESURRECT, 0, 0 }, 0, 20, 4, 10, 4000, 250 },
@ -64,7 +48,6 @@ SpellData spelldata[] = {
{ SPL_HEALOTHER, 5, STYPE_MAGIC, "Heal Other", NULL, 1, 1, FALSE, TRUE, 17, IS_CAST8, { MIS_HEALOTHER, 0, 0 }, 3, 1, 20, 40, 1000, 50 }, { SPL_HEALOTHER, 5, STYPE_MAGIC, "Heal Other", NULL, 1, 1, FALSE, TRUE, 17, IS_CAST8, { MIS_HEALOTHER, 0, 0 }, 3, 1, 20, 40, 1000, 50 },
{ SPL_FLARE, 25, STYPE_MAGIC, "Blood Star", NULL, 14, 13, FALSE, FALSE, 70, IS_CAST2, { MIS_FLARE, 0, 0 }, 2, 14, 20, 60, 27500, 1800 }, { SPL_FLARE, 25, STYPE_MAGIC, "Blood Star", NULL, 14, 13, FALSE, FALSE, 70, IS_CAST2, { MIS_FLARE, 0, 0 }, 2, 14, 20, 60, 27500, 1800 },
{ SPL_BONESPIRIT, 24, STYPE_MAGIC, "Bone Spirit", NULL, 9, 7, FALSE, FALSE, 34, IS_CAST2, { MIS_BONESPIRIT, 0, 0 }, 1, 12, 20, 60, 11500, 800 }, { SPL_BONESPIRIT, 24, STYPE_MAGIC, "Bone Spirit", NULL, 9, 7, FALSE, FALSE, 34, IS_CAST2, { MIS_BONESPIRIT, 0, 0 }, 1, 12, 20, 60, 11500, 800 },
#ifdef HELLFIRE
{ SPL_MANA, 255, STYPE_MAGIC, "Mana", NULL, -1, 5, FALSE, TRUE, 17, IS_CAST8, { MIS_MANA, 0, 0 }, 3, 1, 12, 24, 1000, 50 }, { SPL_MANA, 255, STYPE_MAGIC, "Mana", NULL, -1, 5, FALSE, TRUE, 17, IS_CAST8, { MIS_MANA, 0, 0 }, 3, 1, 12, 24, 1000, 50 },
{ SPL_MAGI, 255, STYPE_MAGIC, "the Magi", NULL, -1, 20, FALSE, TRUE, 45, IS_CAST8, { MIS_MAGI, 0, 0 }, 3, 1, 15, 30, 100000, 200 }, { SPL_MAGI, 255, STYPE_MAGIC, "the Magi", NULL, -1, 20, FALSE, TRUE, 45, IS_CAST8, { MIS_MAGI, 0, 0 }, 3, 1, 15, 30, 100000, 200 },
{ SPL_JESTER, 255, STYPE_MAGIC, "the Jester", NULL, -1, 4, TRUE, FALSE, 30, IS_CAST8, { MIS_JESTER, 0, 0 }, 3, 1, 15, 30, 100000, 200 }, { SPL_JESTER, 255, STYPE_MAGIC, "the Jester", NULL, -1, 4, TRUE, FALSE, 30, IS_CAST8, { MIS_JESTER, 0, 0 }, 3, 1, 15, 30, 100000, 200 },
@ -80,7 +63,6 @@ SpellData spelldata[] = {
{ SPL_RUNENOVA, 255, STYPE_MAGIC, "Rune of Nova", NULL, -1, -1, TRUE, FALSE, 48, IS_CAST8, { MIS_RUNENOVA, 0, 0 }, 1, 10, 40, 80, 8000, 300 }, { SPL_RUNENOVA, 255, STYPE_MAGIC, "Rune of Nova", NULL, -1, -1, TRUE, FALSE, 48, IS_CAST8, { MIS_RUNENOVA, 0, 0 }, 1, 10, 40, 80, 8000, 300 },
{ SPL_RUNEIMMOLAT, 255, STYPE_MAGIC, "Rune of Immolation", NULL, -1, -1, TRUE, FALSE, 48, IS_CAST8, { MIS_RUNEIMMOLAT, 0, 0 }, 1, 10, 40, 80, 8000, 300 }, { SPL_RUNEIMMOLAT, 255, STYPE_MAGIC, "Rune of Immolation", NULL, -1, -1, TRUE, FALSE, 48, IS_CAST8, { MIS_RUNEIMMOLAT, 0, 0 }, 1, 10, 40, 80, 8000, 300 },
{ SPL_RUNESTONE, 255, STYPE_MAGIC, "Rune of Stone", NULL, -1, -1, TRUE, FALSE, 48, IS_CAST8, { MIS_RUNESTONE, 0, 0 }, 1, 10, 40, 80, 8000, 300 }, { SPL_RUNESTONE, 255, STYPE_MAGIC, "Rune of Stone", NULL, -1, -1, TRUE, FALSE, 48, IS_CAST8, { MIS_RUNESTONE, 0, 0 }, 1, 10, 40, 80, 8000, 300 },
#endif
// clang-format on // clang-format on
}; };

32
Source/spells.cpp

@ -350,7 +350,6 @@ void DoHealOther(int pnum, int rid)
hp += (random_(57, 6) + 1) << 6; hp += (random_(57, 6) + 1) << 6;
} }
#ifdef HELLFIRE
if (plr[pnum]._pClass == PC_WARRIOR || plr[pnum]._pClass == PC_BARBARIAN) { if (plr[pnum]._pClass == PC_WARRIOR || plr[pnum]._pClass == PC_BARBARIAN) {
hp <<= 1; hp <<= 1;
} else if (plr[pnum]._pClass == PC_ROGUE || plr[pnum]._pClass == PC_BARD) { } else if (plr[pnum]._pClass == PC_ROGUE || plr[pnum]._pClass == PC_BARD) {
@ -358,15 +357,6 @@ void DoHealOther(int pnum, int rid)
} else if (plr[pnum]._pClass == PC_MONK) { } else if (plr[pnum]._pClass == PC_MONK) {
hp *= 3; hp *= 3;
} }
#else
if (plr[pnum]._pClass == PC_WARRIOR) {
hp <<= 1;
}
if (plr[pnum]._pClass == PC_ROGUE) {
hp += hp >> 1;
}
#endif
plr[rid]._pHitPoints += hp; plr[rid]._pHitPoints += hp;
@ -397,6 +387,21 @@ int GetSpellBookLevel(int s)
} }
} }
if (!gbIsHellfire) {
switch (s) {
case SPL_NOVA:
case SPL_APOCA:
return -1;
}
}
if (gbIsHellfire) {
switch (s) {
case SPL_ELEMENT:
return -1;
}
}
return spelldata[s].sBookLvl; return spelldata[s].sBookLvl;
} }
@ -414,6 +419,13 @@ int GetSpellStaffLevel(int s)
} }
} }
if (gbIsHellfire) {
switch (s) {
case SPL_ELEMENT:
return -1;
}
}
return spelldata[s].sStaffLvl; return spelldata[s].sStaffLvl;
} }

6
Source/towners.cpp

@ -25,15 +25,9 @@ TownerStruct towner[NUM_TOWNERS];
* ref: enum plr_class * ref: enum plr_class
*/ */
const int snSFX[3][NUM_CLASSES] = { const int snSFX[3][NUM_CLASSES] = {
#ifdef HELLFIRE
{ PS_WARR52, PS_ROGUE52, PS_MAGE52, PS_MONK52, 0 }, // BUGFIX: add warrior sounds for barbarian instead of 0 - walk sound { PS_WARR52, PS_ROGUE52, PS_MAGE52, PS_MONK52, 0 }, // BUGFIX: add warrior sounds for barbarian instead of 0 - walk sound
{ PS_WARR49, PS_ROGUE49, PS_MAGE49, PS_MONK49, 0 }, { PS_WARR49, PS_ROGUE49, PS_MAGE49, PS_MONK49, 0 },
{ PS_WARR50, PS_ROGUE50, PS_MAGE50, PS_MONK50, 0 }, { PS_WARR50, PS_ROGUE50, PS_MAGE50, PS_MONK50, 0 },
#else
{ PS_WARR52, PS_ROGUE52, PS_MAGE52 },
{ PS_WARR49, PS_ROGUE49, PS_MAGE49 },
{ PS_WARR50, PS_ROGUE50, PS_MAGE50 },
#endif
}; };
/* data */ /* data */

29
Source/trigs.cpp

@ -17,10 +17,8 @@ int TWarpFrom;
int TownDownList[] = { 716, 715, 719, 720, 721, 723, 724, 725, 726, 727, -1 }; int TownDownList[] = { 716, 715, 719, 720, 721, 723, 724, 725, 726, 727, -1 };
/** Specifies the dungeon piece IDs which constitute stairways leading down to the catacombs from town. */ /** Specifies the dungeon piece IDs which constitute stairways leading down to the catacombs from town. */
int TownWarp1List[] = { 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1181, 1183, 1185, -1 }; int TownWarp1List[] = { 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1181, 1183, 1185, -1 };
#ifdef HELLFIRE
int TownCryptList[] = { 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, -1 }; int TownCryptList[] = { 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, -1 };
int TownHiveList[] = { 1307, 1308, 1309, 1310, -1 }; int TownHiveList[] = { 1307, 1308, 1309, 1310, -1 };
#endif
/** Specifies the dungeon piece IDs which constitute stairways leading up from the cathedral. */ /** Specifies the dungeon piece IDs which constitute stairways leading up from the cathedral. */
int L1UpList[] = { 127, 129, 130, 131, 132, 133, 135, 137, 138, 139, 140, -1 }; int L1UpList[] = { 127, 129, 130, 131, 132, 133, 135, 137, 138, 139, 140, -1 };
/** Specifies the dungeon piece IDs which constitute stairways leading down from the cathedral. */ /** Specifies the dungeon piece IDs which constitute stairways leading down from the cathedral. */
@ -45,14 +43,12 @@ int L4DownList[] = { 120, 130, 131, 132, 133, -1 };
int L4TWarpUpList[] = { 421, 422, 429, -1 }; int L4TWarpUpList[] = { 421, 422, 429, -1 };
/** Specifies the dungeon piece IDs which constitute stairways leading down to Diablo from hell. */ /** Specifies the dungeon piece IDs which constitute stairways leading down to Diablo from hell. */
int L4PentaList[] = { 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, -1 }; int L4PentaList[] = { 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, -1 };
#ifdef HELLFIRE
int L5TWarpUpList[] = { 172, 173, 174, 175, 176, 177, 178, 179, 184, -1 }; int L5TWarpUpList[] = { 172, 173, 174, 175, 176, 177, 178, 179, 184, -1 };
int L5UpList[] = { 149, 150, 151, 152, 153, 154, 155, 157, 158, 159, -1 }; int L5UpList[] = { 149, 150, 151, 152, 153, 154, 155, 157, 158, 159, -1 };
int L5DownList[] = { 125, 126, 129, 131, 132, 135, 136, 140, 142, -1 }; int L5DownList[] = { 125, 126, 129, 131, 132, 135, 136, 140, 142, -1 };
int L6TWarpUpList[] = { 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, -1 }; int L6TWarpUpList[] = { 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, -1 };
int L6UpList[] = { 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, -1 }; int L6UpList[] = { 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, -1 };
int L6DownList[] = { 57, 58, 59, 60, 61, 62, 63, 64, -1 }; int L6DownList[] = { 57, 58, 59, 60, 61, 62, 63, 64, -1 };
#endif
void InitNoTriggers() void InitNoTriggers()
{ {
@ -168,9 +164,7 @@ void InitL1Triggers()
int i, j; int i, j;
numtrigs = 0; numtrigs = 0;
#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] == 129) { if (dPiece[i][j] == 129) {
@ -187,7 +181,6 @@ void InitL1Triggers()
} }
} }
} }
#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++) {
@ -213,7 +206,6 @@ void InitL1Triggers()
} }
} }
} }
#endif
trigflag = FALSE; trigflag = FALSE;
} }
@ -254,9 +246,7 @@ void InitL3Triggers()
{ {
int i, j; int i, j;
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
numtrigs = 0; numtrigs = 0;
for (j = 0; j < MAXDUNY; j++) { for (j = 0; j < MAXDUNY; j++) {
for (i = 0; i < MAXDUNX; i++) { for (i = 0; i < MAXDUNX; i++) {
@ -282,7 +272,6 @@ void InitL3Triggers()
} }
} }
} }
#ifdef HELLFIRE
} else { } else {
numtrigs = 0; numtrigs = 0;
for (j = 0; j < MAXDUNY; j++) { for (j = 0; j < MAXDUNY; j++) {
@ -310,7 +299,6 @@ void InitL3Triggers()
} }
} }
} }
#endif
trigflag = FALSE; trigflag = FALSE;
} }
@ -465,13 +453,9 @@ BOOL ForceTownTrig()
BOOL ForceL1Trig() BOOL ForceL1Trig()
{ {
int i, j; int i, j;
#ifdef HELLFIRE
int dx, dy; int dx, dy;
#endif
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
for (i = 0; L1UpList[i] != -1; i++) { for (i = 0; L1UpList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L1UpList[i]) { if (dPiece[cursmx][cursmy] == L1UpList[i]) {
if (currlevel > 1) if (currlevel > 1)
@ -499,7 +483,6 @@ BOOL ForceL1Trig()
} }
} }
} }
#ifdef HELLFIRE
} else { } else {
for (i = 0; L5UpList[i] != -1; i++) { for (i = 0; L5UpList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L5UpList[i]) { if (dPiece[cursmx][cursmy] == L5UpList[i]) {
@ -548,7 +531,6 @@ BOOL ForceL1Trig()
} }
} }
} }
#endif
return FALSE; return FALSE;
} }
@ -613,9 +595,7 @@ BOOL ForceL3Trig()
{ {
int i, j, dx, dy; int i, j, dx, dy;
#ifdef HELLFIRE
if (currlevel < 17) { if (currlevel < 17) {
#endif
for (i = 0; L3UpList[i] != -1; ++i) { for (i = 0; L3UpList[i] != -1; ++i) {
if (dPiece[cursmx][cursmy] == L3UpList[i]) { if (dPiece[cursmx][cursmy] == L3UpList[i]) {
sprintf(infostr, "Up to level %i", currlevel - 1); sprintf(infostr, "Up to level %i", currlevel - 1);
@ -642,7 +622,6 @@ BOOL ForceL3Trig()
} }
} }
} }
#ifdef HELLFIRE
} else { } else {
for (i = 0; L6UpList[i] != -1; ++i) { for (i = 0; L6UpList[i] != -1; ++i) {
if (dPiece[cursmx][cursmy] == L6UpList[i]) { if (dPiece[cursmx][cursmy] == L6UpList[i]) {
@ -671,7 +650,6 @@ BOOL ForceL3Trig()
} }
} }
} }
#endif
if (currlevel == 9) { if (currlevel == 9) {
for (i = 0; L3TWarpUpList[i] != -1; i++) { for (i = 0; L3TWarpUpList[i] != -1; i++) {
@ -691,7 +669,6 @@ BOOL ForceL3Trig()
} }
} }
} }
#ifdef HELLFIRE
if (currlevel == 17) { if (currlevel == 17) {
for (i = 0; L6TWarpUpList[i] != -1; i++) { for (i = 0; L6TWarpUpList[i] != -1; i++) {
if (dPiece[cursmx][cursmy] == L6TWarpUpList[i]) { if (dPiece[cursmx][cursmy] == L6TWarpUpList[i]) {
@ -710,7 +687,6 @@ BOOL ForceL3Trig()
} }
} }
} }
#endif
return FALSE; return FALSE;
} }
@ -963,16 +939,13 @@ void CheckTriggers()
PlaySFX(PS_ROGUE43); PlaySFX(PS_ROGUE43);
} else if (plr[myplr]._pClass == PC_SORCERER) { } else if (plr[myplr]._pClass == PC_SORCERER) {
PlaySFX(PS_MAGE43); PlaySFX(PS_MAGE43);
} } else if (plr[myplr]._pClass == PC_MONK) {
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
PlaySFX(PS_MONK43); PlaySFX(PS_MONK43);
} else if (plr[myplr]._pClass == PC_BARD) { } else if (plr[myplr]._pClass == PC_BARD) {
PlaySFX(PS_ROGUE43); PlaySFX(PS_ROGUE43);
} else if (plr[myplr]._pClass == PC_BARBARIAN) { } else if (plr[myplr]._pClass == PC_BARBARIAN) {
PlaySFX(PS_WARR43); PlaySFX(PS_WARR43);
} }
#endif
InitDiabloMsg(abortflag); InitDiabloMsg(abortflag);
NetSendCmdLoc(TRUE, CMD_WALKXY, x, y); NetSendCmdLoc(TRUE, CMD_WALKXY, x, y);

16
SourceX/DiabloUI/diabloui.cpp

@ -416,20 +416,16 @@ bool IsInsideRect(const SDL_Event &event, const SDL_Rect &rect)
void LoadUiGFX() void LoadUiGFX()
{ {
#ifdef HELLFIRE if (gbIsHellfire) {
LoadMaskedArt("ui_art\\hf_logo2.pcx", &ArtLogos[LOGO_MED], 16); LoadMaskedArt("ui_art\\hf_logo2.pcx", &ArtLogos[LOGO_MED], 16);
#else } else {
LoadMaskedArt("ui_art\\smlogo.pcx", &ArtLogos[LOGO_MED], 15); LoadMaskedArt("ui_art\\smlogo.pcx", &ArtLogos[LOGO_MED], 15);
#endif }
LoadMaskedArt("ui_art\\focus16.pcx", &ArtFocus[FOCUS_SMALL], 8); LoadMaskedArt("ui_art\\focus16.pcx", &ArtFocus[FOCUS_SMALL], 8);
LoadMaskedArt("ui_art\\focus.pcx", &ArtFocus[FOCUS_MED], 8); LoadMaskedArt("ui_art\\focus.pcx", &ArtFocus[FOCUS_MED], 8);
LoadMaskedArt("ui_art\\focus42.pcx", &ArtFocus[FOCUS_BIG], 8); LoadMaskedArt("ui_art\\focus42.pcx", &ArtFocus[FOCUS_BIG], 8);
LoadMaskedArt("ui_art\\cursor.pcx", &ArtCursor, 1, 0); LoadMaskedArt("ui_art\\cursor.pcx", &ArtCursor, 1, 0);
#ifdef HELLFIRE LoadArt("ui_art\\heros.pcx", &ArtHero, hellfire_mpq ? 6 : 4);
LoadArt("ui_art\\heros.pcx", &ArtHero, 6);
#else
LoadArt("ui_art\\heros.pcx", &ArtHero, 4);
#endif
} }
void UiInitialize() void UiInitialize()

26
SourceX/DiabloUI/mainmenu.cpp

@ -39,14 +39,14 @@ void mainmenu_Load(const char *name, void (*fnSound)(const char *file))
vecMenuItems.push_back(new UiListItem("Single Player", MAINMENU_SINGLE_PLAYER)); vecMenuItems.push_back(new UiListItem("Single Player", MAINMENU_SINGLE_PLAYER));
vecMenuItems.push_back(new UiListItem("Multi Player", MAINMENU_MULTIPLAYER)); vecMenuItems.push_back(new UiListItem("Multi Player", MAINMENU_MULTIPLAYER));
vecMenuItems.push_back(new UiListItem("Replay Intro", MAINMENU_REPLAY_INTRO)); vecMenuItems.push_back(new UiListItem("Replay Intro", MAINMENU_REPLAY_INTRO));
#ifdef HELLFIRE if (gbIsHellfire) {
vecMenuItems.push_back(new UiListItem("Support", MAINMENU_SHOW_SUPPORT)); vecMenuItems.push_back(new UiListItem("Support", MAINMENU_SHOW_SUPPORT));
vecMenuItems.push_back(new UiListItem("Credits", MAINMENU_SHOW_CREDITS)); vecMenuItems.push_back(new UiListItem("Credits", MAINMENU_SHOW_CREDITS));
vecMenuItems.push_back(new UiListItem("Exit Hellfire", MAINMENU_EXIT_DIABLO)); vecMenuItems.push_back(new UiListItem("Exit Hellfire", MAINMENU_EXIT_DIABLO));
#else } else {
vecMenuItems.push_back(new UiListItem("Show Credits", MAINMENU_SHOW_CREDITS)); vecMenuItems.push_back(new UiListItem("Show Credits", MAINMENU_SHOW_CREDITS));
vecMenuItems.push_back(new UiListItem("Exit Diablo", MAINMENU_EXIT_DIABLO)); vecMenuItems.push_back(new UiListItem("Exit Diablo", MAINMENU_EXIT_DIABLO));
#endif }
UiAddBackground(&vecMainMenuDialog); UiAddBackground(&vecMainMenuDialog);
UiAddLogo(&vecMainMenuDialog); UiAddLogo(&vecMainMenuDialog);
@ -56,15 +56,11 @@ void mainmenu_Load(const char *name, void (*fnSound)(const char *file))
SDL_Rect rect = { 17, (SCREEN_HEIGHT - 36), 605, 21 }; SDL_Rect rect = { 17, (SCREEN_HEIGHT - 36), 605, 21 };
vecMainMenuDialog.push_back(new UiArtText(name, rect, UIS_SMALL)); vecMainMenuDialog.push_back(new UiArtText(name, rect, UIS_SMALL));
#ifndef HELLFIRE if (!gbSpawned || gbIsHellfire) {
if (!gbSpawned) {
#endif
LoadBackgroundArt("ui_art\\mainmenu.pcx"); LoadBackgroundArt("ui_art\\mainmenu.pcx");
#ifndef HELLFIRE
} else { } else {
LoadBackgroundArt("ui_art\\swmmenu.pcx"); LoadBackgroundArt("ui_art\\swmmenu.pcx");
} }
#endif
UiInitList(vecMenuItems.size(), NULL, UiMainMenuSelect, mainmenu_Esc, vecMainMenuDialog, true); UiInitList(vecMenuItems.size(), NULL, UiMainMenuSelect, mainmenu_Esc, vecMainMenuDialog, true);
} }
@ -106,12 +102,10 @@ BOOL UiMainMenuDialog(const char *name, int *pdwResult, void (*fnSound)(const ch
mainmenu_Free(); mainmenu_Free();
#ifndef HELLFIRE if (gbSpawned && !gbIsHellfire && MainMenuResult == MAINMENU_REPLAY_INTRO) {
if (gbSpawned && MainMenuResult == MAINMENU_REPLAY_INTRO) {
UiSelOkDialog(NULL, "The Diablo introduction cinematic is only available in the full retail version of Diablo. Visit https://www.gog.com/game/diablo to purchase.", true); UiSelOkDialog(NULL, "The Diablo introduction cinematic is only available in the full retail version of Diablo. Visit https://www.gog.com/game/diablo to purchase.", true);
MainMenuResult = 0; MainMenuResult = 0;
} }
#endif
} }
*pdwResult = MainMenuResult; *pdwResult = MainMenuResult;

37
SourceX/DiabloUI/selhero.cpp

@ -92,10 +92,9 @@ void selhero_Free()
void selhero_SetStats() void selhero_SetStats()
{ {
int heroclass = selhero_heroInfo.heroclass; int heroclass = selhero_heroInfo.heroclass;
#ifdef HELLFIRE if (heroclass == PC_BARBARIAN) {
if (heroclass == UI_BARBARIAN) heroclass = PC_WARRIOR; // The graphics is missing from heros.pcx
heroclass = UI_WARRIOR; }
#endif
SELHERO_DIALOG_HERO_IMG->m_frame = heroclass; SELHERO_DIALOG_HERO_IMG->m_frame = heroclass;
snprintf(textStats[0], sizeof(textStats[0]), "%d", selhero_heroInfo.level); snprintf(textStats[0], sizeof(textStats[0]), "%d", selhero_heroInfo.level);
snprintf(textStats[1], sizeof(textStats[1]), "%d", selhero_heroInfo.strength); snprintf(textStats[1], sizeof(textStats[1]), "%d", selhero_heroInfo.strength);
@ -150,7 +149,11 @@ void selhero_Init()
vecSelHeroDialog.push_back(new UiArtText(title, rect1, UIS_CENTER | UIS_BIG)); vecSelHeroDialog.push_back(new UiArtText(title, rect1, UIS_CENTER | UIS_BIG));
SDL_Rect rect2 = { PANEL_LEFT + 30, (UI_OFFSET_Y + 211), 180, 76 }; SDL_Rect rect2 = { PANEL_LEFT + 30, (UI_OFFSET_Y + 211), 180, 76 };
SELHERO_DIALOG_HERO_IMG = new UiImage(&ArtHero, UI_NUM_CLASSES, rect2); if (hellfire_mpq) {
SELHERO_DIALOG_HERO_IMG = new UiImage(&ArtHero, 5, rect2);
} else {
SELHERO_DIALOG_HERO_IMG = new UiImage(&ArtHero, 3, rect2);
}
vecSelHeroDialog.push_back(SELHERO_DIALOG_HERO_IMG); vecSelHeroDialog.push_back(SELHERO_DIALOG_HERO_IMG);
SDL_Rect rect3 = { PANEL_LEFT + 39, (UI_OFFSET_Y + 323), 110, 21 }; SDL_Rect rect3 = { PANEL_LEFT + 39, (UI_OFFSET_Y + 323), 110, 21 };
@ -235,11 +238,7 @@ void selhero_List_Focus(int value)
return; return;
} }
#ifdef HELLFIRE SELHERO_DIALOG_HERO_IMG->m_frame = hellfire_mpq ? 5 : 3;
SELHERO_DIALOG_HERO_IMG->m_frame = 5;
#else
SELHERO_DIALOG_HERO_IMG->m_frame = UI_NUM_CLASSES;
#endif
strncpy(textStats[0], "--", sizeof(textStats[0]) - 1); strncpy(textStats[0], "--", sizeof(textStats[0]) - 1);
strncpy(textStats[1], "--", sizeof(textStats[1]) - 1); strncpy(textStats[1], "--", sizeof(textStats[1]) - 1);
strncpy(textStats[2], "--", sizeof(textStats[2]) - 1); strncpy(textStats[2], "--", sizeof(textStats[2]) - 1);
@ -266,20 +265,20 @@ void selhero_List_Select(int value)
selhero_FreeListItems(); selhero_FreeListItems();
int itemH = 33; int itemH = 33;
vecSelHeroDlgItems.push_back(new UiListItem("Warrior", UI_WARRIOR)); vecSelHeroDlgItems.push_back(new UiListItem("Warrior", PC_WARRIOR));
vecSelHeroDlgItems.push_back(new UiListItem("Rogue", UI_ROGUE)); vecSelHeroDlgItems.push_back(new UiListItem("Rogue", PC_ROGUE));
vecSelHeroDlgItems.push_back(new UiListItem("Sorcerer", UI_SORCERER)); vecSelHeroDlgItems.push_back(new UiListItem("Sorcerer", PC_SORCERER));
#ifdef HELLFIRE if (gbIsHellfire) {
vecSelHeroDlgItems.push_back(new UiListItem("Monk", UI_MONK)); vecSelHeroDlgItems.push_back(new UiListItem("Monk", PC_MONK));
}
if (UseBardTest) { if (UseBardTest) {
vecSelHeroDlgItems.push_back(new UiListItem("Bard", UI_BARD)); vecSelHeroDlgItems.push_back(new UiListItem("Bard", PC_BARD));
} }
if (UseBarbarianTest) { if (UseBarbarianTest) {
vecSelHeroDlgItems.push_back(new UiListItem("Barbarian", UI_BARBARIAN)); vecSelHeroDlgItems.push_back(new UiListItem("Barbarian", PC_BARBARIAN));
} }
if (vecSelHeroDlgItems.size() > 4) if (vecSelHeroDlgItems.size() > 4)
itemH = 26; itemH = 26;
#endif
int itemY = 246 + (176 - vecSelHeroDlgItems.size() * itemH) / 2; int itemY = 246 + (176 - vecSelHeroDlgItems.size() * itemH) / 2;
vecSelDlgItems.push_back(new UiList(vecSelHeroDlgItems, PANEL_LEFT + 264, (UI_OFFSET_Y + itemY), 320, itemH, UIS_CENTER | UIS_MED | UIS_GOLD)); vecSelDlgItems.push_back(new UiList(vecSelHeroDlgItems, PANEL_LEFT + 264, (UI_OFFSET_Y + itemY), 320, itemH, UIS_CENTER | UIS_MED | UIS_GOLD));
@ -349,7 +348,7 @@ void selhero_ClassSelector_Focus(int value)
void selhero_ClassSelector_Select(int value) void selhero_ClassSelector_Select(int value)
{ {
int hClass = vecSelHeroDlgItems[value]->m_value; int hClass = vecSelHeroDlgItems[value]->m_value;
if (gbSpawned && (hClass == UI_ROGUE || hClass == UI_SORCERER)) { if (gbSpawned && (hClass == PC_ROGUE || hClass == PC_SORCERER)) {
ArtBackground.Unload(); ArtBackground.Unload();
UiSelOkDialog(NULL, "The Rogue and Sorcerer are only available in the full retail version of Diablo. Visit https://www.gog.com/game/diablo to purchase.", false); UiSelOkDialog(NULL, "The Rogue and Sorcerer are only available in the full retail version of Diablo. Visit https://www.gog.com/game/diablo to purchase.", false);
LoadBackgroundArt("ui_art\\selhero.pcx"); LoadBackgroundArt("ui_art\\selhero.pcx");

31
SourceX/DiabloUI/title.cpp

@ -8,12 +8,12 @@ std::vector<UiItemBase *> vecTitleScreen;
void title_Load() void title_Load()
{ {
#ifdef HELLFIRE if (gbIsHellfire) {
LoadBackgroundArt("ui_art\\hf_logo1.pcx", 16); LoadBackgroundArt("ui_art\\hf_logo1.pcx", 16);
#else } else {
LoadBackgroundArt("ui_art\\title.pcx"); LoadBackgroundArt("ui_art\\title.pcx");
LoadMaskedArt("ui_art\\logo.pcx", &ArtLogos[LOGO_BIG], 15); LoadMaskedArt("ui_art\\logo.pcx", &ArtLogos[LOGO_BIG], 15);
#endif }
} }
void title_Free() void title_Free()
@ -30,17 +30,16 @@ void title_Free()
void UiTitleDialog() void UiTitleDialog()
{ {
#ifdef HELLFIRE if (gbIsHellfire) {
SDL_Rect rect = { 0, UI_OFFSET_Y, 0, 0 }; SDL_Rect rect = { 0, UI_OFFSET_Y, 0, 0 };
vecTitleScreen.push_back(new UiImage(&ArtBackground, /*animated=*/true, /*frame=*/0, rect, UIS_CENTER)); vecTitleScreen.push_back(new UiImage(&ArtBackground, /*animated=*/true, /*frame=*/0, rect, UIS_CENTER));
#else } else {
UiAddBackground(&vecTitleScreen); UiAddBackground(&vecTitleScreen);
UiAddLogo(&vecTitleScreen, LOGO_BIG, 182); UiAddLogo(&vecTitleScreen, LOGO_BIG, 182);
SDL_Rect rect = { PANEL_LEFT + 49, (UI_OFFSET_Y + 410), 550, 26 };
vecTitleScreen.push_back(new UiArtText("Copyright \xA9 1996-2001 Blizzard Entertainment", rect, UIS_MED | UIS_CENTER));
#endif
SDL_Rect rect = { PANEL_LEFT + 49, (UI_OFFSET_Y + 410), 550, 26 };
vecTitleScreen.push_back(new UiArtText("Copyright \xA9 1996-2001 Blizzard Entertainment", rect, UIS_MED | UIS_CENTER));
}
title_Load(); title_Load();
bool endMenu = false; bool endMenu = false;

7
defs.h

@ -46,20 +46,15 @@
#ifdef HELLFIRE #ifdef HELLFIRE
#define MAXQUESTS 24 #define MAXQUESTS 24
#define MAXMULTIQUESTS 10
#else #else
#define MAXQUESTS 16 #define MAXQUESTS 16
#define MAXMULTIQUESTS 4
#endif #endif
#define MAXMULTIQUESTS 10
#define MAXTHEMES 50 #define MAXTHEMES 50
#define MAXTILES 2048 #define MAXTILES 2048
#ifdef HELLFIRE
#define MAXTRIGGERS 7 #define MAXTRIGGERS 7
#else
#define MAXTRIGGERS 5
#endif
#define MAXVISION 32 #define MAXVISION 32
#define MDMAXX 40 #define MDMAXX 40

24
enums.h

@ -3113,11 +3113,7 @@ typedef enum _unique_items {
UITEM_STEELVEIL = 0x6, UITEM_STEELVEIL = 0x6,
UITEM_ARMOFVAL = 0x7, UITEM_ARMOFVAL = 0x7,
UITEM_GRISWOLD = 0x8, UITEM_GRISWOLD = 0x8,
#ifndef HELLFIRE
UITEM_LGTFORGE = 0x9,
#else
UITEM_BOVINE = 0x9, UITEM_BOVINE = 0x9,
#endif
UITEM_RIFTBOW = 0xA, UITEM_RIFTBOW = 0xA,
UITEM_NEEDLER = 0xB, UITEM_NEEDLER = 0xB,
UITEM_CELESTBOW = 0xC, UITEM_CELESTBOW = 0xC,
@ -3202,29 +3198,15 @@ typedef enum _unique_items {
} _unique_items; } _unique_items;
typedef enum plr_class { typedef enum plr_class {
PC_WARRIOR = 0x0, PC_WARRIOR = 0x0,
PC_ROGUE = 0x1, PC_ROGUE = 0x1,
PC_SORCERER = 0x2, PC_SORCERER = 0x2,
#ifdef HELLFIRE
PC_MONK = 0x3, PC_MONK = 0x3,
PC_BARD = 0x4, PC_BARD = 0x4,
PC_BARBARIAN = 0x5, PC_BARBARIAN = 0x5,
#endif
NUM_CLASSES NUM_CLASSES
} plr_class; } plr_class;
typedef enum _ui_classes {
UI_WARRIOR = 0x0,
UI_ROGUE = 0x1,
UI_SORCERER = 0x2,
#ifdef HELLFIRE
UI_MONK = 0x3,
UI_BARD = 0x4,
UI_BARBARIAN = 0x5,
#endif
UI_NUM_CLASSES,
} _ui_classes;
typedef enum _walk_path { typedef enum _walk_path {
WALK_NE = 0x1, WALK_NE = 0x1,
WALK_NW = 0x2, WALK_NW = 0x2,

4
structs.h

@ -1019,11 +1019,7 @@ typedef struct QuestStruct {
int _qty; int _qty;
unsigned char _qslvl; unsigned char _qslvl;
unsigned char _qidx; unsigned char _qidx;
#ifndef HELLFIRE
unsigned char _qmsg;
#else
unsigned int _qmsg; unsigned int _qmsg;
#endif
unsigned char _qvar1; unsigned char _qvar1;
unsigned char _qvar2; unsigned char _qvar2;
BOOL _qlog; BOOL _qlog;

Loading…
Cancel
Save