Anders Jenbo
2fdbd39bb0
Clang-tidy: modernize-raw-string-literal
2021-06-27 01:38:34 +02:00
Anders Jenbo
bf780be1ed
♻️ Cleanup all implicit bool conversions
2021-06-26 16:32:44 -07:00
Anders Jenbo
8f3266244a
Clang-tidy: readability-else-after-return
2021-06-27 01:10:20 +02:00
Anders Jenbo
790f42d078
Clang-tidy: readability-inconsistent-declaration-parameter-name
2021-06-27 01:06:00 +02:00
Anders Jenbo
19d980582f
Clang-tidy: readability-static-definition-in-anonymous-namespace
2021-06-27 00:44:37 +02:00
Anders Jenbo
2bdb6caa07
Cleanup majority of remaning implicit bool conversions ( #2234 )
2021-06-26 21:05:45 +02:00
ephphatha
f4f6a8a51e
Refactor PlaySfxLoc to take a Point instead of x/y params
...
Because of the heavy usage of this function in objects.cpp and the mixed use of aliases and direct references to the active object in Operate*Door functions I've done some refactoring of those areas beyond what is strictly necessary. Hopefully this makes sense and is reasonable to include in this change.
2021-06-26 10:12:28 -07:00
Anders Jenbo
d8fa29c972
Clean up more implicit bool conversion
2021-06-26 10:07:02 -07:00
Anders Jenbo
22b632f04a
♻️ Clean up implicit bool conversions
2021-06-26 08:57:59 -07:00
obligaron
317a6ee82c
Introduce MonsterStruct::Petrify
2021-06-25 11:52:12 -07:00
Anders Jenbo
1cc0eb25ca
♻️ Use ranges for loops (clang-tidy)
2021-06-25 13:22:08 +02:00
Anders Jenbo
35b2aa4947
♻️ Unfold a few functions
2021-06-24 15:11:09 -07:00
Anders Jenbo
e008d66f14
♻️ Declare type with assignment
2021-06-24 15:11:09 -07:00
Anders Jenbo
ee7b32d8f6
Player by reference part 3
2021-06-24 00:53:09 +02:00
Gleb Mazovetskiy
8a9618aea2
♻️ Clean up cel_header.hpp
...
1. Rename `CelGetFrameStart` to `CelGetFrame`, in line with the other 2
functions with the same name and load the `uint32_t` safely.
2. Remove redundant `FrameHeader`, simply use `LoadLE16`.
3. Document all the functions.
2021-06-23 11:27:56 +01:00
Matheus Gomes
5ee7edbde1
Refactored "StartWalk(...)" into different functions and moved tightly coupled "Direction" parameters into an array.
2021-06-23 03:06:58 -07:00
Vladimir Olteanu
95643029e3
Refactor missiles.cpp
...
Use Point wherever possible
Make some functions static (not exhaustive)
Reduce excessive indentation (not exhaustive)
Declare variables as needed (not exhaustive)
2021-06-21 12:10:37 -07:00
Gleb Mazovetskiy
14218080b6
🚚 engine.h: Extract CelGetFrame and friends
2021-06-21 02:34:28 -07:00
Gleb Mazovetskiy
e40b1963f9
🚚 engine.h: Extract CelSprite and file loading
2021-06-21 01:36:20 -07:00
Anders Jenbo
c6f6c99add
Fix GCC warning
2021-06-13 05:18:08 +02:00
qndel
816b244689
HasItem/RemoveInvItem combo refactor
2021-06-13 05:18:08 +02:00
Juliano Leal Goncalves
9c85e61025
♻️ Leverage 'Point' struct on 'ItemSpaceOk'
2021-05-31 06:05:35 +02:00
Gleb Mazovetskiy
f319c593a6
🧹 player.cpp: Remove unused GetPlrGFXClass
2021-05-28 13:27:08 +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
Juliano Leal Goncalves
c6fafbf64b
♻️ Change 'SolicLoc' 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
obligaron
da7ded3170
Integrate GetAnimationWidth in LoadPlrGFX (only callside)
2021-05-24 20:12:43 +02:00
obligaron
d97131349e
Unify player_graphic memory handling
2021-05-24 20:12:43 +02:00
obligaron
61ba5009ac
Convert to CelSprite
2021-05-24 20:12:43 +02:00
obligaron
3067aeacb8
Remove PlayerStruct._pXYZWidth and replace it with calls to GetAnimationWidth
2021-05-24 20:12:43 +02:00
obligaron
d11ed50585
NewPlrAnim now also loads the graphics if needed
2021-05-24 20:12:43 +02:00
obligaron
c424f601ec
Change LoadPlrGFX from pnum to PlayerStruct
2021-05-24 20:12:43 +02:00
obligaron
3a6e631261
Remove memset for PlayerStruct
2021-05-24 20:12:43 +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
cc936dacd7
♻️ Replace 'int' with 'Direction' parameter on 'PlrDirOK'
2021-05-24 06:11:59 +02:00
Anders Jenbo
6ce8f13751
Apply clang-tidy to more code and do some related cleanups
2021-05-24 05:27:06 +02:00
Juliano Leal Goncalves
21fdb0dcd9
♻️ Replace manual direction displacement logic with 'Point' add operator
2021-05-24 04:46:08 +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
Jmgr
bbd39aa513
Replace sprintfs with strcpy for translatable strings
2021-05-21 01:02:45 +02:00
Jmgr
6e85cde978
Update format strings
2021-05-21 01:02:45 +02:00
Jmgr
0c27e756f7
Add fmt::format
2021-05-21 01:02:45 +02:00
obligaron
1c21607ccf
Use new stand animation for cast in town
2021-05-20 10:05:36 +02:00
obligaron
11f8c952e5
CheckNewPath: Use correct player for repeated attack check
2021-05-20 10:01:22 +02:00
obligaron
4de25cd2ea
Introduce PlayerStruct.IsWalking()
2021-05-16 21:24:36 +02:00
Anders Jenbo
34744c068f
♻️ Consitantly use %i and not %d
2021-05-15 14:17:52 +02:00
Anders Jenbo
d0ee8f90cf
🐛 Fix run in town
2021-05-13 03:14:05 +02:00
Anders Jenbo
a095bc0bf7
♻️ Migrate more code away from miniwin
2021-05-13 02:30:18 +02:00