DEFINE_ACTION_FUNCTION(FDynArray_String, Copy) { PARAM_SELF_STRUCT_PROLOGUE(FDynArray_String); PARAM_POINTER(other, FDynArray_String); *self = *other; return 0; }
DEFINE_ACTION_FUNCTION(FDynArray_I8, Move) { PARAM_SELF_STRUCT_PROLOGUE(FDynArray_I8); PARAM_POINTER(other, FDynArray_I8); *self = std::move(*other); return 0; }
DEFINE_ACTION_FUNCTION(_Translation, SetPlayerTranslation) { PARAM_PROLOGUE; PARAM_UINT(tgroup); PARAM_UINT(tnum); PARAM_UINT(pnum); PARAM_POINTER(cls, FPlayerClass); if (pnum >= MAXPLAYERS || tgroup >= NUM_TRANSLATION_TABLES || tnum >= translationtables[tgroup].Size()) { ACTION_RETURN_BOOL(false); } auto self = &players[pnum]; int PlayerColor = self->userinfo.GetColor(); int PlayerSkin = self->userinfo.GetSkin(); int PlayerColorset = self->userinfo.GetColorSet(); if (cls != nullptr) { PlayerSkin = R_FindSkin(Skins[PlayerSkin].Name, int(cls - &PlayerClasses[0])); R_GetPlayerTranslation(PlayerColor, GetColorSet(cls->Type, PlayerColorset), &Skins[PlayerSkin], translationtables[tgroup][tnum]); } ACTION_RETURN_BOOL(true); }
DEFINE_ACTION_FUNCTION(DPSprite, SetState) { PARAM_SELF_PROLOGUE(DPSprite); PARAM_POINTER(state, FState); PARAM_BOOL(pending); self->SetState(state, pending); return 0; }
DEFINE_ACTION_FUNCTION(_PlayerInfo, SetPSprite) // the underscore is needed to get past the name mangler which removes the first clas name character to match the class representation (needs to be fixed in a later commit) { PARAM_SELF_STRUCT_PROLOGUE(player_t); PARAM_INT(id); PARAM_POINTER(state, FState); PARAM_BOOL(pending); P_SetPsprite(self, (PSPLayers)id, state, pending); return 0; }
//=========================================================================== // // LevelLocals.SpawnParticle // //=========================================================================== DEFINE_ACTION_FUNCTION(FLevelLocals, SpawnParticle) { PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals); PARAM_POINTER(particle, FParticleOptions); FParticle *newparticle = NewParticle(self); if (newparticle) { newparticle->LoadFromOptions(*particle); } }
DEFINE_ACTION_FUNCTION(DFloor, CreateFloor) { PARAM_PROLOGUE; PARAM_POINTER_NOT_NULL(sec, sector_t); PARAM_INT(floortype); PARAM_POINTER(ln, line_t); PARAM_FLOAT(speed); PARAM_FLOAT_DEF(height); PARAM_INT_DEF(crush); PARAM_INT_DEF(change); PARAM_BOOL_DEF(hereticlower); PARAM_BOOL_DEF(hexencrush); ACTION_RETURN_BOOL(P_CreateFloor(sec, (DFloor::EFloor)floortype, ln, speed, height, crush, change, hexencrush, hereticlower)); }
DEFINE_ACTION_FUNCTION(DCeiling, CreateCeiling) { PARAM_PROLOGUE; PARAM_POINTER_NOT_NULL(sec, sector_t); PARAM_INT(type); PARAM_POINTER(ln, line_t); PARAM_FLOAT(speed); PARAM_FLOAT(speed2); PARAM_FLOAT_DEF(height); PARAM_INT_DEF(crush); PARAM_INT_DEF(silent); PARAM_INT_DEF(change); PARAM_INT_DEF(crushmode); ACTION_RETURN_BOOL(P_CreateCeiling(sec, (DCeiling::ECeiling)type, ln, 0, speed, speed2, height, crush, silent, change, (DCeiling::ECrushMode)crushmode)); }
DEFINE_ACTION_FUNCTION(AActor, GetReplacee) { PARAM_PROLOGUE; PARAM_POINTER(c, PClassActor); ACTION_RETURN_POINTER(c->GetReplacee()); }