ephphatha
28fd553266
Use HeroClass in UI functions
3 years ago
Gleb Mazovetskiy
74755c8be7
Remove utils/stdcompat/cstddef.hpp
3 years ago
Gleb Mazovetskiy
4fa3732526
Add missing <cstdint> includes
...
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
3 years ago
Gleb Mazovetskiy
6d274c9547
`UNPACKED_SAVES`: Saves without MPQs
...
Reduces rg99 binary size by ~70 KiB.
3 years ago
Gleb Mazovetskiy
4cf0053ece
Set underlying type for all the enums
...
Reduces rg99 binary size by 3 KiB.
4 years ago
Gleb Mazovetskiy
3b357f3936
CMake: An option to disable demomode support
...
Useful for targets with limited RAM.
Reduces RG99 binary size by 8 KiB.
4 years ago
obligaron
2c7e886c85
Add detail log info to CompareSaves
4 years ago
Gleb Mazovetskiy
7c0b72abc0
Improve demo test error message
...
Example:
```
file "game" is different at byte 54251:
Expected: ... 00 00 00 00 00 00 00 00 30 00 00 00 50 00 00 00 ...
Actual: ... FF FF FF FF 00 00 00 00 30 00 00 00 50 00 00 00 ...
```
4 years ago
obligaron
7afe7d2a70
Save Methods in loadsave gets MpqWriter passed
4 years ago
obligaron
1608219b39
Timedemo: Create reference save game and allow comparing of reference save game with actual timedemo save game
4 years ago
Anders Jenbo
a48f89007d
Implement stash
4 years ago
Gleb Mazovetskiy
7e1fea6f76
clang-format all files in {Source,test}/
...
Also includes a few manual tweaks to comments and newlines for better results.
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
Gleb Mazovetskiy
720d210d95
utils/mpq* -> mpq/*
4 years ago
Gleb Mazovetskiy
23406b6fc5
Replace mpqapi.h with the MpqWriter class
...
This is a cleanup, heading in the direction of allowing us to reuse
some of the code between reading and writing MPQs.
4 years ago
Juliano Leal Goncalves
bbf529c65a
🚚 Rename 'PlayerStruct' to 'Player'
5 years ago
Anders Jenbo
4044fadeb5
Clean up some players references
5 years ago
qndel
30de22f026
fix displayed save number
5 years ago
obligaron
f5b437dd9c
Use save number to load/save games (instead of hero name)
5 years ago
Anders Jenbo
ecea12fc15
Clang-tidy: ParameterCase
5 years ago
Anders Jenbo
fc353fc799
Clang-tidy: FunctionCase
5 years ago
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