Anders Jenbo
e6f958be25
Add panel and store transaction tests with UI test fixture ( #8528 )
...
Signed-off-by: staphen <staphen@gmail.com>
Co-authored-by: staphen <staphen@gmail.com>
1 day ago
Anders Jenbo
badb6c5972
Fix memory leak in game_controller.cpp
1 day ago
Scott Richmond
0ecc3edaed
[QOL] The buy and sell functionality of NPC stores is now visually driven to align with the stash and Diablo 2 style of trading ( #8434 )
...
- Add repair buttons (including “Repair All”) with proper alignment, tooltips, and cursor hit areas
- Improve controller support:
- Fix grid snapping and cursor positioning across panels
- Allow pressing/releasing UI buttons
- Fix item selling and movement between panels (inventory, belt, store)
- Prevent invalid interactions:
- Disable tab/repair navigation while holding items
- Hide unavailable options for non-Smith vendors
- Fix UI issues:
- Item misalignment and snapping
- Floating gold cost display
- Level-up button overlapping store panel
- Fix vendor-specific issues:
- Correct tooltip for non-Smith vendors
- Clean up Adria dialog options
- Fix stability issues:
- Resolve segfault when selling items
- Refactor and cleanup:
- Unify store sell logic
- Remove unused and stale code
- Improve IsPlayerInStore() logic
- General bug fixes and UI interaction improvements
---------
Co-authored-by: Yuri Pourre <yuripourre@users.noreply.github.com>
2 days ago
steotto
ed18290f28
[Controller] improve character joystick movement ( #8449 )
1 month ago
Eric Robinson
72174930fb
Prevent targeting dead players ( #8393 )
3 months ago
Eric Robinson
e6032a69a8
Split control.cpp ( #8347 )
4 months ago
Eric Robinson
e5e6804e49
Add Monster hasNoLife helper ( #8304 )
4 months ago
Eric Robinson
7e8173e6ff
Add Player hasNoLife helper ( #8302 )
4 months ago
staphen
4e983be0b1
Don't hardcode the number of Towners in gamepad targeting logic
4 months ago
staphen
16b97b5f4f
Assign GameController::instance_id_ before adding to controllers_ vector
4 months ago
staphen
945d82106c
Fix a handful of SDL2 API calls
6 months ago
Anders Jenbo
a60768a73f
SDL3: Backport to SDL 3.2.0
6 months ago
Gleb Mazovetskiy
88f706e0d1
SDL3: Add some backports / compat helpers
6 months ago
Gleb Mazovetskiy
1bbe8bfe08
SDL3: Even more migration
6 months ago
Gleb Mazovetskiy
a99cc9b40a
SDL3: Some more migration
6 months ago
Anders Jenbo
1c76897f2c
Apply simple const rules using clang-tidy
8 months ago
Eatitup_86
b7da47f9c3
Resolved Controller Inventory Issue
...
Fixed an issue with the inventory when using a controller that was making 1x1 items clip to an invalid -1 location when picking them up if they are in the last inventory slot.
8 months ago
Anders Jenbo
6a4c5e42ec
Clean up const and shadow variables
8 months ago
Nick Wicked
120993c9a9
Fix Automap movement being hardcoded to right stick on gamepad ( #7921 )
8 months ago
Gleb Mazovetskiy
d3248e969a
Untangle more dependencies
...
This allows us to make `clx_render_benchmark` and
`text_render_integration_test` standalone.
8 months ago
Gleb Mazovetskiy
903f0a8181
Simplify palette handling
...
Gets rid of `orig_palette`, we now always have only 2 palettes:
1. `logical_palette`
This palette has color cycling / swapping applied but no global
effects such as brightness / fade-in.
2. `system_palette`
This palette is the actual palette used for rendering.
It is usually `logical_palette` with the global brightness setting
and fade-in/out applied.
Additionally, we now keep the k-d tree around and use it to
update single colors.
The colors that are color-cycled / swapped are never included
in the k-d tree, so the tree does not need updating on color
cycles/swaps.
10 months ago
Gleb Mazovetskiy
58fe44f836
init.h -> init.hpp
11 months ago
staphen
5855b3149e
More consistent gamepad context sensitivity
1 year ago
Eric Robinson
8eddf55c3f
Stores - IsPlayerInStore() ( #7843 )
1 year ago
staphen
29372a68fe
Remove translation from pad buttons to keys in spellbook
1 year ago
staphen
e21efc26aa
Trigger deactivate event for virtual gamepad
1 year ago
staphen
5643cf8266
Don't delete items during lag spike
1 year ago
staphen
20c0a8dae8
Fix d-pad in main menu
1 year ago
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.
1 year ago
Gleb Mazovetskiy
ee16071761
Untangle pathfinding dependencies
...
1. Makes `path.cpp` concerned solely with the pathfinding algorithm.
2. Turns `path_test` into a standalone test.
1 year ago
Gleb Mazovetskiy
bae54d05e3
Options: Move resolutions list init to display.cpp
1 year ago
Gleb Mazovetskiy
3bb1d685af
Extract current input mode into its own library
...
Removes a transitive dependency on the entire plrctrl from options.
1 year ago
Gleb Mazovetskiy
acc335be17
Options: Extract keymapper handling from options
1 year ago
Gleb Mazovetskiy
7afdbe8fdc
Options: Extract padmapper handling from options
...
Options now only contain the padmapper settings, not the padmapping
handling code.
1 year ago
Gleb Mazovetskiy
4113805237
Options: Remove dependency on gbRunGame
1 year ago
Gleb Mazovetskiy
88a9a0656d
Move option change handlers out of `options.cpp`
...
Fixes #7638
1 year ago
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.
1 year ago
Gleb Mazovetskiy
c31836eab8
Split up `engine.{h,cpp}`
...
Untangles dependencies by splitting up `engine.{h,cpp}` into 3 files:
1. `primitive_render`
2. `ticks` -- only contains `GetAnimationFrame` for now.
3. `GetWidth2` renamed to `CalculateSpriteTileCenterX` and moved to `levels/dun_tile.hpp`.
1 year ago
Gleb Mazovetskiy
a49b1f2d58
Extract Is{Any,None}Of out of engine.hpp
...
Untangles some of the dependencies
1 year ago
Andrew James
aec1769858
account for held items in ResetInvCursorPosition
1 year ago
Andrew James
9c1a3b7b55
improve movement to body slots
1 year ago
Andrew James
99014d4ce7
allow moving from stash to inv from left side of wide items
1 year ago
Andrew James
3a3498f766
dedupe code for moving from inv to stash
...
also reorganising belt to stash checks to match
1 year ago
Sophie Alberti
21b12f7632
improve gamepad stash control, fix #7019
1 year ago
Gleb Mazovetskiy
36e0abfc35
Fix -Wunused-const-variable in controller_buttons
1 year ago
Gleb Mazovetskiy
f15fbcf61a
Async loading
...
Does the loading on a separate thread, so we're
now loading while fading in and while updating
the progress bar.
1 year ago
Gleb Mazovetskiy
e692acb049
Pathfinding: Rename functions
...
Rename functions to better reflect what they do.
1 year ago
staphen
3caa80f453
Fix double to float conversion warnings in virtual gamepad logic
1 year ago
Gleb Mazovetskiy
1a32a705fe
Replaces uses of doubles with floats
...
Looks like the KallistiOS Dreamcast SDK disables double support
by default: 495e77fd60/environ_dreamcast.sh (L16)
We don't really need doubles in this code.
The one place where we might have needed them is the SMK video
decoder, handled in a separate PR.
2 years ago
Eric Robinson
e90855b3c4
Rename stores.cpp global variables ( #7425 )
2 years ago