Commit graph

133 commits

Author SHA1 Message Date
Vladimir Olteanu
39bbf07866 Use WalkingDistance for GetMinDistance 2021-06-02 13:36:17 +02:00
Vladimir Olteanu
690211a699 replace Point::Absolute with abs 2021-06-02 13:36:17 +02:00
Vladimir Olteanu
de2c640a9b Use Point::Absolute in GetMinDistance 2021-06-02 13:36:17 +02:00
Juliano Leal Goncalves
293803df51 ♻️ Replace 'coord' struct with 'Point' 2021-05-31 06:05:13 +02:00
Juliano Leal Goncalves
ff3dee8d45 ♻️ Replace poor usages of 'Size' with 'Point's 2021-05-31 06:05:13 +02:00
Juliano Leal Goncalves
abee4fe6fe ♻️ Repurpose the 'InvXY' struct as a new 'Size' struct 2021-05-31 06:05:13 +02:00
Juliano Leal Goncalves
dd9e05222d ♻️ Change 'PosOkPlayer' to take a 'Point' instead of 2 separate ints 2021-05-25 04:09:02 +02:00
Anders Jenbo
8a7ec56d3a Player by reference part 2
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
2021-05-24 21:00:32 +02:00
Juliano Leal Goncalves
b3ec79af4f
Leverage 'Point' in Lighting and Player functions (#2048) 2021-05-24 17:28:52 +02:00
Juliano Leal Goncalves
d55cd99dd5 🚚 Rename 'direction' enum to 'Direction' 2021-05-24 04:46:08 +02:00
Juliano Leal Goncalves
15c46b9eb0 💬 Rename HeroSpeech members to improve discoverability 2021-05-23 22:01:47 +02:00
Juliano Leal Goncalves
5350250a76 🚚 Rename speech functions to 'Say' variations 2021-05-23 05:32:34 +02:00
Juliano Leal Goncalves
8c620ce29e ♻️ Extract 'HeroSpeech' enum class for hero sounds instead of using raw ints 2021-05-23 05:32:34 +02:00
staphen
1dd5245158 Fix camera jerking when changing direction on controller. 2021-05-19 21:21:01 +02:00
staphen
4c39ac4402 Fix crash when using Town Portal on controller. 2021-05-18 12:46:02 +02:00
Stefan Mielke
dfece830ad
Controller Inventory Improvements (#1885)
- controller: Move inventory coordinates logic to outside of the method to ease visibility and changes; Fix cursor offset when holding items on the inventory; Move cursor between edges of the inventory to ease movement inside.
- Renamed InvGetCoord to InvGetSlotCoord.
- adding more SLOTXY_xxx options to improve controls code
- changed inventory slots comment to improve legibility
- fixing bugs and centering sprite on the slot
- fix belt item movement
- slots 9 and 10 move to belt 8 when moving down using a controller
- creating function to return correct mousePos slot to remove code duplication
- create BeltGetSlotCoord to get coords for belts and remove duplicates; code cleanup.
- adding INV_ROW_SLOT_SIZE to hold the amount of slots on an inv row
- improve code for moving item to the belt when it's the last 2 slots.
- fix bug that would not update the cursor position when going up on certain conditions.
- equip equipment when pressing [use] on the controller
- moving items in the inventory as a single instance, and blocking them from moving accordingly.
- move item to belt when clicking the spell button (Y)
- resetting the cursor takes into consideration if the current slot has an item that is bigger than 1x1
- change whitespace to tabs on inv.h changes
- fixing plrctrls.cpp formatting
2021-05-09 17:00:48 +02:00
Anders Jenbo
654a2b8834 ♻️Clean up automap code
Use Point for x,y pairs. Make helpers for drawing door and squares
2021-05-02 15:27:38 +02:00
Anders Jenbo
5745f099ba ♻️Use Point for positions in msg.cpp functions 2021-04-29 21:36:31 +02:00
Anders Jenbo
f77c52941a ♻️Make GetDirection take Points instead of ints 2021-04-25 02:25:52 +02:00
Anders Jenbo
2bd13451a1 ♻️Apply point positioning to all remaning entities 2021-04-25 01:25:48 +02:00
Anders Jenbo
98cd435fba ♻️ Apply point types to missiles 2021-04-24 21:41:04 +02:00
Anders Jenbo
efbe8a8338 ♻️ add possition points to monsters 2021-04-24 20:29:52 +02:00
Anders Jenbo
7912e510f0 🎨 Clean up overuse of SDL types 2021-04-24 17:07:07 +02:00
Anders Jenbo
e4cfad3196 ♻️Use points instead of individual fileds for player structure 2021-04-24 04:46:08 +02:00
Anders Jenbo
cc164985a3 🎨 Correct type checks in src sub-folder 2021-04-22 20:33:24 +02:00
Anders Jenbo
2969b80163 🎨 Run readability-identifier-naming on all src sub-folders 2021-04-22 03:53:35 +02:00
Anders Jenbo
1e3ed903be 🎨 strip redundant else 2021-04-22 00:39:48 +02:00
qndel
ec74917cb4 class sounds cleanup 2021-04-20 23:35:16 +02:00
Anders Jenbo
9e307a0d4a 🎨 Rename towner[] to towners[] 2021-04-19 22:42:19 +02:00
Anders Jenbo
373f28736f 🎨 Acceptable parts of modernize-* 2021-04-19 22:42:19 +02:00
Anders Jenbo
b978d80119 🎨 llvm-include-order 2021-04-19 20:11:20 +02:00
Anders Jenbo
bb4e1960e7 🎨 modernize-use-nullptr 2021-04-19 16:02:05 +02:00
Anders Jenbo
8c821e98d3 🚚 Restructure files 2021-04-16 03:57:22 +02:00
Renamed from SourceX/controls/plrctrls.cpp (Browse further)