Eric Robinson
5937734b85
Move *dat files to tables dir
2 months ago
obligaron
78a3edb719
Change MonsterTrapHit and MonsterMHit from index to Monster reference
4 months ago
Anders Jenbo
e7b91432ba
clang-tidy: simple clean up of missiles
7 months ago
Eric Robinson
e538b457bf
Refactor Missile direction/frame group handling
10 months ago
Gleb Mazovetskiy
c31836eab8
Split up `engine.{h,cpp}`
...
Untangles dependencies by splitting up `engine.{h,cpp}` into 3 files:
1. `primitive_render`
2. `ticks` -- only contains `GetAnimationFrame` for now.
3. `GetWidth2` renamed to `CalculateSpriteTileCenterX` and moved to `levels/dun_tile.hpp`.
1 year ago
Gleb Mazovetskiy
a49b1f2d58
Extract Is{Any,None}Of out of engine.hpp
...
Untangles some of the dependencies
1 year ago
Eric Robinson
9f197f5ebc
Rename Missile::_mirange to Missile::duration ( #7214 )
1 year ago
Eric Robinson
520bf5d9bd
Fix visually overlapping sprites for wall spells ( #7208 )
2 years ago
qndel
24f108f193
fix many typos ( #7322 )
2 years ago
staphen
af07b71127
Fix crash loading game with Search missile
2 years ago
obligaron
b42b72221f
Use PlayerAtPosition at more places
2 years ago
obligaron
fae6b3d817
Change Player::getId() and MyPlayerId to uint8_t
2 years ago
obligaron
79a43dc1de
Introduce AddMissile overloads specific for player and monster
2 years ago
Anders Jenbo
bb2e189327
Convert _sfx_id in to class enum
2 years ago
Gleb Mazovetskiy
62e9aa0448
`MissilePosition`: Use `WorldTilePosition`
...
Reduces struct size and makes the types of coordinates more obvious.
3 years ago
Gleb Mazovetskiy
9e8465e152
Clean up spell book rendering
3 years ago
Gleb Mazovetskiy
14540164a7
Remove utils/stdcompat/optional.hpp
3 years ago
obligaron
40bb3aeb45
Replace earflag with DeathReason
3 years ago
Gleb Mazovetskiy
e67ea9b006
Make `MissilesData` const
...
Instead of temporarily modifying `MissileData` around certain calls,
pass the arguments from the outside.
3 years ago
Gleb Mazovetskiy
98294e0ad5
Optimize `MissileData`: 32 bytes -> 24
...
23 bytes used, 1 spare byte in the padding.
3 years ago
KPhoenix
d813f13700
`enum spell_id` -> `enum class SpellID`
3 years ago
KPhoenix
7947b99511
Implement new enum class
3 years ago
Eric Robinson
d7b6c7dca8
Refactor Missile Function Names ( #5733 )
3 years ago
DakkJaniels
d2134f93cd
MI_Firebolt -> MI_Projectile. Calculate damage when missile is added.
3 years ago
KPhoenix
8db521727d
`enum missile_id` -> `enum class MissileID`
...
Changes `enum missile_id` to `enum class MissileID`
3 years ago
Gleb Mazovetskiy
36c4a89f3e
Clean up a few position types
3 years ago
staphen
702fedbc54
Remove ConsumeSpell() from AddMissile() functions
3 years ago
Gleb Mazovetskiy
4cf0053ece
Set underlying type for all the enums
...
Reduces rg99 binary size by 3 KiB.
4 years ago
Gleb Mazovetskiy
961866e1c4
CLX: A new graphics format
...
The format is almost identical to CL2, except it uses the frame header
to store frame width and height instead of 5 32-line offsets.
This means we always have access to frame dimensions, so we can use it
as an on-disk format for our graphics as well.
Additionally, we may be able to optimize the rendering even more
in the future now that we have guaranteed knowledge of frame dimensions.
4 years ago
Cesar Canassa
fcdab7f56f
✅ Add test for RotateBlockedMissile ( #5069 )
4 years ago
Cesar Canassa
ac583cbb2d
✨ Adds isSameSource Missile method ( #5036 )
4 years ago
Cesar Canassa
aa6ea3907e
♻️ Adds Missile::SourcePlayer and Missile::SourceMonster ( #4999 )
4 years ago
Anders Jenbo
2d21fc372e
Remove more miniwin code
4 years ago
Cesar Canassa
e538acb248
📝 Fixes Doxygen warnings ( #4904 )
4 years ago
Cesar Canassa
443f88b0f7
Rename MonsterTrapHit m parameter to monsterId
4 years ago
Gleb Mazovetskiy
17f8cdddc4
Clean up `GetSpellLevel`
...
Remove the buggy `GetSpellLevel` implementation and use
`Player#GetSpellLevel` throughout instead.
4 years ago
Anders Jenbo
b00ae287b8
Minimize propegation of global Players index
4 years ago
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