- extended level post-processing with thing IDs

# Conflicts:
#	src/maploader/maploader.cpp
This commit is contained in:
alexey.lysiuk 2019-10-27 16:36:59 +02:00 committed by drfrag
parent 814483f5b8
commit dca15d56c8
2 changed files with 26 additions and 0 deletions

View file

@ -669,6 +669,29 @@ DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingArgument)
return 0;
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingID)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
PARAM_UINT(thing);
const int id = thing < MapThingsConverted.Size()
? MapThingsConverted[thing].thingid : 0;
ACTION_RETURN_INT(id);
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingID)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
PARAM_UINT(thing);
PARAM_INT(id);
if (thing < MapThingsConverted.Size())
{
MapThingsConverted[thing].thingid = id;
}
return 0;
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetVertex)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);

View file

@ -33,6 +33,9 @@ class LevelPostProcessor native play
protected native uint GetThingFlags(uint thing);
protected native void SetThingFlags(uint thing, uint flags);
protected native int GetThingID(uint thing);
protected native void SetThingID(uint thing, int id);
protected native int GetThingSpecial(uint thing);
protected native void SetThingSpecial(uint thing, int special);