From e609e170d08689a487b7b598e2d48ec15c3877b6 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 4 Jan 2021 21:46:06 +0100 Subject: [PATCH] Merge a large chunk of Hellfire the code paths --- Source/control.cpp | 6 -- Source/doom.cpp | 23 +--- Source/drlg_l1.cpp | 39 +------ Source/effects.cpp | 7 +- Source/inv.cpp | 197 +++------------------------------- Source/items.cpp | 73 ++----------- Source/loadsave.cpp | 22 ++-- Source/misdat.cpp | 4 - Source/missiles.cpp | 15 --- Source/missiles.h | 5 - Source/monster.cpp | 6 -- Source/objects.cpp | 18 +--- Source/pfile.cpp | 62 ++--------- Source/pfile.h | 2 +- Source/player.cpp | 59 +--------- Source/quests.cpp | 39 ++----- Source/quests.h | 2 +- Source/spelldat.cpp | 18 ---- Source/spells.cpp | 32 ++++-- Source/towners.cpp | 6 -- Source/trigs.cpp | 29 +---- SourceX/DiabloUI/diabloui.cpp | 16 ++- SourceX/DiabloUI/mainmenu.cpp | 26 ++--- SourceX/DiabloUI/selhero.cpp | 37 ++++--- SourceX/DiabloUI/title.cpp | 31 +++--- defs.h | 7 +- enums.h | 24 +---- structs.h | 4 - 28 files changed, 138 insertions(+), 671 deletions(-) diff --git a/Source/control.cpp b/Source/control.cpp index 499e15a5b..52dd962bb 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -396,10 +396,8 @@ void DrawSpellList() if (MouseX >= lx && MouseX < lx + SPLICONLENGTH && MouseY >= ly && MouseY < ly + SPLICONLENGTH) { pSpell = j; pSplType = i; -#ifdef HELLFIRE if (plr[myplr]._pClass == PC_MONK && j == SPL_SEARCH) pSplType = RSPLTYPE_SKILL; -#endif DrawSpellCel(x, y, pSpellCels, c, SPLICONLENGTH); switch (pSplType) { case RSPLTYPE_SKILL: @@ -867,14 +865,12 @@ void InitControlPan() SpellPages[0][0] = SPL_DISARM; } else if (plr[myplr]._pClass == PC_SORCERER) { SpellPages[0][0] = SPL_RECHARGE; -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { SpellPages[0][0] = SPL_SEARCH; } else if (plr[myplr]._pClass == PC_BARD) { SpellPages[0][0] = SPL_IDENTIFY; } else if (plr[myplr]._pClass == PC_BARBARIAN) { SpellPages[0][0] = SPL_BLODBOIL; -#endif } pQLogCel = LoadFileInMem("Data\\Quest.CEL", NULL); pGBoxBuff = LoadFileInMem("CtrlPan\\Golddrop.cel", NULL); @@ -1864,10 +1860,8 @@ char GetSBookTrans(int ii, BOOL townok) { char st; -#ifdef HELLFIRE if ((plr[myplr]._pClass == PC_MONK) && (ii == SPL_SEARCH)) return RSPLTYPE_SKILL; -#endif st = RSPLTYPE_SPELL; if (plr[myplr]._pISpells & SPELLBIT(ii)) { st = RSPLTYPE_CHARGES; diff --git a/Source/doom.cpp b/Source/doom.cpp index 529fa93bc..60289c4ca 100644 --- a/Source/doom.cpp +++ b/Source/doom.cpp @@ -82,14 +82,8 @@ void doom_init() void doom_close() { -#ifndef HELLFIRE - if (doomflag) { -#endif - doomflag = FALSE; - doom_cleanup(); -#ifndef HELLFIRE - } -#endif + doomflag = FALSE; + doom_cleanup(); } void doom_draw() @@ -97,19 +91,6 @@ void doom_draw() if (!doomflag) { 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); } diff --git a/Source/drlg_l1.cpp b/Source/drlg_l1.cpp index 52dc95783..0e8bb1859 100644 --- a/Source/drlg_l1.cpp +++ b/Source/drlg_l1.cpp @@ -196,7 +196,6 @@ const BYTE STAIRSDOWN[] = { 0, 0, 0, 0, // clang-format on }; -#ifdef HELLFIRE const BYTE L5STAIRSDOWN[] = { // clang-format off 4, 5, // width, height @@ -231,7 +230,6 @@ const BYTE L5STAIRSTOWN[] = { 0, 0, 0, 0, // clang-format on }; -#endif /** Miniset: candlestick. */ const BYTE LAMPS[] = { // clang-format off @@ -264,7 +262,6 @@ const BYTE PWATERIN[] = { 0, 0, 0, 0, 0, 0, // clang-format on }; -#ifdef HELLFIRE const BYTE byte_48A1B4[4] = { 1, 1, 11, 95 }; const BYTE byte_48A1B8[8] = { 1, 1, 12, 96 }; 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_48A3D0[4] = { 1, 1, 2, 200 }; const BYTE byte_48A3D4[4] = { 1, 1, 2, 202 }; -#endif /* 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 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, * 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 }; -#ifdef HELLFIRE void DRLG_InitL5Vals() { int i, j, pc; @@ -500,7 +493,6 @@ void DRLG_InitL5Vals() } } } -#endif 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; } -#ifdef HELLFIRE void drlg_l1_crypt_lavafloor() { int i, j; @@ -851,7 +842,6 @@ void drlg_l1_crypt_lavafloor() } } } -#endif static void DRLG_L1Shadows() { @@ -1253,9 +1243,7 @@ void LoadL1Dungeon(const char *sFileName, int vx, int vy) ViewY = vy; DRLG_L1Pass3(); DRLG_Init_Globals(); -#ifdef HELLFIRE if (currlevel < 17) -#endif DRLG_InitL1Vals(); SetMapMonsters(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) { 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() { @@ -2127,7 +2113,6 @@ static void L5FillChambers() if (VR1 && !VR2 && VR3) DRLG_L5GHall(18, 12, 18, 28); -#ifdef HELLFIRE if (currlevel == 24) { if (VR1 || VR2 || VR3) { c = 1; @@ -2246,7 +2231,6 @@ static void L5FillChambers() } } } -#endif if (L5setloadflag) { if (VR1 || VR2 || VR3) { c = 1; @@ -2308,7 +2292,6 @@ static void L5FillChambers() } } -#ifdef HELLFIRE void drlg_l1_set_crypt_room(int rx1, int ry1) { 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) { @@ -2559,15 +2541,9 @@ static void DRLG_L5(int entry) case 2: minarea = 693; break; - case 3: - case 4: - minarea = 761; - break; -#ifdef HELLFIRE default: minarea = 761; break; -#endif } do { @@ -2767,18 +2743,11 @@ static void DRLG_L5(int entry) DRLG_L5Subs(); #endif -#ifdef HELLFIRE - if (currlevel < 21) -#endif + if (currlevel < 21) { DRLG_L1Shadows(); -#ifdef HELLFIRE - if (currlevel < 21) -#endif DRLG_PlaceMiniSet(LAMPS, 5, 10, 0, 0, FALSE, -1, 4); -#ifdef HELLFIRE - if (currlevel < 21) -#endif DRLG_L1Floor(); + } for (j = 0; j < DMAXY; j++) { for (i = 0; i < DMAXX; i++) { @@ -2803,7 +2772,6 @@ void CreateL5Dungeon(DWORD rseed, int entry) dmaxx = 96; dmaxy = 96; -#ifdef HELLFIRE UberRow = 0; UberCol = 0; IsUberRoomOpened = 0; @@ -2812,7 +2780,6 @@ void CreateL5Dungeon(DWORD rseed, int entry) UberLeverCol = 0; IsUberLeverActivated = 0; UberDiabloMonsterIndex = 0; -#endif DRLG_InitTrans(); DRLG_InitSetPC(); @@ -2847,7 +2814,6 @@ void CreateL5Dungeon(DWORD rseed, int entry) #endif } -#ifdef HELLFIRE void drlg_l1_crypt_pattern1(int 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_48A1DC, rndper); } -#endif DEVILUTION_END_NAMESPACE diff --git a/Source/effects.cpp b/Source/effects.cpp index b477811e9..b4c7d2918 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -1370,23 +1370,20 @@ void sound_init() mask |= sfx_WARRIOR; if (!gbIsSpawn) mask |= (sfx_ROGUE | sfx_SORCEROR); -#ifdef HELLFIRE - mask |= sfx_MONK; -#endif + if (gbIsHellfire) + mask |= sfx_MONK; } else if (plr[myplr]._pClass == PC_WARRIOR) { mask |= sfx_WARRIOR; } else if (plr[myplr]._pClass == PC_ROGUE) { mask |= sfx_ROGUE; } else if (plr[myplr]._pClass == PC_SORCERER) { mask |= sfx_SORCEROR; -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { mask |= sfx_MONK; } else if (plr[myplr]._pClass == PC_BARD) { mask |= sfx_ROGUE; } else if (plr[myplr]._pClass == PC_BARBARIAN) { mask |= sfx_WARRIOR; -#endif } else { app_fatal("effects:1"); } diff --git a/Source/inv.cpp b/Source/inv.cpp index 03389aca1..c91800606 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -124,7 +124,6 @@ void InitInv() pInvCels = LoadFileInMem("Data\\Inv\\Inv_rog.CEL", NULL); } else if (plr[myplr]._pClass == PC_SORCERER) { pInvCels = LoadFileInMem("Data\\Inv\\Inv_Sor.CEL", NULL); -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { if (gbIsSpawn) pInvCels = LoadFileInMem("Data\\Inv\\Inv_Sor.CEL", NULL); @@ -134,7 +133,6 @@ void InitInv() pInvCels = LoadFileInMem("Data\\Inv\\Inv_rog.CEL", NULL); } else if (plr[myplr]._pClass == PC_BARBARIAN) { pInvCels = LoadFileInMem("Data\\Inv\\Inv.CEL", NULL); -#endif } invflag = FALSE; @@ -191,37 +189,25 @@ void DrawInv() if (!plr[myplr].InvBody[INVLOC_HEAD]._iStatFlag) { color = ICOL_RED; } -#ifdef HELLFIRE if (frame <= 179) { -#endif CelBlitOutline(color, RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelBlitOutline(color, RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width); } -#endif } if (plr[myplr].InvBody[INVLOC_HEAD]._iStatFlag) { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelClippedDraw(RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelClippedDraw(RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width); } -#endif } else { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelDrawLightRed(RIGHT_PANEL_X + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width, 1); -#ifdef HELLFIRE } else { 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) { color = ICOL_RED; } -#ifdef HELLFIRE if (frame <= 179) { -#endif CelBlitOutline(color, RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelBlitOutline(color, RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width); } -#endif } if (plr[myplr].InvBody[INVLOC_RING_LEFT]._iStatFlag) { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelClippedDraw(RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelClippedDraw(RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width); } -#endif } else { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelDrawLightRed(RIGHT_PANEL_X + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width, 1); -#ifdef HELLFIRE } else { 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) { color = ICOL_RED; } -#ifdef HELLFIRE if (frame <= 179) { -#endif CelBlitOutline(color, RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelBlitOutline(color, RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width); } -#endif } if (plr[myplr].InvBody[INVLOC_RING_RIGHT]._iStatFlag) { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelClippedDraw(RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelClippedDraw(RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width); } -#endif } else { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelDrawLightRed(RIGHT_PANEL_X + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width, 1); -#ifdef HELLFIRE } else { 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) { color = ICOL_RED; } -#ifdef HELLFIRE if (frame <= 179) { -#endif CelBlitOutline(color, RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelBlitOutline(color, RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width); } -#endif } if (plr[myplr].InvBody[INVLOC_AMULET]._iStatFlag) { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelClippedDraw(RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelClippedDraw(RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width); } -#endif } else { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelDrawLightRed(RIGHT_PANEL_X + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width, 1); -#ifdef HELLFIRE } else { 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) { color = ICOL_RED; } -#ifdef HELLFIRE if (frame <= 179) { -#endif CelBlitOutline(color, screen_x, screen_y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelBlitOutline(color, screen_x, screen_y, pCursCels2, frame - 179, frame_width); } -#endif } if (plr[myplr].InvBody[INVLOC_HAND_LEFT]._iStatFlag) { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelClippedDraw(screen_x, screen_y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelClippedDraw(screen_x, screen_y, pCursCels2, frame - 179, frame_width); } -#endif } else { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelDrawLightRed(screen_x, screen_y, pCursCels, frame, frame_width, 1); -#ifdef HELLFIRE } else { CelDrawLightRed(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 1); } -#endif } if (plr[myplr].InvBody[INVLOC_HAND_LEFT]._iLoc == ILOC_TWOHAND) { @@ -432,15 +370,11 @@ void DrawInv() pBuff = frame_width == INV_SLOT_SIZE_PX ? &gpBuffer[SCREENXY(RIGHT_PANEL_X + 197, SCREEN_Y)] : &gpBuffer[SCREENXY(RIGHT_PANEL_X + 183, SCREEN_Y)]; -#ifdef HELLFIRE if (frame <= 179) { -#endif CelClippedBlitLightTrans(pBuff, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelClippedBlitLightTrans(pBuff, pCursCels2, frame - 179, frame_width); } -#endif cel_transparency_active = FALSE; #ifdef HELLFIRE @@ -465,37 +399,25 @@ void DrawInv() if (!plr[myplr].InvBody[INVLOC_HAND_RIGHT]._iStatFlag) { color = ICOL_RED; } -#ifdef HELLFIRE if (frame <= 179) { -#endif CelBlitOutline(color, screen_x, screen_y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelBlitOutline(color, screen_x, screen_y, pCursCels2, frame - 179, frame_width); } -#endif } if (plr[myplr].InvBody[INVLOC_HAND_RIGHT]._iStatFlag) { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelClippedDraw(screen_x, screen_y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelClippedDraw(screen_x, screen_y, pCursCels2, frame - 179, frame_width); } -#endif } else { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelDrawLightRed(screen_x, screen_y, pCursCels, frame, frame_width, 1); -#ifdef HELLFIRE } else { 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) { color = ICOL_RED; } -#ifdef HELLFIRE if (frame <= 179) { -#endif CelBlitOutline(color, RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelBlitOutline(color, RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width); } -#endif } if (plr[myplr].InvBody[INVLOC_CHEST]._iStatFlag) { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelClippedDraw(RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelClippedDraw(RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width); } -#endif } else { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelDrawLightRed(RIGHT_PANEL_X + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width, 1); -#ifdef HELLFIRE } else { 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) { color = ICOL_RED; } -#ifdef HELLFIRE if (frame <= 179) { -#endif CelBlitOutline( color, InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X, InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelBlitOutline( color, @@ -591,41 +498,32 @@ void DrawInv() InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, pCursCels2, frame - 179, frame_width); } -#endif } if (plr[myplr].InvList[ii]._iStatFlag) { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelClippedDraw( InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X, InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, pCursCels, frame, frame_width); -#ifdef HELLFIRE } else { CelClippedDraw( InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X, InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, pCursCels2, frame - 179, frame_width); } -#endif } else { -#ifdef HELLFIRE if (frame <= 179) { -#endif CelDrawLightRed( InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X, InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, pCursCels, frame, frame_width, 1); -#ifdef HELLFIRE } else { CelDrawLightRed( InvRect[j + SLOTXY_INV_FIRST].X + RIGHT_PANEL_X, InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1, pCursCels2, frame - 179, frame_width, 1); } -#endif } } } @@ -658,35 +556,23 @@ void DrawInvBelt() if (!plr[myplr].SpdList[i]._iStatFlag) color = ICOL_RED; if (!sgbControllerActive || invflag) { -#ifdef HELLFIRE 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); -#ifdef HELLFIRE 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); -#endif } } if (plr[myplr].SpdList[i]._iStatFlag) { -#ifdef HELLFIRE 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); -#ifdef HELLFIRE else 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 { -#ifdef HELLFIRE 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); -#ifdef HELLFIRE 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); -#endif } if (AllItemsList[plr[myplr].SpdList[i].IDidx].iUsable @@ -963,19 +849,11 @@ BOOL GoldAutoPlace(int pnum) BOOL WeaponAutoPlace(int pnum) { -#ifdef HELLFIRE if (plr[pnum]._pClass == PC_MONK) return FALSE; -#endif 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)) -#endif - ) { -#ifdef HELLFIRE - if (plr[pnum]._pClass != PC_BARD) -#endif - { + || (plr[pnum]._pClass == PC_BARBARIAN && (plr[pnum].HoldItem._itype == ITYPE_SWORD || plr[pnum].HoldItem._itype == ITYPE_MACE))) { + if (plr[pnum]._pClass != PC_BARD) { if (plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iClass == ICLASS_WEAPON) return FALSE; 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) done = TRUE; if (il == ILOC_ONEHAND && plr[pnum].HoldItem._iLoc == ILOC_TWOHAND) { -#ifdef HELLFIRE if (plr[pnum]._pClass == PC_BARBARIAN && (plr[pnum].HoldItem._itype == ITYPE_SWORD || plr[pnum].HoldItem._itype == ITYPE_MACE)) il = ILOC_ONEHAND; else -#endif il = ILOC_TWOHAND; done = TRUE; } @@ -1149,14 +1025,12 @@ void CheckInvPaste(int pnum, int mx, int my) PlaySFX(PS_ROGUE13); else if (plr[pnum]._pClass == PC_SORCERER) PlaySFX(PS_MAGE13); -#ifdef HELLFIRE else if (plr[pnum]._pClass == PC_MONK) PlaySFX(PS_MONK13); else if (plr[pnum]._pClass == PC_BARD) PlaySFX(PS_ROGUE13); else if (plr[pnum]._pClass == PC_BARBARIAN) PlaySFX(PS_MAGE13); -#endif } 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_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)) -#endif - ) { + || (plr[pnum]._pClass == PC_BARBARIAN && (plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_SWORD || plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_MACE))) { 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) -#endif - ) { + || (plr[pnum]._pClass == PC_BARD && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iClass == ICLASS_WEAPON && plr[pnum].HoldItem._iClass == ICLASS_WEAPON)) { NetSendCmdChItem(FALSE, INVLOC_HAND_RIGHT); plr[pnum].InvBody[INVLOC_HAND_RIGHT] = plr[pnum].HoldItem; break; @@ -1365,10 +1233,8 @@ void CheckInvPaste(int pnum, int mx, int my) plr[pnum].InvList[il]._iCurs = ICURS_GOLD_SMALL; else plr[pnum].InvList[il]._iCurs = ICURS_GOLD_MEDIUM; -#ifdef HELLFIRE } else { plr[pnum].InvList[ii]._iCurs = ICURS_GOLD_LARGE; -#endif } } } else { @@ -1769,16 +1635,13 @@ void CheckQuestItem(int pnum) sfxdnum = PS_ROGUE95; } else if (plr[pnum]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE95; - } -#ifdef HELLFIRE - else if (plr[pnum]._pClass == PC_MONK) { + } else if (plr[pnum]._pClass == PC_MONK) { sfxdnum = PS_MONK95; } else if (plr[pnum]._pClass == PC_BARD) { sfxdnum = PS_ROGUE95; } else if (plr[pnum]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR95; } -#endif quests[Q_MUSHROOM]._qvar1 = QS_MUSHPICKED; } if (plr[pnum].HoldItem.IDidx == IDI_ANVIL) { @@ -1794,16 +1657,13 @@ void CheckQuestItem(int pnum) sfxdnum = PS_ROGUE89; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE89; - } -#ifdef HELLFIRE - else if (plr[myplr]._pClass == PC_MONK) { + } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK89; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE89; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR89; } -#endif } } if (plr[pnum].HoldItem.IDidx == IDI_GLDNELIX) { @@ -1814,16 +1674,13 @@ void CheckQuestItem(int pnum) sfxdnum = PS_ROGUE88; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE88; - } -#ifdef HELLFIRE - else if (plr[myplr]._pClass == PC_MONK) { + } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK88; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE88; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR88; } -#endif } if (plr[pnum].HoldItem.IDidx == IDI_ROCK) { if (quests[Q_ROCK]._qactive == QUEST_INIT) { @@ -1838,16 +1695,13 @@ void CheckQuestItem(int pnum) sfxdnum = PS_ROGUE87; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE87; - } -#ifdef HELLFIRE - else if (plr[myplr]._pClass == PC_MONK) { + } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK87; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE87; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR87; } -#endif } } if (plr[pnum].HoldItem.IDidx == IDI_ARMOFVAL) { @@ -1859,17 +1713,14 @@ void CheckQuestItem(int pnum) sfxdnum = PS_ROGUE91; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE91; -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK91; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE91; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR91; -#endif } } -#ifdef HELLFIRE if (plr[pnum].HoldItem.IDidx == IDI_MAPOFDOOM) { quests[Q_GRAVE]._qlog = FALSE; quests[Q_GRAVE]._qactive = QUEST_ACTIVE; @@ -1944,7 +1795,6 @@ void CheckQuestItem(int pnum) item[item_num] = tmp; } } -#endif } void InvGetItem(int pnum, int ii) @@ -2126,7 +1976,6 @@ void AutoGetItem(int pnum, int ii) } if (done) { dItem[item[ii]._ix][item[ii]._iy] = 0; -#ifdef HELLFIRE if (currlevel == 21 && item[ii]._ix == CornerStone.x && item[ii]._iy == CornerStone.y) { CornerStone.item.IDidx = -1; CornerStone.item._itype = ITYPE_MISC; @@ -2137,7 +1986,6 @@ void AutoGetItem(int pnum, int ii) CornerStone.item._iIdentified = FALSE; CornerStone.item._iPostDraw = FALSE; } -#endif i = 0; while (i < numitems) { if (itemactive[i] == ii) { @@ -2155,14 +2003,12 @@ void AutoGetItem(int pnum, int ii) PlaySFX(random_(0, 3) + PS_ROGUE14); } else if (plr[pnum]._pClass == PC_SORCERER) { PlaySFX(random_(0, 3) + PS_MAGE14); -#ifdef HELLFIRE } else if (plr[pnum]._pClass == PC_MONK) { PlaySFX(random_(0, 3) + PS_MONK14); } else if (plr[pnum]._pClass == PC_BARD) { PlaySFX(random_(0, 3) + PS_ROGUE14); } else if (plr[pnum]._pClass == PC_BARBARIAN) { PlaySFX(random_(0, 3) + PS_WARR14); -#endif } } plr[pnum].HoldItem = item[ii]; @@ -2216,7 +2062,6 @@ void SyncGetItem(int x, int y, int idx, WORD ci, int iseed) if (ii != -1) { dItem[item[ii]._ix][item[ii]._iy] = 0; -#ifdef HELLFIRE if (currlevel == 21 && item[ii]._ix == CornerStone.x && item[ii]._iy == CornerStone.y) { CornerStone.item.IDidx = -1; 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._iPostDraw = FALSE; } -#endif i = 0; while (i < numitems) { if (itemactive[i] == ii) { @@ -2372,8 +2216,7 @@ int InvPutItem(int pnum, int x, int y) } } -#ifdef HELLFIRE - if (currlevel == 0) { + if (gbIsHellfire && currlevel == 0) { yp = cursmy; xp = cursmx; 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; } } -#endif CanPut(x, y); //if (!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; RespawnItem(ii, TRUE); numitems++; -#ifdef HELLFIRE + if (currlevel == 21 && x == CornerStone.x && y == CornerStone.y) { CornerStone.item = item[ii]; InitQTextMsg(296); quests[Q_CORNSTN]._qlog = FALSE; quests[Q_CORNSTN]._qactive = QUEST_DONE; } -#endif + NewCursor(CURSOR_HAND); 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; RespawnItem(ii, TRUE); numitems++; -#ifdef HELLFIRE if (currlevel == 21 && x == CornerStone.x && y == CornerStone.y) { CornerStone.item = item[ii]; InitQTextMsg(296); quests[Q_CORNSTN]._qlog = 0; quests[Q_CORNSTN]._qactive = 3; } -#endif return ii; } @@ -2762,16 +2602,13 @@ BOOL UseInvItem(int pnum, int cii) sfxdnum = PS_ROGUE95; } else if (plr[pnum]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE95; - } -#ifdef HELLFIRE - else if (plr[pnum]._pClass == PC_MONK) { + } else if (plr[pnum]._pClass == PC_MONK) { sfxdnum = PS_MONK95; } else if (plr[pnum]._pClass == PC_BARD) { sfxdnum = PS_ROGUE95; } else if (plr[pnum]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR95; } -#endif return TRUE; case IDI_FUNGALTM: PlaySFX(IS_IBOOK); @@ -2782,14 +2619,12 @@ BOOL UseInvItem(int pnum, int cii) sfxdnum = PS_ROGUE29; } else if (plr[pnum]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE29; -#ifdef HELLFIRE } else if (plr[pnum]._pClass == PC_MONK) { sfxdnum = PS_MONK29; } else if (plr[pnum]._pClass == PC_BARD) { sfxdnum = PS_ROGUE29; } else if (plr[pnum]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR29; -#endif } return TRUE; } @@ -2804,14 +2639,12 @@ BOOL UseInvItem(int pnum, int cii) PlaySFX(PS_ROGUE13); } else if (plr[pnum]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE13); -#ifdef HELLFIRE } else if (plr[pnum]._pClass == PC_MONK) { PlaySFX(PS_MONK13); } else if (plr[pnum]._pClass == PC_BARD) { PlaySFX(PS_ROGUE13); } else if (plr[pnum]._pClass == PC_BARBARIAN) { PlaySFX(PS_WARR13); -#endif } return TRUE; } @@ -2834,11 +2667,9 @@ BOOL UseInvItem(int pnum, int cii) return TRUE; } -#ifdef HELLFIRE if (Item->_iMiscId > IMISC_RUNEFIRST && Item->_iMiscId < IMISC_RUNELAST && currlevel == 0) { return TRUE; } -#endif idata = ItemCAnimTbl[Item->_iCurs]; if (Item->_iMiscId == IMISC_BOOK) @@ -2849,25 +2680,21 @@ BOOL UseInvItem(int pnum, int cii) UseItem(pnum, Item->_iMiscId, Item->_iSpell); if (speedlist) { -#ifdef HELLFIRE if (plr[pnum].SpdList[c]._iMiscId == IMISC_NOTE) { InitQTextMsg(322); invflag = FALSE; return TRUE; } -#endif RemoveSpdBarItem(pnum, c); return TRUE; } else { if (plr[pnum].InvList[c]._iMiscId == IMISC_MAPOFDOOM) return TRUE; -#ifdef HELLFIRE if (plr[pnum].InvList[c]._iMiscId == IMISC_NOTE) { InitQTextMsg(322); invflag = FALSE; return TRUE; } -#endif RemoveInvItem(pnum, c); } return TRUE; diff --git a/Source/items.cpp b/Source/items.cpp index 69d07b2d0..687ecd21c 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -769,12 +769,10 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) maxd = 3; } -#ifdef HELLFIRE if (plr[p]._pClass == PC_MONK) { mind = std::max(mind, plr[p]._pLevel >> 1); maxd = std::max(maxd, (int)plr[p]._pLevel); } -#endif } #ifdef HELLFIRE @@ -844,9 +842,7 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) if (plr[p]._pClass == PC_ROGUE) { plr[p]._pDamageMod = plr[p]._pLevel * (plr[p]._pStrength + plr[p]._pDexterity) / 200; - } -#ifdef HELLFIRE - else if (plr[p]._pClass == PC_MONK) { + } else if (plr[p]._pClass == PC_MONK) { 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)) { 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]._pIAC += plr[p]._pLevel / 4; - } -#endif - else { + } else { 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]._pIEnAc = enac; -#ifdef HELLFIRE if (plr[p]._pClass == PC_BARBARIAN) { mr += plr[p]._pLevel; fr += plr[p]._pLevel; lr += plr[p]._pLevel; } +#ifdef HELLFIRE if ((plr[p]._pSpellFlags & 4) == 4) { mr -= plr[p]._pLevel; fr -= plr[p]._pLevel; @@ -929,31 +923,22 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) if (fr > MAXRESIST) fr = MAXRESIST; -#ifdef HELLFIRE else if (fr < 0) fr = 0; -#endif plr[p]._pFireResist = fr; if (lr > MAXRESIST) lr = MAXRESIST; -#ifdef HELLFIRE else if (lr < 0) lr = 0; -#endif plr[p]._pLghtResist = lr; if (plr[p]._pClass == PC_WARRIOR) { vadd <<= 1; - } -#ifdef HELLFIRE - else if (plr[p]._pClass == PC_BARBARIAN) { + } else if (plr[p]._pClass == PC_BARBARIAN) { vadd += vadd; 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) { -#endif vadd += vadd >> 1; } ihp += (vadd << 6); @@ -961,26 +946,17 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) if (plr[p]._pClass == PC_SORCERER) { madd <<= 1; } -#ifdef HELLFIRE if (plr[p]._pClass == PC_ROGUE || plr[p]._pClass == PC_MONK) { -#else - if (plr[p]._pClass == PC_ROGUE) { -#endif madd += madd >> 1; - } -#ifdef HELLFIRE - else if (plr[p]._pClass == PC_BARD) { + } else if (plr[p]._pClass == PC_BARD) { madd += (madd >> 2) + (madd >> 1); } -#endif imana += (madd << 6); plr[p]._pHitPoints = ihp + plr[p]._pHPBase; plr[p]._pMaxHP = ihp + plr[p]._pMaxHPBase; -#ifdef HELLFIRE if (plr[p]._pHitPoints > plr[p]._pMaxHP) plr[p]._pHitPoints = plr[p]._pMaxHP; -#endif if (p == myplr && (plr[p]._pHitPoints >> 6) <= 0) { SetPlayerHitPoints(p, 0); @@ -988,10 +964,8 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) plr[p]._pMana = imana + plr[p]._pManaBase; plr[p]._pMaxMana = imana + plr[p]._pMaxManaBase; -#ifdef HELLFIRE if (plr[p]._pMana > plr[p]._pMaxMana) plr[p]._pMana = plr[p]._pMaxMana; -#endif plr[p]._pIFMinDam = fmin; plr[p]._pIFMaxDam = fmax; @@ -1005,7 +979,6 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) } plr[p]._pBlockFlag = FALSE; -#ifdef HELLFIRE if (plr[p]._pClass == PC_MONK) { if (plr[p].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_STAFF && plr[p].InvBody[INVLOC_HAND_LEFT]._iStatFlag) { 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) plr[p]._pBlockFlag = TRUE; } -#endif plr[p]._pwtype = WT_MELEE; g = 0; @@ -1067,7 +1039,6 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) g++; } -#ifdef HELLFIRE 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) plr[p]._pIAC += plr[p]._pLevel >> 1; @@ -1083,14 +1054,6 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) } else if (plr[p]._pClass == PC_MONK) { 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) { plr[p]._pgfxnum = g; @@ -1457,22 +1420,13 @@ void CreatePlrItems(int p) SetPlrHandItem(&plr[p].InvBody[INVLOC_HAND_LEFT], IDI_SORCEROR); GetPlrHandSeed(&plr[p].InvBody[INVLOC_HAND_LEFT]); -#ifdef HELLFIRE - 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); + SetPlrHandItem(&plr[p].SpdList[0], gbIsHellfire ? IDI_HEAL : IDI_MANA); 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]); -#endif break; -#ifdef HELLFIRE case PC_MONK: SetPlrHandItem(&plr[p].InvBody[INVLOC_HAND_LEFT], IDI_SHORTSTAFF); GetPlrHandSeed(&plr[p].InvBody[INVLOC_HAND_LEFT]); @@ -1506,7 +1460,6 @@ void CreatePlrItems(int p) SetPlrHandItem(&plr[p].SpdList[1], IDI_HEAL); GetPlrHandSeed(&plr[p].SpdList[1]); break; -#endif } SetPlrHandItem(&plr[p].HoldItem, IDI_GOLD); @@ -4519,17 +4472,9 @@ void UseItem(int p, int Mid, int spl) case IMISC_MEAT: j = plr[p]._pMaxHP >> 8; l = ((j >> 1) + random_(39, j)) << 6; -#ifdef HELLFIRE if (plr[p]._pClass == PC_WARRIOR || plr[p]._pClass == PC_BARBARIAN) -#else - if (plr[p]._pClass == PC_WARRIOR) -#endif l <<= 1; -#ifdef HELLFIRE 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; plr[p]._pHitPoints += l; 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; if (plr[p]._pClass == PC_SORCERER) l <<= 1; -#ifdef HELLFIRE 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; if (!(plr[p]._pIFlags & ISPL_NOMANA)) { plr[p]._pMana += l; diff --git a/Source/loadsave.cpp b/Source/loadsave.cpp index 339e9c983..b8ac4f24d 100644 --- a/Source/loadsave.cpp +++ b/Source/loadsave.cpp @@ -1127,9 +1127,9 @@ static void SavePlayer(int i) CopyInt(&pPlayer->_pVar6, tbuff); CopyInt(&pPlayer->_pVar7, tbuff); CopyInt(&pPlayer->_pVar8, tbuff); - CopyBytes(&pPlayer->_pLvlVisited, NUMLEVELS, tbuff); - CopyBytes(&pPlayer->_pSLvlVisited, NUMLEVELS, tbuff); // only 10 used - tbuff += 2; // Alignment + CopyBytes(&pPlayer->_pLvlVisited, giNumberOfLevels, tbuff); + CopyBytes(&pPlayer->_pSLvlVisited, giNumberOfLevels, tbuff); // only 10 used + tbuff += 2; // Alignment CopyInt(&pPlayer->_pGFXLoad, tbuff); tbuff += 4 * 8; // Skip pointers _pNAnim @@ -1513,6 +1513,16 @@ void SaveGame() else app_fatal("Invalid game state"); + if (gbIsHellfire) { + giNumberOfLevels = 25; + giNumberQuests = 24; + giNumberOfSmithPremiumItems = 15; + } else { + giNumberOfLevels = 17; + giNumberQuests = 16; + giNumberOfSmithPremiumItems = 6; + } + OSave(setlevel); WSave(setlvlnum); WSave(currlevel); @@ -1526,7 +1536,7 @@ void SaveGame() WSave(nummissiles); WSave(nobjects); - for (i = 0; i < NUMLEVELS; i++) { + for (i = 0; i < giNumberOfLevels; i++) { ISave(glSeedTbl[i]); WSave(gnLevelTypeTbl[i]); } @@ -1534,7 +1544,7 @@ void SaveGame() plr[myplr].pDifficulty = gnDifficulty; SavePlayer(myplr); - for (i = 0; i < MAXQUESTS; i++) + for (i = 0; i < giNumberQuests; i++) SaveQuest(i); for (i = 0; i < MAXPORTAL; i++) SavePortal(i); @@ -1633,7 +1643,7 @@ void SaveGame() WSave(numpremium); WSave(premiumlevel); - for (i = 0; i < SMITH_PREMIUM_ITEMS; i++) + for (i = 0; i < giNumberOfSmithPremiumItems; i++) SavePremium(i); OSave(automapflag); diff --git a/Source/misdat.cpp b/Source/misdat.cpp index 548e5498e..3eef59ae5 100644 --- a/Source/misdat.cpp +++ b/Source/misdat.cpp @@ -58,11 +58,7 @@ MissileData missiledata[] = { { 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_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 }, -#endif { 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_RECHARGE, &AddRecharge, &MI_Dummy, FALSE, 2, MISR_NONE, MFILE_NONE, -1, -1 }, diff --git a/Source/missiles.cpp b/Source/missiles.cpp index 06cb90b0d..83b2968a6 100644 --- a/Source/missiles.cpp +++ b/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); } else if (plr[pnum]._pClass == PC_SORCERER) { PlaySfxLoc(PS_MAGE69, plr[pnum]._px, plr[pnum]._py); -#ifdef HELLFIRE } else if (plr[pnum]._pClass == PC_MONK) { PlaySfxLoc(PS_MONK69, plr[pnum]._px, plr[pnum]._py); } else if (plr[pnum]._pClass == PC_BARD) { PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py); } else if (plr[pnum]._pClass == PC_BARBARIAN) { PlaySfxLoc(PS_WARR69, plr[pnum]._px, plr[pnum]._py); -#endif } 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); } else if (plr[pnum]._pClass == PC_SORCERER) { PlaySfxLoc(PS_MAGE69, plr[pnum]._px, plr[pnum]._py); -#ifdef HELLFIRE } else if (plr[pnum]._pClass == PC_MONK) { PlaySfxLoc(PS_MONK69, plr[pnum]._px, plr[pnum]._py); } else if (plr[pnum]._pClass == PC_BARD) { PlaySfxLoc(PS_ROGUE69, plr[pnum]._px, plr[pnum]._py); } else if (plr[pnum]._pClass == PC_BARBARIAN) { PlaySfxLoc(PS_WARR69, plr[pnum]._px, plr[pnum]._py); -#endif } return TRUE; } 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) { -#ifdef HELLFIRE int lvl; 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; 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) @@ -5514,7 +5506,6 @@ void MI_Nova(int i) missile[i]._miDelFlag = TRUE; } -#ifdef HELLFIRE void MI_Blodboil(int i) { 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) { diff --git a/Source/missiles.h b/Source/missiles.h index c35b0fc49..5b1de0774 100644 --- a/Source/missiles.h +++ b/Source/missiles.h @@ -30,7 +30,6 @@ void InitMissileGFX(); void FreeMissiles(); void FreeMissiles2(); 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_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); @@ -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_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 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 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); @@ -131,7 +128,6 @@ void mi_null_33(int i); void MI_Acidpud(int i); void MI_Firewall(int i); void MI_Fireball(int i); -#ifdef HELLFIRE void missiles_4359A0(int i); void MI_Rune(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_fire_nova(int i); void mi_spec_arrow(int i); -#endif void MI_Lightctrl(int i); void MI_Lightning(int i); void MI_Town(int i); diff --git a/Source/monster.cpp b/Source/monster.cpp index 078a8913a..8911a88df 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -3008,18 +3008,12 @@ void DoEnding() if (gbIsSpawn) return; -#ifdef HELLFIRE 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); } else if (plr[myplr]._pClass == PC_SORCERER) { play_movie("gendata\\DiabVic1.smk", FALSE); -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { play_movie("gendata\\DiabVic1.smk", FALSE); -#endif } else { play_movie("gendata\\DiabVic3.smk", FALSE); } diff --git a/Source/objects.cpp b/Source/objects.cpp index b8ee44a3b..69d38dbc2 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -1042,14 +1042,12 @@ void InitObjects() sp_id = TEXT_RBLINDING; } else if (plr[myplr]._pClass == PC_SORCERER) { sp_id = TEXT_MBLINDING; -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { sp_id = TEXT_HBLINDING; } else if (plr[myplr]._pClass == PC_BARD) { sp_id = TEXT_BBLINDING; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sp_id = TEXT_BLINDING; -#endif } 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); @@ -1064,14 +1062,12 @@ void InitObjects() sp_id = TEXT_RBLOODY; } else if (plr[myplr]._pClass == PC_SORCERER) { sp_id = TEXT_MBLOODY; -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { sp_id = TEXT_HBLOODY; } else if (plr[myplr]._pClass == PC_BARD) { sp_id = TEXT_BBLOODY; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sp_id = TEXT_BLOODY; -#endif } quests[Q_BLOOD]._qmsg = 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; } else if (plr[myplr]._pClass == PC_SORCERER) { sp_id = TEXT_MBLOODWAR; -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { sp_id = TEXT_HBLOODWAR; } else if (plr[myplr]._pClass == PC_BARD) { sp_id = TEXT_BBLOODWAR; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sp_id = TEXT_BLOODWAR; -#endif } 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); @@ -2096,14 +2090,12 @@ void Obj_BCrossDamage(int i) PlaySfxLoc(PS_ROGUE68, plr[myplr]._px, plr[myplr]._py); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySfxLoc(PS_MAGE68, plr[myplr]._px, plr[myplr]._py); -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { PlaySfxLoc(PS_MONK68, plr[myplr]._px, plr[myplr]._py); } else if (plr[myplr]._pClass == PC_BARD) { PlaySfxLoc(PS_ROGUE68, plr[myplr]._px, plr[myplr]._py); } else if (plr[myplr]._pClass == PC_BARBARIAN) { PlaySfxLoc(PS_WARR68, plr[myplr]._px, plr[myplr]._py); -#endif } } drawhpflag = TRUE; @@ -2469,7 +2461,7 @@ void OperateL1RDoor(int pnum, int oi, bool sendflag) if (dok) { #else 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 if (pnum == myplr && sendflag) NetSendCmdParam1(TRUE, CMD_CLOSEDOOR, oi); @@ -3041,14 +3033,12 @@ void OperateSChambBk(int pnum, int i) textdef = TEXT_RBONER; } else if (plr[myplr]._pClass == PC_SORCERER) { textdef = TEXT_MBONER; -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { textdef = TEXT_HBONER; } else if (plr[myplr]._pClass == PC_BARD) { textdef = TEXT_BBONER; } else if (plr[myplr]._pClass == PC_BARBARIAN) { textdef = TEXT_BONER; -#endif } quests[Q_SCHAMB]._qmsg = textdef; InitQTextMsg(textdef); @@ -3124,14 +3114,12 @@ void OperateMushPatch(int pnum, int i) PlaySFX(PS_ROGUE13); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE13); -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { PlaySFX(PS_MONK13); } else if (plr[myplr]._pClass == PC_BARD) { PlaySFX(PS_ROGUE13); } else if (plr[myplr]._pClass == PC_BARBARIAN) { PlaySFX(PS_WARR13); -#endif } } } else { @@ -3161,14 +3149,12 @@ void OperateInnSignChest(int pnum, int i) PlaySFX(PS_ROGUE24); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE24); -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { PlaySFX(PS_MONK24); } else if (plr[myplr]._pClass == PC_BARD) { PlaySFX(PS_ROGUE24); } else if (plr[myplr]._pClass == PC_BARBARIAN) { PlaySFX(PS_WARR24); -#endif } } } else { @@ -3199,7 +3185,6 @@ void OperateSlainHero(int pnum, int i, bool sendmsg) } else if (plr[pnum]._pClass == PC_SORCERER) { CreateSpellBook(object[i]._ox, object[i]._oy, SPL_LIGHTNING, FALSE, TRUE); PlaySfxLoc(PS_MAGE9, plr[myplr]._px, plr[myplr]._py); -#ifdef HELLFIRE } else if (plr[pnum]._pClass == PC_MONK) { CreateMagicWeapon(object[i]._ox, object[i]._oy, ITYPE_STAFF, ICURS_WAR_STAFF, FALSE, TRUE); 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) { CreateMagicWeapon(object[i]._ox, object[i]._oy, ITYPE_AXE, ICURS_BATTLE_AXE, FALSE, TRUE); PlaySfxLoc(PS_WARR9, plr[myplr]._px, plr[myplr]._py); -#endif } if (pnum == myplr) NetSendCmdParam1(FALSE, CMD_OPERATEOBJ, i); diff --git a/Source/pfile.cpp b/Source/pfile.cpp index 30bd87554..723941dae 100644 --- a/Source/pfile.cpp +++ b/Source/pfile.cpp @@ -230,55 +230,13 @@ void pfile_flush_W() 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) { memset(heroinfo, 0, sizeof(*heroinfo)); strncpy(heroinfo->name, p->_pName, sizeof(heroinfo->name) - 1); heroinfo->name[sizeof(heroinfo->name) - 1] = '\0'; heroinfo->level = p->_pLevel; - heroinfo->heroclass = game_2_ui_class(p); + heroinfo->heroclass = p->_pClass; heroinfo->strength = p->_pStrength; heroinfo->magic = p->_pMagic; heroinfo->dexterity = p->_pDexterity; @@ -329,22 +287,17 @@ BOOL pfile_archive_contains_game(HANDLE hsArchive, DWORD save_num) 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; - - c = pfile_get_player_class(player_class_nr); - class_stats->strength = StrengthTbl[c]; - class_stats->magic = MagicTbl[c]; - class_stats->dexterity = DexterityTbl[c]; - class_stats->vitality = VitalityTbl[c]; - return TRUE; + class_stats->strength = StrengthTbl[player_class_nr]; + class_stats->magic = MagicTbl[player_class_nr]; + class_stats->dexterity = DexterityTbl[player_class_nr]; + class_stats->vitality = VitalityTbl[player_class_nr]; } BOOL pfile_ui_save_create(_uiheroinfo *heroinfo) { DWORD save_num; - char cl; PkPlayerStruct pkplr; 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); strncpy(hero_names[save_num], heroinfo->name, PLR_NAME_LEN); hero_names[save_num][PLR_NAME_LEN - 1] = '\0'; - cl = pfile_get_player_class(heroinfo->heroclass); - CreatePlayer(0, cl); + CreatePlayer(0, heroinfo->heroclass); strncpy(plr[0]._pName, heroinfo->name, PLR_NAME_LEN); plr[0]._pName[PLR_NAME_LEN - 1] = '\0'; PackPlayer(&pkplr, 0, TRUE); diff --git a/Source/pfile.h b/Source/pfile.h index f3b1b877b..e1e6e266a 100644 --- a/Source/pfile.h +++ b/Source/pfile.h @@ -22,7 +22,7 @@ void pfile_flush_W(); 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_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_get_file_name(DWORD lvl, char *dst); BOOL pfile_delete_save(_uiheroinfo *hero_info); diff --git a/Source/player.cpp b/Source/player.cpp index d7b0ac5cf..536fcacfe 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -32,7 +32,6 @@ const char CharChar[] = { 'W', 'R', 'S', -#ifdef HELLFIRE 'M', 'R', 'W', @@ -45,7 +44,6 @@ const char CharCharHF[] = { 'M', 'B', 'C', -#endif 0 }; @@ -64,44 +62,36 @@ char PlrGFXAnimLens[NUM_CLASSES][11] = { { 10, 16, 8, 2, 20, 20, 6, 20, 8, 9, 14 }, { 8, 18, 8, 4, 20, 16, 7, 20, 8, 10, 12 }, { 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, 18, 8, 4, 20, 16, 7, 20, 8, 10, 12 }, { 10, 16, 8, 2, 20, 20, 6, 20, 8, 9, 14 }, -#endif }; /** Maps from player class to player velocity. */ int PWVel[NUM_CLASSES][3] = { { 2048, 1024, 512 }, { 2048, 1024, 512 }, { 2048, 1024, 512 }, -#ifdef HELLFIRE { 2048, 1024, 512 }, { 2048, 1024, 512 }, { 2048, 1024, 512 }, -#endif }; /** Total number of frames in walk animation. */ int AnimLenFromClass[NUM_CLASSES] = { 8, 8, 8, -#ifdef HELLFIRE 8, 8, 8, -#endif }; /** Maps from player_class to starting stat in strength. */ int StrengthTbl[NUM_CLASSES] = { 30, 20, 15, -#ifdef HELLFIRE 25, 20, 40, -#endif }; /** Maps from player_class to starting stat in magic. */ int MagicTbl[NUM_CLASSES] = { @@ -109,11 +99,9 @@ int MagicTbl[NUM_CLASSES] = { 10, 15, 35, -#ifdef HELLFIRE 15, 20, 0, -#endif // clang-format on }; /** Maps from player_class to starting stat in dexterity. */ @@ -121,33 +109,27 @@ int DexterityTbl[NUM_CLASSES] = { 20, 30, 15, -#ifdef HELLFIRE 25, 25, 20, -#endif }; /** Maps from player_class to starting stat in vitality. */ int VitalityTbl[NUM_CLASSES] = { 25, 20, 20, -#ifdef HELLFIRE 20, 20, 25, -#endif }; /** Specifies the chance to block bonus of each player class.*/ int ToBlkTbl[NUM_CLASSES] = { 30, 20, 10, -#ifdef HELLFIRE 25, 25, 30, -#endif }; const char *const ClassStrTblOld[] = { "Warrior", @@ -165,11 +147,9 @@ int MaxStats[NUM_CLASSES][4] = { { 250, 50, 60, 100 }, { 55, 70, 250, 80 }, { 45, 250, 85, 80 }, -#ifdef HELLFIRE { 150, 80, 150, 80 }, { 120, 120, 120, 100 }, { 255, 0, 55, 150 }, -#endif // clang-format on }; /** Specifies the experience point limit of each level. */ @@ -230,11 +210,9 @@ const char *const ClassStrTbl[NUM_CLASSES] = { "Warrior", "Rogue", "Sorceror", -#ifdef HELLFIRE "Monk", "Rogue", "Warrior", -#endif }; /** Unused local of PM_ChangeLightOff, originally for computing light radius. */ 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]; -#ifdef HELLFIRE 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]); cs = ClassStrTbl[p->_pClass]; -#ifdef HELLFIRE } else { sprintf(prefix, "%c%c%c", CharCharHF[p->_pClass], ArmourChar[p->_pgfxnum >> 4], WepChar[p->_pgfxnum & 0xF]); - cs = ClassStrTbl[p->_pClass]; cs = ClassStrTblOld[p->_pClass]; } -#endif for (i = 1; i <= PFILE_NONDEATH; i <<= 1) { if (!(i & gfxflag)) { @@ -395,7 +368,9 @@ static DWORD GetPlrGFXSize(const char *szCel) 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) continue; 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')) { continue; //No block without weapon } -#ifdef HELLFIRE if ((c == PC_BARD && hfbard_mpq == NULL) || (c == PC_BARBARIAN && hfbarb_mpq == NULL)) { -#endif sprintf(Type, "%c%c%c", CharChar[c], *a, *w); sprintf(pszName, "PlrGFX\\%s\\%s\\%s%s.CL2", ClassStrTbl[c], Type, Type, szCel); -#ifdef HELLFIRE } else { sprintf(Type, "%c%c%c", CharCharHF[c], *a, *w); sprintf(pszName, "PlrGFX\\%s\\%s\\%s%s.CL2", ClassStrTblOld[c], Type, Type, szCel); } -#endif if (WOpenFile(pszName, &hsFile, TRUE)) { /// ASSERT: assert(hsFile); dwSize = WGetFileSize(hsFile, NULL, pszName); @@ -1112,14 +1083,12 @@ void InitPlayer(int pnum, BOOL FirstTime) plr[pnum]._pAblSpells = SPELLBIT(SPL_DISARM); } else if (plr[pnum]._pClass == PC_SORCERER) { plr[pnum]._pAblSpells = SPELLBIT(SPL_RECHARGE); -#ifdef HELLFIRE } else if (plr[pnum]._pClass == PC_MONK) { plr[pnum]._pAblSpells = SPELLBIT(SPL_SEARCH); } else if (plr[pnum]._pClass == PC_BARD) { plr[pnum]._pAblSpells = SPELLBIT(SPL_IDENTIFY); } else if (plr[pnum]._pClass == PC_BARBARIAN) { plr[pnum]._pAblSpells = SPELLBIT(SPL_BLODBOIL); -#endif } #ifdef _DEBUG @@ -1900,14 +1869,12 @@ StartPlayerKill(int pnum, int earflag) PlaySfxLoc(PS_ROGUE71, p->_px, p->_py); } else if (plr[pnum]._pClass == PC_SORCERER) { PlaySfxLoc(PS_MAGE71, p->_px, p->_py); -#ifdef HELLFIRE } else if (plr[pnum]._pClass == PC_MONK) { PlaySfxLoc(PS_MONK71, p->_px, p->_py); } else if (plr[pnum]._pClass == PC_BARD) { PlaySfxLoc(PS_ROGUE71, p->_px, p->_py); } else if (plr[pnum]._pClass == PC_BARBARIAN) { PlaySfxLoc(PS_WARR71, p->_px, p->_py); -#endif } if (p->_pgfxnum) { @@ -3977,14 +3944,12 @@ void CheckPlrSpell() PlaySFX(PS_ROGUE34); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE34); -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { PlaySFX(PS_MONK34); } else if (plr[myplr]._pClass == PC_BARD) { PlaySFX(PS_ROGUE34); } else if (plr[myplr]._pClass == PC_BARBARIAN) { PlaySFX(PS_WARR34); -#endif } return; } @@ -3996,14 +3961,12 @@ void CheckPlrSpell() PlaySFX(PS_ROGUE27); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE27); -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { PlaySFX(PS_MONK27); } else if (plr[myplr]._pClass == PC_BARD) { PlaySFX(PS_ROGUE27); } else if (plr[myplr]._pClass == PC_BARBARIAN) { PlaySFX(PS_WARR27); -#endif } return; } @@ -4070,14 +4033,12 @@ void CheckPlrSpell() PlaySFX(PS_ROGUE35); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE35); -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { PlaySFX(PS_MONK35); } else if (plr[myplr]._pClass == PC_BARD) { PlaySFX(PS_ROGUE35); } else if (plr[myplr]._pClass == PC_BARBARIAN) { PlaySFX(PS_WARR35); -#endif } } } @@ -4533,14 +4494,12 @@ void PlayDungMsgs() sfxdnum = PS_ROGUE97; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE97; -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK97; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE97; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR97; -#endif } plr[myplr].pDungMsgs = plr[myplr].pDungMsgs | DMSG_CATHEDRAL; } else if (currlevel == 5 && !plr[myplr]._pLvlVisited[5] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_CATACOMBS)) { @@ -4551,14 +4510,12 @@ void PlayDungMsgs() sfxdnum = PS_ROGUE96; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE96; -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK96; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE96; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR96B; -#endif } plr[myplr].pDungMsgs |= DMSG_CATACOMBS; } else if (currlevel == 9 && !plr[myplr]._pLvlVisited[9] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_CAVES)) { @@ -4569,14 +4526,12 @@ void PlayDungMsgs() sfxdnum = PS_ROGUE98; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE98; -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK98; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE98; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR98; -#endif } plr[myplr].pDungMsgs |= DMSG_CAVES; } else if (currlevel == 13 && !plr[myplr]._pLvlVisited[13] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_HELL)) { @@ -4587,27 +4542,20 @@ void PlayDungMsgs() sfxdnum = PS_ROGUE99; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE99; -#ifdef HELLFIRE } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK99; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE99; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR99; -#endif } 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 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) { -#else - if (plr[myplr]._pClass == PC_WARRIOR || plr[myplr]._pClass == PC_ROGUE || plr[myplr]._pClass == PC_SORCERER) { -#endif sfxdnum = PS_DIABLVLINT; } plr[myplr].pDungMsgs |= DMSG_DIABLO; -#ifdef HELLFIRE } else if (currlevel == 17 && !plr[myplr]._pLvlVisited[17] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs2 & 1)) { sfxdelay = 10; sfxdnum = USFX_DEFILER1; @@ -4635,7 +4583,6 @@ void PlayDungMsgs() sfxdnum = PS_WARR92; } plr[myplr].pDungMsgs |= 32; -#endif } else { sfxdelay = 0; } diff --git a/Source/quests.cpp b/Source/quests.cpp index cc370f820..8a6d7ebfb 100644 --- a/Source/quests.cpp +++ b/Source/quests.cpp @@ -22,7 +22,7 @@ int ReturnLvlT; int ReturnLvl; /** Contains the data related to each quest_id. */ -QuestData questlist[MAXQUESTS] = { +QuestData questlist[] = { // clang-format off // _qdlvl, _qdmultlvl, _qlvlt, _qdtype, _qdrnd, _qslvl, _qflags, _qdmsg, _qlstr { 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" }, { 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" }, -#ifdef HELLFIRE { 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" }, { 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, -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" }, -#endif // clang-format on }; /** @@ -311,16 +309,13 @@ void CheckQuestKill(int m, BOOL sendmsg) sfxdnum = PS_ROGUE82; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE82; - } -#ifdef HELLFIRE - else if (plr[myplr]._pClass == PC_MONK) { + } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK82; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE82; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR82; } -#endif if (sendmsg) NetSendCmdQuest(TRUE, Q_SKELKING); @@ -333,16 +328,13 @@ void CheckQuestKill(int m, BOOL sendmsg) sfxdnum = PS_ROGUE80; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE80; - } -#ifdef HELLFIRE - else if (plr[myplr]._pClass == PC_MONK) { + } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK80; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE80; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR80; } -#endif if (sendmsg) NetSendCmdQuest(TRUE, Q_BUTCHER); } 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; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE61; - } -#ifdef HELLFIRE - else if (plr[myplr]._pClass == PC_MONK) { + } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK61; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE61; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR61; } -#endif } else if (monster[m].mName == UniqMonst[UMT_ZHAR].mName) { //"Zhar the Mad" quests[Q_ZHAR]._qactive = QUEST_DONE; sfxdelay = 30; @@ -373,16 +362,13 @@ void CheckQuestKill(int m, BOOL sendmsg) sfxdnum = PS_ROGUE62; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE62; - } -#ifdef HELLFIRE - else if (plr[myplr]._pClass == PC_MONK) { + } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK62; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE62; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR62; } -#endif } else if (monster[m].mName == UniqMonst[UMT_LAZURUS].mName && gbMaxPlayers != 1) { //"Arch-Bishop Lazarus" quests[Q_BETRAYER]._qactive = QUEST_DONE; quests[Q_BETRAYER]._qvar1 = 7; @@ -405,16 +391,13 @@ void CheckQuestKill(int m, BOOL sendmsg) sfxdnum = PS_ROGUE83; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE83; - } -#ifdef HELLFIRE - else if (plr[myplr]._pClass == PC_MONK) { + } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK83; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE83; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR83; } -#endif if (sendmsg) { NetSendCmdQuest(TRUE, Q_BETRAYER); NetSendCmdQuest(TRUE, Q_DIABLO); @@ -433,16 +416,13 @@ void CheckQuestKill(int m, BOOL sendmsg) sfxdnum = PS_ROGUE83; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE83; - } -#ifdef HELLFIRE - else if (plr[myplr]._pClass == PC_MONK) { + } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK83; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE83; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR83; } -#endif } else if (monster[m].mName == UniqMonst[UMT_WARLORD].mName) { //"Warlord of Blood" quests[Q_WARLORD]._qactive = QUEST_DONE; sfxdelay = 30; @@ -452,16 +432,13 @@ void CheckQuestKill(int m, BOOL sendmsg) sfxdnum = PS_ROGUE94; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE94; - } -#ifdef HELLFIRE - else if (plr[myplr]._pClass == PC_MONK) { + } else if (plr[myplr]._pClass == PC_MONK) { sfxdnum = PS_MONK94; } else if (plr[myplr]._pClass == PC_BARD) { sfxdnum = PS_ROGUE94; } else if (plr[myplr]._pClass == PC_BARBARIAN) { sfxdnum = PS_WARR94; } -#endif } } diff --git a/Source/quests.h b/Source/quests.h index d3e4a2a50..194845012 100644 --- a/Source/quests.h +++ b/Source/quests.h @@ -40,7 +40,7 @@ void QuestlogESC(); void SetMultiQuest(int q, int s, int l, int v1); /* rdata */ -extern QuestData questlist[MAXQUESTS]; +extern QuestData questlist[]; #ifdef __cplusplus } diff --git a/Source/spelldat.cpp b/Source/spelldat.cpp index 6552f94f7..476995882 100644 --- a/Source/spelldat.cpp +++ b/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_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 }, -#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 }, -#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_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 }, -#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 }, -#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 }, -#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 }, -#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_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_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 }, -#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_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 }, @@ -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_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 }, -#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_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 }, @@ -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_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 }, -#endif // clang-format on }; diff --git a/Source/spells.cpp b/Source/spells.cpp index 52d254967..b53b2e9f1 100644 --- a/Source/spells.cpp +++ b/Source/spells.cpp @@ -350,7 +350,6 @@ void DoHealOther(int pnum, int rid) hp += (random_(57, 6) + 1) << 6; } -#ifdef HELLFIRE if (plr[pnum]._pClass == PC_WARRIOR || plr[pnum]._pClass == PC_BARBARIAN) { hp <<= 1; } 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) { 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; @@ -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; } @@ -414,6 +419,13 @@ int GetSpellStaffLevel(int s) } } + if (gbIsHellfire) { + switch (s) { + case SPL_ELEMENT: + return -1; + } + } + return spelldata[s].sStaffLvl; } diff --git a/Source/towners.cpp b/Source/towners.cpp index 4da4db3d4..31eed29c7 100644 --- a/Source/towners.cpp +++ b/Source/towners.cpp @@ -25,15 +25,9 @@ TownerStruct towner[NUM_TOWNERS]; * ref: enum plr_class */ 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_WARR49, PS_ROGUE49, PS_MAGE49, PS_MONK49, 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 */ diff --git a/Source/trigs.cpp b/Source/trigs.cpp index d974e31bf..e710a2f2c 100644 --- a/Source/trigs.cpp +++ b/Source/trigs.cpp @@ -17,10 +17,8 @@ int TWarpFrom; 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. */ 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 TownHiveList[] = { 1307, 1308, 1309, 1310, -1 }; -#endif /** 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 }; /** 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 }; /** 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 }; -#ifdef HELLFIRE 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 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 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 }; -#endif void InitNoTriggers() { @@ -168,9 +164,7 @@ void InitL1Triggers() int i, j; numtrigs = 0; -#ifdef HELLFIRE if (currlevel < 17) { -#endif for (j = 0; j < MAXDUNY; j++) { for (i = 0; i < MAXDUNX; i++) { if (dPiece[i][j] == 129) { @@ -187,7 +181,6 @@ void InitL1Triggers() } } } -#ifdef HELLFIRE } else { for (j = 0; j < MAXDUNY; j++) { for (i = 0; i < MAXDUNX; i++) { @@ -213,7 +206,6 @@ void InitL1Triggers() } } } -#endif trigflag = FALSE; } @@ -254,9 +246,7 @@ void InitL3Triggers() { int i, j; -#ifdef HELLFIRE if (currlevel < 17) { -#endif numtrigs = 0; for (j = 0; j < MAXDUNY; j++) { for (i = 0; i < MAXDUNX; i++) { @@ -282,7 +272,6 @@ void InitL3Triggers() } } } -#ifdef HELLFIRE } else { numtrigs = 0; for (j = 0; j < MAXDUNY; j++) { @@ -310,7 +299,6 @@ void InitL3Triggers() } } } -#endif trigflag = FALSE; } @@ -465,13 +453,9 @@ BOOL ForceTownTrig() BOOL ForceL1Trig() { int i, j; -#ifdef HELLFIRE int dx, dy; -#endif -#ifdef HELLFIRE if (currlevel < 17) { -#endif for (i = 0; L1UpList[i] != -1; i++) { if (dPiece[cursmx][cursmy] == L1UpList[i]) { if (currlevel > 1) @@ -499,7 +483,6 @@ BOOL ForceL1Trig() } } } -#ifdef HELLFIRE } else { for (i = 0; L5UpList[i] != -1; i++) { if (dPiece[cursmx][cursmy] == L5UpList[i]) { @@ -548,7 +531,6 @@ BOOL ForceL1Trig() } } } -#endif return FALSE; } @@ -613,9 +595,7 @@ BOOL ForceL3Trig() { int i, j, dx, dy; -#ifdef HELLFIRE if (currlevel < 17) { -#endif for (i = 0; L3UpList[i] != -1; ++i) { if (dPiece[cursmx][cursmy] == L3UpList[i]) { sprintf(infostr, "Up to level %i", currlevel - 1); @@ -642,7 +622,6 @@ BOOL ForceL3Trig() } } } -#ifdef HELLFIRE } else { for (i = 0; L6UpList[i] != -1; ++i) { if (dPiece[cursmx][cursmy] == L6UpList[i]) { @@ -671,7 +650,6 @@ BOOL ForceL3Trig() } } } -#endif if (currlevel == 9) { for (i = 0; L3TWarpUpList[i] != -1; i++) { @@ -691,7 +669,6 @@ BOOL ForceL3Trig() } } } -#ifdef HELLFIRE if (currlevel == 17) { for (i = 0; L6TWarpUpList[i] != -1; i++) { if (dPiece[cursmx][cursmy] == L6TWarpUpList[i]) { @@ -710,7 +687,6 @@ BOOL ForceL3Trig() } } } -#endif return FALSE; } @@ -963,16 +939,13 @@ void CheckTriggers() PlaySFX(PS_ROGUE43); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE43); - } -#ifdef HELLFIRE - else if (plr[myplr]._pClass == PC_MONK) { + } else if (plr[myplr]._pClass == PC_MONK) { PlaySFX(PS_MONK43); } else if (plr[myplr]._pClass == PC_BARD) { PlaySFX(PS_ROGUE43); } else if (plr[myplr]._pClass == PC_BARBARIAN) { PlaySFX(PS_WARR43); } -#endif InitDiabloMsg(abortflag); NetSendCmdLoc(TRUE, CMD_WALKXY, x, y); diff --git a/SourceX/DiabloUI/diabloui.cpp b/SourceX/DiabloUI/diabloui.cpp index a1164fff7..d8372854f 100644 --- a/SourceX/DiabloUI/diabloui.cpp +++ b/SourceX/DiabloUI/diabloui.cpp @@ -416,20 +416,16 @@ bool IsInsideRect(const SDL_Event &event, const SDL_Rect &rect) void LoadUiGFX() { -#ifdef HELLFIRE - LoadMaskedArt("ui_art\\hf_logo2.pcx", &ArtLogos[LOGO_MED], 16); -#else - LoadMaskedArt("ui_art\\smlogo.pcx", &ArtLogos[LOGO_MED], 15); -#endif + if (gbIsHellfire) { + LoadMaskedArt("ui_art\\hf_logo2.pcx", &ArtLogos[LOGO_MED], 16); + } else { + LoadMaskedArt("ui_art\\smlogo.pcx", &ArtLogos[LOGO_MED], 15); + } LoadMaskedArt("ui_art\\focus16.pcx", &ArtFocus[FOCUS_SMALL], 8); LoadMaskedArt("ui_art\\focus.pcx", &ArtFocus[FOCUS_MED], 8); LoadMaskedArt("ui_art\\focus42.pcx", &ArtFocus[FOCUS_BIG], 8); LoadMaskedArt("ui_art\\cursor.pcx", &ArtCursor, 1, 0); -#ifdef HELLFIRE - LoadArt("ui_art\\heros.pcx", &ArtHero, 6); -#else - LoadArt("ui_art\\heros.pcx", &ArtHero, 4); -#endif + LoadArt("ui_art\\heros.pcx", &ArtHero, hellfire_mpq ? 6 : 4); } void UiInitialize() diff --git a/SourceX/DiabloUI/mainmenu.cpp b/SourceX/DiabloUI/mainmenu.cpp index 3d6fe99d4..4fc4fd51d 100644 --- a/SourceX/DiabloUI/mainmenu.cpp +++ b/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("Multi Player", MAINMENU_MULTIPLAYER)); vecMenuItems.push_back(new UiListItem("Replay Intro", MAINMENU_REPLAY_INTRO)); -#ifdef HELLFIRE - vecMenuItems.push_back(new UiListItem("Support", MAINMENU_SHOW_SUPPORT)); - vecMenuItems.push_back(new UiListItem("Credits", MAINMENU_SHOW_CREDITS)); - vecMenuItems.push_back(new UiListItem("Exit Hellfire", MAINMENU_EXIT_DIABLO)); -#else - vecMenuItems.push_back(new UiListItem("Show Credits", MAINMENU_SHOW_CREDITS)); - vecMenuItems.push_back(new UiListItem("Exit Diablo", MAINMENU_EXIT_DIABLO)); -#endif + if (gbIsHellfire) { + vecMenuItems.push_back(new UiListItem("Support", MAINMENU_SHOW_SUPPORT)); + vecMenuItems.push_back(new UiListItem("Credits", MAINMENU_SHOW_CREDITS)); + vecMenuItems.push_back(new UiListItem("Exit Hellfire", MAINMENU_EXIT_DIABLO)); + } else { + vecMenuItems.push_back(new UiListItem("Show Credits", MAINMENU_SHOW_CREDITS)); + vecMenuItems.push_back(new UiListItem("Exit Diablo", MAINMENU_EXIT_DIABLO)); + } UiAddBackground(&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 }; vecMainMenuDialog.push_back(new UiArtText(name, rect, UIS_SMALL)); -#ifndef HELLFIRE - if (!gbSpawned) { -#endif + if (!gbSpawned || gbIsHellfire) { LoadBackgroundArt("ui_art\\mainmenu.pcx"); -#ifndef HELLFIRE } else { LoadBackgroundArt("ui_art\\swmmenu.pcx"); } -#endif 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(); -#ifndef HELLFIRE - if (gbSpawned && MainMenuResult == MAINMENU_REPLAY_INTRO) { + if (gbSpawned && !gbIsHellfire && 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); MainMenuResult = 0; } -#endif } *pdwResult = MainMenuResult; diff --git a/SourceX/DiabloUI/selhero.cpp b/SourceX/DiabloUI/selhero.cpp index 7e6386502..53c60f705 100644 --- a/SourceX/DiabloUI/selhero.cpp +++ b/SourceX/DiabloUI/selhero.cpp @@ -92,10 +92,9 @@ void selhero_Free() void selhero_SetStats() { int heroclass = selhero_heroInfo.heroclass; -#ifdef HELLFIRE - if (heroclass == UI_BARBARIAN) - heroclass = UI_WARRIOR; -#endif + if (heroclass == PC_BARBARIAN) { + heroclass = PC_WARRIOR; // The graphics is missing from heros.pcx + } SELHERO_DIALOG_HERO_IMG->m_frame = heroclass; snprintf(textStats[0], sizeof(textStats[0]), "%d", selhero_heroInfo.level); 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)); 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); SDL_Rect rect3 = { PANEL_LEFT + 39, (UI_OFFSET_Y + 323), 110, 21 }; @@ -235,11 +238,7 @@ void selhero_List_Focus(int value) return; } -#ifdef HELLFIRE - SELHERO_DIALOG_HERO_IMG->m_frame = 5; -#else - SELHERO_DIALOG_HERO_IMG->m_frame = UI_NUM_CLASSES; -#endif + SELHERO_DIALOG_HERO_IMG->m_frame = hellfire_mpq ? 5 : 3; strncpy(textStats[0], "--", sizeof(textStats[0]) - 1); strncpy(textStats[1], "--", sizeof(textStats[1]) - 1); strncpy(textStats[2], "--", sizeof(textStats[2]) - 1); @@ -266,20 +265,20 @@ void selhero_List_Select(int value) selhero_FreeListItems(); int itemH = 33; - vecSelHeroDlgItems.push_back(new UiListItem("Warrior", UI_WARRIOR)); - vecSelHeroDlgItems.push_back(new UiListItem("Rogue", UI_ROGUE)); - vecSelHeroDlgItems.push_back(new UiListItem("Sorcerer", UI_SORCERER)); -#ifdef HELLFIRE - vecSelHeroDlgItems.push_back(new UiListItem("Monk", UI_MONK)); + vecSelHeroDlgItems.push_back(new UiListItem("Warrior", PC_WARRIOR)); + vecSelHeroDlgItems.push_back(new UiListItem("Rogue", PC_ROGUE)); + vecSelHeroDlgItems.push_back(new UiListItem("Sorcerer", PC_SORCERER)); + if (gbIsHellfire) { + vecSelHeroDlgItems.push_back(new UiListItem("Monk", PC_MONK)); + } if (UseBardTest) { - vecSelHeroDlgItems.push_back(new UiListItem("Bard", UI_BARD)); + vecSelHeroDlgItems.push_back(new UiListItem("Bard", PC_BARD)); } if (UseBarbarianTest) { - vecSelHeroDlgItems.push_back(new UiListItem("Barbarian", UI_BARBARIAN)); + vecSelHeroDlgItems.push_back(new UiListItem("Barbarian", PC_BARBARIAN)); } if (vecSelHeroDlgItems.size() > 4) itemH = 26; -#endif 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)); @@ -349,7 +348,7 @@ void selhero_ClassSelector_Focus(int value) void selhero_ClassSelector_Select(int 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(); 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"); diff --git a/SourceX/DiabloUI/title.cpp b/SourceX/DiabloUI/title.cpp index e18255a22..cd0582285 100644 --- a/SourceX/DiabloUI/title.cpp +++ b/SourceX/DiabloUI/title.cpp @@ -8,12 +8,12 @@ std::vector vecTitleScreen; void title_Load() { -#ifdef HELLFIRE - LoadBackgroundArt("ui_art\\hf_logo1.pcx", 16); -#else - LoadBackgroundArt("ui_art\\title.pcx"); - LoadMaskedArt("ui_art\\logo.pcx", &ArtLogos[LOGO_BIG], 15); -#endif + if (gbIsHellfire) { + LoadBackgroundArt("ui_art\\hf_logo1.pcx", 16); + } else { + LoadBackgroundArt("ui_art\\title.pcx"); + LoadMaskedArt("ui_art\\logo.pcx", &ArtLogos[LOGO_BIG], 15); + } } void title_Free() @@ -30,17 +30,16 @@ void title_Free() void UiTitleDialog() { -#ifdef HELLFIRE - SDL_Rect rect = { 0, UI_OFFSET_Y, 0, 0 }; - vecTitleScreen.push_back(new UiImage(&ArtBackground, /*animated=*/true, /*frame=*/0, rect, UIS_CENTER)); -#else - UiAddBackground(&vecTitleScreen); - 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 + if (gbIsHellfire) { + SDL_Rect rect = { 0, UI_OFFSET_Y, 0, 0 }; + vecTitleScreen.push_back(new UiImage(&ArtBackground, /*animated=*/true, /*frame=*/0, rect, UIS_CENTER)); + } else { + UiAddBackground(&vecTitleScreen); + 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)); + } title_Load(); bool endMenu = false; diff --git a/defs.h b/defs.h index f1c6fb41c..d5850b73c 100644 --- a/defs.h +++ b/defs.h @@ -46,20 +46,15 @@ #ifdef HELLFIRE #define MAXQUESTS 24 -#define MAXMULTIQUESTS 10 #else #define MAXQUESTS 16 -#define MAXMULTIQUESTS 4 #endif +#define MAXMULTIQUESTS 10 #define MAXTHEMES 50 #define MAXTILES 2048 -#ifdef HELLFIRE #define MAXTRIGGERS 7 -#else -#define MAXTRIGGERS 5 -#endif #define MAXVISION 32 #define MDMAXX 40 diff --git a/enums.h b/enums.h index 7f50c13ca..9d870ae1a 100644 --- a/enums.h +++ b/enums.h @@ -3113,11 +3113,7 @@ typedef enum _unique_items { UITEM_STEELVEIL = 0x6, UITEM_ARMOFVAL = 0x7, UITEM_GRISWOLD = 0x8, -#ifndef HELLFIRE - UITEM_LGTFORGE = 0x9, -#else UITEM_BOVINE = 0x9, -#endif UITEM_RIFTBOW = 0xA, UITEM_NEEDLER = 0xB, UITEM_CELESTBOW = 0xC, @@ -3202,29 +3198,15 @@ typedef enum _unique_items { } _unique_items; typedef enum plr_class { - PC_WARRIOR = 0x0, - PC_ROGUE = 0x1, - PC_SORCERER = 0x2, -#ifdef HELLFIRE + PC_WARRIOR = 0x0, + PC_ROGUE = 0x1, + PC_SORCERER = 0x2, PC_MONK = 0x3, PC_BARD = 0x4, PC_BARBARIAN = 0x5, -#endif NUM_CLASSES } 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 { WALK_NE = 0x1, WALK_NW = 0x2, diff --git a/structs.h b/structs.h index 776bf1bc1..620a586d6 100644 --- a/structs.h +++ b/structs.h @@ -1019,11 +1019,7 @@ typedef struct QuestStruct { int _qty; unsigned char _qslvl; unsigned char _qidx; -#ifndef HELLFIRE - unsigned char _qmsg; -#else unsigned int _qmsg; -#endif unsigned char _qvar1; unsigned char _qvar2; BOOL _qlog;