mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 15:40:58 +00:00
- added the native property handlers for CoreActor.
This commit is contained in:
parent
0a6a5fe871
commit
e206a71448
2 changed files with 186 additions and 5 deletions
|
@ -186,18 +186,18 @@ int MatchString (const char *in, const char **strings);
|
|||
|
||||
|
||||
#define DEFINE_PROPERTY_BASE(name, paramlist, clas, cat) \
|
||||
static void Handler_##name##_##paramlist##_##clas(A##clas *defaults, PClassActor *info, Baggage &bag, FPropParam *params); \
|
||||
static void Handler_##name##_##paramlist##_##clas(D##clas *defaults, PClassActor *info, Baggage &bag, FPropParam *params); \
|
||||
static FPropertyInfo Prop_##name##_##paramlist##_##clas = \
|
||||
{ #name, #paramlist, #clas, (PropHandler)Handler_##name##_##paramlist##_##clas, cat }; \
|
||||
MSVC_PSEG FPropertyInfo *infoptr_##name##_##paramlist##_##clas GCC_PSEG = &Prop_##name##_##paramlist##_##clas; \
|
||||
static void Handler_##name##_##paramlist##_##clas(A##clas *defaults, PClassActor *info, Baggage &bag, FPropParam *params)
|
||||
static void Handler_##name##_##paramlist##_##clas(D##clas *defaults, PClassActor *info, Baggage &bag, FPropParam *params)
|
||||
|
||||
#define DEFINE_PREFIXED_PROPERTY_BASE(prefix, name, paramlist, clas, cat) \
|
||||
static void Handler_##name##_##paramlist##_##clas(A##clas *defaults, PClassActor *info, Baggage &bag, FPropParam *params); \
|
||||
static void Handler_##name##_##paramlist##_##clas(D##clas *defaults, PClassActor *info, Baggage &bag, FPropParam *params); \
|
||||
static FPropertyInfo Prop_##name##_##paramlist##_##clas = \
|
||||
{ #prefix"."#name, #paramlist, #clas, (PropHandler)Handler_##name##_##paramlist##_##clas, cat }; \
|
||||
MSVC_PSEG FPropertyInfo *infoptr_##name##_##paramlist##_##clas GCC_PSEG = &Prop_##name##_##paramlist##_##clas; \
|
||||
static void Handler_##name##_##paramlist##_##clas(A##clas *defaults, PClassActor *info, Baggage &bag, FPropParam *params)
|
||||
static void Handler_##name##_##paramlist##_##clas(D##clas *defaults, PClassActor *info, Baggage &bag, FPropParam *params)
|
||||
|
||||
#define DEFINE_PREFIXED_SCRIPTED_PROPERTY_BASE(prefix, name, paramlist, clas, cat) \
|
||||
static void Handler_##name##_##paramlist##_##clas(DCoreActor *defaults, PClassActor *info, Baggage &bag, FPropParam *params); \
|
||||
|
|
|
@ -307,4 +307,185 @@ static bool PointerCheck(PType *symtype, PType *checktype)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
// todo
|
||||
//==========================================================================
|
||||
//
|
||||
// Default spritetype fields need to set an additional flag
|
||||
// so we need native handlers for them
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(pic, S, CoreActor)
|
||||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->spr.picnum = 0; // todo
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_PICNUM;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(statnum, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.statnum = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_STATNUM;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(angle, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.ang = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_ANG;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(xvel, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.xvel = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_XVEL;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(yvel, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.yvel = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_YVEL;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(zvel, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.zvel = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_ZVEL;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(lotag, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.lotag = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_LOTAG;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(hitag, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.lotag = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_HITAG;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(extra, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.lotag = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_EXTRA;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(detail, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.detail = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_DETAIL;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(shade, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.shade = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_SHADE;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(pal, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.pal = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_PAL;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(clipdist, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.clipdist = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_CLIPDIST;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(xrepeat, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.xrepeat = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_XREPEAT;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(yrepeat, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.yrepeat = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_YREPEAT;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(xoffset, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.xoffset = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_XOFFSET;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(yoffset, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.yoffset = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_YOFFSET;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(owner, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
defaults->spr.owner = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_OWNER;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue