Browse Source

Menu tweaks

pull/6186/head
Anders Jenbo 3 years ago
parent
commit
9e7d223f19
  1. 8
      Source/DiabloUI/diabloui.cpp
  2. 2
      Source/DiabloUI/diabloui.h
  3. 14
      Source/DiabloUI/hero/selhero.cpp
  4. 30
      Source/options.cpp

8
Source/DiabloUI/diabloui.cpp

@ -46,7 +46,7 @@
namespace devilution {
OptionalOwnedClxSpriteList ArtLogo;
std::array<OptionalOwnedClxSpriteList, 2> DifficultyIndicator;
OptionalOwnedClxSpriteList DifficultyIndicator;
std::array<OptionalOwnedClxSpriteList, 3> ArtFocus;
@ -588,8 +588,7 @@ void LoadUiGFX()
} else {
ArtLogo = LoadPcxSpriteList("ui_art\\smlogo", /*numFrames=*/15, /*transparentColor=*/250);
}
DifficultyIndicator[0] = LoadPcx("ui_art\\radio1", /*transparentColor=*/0);
DifficultyIndicator[1] = LoadPcx("ui_art\\radio3", /*transparentColor=*/0);
DifficultyIndicator = LoadPcx("ui_art\\r1_gry", /*transparentColor=*/0);
ArtFocus[FOCUS_SMALL] = LoadPcxSpriteList("ui_art\\focus16", /*numFrames=*/8, /*transparentColor=*/250);
ArtFocus[FOCUS_MED] = LoadPcxSpriteList("ui_art\\focus", /*numFrames=*/8, /*transparentColor=*/250);
ArtFocus[FOCUS_BIG] = LoadPcxSpriteList("ui_art\\focus42", /*numFrames=*/8, /*transparentColor=*/250);
@ -617,8 +616,7 @@ void UnloadUiGFX()
for (auto &art : ArtFocus)
art = std::nullopt;
ArtLogo = std::nullopt;
for (auto &diffInd : DifficultyIndicator)
diffInd = std::nullopt;
DifficultyIndicator = std::nullopt;
}
void UiInitialize()

2
Source/DiabloUI/diabloui.h

@ -65,7 +65,7 @@ struct _uiheroinfo {
};
extern OptionalOwnedClxSpriteList ArtLogo;
extern std::array<OptionalOwnedClxSpriteList, 2> DifficultyIndicator;
extern OptionalOwnedClxSpriteList DifficultyIndicator;
extern std::array<OptionalOwnedClxSpriteList, 3> ArtFocus;
extern OptionalOwnedClxSpriteList ArtBackgroundWidescreen;
extern OptionalOwnedClxSpriteList ArtBackground;

14
Source/DiabloUI/hero/selhero.cpp

@ -92,11 +92,17 @@ void RenderDifficultyIndicators()
{
if (!selhero_isSavegame)
return;
const uint16_t width = (*DifficultyIndicator[0])[0].width();
const uint16_t height = (*DifficultyIndicator[0])[0].height();
SDL_Rect rect = MakeSdlRect(SELHERO_DIALOG_HERO_IMG->m_rect.x, SELHERO_DIALOG_HERO_IMG->m_rect.y - height - 2, width, height);
const uint16_t width = (*DifficultyIndicator)[0].width();
const uint16_t height = (*DifficultyIndicator)[0].height();
SDL_Rect rect = MakeSdlRect(
SELHERO_DIALOG_HERO_IMG->m_rect.x + 1,
SELHERO_DIALOG_HERO_IMG->m_rect.y + SELHERO_DIALOG_HERO_IMG->m_rect.h - height - 1,
width,
height);
for (int i = 0; i <= DIFF_LAST; i++) {
UiRenderItem(UiImageClx((*DifficultyIndicator[i < selhero_heroInfo.herorank ? 0 : 1])[0], rect, UiFlags::None));
if (i >= selhero_heroInfo.herorank)
break;
UiRenderItem(UiImageClx((*DifficultyIndicator)[0], rect, UiFlags::None));
rect.x += width;
}
}

30
Source/options.cpp

@ -1021,6 +1021,9 @@ std::vector<OptionEntryBase *> GraphicsOptions::GetEntries()
#if !defined(USE_SDL1) || defined(__3DS__)
&fitToScreen,
#endif
&showItemGraphicsInStores,
&showHealthValues,
&showManaValues,
#ifndef USE_SDL1
&upscale,
&scaleQuality,
@ -1031,9 +1034,6 @@ std::vector<OptionEntryBase *> GraphicsOptions::GetEntries()
&zoom,
&limitFPS,
&showFPS,
&showItemGraphicsInStores,
&showHealthValues,
&showManaValues,
&colorCycling,
&alternateNestArt,
#if SDL_VERSION_ATLEAST(2, 0, 0)
@ -1095,39 +1095,39 @@ std::vector<OptionEntryBase *> GameplayOptions::GetEntries()
{
return {
&tickRate,
&grabInput,
&runInTown,
&adriaRefillsMana,
&friendlyFire,
&multiplayerFullQuests,
&randomizeQuests,
&theoQuest,
&cowQuest,
&friendlyFire,
&multiplayerFullQuests,
&runInTown,
&quickCast,
&testBard,
&testBarbarian,
&experienceBar,
&enemyHealthBar,
&showMonsterType,
&showItemLabels,
&disableCripplingShrines,
&quickCast,
&enableFloatingNumbers,
&autoRefillBelt,
&autoPickupInTown,
&autoGoldPickup,
&autoElixirPickup,
&autoOilPickup,
&autoEquipWeapons,
&autoEquipArmor,
&autoEquipHelms,
&autoEquipShields,
&autoEquipJewelry,
&autoGoldPickup,
&autoElixirPickup,
&autoOilPickup,
&numHealPotionPickup,
&numFullHealPotionPickup,
&numManaPotionPickup,
&numFullManaPotionPickup,
&numRejuPotionPickup,
&numFullRejuPotionPickup,
&enableFloatingNumbers,
&autoPickupInTown,
&disableCripplingShrines,
&adriaRefillsMana,
&grabInput,
};
}

Loading…
Cancel
Save