Commit graph

185 commits

Author SHA1 Message Date
staphen
3e5e5b2696 Synchronize SFileCloseFile() access 2021-05-08 04:01:07 +02:00
Gleb Mazovetskiy
47c93c2f9c 🧹 Fix more -Wformat warnings 2021-05-01 22:19:27 +02:00
Anders Jenbo
38d7b1e3c8 🐛 Do not utilize translations till after it has been initialize 2021-05-01 19:27:55 +02:00
Anders Jenbo
3b04f67194 🔥 Remove a chunk of miniwin types 2021-04-29 23:04:56 +02:00
Jmgr
17c85814bf Fix a few remaining C-style format in Log calls 2021-04-26 23:11:15 +01:00
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
2021-04-25 22:26:37 +02:00
Anders Jenbo
b69d18f12d 🌐 Enable translation of all remaning strings 2021-04-25 21:32:41 +02:00
Jmgr
1b7e0d2cb3 Migrate existing log entries 2021-04-25 02:39:42 +02:00
Jmgr
af0ea6fdfc Set Application as the default log category
Remove example of logging a container
2021-04-25 02:39:42 +02:00
Jmgr
f3a401b5f6 Add the fmt library as a dependency and add some examples
Attempt at fixing missing functions on some platforms
2021-04-25 02:39:42 +02:00
Anders Jenbo
a32ac83090 🎨 cleanup trivial trype comparisons 2021-04-23 02:48:25 +02:00
Anders Jenbo
cc164985a3 🎨 Correct type checks in src sub-folder 2021-04-22 20:33:24 +02:00
Anders Jenbo
7c054bc005 🎨 push_back -> emplace_back 2021-04-22 00:16:54 +02:00
Anders Jenbo
f004c78824 🧹 performance-unnecessary-value-param 2021-04-22 00:08:19 +02:00
Anders Jenbo
b978d80119 🎨 llvm-include-order 2021-04-19 20:11:20 +02:00
Anders Jenbo
bb4e1960e7 🎨 modernize-use-nullptr 2021-04-19 16:02:05 +02:00
Gleb Mazovetskiy
91d7be9fa3 Fix init_test_access MPQ flag
`MPQ_FLAG_READ_ONLY` -> `MPQ_OPEN_READ_ONLY`.

The former is a flag that is set on an MPQ that was open in read-only
mode. To request opening in read-only mode, `MPQ_OPEN_READ_ONLY` should
be used instead.
2021-04-19 02:44:23 +02:00
Gleb Mazovetskiy
91f8267db9 🧹 SDL1.2: Remove unimplemented SDL_*Window backports
Guard around SDL version at call site instead.
2021-04-18 20:07:37 +02:00
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.
2021-04-16 15:50:13 +02:00
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/
2021-04-16 05:23:35 +02:00
Anders Jenbo
8c821e98d3 🚚 Restructure files 2021-04-16 03:57:22 +02:00
Anders Jenbo
997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
Anders Jenbo
6e1a106a38 🚚 Move header we implement into the project 2021-04-16 01:04:54 +02:00
Gleb Mazovetskiy
9382153228 init_test_access: Remove platform workarounds
No longer necessary as of https://github.com/diasurgical/devilutionX/pull/1314
2021-04-13 14:41:57 +02:00
Anders Jenbo
ebc27082e7 🔥 remove unused parts of init_test_access 2021-04-08 19:20:55 +02:00
Anders Jenbo
bfb3c11c2b 🎨 Change namespace to devilution 2021-04-06 15:21:25 +02:00
Anders Jenbo
630e507f63 🚚 Apply namespace 2021-04-06 15:21:25 +02:00
Anders Jenbo
bc3dc545da 🔥 Remove unused parts of game creation logic 2021-04-06 12:41:00 +02:00
Anders Jenbo
70776b87c8 🐛 Only save when performing a direct exit from game 2021-04-04 06:18:39 +02:00
Anders Jenbo
d526840fd5 🎨 Remove hardcoded version number 2021-04-01 04:43:16 +02:00
Anders Jenbo
7c2f96f668 🐛 Always save MP games when quitting 2021-04-01 04:04:07 +02:00
Anders Jenbo
a2656637e4 🎨 Format source 2021-03-31 00:52:47 +02:00
Gleb Mazovetskiy
41f7162e98 Hellfire: Better error if some MPQs are missing
Makes the issue more obvious.
2021-03-20 17:10:19 +01:00
Gleb Mazovetskiy
415bea0efe Look for all MPQs in PWD and global share
Follow-up to #1196
2021-03-18 10:05:48 +01:00
Gleb Mazovetskiy
c52505388b Install devilutionx.mpq on Linux
1. Installs devilutionx.mpq on Linux.
2. Falls back to finding it in the install location.
2021-03-15 10:49:22 +01:00
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.
2021-03-14 12:45:13 +01:00
Xadhoom
12c7b715cd Add test for vanilla pfile_write_hero() 2021-03-08 18:32:25 +01:00
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.
2021-03-01 12:08:37 +01:00
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
2021-03-01 11:52:26 +01:00
Gleb Mazovetskiy
588458d500 Remove gpBufStart
Was only set once and used in one place since #964
2021-03-01 02:20:21 +01:00
Anders Jenbo
b4e78c5e79 Remove some unused junk 2021-02-25 05:37:17 +01:00
Anders Jenbo
36a196389b Fix remaning basic compiler errors and warnings 2021-02-22 13:51:42 +01:00
Ivan Epifanov
1e53f32049 [vita] Initial port 2021-02-21 20:30:34 +01:00
pionere
f5c1079d6f eliminate unused code 2021-02-19 22:04:11 +01:00
Anders Jenbo
47004ddd35 Add widescreen menus 2021-01-18 20:56:08 +01:00
Anders Jenbo
9b1568cc08 Startup issues with shareware version 2021-01-17 16:04:13 +01:00
Anders Jenbo
d68c8c1cc8 Fix issues related to cross loading save games 2021-01-17 04:49:23 +01:00
Anders Jenbo
a2a3729491 Enable loading hellfire games form main menu 2021-01-02 07:40:05 +01:00
Anders Jenbo
d20eddf48e Unifcy a chunk of Hellfire's code pathts 2020-12-28 01:11:25 +01:00
Anders Jenbo
61b2d0de95 Merge branch 'master' of github.com:diasurgical/devilution 2020-12-16 02:24:39 +01:00