- removed the default parameter handling from all native script functions because it is no longer needed.

This commit is contained in:
Christoph Oelckers 2018-11-17 10:03:40 +01:00
commit 94ed30e782
45 changed files with 736 additions and 769 deletions

View file

@ -261,8 +261,8 @@ DEFINE_ACTION_FUNCTION(AActor, SoundAlert)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_OBJECT(target, AActor);
PARAM_BOOL_DEF(splash);
PARAM_FLOAT_DEF(maxdist);
PARAM_BOOL(splash);
PARAM_FLOAT(maxdist);
// Note that the emitter is self, not the target of the alert! Target can be NULL.
P_NoiseAlert(target, self, splash, maxdist);
return 0;
@ -1350,7 +1350,7 @@ DEFINE_ACTION_FUNCTION(AActor, IsVisible)
PARAM_SELF_PROLOGUE(AActor);
PARAM_OBJECT(other, AActor);
PARAM_BOOL(allaround);
PARAM_POINTER_DEF(params, FLookExParams);
PARAM_POINTER(params, FLookExParams);
ACTION_RETURN_BOOL(P_IsVisible(self, other, allaround, params));
}
@ -1589,7 +1589,7 @@ DEFINE_ACTION_FUNCTION(AActor, LookForTID)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_BOOL(allaround);
PARAM_POINTER_DEF(params, FLookExParams);
PARAM_POINTER(params, FLookExParams);
ACTION_RETURN_BOOL(P_LookForTID(self, allaround, params));
}
@ -1736,7 +1736,7 @@ DEFINE_ACTION_FUNCTION(AActor, LookForEnemies)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_BOOL(allaround);
PARAM_POINTER_DEF(params, FLookExParams);
PARAM_POINTER(params, FLookExParams);
ACTION_RETURN_BOOL(P_LookForEnemies(self, allaround, params));
}
@ -1931,7 +1931,7 @@ DEFINE_ACTION_FUNCTION(AActor, LookForPlayers)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_BOOL(allaround);
PARAM_POINTER_DEF(params, FLookExParams);
PARAM_POINTER(params, FLookExParams);
ACTION_RETURN_BOOL(P_LookForPlayers(self, allaround, params));
}
@ -2067,12 +2067,12 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look)
DEFINE_ACTION_FUNCTION(AActor, A_LookEx)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_INT_DEF (flags)
PARAM_FLOAT_DEF (minseedist)
PARAM_FLOAT_DEF (maxseedist)
PARAM_FLOAT_DEF (maxheardist)
PARAM_ANGLE_DEF (fov)
PARAM_STATE_DEF (seestate)
PARAM_INT (flags)
PARAM_FLOAT (minseedist)
PARAM_FLOAT (maxseedist)
PARAM_FLOAT (maxheardist)
PARAM_ANGLE (fov)
PARAM_STATE (seestate)
AActor *targ = NULL; // Shuts up gcc
double dist;
@ -2284,7 +2284,7 @@ enum ChaseFlags
DEFINE_ACTION_FUNCTION(AActor, A_Wander)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_INT_DEF(flags);
PARAM_INT(flags);
A_Wander(self, flags);
return 0;
}
@ -2972,9 +2972,9 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates)
DEFINE_ACTION_FUNCTION(AActor, A_Chase)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_STATE_DEF (melee)
PARAM_STATE_DEF (missile)
PARAM_INT_DEF (flags)
PARAM_STATE (melee)
PARAM_STATE (missile)
PARAM_INT (flags)
if (melee != nullptr || missile != nullptr || flags != 0x40000000)
{
@ -3013,8 +3013,8 @@ DEFINE_ACTION_FUNCTION(AActor, A_ExtChase)
PARAM_SELF_PROLOGUE(AActor);
PARAM_BOOL (domelee);
PARAM_BOOL (domissile);
PARAM_BOOL_DEF (playactive);
PARAM_BOOL_DEF (nightmarefast);
PARAM_BOOL (playactive);
PARAM_BOOL (nightmarefast);
// Now that A_Chase can handle state label parameters, this function has become rather useless...
A_DoChase(self, false,
@ -3158,12 +3158,12 @@ DEFINE_ACTION_FUNCTION(AActor, A_Face)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_OBJECT(faceto, AActor)
PARAM_ANGLE_DEF(max_turn)
PARAM_ANGLE_DEF(max_pitch)
PARAM_ANGLE_DEF(ang_offset)
PARAM_ANGLE_DEF(pitch_offset)
PARAM_INT_DEF(flags)
PARAM_FLOAT_DEF(z_add)
PARAM_ANGLE(max_turn)
PARAM_ANGLE(max_pitch)
PARAM_ANGLE(ang_offset)
PARAM_ANGLE(pitch_offset)
PARAM_INT(flags)
PARAM_FLOAT(z_add)
A_Face(self, faceto, max_turn, max_pitch, ang_offset, pitch_offset, flags, z_add);
return 0;