Commit Graph
74 Commits
Author SHA1 Message Date
Ivan Epifanov 1e53f32049 [vita] Initial port 2021-02-21 20:30:34 +01:00
qndel 0fe08dbe68 numpad potions + chat (#1027) 2021-02-20 20:06:55 +01:00
Gleb Mazovetskiy b10b4381ef Multiple controllers support (#935) 2020-11-28 22:58:13 +01:00
Gleb Mazovetskiy 693e189025 Controller: Fix L2/R2 handling
Broken in https://github.com/diasurgical/devilutionX/commit/01401a16c70213db7a9a84196dee354a2ebc11a3

`ToControllerButtonEvent` must only be called once per SDL event because
of how it handled L2/R2
2020-11-28 17:58:55 +01:00
Gleb Mazovetskiy 01401a16c7 Fix various controller issues
* Fixes Right Stick cursor movement
* Fixes cursor flicker when moving the cursor while moving the character
* Fixes START + SELECT menu
* Makes SELECT act as Escape in the in-game menu

Fixes #930
2020-11-28 15:02:53 +00:00
Anders Jenbo b7ca9a812a Clean up unused return type 2020-10-29 21:39:58 +01:00
Anders Jenbo e073422ce7 Unify executable for Spawn and Retail
The game will now autodetect if it should run in shareware mode or full
retail based on the found mpq file. Additionally it can beforced in the
shareware mode with --spawn even if the retail data is found.

This simplifies a lot of the spagetty code and lets us better refactor,
also worth noteing is that we won't have to setup a secound set of build
tests.
2020-10-20 19:42:01 +02:00
Anders Jenbo c164048348 [controller] Fix selecting spells at all resolutions
This also fixes
- UI navigation being unresponsive when quickly tabing the direction
pad.
- Speed book not starting out highlighting the current selected item
- Diagonal in the speed book
- Being able to select non spells in the speedbook
2020-10-04 15:05:32 +02:00
Anders Jenbo 8726e80199 Make controller enums C++03 compatible 2020-05-19 17:19:50 +02:00
Anders Jenbo dc8be6c0ab C++03 compatibility (#736)
* Use C++03 compatible constructors
* Remove conflicting definitions
2020-05-17 01:37:19 +02:00
Anders Jenbo 0da3461d35 Use explicit types instead of auto 2020-05-14 11:44:15 +02:00
Gleb Mazovetskiy 6e449b9411 Allow re-mapping keyboard keys
Adds a `REMAP_KEYBOARD_KEYS` CMake option.
This remapping applies wherever Game or Menu controls apply.

Uses it to map the Power button to the menu on RG350.
2020-05-02 18:13:10 +02:00
Anders Jenbo 3c5982083f Merge branch 'master' of github.com:diasurgical/devilution 2020-04-06 12:05:13 +02:00
Anders Jenbo 25993b4043 Merge branch 'master' of github.com:diasurgical/devilution 2020-02-14 23:03:31 +01:00
Anders Jenbo 118e3668b4 Remove unused code 2020-02-01 16:45:07 +01:00
Anders Jenbo 08aa6a860a Move generic helpers out of miniwin 2020-02-01 13:56:08 +01:00
Anders Jenbo 67c58583d8 Implement fullscreen toggeling via alt+enter 2020-02-01 13:55:21 +01:00
Anders Jenbo cc4d6b57d8 Remove unused miniwin IO 2020-01-31 22:30:13 +01:00
Anders Jenbo baf2d14440 Remove unused parts of miniwin 2020-01-31 01:20:10 +01:00
Anders Jenbo 534ed2d3ff Make shift+0-9 behave as on US keyboards
Fixes #532
2020-01-04 17:02:09 +01:00
Anders Jenbo d04e0e44bb Implement scroll wheel navigation
up/down/left/right = arrow keys
ctrl+up/down = zoom automap in/out
2019-12-31 06:29:02 +01:00
Anders Jenbo 150f7e805d Update debug code 2019-12-27 09:24:53 +01:00
Anders Jenbo f2133b6e2b Fix exiting movie
- Replaying the intro would translate the exter and then interupt the
movie immediately.
- It was not possible to exit the application while a movie was playing.
2019-12-26 01:40:47 +01:00
Anders Jenbo eb0f899c90 [controller] Hot spells via mod+A/B/X/Y, quest log/spellbook via mod+L2/R2 2019-12-24 04:34:57 +01:00
Anders Jenbo 50ca153f24 [controller] Fix switching focuse between inv and char 2019-12-23 00:42:36 +01:00
Anders Jenbo 7273e6a32d Fix mouse clicks not registering on 0x* and *x0
Fixes #507
2019-12-22 19:35:45 +01:00
Anders Jenbo 4610b50d1e [controller] Handle edge cases for cursor state 2019-12-21 21:11:35 +01:00
Anders Jenbo 9d4bb70913 [controller] Only close inventory if cursor is clean 2019-12-18 23:07:42 +01:00
Anders Jenbo 046064fcfe Fix PostMessageA an remove more unused event code 2019-12-04 01:37:04 +01:00
Anders Jenbo e847108b78 Clean up event handeling 2019-12-03 01:59:13 +01:00
Anders Jenbo f9d4073620 Detect when gamepads are added or removed 2019-12-03 01:59:13 +01:00
Anders Jenbo 1d500497da Ignore clicks ouside game
Fixes #91
2019-11-30 13:10:51 +01:00
rsn8887 c1237b53dd Correctly handle window size and docking/undocking on Switch 2019-11-24 15:22:59 +01:00
rsn8887 dd569bf8e0 Implement touch controls 2019-11-23 20:06:43 +01:00
Anders Jenbo d94b245497 [controlls] Prioritize spell targets
Spells will now target either the apropriate highlighted actor or the
current direction.
2019-11-20 10:49:16 +01:00
Gleb Mazovetskiy 2acb87c743 SDL1: Set video mode flags and BPP via CMake 2019-11-17 23:45:55 +01:00
Gleb Mazovetskiy 24f7b080a5 Work around RG350 joystick mode kernel bug 2019-11-17 23:45:04 +01:00
Anders Jenbo 448c01a969 Make all movies escapable using ESC
Fixes #175
2019-11-17 01:55:51 +01:00
Anders Jenbo bc88560b41 Disable rendering when minimized
This recovers the original use of gbActive
2019-11-17 01:55:07 +01:00
Anders Jenbo d50485b119 Silence some SDL events that we do not use 2019-11-13 23:32:36 +01:00
Gleb Mazovetskiy efd9056b2b PeekMessageA: Fix false_avail for some events 2019-11-13 01:28:53 +01:00
Anders Jenbo 54bbb4b29a Better fake event handeling 2019-11-12 23:24:04 +01:00
Anders Jenbo c5bca03e5a Fix redrawing panel on unminimizing 2019-11-12 20:26:34 +01:00
Anders Jenbo 0092aa66f0 [ctlr] Fix closing inventory via quickbook 2019-11-07 20:09:31 +01:00
Gleb Mazovetskiy ddce870dda Handle scaling for SDL1 (#370)
Only some handheld devices support auto-scaling.
On desktop and some handhelds we need to downscale manually.

Hardware auto-scaler check for jz4760 provided by @jbanes and @scooterpsu
2019-11-07 00:54:55 +01:00
Anders Jenbo 1571769478 Fix controller focuse when opening char 2019-11-06 19:49:21 +01:00
Anders Jenbo dbc91ae036 Correct mouse interactions for game controller 2019-11-06 02:13:07 +01:00
Anders Jenbo c86cec3c5f Prioritize controller navigation
Only do one type of navigation at any one time.
Priority: Inventry, Stats, Spells, Walk.
2019-11-06 02:13:07 +01:00
Anders Jenbo 45844b71ae Make controls more responsive
- Fix double events
- Fix ignored events
- Allow moving diagonal in the inventory
- Fix mouse wobbling in inventory when scalling
- Make controler actions cursor independants
- Make sure secoundery and primery key doesn't fire each others events
- Highlight both primary and secondary target
- Automatic switch between controller and keyboard+mouse
- Allow the user to change facing direction when blocked
- Make code event based instead of relying on time outs
2019-11-06 02:13:07 +01:00
Gleb Mazovetskiy b949b77d53 Drop held item when closing inventory
Previously the item was just destroyed instead
2019-11-06 02:13:07 +01:00