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
Gleb Mazovetskiy
d4ca1e30ce
Log MPQs on load (with --verbose)
...
The log looks like this:
VERBOSE: MPQ search paths
1. '/home/gleb/devilutionX/build/'
2. '/home/gleb/.local/share/diasurgical/devilution/'
3. '/usr/share/diasurgical/devilutionx/'
4. '/usr/local/share/diasurgical/devilutionx/'
5. ''
VERBOSE: Missing: DIABDAT.MPQ
VERBOSE: Found: diabdat.mpq in /home/gleb/.local/share/diasurgical/devilution/
VERBOSE: Missing: patch_rt.mpq
VERBOSE: Missing: patch_sh.mpq
VERBOSE: Found: hellfire.mpq in /home/gleb/.local/share/diasurgical/devilution/
VERBOSE: Found: hfmonk.mpq in /home/gleb/.local/share/diasurgical/devilution/
VERBOSE: Missing: hfbard.mpq
VERBOSE: Missing: hfbarb.mpq
VERBOSE: Found: hfmusic.mpq in /home/gleb/.local/share/diasurgical/devilution/
VERBOSE: Found: hfvoice.mpq in /home/gleb/.local/share/diasurgical/devilution/
VERBOSE: Missing: hfopt1.mpq
VERBOSE: Missing: hfopt2.mpq
VERBOSE: Found: devilutionx.mpq in /home/gleb/devilutionX/build/
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
9382153228
init_test_access: Remove platform workarounds
...
No longer necessary as of https://github.com/diasurgical/devilutionX/pull/1314
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
bc3dc545da
🔥 Remove unused parts of game creation logic
5 years ago
Anders Jenbo
70776b87c8
🐛 Only save when performing a direct exit from game
5 years ago
Anders Jenbo
d526840fd5
🎨 Remove hardcoded version number
5 years ago
Anders Jenbo
7c2f96f668
🐛 Always save MP games when quitting
5 years ago
Anders Jenbo
a2656637e4
🎨 Format source
5 years ago
Gleb Mazovetskiy
41f7162e98
Hellfire: Better error if some MPQs are missing
...
Makes the issue more obvious.
5 years ago
Gleb Mazovetskiy
415bea0efe
Look for all MPQs in PWD and global share
...
Follow-up to #1196
5 years ago
Gleb Mazovetskiy
c52505388b
Install devilutionx.mpq on Linux
...
1. Installs devilutionx.mpq on Linux.
2. Falls back to finding it in the install location.
5 years ago
Gleb Mazovetskiy
e4212a0de9
Try uppercase DIABDAT.MPQ ( #1184 )
...
It's uppercase in GOG and on the retail CD.
Other MPQs are not known to be uppercase.
5 years ago
Xadhoom
12c7b715cd
Add test for vanilla pfile_write_hero()
5 years ago
Gleb Mazovetskiy
21bb021641
Clean up gpBufEnd initialization
...
Initialization of `gpBufEnd` was done in a convoluted way
that only happened to work.
Cleans up initialization and moves it to dx.cpp.
5 years ago
Anders Jenbo
39999791b3
Revamp ini options and sync in multiplayer
...
[NetMsg]
F12=Now you DIE!
F11=Here's something for you.
F10=Follow me.
F9=I need help! Come Here!
[Game]
Speed=50
Fast Walk=1
Grab Input=0
Theo Quest=0
Cow Quest=0
[Audio]
Sound Volume=0
Music Volume=0
Walking Sound=1
[Graphics]
Fullscreen=1
Fit to Screen=1
Scaling Quality=2
Integer Scaling=0
Vertical Sync=1
Blended Transparency=1
Gamma Correction=100
Color Cycling=1
[Diablo]
Intro=0
[Hellfire]
Intro=0
SItem=
[Phone Book]
Entry1=127.0.0.1
[Network]
Bind Address=0.0.0.0
5 years ago
Gleb Mazovetskiy
588458d500
Remove gpBufStart
...
Was only set once and used in one place since #964
5 years ago
Anders Jenbo
b4e78c5e79
Remove some unused junk
5 years ago
Anders Jenbo
36a196389b
Fix remaning basic compiler errors and warnings
5 years ago
Ivan Epifanov
1e53f32049
[vita] Initial port
5 years ago
pionere
f5c1079d6f
eliminate unused code
5 years ago
Anders Jenbo
47004ddd35
Add widescreen menus
5 years ago
Anders Jenbo
9b1568cc08
Startup issues with shareware version
5 years ago
Anders Jenbo
d68c8c1cc8
Fix issues related to cross loading save games
5 years ago
Anders Jenbo
a2a3729491
Enable loading hellfire games form main menu
5 years ago
Anders Jenbo
d20eddf48e
Unifcy a chunk of Hellfire's code pathts
5 years ago
Anders Jenbo
1f1e689db0
Reorder init.cpp
5 years ago
Anders Jenbo
e40653c1e0
fixup! Clean up unused return type
5 years ago
Anders Jenbo
b7ca9a812a
Clean up unused return type
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
Gleb Mazovetskiy
ec329e645c
Fix all "no-write-strings" warnings
5 years ago
Anders Jenbo
46e3216aac
Remove unused code
5 years ago
Anders Jenbo
e073422ce7
Unify executable for Spawn and Retail
...
The game will now autodetect if it should run in shareware mode or full
retail based on the found mpq file. Additionally it can beforced in the
shareware mode with --spawn even if the retail data is found.
This simplifies a lot of the spagetty code and lets us better refactor,
also worth noteing is that we won't have to setup a secound set of build
tests.
5 years ago
Anders Jenbo
c53ca1a62a
Adjust resolution to monitor default on startup
6 years ago
Anders Jenbo
31ac716c3d
99 lines of documentation ( #2058 )
6 years ago
Anders Jenbo
c1b4d3d8b5
Copy documentation from sanctuary/notes
6 years ago
Anders Jenbo
dc8be6c0ab
C++03 compatibility ( #736 )
...
* Use C++03 compatible constructors
* Remove conflicting definitions
6 years ago
Anders Jenbo
4b46361442
Remove some unused variables
6 years ago
Anders Jenbo
350646fe95
Correct signatures
6 years ago
Anders Jenbo
d008af43b0
Semantic code style cleanups
6 years ago
Manuel Alfayate Corchete
03662be548
Remove atexit() calls and implement a diablo_deinit() function instea… ( #694 )
...
* Remove atexit() calls and implement a diablo_deinit() function instead that cleans up every subsystem if it has been init before.
6 years ago
Anders Jenbo
c0e511265d
Fix Clang and MSVC builds
6 years ago
danie1kr
30576f0271
fix gpBufEnd problem (first cutscene not rendered) on 32bit architectures
...
Fixes #573
6 years ago
Anders Jenbo
0383f9abcd
Add documentation to more files
6 years ago
Anders Jenbo
20621a0642
add all.h and use in place of diablo.h ( #2005 )
...
Now diablo.h is treated in the same way as all other header files of
Source, as it only contains the declarations of global variables and
functions of diablo.cpp.
Besides consistency, this also enables mods to include diablo.h just
like any other header file without having to include every header file
(and without having to include C++ specific aspects of the now all.h).
6 years ago