- extended level post-processing with special string arguments

This commit is contained in:
alexey.lysiuk 2019-10-29 16:14:23 +02:00
parent 00ff4083d2
commit 82c248854d
2 changed files with 25 additions and 0 deletions

View file

@ -3585,6 +3585,16 @@ DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingArgument)
ACTION_RETURN_INT(argument);
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingStringArgument)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
PARAM_UINT(thing);
const FName argument = thing < self->loader->MapThingsConverted.Size()
? self->loader->MapThingsConverted[thing].arg0str : NAME_None;
ACTION_RETURN_INT(argument);
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingArgument)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
@ -3599,6 +3609,19 @@ DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingArgument)
return 0;
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingStringArgument)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
PARAM_UINT(thing);
PARAM_INT(value);
if (thing < self->loader->MapThingsConverted.Size())
{
self->loader->MapThingsConverted[thing].arg0str = ENamedName(value);
}
return 0;
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingID)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);

View file

@ -42,7 +42,9 @@ class LevelPostProcessor native play
protected native void SetThingSpecial(uint thing, int special);
protected native int GetThingArgument(uint thing, uint index);
protected native Name GetThingStringArgument(uint thing);
protected native void SetThingArgument(uint thing, uint index, int value);
protected native void SetThingStringArgument(uint thing, Name value);
protected native void SetVertex(uint vertex, double x, double y);
protected native void SetLineSectorRef(uint line, uint side, uint sector);