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
qndel
7a9aaed4b4
proper heroitems size
5 years ago
Gleb Mazovetskiy
7fd79c5c40
SaveLoad/Helper: Rename member fields
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Anders Jenbo
630e507f63
🚚 Apply namespace
5 years ago
Anders Jenbo
6f1498d315
🚚 Move structures to there respective headers
5 years ago
Juliano Leal Goncalves
9021f8daa5
♻️ Pluralize global 'item' array variable
5 years ago
Anders Jenbo
28bb003601
🐛 use exact size of save format struct
5 years ago
Anders Jenbo
bba73ea20f
✨ Handle mixed item origins in multiplayer
5 years ago
Anders Jenbo
c221cdfeb1
🐛 Correct sinage on level load/save
5 years ago
Anders Jenbo
a69a76941e
♻️ Clean up InitCutscene
5 years ago
Anders Jenbo
8f09cc3034
[diablo] 🐛 Correct spelling of Sorcerer
...
Fixes #1074
5 years ago
Anders Jenbo
17803d5923
♻️ Apply proper types to PlayerStruct
5 years ago
Anders Jenbo
def2253386
♻️ Move monster.h related structs and enums and apply propper types
5 years ago
Anders Jenbo
d6ec6395e0
♻️ change QuestTalkData in to an array of _speech_id
...
This gets rid of casting QuestTalkData to DWORD/int in various parts of
the code.
5 years ago
alanbirtles
d0c675b426
fix #1155
5 years ago
Anders Jenbo
1284333765
♻️ Use explicit types and remove globals from save file logic
5 years ago
Anders Jenbo
a827420070
🐛 Stable "hotkeys" size calculation
5 years ago
qndel
12dddc4e8f
✨ Preserve active spell and hotkeys across games
5 years ago
Anders Jenbo
e8fb559e53
🐛 Correct saving/loading of enums
5 years ago
Anders Jenbo
783e4a70b1
♻️ Strongly type items structures
5 years ago
Anders Jenbo
d37fb68809
Make header checks portable
5 years ago
Anders Jenbo
886ed4803a
Do not try to convert levels for non avalible quests
...
Apparently previous saves can leave behind some quest levels in junk
states
5 years ago
Anders Jenbo
3593266ef7
Converte all Levels when cross loading saves
5 years ago
Anders Jenbo
5035ac8062
Strip Hellfire items in Diablo sessions
5 years ago
Anders Jenbo
7cf40d3c7c
Clean up missile function names
5 years ago
qndel
ba37c8618f
fixtypos ( #1053 )
5 years ago
Anders Jenbo
b4e78c5e79
Remove some unused junk
5 years ago
Anders Jenbo
a5ca521f0d
Fix item morphing in Hellfire
5 years ago
qndel
c0f5749728
Fix RNG diverging during level generation depending on the code path
...
The consequences has mostly mitigated after wards, but this will make things make more sens when analysing the state of the code.
5 years ago