Gleb Mazovetskiy
a66ca44695
Zero-based frame indexing
...
Index frames starting at 0 instead of 1.
4 years ago
Gleb Mazovetskiy
f4bce38875
Use `uint16_t` for sprite widths
4 years ago
qndel
2b53c5f857
Update Source/missiles.h
...
Co-authored-by: obligaron <obligaron@live.com>
4 years ago
qndel
ac6a10bfb4
IsTrap()
4 years ago
ephphatha
32d397eb2a
Add max_size checks when adding missiles to allow for limited size containers
...
This doesn't handle failed allocations (e.g. if the platform runs out of memory) but makes it easier to use a fixed size container on limited memory devices.
4 years ago
obligaron
234a053863
Change Missiles Array to std::list
4 years ago
obligaron
a45eca5d40
Remove unused ChainStruct
4 years ago
obligaron
0ed8c941de
Replace FindParent and use of var4 to identify parent with pParent member in AddMissileParameter
4 years ago
obligaron
1aabcf295b
Add AddMissileParameter
4 years ago
ephphatha
279fbe32b3
Tidy up checks for missile collision with objects/tiles
...
This was repeated in multiple places with essentially identical logic. Can expose the existing missiles.cpp function to capture the use in scrollrt.cpp
4 years ago
Gleb Mazovetskiy
7e1fea6f76
clang-format all files in {Source,test}/
...
Also includes a few manual tweaks to comments and newlines for better results.
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
Siddharth singh chouhan
bcb332b7b0
Move documentation from implementations to declarations
5 years ago
ephphatha
9ef77cb428
Use scoped enum for Direction16.
...
Allows renaming the members to share names with Direction members when
representing the same conceptual direction.
5 years ago
ephphatha
b12de6fe12
Use scoped enum for Direction
...
Identified and removed an instance of Direction being used as an argument for a bool parameter
Removed a single-use temporary variable being cast from sprite frame to direction to size_t
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Fix alignment of WalkSettings array
5 years ago
obligaron
836bb92e8e
MoveMissileAndCheckMissileCol: Call CheckMissileCol only once for a tile and target
5 years ago
ephphatha
6fa3018f05
Move Init/FreeMissileGFX functions alongside MissileSpriteData array definition
...
Also combined the two free missile graphics functions as they were always called together (just slightly out of order previously).
5 years ago
ephphatha
851fb87e24
Remove mi argument from DeleteMissile
...
This value is always the current value of ActiveMissiles[i], while the caller has retrieved the index for its own use it's easier to track what the function does by just passing i.
5 years ago
Juliano Leal Goncalves
6e1d05187e
🚚 Rename 'MissileStruct' to 'Missile'
5 years ago
Juliano Leal Goncalves
20db8d1a11
🚚 Rename 'MonsterStruct' to 'Monster'
5 years ago
BC Ko
536121f038
rename _miVar# to var#
5 years ago
Anders Jenbo
d125b591eb
Remove dead code: ClearMissileSpot
...
This used to be called by the manashiled code
5 years ago
BC Ko
ee96690410
change function parameter
...
pass missile to mProc()
5 years ago
Anders Jenbo
d7c6d8b189
Use proper Direction type for AddMissile midir
5 years ago
Anders Jenbo
96b19ca8d5
Set _micaster type to mienemy_type
...
Rino never made use of the player id, so no reason to abuse _micaster
5 years ago
Anders Jenbo
bea8cc9d87
Reduce paremters used in add missile functions
5 years ago
BC Ko
ac0a690768
remove Missiles[]
5 years ago
Anders Jenbo
7f6e171b4b
Use BFLAG_MISSILE instead of dMissile
5 years ago
qndel
d76158ca03
reflect without missile! ( #2659 )
5 years ago
Anders Jenbo
3df8af0e9d
Apply missile_id to _mitype
5 years ago
Anders Jenbo
d4bd409472
Deduplicate manashild/reflect code
5 years ago
BC Ko
1a6562e16d
Merge pull request #2648 from bcko/2435_refactor_Missiles_3
5 years ago
BC Ko
14b7e3bdc1
2435 refactor missiles part 2 ( #2635 )
5 years ago
Anders Jenbo
f289fbcec5
Remove dead missile code
5 years ago
Vladimir Olteanu
b76e8c060b
Introduce MissileDataFlags
5 years ago
Vladimir Olteanu
61f82d1944
Remove LoadMissileGFX
5 years ago
Anders Jenbo
78124fb389
Add GolemHoldingCell
5 years ago
obligaron
5ed79c38ef
Introduce MissilePosition.StopMissile
5 years ago
Anders Jenbo
77b72da276
♻️ Use monster by reference when possible
5 years ago
Anders Jenbo
4bf4e42230
Move local symbols to anonymous namespace
5 years ago
Anders Jenbo
9ae908f947
Rename missile globals
5 years ago
obligaron
be53349c2d
Decouple missile movement from game logic ( #2322 )
5 years ago
Anders Jenbo
6690af350e
Clean up missiles.cpp
5 years ago
Anders Jenbo
a7c7fa0030
Fully apply clang-tidy/format to all files
5 years ago
Juliano Leal Goncalves
cbb84199c2
♻️ Replace Point addition with 'Point + Displacement'
5 years ago
Anders Jenbo
22b632f04a
♻️ Clean up implicit bool conversions
5 years ago
Anders Jenbo
ee7b32d8f6
Player by reference part 3
5 years ago
Vladimir Olteanu
2624d1e62f
Introduce Direction16 as enum
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
f9f301b054
🚚 engine.h: Extract `Point`, `Direction`, `clamp`
...
`engine.h` is getting quite bloated. Moves this code to their own files.
5 years ago
obligaron
b5ad92eb2c
Convert _mAnimData to CelSprite
5 years ago