diff --git a/Source/DiabloUI/diabloui.cpp b/Source/DiabloUI/diabloui.cpp index 0dcbd8670..4c88616de 100644 --- a/Source/DiabloUI/diabloui.cpp +++ b/Source/DiabloUI/diabloui.cpp @@ -47,7 +47,6 @@ Art ArtBackgroundWidescreen; Art ArtBackground; Art ArtCursor; Art ArtHero; -bool gbSpawned; void (*gfnSoundFunction)(const char *file); bool textInputActive = true; diff --git a/Source/DiabloUI/diabloui.h b/Source/DiabloUI/diabloui.h index e67871051..c9623c8aa 100644 --- a/Source/DiabloUI/diabloui.h +++ b/Source/DiabloUI/diabloui.h @@ -72,7 +72,6 @@ extern Art ArtBackground; extern Art ArtBackgroundWidescreen; extern Art ArtCursor; extern Art ArtHero; -extern bool gbSpawned; extern void (*gfnSoundFunction)(const char *file); extern bool (*gfnHeroInfo)(bool (*fninfofunc)(_uiheroinfo *)); @@ -95,7 +94,6 @@ inline SDL_Surface *DiabloUiSurface() void UiDestroy(); void UiTitleDialog(); -void UiSetSpawned(bool bSpawned); void UiInitialize(); bool UiValidPlayerName(const char *name); /* check */ void UiSelHeroMultDialog(bool (*fninfo)(bool (*fninfofunc)(_uiheroinfo *)), bool (*fncreate)(_uiheroinfo *), bool (*fnremove)(_uiheroinfo *), void (*fnstats)(unsigned int, _uidefaultstats *), _selhero_selections *dlgresult, uint32_t *saveNumber); diff --git a/Source/DiabloUI/mainmenu.cpp b/Source/DiabloUI/mainmenu.cpp index dbe52c767..848bda05e 100644 --- a/Source/DiabloUI/mainmenu.cpp +++ b/Source/DiabloUI/mainmenu.cpp @@ -40,7 +40,7 @@ void MainmenuLoad(const char *name, void (*fnSound)(const char *file)) vecMenuItems.push_back(std::make_unique(_("Show Credits"), MAINMENU_SHOW_CREDITS)); vecMenuItems.push_back(std::make_unique(gbIsHellfire ? _("Exit Hellfire") : _("Exit Diablo"), MAINMENU_EXIT_DIABLO)); - if (!gbSpawned || gbIsHellfire) { + if (!gbIsSpawn || gbIsHellfire) { if (gbIsHellfire) LoadArt("ui_art\\mainmenuw.pcx", &ArtBackgroundWidescreen); LoadBackgroundArt("ui_art\\mainmenu.pcx"); @@ -51,7 +51,7 @@ void MainmenuLoad(const char *name, void (*fnSound)(const char *file)) UiAddBackground(&vecMainMenuDialog); UiAddLogo(&vecMainMenuDialog); - if (gbSpawned && gbIsHellfire) { + if (gbIsSpawn && gbIsHellfire) { SDL_Rect rect1 = { (Sint16)(PANEL_LEFT), (Sint16)(UI_OFFSET_Y + 145), 640, 30 }; vecMainMenuDialog.push_back(std::make_unique(_("Shareware"), rect1, UiFlags::FontSize30 | UiFlags::ColorUiSilver | UiFlags::AlignCenter, 8)); } diff --git a/Source/DiabloUI/selhero.cpp b/Source/DiabloUI/selhero.cpp index 6ae5eab1d..1bc9aef00 100644 --- a/Source/DiabloUI/selhero.cpp +++ b/Source/DiabloUI/selhero.cpp @@ -224,7 +224,7 @@ bool ShouldPrefillHeroName() void SelheroClassSelectorSelect(int value) { auto hClass = static_cast(vecSelHeroDlgItems[value]->m_value); - if (gbSpawned && (hClass == HeroClass::Rogue || hClass == HeroClass::Sorcerer || (hClass == HeroClass::Bard && !hfbard_mpq))) { + if (gbIsSpawn && (hClass == HeroClass::Rogue || hClass == HeroClass::Sorcerer || (hClass == HeroClass::Bard && !hfbard_mpq))) { ArtBackground.Unload(); UiSelOkDialog(nullptr, _("The Rogue and Sorcerer are only available in the full retail version of Diablo. Visit https://www.gog.com/game/diablo to purchase."), false); LoadBackgroundArt("ui_art\\selhero.pcx"); diff --git a/Source/DiabloUI/selok.cpp b/Source/DiabloUI/selok.cpp index 562981860..b739547f1 100644 --- a/Source/DiabloUI/selok.cpp +++ b/Source/DiabloUI/selok.cpp @@ -44,7 +44,7 @@ void UiSelOkDialog(const char *title, const char *body, bool background) if (!background) { LoadBackgroundArt("ui_art\\black.pcx"); } else { - if (!gbSpawned) { + if (!gbIsSpawn) { LoadBackgroundArt("ui_art\\mainmenu.pcx"); } else { LoadBackgroundArt("ui_art\\swmmenu.pcx"); diff --git a/Source/DiabloUI/settingsmenu.cpp b/Source/DiabloUI/settingsmenu.cpp index 09c175a65..b737a9877 100644 --- a/Source/DiabloUI/settingsmenu.cpp +++ b/Source/DiabloUI/settingsmenu.cpp @@ -72,7 +72,6 @@ void ItemSelected(int value) break; case SpecialMenuEntry::ToggleSpawn: gbIsSpawn = !gbIsSpawn; - UiSetSpawned(gbIsSpawn); endMenu = true; recreateUI = true; break; diff --git a/Source/DiabloUI/title.cpp b/Source/DiabloUI/title.cpp index 6c2bf7f90..7042868fd 100644 --- a/Source/DiabloUI/title.cpp +++ b/Source/DiabloUI/title.cpp @@ -71,9 +71,4 @@ void UiTitleDialog() TitleFree(); } -void UiSetSpawned(bool bSpawned) -{ - gbSpawned = bSpawned; -} - } // namespace devilution diff --git a/Source/diablo.cpp b/Source/diablo.cpp index e9cab3288..5ee5c0aa4 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -939,7 +939,6 @@ void DiabloInit() #endif UiInitialize(); - UiSetSpawned(gbIsSpawn); was_ui_init = true; ReadOnlyTest();