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
Anders Jenbo
8a4d38dd74
Stabalize clang-tidy runs
5 years ago
Anders Jenbo
871f168ea0
Clang-tidy: bugprone-reserved-identifier
5 years ago
Anders Jenbo
8f3266244a
Clang-tidy: readability-else-after-return
5 years ago
Anders Jenbo
2bdb6caa07
Cleanup majority of remaning implicit bool conversions ( #2234 )
5 years ago
Anders Jenbo
22b632f04a
♻️ Clean up implicit bool conversions
5 years ago
obligaron
3c9314fa0a
Remove MonsterStruct.actionFrame and enable ADL for Walking
5 years ago
obligaron
b0ed920a25
Introduce AnimationInfo to MonsterStruct
5 years ago
Anders Jenbo
ee7b32d8f6
Player by reference part 3
5 years ago
Gleb Mazovetskiy
4ea7ba0f5f
🚚 engine.h: Extract `LoadLE32` and `LoadBE32`
5 years ago
Gleb Mazovetskiy
f9f301b054
🚚 engine.h: Extract `Point`, `Direction`, `clamp`
...
`engine.h` is getting quite bloated. Moves this code to their own files.
5 years ago
obligaron
660f8d2f43
Ensure AnimationInfo is reset when a game is loaded
5 years ago
Juliano Leal Goncalves
d47fc924f3
♻️ Use '_item_indexes' instead of 'int' for 'ItemStruct.IDidx' field
5 years ago
obligaron
ccc1ccf9c3
Introduce ItemStruct.AnimInfo
5 years ago
Anders Jenbo
27591cc29f
Fix spawn save game compatability
5 years ago
qndel
ae221bb860
fix invalid width2
5 years ago
Anders Jenbo
8a7ec56d3a
Player by reference part 2
...
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
5 years ago
obligaron
d97131349e
Unify player_graphic memory handling
5 years ago
obligaron
61ba5009ac
Convert to CelSprite
5 years ago
obligaron
3067aeacb8
Remove PlayerStruct._pXYZWidth and replace it with calls to GetAnimationWidth
5 years ago
Juliano Leal Goncalves
b3ec79af4f
Leverage 'Point' in Lighting and Player functions ( #2048 )
5 years ago
Juliano Leal Goncalves
d55cd99dd5
🚚 Rename 'direction' enum to 'Direction'
5 years ago
Anders Jenbo
a095bc0bf7
♻️ Migrate more code away from miniwin
5 years ago
obligaron
7ed009ecb7
Remove PlayerStruct.actionFrame and enable ADL for Walking/Run ( #1939 )
...
- Remove (unused) actionFrame for PM_DEATH
- Remove actionFrame for PM_SPELL
- Remove actionFrame for PM_WALK
- Remove actionFrame
5 years ago
Anders Jenbo
8eb9c930fe
🚨 Fix remaning GCC warnings ( #1929 )
5 years ago
Anders Jenbo
4b577329f4
♻️ Refactor towner initialization
5 years ago
Anders Jenbo
6321bf04d5
♻️ Pass player to towner by reference instead of index
5 years ago
Anders Jenbo
23cec61f15
🎨 Mark Points returned by GetTargetPosition as const
5 years ago
Anders Jenbo
654a2b8834
♻️ Clean up automap code
...
Use Point for x,y pairs. Make helpers for drawing door and squares
5 years ago
Gleb Mazovetskiy
f33f7ae7eb
💨 Do not zero-initalize arrays we write to
...
`std::make_unique<T[]>(size)` always zero-initalizes the array.
C++20 has `std::make_unique_for_overwrite` to avoid that, while
older C++ versions can use the approach applied here.
5 years ago
Gleb Mazovetskiy
8e634ff02c
♻️ Remove `_iAnimWidth`
...
No longer needed as of #1796
We could probably go further and not expose `ItemAnimWidth`,
but it'd be dangerous because sometimes `_iAnimData` is null.
5 years ago
Gleb Mazovetskiy
47c93c2f9c
🧹 Fix more `-Wformat` warnings
5 years ago
Vladimir Olteanu
c319344c50
Load/save cleanup ( #1766 )
5 years ago
Anders Jenbo
3b04f67194
🔥 Remove a chunk of miniwin types
5 years ago
obligaron
16b3b38908
Move NewPlrAnim logic to AnimationInfo
...
Adjust SetNewAnimation-Parameter Names to Class Member
Adjust NewPlrAnim-Parameter Names to SetNewAnimation-Parameter Names
5 years ago
obligaron
1de46a8495
Rename member variables
5 years ago
obligaron
0b5183f63e
Introduce AnimationInfo
...
Update AnimationInfo.DelayLen comment
5 years ago
Vladimir Olteanu
bea21a5e20
Replace LOAD_LE32 & LOAD_BE32 with signedness- and endian-agnostic equivalents
5 years ago
Anders Jenbo
b69d18f12d
🌐 Enable translation of all remaning strings
5 years ago
obligaron
239a43cc1c
Remove "AnimWidth2" expect for missiles ( #1680 )
5 years ago
Anders Jenbo
2bd13451a1
♻️ Apply point positioning to all remaning entities
5 years ago
Anders Jenbo
98cd435fba
♻️ Apply point types to missiles
5 years ago
Anders Jenbo
efbe8a8338
♻️ add possition points to monsters
5 years ago
Anders Jenbo
7912e510f0
🎨 Clean up overuse of SDL types
5 years ago
Anders Jenbo
275404029e
♻️ Cleanup player temp variables
5 years ago
Anders Jenbo
a5f062b747
🎨 Use stdint instead of SDL types
5 years ago
Anders Jenbo
e4cfad3196
♻️ Use points instead of individual fileds for player structure
5 years ago