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
Anders Jenbo
1e3ed903be
🎨 strip redundant else
5 years ago
Anders Jenbo
97d7171123
🔥 Get rid of _ptargx/y
5 years ago
Anders Jenbo
373f28736f
🎨 Acceptable parts of modernize-*
5 years ago
Anders Jenbo
c89bd9c001
🚨 Fix remaning warnings for clang and gcc
5 years ago
Anders Jenbo
5fdb9ce459
🎨 Format code
5 years ago
Anders Jenbo
946ff5b0fa
♻️ Performe static casts when load save game data
5 years ago
Anders Jenbo
61d15e23db
🎨 Apply direction enum to monsters and relations
...
Missiles _mimfnum is being used for a lot more then just directions and
can also be a 16 degree direction so can't apply enum verbs and
restricitons to it in most cases. This in turns also affects SetMissDir
and some other functions that have to stay int.
5 years ago
Gleb Mazovetskiy
2c924e1ab1
🐞 pfile: Fix stale tables after leaving a game
...
In multiplayer, the hash and block tables are kept around between the
saves (presumably to improve performance).
When leaving the game, they should be cleared.
Clearing of the tables is handled by `Archive::Close` in `mpqapi.cpp`.
After 135f5e03c7 ,
which moved the archive closing inside `pfile_write_hero`, the tables
were no longer cleared on `pfile_flush_W` (because the archive was
already closed when it was called).
To fix the issue, this commit adds a `clear_tables` argument
to `pfile_write_hero` and removes the `pfile_flush_W` method.
Bug reported and root cause found by @Eider-McDuck :
> Example to reproduce: Have 2 vanilla savegames, join a game with the first,
> then leave, then join a game with the second, then drop an item on the floor.
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago
Anders Jenbo
f450d6a125
🚚 Move defines to there proper files
5 years ago
qndel
2677cc14dc
fix loading golem
5 years ago
Juliano Leal Goncalves
28ad9d43c5
🎨 Rename 'plr_class' enum to 'HeroClass'
...
Members were renamed as well for readability.
5 years ago
Juliano Leal Goncalves
7d95bfed39
♻️ Convert 'plr_class' to a scoped enumeration
5 years ago
Gleb Mazovetskiy
135f5e03c7
Only write to the file once when saving
5 years ago
Stephen C. Wills
f062032e19
Fixed data type of quest _qmsg in save files. ( #1475 )
5 years ago
Gleb Mazovetskiy
a8e7bdfc81
loadsave: Fix off-by-one in RemoveEmptyLevelItems
...
Refs #1367
5 years ago
qndel
53e928e785
proper heroitems size
5 years ago
Stephen C. Wills
a80aa286d3
Fixed data type of quest _qmsg in save files. ( #1475 )
5 years ago
Anders Jenbo
e7ae8ddd04
🚚 Move all enums to there respective headers
5 years ago
Anders Jenbo
2732aea1b2
♻️ Use GameInfo instead of individual globals
5 years ago
Anders Jenbo
61244c4d93
♻️ Rearange and apply more enums
5 years ago
Anders Jenbo
20186e0370
🎨 Replace TRUE/FALSE with true/false
...
fix
Fix
fix
5 years ago
Anders Jenbo
93d42b62b8
♻️ Change BOOL to bool
5 years ago
Gleb Mazovetskiy
cc75b7a948
loadsave: Fix off-by-one in RemoveEmptyLevelItems
...
Refs #1367
5 years ago