Browse Source

Remove more redundant `devilutionx.mpq` checks

pull/5216/head
Gleb Mazovetskiy 4 years ago
parent
commit
d741018fee
  1. 12
      Source/controls/modifier_hints.cpp
  2. 14
      Source/qol/monhealthbar.cpp

12
Source/controls/modifier_hints.cpp

@ -172,15 +172,9 @@ void DrawSelectModifierMenu(const Surface &out)
void InitModifierHints()
{
hintBox = LoadOptionalClx("data\\hintbox.clx");
hintBoxBackground = LoadOptionalClx("data\\hintboxbackground.clx");
hintIcons = LoadOptionalClx("data\\hinticons.clx");
if (!hintBox || !hintBoxBackground || !hintIcons) {
app_fatal(_("Failed to load UI resources.\n"
"\n"
"Make sure devilutionx.mpq is in the game folder and that it is up to date."));
}
hintBox = LoadClx("data\\hintbox.clx");
hintBoxBackground = LoadClx("data\\hintboxbackground.clx");
hintIcons = LoadClx("data\\hinticons.clx");
}
void FreeModifierHints()

14
Source/qol/monhealthbar.cpp

@ -31,16 +31,10 @@ void InitMonsterHealthBar()
if (!*sgOptions.Gameplay.enemyHealthBar)
return;
healthBox = LoadOptionalClx("data\\healthbox.clx");
health = LoadOptionalClx("data\\health.clx");
resistance = LoadOptionalClx("data\\resistance.clx");
playerExpTags = LoadOptionalClx("data\\monstertags.clx");
if (!healthBox || !health || !resistance || !playerExpTags) {
app_fatal(_("Failed to load UI resources.\n"
"\n"
"Make sure devilutionx.mpq is in the game folder and that it is up to date."));
}
healthBox = LoadClx("data\\healthbox.clx");
health = LoadClx("data\\health.clx");
resistance = LoadClx("data\\resistance.clx");
playerExpTags = LoadClx("data\\monstertags.clx");
std::array<uint8_t, 256> healthBlueTrn;
healthBlueTrn[234] = 185;

Loading…
Cancel
Save