Commit Graph
59 Commits
Author SHA1 Message Date
qndel ab9911064f unify checks for single and multiplayer 2021-02-18 22:32:01 +01:00
Juliano Goncalves 20c44a08ca Spend all stat points with shift click 2021-02-17 19:07:39 +01:00
Anders Jenbo 8c261d0966 Merge remaning clean Hellfire code paths 2021-01-09 19:04:31 +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
qndel a61f969d26 fix typos (#914) 2020-11-12 13:09:13 +01:00
Anders Jenbo f69731b0c4 Initialize contoller values 2020-10-24 14:02:02 +02: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 c28335d597 Fix inventory controller navigation for widescreen 2020-10-01 04:35:12 +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
Anders Jenbo 7108145a04 Merge branch 'master' of github.com:diasurgical/devilution 2020-04-14 15:30:49 +02:00
qndel fea95b8cf7 fix wrong enum 2020-04-14 10:06:54 +02:00
Anders Jenbo 776ab10476 Merge branch 'master' of github.com:diasurgical/devilution 2020-03-29 23:40:05 +02:00
Anders Jenbo 58e3192ef9 Merge branch 'master' of github.com:diasurgical/devilution
Fixes #620
2020-02-29 18:18:45 +01:00
qndel cc6a2d4523 Apply MAX_PATH_LENGTH 2020-02-01 14:53:06 +01:00
Anders Jenbo 08aa6a860a Move generic helpers out of miniwin 2020-02-01 13:56:08 +01:00
Gleb Mazovetskiy 5b2481a2b4 Controls: No virtual mouse when automap is active 2020-01-25 16:37:50 +01:00
Gleb Mazovetskiy ce5c1007a2 Controller improvements: START modifier and hints
1. Makes START a modifier key.
2. Main modifier actions are now displayed as hints while the modifier is pressed.
3. Mouse simulation now available on all controllers:
   SELECT + D-Pad to move mouse
   SELECT + Left/Right should button to click

 START +    | Action
 ---------- | ------
 SELECT     | Menu
 UP         | Menu
 DOWN       | Map
 LEFT       | Character info
 RIGHT      | Inventory
 B (Bottom) | Spell book
 Y (Left)   | Quest log

This makes all actions available on controllers without sticks and ZL/ZR.
2020-01-25 16:37:50 +01:00
Anders Jenbo cb2d58acc8 Fix clang warning 2019-12-26 17:23:21 +01:00
Anders Jenbo 57e960aeda [controller] only move map when in dungion
The map status can not be changed in town but is remembered
2019-12-26 01:55:47 +01:00
Anders Jenbo fe44ea7859 [controller] Increase teleport distance to 4 steps 2019-12-24 05:58:08 +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 cc42e9abb1 [controller] Make accumulator time based and correct map direction
The emulated mouse and map move at a consistent speed independant of
frame rate.
The map can now be scrolled at variable speeds and diagonally.
Mouse is now confined to the window.
2019-12-24 04:30:29 +01:00
Anders Jenbo 7d8d10f00e [controller] Correctly prioritice multiple talkers
This makes is easier to deal with Lazurus when skipping his trigger
2019-12-22 02:56:37 +01:00
Anders Jenbo 4610b50d1e [controller] Handle edge cases for cursor state 2019-12-21 21:11:35 +01:00
Anders Jenbo ae19742590 [controller] Don't start backtrack around obstacles 2019-12-21 19:28:47 +01:00
Anders Jenbo 9d4bb70913 [controller] Only close inventory if cursor is clean 2019-12-18 23:07:42 +01:00
Anders Jenbo f313b66a34 [controller] Fix dropping items to all sides 2019-12-18 23:06:22 +01:00
Anders Jenbo f0a614ea21 [controller] Do not cast targeted spells from inventory 2019-12-18 23:06:19 +01:00
Anders Jenbo 4269f71dc2 [controller] Fix player attack each other in town
This would render the player invisable and damage equipment
2019-12-14 21:37:18 +01:00
Anders Jenbo e7f2d6ddd4 [controller] Fix delayed movements in multiplayer 2019-12-14 21:23:03 +01:00
Anders Jenbo cdbde9cdcb [controller] Target quest entrances 2019-12-13 23:58:35 +01:00
Anders Jenbo b2c3cf1135 [controller] Correctly prioritize all targets 2019-12-08 03:29:28 +01:00
Anders Jenbo 28b4fb1fd9 [controller] Correctly prioritize monsters 2019-12-08 00:54:56 +01:00
Anders Jenbo 271c6a9c41 Remove unessesery calls to abs in GetDistanceRanged 2019-12-07 18:31:40 +01:00
Anders Jenbo e24574897c [controller] Target portals
This will target portals and stairs found within 2 steps if no other
targets are found.
This is naive and doesn't prefer portals propperly.
2019-12-07 02:35:47 +01:00
Anders Jenbo 78b9f7bc72 [controller] Only ignore doors when at same coordinates
This made it harder to use schrines and book shelfs
2019-12-06 00:13:44 +01:00
Anders Jenbo f5e8ae47c0 [controller] Correct movment range
Previously the player could wald across lava bends and sneak past
blocked paths
2019-12-06 00:13:44 +01:00
Gleb Mazovetskiy 6aae591f6c FindMelee: Minor cleanup 2019-12-04 00:12:48 +01:00
Anders Jenbo dd0cd88eb8 [controller] Single BFS mele aim 2019-11-28 02:54:44 +01:00
Max Desiatov 4ff8f586d6 Fix typo in plrctrls.cpp comment
>cordinate
2019-11-22 12:34:17 +01:00
Anders Jenbo 279535f90b Correct GetDistanceRanged calculation 2019-11-22 01:25:49 +01:00
Anders Jenbo 425262560b Check best case before doing a full path search
This gives between 2x-10x performance improvment to mele only player
auto aim performance. Further improvments could be made by ordering
enemies by minimal distance and doing a continue in while ((next_node =
GetNextPath())) if maxDistance is exceeded.
2019-11-22 01:25:49 +01:00
Anders Jenbo b3d81a46cc Ignore doorway so we don't get stuck behind barrels 2019-11-20 10:49:16 +01:00
Anders Jenbo 0c75636db3 [controller] Automatically apply heal-other, resurect and disarm 2019-11-20 10:49:16 +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
Anders Jenbo 520c1515ed Check if towner is in range first
This dramatically reduces the CPU spend finding towners
2019-11-18 02:23:22 +01:00
Anders Jenbo 2bb9aa4928 * Improve controller autoaim
- Access and detect all parts of large objects
- Prioritize targets based on orientation
- Accurate prioritize the closest enemy when using mele only
- Multiple corrections to target selection logic
2019-11-12 00:28:04 +01:00