Commit Graph
662 Commits
Author SHA1 Message Date
Gleb Mazovetskiy 8c1a847f41 Remove utils/stdcompat/string_view.hpp 2023-08-14 09:59:14 +01:00
Gleb Mazovetskiy c19bfe87fa Remove utils/stdcompat/algorithm.hpp 2023-08-14 01:54:29 +01:00
Gleb Mazovetskiy 14540164a7 Remove utils/stdcompat/optional.hpp 2023-08-14 01:54:29 +01:00
Gleb Mazovetskiy 62d067b653 Remove utils/stdcompat/abs.hpp 2023-08-14 01:54:29 +01:00
staphen a090ab7d5c Apply position-based quest completion logic to Single Player 2023-07-16 00:02:06 +02:00
staphen 9381251b9d Fix net validation of durability for items without durability 2023-06-18 06:26:22 +02:00
Anders Jenbo 89a677d0cb Validate item modifier ranges 2023-06-16 15:59:47 +02:00
Anders Jenbo 23e479e9aa Remove unused item properties from network 2023-06-16 15:59:47 +02:00
staphen 956574bfa2 Also disallow boosted stats for ground items 2023-06-16 13:50:43 +02:00
Anders Jenbo 01a7966f1d Empty cursor when closing inventory
Fixes #4205
2023-06-03 20:25:50 +02:00
obligaron c8f1804d04 Spawn Optic Amulet and Arkaine's Valor always at the same tile (#6167)
* Spawn Optic Amulet and Arkaine's Valor always at the same tile

* Multiplayer: To complete Halls of Blind and Arkaine's Valor also check drop position, because quest rewards items can be randomized
2023-06-02 20:12:39 +02:00
qndel ddd0f1b051 dont always force staff recharge to change spell 2023-05-28 16:09:01 +02:00
obligaron 31fe55a161 Prevent hellfire quests from disapearing from quest log 2023-05-28 01:51:56 +02:00
ephphatha 9987bb6be2 Avoid unnecessary item initialisation and copy 2023-05-12 06:27:12 +02:00
ephphatha 6b21728440 Inline single use function InvPutItem 2023-05-12 06:27:12 +02:00
ephphatha 4f3c70aa95 Move PlaceItemInWorld to items.h/cpp
Seems like a more appropriate home
2023-05-12 06:27:12 +02:00
ephphatha 06f6ff78f2 Extract common logic for a player dropping an item
The other class of use appears to be items spawned from NPCs or being dropped on death which shouldn't consider the CornerStone. Need to sort those later
2023-05-12 06:27:12 +02:00
ephphatha eac22b935d Make functions that create and place an item in the world more similar 2023-05-12 06:27:12 +02:00
Gleb Mazovetskiy 4fa3732526 Add missing <cstdint> includes
Done with the following script:

```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
  v = File.read(path)
  next if !v.include?("uint32_t") || v.include?("cstdint")

  lines = v.lines
  line_num = if lines[2].start_with?(" *")
    lines.index { |l| l.start_with?(" */") } + 3
  else
    3
  end

  lines.insert(line_num, "#include <cstdint>\n")

  File.write(path, lines.join(""))
end
```

then fixed-up manually
2023-05-10 13:50:12 +01:00
ephphatha 03e35988f1 Dedupe OnRespawnItem/OnSpawnItem
Both methods were exactly the same apart from the use of temporaries for swapped message params.
2023-05-07 13:33:40 +02:00
ephphatha 3a7ae732cd use unsigned types for item seeds 2023-05-06 18:02:54 +02:00
obligaron b87711bc08 Reintroduce Player::spellFrom to seperate teleport cursor from queued spell 2023-04-17 03:22:50 +02:00
qndel ce2ce86070 inspect players command 2023-04-14 02:40:17 +02:00
obligaron c4388b0d41 Remove unused pnum from UseInvItem 2023-04-14 02:40:17 +02:00
obligaron 1522dc7031 Multiplayer: Add arena potions 2023-04-13 21:20:53 +02:00
obligaron 590c990c80 Introduce Item::getName 2023-04-13 00:07:00 +02:00
ephphatha 94c646ef8f Use rectangles for inventory/belt hit areas 2023-03-25 14:22:57 +01:00
obligaron 6e364f2167 Telekenisis respects Disable Crippling Shrines Setting 2023-03-02 10:01:05 +01:00
obligaron 44de539afb Introduce CronerStoneStruct::isAvailable() 2023-03-02 01:23:59 +01:00
staphen 5e832e75d9 Fix alignment for 2x2 armor sprite in the chest slot 2023-02-18 21:15:27 +01:00
obligaron 715e689ecb Introduce Item::isUsable() 2023-02-10 22:28:52 +01:00
Gleb Mazovetskiy ebcd6b222d Optimize SpellData size: 40 bytes -> 24 2023-02-10 10:51:06 +00:00
KPhoenix a1fbf5253f enum talk_id -> enum class TalkID 2023-02-09 13:04:01 +01:00
obligaron 2d4e84c561 Multiplayer: Enable Black Mushroom Quest 2023-02-07 08:02:38 +01:00
Gleb Mazovetskiy b61dac853b Add GetSpellData(SpellID) 2023-02-05 12:12:48 +00:00
KPhoenix d813f13700 enum spell_id -> enum class SpellID 2023-02-05 10:24:58 +00:00
Gleb Mazovetskiy 1788d2f8ec Remove miniwin
Event handling code moved to `engine/events.{hpp,cpp}`.
2023-02-01 16:06:57 +00:00
obligaron a935066180 Multiplayer: Enable Halls of the Blind Quest 2022-12-28 10:05:45 +01:00
Gleb Mazovetskiy 4f9e9e04b1 Fix ConsumeScroll
Fixes #5617
2022-12-18 20:34:13 +00:00
obligaron 600cb656fb Multiplayer: Enable Arkaine's Valor Quest 2022-11-27 18:27:06 +01:00
obligaron a45ba2895e Multiplayer: Enable Anvil of Fury Quest 2022-11-27 07:19:40 +01:00
Gleb Mazovetskiy 3afef6299f Level renderer: Remove cel_transparency/foliage_active globals 2022-11-25 15:00:04 +01:00
obligaron d912babc91 Multiplayer: Enable Magic Rock Quest 2022-11-15 23:51:30 +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
KPhoenix 069ba7f1d4 [QOL] Colored slot backs (#5266) 2022-10-31 11:11:52 +01:00
staphen 21bd760bfa Bypass CMD_PUTITEM when triggering CMD_OPENHIVE or CMD_OPENGRAVE 2022-10-25 07:14:03 +02:00
obligaron d59a7e2794 Combine SyncDropItem and SyncPutItem 2022-10-23 10:09:54 +02:00
obligaron ba65d5fbff SyncPutItem: Always use passed coordinates for item position 2022-10-23 10:09:54 +02:00
staphen 3049421008 Include runes in CanUseScroll() validation 2022-10-17 22:19:24 +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