diff --git a/Source/diablo.cpp b/Source/diablo.cpp index cf0d5bea1..9bf89921d 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -444,6 +444,7 @@ static void SaveOptions() setIniInt("Game", "Auto Equip Shields", sgOptions.Gameplay.bAutoEquipShields); setIniInt("Game", "Auto Equip Jewelry", sgOptions.Gameplay.bAutoEquipJewelry); setIniInt("Game", "Enable All Quests for Single Player", sgOptions.Gameplay.bAllQuests); + setIniInt("Game", "Show Monster Type", sgOptions.Gameplay.bShowMonsterType); setIniValue("Network", "Bind Address", sgOptions.Network.szBindAddress); } @@ -498,6 +499,7 @@ static void LoadOptions() sgOptions.Gameplay.bAutoEquipShields = getIniBool("Game", "Auto Equip Shields", false); sgOptions.Gameplay.bAutoEquipJewelry = getIniBool("Game", "Auto Equip Jewelry", false); sgOptions.Gameplay.bAllQuests = getIniBool("Game", "Enable All Quests for Single Player", false); + sgOptions.Gameplay.bShowMonsterType = getIniBool("Game", "Show Monster Type", false); getIniValue("Network", "Bind Address", sgOptions.Network.szBindAddress, sizeof(sgOptions.Network.szBindAddress), "0.0.0.0"); } diff --git a/Source/diablo.h b/Source/diablo.h index 6f8ffe399..9cdead22b 100644 --- a/Source/diablo.h +++ b/Source/diablo.h @@ -98,6 +98,8 @@ typedef struct GameplayOptions { bool bAutoEquipJewelry; /** @brief Enable All Quests for Single Player */ bool bAllQuests; + /** @brief Indicates whether or not mosnter type (Animal, Demon, Undead) is shown along with other monster information. */ + bool bShowMonsterType; } GameplayOptions; typedef struct NetworkOptions { diff --git a/Source/monster.cpp b/Source/monster.cpp index 26e38ff3a..01cd35987 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -5173,7 +5173,12 @@ void PrintMonstHistory(int mt) { int minHP, maxHP, res; - sprintf(tempstr, "Type: %s Kills: %i", GetMonsterTypeText(monsterdata[mt]), monstkills[mt]); + if (sgOptions.Gameplay.bShowMonsterType) { + sprintf(tempstr, "Type: %s Kills: %i", GetMonsterTypeText(monsterdata[mt]), monstkills[mt]); + } else { + sprintf(tempstr, "Total kills: %i", monstkills[mt]); + } + AddPanelString(tempstr, TRUE); if (monstkills[mt] >= 30) { minHP = monsterdata[mt].mMinHP; @@ -5248,8 +5253,11 @@ void PrintUniqueHistory() { int res; - sprintf(tempstr, "Type: %s", GetMonsterTypeText(*monster[pcursmonst].MData)); - AddPanelString(tempstr, TRUE); + if (sgOptions.Gameplay.bShowMonsterType) { + sprintf(tempstr, "Type: %s", GetMonsterTypeText(*monster[pcursmonst].MData)); + AddPanelString(tempstr, TRUE); + } + res = monster[pcursmonst].mMagicRes & (RESIST_MAGIC | RESIST_FIRE | RESIST_LIGHTNING | IMMUNE_MAGIC | IMMUNE_FIRE | IMMUNE_LIGHTNING); if (!res) { strcpy(tempstr, "No resistances"); diff --git a/SourceX/qol.cpp b/SourceX/qol.cpp index 36bef7c9d..218c37aaa 100644 --- a/SourceX/qol.cpp +++ b/SourceX/qol.cpp @@ -90,14 +90,18 @@ void DrawMonsterHealthBar(CelOutputBuffer out) borderSize <<= 1; FillRect(out, xPos, yPos, (width * currentLife) / maxLife, height, filledColor); - for (int j = 0; j < borderSize; j++) { - FastDrawHorizLine(out, xPos - xOffset - corners, yPos - borderSize - yOffset + j, (xOffset + corners) * 2 + width, borderColor); - FastDrawHorizLine(out, xPos - xOffset, yPos + height + yOffset + j, width + corners + xOffset * 2, borderColor); - } - for (int j = -yOffset; j < yOffset + height + corners; ++j) { - FastDrawHorizLine(out, xPos - xOffset - borderSize, yPos + j, borderSize, borderColor); - FastDrawHorizLine(out, xPos + xOffset + width, yPos + j, borderSize, borderColor); + + if (sgOptions.Gameplay.bShowMonsterType) { + for (int j = 0; j < borderSize; j++) { + FastDrawHorizLine(out, xPos - xOffset - corners, yPos - borderSize - yOffset + j, (xOffset + corners) * 2 + width, borderColor); + FastDrawHorizLine(out, xPos - xOffset, yPos + height + yOffset + j, width + corners + xOffset * 2, borderColor); + } + for (int j = -yOffset; j < yOffset + height + corners; ++j) { + FastDrawHorizLine(out, xPos - xOffset - borderSize, yPos + j, borderSize, borderColor); + FastDrawHorizLine(out, xPos + xOffset + width, yPos + j, borderSize, borderColor); + } } + for (int k = 0; k < resSize; ++k) { if (mres & immunes[k]) { drawImmu = true;