- extended level post-processing with editor numbers and angles

This commit is contained in:
alexey.lysiuk 2019-10-27 14:50:38 +02:00
parent a2a50f34d5
commit 79880b2bd9
2 changed files with 54 additions and 0 deletions

View File

@ -3381,6 +3381,54 @@ DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingCount)
ACTION_RETURN_INT(self->loader->MapThingsConverted.Size());
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingEdNum)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
PARAM_UINT(thing);
const int result = thing < self->loader->MapThingsConverted.Size()
? self->loader->MapThingsConverted[thing].EdNum : 0;
ACTION_RETURN_INT(result);
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingEdNum)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
PARAM_UINT(thing);
PARAM_UINT(ednum);
if (thing < self->loader->MapThingsConverted.Size())
{
auto &mti = self->loader->MapThingsConverted[thing];
mti.EdNum = ednum;
mti.info = DoomEdMap.CheckKey(ednum);
}
return 0;
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingAngle)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
PARAM_UINT(thing);
const int result = thing < self->loader->MapThingsConverted.Size()
? self->loader->MapThingsConverted[thing].angle : 0;
ACTION_RETURN_INT(result);
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingAngle)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
PARAM_UINT(thing);
PARAM_UINT(angle);
if (thing < self->loader->MapThingsConverted.Size())
{
self->loader->MapThingsConverted[thing].angle = angle;
}
return 0;
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingSkills)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);

View File

@ -15,6 +15,12 @@ class LevelPostProcessor native play
protected native uint GetThingCount();
protected native int GetThingEdNum(uint thing);
protected native void SetThingEdNum(uint thing, int ednum);
protected native int GetThingAngle(uint thing);
protected native void SetThingAngle(uint thing, int angle);
protected native uint GetThingSkills(uint thing);
protected native void SetThingSkills(uint thing, uint skills);