From d741018fee1952ac338415a34af56d741633bcbc Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sun, 7 Aug 2022 19:15:22 +0100 Subject: [PATCH] Remove more redundant `devilutionx.mpq` checks --- Source/controls/modifier_hints.cpp | 12 +++--------- Source/qol/monhealthbar.cpp | 14 ++++---------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/Source/controls/modifier_hints.cpp b/Source/controls/modifier_hints.cpp index a341ec55e..7f6d4ede1 100644 --- a/Source/controls/modifier_hints.cpp +++ b/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() diff --git a/Source/qol/monhealthbar.cpp b/Source/qol/monhealthbar.cpp index 2266d0437..cfd28992a 100644 --- a/Source/qol/monhealthbar.cpp +++ b/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 healthBlueTrn; healthBlueTrn[234] = 185;