Commit Graph
1032 Commits
Author SHA1 Message Date
Anders Jenbo 005e7dcc23 chore: clang-tidy cleanup part 1 2026-04-03 22:57:48 +02:00
staphen 639197f19b Ensure that lightId gets initialized in InitPlayer() 2026-03-17 15:34:03 -04:00
Trihedraf 04cc99cbde LuaEvent > lua:: named functions. +lua_event.cpp 2026-03-04 17:50:04 -05:00
Trihedraf 32a0666201 move floating damage nums to lua mod & add xp mod 2026-01-11 12:21:27 +01:00
Eric Robinson 15f2ac4272 Fix statting on death crash (#8308) 2025-12-31 02:50:20 +00:00
Eric Robinson 72174930fb Prevent targeting dead players (#8393) 2025-12-30 18:41:27 -05:00
Eric Robinson e6032a69a8 Split control.cpp (#8347) 2025-12-13 08:32:02 +00:00
Eric Robinson 553faae5c4 Fix Player Targeting (#8313) 2025-12-08 22:59:38 -05:00
Eric Robinson dd7a06365c Remove unused CMD_ATTACKXY 2025-12-06 14:09:19 -05:00
Eric Robinson ff936c9920 Add more usage of hasNoLife 2025-12-03 18:52:01 -05:00
Eric Robinson e5e6804e49 Add Monster hasNoLife helper (#8304) 2025-12-03 18:48:20 -05:00
Eric Robinson 7e8173e6ff Add Player hasNoLife helper (#8302) 2025-12-03 05:12:42 +00:00
Gleb Mazovetskiy 1bbe8bfe08 SDL3: Even more migration 2025-10-09 01:28:37 +01:00
staphen cd18ec35fb Fix compiler warnings: NUM_MAX_CLASSES not handled in switch 2025-10-01 04:32:48 +02:00
Gleb Mazovetskiy 3bcc869d85 Replace fmt with utils/str_cat in a few places
`fmt::format_to` is overkill for our simple formatting needs.
2025-09-29 08:36:34 +01:00
Andrettin d87c0dcf8a Player Class Flags (#8173) 2025-09-07 04:36:57 +02:00
Andrettin f6b4665e94 Make Player Class Data Data-Driven (#8167) 2025-09-05 11:30:01 +02:00
Anders Jenbo 1c76897f2c Apply simple const rules using clang-tidy 2025-08-16 01:21:36 +02:00
Anders Jenbo 6a4c5e42ec Clean up const and shadow variables 2025-08-15 04:42:15 +02:00
Nick Wicked 120993c9a9 Fix Automap movement being hardcoded to right stick on gamepad (#7921) 2025-08-14 23:19:08 +02:00
Stephen C. Wills a563b65642 Fix compiler warnings (#8098) 2025-08-10 20:41:14 +00:00
Doink Oink c62a19e299 Party Information Panel (#7877) 2025-08-10 03:23:57 +02:00
Anders Jenbo 7b2de562c2 Extract more Hellfire into data 2025-07-21 00:42:33 +02:00
staphen bbc728a327 Remove overzealous validation logic in spell message handlers 2025-06-09 17:00:26 +02:00
staphen 88b39dc97d Make use of SDL_UserEvent::code instead of SDL_Event::type 2025-05-24 19:56:38 +02:00
staphen 308399e31e Fix errors where Monster::enemy references garbage memory 2025-05-22 05:18:36 +02:00
obligaron 3a1eb6bed7 Decouple Golems from Players and use SpawnMonster for Golem 2025-04-23 19:03:01 -04:00
obligaron fee7f4749f Introduce FindGolemForPlayer and use goalVar3 to track golem <-> player relation 2025-04-23 19:03:01 -04:00
staphen 0f35bd8ce2 Fix compiler warning in Player::RemoveInvItem() 2025-03-30 21:25:29 +02:00
chasedjones88 b47d97f14c Rebase of #7876 - Shift item order when selling to keep consistent window order (#7886)
* Shift item order when selling instead of using last item to fill the slot

Player has items i1, i2, i3, picked up in that order.

Previous Behavior:
1. Sell window at vendor shows i1, i2, i3.
2. Player sells i1
3. i3 is last in list and replaces i1
4. Sell window now shows i3, i2.

New Behavior:
1. Sell window at vendor shows i1, i2, i3.
2. Player sells i1
3. i2/i3 are shifted in index position down to fill the gap left by previous index.
4. Sell window now shows i2, i3.

* Remove whitespace
2025-03-27 03:19:22 +01:00
Eric Robinson aca06e898a Menu text revision (#3902) 2025-03-15 21:53:36 +01:00
staphen c798253587 Use constexpr for length of item names 2025-03-02 18:50:20 +01:00
Eric Robinson 173c662723 Remove CalcPlrStaff() 2025-02-28 18:05:44 +01:00
Gleb Mazovetskiy 3e6b501d82 Fix pathfinding and increase player path limit
The previous implementation didn't behave quite like A-* is supposed to.

After trying to figure out what's causing it and giving up,
I've reimplemented it in a straightforward manner.
Now it seems to work a lot better.

Also increases maximum player path length to 100 steps.
We still only store the first 25 steps in the save file for vanilla
compatibility.
2025-01-26 17:38:05 +01:00
Gleb Mazovetskiy ee16071761 Untangle pathfinding dependencies
1. Makes `path.cpp` concerned solely with the pathfinding algorithm.
2. Turns `path_test` into a standalone test.
2025-01-25 08:14:34 +00:00
Gleb Mazovetskiy 3bb1d685af Extract current input mode into its own library
Removes a transitive dependency on the entire plrctrl from options.
2025-01-22 23:14:45 +00:00
Gleb Mazovetskiy d94bc424df sgOptions -> GetOptions()
In C++, globals initialization order accross translation units is not
defined. Accessing a global via a function ensures that it is initialized.

This will be needed for #7638, which will statically initialize change
handlers after the Options object has been initialized.
2025-01-13 11:57:25 +00:00
staphen 7a6a6a6c32 Don't send spell level in spell casting network message 2025-01-12 16:28:38 +01:00
Gleb Mazovetskiy d7647d6c63 More dependency untangling
1. Moves more assets-related stuff from `init` to `engine/assets`.
2. Removes `SDL_audiolib` dependency from `soundsample.h`.
3. Cleans up some unused/missing includes.
2025-01-09 18:19:44 +00:00
Gleb Mazovetskiy a7651f15d9 Extract HeadlessMode from diablo.h
Untangles some dependencies.
Many places that use `HeadlessMode` do not need all of `diablo.h`.
2025-01-09 12:21:26 +00:00
Gleb Mazovetskiy b76feb2be3 Extract game mode out of init.cpp
Untangles some dependencies
2025-01-09 11:02:19 +00:00
Gleb Mazovetskiy a49b1f2d58 Extract Is{Any,None}Of out of engine.hpp
Untangles some of the dependencies
2025-01-08 09:54:56 +09:00
Eric Robinson cfac786daf Make invalid items unusable (#7506) 2024-11-15 04:59:40 +01:00
Eric RobinsonandStephen C. Wills 228aa7e210 Revise Teleport Target (#7531)
* Revise teleport target

---------

Co-authored-by: Stephen C. Wills <[email protected]>
2024-11-12 10:14:10 +01:00
Gleb Mazovetskiy f7a93f4cd3 Improve dev.display.path()
1. Do not draw foliage with the pause trn.
2. Display the number of steps.
3. If the tile is not walkable (allowed for destination tile), display
   the number of steps in yellow.
2024-11-10 10:16:14 +00:00
Andrew James c7abf2f778 Extract logic from CheckInvCut/AutoPlaceItemInInventory (#7494)
* Remove unnecessary namespace

* Extract FindSlotUnderCursor

* Split logic for finding a space in the inventory to dedicated functions
2024-10-21 10:54:24 +02:00
Eric Robinson baaa906583 Remove CheckCheatStats() (#7461) 2024-10-07 02:12:45 +02:00
Eric Robinson cdd22626b4 Fix Knockback direction (#7093) 2024-09-23 00:46:33 +00:00
Eric Robinson 109c3b165c Bugfix/Refactor: Min-Max Damage Range Calculations (#7022) 2024-09-22 20:13:15 +02:00
KPhoenix b0cb1b92ed Bugfix: Corruption item power 2024-09-18 00:52:39 +02:00