From 18bec27121f414109ec27d8bff536cece96f4d14 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 26 Apr 2020 22:34:30 +0200 Subject: [PATCH] Hellfire clean ups --- Source/gamemenu.cpp | 8 ++++++-- Source/inv.cpp | 8 ++++---- Source/items.cpp | 19 +++++++++++++++---- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index 7c52664b2..e6c991b96 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -68,7 +68,11 @@ char *sound_toggle_names[] = { "Sound Disabled", }; #ifdef HELLFIRE -char *jogging_toggle_names[] = { "Jog", "Walk", "Fast Walk" }; +char *jogging_toggle_names[] = { + "Jog", + "Walk", +}; +char *jogging_title = "Fast Walk"; #endif #ifndef HELLFIRE /** Specifies the menu names for colour cycling disabled and enabled. */ @@ -356,7 +360,7 @@ void gamemenu_loadjog(BOOL bActivate) { if (gbMaxPlayers == 1) { jogging_opt = !jogging_opt; - SRegSaveValue(APP_NAME, jogging_toggle_names[2], FALSE, jogging_opt); + SRegSaveValue(APP_NAME, jogging_title, FALSE, jogging_opt); PlaySFX(IS_TITLEMOV); gamemenu_jogging(); } diff --git a/Source/inv.cpp b/Source/inv.cpp index ccc78ddd6..0cb767ac9 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -1923,8 +1923,8 @@ void CheckQuestItem(int pnum) } #ifdef HELLFIRE if (plr[pnum].HoldItem.IDidx == IDI_MAPOFDOOM) { - quests[Q_GRAVE]._qlog = 0; - quests[Q_GRAVE]._qactive = 2; + quests[Q_GRAVE]._qlog = FALSE; + quests[Q_GRAVE]._qactive = QUEST_ACTIVE; quests[Q_GRAVE]._qvar1 = 1; sfxdelay = 10; if (plr[myplr]._pClass == PC_WARRIOR) { @@ -2462,8 +2462,8 @@ int InvPutItem(int pnum, int x, int y) 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; + quests[Q_CORNSTN]._qlog = FALSE; + quests[Q_CORNSTN]._qactive = QUEST_DONE; } #endif NewCursor(CURSOR_HAND); diff --git a/Source/items.cpp b/Source/items.cpp index 3041bbe55..8df5461ab 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -29,9 +29,20 @@ int gnNumGetRecords; /* data */ #ifdef HELLFIRE -int OilLevels[10] = { 1, 10, 1, 10, 4, 1, 5, 17, 1, 10 }; -int OilValues[10] = { 500, 2500, 500, 2500, 1500, 100, 2500, 15000, 500, 2500 }; -int OilMagic[10] = { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }; +int OilLevels[] = { 1, 10, 1, 10, 4, 1, 5, 17, 1, 10 }; +int OilValues[] = { 500, 2500, 500, 2500, 1500, 100, 2500, 15000, 500, 2500 }; +int OilMagic[] = { + IMISC_OILACC, + IMISC_OILMAST, + IMISC_OILSHARP, + IMISC_OILDEATH, + IMISC_OILSKILL, + IMISC_OILBSMTH, + IMISC_OILFORT, + IMISC_OILPERM, + IMISC_OILHARD, + IMISC_OILIMP, +}; char OilNames[10][25] = { "Oil of Accuracy", "Oil of Mastery", @@ -978,7 +989,7 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) plr[p]._pBlockFlag = TRUE; plr[p]._pIFlags |= ISPL_FASTBLOCK; } - if (plr[p].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_NONE && plr[p].InvBody[5]._itype == ITYPE_NONE) + if (plr[p].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_NONE && plr[p].InvBody[INVLOC_HAND_RIGHT]._itype == ITYPE_NONE) plr[p]._pBlockFlag = TRUE; if (plr[p].InvBody[INVLOC_HAND_LEFT]._iClass == ICLASS_WEAPON && plr[p].InvBody[INVLOC_HAND_LEFT]._iLoc != ILOC_TWOHAND && plr[p].InvBody[INVLOC_HAND_RIGHT]._itype == ITYPE_NONE) plr[p]._pBlockFlag = TRUE;