mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- finished the state usage parser.
- added state usage specifiers to Actor and Inventory. The states in these classes must be set to full access so that any existing mod can link to them.
This commit is contained in:
parent
c797319314
commit
4f998fa879
4 changed files with 36 additions and 2 deletions
|
@ -736,3 +736,4 @@ xx(DamageFunction)
|
||||||
xx(Length)
|
xx(Length)
|
||||||
xx(Unit)
|
xx(Unit)
|
||||||
xx(StateLabel)
|
xx(StateLabel)
|
||||||
|
xx(Overlay)
|
||||||
|
|
|
@ -2387,6 +2387,39 @@ void ZCCCompiler::CompileStates()
|
||||||
|
|
||||||
for (auto s : c->States)
|
for (auto s : c->States)
|
||||||
{
|
{
|
||||||
|
int flags;
|
||||||
|
if (s->Flags != nullptr)
|
||||||
|
{
|
||||||
|
flags = 0;
|
||||||
|
auto p = s->Flags;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
switch (p->Id)
|
||||||
|
{
|
||||||
|
case NAME_Actor:
|
||||||
|
flags |= SUF_ACTOR;
|
||||||
|
break;
|
||||||
|
case NAME_Overlay:
|
||||||
|
flags |= SUF_OVERLAY;
|
||||||
|
break;
|
||||||
|
case NAME_Weapon:
|
||||||
|
flags |= SUF_WEAPON;
|
||||||
|
break;
|
||||||
|
case NAME_Item:
|
||||||
|
flags |= SUF_ITEM;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Error(p, "Unknown States qualifier %s", FName(p->Id).GetChars());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
p = static_cast<decltype(p)>(p->SiblingNext);
|
||||||
|
} while (p != s->Flags);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flags = static_cast<PClassActor *>(c->Type())->DefaultStateUsage;
|
||||||
|
}
|
||||||
auto st = s->Body;
|
auto st = s->Body;
|
||||||
if (st != nullptr) do
|
if (st != nullptr) do
|
||||||
{
|
{
|
||||||
|
|
|
@ -489,7 +489,7 @@ class Actor : Thinker native
|
||||||
return ACS_ExecuteAlways(-int(script), mapnum, arg1, arg2, arg3);
|
return ACS_ExecuteAlways(-int(script), mapnum, arg1, arg2, arg3);
|
||||||
}
|
}
|
||||||
|
|
||||||
States
|
States(Actor, Overlay, Weapon, Item)
|
||||||
{
|
{
|
||||||
Spawn:
|
Spawn:
|
||||||
TNT1 A -1;
|
TNT1 A -1;
|
||||||
|
|
|
@ -16,7 +16,7 @@ class Inventory : Actor native
|
||||||
private native void A_RestoreSpecialThing1();
|
private native void A_RestoreSpecialThing1();
|
||||||
private native void A_RestoreSpecialThing2();
|
private native void A_RestoreSpecialThing2();
|
||||||
|
|
||||||
States
|
States(Actor, Overlay, Weapon, Item)
|
||||||
{
|
{
|
||||||
HideDoomish:
|
HideDoomish:
|
||||||
TNT1 A 1050;
|
TNT1 A 1050;
|
||||||
|
|
Loading…
Reference in a new issue