Anders Jenbo
a095bc0bf7
♻️ Migrate more code away from miniwin
5 years ago
Vladimir Olteanu
c319344c50
Load/save cleanup ( #1766 )
5 years ago
Anders Jenbo
8fa0612433
🐛 Fix loading chosen hero
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
Anders Jenbo
c89bd9c001
🚨 Fix remaning warnings for clang and gcc
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
6e1a106a38
🚚 Move header we implement into the project
5 years ago
Anders Jenbo
f450d6a125
🚚 Move defines to there proper files
5 years ago
Gleb Mazovetskiy
135f5e03c7
Only write to the file once when saving
5 years ago
Anders Jenbo
e7ae8ddd04
🚚 Move all enums to there respective headers
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
433edc63ea
♻️ Consistently use pragma once to guard the headers
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
Juliano Leal Goncalves
19f46b9f6c
🚚 Move 'PlayerStruct' to 'player.h'
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
3593266ef7
Converte all Levels when cross loading saves
5 years ago
pionere
f5c1079d6f
eliminate unused code
5 years ago
Anders Jenbo
4ffbb32952
[hellfire] Allow continuing Diablo saves in Hellfire and vice versa
5 years ago
Anders Jenbo
e609e170d0
Merge a large chunk of Hellfire the code paths
5 years ago
Anders Jenbo
f884d8b06a
Fix more compiler warnings
5 years ago
Anders Jenbo
bc019b6f2a
Fix LLVM builds
5 years ago
Anders Jenbo
3b8b5f9007
Reorder pfile.cpp
5 years ago
Gleb Mazovetskiy
a091a56e8e
Remove MAX_PATH restriction ( #898 )
...
Do not limit filesystem paths to 259 chars for MPQs, save files, and diablo.ini.
The MAX_PATH constant remains but now only limits path lengths within the MPQs.
5 years ago
Anders Jenbo
1ba96a6777
Add doxygen description to remaining engine files
6 years ago
Joel Falcou
c4223d4c29
Per file basis use of extern C
6 years ago
Joel Falcou
64d26a7934
Sanitize use of namespace
...
Wrap individual headers in dvl namespace to prevent
including standard header in another namespace.
6 years ago
Anders Jenbo
40cea40aa4
Remove windows call types collisions
6 years ago
Anders Jenbo
5ab9f4609a
Clean up signedness
7 years ago
Anders Jenbo
e2bff090d6
Come up with names for all remaning arguments
7 years ago
Anders Jenbo
aa50489569
Clean up generated comments
7 years ago
Anders Jenbo
32a51d17ca
Align function signatures with PSX symbols
...
Using
https://github.com/diasurgical/scalpel/tree/master/psx/_dump_/3/_dump_c_src_/diabpsx/source
as a reference
7 years ago
Anders Jenbo
8eecc53b41
Clean up pfile.cpp
7 years ago
galaxyhaxz
4e01e03711
Cleanup default calling conventions
7 years ago
Anders Jenbo
1e4e826a36
Remove delta to devilution
7 years ago
Anders Jenbo
629dfa2083
Compile as c ( #522 )
...
* Reorder lib
This is the orhter that they appear in the exe imports
* Make includes C compatible
cursor.h: SetCursor conflicts with existing function
engine.h: CelDecDatLightEntry and Cel2DecDatLightEntry use by reference
*&
objects.h: DeleteObject conflicts with existing function
* Start compiling select files as C
* Clean up
pfile still emits warnings when parsed as C:
err:msvcrt:demangle_datatype Unknown type @
err:msvcrt:demangle_datatype Unknown type @
7 years ago
Anders Jenbo
c46d92be7a
Format save game related files
8 years ago
Andrew Dunstan
22dc793b7d
Clean remaining pfile.cpp functions
...
full file is binary exact except for pfile_create_player_description (minor diff)
8 years ago
squidcc
b9eca92474
pfile cleaning #2 ( #373 )
...
* clean GetSaveDirectory and pfile_read_hero
clean pfile_open_save_archive
clean pfile_archive_contains_game
clean pfile_get_player_class
clean pfile_get_file_name
clean GetTempSaveNames
clean GetPermSaveNames
clean pfile_update
clean pfile_init_save_directory
clean pfile_write_hero
clean pfile_open_archive
clean pfile_flush_W
* add stub for mpqapi_update_multi_creation_time
8 years ago
squidcc
df89dd7333
more pfile cleaning ( #356 )
...
* clean pfile_check_available_space
clean pfile_get_save_num_from_name
clean pfile_encode_hero
clean pfile_get_save_path
clean pfile_flush
clean game_2_ui_class and game_2_ui_player
* type fix-ups
8 years ago
aperturesecurity
42ce77ce05
Rebirth and Nuke
8 years ago
squidcc
e2adda15ff
fix function declarations (and some cosmetic changes) in preparation for pfile cleanup ( #351 )
8 years ago
nomdenom
1c279c3f89
Fix declaration of gbValidSaveFile (BOOL) ( #331 )
8 years ago
galaxyhaxz
1224d01161
Sync with master ( #301 )
8 years ago
galaxyhaxz
6769eb8baf
Implement hero selection in DiabloUI (P1) ( #300 )
8 years ago
galaxyhaxz
38b498ac4b
Add 'const' to data to match original binary ( #200 )
8 years ago