Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partially revert menu tweaks to restore old look of diablo kill indicators #6727

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions Source/DiabloUI/diabloui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
namespace devilution {

OptionalOwnedClxSpriteList ArtLogo;
OptionalOwnedClxSpriteList DifficultyIndicator;
std::array<OptionalOwnedClxSpriteList, 2> DifficultyIndicator;

std::array<OptionalOwnedClxSpriteList, 3> ArtFocus;

Expand Down Expand Up @@ -595,7 +595,8 @@ void LoadUiGFX()
} else {
ArtLogo = LoadPcxSpriteList("ui_art\\smlogo", /*numFrames=*/15, /*transparentColor=*/250);
}
DifficultyIndicator = LoadPcx("ui_art\\r1_gry", /*transparentColor=*/0);
DifficultyIndicator[0] = LoadPcx("ui_art\\radio1", /*transparentColor=*/0);
DifficultyIndicator[1] = LoadPcx("ui_art\\radio3", /*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);
Expand Down Expand Up @@ -623,7 +624,8 @@ void UnloadUiGFX()
for (auto &art : ArtFocus)
art = std::nullopt;
ArtLogo = std::nullopt;
DifficultyIndicator = std::nullopt;
for (auto &diffInd : DifficultyIndicator)
diffInd = std::nullopt;
}

void UiInitialize()
Expand Down
2 changes: 1 addition & 1 deletion Source/DiabloUI/diabloui.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct _uiheroinfo {
};

extern OptionalOwnedClxSpriteList ArtLogo;
extern OptionalOwnedClxSpriteList DifficultyIndicator;
extern std::array<OptionalOwnedClxSpriteList, 2> DifficultyIndicator;
extern std::array<OptionalOwnedClxSpriteList, 3> ArtFocus;
extern OptionalOwnedClxSpriteList ArtBackgroundWidescreen;
extern OptionalOwnedClxSpriteList ArtBackground;
Expand Down
14 changes: 4 additions & 10 deletions Source/DiabloUI/hero/selhero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,11 @@ void RenderDifficultyIndicators()
{
if (!selhero_isSavegame)
return;
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);
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);
for (int i = 0; i <= DIFF_LAST; i++) {
if (i >= selhero_heroInfo.herorank)
break;
UiRenderItem(UiImageClx((*DifficultyIndicator)[0], rect, UiFlags::None));
UiRenderItem(UiImageClx((*DifficultyIndicator[i < selhero_heroInfo.herorank ? 0 : 1])[0], rect, UiFlags::None));
rect.x += width;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/msg.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @file msg.cpp
*
* Implementation of function for sending and reciving network messages.
* Implementation of function for sending and receiving network messages.
*/
#include <climits>
#include <cmath>
Expand Down
2 changes: 1 addition & 1 deletion Source/msg.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @file msg.h
*
* Interface of function for sending and reciving network messages.
* Interface of function for sending and receiving network messages.
*/
#pragma once

Expand Down
2 changes: 1 addition & 1 deletion Source/plrmsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace devilution {
namespace {

struct PlayerMessage {
/** Time message was recived */
/** Time message was received */
Uint32 time;
/** The default text color */
UiFlags style;
Expand Down