Anders Jenbo
1119c2d2d9
♻️ Cleanup missiles
5 years ago
Anders Jenbo
ee7b32d8f6
Player by reference part 3
5 years ago
Vladimir Olteanu
e664e39061
Direction16: nits
...
* use static_cast
* fix bad math that yielded same result as correct math
5 years ago
Anders Jenbo
a1a8dd4bba
🔥 Remove redundant MI_Lightctrl code
5 years ago
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.
5 years ago
Vladimir Olteanu
2624d1e62f
Introduce Direction16 as enum
5 years ago
Vladimir Olteanu
74863f95e9
Cleanup of MI_Lightctrl * Removal of redundant checks w.r.t. mx, my * Reduced indentation * Use Point stuff
5 years ago
Vladimir Olteanu
8c3c9ae74a
Cleanup AddWarp
5 years ago
Anders Jenbo
00f8cab32a
Cleanup missile velocity calculations
5 years ago
Vladimir Olteanu
0765d2a70e
Cleanup missiles_process_charge
5 years ago
Vladimir Olteanu
52cc7ccc63
Cleanup MI_Hbolt
5 years ago
Vladimir Olteanu
1368c4d499
Cleanup MI_Wave
5 years ago
Vladimir Olteanu
67e37e5b54
Cleanup of MI_Apoca
5 years ago
Vladimir Olteanu
87d5124fac
Consolidate MI_FireRing and MI_LightningRing
5 years ago
Vladimir Olteanu
fab8ecbb78
AddHiveExplosion: remove duplicate code
5 years ago
Vladimir Olteanu
0b72187cbc
Refactor MI_Cbolt
5 years ago
Vladimir Olteanu
356a90411a
AddRuneExplosion: Use loop to get rid of duplicate code
5 years ago
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)
5 years ago
Gleb Mazovetskiy
14218080b6
🚚 engine.h: Extract `CelGetFrame` and friends
5 years ago
Gleb Mazovetskiy
e40b1963f9
🚚 engine.h: Extract `CelSprite` and file loading
5 years ago
obligaron
b5ad92eb2c
Convert _mAnimData to CelSprite
5 years ago
obligaron
ab9a300393
Introduce InitMissileAnimationFromMonster
5 years ago
qndel
8ba4afe313
fix wrong sound/message
5 years ago
Vladimir Olteanu
03f9392e0f
Use Point stuff in MI_Fireman
...
Update Source/missiles.cpp
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
5 years ago
Vladimir Olteanu
34fd7d7651
Use WalkingDistance in CheckIfTrig
5 years ago
Juliano Leal Goncalves
4668a526eb
♻️ Leverage 'Point' struct on monster functions ( #2056 )
5 years ago
Juliano Leal Goncalves
dd9e05222d
♻️ Change 'PosOkPlayer' to take a 'Point' instead of 2 separate ints
5 years ago
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.
5 years ago
Juliano Leal Goncalves
b3ec79af4f
Leverage 'Point' in Lighting and Player functions ( #2048 )
5 years ago
Juliano Leal Goncalves
d55cd99dd5
🚚 Rename 'direction' enum to 'Direction'
5 years ago
Juliano Leal Goncalves
15c46b9eb0
💬 Rename HeroSpeech members to improve discoverability
5 years ago
Juliano Leal Goncalves
5350250a76
🚚 Rename speech functions to 'Say' variations
5 years ago
Juliano Leal Goncalves
8c620ce29e
♻️ Extract 'HeroSpeech' enum class for hero sounds instead of using raw `int`s
5 years ago
obligaron
e99af6cbb1
Remove old positioning logic for manashield and reflect
5 years ago
Anders Jenbo
bec0ceec4a
♻️ Add points
5 years ago
Anders Jenbo
0c2042fa52
♻️ Player by reference
...
Update Source/items.cpp
Update Source/lighting.cpp
Update Source/pack.cpp
asd
ads
as
5 years ago
obligaron
006fdafd6e
Fix steal potions to change rejuvenation randomy to mana or life and not always to life
5 years ago
obligaron
d5e429608c
Fix breaking glass sound is missing for small life/mana potions
5 years ago
Anders Jenbo
b0f2d5b5d2
🐛 Fix all monsters wanting to talk
5 years ago
Anders Jenbo
f579b2f287
Handle cel/cl2 files as byte arrays
5 years ago
Juliano Leal Goncalves
39736e2538
♻️ Pass 'PlayerStruct' pointer to 'ClrPlrPath'
5 years ago
Anders Jenbo
fa0b286693
♻️ Typed file loading
...
Tthis gives us the option to specify what type a file should be loaded
as, avoidng the need to case it and does some automatic checks on the
fitness of the data, while making the process simpler.
If no type is given then the type will be set to std::byte which limit
what operations can be performed on the data.
5 years ago
Gleb Mazovetskiy
1b8b62a8c2
♻️ Store CEL width with the sprite itself
...
Instead of passing the CEL sprite width when drawing, store the CEL
width at load time in the new `CelSprite` struct.
Implemented for most sprites except towners, missiles, or monsters.
5 years ago
Anders Jenbo
3b04f67194
🔥 Remove a chunk of miniwin types
5 years ago
Anders Jenbo
5745f099ba
♻️ Use Point for positions in msg.cpp functions
5 years ago
Anders Jenbo
bd515ac75d
♻️ Apply Point equality operator
5 years ago
Vladimir Olteanu
2a3cf98850
Slight cleanup of dead{.h,.cpp}
5 years ago
Robin Eklind
64ea9a5ec2
missiles: add BUGFIX for MI_Apoca when handling golems
...
Prior to this fix, the apocalypse spell would hit the golem of the
4th player (i.e. plr[3]), since dMonster stores monster number + 1.
5 years ago
obligaron
239a43cc1c
Remove "AnimWidth2" expect for missiles ( #1680 )
5 years ago
Anders Jenbo
f77c52941a
♻️ Make GetDirection take Points instead of ints
5 years ago