qndel
9ba64ad08b
TRN rewrite + bugfix ( #4056 )
...
* working new TRN system
* apply TRNs to all unique missiles
2022-02-20 14:28:51 +01:00
Gleb Mazovetskiy
a5e1fa5bbe
Load missile frames into a single buffer
...
Previously, the memory for each frame was allocated separately.
Changes it to allocate a single buffer for all the frames.
This has the following advantages:
1. Less bookkeeping overhead in the allocator.
2. Less alignment overhead (allocator results are max-aligned by default).
We can follow this up with a similar treatment for other multi-file
animations.
2022-02-01 04:04:59 +00:00
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.
2022-01-23 05:02:57 +01:00
ephphatha
d3c42544a6
Address warnings/dead code
2022-01-23 05:02:57 +01:00
obligaron
234a053863
Change Missiles Array to std::list
2022-01-20 23:12:48 +01:00
obligaron
a45eca5d40
Remove unused ChainStruct
2022-01-20 23:12:48 +01:00
obligaron
0ed8c941de
Replace FindParent and use of var4 to identify parent with pParent member in AddMissileParameter
2022-01-20 23:12:48 +01:00
obligaron
1aabcf295b
Add AddMissileParameter
2022-01-20 23:12:48 +01:00
obligaron
ed5a3b3dcb
Remove SyncPositionWithParent
2022-01-20 23:12:48 +01:00
KPhoenix
b01d939d29
Fix LArrow Behavior
...
Fixes collision detection for the fire/lightning sprite that causes element base damage on collision with players and monsters, and removed Damage Mod on items from changing elemental damage.
2022-01-16 23:18:08 -05:00
Stephen C. Wills
7525193a9f
Calculate Fireball missile damage in collision logic
...
Co-authored-by: Andrew James <ephphatha@thelettereph.com>
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
2022-01-09 02:29:08 +01:00
SoundChaser83
a7041bb435
Fix Torchant and Hellbat damage range being ignored
...
Monsters like weren't using their min/max damage from the monster data table to determine Fireball damage
2022-01-09 02:29:08 +01:00
SoundChaser83
b52724a15e
Fix monster damage potentially being off by 63/64th
...
Monster damage values from melee/missile hits could potentially add or subtract up to 63/64ths of damage over and above a monster's usual damage range
Co-authored-by: Stephen C. Wills <staphen@gmail.com>
2022-01-09 02:29:08 +01:00
KPhoenix
02dc1f193e
Cleanup missiles.cpp ( #3883 )
2022-01-06 10:04:14 +01:00
Anders Jenbo
6b2481a76c
Touch support on all SDL2 platforms
2022-01-02 11:37:38 +01:00
ephphatha
82e9c3ea14
Clean up remaining dObject references in missiles.cpp
2021-12-28 16:01:37 +01:00
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
2021-12-28 16:01:37 +01:00
Anders Jenbo
64e0f65f38
Fix MonsterMHit check for petrified monsters
2021-11-19 03:40:00 +01:00
Andrew James
8104432db4
Use object reference (and self-id lookup) for BreakBarrel
2021-11-08 00:51:16 +01:00
Anders Jenbo
56170b3372
Clean up id normalization
2021-11-07 23:15:10 +01:00
ephphatha
07843bd007
Separate search and spawn logic for AddRune
2021-11-07 20:13:31 +01:00
ephphatha
93425deb92
Separate search and effect logic for berserk
2021-11-07 20:13:31 +01:00
ephphatha
a79d1fa9f7
Separate search and effect logic for mana trap
2021-11-07 20:13:31 +01:00
ephphatha
aedb1c5526
Separate search and spawn logic for teleport
2021-11-07 20:13:31 +01:00
ephphatha
9201a27b99
Separate search and spawn logic for town portal
2021-11-07 20:13:31 +01:00
ephphatha
ef02982465
Tidy up guardian spawn routine
2021-11-07 20:13:31 +01:00
ephphatha
a0a8ce93a7
Separate logic for targeting a monster and applying Petrify
2021-11-07 20:13:31 +01:00
ephphatha
9e133afd8a
Tidy up golem spawn routine
2021-11-07 20:13:31 +01:00
ephphatha
958602d600
Use FindClosestValidPosition for casting firewall
2021-11-07 20:13:31 +01:00
ephphatha
b5bda7dbeb
Use FindClosestValidPosition when placing Hork Spawn
2021-11-07 20:13:31 +01:00
ephphatha
db8b8c245e
Use FindClosestValidPosition for FindClosestMonster
2021-11-07 20:13:31 +01:00
Andrew James
796e2813cf
Use scoped enums for DungeonFlags/BFLAG ( #3135 )
2021-11-07 03:11:16 +01:00
qndel
bf1df33aa8
dont allow casting berserk on berserked monster
2021-11-06 18:33:36 +01:00
Andrew James
021c7a652f
Add helpers for checking object type ( #3357 )
...
* Add helper to test if an object is a trap source
* Add helper to test if an object is a barrel
* Add helper to test if an object is a crucifix
* Add helpers to check if an object is a chest (and statuses)
* Add helpers to check if an object is a (basic) shrine
2021-11-06 18:32:52 +01:00
staphen
c698e06596
Rotate arrows in the appropriate direction when blocking
2021-10-26 23:37:59 +02:00
qndel
1bb5d6a0fa
fix multiplayer hit sounds
2021-10-25 18:07:01 +02:00
qndel
c1108a2ee8
fix acid missiles ( #3224 )
2021-10-23 17:57:07 +02:00
Thomas Christlieb
5cc56467da
rename variable in old code
2021-10-16 03:04:18 +02:00
qndel
acf4ef880d
fix lightning rune damage
2021-10-08 10:46:03 +02:00
qndel
c39c6ce7bb
make lightning trap hit multiple times again
2021-10-06 10:47:38 +02:00
Anders Jenbo
2708b16c05
Validate CMD_SYNCDATA ( #2968 )
2021-09-30 15:38:10 +02:00
Alex
6df826eb02
Fix compiler warnings
2021-09-23 19:06:37 +02:00
qndel
0569dba547
fix typos
2021-09-19 10:14:06 +01:00
obligaron
9964bd9e49
Fix existing missiles check for Guardian/Townportal/Rune
2021-09-15 00:25:48 +02:00
Siddharth singh chouhan
bcb332b7b0
Move documentation from implementations to declarations
2021-09-14 09:55:55 +02:00
Juliano Leal Goncalves
379a27b64a
♻️ Convert 'ItemType' enum to enum class
...
🎨 Rename 'ItemType' elements to enum class standards
2021-09-13 00:25:49 +02:00
ephphatha
9ef77cb428
Use scoped enum for Direction16.
...
Allows renaming the members to share names with Direction members when
representing the same conceptual direction.
2021-09-12 02:27:47 +02:00
ephphatha
9c9426821d
Update MoveMissilePos to use Direction and Displacement types.
...
Remove explicit cases falling through to default case in MoveMissilePos
2021-09-12 02:27:47 +02:00
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
2021-09-12 02:27:47 +02:00
obligaron
836bb92e8e
MoveMissileAndCheckMissileCol: Call CheckMissileCol only once for a tile and target
2021-09-11 22:21:37 +02:00