diff --git a/Source/control.cpp b/Source/control.cpp index 4d9ed29f9..d89aaf2de 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -2224,7 +2224,12 @@ void DrawSpellBook() unsigned __int64 spl; CelDecodeOnly(384, 511, pSpellBkCel, 1, 320); +#ifdef HELLFIRE + if ( sbooktab < 5 ) + CelDecodeOnly(61 * sbooktab + 391, 508, pSBkBtnCel, sbooktab + 1, 61); +#else CelDecodeOnly(76 * sbooktab + 391, 508, pSBkBtnCel, sbooktab + 1, 76); +#endif spl = plr[myplr]._pMemSpells | plr[myplr]._pISpells | plr[myplr]._pAblSpells; @@ -2237,7 +2242,11 @@ void DrawSpellBook() DrawSpellCel(395, yp, pSBkIconCels, SpellITbl[sn], 37); if (sn == plr[myplr]._pRSpell && st == plr[myplr]._pRSplType) { SetSpellTrans(RSPLTYPE_SKILL); +#ifdef HELLFIRE + DrawSpellCel(395, yp, pSBkIconCels, 52, 37); +#else DrawSpellCel(395, yp, pSBkIconCels, 43, 37); +#endif } PrintSBookStr(10, yp - 23, FALSE, spelldata[sn].sNameText, COL_WHITE); switch (GetSBookTrans(sn, FALSE)) { @@ -2329,9 +2338,15 @@ void CheckSBook() drawpanflag = 255; } } +#ifdef HELLFIRE + if (MouseX >= 327 && MouseX < 632 && MouseY >= 320 && MouseY < 349) { + sbooktab = (MouseX - 327) / 61; + } +#else if (MouseX >= 327 && MouseX < 633 && MouseY >= 320 && MouseY < 349) { /// BUGFIX: change `< 633` to `< 631` sbooktab = (MouseX - 327) / 76; } +#endif } char *get_pieces_str(int nGold) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 61071c331..33eaa8412 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -30,12 +30,17 @@ BOOL trigdebug; /* unused */ int setseed; int debugmonsttypes; int PauseMode; -int sgnTimeoutCurs; -char sgbMouseDown; -int color_cycle_timer; #ifdef HELLFIRE +BOOLEAN UseTheoQuest; +BOOLEAN UseCowFarmer; BOOLEAN UseNestArt; +BOOLEAN UseBardTest; +BOOLEAN UseBarbarianTest; +BOOLEAN UseMultiTest; #endif +int sgnTimeoutCurs; +char sgbMouseDown; +int color_cycle_timer; /* rdata */ diff --git a/Source/diablo.h b/Source/diablo.h index 38bba861e..2b70a6b98 100644 --- a/Source/diablo.h +++ b/Source/diablo.h @@ -111,11 +111,16 @@ extern BOOL trigdebug; /* unused */ extern int setseed; extern int debugmonsttypes; extern int PauseMode; -extern char sgbMouseDown; -extern int color_cycle_timer; #ifdef HELLFIRE +extern BOOLEAN UseTheoQuest; +extern BOOLEAN UseCowFarmer; extern BOOLEAN UseNestArt; +extern BOOLEAN UseBardTest; +extern BOOLEAN UseBarbarianTest; +extern BOOLEAN UseMultiTest; #endif +extern char sgbMouseDown; +extern int color_cycle_timer; void FreeGameMem(); BOOL StartGame(BOOL bNewGame, BOOL bSinglePlayer); diff --git a/Source/stores.cpp b/Source/stores.cpp index 83a4c5e25..19c3da2c8 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -5,7 +5,11 @@ int storenumh; int stextlhold; ItemStruct boyitem; int stextshold; +#ifdef HELLFIRE +ItemStruct premiumitem[15]; +#else ItemStruct premiumitem[6]; +#endif BYTE *pSTextBoxCels; int premiumlevel; int talker; @@ -15,7 +19,11 @@ int stextsmax; int InStoreFlag; ItemStruct storehold[48]; int gossipstart; +#ifdef HELLFIRE +ItemStruct witchitem[25]; +#else ItemStruct witchitem[20]; +#endif BOOL stextscrl; int numpremium; ItemStruct healitem[20]; @@ -29,7 +37,11 @@ int gossipend; BYTE *pSPentSpn2Cels; int stextsval; int boylevel; +#ifdef HELLFIRE +ItemStruct smithitem[25]; +#else ItemStruct smithitem[20]; +#endif int stextdown; char stextscrlubtn; char stextflag; diff --git a/Source/stores.h b/Source/stores.h index 5fcac1297..6def74cbd 100644 --- a/Source/stores.h +++ b/Source/stores.h @@ -7,7 +7,11 @@ extern int storenumh; extern int stextlhold; extern ItemStruct boyitem; extern int stextshold; +#ifdef HELLFIRE +extern ItemStruct premiumitem[15]; +#else extern ItemStruct premiumitem[6]; +#endif extern BYTE *pSTextBoxCels; extern int premiumlevel; extern int talker; @@ -17,7 +21,11 @@ extern int stextsmax; extern int InStoreFlag; extern ItemStruct storehold[48]; extern int gossipstart; +#ifdef HELLFIRE +extern ItemStruct witchitem[25]; +#else extern ItemStruct witchitem[20]; +#endif extern BOOL stextscrl; extern int numpremium; extern ItemStruct healitem[20]; @@ -31,7 +39,11 @@ extern int gossipend; extern BYTE *pSPentSpn2Cels; extern int stextsval; extern int boylevel; +#ifdef HELLFIRE +extern ItemStruct smithitem[25]; +#else extern ItemStruct smithitem[20]; +#endif extern int stextdown; extern char stextscrlubtn; extern char stextflag; diff --git a/Source/town.cpp b/Source/town.cpp index c832e3880..d2646d16e 100644 --- a/Source/town.cpp +++ b/Source/town.cpp @@ -1580,18 +1580,45 @@ void T_Pass3() #ifndef SPAWN if (gbMaxPlayers == 1) { +#ifdef HELLFIRE + if(quests[QTYPE_FARMER]._qactive == 3 || quests[QTYPE_FARMER]._qactive == 10 + || quests[QTYPE_JERSEY]._qactive == 3 || quests[QTYPE_JERSEY]._qactive == 10) + { + town_4751C6(); + } + else + { + town_475379(); + } + if ( quests[QTYPE_GRAVE]._qactive == 3 || plr[myplr]._pLvlVisited[21] ) + town_475595(); + else + town_47552C(); +#endif +#ifdef HELLFIRE + if (!(plr[myplr].pTownWarps & 1) && plr[myplr]._pLevel < 10) { +#else if (!(plr[myplr].pTownWarps & 1)) { +#endif #endif T_FillTile(P3Tiles, 48, 20, 320); #ifndef SPAWN } +#ifdef HELLFIRE + if (!(plr[myplr].pTownWarps & 2) && plr[myplr]._pLevel < 15) { +#else if (!(plr[myplr].pTownWarps & 2)) { +#endif #endif T_FillTile(P3Tiles, 16, 68, 332); T_FillTile(P3Tiles, 16, 70, 331); #ifndef SPAWN } +#ifdef HELLFIRE + if (!(plr[myplr].pTownWarps & 4) && plr[myplr]._pLevel < 20) { +#else if (!(plr[myplr].pTownWarps & 4)) { +#endif #endif for (x = 36; x < 46; x++) { T_FillTile(P3Tiles, x, 78, random(0, 4) + 1); @@ -1600,8 +1627,26 @@ void T_Pass3() } } #endif +#ifdef HELLFIRE + else + { + if(quests[QTYPE_FARMER]._qactive == 3 || quests[QTYPE_FARMER]._qactive == 10 + || quests[QTYPE_JERSEY]._qactive == 3 || quests[QTYPE_JERSEY]._qactive == 10) + { + town_4751C6(); + } + else + { + town_475379(); + } + if ( quests[QTYPE_GRAVE]._qactive == 3 || plr[myplr]._pLvlVisited[21] ) + town_475595(); + else + town_47552C(); + } +#endif - if (quests[13]._qactive != 3 && quests[13]._qactive) { + if (quests[QTYPE_PW]._qactive != 3 && quests[QTYPE_PW]._qactive) { T_FillTile(P3Tiles, 60, 70, 342); } else { T_FillTile(P3Tiles, 60, 70, 71); diff --git a/Source/towners.cpp b/Source/towners.cpp index b3fd713eb..7c5eb2d58 100644 --- a/Source/towners.cpp +++ b/Source/towners.cpp @@ -451,6 +451,20 @@ void InitTowners() InitBarmaid(); InitBoy(); InitCows(); +#ifdef HELLFIRE + if ( UseCowFarmer ) + { + InitCowFarmer(); + } + else if ( quests[QTYPE_FARMER]._qactive != 10 ) + { + InitFarmer(); + } + if ( UseTheoQuest && plr->_pLvlVisited[17] ) + { + InitGirl(); + } +#endif } void FreeTownerGFX()