2022-01-23 10:58:54 +00:00
class DukeActor : CoreActor native
{
2022-01-25 23:37:11 +00:00
enum EStatnums
{
STAT_DEFAULT = 0,
STAT_ACTOR = 1,
STAT_ZOMBIEACTOR = 2,
STAT_EFFECTOR = 3,
STAT_PROJECTILE = 4,
STAT_MISC = 5,
STAT_STANDABLE = 6,
STAT_LOCATOR = 7,
STAT_ACTIVATOR = 8,
STAT_TRANSPORT = 9,
STAT_PLAYER = 10,
STAT_FX = 11,
STAT_FALLER = 12,
STAT_DUMMYPLAYER = 13,
STAT_LIGHT = 14,
STAT_RAROR = 15,
STAT_DESTRUCT = 100,
STAT_BOWLING = 105,
};
2022-01-26 21:51:36 +00:00
native void SetSpritesetImage(int index);
2022-01-25 23:37:11 +00:00
2022-01-23 23:10:25 +00:00
native DukeActor ownerActor, hitOwnerActor;
native uint8 cgg;
native uint8 spriteextra; // moved here for easier maintenance. This was originally a hacked in field in the sprite structure called 'filler'.
2022-09-11 22:11:44 +00:00
native int16 /*attackertype, hitang,*/ hitextra, movflag;
2022-09-14 21:30:10 +00:00
native int16 tempval; /*, dispicnum;*/
2022-01-23 23:10:25 +00:00
native int16 timetosleep;
2022-02-03 23:32:02 +00:00
native double floorz, ceilingz;
2022-01-23 23:10:25 +00:00
native int saved_ammo;
native int palvals;
native int temp_data[6];
native private int flags1, flags2;
2022-02-20 23:19:26 +00:00
native walltype temp_walls[2];
native sectortype temp_sect, actorstayput;
2022-01-23 23:10:25 +00:00
native DukeActor temp_actor, seek_actor;
flagdef Inventory: flags1, 0;
flagdef ShrinkAutoaim: flags1, 1;
flagdef Badguy: flags1, 2;
flagdef ForceAutoaim: flags1, 3;
flagdef Boss: flags1, 4;
flagdef Badguystayput: flags1, 5;
flagdef GreenSlimeFood: flags1, 6;
flagdef NoDamagePush: flags1, 7;
flagdef NoWaterDrip: flags1, 8;
flagdef InternalBadguy: flags1, 9;
flagdef Killcount: flags1, 10;
flagdef NoCanSeeCheck: flags1, 11;
flagdef HitRadiusCheck: flags1, 12;
flagdef MoveFTA_CheckSee: flags1, 13;
flagdef MoveFTA_MakeStandable: flags1, 14;
flagdef TriggerIfHitSector: flags1, 15;
//flagdef MoveFTA_WakeupCheck: flags1, 16; // this one needs to be auto-set for RR, not for Duke, should not be exposed unless the feature becomes generally available.
flagdef CheckSeeWithPal8: flags1, 17;
flagdef NoShadow: flags1, 18;
2022-01-25 21:26:53 +00:00
flagdef SE24_NoFloorCheck: flags1, 19;
flagdef NoInterpolate: flags1, 20;
2022-01-25 23:37:11 +00:00
2022-02-20 23:19:26 +00:00
native void getglobalz();
native DukePlayer findplayer();
native int ifhitbyweapon();
native int domove(int clipmask);
native void PlayActorSound(int snd);
2022-01-25 23:37:11 +00:00
virtual void BeginPlay() {}
2022-02-20 23:19:26 +00:00
virtual void Initialize() {}
virtual void Tick() {}
2022-01-17 23:30:43 +00:00
virtual void onHit(DukeActor hitter) {}
2022-11-14 09:22:22 +00:00
virtual void onUse(DukePlayer user) {}
2022-01-19 17:52:52 +00:00
virtual bool animate(tspritetype tspr) { return false; }
2022-02-20 23:19:26 +00:00
virtual void RunState() {} // this is the CON function.
2022-01-23 10:58:54 +00:00
}
2022-01-25 23:16:21 +00:00
extend struct _
{
2022-11-14 09:23:54 +00:00
native DukeGameInfo gs;
2022-01-25 23:16:21 +00:00
native DukeLevel dlevel;
}
// The level struct is a wrapper to group all level related global variables and static functions into one object.
// On the script side we do not really want scattered global data that is publicly accessible.
struct DukeLevel
{
}
2022-11-12 18:09:38 +00:00
struct DukeStatIterator
2022-01-25 23:16:21 +00:00
{
2022-11-12 18:09:38 +00:00
private DukeActor nextp;
2022-01-25 23:16:21 +00:00
native DukeActor Next();
2022-11-12 18:09:38 +00:00
native DukeActor First(int stat);
2022-01-25 23:16:21 +00:00
}
2022-11-12 18:09:38 +00:00
struct DukeSectIterator
2022-01-25 23:16:21 +00:00
{
2022-11-12 18:09:38 +00:00
private DukeActor nextp;
2022-01-25 23:16:21 +00:00
native DukeActor Next();
2022-11-12 18:09:38 +00:00
native DukeActor First(sectortype sect);
2022-01-25 23:16:21 +00:00
}
2022-11-12 18:09:38 +00:00
struct DukeSpriteIterator
2022-01-25 23:16:21 +00:00
{
2022-11-12 18:09:38 +00:00
private DukeActor nextp;
private int stat;
2022-01-25 23:16:21 +00:00
native DukeActor Next();
2022-11-12 18:09:38 +00:00
native DukeActor First();
2022-01-25 23:16:21 +00:00
}