Create config for building translations in visual studio
Correct Spanish translation
Change infostr from char[128] to std::string
Correct kerning for Greek font
Sync mana between clients
Introduce StashStruct.GetPage/SetPage
Update _iStatFlag for stash items
Use string_view for switch keyboard input
Use string_view for 3ds keyboard input
Remove unnecessary copy
Was this meant to reset the output? It should never be changed unless the user confirms input. In practice this was calling memcpy with the same src and dest pointers, which is undefined behaviour.
Use string_view for vita keyboard input
Use string_view for UiEdit hint
Now that platforms with C APIs have been updated to take string_views in the C++ wrappers
Use PointsInRectangleRange with a starting position (#4202)
Remove unessesery .c_str() from UiEdit
Do not exit game on network timeout
Add artifact to MacOSX workflow
Unify gold handling (withdraw any amount from stash)
Github CI: Fixup release actions
Use ${{ }} consistently. It is technically not required in if
conditions but GitHub CI docs use it and it avoid certain pitfalls,
such as when the value starts with ! (making it a YAML type
declaration).
Fixes one of the ifs.
Enable buying with gold from stash (#4218)
CelSprite: Unify width storage
Reduces the size of a CelSprite by taking advantage of the fact that
16-bit pointers are aligned, so the last bit is always 0.
Remove OwnedCelSprite::Unowned method
Conversion is already provided by the CelSprite(const OwnedCelSprite &) constructor.
An option to RLE-compress masked art
Saves about 200 KiB RAM in dungeon at a large performance cost.
Almost never a good idea, except for severely RAM-constrained devices (e.g. RG99).
Fix splitting gold
Promote additional sumbols to the core fonts
General Punctuation
Superscripts and Subscripts
Currency Symbols
Combining Diacritical Marks for Symbols
UK TL: Reach 85% of translated content
Invalidate removed inventory items
Update bg.po
Fix hardware cursor initialization
Hardware cursor should get initialized even for non mouse control types
(e.g. ControlTypes::None), because by the time the control type gets
initialized or changes the cursor is already set up and won't change.
Fixes #4233
Fix alpha blending in BilinearScale32
Fixes #4206
Change default value for "Show FPS" to off
Remove (un)lock_buf
We do not seem to render from multiple threads, so these calls are
unnecessary.
Restore position of dropped note when recombining fragments
[gamepad] Fix managing belt
Fixed issue #4217
DPI Scale is now included in the calculation.
swap mlSFX and miSFX to match structure definition.
Make game screen ZeroTier aware
Update zlib dependency to 1.2.12 (#4254)
Fix cow quest getting stuck in multiplayer
UK TL: Finish translating weapon names (#4255)
Wirt: Ensure _iStatFlag is updated before getTextColorWithStatCheck is called (#4258)
Add OptionEntry for alternative nest art and remove command line parameter --nestart
Change cursor after acknowledging attempt to cast spell
This matches the behaviour of other targeted spells, however the mana is wasted because it is spent when readying the spell.
Refactor OnHealOther to operate on Player references
Only attempt to cast heal other/resurrect with a target
[Android] Add shortcut to import game data
Fix underflow in BilinearScale32
Fixes funky hardware cursor colors during fade transitions.
Refs #4206
Address type conversion warnings in loadsave.cpp
Most of this was centred around stash pages being saved/loaded as unsigned values but stored as signed values. Consistently used unsigned since it matches the intended usage.
Address c4244 warning in PointerOrValue
This triggers a bunch of warnings in MSVC because the conversion is potentially truncating, despite never being an issue in practice...
Update translation template
[gamepad] Fix using quick spells with rebound keys
Improve item hints for gamepads
Greek translation - final draft
Clean up PotionButtonRenderer
Add gamepad support for stash
Update translations
Remove calls to NewCursor() from store functions
Update and fix the Russian translation according to the latest code changes
Don't use HoldItem in CMD_PUTITEM handler
Don't destroy hold item when setting cursor to hourglass
Min, not max, when clamping stash page...
Everything in one commit
refresh stats when sending an item to stash by ctrl + click
Correct translation and add missing lines
Added Translation to French
Mostly settings translation + a few changes
German Translation
Czech Translation update for 1.4.0 (#4288)
AddItemToStashGrid: Use PointsInRectangleRange with a starting position (#4297)
Update libzt
Add helpers to change stash pages (#4287)
Use truthy test for TARGET_OS_IPHONE
This constant is defined as 1 when building for iphone, 0 for MacOS, and undefined on other platforms. To get the expected behaviour we need to check it's defined and non-zero.
Fix #4251 macOS mouse grab issue (#4298)
Update Croatian translation
Update bg.po
Update to latest master, for real this time...
Added more Quickspell hotkeys for a total of 16. Saving will write the number of configured quickspell slots at the beginning of the hotkeys file. The loader will check the size, if its bigger than older saves should be it will load the header and read the hotkeys, otherwise it will load 4 quickspells for compatibility.
Touchscreen navigation for stash
Avoid using HoldItem in AddStealPotions
Correctly center panel text when holding red item
Avoid using HoldItem in OperateShrineEldritch
set statflag after recreating potion
Remove unnecessary string copies
Ensure Reflect + Thorn don't kill a monster twice (#4318)
Only install discord shared library on Windows
Fix a negative shift exponent sanitizer warning
Source/spells.h:53:14: runtime error: shift exponent -1 is negative
Fixes #4319
Update Japanese Translations
Back to 100%.
Some translations changed.
Address type conversion warnings in WordWrapString
Make 'quit game' return to the main menu when NOEXIT is set
allow remapping P for pause and always treat pause button as pause
Allow casting Town Portal, Teleport, and Guardian scrolls from inventory
Mouse/Gamepad fixes
Introduces a ControlDevice global which is distinct from ControlMode
in that it is set to Gamepad even when simulating a mouse.
This allows us to avoid a number of edge cases related to mode changes.
Fixes #4242
Correct spacing for font 22-*
Fixes #3523
increase max stash pages from 50 to 100
Enhanced attack using controllers (#4019)
Only save stash pages containing items
Viewing a stash page results in an entry being created in the stashGrids map. If the player flicks through the entire stash without actually storing an item they end up with ~20kb of unnecessary data in the stash file when they next save.
Update player's spell target when using quick cast on gamepad
Use appropriate spell ID when quick casting from scroll or staff
[Windows] Recreate the whole window if the renderer would otherwise freeze
fix armor pierce on uniques and display affix values
Avoid recreating items in PutItem locally
[touch] Spend stat points when clicking the buttons
Fixes #4387
[android] Remove leftover migration code
[android] Automatically start game after updating translations
Fix crash from badly init stash
[touch] Allow interacting with the spell book
Fixes #4393
Fix SoundSample::DuplicateFrom mp3
Fixes #4392
Enable use of L2/R2 on joystick
Do not process held events for action buttons in main menu
Do not process button held events in character panel
update swedish lines
Reduce debug log output of OpenAsset
Reduce debug log output of Keymapper
Reduce debug log output of Control
Reduce debug log output of MpqWriter
Reduce debug log output of misc_msg
Fix -Wswitch in misc_msg.cpp
Split up store title from "Your gold"
Fix snd_deinit called even if snd_init failed
We were previously setting was_sound_init to true unconditionally
after calling snd_init.
However, snd_init can fail. Use gbSndInited instead.
Fix an OOB in CEL/CL2 outline rendering
This OOB happened when rendering a sprite so that it is exactly
off-screen (touching the border but not visible) on top/bottom
while also being only partly off-screen on the left or right.
Update ko.po
[gamepad] Reuse repeat logic from mouse
[touch] Hook up action repeat
UK TL: 95% translated
Restore durability to items in stores
[gamepad] Fix repeated spell casting getting stuck if there is no target
Fix crash when switching to English
Revert IPL_TARGAC description
Lets give it a better one later
[ganepad] Do not repeat spell if modefier is pressed
Expand hot area of stash cell to include bottom-right border
This matches the behaviour of inventory cell hit logic. Previously it was possible to click exactly on a border and be unable to put an item in the stash.
Remove use of SetICursor and related globals from CheckStashPaste (#4429)
Use zero-based arch indexes
fixes #4434
Fix frame index of Level Up icon (#4442)
Be explicit about the cursor overlap checks when acting on inventory cells
Use GetIventorySize(Item) instead of SetICursor in inv.cpp
Also use mod for testing if item dimensions are even. Lets assume the release build can optimise this into a bitmask, probably wont need to do this anyway after a refactor.
This version includes an option to use the SDL resampler.
Audio: Use SDL resampler where available
GetManaAmount - fix usage of pMaxManaBase
I don't think this ever comes up because no spells have an sManaCost of 255, however _pMaxManaBase is stored as fixed point, so it should be shifted before use.
But to be honest, I'm not even sure what it is trying to do here. Was sManaCost == 255 supposed to indicate that it was going to use all the player's mana? Why was it cast to a BYTE before using it? Did they intend to limit the manage usage to 255 and just screwed up? I originally saw this logic in Devilution, and found it because the Middle Earth mod had a slight change here, where it used pMana (maybe because they thought it was intended to be a spell that used all the player's mana?) Also, I saw that in 1.07, Ghidra saw ma as a byte, not an int as written in Devilution - I wonder if that's where the cast came from? In the ME Mod version, it sees ma as an int.
Use GetInventorySize in GetItemSizeOnSlot
Replace uses of icursSize28 with local itemSize variable
Re-ordered the last couple of if conditions to make it clearer what the impact of the adjustments to mouse position are.
Change InventoryMoveToBody side-effect to return value
This makes the call sites use the same pattern as every other inventory movement. See the next commit for why :D
Only attempt to lookup mouse position if the slot changes
Move the adjustment for large items out of InvGetEquipSlotCoord
Remove SetICursor and unused globals
Default to 48kHz on Windows
Refs #1390
Update xbox-one.md
Fix player level validation when joining ZT public games
Fix viewport size of UiList on hero selection
Ensure working buffers are zero-initialised for PKWareLib
explode() and implode() both have comments saying they expect the buffers to be zero-init, however new[] default initialises arrays which for char[] leaves them in an implementation defined state. On MSVC the memory is unitialised. To be safe use std::make_unique<T[]>(size_t) as this value-initialises each element of the array.
Address type conversion/truncation warnings in LoadPcxPixelsAndPalette
SDL_RWsize is documented as returning any negative value on error (even though in practice errors are always indicated by a value of -1) so allow for that instead of only checking for unknown size.
There were also a few unnecessary arithmetic operations being done to calculate the size to read, straightforward to simplify.
SDL_CreateRGBSurfaceWithFormat expects width and height to be positive values < 2^16. Could get away with using unsigned if the SDL API did but it doesn't so stick with signed types even when it doesn't really fit the use.
bufferPitch is an oddity, ultimately it's only used to determine a pointer offset so making the param ptrdiff_t as it's more appropriate than size_t.
Update n3ds.cmake
C-Stick mapping is incorrect for the 3ds platform.
Currently left/right is not functional,
up/down moves the cursor left/right.
This corrects the behavior.
Congrats on the new release!
Fix Durability Icons (#4475)
fix 0 index for durability icons
Add ItemType::Shield (clarity)
Add ItemType::Shield to switch/case for clarity, so it is clear that this is what the default option was to show.
GitHub CI: Add a --fully_vendored source dist
Refs #4469
Play gold sound effect when depositing in stash
This adds a bit of audible feedback to help the player know that the action had an impact (along with the cursor changing and the count increasing).
Play sound after withdrawing gold from the stash
All gold related interactions a player can make with the stash now have audio feedback
Updated Polish translation to 100% string coverage
Minimize direct usage of Lights[] global
Avoid using HeldItem in CreatePlrItems (#4308)
Remove use of HoldItem from stores.cpp
Use HoldItem for determining if an item is held
This cleans up a bit of code and solves a few edge cases where an item
could be lost, the game be unresponsive, or miss fire an event during
lag cause of the cursor not reflecting the currently held item.
Add NewCursor(Item&) for setting the cursor based on a held item
The case for empty items should never be hit in the current code, but I've got a related PR that'll make use of that so adding it now.
Invalidate held item when pasting into the stash
Makes use of that Item::isEmpty check in NewCursor to set the hand cursor when empty handed.
Only use HoldItem in InvGetItem if necessary
When auto-placing gold in the inventory there's no need to trample HoldItem.
Add function to mark an item as empty
Explicitly clear HoldItem when putting an item into the Inventory/Stash
Previously this also relied on NewCursor modifying MyPlayer->HoldItem when setting the cursor to a non-item cursor to avoid item duplication, seems more appropriate to make this explicit in the caller.
Clear the held item if it is used to open a quest entrance
Small translation edits at ru.po
Clear held item when putting in an empty belt slot (#4490)
Add hint to avoid bugprone-use-after-move warnings
Reduce string conversions
Only spawn loot once
Create config for building translations in visual studio
Correct Spanish translation
Change infostr from char[128] to std::string
Correct kerning for Greek font
Sync mana between clients
Introduce StashStruct.GetPage/SetPage
Update _iStatFlag for stash items
Use string_view for switch keyboard input
Use string_view for 3ds keyboard input
Remove unnecessary copy
Was this meant to reset the output? It should never be changed unless the user confirms input. In practice this was calling memcpy with the same src and dest pointers, which is undefined behaviour.
Use string_view for vita keyboard input
Use string_view for UiEdit hint
Now that platforms with C APIs have been updated to take string_views in the C++ wrappers
Use PointsInRectangleRange with a starting position (#4202)
Remove unessesery .c_str() from UiEdit
Do not exit game on network timeout
Add artifact to MacOSX workflow
Unify gold handling (withdraw any amount from stash)
Github CI: Fixup release actions
${{ }}
consistently. It is technically not required inif
conditions but GitHub CI docs use it and it avoid certain pitfalls, such as when the value starts with!
(making it a YAML type declaration).if
s.Enable buying with gold from stash (#4218)
CelSprite: Unify width storage
Reduces the size of a CelSprite by taking advantage of the fact that 16-bit pointers are aligned, so the last bit is always 0.
OwnedCelSprite::Unowned
methodConversion is already provided by the
CelSprite(const OwnedCelSprite &)
constructor.Saves about 200 KiB RAM in dungeon at a large performance cost. Almost never a good idea, except for severely RAM-constrained devices (e.g. RG99).
Fix splitting gold
Promote additional sumbols to the core fonts
General Punctuation Superscripts and Subscripts Currency Symbols Combining Diacritical Marks for Symbols
UK TL: Reach 85% of translated content
Invalidate removed inventory items
Update bg.po
Fix hardware cursor initialization
Hardware cursor should get initialized even for non mouse control types (e.g.
ControlTypes::None
), because by the time the control type gets initialized or changes the cursor is already set up and won't change.Fixes #4233
BilinearScale32
Fixes #4206
Change default value for "Show FPS" to off
Remove
(un)lock_buf
We do not seem to render from multiple threads, so these calls are unnecessary.
Restore position of dropped note when recombining fragments
[gamepad] Fix managing belt
Fixed issue #4217 DPI Scale is now included in the calculation.
Close gold withdraw when closing stash
[gamepad] Avoid OOB on empty belt
Fix auto-equip network messages
Fix shift-click equipment swapping network messages
fix comment labels in misdat
swap mlSFX and miSFX to match structure definition.
Make game screen ZeroTier aware
Update zlib dependency to 1.2.12 (#4254)
Fix cow quest getting stuck in multiplayer
UK TL: Finish translating weapon names (#4255)
Wirt: Ensure _iStatFlag is updated before getTextColorWithStatCheck is called (#4258)
Add OptionEntry for alternative nest art and remove command line parameter --nestart
Change cursor after acknowledging attempt to cast spell
This matches the behaviour of other targeted spells, however the mana is wasted because it is spent when readying the spell.
Refactor OnHealOther to operate on Player references
Only attempt to cast heal other/resurrect with a target
[Android] Add shortcut to import game data
Fix underflow in
BilinearScale32
Fixes funky hardware cursor colors during fade transitions.
Refs #4206
Most of this was centred around stash pages being saved/loaded as unsigned values but stored as signed values. Consistently used unsigned since it matches the intended usage.
This triggers a bunch of warnings in MSVC because the conversion is potentially truncating, despite never being an issue in practice...
Update translation template
[gamepad] Fix using quick spells with rebound keys
Improve item hints for gamepads
Greek translation - final draft
Clean up PotionButtonRenderer
Add gamepad support for stash
Update translations
Remove calls to NewCursor() from store functions
Update and fix the Russian translation according to the latest code changes
Don't use HoldItem in CMD_PUTITEM handler
Don't destroy hold item when setting cursor to hourglass
Min, not max, when clamping stash page...
Everything in one commit
refresh stats when sending an item to stash by ctrl + click
Correct translation and add missing lines
Added Translation to French
Mostly settings translation + a few changes
German Translation
Czech Translation update for 1.4.0 (#4288)
AddItemToStashGrid: Use PointsInRectangleRange with a starting position (#4297)
Update libzt
Add helpers to change stash pages (#4287)
Use truthy test for TARGET_OS_IPHONE
This constant is defined as 1 when building for iphone, 0 for MacOS, and undefined on other platforms. To get the expected behaviour we need to check it's defined and non-zero.
Fix #4251 macOS mouse grab issue (#4298)
Update Croatian translation
Update bg.po
Update to latest master, for real this time...
Added more Quickspell hotkeys for a total of 16. Saving will write the number of configured quickspell slots at the beginning of the hotkeys file. The loader will check the size, if its bigger than older saves should be it will load the header and read the hotkeys, otherwise it will load 4 quickspells for compatibility.
Touchscreen navigation for stash
Avoid using HoldItem in AddStealPotions
Correctly center panel text when holding red item
Avoid using HoldItem in OperateShrineEldritch
set statflag after recreating potion
Remove unnecessary string copies
Ensure Reflect + Thorn don't kill a monster twice (#4318)
Only install discord shared library on Windows
Fix a negative shift exponent sanitizer warning
Source/spells.h:53:14: runtime error: shift exponent -1 is negative
Fixes #4319
Update Japanese Translations
Back to 100%.
Some translations changed.
Address type conversion warnings in WordWrapString
Resegment translations
pip install --upgrade -r tools/segmenter/requirements.txt tools/segmenter/segment_all.py
UK TL: Fixes
Make 'quit game' return to the main menu when NOEXIT is set
allow remapping P for pause and always treat pause button as pause
Allow casting Town Portal, Teleport, and Guardian scrolls from inventory
Mouse/Gamepad fixes
Introduces a
ControlDevice
global which is distinct fromControlMode
in that it is set toGamepad
even when simulating a mouse.This allows us to avoid a number of edge cases related to mode changes.
Fixes #4242
Fixes #3523
increase max stash pages from 50 to 100
Enhanced attack using controllers (#4019)
Only save stash pages containing items
Viewing a stash page results in an entry being created in the stashGrids map. If the player flicks through the entire stash without actually storing an item they end up with ~20kb of unnecessary data in the stash file when they next save.
Fix: #4285 Discord incomplete translation
Fixed so that Class is translated
Update Source/discord/discord.cpp
Thank you.
Co-authored-by: Gleb Mazovetskiy glex.spb@gmail.com
Add missing pt_br translations
Russian translation update
Update ios.toolchain.cmake from upstream
14092d317b84a3037e71b870d2117dda126811a3
From https://github.com/leetal/ios-cmake/issues/139
Update vendored SDL2 to latest master
Update vendored simpleini to latest master
Update libfmt from upstream
Fix endianness handling in language.cpp
Fix modifier + D-Pad triggering a D-Pad event
Also fixes build with
HAS_KBCTRL=1
Fixes #1977
Update Italian localization
Fix Diablo's HP
Update README.md
Add text to specify to users that they must log in to be able to download the test builds.
Fix underscore for font 12
Fix a typo in Hellfire book text
Fixes a typo in "Journal: The tirade"
A tab instead of space meant that this was rendered as "arefull"
Fix "Level" translation
Minimal Spanish corrections
Update zhCN translation (#4353)
clearTables when closing stash mpq
Fix application manifest in MinGW builds
Update textdat.cpp
FIX: Selecting Quit Game opens into the Support menu #4334
Amiga: Build zlib via Dependencies.cmake
Simplifies the Amiga build
Fix a negative shift exponent sanitizer warning
Source/spells.h:54:14: runtime error: shift exponent -1 is negative
Use romfs on Switch for devilutionx.mpq
Controller mouse emulation fixes
Search system paths for packages on 3DS
Support MP3 playback
Remove "MpqFileRwRead beyond EOF by %u" warning
It spams the debug log but is not really an error from what I understand
Fix variable name in FindCITRO3D.cmake
Only query jbutton state for button events
[Android] Update assets
Use New Athena Unicode to generate proper Greek symbols
Update magic requirement for stashed books (#4376)
Don't hide the automap in Help and Chat Log (#4379)
This was necessary in the past due to stippled transparency but we use blended transparency now.
Fixes #4355
Includes updates of drwav and drmp3 to the latest versions
SDL2 2.0.22 has just been released
Remove MpqDir and use PrefPath instead.
Only query cbutton state for button events
Similar to https://github.com/diasurgical/devilutionX/pull/4374
Update player's spell target when using quick cast on gamepad
Use appropriate spell ID when quick casting from scroll or staff
[Windows] Recreate the whole window if the renderer would otherwise freeze
fix armor pierce on uniques and display affix values
Avoid recreating items in PutItem locally
[touch] Spend stat points when clicking the buttons
Fixes #4387
[android] Remove leftover migration code
[android] Automatically start game after updating translations
Fix crash from badly init stash
[touch] Allow interacting with the spell book
Fixes #4393
SoundSample::DuplicateFrom
mp3Fixes #4392
Enable use of L2/R2 on joystick
Do not process held events for action buttons in main menu
Do not process button held events in character panel
update swedish lines
Reduce debug log output of OpenAsset
Reduce debug log output of Keymapper
Reduce debug log output of Control
Reduce debug log output of MpqWriter
Reduce debug log output of misc_msg
Fix -Wswitch in misc_msg.cpp
Split up store title from "Your gold"
Fix snd_deinit called even if snd_init failed
We were previously setting
was_sound_init
to true unconditionally after callingsnd_init
.However,
snd_init
can fail. UsegbSndInited
instead.This OOB happened when rendering a sprite so that it is exactly off-screen (touching the border but not visible) on top/bottom while also being only partly off-screen on the left or right.
Update ko.po
[gamepad] Reuse repeat logic from mouse
[touch] Hook up action repeat
UK TL: 95% translated
Restore durability to items in stores
[gamepad] Fix repeated spell casting getting stuck if there is no target
Fix crash when switching to English
Revert IPL_TARGAC description
Lets give it a better one later
[ganepad] Do not repeat spell if modefier is pressed
Bump dvl_multicast_addr in preperation for 1.4.0
1.4.0 docs
Show failing line in error messages
Bump Android versions
Do not set scaling hint with out a render
Update installing.md
Update installing.md
Fix OpenDingux/RetroFW builds
Follow-up to https://github.com/diasurgical/devilutionX/pull/4414, which removed the
state
field.-ffile-prefix-map
for relative__FILE__
Fixes #4420
Fixes #4397
Clean up logic for 1-handed weapons in CheckInvPaste()
Avoid using HeldItem in CheckInvSwap
Remove duplicate code in DoLighting
Hardware cursor: Simplify initialization
Set the palette at load time.
Since we only support hardware cursors in SDL2, we can take advantage of its reference-counted palettes.
Use Miniset in drlg_l4
Update zerotier_native.h
Fix some more warnings
Use SoundSample for music
Unifies audio handling between sound effects and music.
Fix conversion of C-string literal to
char*
Zero-based frame indexing
Index frames starting at 0 instead of 1.
make_src_dist.py --fully_vendored: Add Discord SDK
Expand hot area of stash cell to include bottom-right border
This matches the behaviour of inventory cell hit logic. Previously it was possible to click exactly on a border and be unable to put an item in the stash.
Remove use of SetICursor and related globals from CheckStashPaste (#4429)
Use zero-based arch indexes
fixes #4434
Fix frame index of Level Up icon (#4442)
Be explicit about the cursor overlap checks when acting on inventory cells
Use GetIventorySize(Item) instead of SetICursor in inv.cpp
Also use mod for testing if item dimensions are even. Lets assume the release build can optimise this into a bitmask, probably wont need to do this anyway after a refactor.
Android: Bump gradle version
Fix SPLICONLAST for zero-based frame indexing
Follow-up to https://github.com/diasurgical/devilutionX/pull/4221
Enable Spell Animation in Town
Use unarmed Animations when casting in town if weapon is not hold
Add function to get current grid
Add function to get item id at grid coords
Also introduced a few helper types and values to hopefully help document behaviour
correct spelling in comment
Co-authored-by: qndel stefan551@o2.pl
Add tests for GetInventorySize
Bump SDL_audiolib
This version includes an option to use the SDL resampler.
Audio: Use SDL resampler where available
GetManaAmount - fix usage of pMaxManaBase
I don't think this ever comes up because no spells have an sManaCost of 255, however _pMaxManaBase is stored as fixed point, so it should be shifted before use.
But to be honest, I'm not even sure what it is trying to do here. Was sManaCost == 255 supposed to indicate that it was going to use all the player's mana? Why was it cast to a BYTE before using it? Did they intend to limit the manage usage to 255 and just screwed up? I originally saw this logic in Devilution, and found it because the Middle Earth mod had a slight change here, where it used pMana (maybe because they thought it was intended to be a spell that used all the player's mana?) Also, I saw that in 1.07, Ghidra saw
ma
as a byte, not an int as written in Devilution - I wonder if that's where the cast came from? In the ME Mod version, it seesma
as an int.Use GetInventorySize in GetItemSizeOnSlot
Replace uses of icursSize28 with local itemSize variable
Re-ordered the last couple of if conditions to make it clearer what the impact of the adjustments to mouse position are.
This makes the call sites use the same pattern as every other inventory movement. See the next commit for why :D
Only attempt to lookup mouse position if the slot changes
Move the adjustment for large items out of InvGetEquipSlotCoord
Remove SetICursor and unused globals
Default to 48kHz on Windows
Refs #1390
Update xbox-one.md
Fix player level validation when joining ZT public games
Fix viewport size of UiList on hero selection
Ensure working buffers are zero-initialised for PKWareLib
explode() and implode() both have comments saying they expect the buffers to be zero-init, however new[] default initialises arrays which for char[] leaves them in an implementation defined state. On MSVC the memory is unitialised. To be safe use std::make_unique<T[]>(size_t) as this value-initialises each element of the array.
SDL_RWsize is documented as returning any negative value on error (even though in practice errors are always indicated by a value of -1) so allow for that instead of only checking for unknown size.
There were also a few unnecessary arithmetic operations being done to calculate the size to read, straightforward to simplify.
SDL_CreateRGBSurfaceWithFormat expects width and height to be positive values < 2^16. Could get away with using unsigned if the SDL API did but it doesn't so stick with signed types even when it doesn't really fit the use.
bufferPitch is an oddity, ultimately it's only used to determine a pointer offset so making the param ptrdiff_t as it's more appropriate than size_t.
C-Stick mapping is incorrect for the 3ds platform.
Currently left/right is not functional, up/down moves the cursor left/right.
This corrects the behavior.
Congrats on the new release!
Fix Durability Icons (#4475)
fix 0 index for durability icons
Add ItemType::Shield (clarity)
Add ItemType::Shield to switch/case for clarity, so it is clear that this is what the default option was to show.
--fully_vendored
source distRefs #4469
This adds a bit of audible feedback to help the player know that the action had an impact (along with the cursor changing and the count increasing).
All gold related interactions a player can make with the stash now have audio feedback
Updated Polish translation to 100% string coverage
Minimize direct usage of Lights[] global
Avoid using HeldItem in CreatePlrItems (#4308)
Remove use of HoldItem from stores.cpp
Use HoldItem for determining if an item is held
This cleans up a bit of code and solves a few edge cases where an item could be lost, the game be unresponsive, or miss fire an event during lag cause of the cursor not reflecting the currently held item.
The case for empty items should never be hit in the current code, but I've got a related PR that'll make use of that so adding it now.
Makes use of that Item::isEmpty check in NewCursor to set the hand cursor when empty handed.
When auto-placing gold in the inventory there's no need to trample HoldItem.
Add function to mark an item as empty
Explicitly clear HoldItem when putting an item into the Inventory/Stash
Previously this also relied on NewCursor modifying MyPlayer->HoldItem when setting the cursor to a non-item cursor to avoid item duplication, seems more appropriate to make this explicit in the caller.
Clear the held item if it is used to open a quest entrance
Small translation edits at ru.po
Clear held item when putting in an empty belt slot (#4490)
Add hint to avoid bugprone-use-after-move warnings
Makes clang (and GCC) consider item.Clear() a reinitialisation of a moved variable - see https://clang.llvm.org/extra/clang-tidy/checks/bugprone-use-after-move.html#reinitialization
ps4: add install instruction for 1.4.0
Add draft flatpak manifest (#4468)
Item special effect enum (#4129)
update gitignore
Finish merge
Fix Clang formatting
fix Clang Formatting
Co-authored-by: Anders Jenbo anders@jenbo.dk Co-authored-by: ephphatha ephphatha@thelettereph.com Co-authored-by: egonzalez egonzalez@msi.notebook.hiperion.local Co-authored-by: obligaron obligaron@live.com Co-authored-by: staphen staphen@gmail.com Co-authored-by: Gleb Mazovetskiy glex.spb@gmail.com Co-authored-by: Oleksandr Kalko tsunamistate@gmail.com Co-authored-by: NikoVP 60973634+NikoVP@users.noreply.github.com Co-authored-by: Bubio bubio66@gmail.com Co-authored-by: Michael H xGnoSiSx@users.noreply.github.com Co-authored-by: Dominus Iniquitatis iniquitatis@users.noreply.github.com Co-authored-by: qndel stefan551@o2.pl Co-authored-by: Hiperión egonzalez.hiperion@gmail.com Co-authored-by: Axel Ribon axel@pinpinteam.com Co-authored-by: ChaosMarc chaosmarc@gmx.de Co-authored-by: Psojed realpsojed@gmail.com Co-authored-by: Bubio 78299054+bubio@users.noreply.github.com Co-authored-by: gogogogi trebelnik2@gmail.com Co-authored-by: Drakker dpelletier@gmail.com Co-authored-by: Felipe Wannmacher fwannmacher@gmail.com Co-authored-by: Yuri Pourre yuripourre@gmail.com Co-authored-by: SergBrNord 71232876+SergBrNord@users.noreply.github.com Co-authored-by: M0Rf30 morf3089@gmail.com Co-authored-by: KPhoenix 68359262+kphoenix137@users.noreply.github.com Co-authored-by: Tytannial Tytannial@users.noreply.github.com Co-authored-by: SimonCeder simon.ceder@gmail.com Co-authored-by: nsm53project 85224046+nsm53project@users.noreply.github.com Co-authored-by: Vladimir Olteanu vladimir.olteanu@cs.pub.ro Co-authored-by: MrHuu MrHuu@users.noreply.github.com Co-authored-by: Mathew kruhol@gmail.com Co-authored-by: Brandon Cullen brandoncullen2201@gmail.com Co-authored-by: John Törnblom john.tornblom@gmail.com