- scriptified P_MorphPlayer and dependencies.

It still needs its counterpart scriptified as well before it can work.
This commit is contained in:
Christoph Oelckers 2018-11-24 07:45:49 +01:00
commit 192104aea2
7 changed files with 250 additions and 16 deletions

View file

@ -173,18 +173,6 @@ bool P_MorphPlayer (player_t *activator, player_t *p, PClassActor *spawntype, in
return true;
}
DEFINE_ACTION_FUNCTION(_PlayerInfo, MorphPlayer)
{
PARAM_SELF_STRUCT_PROLOGUE(player_t);
PARAM_POINTER(activator, player_t);
PARAM_CLASS(spawntype, APlayerPawn);
PARAM_INT(duration);
PARAM_INT(style);
PARAM_CLASS(enter_flash, AActor);
PARAM_CLASS(exit_flash, AActor);
ACTION_RETURN_BOOL(P_MorphPlayer(activator, self, spawntype, duration, style, enter_flash, exit_flash));
}
//----------------------------------------------------------------------------
//
// FUNC P_UndoPlayerMorph

View file

@ -61,6 +61,7 @@ DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, statusscreen_single)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, statusscreen_coop)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, statusscreen_dm)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mSliderColor)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, telefogheight)
const char *GameNames[17] =

View file

@ -293,6 +293,13 @@ CCMD (playerclasses)
}
}
DEFINE_ACTION_FUNCTION(APlayerPawn, Substitute)
{
PARAM_SELF_PROLOGUE(APlayerPawn);
PARAM_OBJECT(replace, APlayerPawn);
DObject::StaticPointerSubstitution(self, replace);
return 0;
}
//
// Movement.

View file

@ -802,7 +802,6 @@ VMFunction *FFunctionBuildList::AddFunction(PNamespace *gnspc, const VersionInfo
void FFunctionBuildList::Build()
{
int errorcount = 0;
int codesize = 0;
int datasize = 0;
FILE *dump = nullptr;
@ -911,7 +910,8 @@ void FFunctionBuildList::Build()
}
VMFunction::CreateRegUseInfo();
FScriptPosition::StrictErrors = false;
if (Args->CheckParm("-dumpjit")) DumpJit();
if (FScriptPosition::ErrorCounter == 0 && Args->CheckParm("-dumpjit")) DumpJit();
mItems.Clear();
mItems.ShrinkToFit();
FxAlloc.FreeAllBlocks();