- more direct native entry points.

This commit is contained in:
Christoph Oelckers 2018-12-04 23:12:16 +01:00
commit a3265c2963
12 changed files with 518 additions and 355 deletions

View file

@ -289,36 +289,6 @@ bool FWeaponSlots::LocateWeapon (PClassActor *type, int *const slot, int *const
return false;
}
DEFINE_ACTION_FUNCTION(FWeaponSlots, LocateWeapon)
{
PARAM_SELF_STRUCT_PROLOGUE(FWeaponSlots);
PARAM_CLASS(weap, AActor);
int slot = 0, index = 0;
bool retv = self->LocateWeapon(weap, &slot, &index);
if (numret >= 1) ret[0].SetInt(retv);
if (numret >= 2) ret[1].SetInt(slot);
if (numret >= 3) ret[2].SetInt(index);
return MIN(numret, 3);
}
DEFINE_ACTION_FUNCTION(FWeaponSlots, GetWeapon)
{
PARAM_SELF_STRUCT_PROLOGUE(FWeaponSlots);
PARAM_INT(slot);
PARAM_INT(index);
ACTION_RETURN_POINTER(self->GetWeapon(slot, index));
return 1;
}
DEFINE_ACTION_FUNCTION(FWeaponSlots, SlotSize)
{
PARAM_SELF_STRUCT_PROLOGUE(FWeaponSlots);
PARAM_INT(slot);
ACTION_RETURN_INT(self->SlotSize(slot));
return 1;
}
//===========================================================================
//
// FWeaponSlots :: AddExtraWeapons
@ -819,14 +789,6 @@ void FWeaponSlots::SetupWeaponSlots(APlayerPawn *pp)
}
}
DEFINE_ACTION_FUNCTION(FWeaponSlots, SetupWeaponSlots)
{
PARAM_PROLOGUE;
PARAM_OBJECT(pawn, APlayerPawn);
FWeaponSlots::SetupWeaponSlots(pawn);
return 0;
}
//===========================================================================
//
// P_SetupWeapons_ntohton