BC Ko
14b7e3bdc1
2435 refactor missiles part 2 ( #2635 )
5 years ago
BC Ko
e5434e03b3
2602 Use range-based for-loop for Quests ( #2612 )
5 years ago
Aaron Sun
3ee90ca629
Add options for sub-panel alignment
5 years ago
4aron5un
4c8210df21
Center the sub-panels (Quest, Character, Spell and Inventory) ( #2498 )
5 years ago
Anders Jenbo
ab8afa7cd7
Fix edge cases in mouse action tracking code ( #2452 )
...
Fixes #2431
Also:
- Track spell targets
- Merge repeat walk in to the new repeat action code
- Avoid time based repeats (use action frame instead)
5 years ago
Anders Jenbo
9c4e34f988
Player by reference
5 years ago
Anders Jenbo
8ba3bbb6a4
Have PosOkPlayer take PlayerStruct as input ( #2430 )
5 years ago
Anders Jenbo
a19e7b2a3b
Remove some more use of miniwin
5 years ago
obligaron
70db8456ba
Remove _pwtype and replace it with UsesRangedWeapon
5 years ago
ephphatha
a8ed1998d1
Use Point in path_ functions that reference position
...
In cases like path_get_h_cost this allows simplifying logic where Point provides functions for the intended behaviour in a much simpler to understand package.
This also makes it clearer which functions are const/don't modify the node and which potentially have side effects.
5 years ago
Anders Jenbo
b3470b296c
♻️ [controls] Only check active monsters when looking for a target
5 years ago
Anders Jenbo
9264ad4b89
Use IsTileNotSolid() in place of !nSolidTable[dPiece[][]]
5 years ago
Anders Jenbo
2d4da488f0
Split path test functions
5 years ago
ephphatha
190025e79f
Use bound parameters for pathfinding functions operating on entities
5 years ago
FluffyQuack
ba60907853
Hold mouse button to keep attacking (Diablo 2-style) ( #2349 )
5 years ago
Anders Jenbo
77b72da276
♻️ Use monster by reference when possible
5 years ago
Anders Jenbo
9ebdb6db69
General clean up
5 years ago
Anders Jenbo
467b74dc06
Rename object globals
5 years ago
Anders Jenbo
9ae908f947
Rename missile globals
5 years ago
Anders Jenbo
9b8bf92575
Rename quest globals
5 years ago
Anders Jenbo
96bf75b502
Rename player globals
5 years ago
Anders Jenbo
c8870dbd1f
Rename item globals
5 years ago
Anders Jenbo
07ad083fda
Rename monster globals
5 years ago
ephphatha
08ae390643
Add explicit casts for some implicit conversions
...
Some of these were triggering multiple warnings due to casts applied at times which forced potentially truncating operations.
5 years ago
Anders Jenbo
4eabc6024b
Apply various cleanups via Android Studio
5 years ago
Anders Jenbo
fc353fc799
Clang-tidy: FunctionCase
5 years ago
Anders Jenbo
d9e0658643
Clang-tidy: basic naming
5 years ago
Juliano Leal Goncalves
cbb84199c2
♻️ Replace Point addition with 'Point + Displacement'
5 years ago
Juliano Leal Goncalves
0441ffc2f4
♻️ Move 'fromDirection' from 'Point' type to 'Displacement' type
5 years ago
Anders Jenbo
0f2ad469ea
♻️ Clean up variable initialization
5 years ago
Juliano Leal Goncalves
f621655a93
♻️ Simplify mouse cursor logic in 'plrctrls' using 'Point'
5 years ago
Juliano Leal Goncalves
a37311ddc4
♻️ Leverage 'Point.Contains' for bound checks related to character buttons
5 years ago
Juliano Leal Goncalves
fd9f2099d0
♻️ Leverage 'Point' to represent mouse position
5 years ago
Anders Jenbo
fa54499aeb
Clang-tidy: readability-uppercase-literal-suffix
...
Strip suffixes
5 years ago
Anders Jenbo
f167bd4dfb
Clang-tidy: llvm-include-order
5 years ago
Anders Jenbo
8f3266244a
Clang-tidy: readability-else-after-return
5 years ago
Anders Jenbo
19d980582f
Clang-tidy: readability-static-definition-in-anonymous-namespace
5 years ago
Andrew James
ff145b422d
Refactor plrctrls functions to use Point and Direction types ( #2155 )
...
* Refactor GetRotaryDistance to use Point instead of int x/y params
* Refactor HSExists to use Point instead of int x/y params
* Refactor IsPathBlocked to take typed params (Point, Direction)
The caller was already passing in a Direction value so this matches usage better. I also pulled the Direction to Point helper function up so it is available as a static class member, this allows replacing the use of the Offset array in plrctrls.cpp.
When adding a Direction to a point (and not scaling it first) I avoid explicitly creating a Point object since the operator+ overload will do that conversion implicitly.
* Replace Offsets array with Point::fromDirection
* Refactor GetDistanceRanged to use Point
I've added ExactDistance as a member function of Point to match ApproxDistance instead of only having it defined in GetDistanceRanged, it seemed more appropriate to be part of the class. Also removed temporary variables from callers of GetDistanceRanged as they were mainly used as a convenience for avoiding repetition when passing values into this function.
* Refactor GetDistance to use Point
5 years ago
Gleb Mazovetskiy
f9f301b054
🚚 engine.h: Extract `Point`, `Direction`, `clamp`
...
`engine.h` is getting quite bloated. Moves this code to their own files.
5 years ago
Juliano Leal Goncalves
25eaac78c1
♻️ Leverage 'Size' to represent a 'Rectangle's width/height
5 years ago
Juliano Leal Goncalves
e3ea6a9042
♻️ Leverage 'Point' to represent a 'Rectangle's position
5 years ago
Juliano Leal Goncalves
a983792880
♻️ Replace 'pair<int, int>' with 'Size' in 'GetItemSizeOnSlot' and 'GetInvItemSize'
5 years ago
Juliano Leal Goncalves
07a049f667
♻️ Replace 'INV_SLOT_SIZE_PX' macro with Size-based constexpr
5 years ago
Vladimir Olteanu
39bbf07866
Use WalkingDistance for GetMinDistance
5 years ago
Vladimir Olteanu
690211a699
replace Point::Absolute with abs
5 years ago
Vladimir Olteanu
de2c640a9b
Use Point::Absolute in GetMinDistance
5 years ago
Juliano Leal Goncalves
293803df51
♻️ Replace 'coord' struct with 'Point'
5 years ago
Juliano Leal Goncalves
ff3dee8d45
♻️ Replace poor usages of 'Size' with 'Point's
5 years ago
Juliano Leal Goncalves
abee4fe6fe
♻️ Repurpose the 'InvXY' struct as a new 'Size' struct
5 years ago
Juliano Leal Goncalves
dd9e05222d
♻️ Change 'PosOkPlayer' to take a 'Point' instead of 2 separate ints
5 years ago