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

1.5.2 #6834

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft

1.5.2 #6834

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f2bfa81
Debug: Convert DiabloMsg to EventPlrMsg
kphoenix137 Sep 18, 2023
6237500
Debug: Improved iteminfo command (#6623)
kphoenix137 Sep 18, 2023
a0e53ca
Don't validate creation flags on gold
StephenCWills Sep 3, 2023
1700ab9
Indicate network validation success or failure in iteminfo
StephenCWills Sep 18, 2023
42a842d
Fix edge cases for packing empty items
StephenCWills Sep 20, 2023
186a6c1
nxdk: Build in optimized mode
glebm Nov 1, 2023
e42fab0
Fix Item Validation (#6723)
kphoenix137 Oct 19, 2023
d5e5fde
`Displacement#distance`: Use a naive hypot impl
glebm Nov 1, 2023
02790d8
Restore packed item state when regenerating an item using heroitem data
StephenCWills Sep 4, 2023
030a31f
Remove invalid items after loading heroitem data
StephenCWills Sep 5, 2023
50afd43
Validation: Validate Item Drop Packets
kphoenix137 Oct 1, 2023
5c3229f
Switch to 22.04
glebm Aug 19, 2023
58414e8
Revert to old clamp() compat version
AJenbo Nov 20, 2023
b4a378c
Add 1.5.2 release to metainfo (#6862)
tsunamistate Dec 16, 2023
710386a
Fix item label height for CJK
glebm Jan 11, 2024
813c7f3
Slightly improve CJK infobox rendering
glebm Jan 11, 2024
f6c5e9d
clang-format: single-line functions and if guards
glebm Nov 3, 2023
e1f05fd
Load stash data based on gbIsHellfire, not gbIsHellfireSaveGame
StephenCWills Sep 5, 2023
ed490c7
DiabloUI: Fix Japanese text clipping
glebm Jan 27, 2024
4f0943f
Upgrade SDL to 2.30.0
AJenbo Feb 1, 2024
ab816be
Lock Switch build image to known good version
AJenbo Feb 2, 2024
c70c983
Remove byte order logic from half-transparency lookups
StephenCWills Dec 19, 2023
8529b23
Upgrade vcpkg commit
tsunamistate Dec 3, 2023
a21fa04
Update 1.5.2 info in devilutionx.metainfo.xml
AJenbo Feb 4, 2024
6e0b592
Bump version to 1.5.2
AJenbo Feb 4, 2024
7812d0a
Update Packaging/nix/devilutionx.metainfo.xml
AJenbo Feb 5, 2024
eecb727
Statically link libsoidum Linux_x86_64.yml (#6938)
AJenbo Feb 5, 2024
7ea7124
Statically link BZIP2 on Linux releases to address issue with Fedora …
AJenbo Feb 5, 2024
a6f9a6a
Remove offending line
tsunamistate Feb 7, 2024
2471500
Clear Panel so lines don't repeat
Trihedraf Apr 7, 2024
25dc50d
fix hp validation
kphoenix137 Apr 6, 2024
b8b6dff
Apply Hellfire spellbook validation to PItem packet handling
StephenCWills Feb 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
switch:
docker:
- image: devkitpro/devkita64:latest
- image: devkitpro/devkita64@sha256:ff45e29f2efab7f70651cee39e1d98952d0db970d78c4d71bcd94efcfb0e4e5f
working_directory: ~/repo
steps:
- checkout
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/Linux_x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,15 @@ jobs:
env:
CMAKE_BUILD_TYPE: ${{github.event_name == 'release' && 'Release' || 'RelWithDebInfo'}}
# We set DEVILUTIONX_SYSTEM_LIBFMT=OFF because its soversion changes frequently.
# We set DEVILUTIONX_SYSTEM_LIBSODIUM=OFF because its soversion changes frequently.
# We set DEVILUTIONX_SYSTEM_SIMPLEINI=OFF because we require v4.19+, still missing from many distributions,
# We set DEVILUTIONX_SYSTEM_BZIP2=OFF because Fedora and Debian do not agree on how to link it.
# and there is no libsimpleini-dev:i386 for Ubuntu 20.04.
run: |
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/linux_i386.toolchain.cmake \
-DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr -DCPACK=ON \
-DBUILD_TESTING=OFF -DDEVILUTIONX_SYSTEM_LIBFMT=OFF -DDEVILUTIONX_SYSTEM_SIMPLEINI=OFF && \
-DBUILD_TESTING=OFF -DDEVILUTIONX_SYSTEM_LIBFMT=OFF -DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF \
-DDEVILUTIONX_SYSTEM_SIMPLEINI=OFF -DDEVILUTIONX_SYSTEM_BZIP2=OFF && \
cmake --build build -j $(getconf _NPROCESSORS_ONLN) --target package

- name: Package
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/Linux_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@ jobs:
env:
CMAKE_BUILD_TYPE: ${{github.event_name == 'release' && 'Release' || 'RelWithDebInfo'}}
# We set DEVILUTIONX_SYSTEM_LIBFMT=OFF because its soversion changes frequently.
# We set DEVILUTIONX_SYSTEM_LIBSODIUM=OFF because its soversion changes frequently.
# We set DEVILUTIONX_SYSTEM_SIMPLEINI=OFF because we require v4.19+, still missing from many distributions.
# We set DEVILUTIONX_SYSTEM_BZIP2=OFF because Fedora and Debian do not agree on how to link it.
run: |
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr -DCPACK=ON \
-DDISCORD_INTEGRATION=ON -DBUILD_TESTING=OFF -DDEVILUTIONX_SYSTEM_LIBFMT=OFF -DDEVILUTIONX_SYSTEM_SIMPLEINI=OFF && \
-DDISCORD_INTEGRATION=ON -DBUILD_TESTING=OFF -DDEVILUTIONX_SYSTEM_LIBFMT=OFF \
-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SIMPLEINI=OFF -DDEVILUTIONX_SYSTEM_BZIP2=OFF && \
cmake --build build -j $(getconf _NPROCESSORS_ONLN) --target package

- name: Package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Linux_x86_64_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Windows_MSVC_x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
uses: lukka/get-cmake@latest

- name: Restore or setup vcpkg
uses: lukka/run-vcpkg@v11.1
uses: lukka/run-vcpkg@v11.3
with:
vcpkgGitCommitId: '927bc12e31148b0d44ae9d174b96c20e3bcf08eb'
vcpkgGitCommitId: '16ee2ecb31788c336ace8bb14c21801efb6836e4'

- name: Fetch test data
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/xbox_nxdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Build nxdk
shell: bash
run: PATH="${NXDK_DIR}/bin:$PATH" make -j $(nproc) -C "$NXDK_DIR" NXDK_ONLY=1 all cxbe
run: PATH="${NXDK_DIR}/bin:$PATH" make -j $(nproc) -C "$NXDK_DIR" NXDK_ONLY=1 CFLAGS=-O2 CXXFLAGS=-O2 all cxbe

- name: Checkout
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions 3rdParty/SDL2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(SDL_TEST_ENABLED_BY_DEFAULT OFF)
include(functions/FetchContent_MakeAvailableExcludeFromAll)
include(FetchContent)
FetchContent_Declare(SDL2
URL https://github.com/libsdl-org/SDL/archive/8b39eb9b1ff885978816dd9663277608187e8676.tar.gz
URL_HASH MD5=3cf9bf5f20375aa5dcc529193c809967
URL https://github.com/libsdl-org/SDL/releases/download/release-2.30.0/SDL2-2.30.0.tar.gz
URL_HASH SHA256=36e2e41557e0fa4a1519315c0f5958a87ccb27e25c51776beb6f1239526447b0
)
FetchContent_MakeAvailableExcludeFromAll(SDL2)
15 changes: 14 additions & 1 deletion Packaging/nix/devilutionx.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,20 @@
</screenshot>
</screenshots>
<releases>
<release version="1.5.1" date="2023-xx-xx">
<release version="1.5.2" date="2024-02-04">
<description>
<p>This release includes the following updates:</p>
<ul>
<li>Fix issues with joining games due to invalid player data</li>
<li>Improve rendering of Chinese/Japanese/Korean texts</li>
<li>Fix Hellfire items not saving their identified state</li>
<li>Fix stash corrupting when converting a hero between Diablo and Hellfire</li>
</ul>
<p>Please visit the full changelog for more detailed notes</p>
</description>
<url>https://github.com/diasurgical/devilutionX/releases/tag/1.5.2</url>
</release>
<release version="1.5.1" date="2023-09-02">
<description>
<p>This is a primarily bugfix release, which includes the following updates:</p>
<ul>
Expand Down
3 changes: 2 additions & 1 deletion Source/.clang-format
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
BasedOnStyle: webkit
AlignTrailingComments: true
AllowShortBlocksOnASingleLine: true
AllowShortFunctionsOnASingleLine: None
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
PointerAlignment: Right
TabWidth: 4
UseTab: ForIndentation
Expand Down
16 changes: 8 additions & 8 deletions Source/DiabloUI/hero/selhero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void SelheroListSelect(int value)
if (static_cast<std::size_t>(value) == selhero_SaveCount) {
vecSelDlgItems.clear();

SDL_Rect rect1 = { (Sint16)(uiPosition.x + 264), (Sint16)(uiPosition.y + 211), 320, 33 };
SDL_Rect rect1 = { (Sint16)(uiPosition.x + 242), (Sint16)(uiPosition.y + 211), 365, 33 };
vecSelDlgItems.push_back(std::make_unique<UiArtText>(_("Choose Class").data(), rect1, UiFlags::AlignCenter | UiFlags::FontSize30 | UiFlags::ColorUiSilver, 3));

vecSelHeroDlgItems.clear();
Expand All @@ -176,7 +176,7 @@ void SelheroListSelect(int value)
SDL_Rect rect2 = { (Sint16)(uiPosition.x + 279), (Sint16)(uiPosition.y + 429), 140, 35 };
vecSelDlgItems.push_back(std::make_unique<UiArtTextButton>(_("OK"), &UiFocusNavigationSelect, rect2, UiFlags::AlignCenter | UiFlags::FontSize30 | UiFlags::ColorUiGold));

SDL_Rect rect3 = { (Sint16)(uiPosition.x + 429), (Sint16)(uiPosition.y + 429), 140, 35 };
SDL_Rect rect3 = { (Sint16)(uiPosition.x + 429), (Sint16)(uiPosition.y + 429), 144, 35 };
vecSelDlgItems.push_back(std::make_unique<UiArtTextButton>(_("Cancel"), &UiFocusNavigationEsc, rect3, UiFlags::AlignCenter | UiFlags::FontSize30 | UiFlags::ColorUiGold));

UiInitList(SelheroClassSelectorFocus, SelheroClassSelectorSelect, SelheroClassSelectorEsc, vecSelDlgItems, true);
Expand All @@ -191,7 +191,7 @@ void SelheroListSelect(int value)
if (selhero_heroInfo.hassaved) {
vecSelDlgItems.clear();

SDL_Rect rect1 = { (Sint16)(uiPosition.x + 264), (Sint16)(uiPosition.y + 211), 320, 33 };
SDL_Rect rect1 = { (Sint16)(uiPosition.x + 242), (Sint16)(uiPosition.y + 211), 365, 33 };
vecSelDlgItems.push_back(std::make_unique<UiArtText>(_("Save File Exists").data(), rect1, UiFlags::AlignCenter | UiFlags::FontSize30 | UiFlags::ColorUiSilver, 3));

vecSelHeroDlgItems.clear();
Expand All @@ -202,7 +202,7 @@ void SelheroListSelect(int value)
SDL_Rect rect2 = { (Sint16)(uiPosition.x + 279), (Sint16)(uiPosition.y + 427), 140, 35 };
vecSelDlgItems.push_back(std::make_unique<UiArtTextButton>(_("OK"), &UiFocusNavigationSelect, rect2, UiFlags::AlignCenter | UiFlags::VerticalCenter | UiFlags::FontSize30 | UiFlags::ColorUiGold));

SDL_Rect rect3 = { (Sint16)(uiPosition.x + 429), (Sint16)(uiPosition.y + 427), 140, 35 };
SDL_Rect rect3 = { (Sint16)(uiPosition.x + 429), (Sint16)(uiPosition.y + 427), 144, 35 };
vecSelDlgItems.push_back(std::make_unique<UiArtTextButton>(_("Cancel"), &UiFocusNavigationEsc, rect3, UiFlags::AlignCenter | UiFlags::VerticalCenter | UiFlags::FontSize30 | UiFlags::ColorUiGold));

UiInitList(SelheroLoadFocus, SelheroLoadSelect, selhero_List_Init, vecSelDlgItems, true);
Expand Down Expand Up @@ -278,7 +278,7 @@ void SelheroClassSelectorSelect(int value)
if (ShouldPrefillHeroName())
strcpy(selhero_heroInfo.name, SelheroGenerateName(selhero_heroInfo.heroclass));
vecSelDlgItems.clear();
SDL_Rect rect1 = { (Sint16)(uiPosition.x + 264), (Sint16)(uiPosition.y + 211), 320, 33 };
SDL_Rect rect1 = { (Sint16)(uiPosition.x + 242), (Sint16)(uiPosition.y + 211), 365, 33 };
vecSelDlgItems.push_back(std::make_unique<UiArtText>(_("Enter Name").data(), rect1, UiFlags::AlignCenter | UiFlags::FontSize30 | UiFlags::ColorUiSilver, 3));

SDL_Rect rect2 = { (Sint16)(uiPosition.x + 265), (Sint16)(uiPosition.y + 317), 320, 33 };
Expand All @@ -287,7 +287,7 @@ void SelheroClassSelectorSelect(int value)
SDL_Rect rect3 = { (Sint16)(uiPosition.x + 279), (Sint16)(uiPosition.y + 429), 140, 35 };
vecSelDlgItems.push_back(std::make_unique<UiArtTextButton>(_("OK"), &UiFocusNavigationSelect, rect3, UiFlags::AlignCenter | UiFlags::FontSize30 | UiFlags::ColorUiGold));

SDL_Rect rect4 = { (Sint16)(uiPosition.x + 429), (Sint16)(uiPosition.y + 429), 140, 35 };
SDL_Rect rect4 = { (Sint16)(uiPosition.x + 429), (Sint16)(uiPosition.y + 429), 144, 35 };
vecSelDlgItems.push_back(std::make_unique<UiArtTextButton>(_("Cancel"), &UiFocusNavigationEsc, rect4, UiFlags::AlignCenter | UiFlags::FontSize30 | UiFlags::ColorUiGold));

UiInitList(nullptr, SelheroNameSelect, SelheroNameEsc, vecSelDlgItems);
Expand Down Expand Up @@ -508,7 +508,7 @@ void selhero_List_Init()
size_t selectedItem = 0;
vecSelDlgItems.clear();

SDL_Rect rect1 = { (Sint16)(uiPosition.x + 264), (Sint16)(uiPosition.y + 211), 320, 33 };
SDL_Rect rect1 = { (Sint16)(uiPosition.x + 242), (Sint16)(uiPosition.y + 211), 365, 33 };
vecSelDlgItems.push_back(std::make_unique<UiArtText>(_("Select Hero").data(), rect1, UiFlags::AlignCenter | UiFlags::FontSize30 | UiFlags::ColorUiSilver, 3));

vecSelHeroDlgItems.clear();
Expand All @@ -532,7 +532,7 @@ void selhero_List_Init()
SELLIST_DIALOG_DELETE_BUTTON = setlistDialogDeleteButton.get();
vecSelDlgItems.push_back(std::move(setlistDialogDeleteButton));

SDL_Rect rect5 = { (Sint16)(uiPosition.x + 489), (Sint16)(uiPosition.y + 429), 120, 35 };
SDL_Rect rect5 = { (Sint16)(uiPosition.x + 489), (Sint16)(uiPosition.y + 429), 144, 35 };
vecSelDlgItems.push_back(std::make_unique<UiArtTextButton>(_("Cancel"), &UiFocusNavigationEsc, rect5, UiFlags::AlignCenter | UiFlags::FontSize30 | UiFlags::ColorUiGold));

UiInitList(SelheroListFocus, SelheroListSelect, SelheroListEsc, vecSelDlgItems, false, nullptr, SelheroListDeleteYesNo, selectedItem);
Expand Down
2 changes: 1 addition & 1 deletion Source/DiabloUI/multi/selconn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void SelconnLoad()
SDL_Rect rect9 = { (Sint16)(uiPosition.x + 299), (Sint16)(uiPosition.y + 427), 140, 35 };
vecSelConnDlg.push_back(std::make_unique<UiArtTextButton>(_("OK"), &UiFocusNavigationSelect, rect9, UiFlags::AlignCenter | UiFlags::VerticalCenter | UiFlags::FontSize30 | UiFlags::ColorUiGold));

SDL_Rect rect10 = { (Sint16)(uiPosition.x + 454), (Sint16)(uiPosition.y + 427), 140, 35 };
SDL_Rect rect10 = { (Sint16)(uiPosition.x + 454), (Sint16)(uiPosition.y + 427), 144, 35 };
vecSelConnDlg.push_back(std::make_unique<UiArtTextButton>(_("Cancel"), &UiFocusNavigationEsc, rect10, UiFlags::AlignCenter | UiFlags::VerticalCenter | UiFlags::FontSize30 | UiFlags::ColorUiGold));

UiInitList(SelconnFocus, SelconnSelect, SelconnEsc, vecSelConnDlg, true);
Expand Down
5 changes: 3 additions & 2 deletions Source/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void PrintInfo(const Surface &out)
return;

const int space[] = { 18, 12, 6, 3, 0 };
Rectangle infoArea { GetMainPanel().position + Displacement { 177, 46 }, { 288, 60 } };
Rectangle infoArea { GetMainPanel().position + InfoBoxTopLeft, InfoBoxSize };

const int newLineCount = std::count(InfoString.str().begin(), InfoString.str().end(), '\n');
const int spaceIndex = std::min(4, newLineCount);
Expand Down Expand Up @@ -1000,6 +1000,7 @@ void DoAutoMap()
void CheckPanelInfo()
{
panelflag = false;
InfoString = StringOrView {};
const Point mainPanelPosition = GetMainPanel().position;
for (int i = 0; i < PanelButtonIndex; i++) {
int xend = PanBtnPos[i].x + mainPanelPosition.x + PanBtnPos[i].w;
Expand Down Expand Up @@ -1161,7 +1162,7 @@ void FreeControlPan()

void DrawInfoBox(const Surface &out)
{
DrawPanelBox(out, { 177, 62, 288, 63 }, GetMainPanel().position + Displacement { 177, 46 });
DrawPanelBox(out, { 177, 62, InfoBoxSize.width, InfoBoxSize.height }, GetMainPanel().position + InfoBoxTopLeft);
if (!panelflag && !trigflag && pcursinvitem == -1 && pcursstashitem == StashStruct::EmptyCell && !spselflag) {
InfoString = {};
InfoColor = UiFlags::ColorWhite;
Expand Down
6 changes: 6 additions & 0 deletions Source/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@

#include "DiabloUI/ui_flags.hpp"
#include "engine.h"
#include "engine/displacement.hpp"
#include "engine/point.hpp"
#include "engine/rectangle.hpp"
#include "engine/render/text_render.hpp"
#include "engine/size.hpp"
#include "panels/ui_panels.hpp"
#include "spelldat.h"
#include "spells.h"
Expand All @@ -32,6 +34,10 @@ namespace devilution {

constexpr Size SidePanelSize { 320, 352 };

// Info box displacement of the top-left corner relative to GetMainPanel().position.
constexpr Displacement InfoBoxTopLeft { 177, 46 };
constexpr Size InfoBoxSize { 288, 64 };

extern bool dropGoldFlag;
extern bool chrbtn[4];
extern bool lvlbtndown;
Expand Down
27 changes: 25 additions & 2 deletions Source/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "lighting.h"
#include "monstdat.h"
#include "monster.h"
#include "pack.h"
#include "plrmsg.h"
#include "quests.h"
#include "spells.h"
Expand Down Expand Up @@ -902,7 +903,29 @@ std::string DebugCmdItemInfo(const string_view parameter)
pItem = &Items[pcursitem];
}
if (pItem != nullptr) {
return StrCat("Name: ", pItem->_iIName, "\nIDidx: ", pItem->IDidx, "\nSeed: ", pItem->_iSeed, "\nCreateInfo: ", pItem->_iCreateInfo);
std::string_view netPackValidation { "N/A" };
if (gbIsMultiplayer) {
ItemNetPack itemPack;
Item unpacked;
PackNetItem(*pItem, itemPack);
netPackValidation = UnPackNetItem(myPlayer, itemPack, unpacked) ? "Success" : "Failure";
}
return StrCat("Name: ", pItem->_iIName,
"\nIDidx: ", pItem->IDidx, " (", AllItemsList[pItem->IDidx].iName, ")",
"\nSeed: ", pItem->_iSeed,
"\nCreateInfo: ", pItem->_iCreateInfo,
"\nLevel: ", pItem->_iCreateInfo & CF_LEVEL,
"\nOnly Good: ", ((pItem->_iCreateInfo & CF_ONLYGOOD) == 0) ? "False" : "True",
"\nUnique Monster: ", ((pItem->_iCreateInfo & CF_UPER15) == 0) ? "False" : "True",
"\nDungeon Item: ", ((pItem->_iCreateInfo & CF_UPER1) == 0) ? "False" : "True",
"\nUnique Item: ", ((pItem->_iCreateInfo & CF_UNIQUE) == 0) ? "False" : "True",
"\nSmith: ", ((pItem->_iCreateInfo & CF_SMITH) == 0) ? "False" : "True",
"\nSmith Premium: ", ((pItem->_iCreateInfo & CF_SMITHPREMIUM) == 0) ? "False" : "True",
"\nBoy: ", ((pItem->_iCreateInfo & CF_BOY) == 0) ? "False" : "True",
"\nWitch: ", ((pItem->_iCreateInfo & CF_WITCH) == 0) ? "False" : "True",
"\nHealer: ", ((pItem->_iCreateInfo & CF_HEALER) == 0) ? "False" : "True",
"\nPregen: ", ((pItem->_iCreateInfo & CF_PREGEN) == 0) ? "False" : "True",
"\nNet Validation: ", netPackValidation);
}
return StrCat("Numitems: ", ActiveItemCount);
}
Expand Down Expand Up @@ -1133,7 +1156,7 @@ bool CheckDebugTextCommand(const string_view text)
const auto result = dbgCmd.actionProc(parameter);
Log("DebugCmd: {} Result: {}", text, result);
if (result != "")
InitDiabloMsg(result);
EventPlrMsg(result, UiFlags::ColorRed);
return true;
}

Expand Down
3 changes: 3 additions & 0 deletions Source/diablo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2736,7 +2736,10 @@ void LoadGameLevel(bool firstflag, lvl_entry lvldir)
}

if (firstflag || lvldir == ENTRY_LOAD) {
bool isHellfireSaveGame = gbIsHellfireSaveGame;
gbIsHellfireSaveGame = gbIsHellfire;
LoadStash();
gbIsHellfireSaveGame = isHellfireSaveGame;
}

IncProgress();
Expand Down
4 changes: 0 additions & 4 deletions Source/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ void DrawHalfTransparentAligned32BlendedRectTo(const Surface &out, unsigned sx,
while (height-- > 0) {
for (unsigned i = 0; i < width; ++i, ++pix) {
const uint32_t v = *pix;
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
*pix = lookupTable[v & 0xFFFF] | (lookupTable[(v >> 16) & 0xFFFF] << 16);
#else
*pix = lookupTable[(v >> 16) & 0xFFFF] | (lookupTable[v & 0xFFFF] << 16);
#endif
}
pix += skipX;
}
Expand Down
3 changes: 2 additions & 1 deletion Source/engine/displacement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ struct DisplacementOf {

float magnitude() const
{
return static_cast<float>(hypot(deltaX, deltaY));
// We do not use `std::hypot` here because it is slower and we do not need the extra precision.
return sqrtf(deltaX * deltaX + deltaY * deltaY);
}

/**
Expand Down
4 changes: 0 additions & 4 deletions Source/engine/palette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ void GenerateBlendedLookupTable(std::array<SDL_Color, 256> &palette, int skipFro
#if DEVILUTIONX_PALETTE_TRANSPARENCY_BLACK_16_LUT
for (unsigned i = 0; i < 256; ++i) {
for (unsigned j = 0; j < 256; ++j) {
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
const std::uint16_t index = i | (j << 8);
#else
const std::uint16_t index = j | (i << 8);
#endif
paletteTransparencyLookupBlack16[index] = paletteTransparencyLookup[0][i] | (paletteTransparencyLookup[0][j] << 8);
}
}
Expand Down
3 changes: 2 additions & 1 deletion Source/engine/render/scrollrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,8 @@ void DrawMain(const Surface &out, int dwHgt, bool drawDesc, bool drawHp, bool dr
// When chat input is displayed, the belt is hidden and the chat moves up.
DoBlitScreen(mainPanelPosition.x + 171, mainPanelPosition.y + 6, 298, 116);
} else {
DoBlitScreen(mainPanelPosition.x + 176, mainPanelPosition.y + 46, 288, 63);
DoBlitScreen(mainPanelPosition.x + InfoBoxTopLeft.deltaX, mainPanelPosition.y + InfoBoxTopLeft.deltaY,
InfoBoxSize.width, InfoBoxSize.height);
}
}
if (drawMana) {
Expand Down
Loading