Commit Graph
272 Commits
Author SHA1 Message Date
Anders Jenbo 13c5c09990 Clean up Light related naming
A few are left unchanged as they will be removed in a later commit
2023-04-21 21:25:19 +02:00
obligaron abcea9853c Update timedemo test to include improved lightning 2023-04-20 21:48:51 +02:00
Anders Jenbo ec9d1b5550 Rename _oLight to applyLighting 2023-04-19 19:41:10 +02:00
DakkJaniels 24bb409086 Remove extra entry in experience level table and cap experience at level 50 requirement (#5782) 2023-04-18 03:10:14 +02:00
obligaron b87711bc08 Reintroduce Player::spellFrom to seperate teleport cursor from queued spell 2023-04-17 03:22:50 +02:00
obligaron eeca953615 Introduce UpdateHellfireFlag to set missing CF_HELLFIRE flag 2023-04-13 00:07:00 +02:00
obligaron 0426908988 Introduce GetTranslatedItemName/GetTranslatedItemNameMagical 2023-04-13 00:07:00 +02:00
obligaron 6f9453c00e Introduce GenerateStaffName/GenerateStaffNameMagical 2023-04-13 00:07:00 +02:00
Gleb Mazovetskiy e35595a1eb StrCat improvements
1. Use `fmt::format_int` directly instead of parsing a format string.
2. Use `AppendStrView`.
3. Define the varargs versions using fold expressions when available.
4. Add tests.
2023-03-13 10:20:38 +00:00
obligaron 4cdd7ff2d9 Replace ReturnLevel/LevelTyp/LvlPosition 2023-03-12 19:30:57 +01:00
Gleb Mazovetskiy f2cb9f0fa0 file_util: Implement RecursivelyCreateDir
With this, we no longer require `std::filesystem` support to create the
save file directory when it does not exist.

Note that by default the save file directory exists because it is
created by SDL, so this is mostly useful on platforms that override the
save directory or use `UNPACKED_SAVES`.
2023-03-11 17:47:29 +00:00
obligaron adeeae2c52 Add option to enable singleplayer quests in multiplayer 2023-02-27 05:00:07 +01:00
obligaron 4fde59a494 drlg_test: Add TestInitGame helper 2023-02-27 05:00:07 +01:00
Gleb Mazovetskiy 1a1a282d9a Use C FILE instead of C++ streams throughout
Reduces binary size by ~2 KiB and may improve compatibility with oddball
systems (e.g. PS2).
2023-02-15 18:15:07 +00:00
KPhoenix d813f13700 enum spell_id -> enum class SpellID 2023-02-05 10:24:58 +00:00
ikonomov d05992da75 Remove "Zen" hit recovery (#5724)
The description of Harmony says "Fastest", clearly implying that this is the fastest recovery bonus that is attainable for a given character and also an indication that the bonus is not cumulative with other items.
2023-01-30 19:15:47 +01:00
Eric Robinson ef3a57b7d9 enum spell_type -> enum class SpellType (#5674) 2023-01-28 22:25:37 +01:00
ikonomov 7e11d63004 Update CMakeLists.txt 2023-01-26 21:48:49 +01:00
KPhoenix 8db521727d enum missile_id -> enum class MissileID
Changes `enum missile_id` to `enum class MissileID`
2023-01-18 17:17:25 +00:00
staphen 0d43f468e5 Improve missile collision interpolation logic 2023-01-12 15:32:08 +01:00
Gleb Mazovetskiy 5bf9dfd7ee Demo mode: Force resolution to that of the demo 2023-01-12 03:38:29 +00:00
Gleb Mazovetskiy 4f9e9e04b1 Fix ConsumeScroll
Fixes #5617
2022-12-18 20:34:13 +00:00
obligaron 4cec35ea77 Update timedemo test 2022-12-15 05:37:33 +01:00
Gleb Mazovetskiy eb45753c4d Fix writehero_test on big-endian
`PlayerPack` struct should be little-endian even on big-endian systems.
2022-12-09 11:12:25 +00:00
Gleb Mazovetskiy 9a1587060d Use real CalculateSoundPosition with NOSOUND
Fixes big-endian tests, which currently build with `-DNOSOUND`
to reduce build time.
2022-12-09 11:09:05 +00:00
Gleb Mazovetskiy cea6a01de7 More item packing fix on big-endian
Refs #5573
2022-12-08 12:08:36 +01:00
Anders Jenbo d67dec05e1 Update timedemo test 2022-12-08 05:41:44 +01:00
Gleb Mazovetskiy 44c3bc4038 pack_test: Make fixtures little-endian on BE
Packed items are supposed to be little-endian even on big-endian
systems. Makes all test fixtures little-endian.

Refs #5573
2022-12-07 10:19:02 +01:00
Gleb Mazovetskiy 25a2b59f89 drlg_test: fix LoadExpectedLevelData on BE 2022-12-06 23:32:32 +01:00
Gleb Mazovetskiy 38e37e0d53 Fix warnings/errors with -funsigned-char 2022-12-05 07:52:13 +01:00
obligaron eca1a68bec AnimationInfo: Use fixed point math for fractions 2022-11-06 12:31:40 +00:00
Gleb Mazovetskiy 759ca7f055 WorldTileRectangle/Size
Adds a custom sized type for the world tile rectagle.

This allows us to better express intent.
It also allows us to make certain globals smaller, e.g. `THEME_LOC`.
2022-10-16 03:53:26 +01:00
Gleb Mazovetskiy 7513b7ca8d test/drlg_common_test.cpp: Fix line endings 2022-10-16 03:53:26 +01:00
obligaron f54a8f27ca Update timedemo 2022-10-11 22:24:48 +02:00
Gleb Mazovetskiy 41f43ea3f5 Support unpacked MPQs from devilutionx-mpq-tools
https://github.com/diasurgical/devilutionx-mpq-tools produces an unpacked MPQ
with all the graphics converted to CLX and the unused files removed.
This is primarily useful on RAM-constrained platforms, such as PS2,
because it eliminates the MPQ overhead.

Adds a build option to load from such unpacked directories instead of the MPQ.

These directories are searched for in the same locations
where the MPQs would be searched for otherwise.

Example directory layout:

* /usr/local/share/diasurgical/devilutionx/diabdat/ -- unpacked and converted diabdat.mpq
* /usr/local/share/diasurgical/devilutionx/hellfire/ -- unpacked and converted hellfire MPQs (all of them merged into 1 directory)
* /usr/local/share/diasurgical/devilutionx/fonts/ -- unpacked fonts.mpq
* /usr/local/share/diasurgical/devilutionx/pl/ -- unpacked pl.mpq

These directory structure is produced by calling `unpack_and_minify_mpq`
2022-10-11 18:00:57 +01:00
obligaron 69338e1733 Fix poison water entrace position 2022-10-02 19:34:34 +02:00
Anders Jenbo 715926e751 Fix single room cathedral with quest piece (#5321) 2022-10-02 13:00:49 +00:00
staphen 8b6db3a678 Get rid of panelstr, pnumlines, and ClearPanel() 2022-10-02 08:51:24 +02:00
obligaron 7ad5a45905 Fix warp position offset and adjust some spawn positions (#5364) 2022-09-25 02:20:35 +02:00
ephphatha 08acd4aac0 Tidy up T_FitObj5 2022-09-15 23:37:42 +02:00
staphen ffdd1c61b5 Set up loopback network provider for GoldAutoPlace test 2022-09-08 06:11:36 +02:00
obligaron b3aa08589b Don't use MyPlayer in UnPackItem and dependend methods 2022-08-26 18:18:40 +02:00
Gleb Mazovetskiy 188dc79f6e Make Players a vector 2022-08-26 13:22:04 +09:00
Gleb Mazovetskiy 6327e713e0 Lowercase all file paths
We want to be able to use unpacked MPQs on low-end platforms
(PS2/rg99/etc).

This is tricky on case-sensitive filesystems. Avoids case issues by
lowercasing all paths in the code (then we'll just need lowercased
listfiles).
2022-08-20 23:49:23 +01:00
Stephen C. Wills a06dd25d17 Synchronize player inventories (#5217)
* Synchronize item placement in player's backpack

* Synchronize item remove from player's backpack

* Synchronize item placement and removal from player's belt

* Set up loopback network provider for failing tests
2022-08-20 16:30:40 +00:00
Gleb Mazovetskiy 3b357f3936 CMake: An option to disable demomode support
Useful for targets with limited RAM.
Reduces RG99 binary size by 8 KiB.
2022-08-10 21:24:45 +02:00
obligaron 2493f06116 ActorPosition: Remove offset, offset2 and velocity 2022-08-03 21:25:21 +02:00
obligaron 385627e95b Copy save file when creating reference or comparison save game 2022-08-03 09:06:56 +02:00
Gleb Mazovetskiy ba34bafb3f Use SDL events directly
Removes redundant miniwin events and queue, using SDL events directly instead.

Demo migrated using this script: https://gist.github.com/glebm/8a73b04f695de96f344cc2e35151e03e
2022-08-03 03:50:19 +02:00
Vladimir Olteanu bd689e9359 Fix time demo 2022-08-03 02:36:01 +02:00