mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-06 04:50:26 +00:00
9ae272d753
- scriptified all Effect functions of Fastprojectile's children - implemented access to class meta data. - added a VM instruction to retrieve the class metadata, to eliminate the overhead of the function call that would otherwise be needed. - made GetClass() a builtin so that it can use the new instruction Important note about this commit: Scriptifying CFlameMissile::Effect revealed a problem with the virtual function interface: In order to work, this needs to be explicitly enabled for each single native class that may be used as a base for a scripted class. Needless to say, this will end up way too much work, as there are over 100 native classes, excluding those which will be scriptified. But in order to fix the problem this partially broken state needs to be committed first.
116 lines
2.5 KiB
Text
116 lines
2.5 KiB
Text
class Object native
|
|
{
|
|
native bool bDestroyed;
|
|
|
|
// These really should be global functions...
|
|
native static int G_SkillPropertyInt(int p);
|
|
native static double G_SkillPropertyFloat(int p);
|
|
|
|
virtual native void Destroy();
|
|
}
|
|
|
|
class Thinker : Object native
|
|
{
|
|
const TICRATE = 35;
|
|
|
|
virtual native void Tick();
|
|
virtual native void PostBeginPlay();
|
|
}
|
|
|
|
class ThinkerIterator : Object native
|
|
{
|
|
enum EStatnums
|
|
{
|
|
MAX_STATNUM = 127
|
|
}
|
|
|
|
native static ThinkerIterator Create(class<Object> type = "Actor", int statnum=MAX_STATNUM+1);
|
|
native Thinker Next(bool exact = false);
|
|
native void Reinit();
|
|
}
|
|
|
|
class ActorIterator : Object native
|
|
{
|
|
native static ActorIterator Create(int tid, class<Actor> type = "Actor");
|
|
native Actor Next();
|
|
native void Reinit();
|
|
}
|
|
|
|
class DropItem : Object native
|
|
{
|
|
native readonly DropItem Next;
|
|
native readonly name Name;
|
|
native readonly int Probability;
|
|
native int Amount;
|
|
}
|
|
|
|
class SpotState : Object native
|
|
{
|
|
native static SpotState GetSpotState();
|
|
native SpecialSpot GetNextInList(class<Actor> type, int skipcounter);
|
|
native SpecialSpot GetSpotWithMinMaxDistance(Class<Actor> type, double x, double y, double mindist, double maxdist);
|
|
|
|
}
|
|
|
|
struct LevelLocals native
|
|
{
|
|
native readonly int time;
|
|
native readonly int maptime;
|
|
native readonly int totaltime;
|
|
native readonly int starttime;
|
|
native readonly int partime;
|
|
native readonly int sucktime;
|
|
native readonly int cluster;
|
|
native readonly int clusterflags;
|
|
native readonly int levelnum;
|
|
native readonly String LevelName;
|
|
native readonly String MapName;
|
|
native String NextMap;
|
|
native String NextSecretMap;
|
|
native readonly int maptype;
|
|
native readonly String Music;
|
|
native readonly int musicorder;
|
|
native readonly int total_secrets;
|
|
native int found_secrets;
|
|
native readonly int total_items;
|
|
native int found_items;
|
|
native readonly int total_monsters;
|
|
native int killed_monsters;
|
|
native double gravity;
|
|
native double aircontrol;
|
|
native double airfriction;
|
|
native int airsupply;
|
|
native double teamdamage;
|
|
native bool monsterstelefrag;
|
|
native bool actownspecial;
|
|
native bool sndseqtotalctrl;
|
|
native bool allmap;
|
|
native bool missilesactivateimpact;
|
|
native bool monsterfallingdamage;
|
|
native bool checkswitchrange;
|
|
native bool polygrind;
|
|
// level_info_t *info cannot be done yet.
|
|
}
|
|
|
|
struct State native
|
|
{
|
|
State NextState;
|
|
int sprite;
|
|
int16 Tics;
|
|
uint16 TicRange;
|
|
uint8 Frame;
|
|
uint8 UseFlags;
|
|
int Misc1;
|
|
int Misc2;
|
|
uint16 bSlow;
|
|
uint16 bFast;
|
|
bool bFullbright;
|
|
bool bNoDelay;
|
|
bool bSameFrame;
|
|
bool bCanRaise;
|
|
bool bDehacked;
|
|
}
|
|
|
|
struct Sector native
|
|
{
|
|
}
|