Anders Jenbo
34744c068f
♻️ Consitantly use %i and not %d
5 years ago
Anders Jenbo
a095bc0bf7
♻️ Migrate more code away from miniwin
5 years ago
Anders Jenbo
0c2042fa52
♻️ Player by reference
...
Update Source/items.cpp
Update Source/lighting.cpp
Update Source/pack.cpp
asd
ads
as
5 years ago
Gleb Mazovetskiy
a3423cbc92
🧹 Move Storm code out of file_util
5 years ago
obligaron
60bfd5db34
Move SFileOpenArchive calls to new helper SFileOpenArchiveDiablo
5 years ago
staphen
3e5e5b2696
Synchronize SFileCloseFile() access
5 years ago
Gleb Mazovetskiy
987ab2533b
🐞 Synchronize SFileReadFile access
...
StormLib read function is not thread-safe: https://github.com/ladislav-zezula/StormLib/issues/175
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
47c93c2f9c
🧹 Fix more `-Wformat` warnings
5 years ago
Vladimir Olteanu
a2cb1e5c59
Cleanup pfile_encode_hero
5 years ago
Vladimir Olteanu
c319344c50
Load/save cleanup ( #1766 )
5 years ago
Vladimir Olteanu
bea21a5e20
Replace LOAD_LE32 & LOAD_BE32 with signedness- and endian-agnostic equivalents
5 years ago
Gleb Mazovetskiy
83292c8e67
♻️ Fix -Wunused-variable in pfile.cpp
5 years ago
Jmgr
d4f62870b8
Remove globals from paths.h
...
Fix for Vita
Update to use free functions
Use std::optional to allow setting empty paths
Change header inclusion order
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
Use std::optional to allow setting empty paths
Apply clang-format
Temporary commit
5 years ago
Anders Jenbo
b69d18f12d
🌐 Enable translation of all remaning strings
5 years ago
Anders Jenbo
7912e510f0
🎨 Clean up overuse of SDL types
5 years ago
Anders Jenbo
8fa0612433
🐛 Fix loading chosen hero
5 years ago
Anders Jenbo
a32ac83090
🎨 cleanup trivial trype comparisons
5 years ago
Anders Jenbo
cc164985a3
🎨 Correct type checks in src sub-folder
5 years ago
Anders Jenbo
f004c78824
🧹 performance-unnecessary-value-param
5 years ago
qndel
7563234ca9
fix saves ( #1621 )
5 years ago
Anders Jenbo
bb4e1960e7
🎨 modernize-use-nullptr
5 years ago
Anders Jenbo
c89bd9c001
🚨 Fix remaning warnings for clang and gcc
5 years ago
Gleb Mazovetskiy
95946e3a7c
🧹 Cleanup unused variables ( #1584 )
...
Fixes `unused-variable` and `unused-but-set-variable` compiler warnings.
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
8c821e98d3
🚚 Restructure files
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago
Anders Jenbo
6e1a106a38
🚚 Move header we implement into the project
5 years ago
Gleb Mazovetskiy
135f5e03c7
Only write to the file once when saving
5 years ago
Anders Jenbo
6eb609ac8b
🐛 Fix Hellfire save games corrupting game state in Windows
5 years ago
Anders Jenbo
a1dabf3aba
🐛 Fix Hellfire save games corrupting game state in Windows
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
642472cce8
pfile: extract pfile_get_password()
5 years ago
Anders Jenbo
ebc27082e7
🔥 remove unused parts of init_test_access
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
Anders Jenbo
bc3dc545da
🔥 Remove unused parts of game creation logic
5 years ago
Anders Jenbo
bba73ea20f
✨ Handle mixed item origins in multiplayer
5 years ago
Anders Jenbo
a2656637e4
🎨 Format source
5 years ago
Anders Jenbo
8196bdbd31
✨ Set the initial ready spell when creating a new hero
5 years ago
Anders Jenbo
1284333765
♻️ Use explicit types and remove globals from save file logic
5 years ago
Xadhoom
12c7b715cd
Add test for vanilla pfile_write_hero()
5 years ago
qndel
12dddc4e8f
✨ Preserve active spell and hotkeys across games
5 years ago
Anders Jenbo
c71efb5960
✅ Better assertions on item generation tests
...
[Diablo/Hellfire] Also clear PkItemStruct when calling PackItem() to
avoid garbage data ending up in the saves.
5 years ago
Anders Jenbo
8cebb84475
Remove unused function
5 years ago
Anders Jenbo
3593266ef7
Converte all Levels when cross loading saves
5 years ago
Anders Jenbo
4d47d513ce
Implement Hellfire multiplayer saves
5 years ago
pionere
97d53ced7e
get rid of a few warnings (strncpy)
5 years ago