856 Commits
Author SHA1 Message Date
staphen 9af5bf84ba Arkaine's Valor: Don't check player inventory when processing CMD_OPERATEOBJ 2023-03-05 17:55:26 +01:00
obligaron 55bf5348c4 Multiplayer: Prevent trapped doors to fire twice 2023-02-27 05:03:57 +01:00
obligaron cd89372512 Introduce Object::name() 2023-02-26 04:40:31 +01:00
staphen f6fd519561 Remove references to Bard-specific speech IDs 2023-02-25 07:54:11 +01:00
obligaronandqndel 3a31539c7e Multiplayer: Enable Warlord of Blood Quest
Update Source/quests.h

Co-authored-by: qndel <[email protected]>
2023-02-20 21:30:50 +01:00
Gleb Mazovetskiy e67ea9b006 Make MissilesData const
Instead of temporarily modifying `MissileData` around certain calls,
pass the arguments from the outside.
2023-02-15 10:47:08 +00:00
obligaron 023134ef91 Multiplayer: Enable The Chamber of Bone Quest 2023-02-11 18:22:05 +01:00
obligaron 2d4e84c561 Multiplayer: Enable Black Mushroom Quest 2023-02-07 08:02:38 +01:00
KPhoenix d813f13700 enum spell_id -> enum class SpellID 2023-02-05 10:24:58 +00:00
Gleb Mazovetskiy 7c53a5d5b3 Reduce ObjectData size: 24 bytes -> 11 bytes
1. Reduces sizes of integral fields.
2. Merges boolean flags into a single field.
2023-01-25 09:32:50 +00:00
c99f7cf644 Floating numbers (#5639)
Co-authored-by: qndel <[email protected]>
Co-authored-by: Stephen C. Wills <[email protected]>
2023-01-22 07:20:10 +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
obligaron a935066180 Multiplayer: Enable Halls of the Blind Quest 2022-12-28 10:05:45 +01:00
obligaron 600cb656fb Multiplayer: Enable Arkaine's Valor Quest 2022-11-27 18:27:06 +01:00
obligaron f34cfeb565 Sync sign chest 2022-11-22 15:29:04 +01:00
obligaron 610e80f098 Sync break crux 2022-11-14 06:58:56 +01:00
obligaron 0711e6af4d Sync SpawnQuestItem (multiplayer quest items) 2022-11-12 19:27:36 +01:00
obligaron 5fe20e3d32 Make Lazarus quest map multiplayer compatible 2022-11-11 03:27:37 +01:00
Gleb Mazovetskiy 680ab5ec40 Overhaul backbuffer state handling
When rendering directly to the output buffer, we need to maintain the
state of what has been drawn and what needs redrawing per-buffer.

We previously tried to do it implicitly by checking `SDL_DOUBLEBUF` and
other flags. The previous implementation was broken in several
ways, resulting in rendering issues on devices that support 8-bit output
directly.

Changes this mechanism to explicitly maintain buffer state per output
buffer. The new mechanism doesn't require knowledge of the number of
buffers, and thus also works correctly with triple-buffering.

Fixes #5447
2022-11-01 02:43:24 +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 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
ephphatha ea3ecbd619 Use _item_indexes type where appropriate 2022-10-11 18:51:13 +02:00
ephphatha a5b5441794 Restore item seed when converting potions to rejuvenation potions 2022-10-11 11:39:47 +02: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
obligaron 37de526cb8 DeltaSyncOpObject: Add handling for shrine 2022-08-10 21:23:26 +02:00
ephphatha b4839dadcc Dedupe operate object network commands 2022-08-07 02:46:24 +02:00
ephphatha 8132d6a033 Take object by reference in OperateObject 2022-08-07 02:46:24 +02:00
Anders Jenbo 52780a3712 Do not count closed doors as blocked 2022-08-05 19:48:30 +02:00
qndel 3736b5c8fd fix interacting with lazarus books while not on circles 2022-08-04 14:01:24 +02:00
Anders Jenbo 2d9531f692 Remove redundant check for distance when operating doors
IsPlayerAdjacentToObject() is checked before calling OperateObject().
Previously teleFlag would ignore sendmsg which was likely a bug causing
the event to fire multiple times.
2022-08-04 01:37:03 +02:00
Anders Jenbo acab00652e Unify operate door logic 2022-08-04 01:37:03 +02:00
Anders Jenbo 3589744ed1 Fix crypt doors looking wrong after closing them 2022-08-04 01:37:03 +02:00
Anders Jenbo 37ad8a438a Remove some redundant door logic 2022-08-04 01:37:03 +02:00
Anders Jenbo 8dd8203a39 Add missing check to IsDoorClear 2022-08-04 01:37:03 +02:00
Anders Jenbo e1417be472 Reuse code for opening and closing doors 2022-08-04 01:37:03 +02:00
Anders Jenbo 6fdd756023 [hellfire] Fix blocked crypt door sound
Clean up blocked check in OperateL??Door
2022-08-04 01:37:03 +02:00
Anders Jenbo 52d9b69624 Reuse SetDoorStateClosed in AddDoor 2022-08-04 01:37:03 +02:00
Anders Jenbo e9702b4415 Move and rename door state functions 2022-08-04 01:37:03 +02:00
staphen 748bb1f84d Split delta trap operation from realtime trap operation 2022-08-03 07:39:25 +02:00
Gleb Mazovetskiy 961866e1c4 CLX: A new graphics format
The format is almost identical to CL2, except it uses the frame header
to store frame width and height instead of 5 32-line offsets.

This means we always have access to frame dimensions, so we can use it
as an on-disk format for our graphics as well.

Additionally, we may be able to optimize the rendering even more
in the future now that we have guaranteed knowledge of frame dimensions.
2022-08-03 02:38:55 +02:00
Anders Jenbo da5f392cfa Merge OpenDoor and DeltaSyncDoor 2022-08-01 12:09:26 +02:00
Anders Jenbo b9aa2959a6 Split deleta sync from operate door 2022-08-01 12:09:26 +02:00
Anders Jenbo 5f3acebe5e Merge operate door functions 2022-08-01 12:09:26 +02:00
Anders Jenbo 069a33749c Merge sync door functions 2022-07-31 11:01:03 +02:00
Anders Jenbo 70683bf9de Add door state enum 2022-07-31 11:01:03 +02:00
Anders Jenbo 3250472789 Clean up player references 2022-07-31 06:19:20 +02:00
Anders Jenbo e83c55d444 Clean up object references 2022-07-31 06:19:20 +02:00
ephphatha b234565f65 Inline functions which only set Object::_oRndSeed 2022-07-30 14:43:03 +02:00
Cesar Canassa f069cdc771 ♻️ Pass objects by reference (#5148) 2022-07-30 13:46:07 +02:00
ephphatha 0ce76a3f13 Add Object lookup method to mimic map::at() 2022-07-28 12:47:13 +02:00