Commit graph

21313 commits

Author SHA1 Message Date
Christoph Oelckers
7629bae10c split up the death code among the enemy classes.
Not syntax converted yet - will not start.
2023-10-12 20:10:47 +02:00
Christoph Oelckers
401f0affd7 more sound properties for dudes, also use sound names instead of IDs. 2023-10-12 18:06:43 +02:00
Christoph Oelckers
2e054dd827 WIP for actKillDude scriptification 2023-10-12 18:06:43 +02:00
Christoph Oelckers
c4a0692c76 use properties for letting enemies burn 2023-10-12 18:05:51 +02:00
Christoph Oelckers
2a773e2028 implement better ways to get the player index. 2023-10-12 18:05:51 +02:00
Christoph Oelckers
b8720c3329 make one headed cerberus inherit from two-headed one to share some data. 2023-10-12 18:05:51 +02:00
Christoph Oelckers
7ff478be9f replaced all existing sound IDs with names in script code.
These can be resolved at compile time, unlike the IDs and also increase readibility.
2023-10-12 18:05:51 +02:00
Christoph Oelckers
f2e6b2e0fa did some flag naming 2023-10-12 18:05:51 +02:00
Christoph Oelckers
382d8caf6d move cerberus states into the respective actors.
This is also a place where it allows to simplify the code.
2023-10-12 18:05:51 +02:00
Christoph Oelckers
d0621535bf moved the burn states into their respective actors.
This allowed getting rid of a few switch/case blocks
2023-10-12 18:05:50 +02:00
Christoph Oelckers
5ed69f4965 precaching abstraction.
Due to the use of SEQ IDs this is a bit ugly, with named SEQs the whole thing is more straightforward.
2023-10-12 18:05:43 +02:00
Christoph Oelckers
9eef6c42cb rework of the SEQ code.
Mostly redone by integrating Raze's changes into Blood-RE's version.
The BitReader was replaced with an independent implementation that's not integrated into the backend.
Most importantly this decouples the internal representation of SEQs from Blood's file format so a format redesign is doable.
2023-10-12 18:01:26 +02:00
Christoph Oelckers
eb7d3c542e eliminated all remaining uses of kDudeBase and kDudeMax outside of 'modern' code. 2023-10-11 00:35:16 +02:00
Christoph Oelckers
54858fc4e7 use a class pointer to store the initial type of an actor.
This decouples it from the type numbers.
2023-10-11 00:30:19 +02:00
Christoph Oelckers
c400a20c5a fix compilation of release builds. 2023-10-11 00:17:28 +02:00
Christoph Oelckers
49e5919229 enabled nnext's grow and shrink shrooms by feature flag.
This is a contained feature with no wide reaching impact so it's fine to support.
2023-10-11 00:05:56 +02:00
Christoph Oelckers
4deb01bc42 fix some bad English 2023-10-10 23:42:39 +02:00
Christoph Oelckers
c0d1c8c5ba floorhitdamage for several dudes. 2023-10-10 23:40:37 +02:00
Christoph Oelckers
ecf15a35cb use a flag for checking if a dude is burning. 2023-10-10 23:29:27 +02:00
Christoph Oelckers
4f7ed35655 deathMorphType property 2023-10-10 23:20:53 +02:00
Christoph Oelckers
16bde524ff clean up burning dude handling in actCheckDudes 2023-10-10 23:12:50 +02:00
Christoph Oelckers
142ca04d80 named sequences WIP. 2023-10-10 22:51:08 +02:00
Christoph Oelckers
e0195ecab5 allow passing resource IDs to sound properties and added some test code. 2023-10-10 20:10:58 +02:00
Christoph Oelckers
7851b686ec scriptified the onHit block in actCheckThings. 2023-10-10 19:01:29 +02:00
Christoph Oelckers
3b39e1db99 scriptified and split up actSpawnThing 2023-10-09 23:11:55 +02:00
Christoph Oelckers
0abba1ab7d cleaned up actInitDude.
Moved the modernDude stuff to a commented out stub in aiunicult and made custom monster health an engine feature.
2023-10-09 19:07:14 +02:00
Christoph Oelckers
2f6998f980 removed all calls to getMassBySize.
This should be handled more transparently if it gets reimplemented.
2023-10-09 18:58:27 +02:00
Christoph Oelckers
7f0b501aa2 final fixes.
Restore one hard coded seq access.
When changing actor type, also copy the dmgControl table to have the correct values available.
delete unused thinginfo table.
2023-10-09 16:58:09 +02:00
Christoph Oelckers
1260873add converted the remaining accesses to dudeInfo and removed the table. 2023-10-09 16:58:09 +02:00
Christoph Oelckers
5ea03b339f fixed problem with retrieving mass from a former dude actor in actFireVector.
This was accessing undefined memory because the new metadata no longer had the field. Moved mass to BloodActor so that access remains safe and defined.
This seems to be the only place where this happened.
2023-10-09 16:58:09 +02:00
Christoph Oelckers
49ee6fcc30 somewhere in here there's a bug! 2023-10-09 16:58:05 +02:00
Christoph Oelckers
99b055de7f dudeinfo in player.cpp 2023-10-09 16:58:05 +02:00
Christoph Oelckers
e92cb971eb replacements in 3 files with smaller numbers of places. 2023-10-09 16:58:05 +02:00
Christoph Oelckers
7450e82dd8 moving nnext stuff plus some replacements in inactive code. 2023-10-09 16:58:04 +02:00
Christoph Oelckers
92eb20e1ad adapted all AI files 2023-10-09 16:58:04 +02:00
Christoph Oelckers
55621e9a38 access functions for the dudeinfo properties.
These get used quite often so look them up only once.
2023-10-09 16:58:04 +02:00
Christoph Oelckers
7bf6702a6a added all dudeinfo data to the dude classes. 2023-10-09 16:58:04 +02:00
Christoph Oelckers
8af7049c00 use symbolic constants for explosion types. 2023-10-09 16:58:00 +02:00
Christoph Oelckers
8bb286abe0 replace sprintf with snprintf. 2023-10-09 16:57:13 +02:00
Christoph Oelckers
9f0fa74a9a fixed Mac compilation.
Unlike the other platforms this builds its config paths from variable data.
2023-10-09 16:46:54 +02:00
Mitchell Richters
fed196d8ec - Apply last remaining .GetChars() fixes for POSIX targets. 2023-10-09 19:08:31 +11:00
Christoph Oelckers
15963c7b61 fix compilation of non-windows targets. 2023-10-09 19:02:37 +11:00
Christoph Oelckers
90969d7ce1 make TrapExploder feature controlled by a flag.
This part of nnext can be retained easily this way.
2023-10-08 17:15:26 +02:00
Christoph Oelckers
e1ae2a091e activated the state pointer serializer. 2023-10-08 17:09:14 +02:00
Christoph Oelckers
60c44d74ca migrate Blood to engine states.
This both enables saving again and allows efficient state searching.
2023-10-08 16:55:58 +02:00
Christoph Oelckers
d898d1e53d helper function 2023-10-08 14:08:00 +02:00
Christoph Oelckers
71e8757a81 #ifdef some nnext stuff 2023-10-08 13:37:45 +02:00
Christoph Oelckers
2d37705921 fix a memory leak 2023-10-08 13:25:53 +02:00
Christoph Oelckers
44214d4d23 added 5 missing states and renamed a few. 2023-10-08 13:21:51 +02:00
Christoph Oelckers
bd44d87ce7 compile AI states into the engine's state array. 2023-10-08 13:21:15 +02:00