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
Anders Jenbo
f450d6a125
🚚 Move defines to there proper files
5 years ago
Yuri Pourre
ed1ddfdece
Exposes player id from multi_send_packet
5 years ago
Gleb Mazovetskiy
2f3e0cb18e
SDL1: Backport SDL2 logging
...
1. Backports SDL2 logging.
2. Adds a `--verbose` flag.
3. As an example, adds logging priority and category to a few log calls.
5 years ago
Anders Jenbo
84ad58b910
🐛 Set the default save game state
5 years ago
Anders Jenbo
a6292e23ff
🐛 Set the default save game state
5 years ago
Anders Jenbo
e7ae8ddd04
🚚 Move all enums to there respective headers
5 years ago
Anders Jenbo
9d037bafff
🚨 Fix remaning clang warnings
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
Anders Jenbo
4ee84aea1a
♻️ Change BOOLEAN to bool
...
fixup BOOLEAN
5 years ago
Geoffroy Warin
b54df1af38
add an ini option to configure gamepad deadzone
5 years ago
Anders Jenbo
b1ffdca0a3
♻️ make better use of enums
5 years ago
Gleb Mazovetskiy
da7567f06e
InitPlrGfx: Only alloc enough for the class
...
Previously, the allocation size was the maximum size over all the classes.
RAM usage per player:
* Before: 2.2 MiB (any class)
* After:
* Warrior: 2.0 MiB
* Rogue: 1.5 MiB
* Sorcerer: 1.6 MiB
* Monk: 1.7 MiB
We now also only allocate memory in multi-player as needed.
This means the game will only use as much RAM for player graphics
as there are players currently in the game.
Less RAM is used for each player because class is now taken into account.
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Anders Jenbo
630e507f63
🚚 Apply namespace
5 years ago
Gleb Mazovetskiy
87dcbcb6d7
Save 1.5 MiB RAM in-game by freeing more DiabloUI art
5 years ago
Anders Jenbo
bc3dc545da
🔥 Remove unused parts of game creation logic
5 years ago
Juliano Leal Goncalves
9021f8daa5
♻️ Pluralize global 'item' array variable
5 years ago
Gleb Mazovetskiy
9dd91d1c2c
Save 1.3 MiB RAM in-game by freeing menu resources
...
Running with a memory profiler revealed that we were keeping main menu
UI resources around while the game was running.
5 years ago
Gleb Mazovetskiy
0f3951744f
diablo.ini: Rename "Fast Walk" to "Run in Town" ( #1326 )
5 years ago
Anders Jenbo
7965c03606
🎨 Swap more BOOL for bool
5 years ago
Anders Jenbo
edffe223df
🐛 Only save options if they where also loaded
5 years ago
FluffyQuack
489a32d19a
🐮 Minor typo fixes for options struct
5 years ago
Anders Jenbo
ca2c2ba5e7
🚨 Handle a bunch of warnings from CLang
5 years ago
Anders Jenbo
cc4802eab5
🐛 Save options when shutting down the game
5 years ago
Anders Jenbo
699e451611
💄 Adjust visual style of new UI elements
5 years ago
Juliano Leal Goncalves
800dbce066
♻️ Move options-related structs to new 'options.h' file
5 years ago
Anders Jenbo
8425a23585
♻️ Only write ini file once
5 years ago
Anders Jenbo
fbd86cd3c5
🎨 Mark noreturn functions as such
5 years ago
Anders Jenbo
a69a76941e
♻️ Clean up InitCutscene
5 years ago
Trihedraf
508e4c635c
Add --ttf-dir to specify location of path to ttf ( #1253 )
5 years ago
Anders Jenbo
f2140688e7
Load and save all ini values the same way ( #1260 )
5 years ago
Anders Jenbo
c5b407f7a6
🐛 Fix mouse moving to 0x0 on window events
...
Fixes #1228
5 years ago
Anders Jenbo
72ebba0591
🚩 Implement -j debug command
5 years ago
Anders Jenbo
d9c1bc4579
♻️ Clean up debug options
5 years ago
Anders Jenbo
d2a10a717e
♻️ Renmae "Enable All Quests for Single Player" to !"Randomize Quests"
5 years ago
Anders Jenbo
9edea1b968
🔧 Make network port configurable
5 years ago
Juliano Leal Goncalves
1bf3fd6f35
🚩 Add ini toggle for displaying monster type. Disabled by default.
5 years ago
Gleb Mazovetskiy
1ab18d8b1b
Move plrctrls_every_frame(); to ProcessInput
5 years ago
Gleb Mazovetskiy
5977679e60
Handle D-Pad / Left stick in UI every frame
...
Previously this was handle as part of `game_logic`, reducing
responsiveness and making it impossible to run where `game_logic`
isn't running, e.g. stores.
5 years ago
Anders Jenbo
8e8e31627f
🐛 Only load hotkeys on new game
5 years ago
Anders Jenbo
12658a0b3d
🐛 Fix console output on Windows and SDL1 targets
...
Fixes #921
5 years ago
Trihedraf
a4c34112af
🚩 Add ini toggle for FPS Limit. Enabled by default. ( #1165 )
5 years ago
Trihedraf
049b9325c4
Add ini toggle for All Quests for Single Player. Disabled by default.
5 years ago