Quasar
Moderator

Posts: 5150
Registered: 08-00 |
printz said:
What I tried to say in that post was that if thing frames are defined via Decorate, I won't be able to create Delta structures to individual frames any more, so it will be more work to patch a custom monster from another mod to act slightly differently. I trust that there'll still be a root FRAMES.EDF containing classically defined frames?
For compatibility reasons, yes, the frames for DOOM objects must remain defined as global states. I may or may not convert Heretic's objects to DECORATE states; it depends on the feedback I get in response to this idea. Strife and Hexen's things will be defined using them from the get-go.
It will soon be possible to completely replace (including via DoomEdNum) objects by inheriting from them, and at that point, what you'd do rather than use a framedelta is simply replace the state sequences that need to be different. The rest will be inherited, and can be used by utilization of the Super:: specifier, a parent thingtype namespace, or just the simple bare label name if it hasn't been overridden in the child type, in goto labels and A_Jump targets. The only reason this hasn't been possible up til now is because Lee's DoomEdNum hash table is volatile and doesn't guarantee that the newest thing using a DoomEdNum is necessarily the one that will be gotten from the hash table. I intend to replace that hash with one that has the guaranteed properties of EE's other hashes.
This is the sexy thing about metatables - I just call MetaCopyTable and an inheriting thing automagically gets all of its parent's metastates :D
EDIT: It's probably important for me to mention this fact explicitly: Even an object which does not use DECORATE states can be inherited from and have its native state fields referenced using the corresponding DECORATE state labels. Native state labels currently include Spawn, See, Pain, Missile, Melee, Death, XDeath, Raise, and Crash. So for instance this is perfectly valid (however pointless - there are actual possible uses for it, of course) EDF:
code:
thingtype Foo { spawnstate S_FOO }
thingtype Bar
{
inherits Foo
states =
@"
Spawn:
goto Super::Spawn
"@
}
Last edited by Quasar on 08-12-10 at 14:39
|