Juliano Leal Goncalves
fc1dbb7402
♻️ Leverage 'Damage' for '_i[Min|Max]Dam' 'ItemData' fields
5 years ago
Juliano Leal Goncalves
0eeb7af0f2
♻️ Leverage 'Damage' for '_iL[Min|Max]Dam' 'Item' fields
5 years ago
Juliano Leal Goncalves
43a52757e3
♻️ Leverage 'Damage' for '_iF[Min|Max]Dam' 'Item' fields
5 years ago
Juliano Leal Goncalves
091c373904
♻️ Leverage 'Damage' for '_pIL[Min|Max]Dam' 'Player' fields
5 years ago
Juliano Leal Goncalves
919093406e
♻️ Leverage 'Damage' for '_pIF[Min|Max]Dam' 'Player' fields
5 years ago
Juliano Leal Goncalves
fd853a00ad
♻️ Leverage 'Damage' for '_pI[Min|Max]Dam' 'Player' fields
5 years ago
Juliano Leal Goncalves
379a27b64a
♻️ Convert 'ItemType' enum to enum class
...
🎨 Rename 'ItemType' elements to enum class standards
5 years ago
Juliano Leal Goncalves
776a3d4e84
🐛 Use 'Spell' instead of 'RSpell' for clearing used inventory scrolls
...
Readied spell can be swapped to something else in between the cast and the hit frame, resulting in incorrect removal.
This is how currently belt scrolls are checked so we are now using a consistent strategy.
5 years ago
ephphatha
9ef77cb428
Use scoped enum for Direction16.
...
Allows renaming the members to share names with Direction members when
representing the same conceptual direction.
5 years ago
ephphatha
b12de6fe12
Use scoped enum for Direction
...
Identified and removed an instance of Direction being used as an argument for a bool parameter
Removed a single-use temporary variable being cast from sprite frame to direction to size_t
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Fix alignment of WalkSettings array
5 years ago
Anders Jenbo
b74feb01dc
🐛 Correctly check if item name will fit in the info panel
5 years ago
Anders Jenbo
2d47c12515
Fix charpanel always showing player 0 stats
5 years ago
obligaron
1b3381ce8e
Move CrawlNum to CrawlTable and make it extern visible
5 years ago
Juliano Leal Goncalves
0d3d4c14f6
🚚 Rename 'Dead' concept to 'Corpse' everywhere ( #2808 )
5 years ago
Juliano Leal Goncalves
7841c4731e
🚚 Rename 'PkItemStruct' to 'ItemPack'
5 years ago
Juliano Leal Goncalves
bb2dfdfb73
🚚 Rename 'ItemStruct' to 'Item'
5 years ago
Juliano Leal Goncalves
28134d099c
🚚 Rename 'PkPlayerStruct' to 'PlayerPack'
5 years ago
Juliano Leal Goncalves
05d206720a
♻️ Replace 'icursW' and 'icursH' globals with single 'icursSize'
5 years ago
Juliano Leal Goncalves
317ebcdd3e
♻️ Replace 'icursW28' and 'icursH28' globals with single 'icursSize28'
5 years ago
Juliano Leal Goncalves
a469f7906e
♻️ Replace 'cursW' and 'cursH' globals with single 'cursSize'
5 years ago
Juliano Leal Goncalves
bbf529c65a
🚚 Rename 'PlayerStruct' to 'Player'
5 years ago
Anders Jenbo
4044fadeb5
Clean up some players references
5 years ago
qndel
3dbc120320
optimized packing/unpacking inventory items ( #2610 )
5 years ago
qndel
045921813b
some useless code removal
5 years ago
Anders Jenbo
9217e8c7f0
Test CreatePlayer
5 years ago
obligaron
82cea78def
Apply clang-format
5 years ago
obligaron
e3a2142941
Move picosha2.h to 3rdParty
5 years ago
obligaron
95daecc1bb
Introduce GetSpellListSelection and remove selection game logic from DrawSpellList
5 years ago
Anders Jenbo
90960f0c14
Remove dead code
5 years ago
Anders Jenbo
069249f318
🚚 Move local function to anonymous namespace i-p
5 years ago
obligaron
70db8456ba
Remove _pwtype and replace it with UsesRangedWeapon
5 years ago
ephphatha
a8ed1998d1
Use Point in path_ functions that reference position
...
In cases like path_get_h_cost this allows simplifying logic where Point provides functions for the intended behaviour in a much simpler to understand package.
This also makes it clearer which functions are const/don't modify the node and which potentially have side effects.
5 years ago
ephphatha
f01d551eb0
Add tests for path_get_h_cost, IsTileWalkable, IsTile(Not)Solid, path_solid_pieces, FindPath
...
Only path_solid_pieces and FindPath are used outside the file, but the other functions are exposed in the header and have behaviour I felt worth testing individually.
5 years ago
ephphatha
0efb134e18
Add tests for quest randomisation code
...
Required splitting the code to a separate function so it can be tested in isolation
5 years ago
Anders Jenbo
77b72da276
♻️ Use monster by reference when possible
5 years ago
Anders Jenbo
352a0ca510
Place local symbols in an anonymous namespace
5 years ago
Anders Jenbo
96bf75b502
Rename player globals
5 years ago
Anders Jenbo
dce78dde62
Rename lighting globals
5 years ago
Anders Jenbo
cb564a2d54
Clean up A-D
5 years ago
Anders Jenbo
ee2e7518c4
Clang-tidy: FunctionCase part 2
5 years ago
Juliano Leal Goncalves
cbb84199c2
♻️ Replace Point addition with 'Point + Displacement'
5 years ago
Anders Jenbo
d9e33b36f4
🔥 Delete FileErrDlg as it is now unused
5 years ago
ephphatha
357f6f1dc3
Move RNG functions to their own header/source files
5 years ago
Andrew James
20190ee687
Update random number functions to avoid IB ( #2226 )
...
* Update random number functions to avoid IB
Most calls to set seed were using uint32_t already, there were a few variables which were better served by having their type changed from signed to unsigned. The one exception is ItemStruct::_iSeed. This is an identifier that also happens to be used as a seed occasionally so a comment was added documenting this exception.
Includes suggested style changes for Source/towners.h; Source/towners.cpp; Source/msg.h; Source/multi.h
5 years ago
obligaron
3a9cc631c7
Rename DelayLen -> TicksPerFrame
...
Rename DelayCounter -> TickCounterOfCurrentFrame
5 years ago
obligaron
3ba4bac5e2
Harmonize DelayLen for Player and Monster (was 1-based on monseter (>= DelayLen) and 0-based on player (> DelayLen). Now both are 1-based (>= DelayLen)
5 years ago
ephphatha
15c285c879
Refactor calc_snd_position to take a Point instead of x/y params
...
Appears this function is only called internally despite being in the effects header.
5 years ago
Anders Jenbo
ee7b32d8f6
Player by reference part 3
5 years ago
ephphatha
a6b982b39d
Expand test cases to cover ShiftDistribution function
...
This could be isolated due to a potentially faulty implementation, the upper bound is higher than the max possible value.
5 years ago
Vladimir Olteanu
2624d1e62f
Introduce Direction16 as enum
5 years ago