- got rid of all default parameter redundancies.
- scriptified a few more functions.
This commit is contained in:
parent
03efb63e93
commit
286f9510d4
26 changed files with 184 additions and 252 deletions
|
|
@ -744,7 +744,7 @@ void DoReadyWeapon(AActor *self)
|
|||
DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_WeaponReady)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_INT_OPT(flags) { flags = 0; }
|
||||
PARAM_INT_DEF(flags);
|
||||
|
||||
DoReadyWeaponToSwitch(self, !(flags & WRF_NoSwitch));
|
||||
if ((flags & WRF_NoFire) != WRF_NoFire) DoReadyWeaponToFire(self, !(flags & WRF_NoPrimary), !(flags & WRF_NoSecondary));
|
||||
|
|
@ -876,7 +876,7 @@ static void P_CheckWeaponButtons (player_t *player)
|
|||
DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_ReFire)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_STATE_OPT(state) { state = NULL; }
|
||||
PARAM_STATE_DEF(state);
|
||||
A_ReFire(self, state);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1003,10 +1003,10 @@ void A_OverlayOffset(AActor *self, int layer, double wx, double wy, int flags)
|
|||
DEFINE_ACTION_FUNCTION(AActor, A_OverlayOffset)
|
||||
{
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
PARAM_INT_OPT(layer) { layer = PSP_WEAPON; }
|
||||
PARAM_FLOAT_OPT(wx) { wx = 0.; }
|
||||
PARAM_FLOAT_OPT(wy) { wy = 32.; }
|
||||
PARAM_INT_OPT(flags) { flags = 0; }
|
||||
PARAM_INT_DEF(layer)
|
||||
PARAM_FLOAT_DEF(wx)
|
||||
PARAM_FLOAT_DEF(wy)
|
||||
PARAM_INT_DEF(flags)
|
||||
A_OverlayOffset(self, ((layer != 0) ? layer : stateinfo->mPSPIndex), wx, wy, flags);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1014,9 +1014,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_OverlayOffset)
|
|||
DEFINE_ACTION_FUNCTION(AActor, A_WeaponOffset)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_FLOAT_OPT(wx) { wx = 0.; }
|
||||
PARAM_FLOAT_OPT(wy) { wy = 32.; }
|
||||
PARAM_INT_OPT(flags) { flags = 0; }
|
||||
PARAM_FLOAT_DEF(wx)
|
||||
PARAM_FLOAT_DEF(wy)
|
||||
PARAM_INT_DEF(flags)
|
||||
A_OverlayOffset(self, PSP_WEAPON, wx, wy, flags);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1073,7 +1073,7 @@ static double GetOverlayPosition(AActor *self, int layer, bool gety)
|
|||
DEFINE_ACTION_FUNCTION(AActor, OverlayX)
|
||||
{
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
PARAM_INT_OPT(layer) { layer = 0; }
|
||||
PARAM_INT_DEF(layer);
|
||||
|
||||
if (ACTION_CALL_FROM_PSPRITE())
|
||||
{
|
||||
|
|
@ -1086,7 +1086,7 @@ DEFINE_ACTION_FUNCTION(AActor, OverlayX)
|
|||
DEFINE_ACTION_FUNCTION(AActor, OverlayY)
|
||||
{
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
PARAM_INT_OPT(layer) { layer = 0; }
|
||||
PARAM_INT_DEF(layer);
|
||||
|
||||
if (ACTION_CALL_FROM_PSPRITE())
|
||||
{
|
||||
|
|
@ -1214,8 +1214,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Overlay)
|
|||
{
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
PARAM_INT (layer);
|
||||
PARAM_STATE_OPT (state) { state = nullptr; }
|
||||
PARAM_BOOL_OPT (dontoverride) { dontoverride = false; }
|
||||
PARAM_STATE_DEF(state);
|
||||
PARAM_BOOL_DEF(dontoverride);
|
||||
|
||||
player_t *player = self->player;
|
||||
|
||||
|
|
@ -1233,9 +1233,9 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Overlay)
|
|||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ClearOverlays)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_INT_OPT(start) { start = 0; }
|
||||
PARAM_INT_OPT(stop) { stop = 0; }
|
||||
PARAM_BOOL_OPT(safety) { safety = true; }
|
||||
PARAM_INT_DEF(start);
|
||||
PARAM_INT_DEF(stop);
|
||||
PARAM_BOOL_DEF(safety)
|
||||
|
||||
if (self->player == nullptr)
|
||||
ACTION_RETURN_INT(0);
|
||||
|
|
@ -1284,8 +1284,8 @@ enum GF_Flags
|
|||
DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_GunFlash)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_STATE_OPT(flash) { flash = nullptr; }
|
||||
PARAM_INT_OPT (flags) { flags = 0; }
|
||||
PARAM_STATE_DEF(flash);
|
||||
PARAM_INT_DEF(flags);
|
||||
|
||||
player_t *player = self->player;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue