diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 8175a2c02..bdd7ed127 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -943,13 +943,15 @@ void SetApplicationVersions() void CheckArchivesUpToDate() { - const bool devilutionxMpqOutOfDate = devilutionx_mpq && devilutionx_mpq->HasFile("fonts\\12-00.pcx"); - const bool fontsMpqOutOfDate = font_mpq && font_mpq->HasFile("fonts\\12-4e.pcx"); + const bool devilutionxMpqOutOfDate = devilutionx_mpq && !devilutionx_mpq->HasFile("data\\charbg.clx"); + const bool fontsMpqOutOfDate = font_mpq && !font_mpq->HasFile("fonts\\12-4e.clx"); if (devilutionxMpqOutOfDate && fontsMpqOutOfDate) { app_fatal(_("Please update devilutionx.mpq and fonts.mpq to the latest version")); } else if (devilutionxMpqOutOfDate) { - app_fatal(_("Please update devilutionx.mpq to the latest version")); + 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.")); } else if (fontsMpqOutOfDate) { app_fatal(_("Please update fonts.mpq to the latest version")); } diff --git a/Source/panels/charpanel.cpp b/Source/panels/charpanel.cpp index 14e4b26ff..f42572706 100644 --- a/Source/panels/charpanel.cpp +++ b/Source/panels/charpanel.cpp @@ -265,9 +265,7 @@ void DrawStatButtons(const Surface &out) void LoadCharPanel() { - OptionalOwnedClxSpriteList background = LoadOptionalClx("data\\charbg.clx"); - if (!background) - app_fatal(_("Please update devilutionx.mpq to the latest version")); + OptionalOwnedClxSpriteList background = LoadClx("data\\charbg.clx"); OwnedSurface out((*background)[0].width(), (*background)[0].height()); RenderClxSprite(out, (*background)[0], { 0, 0 }); background = std::nullopt; diff --git a/Source/panels/mainpanel.cpp b/Source/panels/mainpanel.cpp index 13dc5904f..aa459c708 100644 --- a/Source/panels/mainpanel.cpp +++ b/Source/panels/mainpanel.cpp @@ -67,9 +67,7 @@ void LoadMainPanel() std::optional out; constexpr uint16_t NumButtonSprites = 6; { - OptionalOwnedClxSpriteList background = LoadOptionalClx("data\\panel8bucp.clx"); - if (!background) - app_fatal(_("Please update devilutionx.mpq to the latest version")); + OptionalOwnedClxSpriteList background = LoadClx("data\\panel8bucp.clx"); out.emplace((*background)[0].width(), (*background)[0].height() * NumButtonSprites); int y = 0; for (ClxSprite sprite : ClxSpriteList(*background)) { diff --git a/Source/qol/stash.cpp b/Source/qol/stash.cpp index 10cb051ed..287a18a72 100644 --- a/Source/qol/stash.cpp +++ b/Source/qol/stash.cpp @@ -268,14 +268,8 @@ void InitStash() { InitialWithdrawGoldValue = 0; - StashPanelArt = LoadOptionalClx("data\\stash.clx"); - StashNavButtonArt = LoadOptionalClx("data\\stashnavbtns.clx"); - - if (!StashPanelArt || !StashNavButtonArt) { - 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.")); - } + StashPanelArt = LoadClx("data\\stash.clx"); + StashNavButtonArt = LoadClx("data\\stashnavbtns.clx"); } void TransferItemToInventory(Player &player, uint16_t itemId) diff --git a/Source/qol/xpbar.cpp b/Source/qol/xpbar.cpp index c3c1f8259..8f837cf62 100644 --- a/Source/qol/xpbar.cpp +++ b/Source/qol/xpbar.cpp @@ -52,13 +52,7 @@ void DrawEndCap(const Surface &out, Point point, int idx, const ColorGradient &g void InitXPBar() { if (*sgOptions.Gameplay.experienceBar) { - xpbarArt = LoadOptionalClx("data\\xpbar.clx"); - - if (!xpbarArt) { - 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.")); - } + xpbarArt = LoadClx("data\\xpbar.clx"); } }