mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 02:51:37 +00:00
- extended level post-processing with editor numbers and angles
# Conflicts: # src/maploader/maploader.cpp
This commit is contained in:
parent
20098ca90b
commit
09e7fe5fb4
2 changed files with 54 additions and 0 deletions
|
@ -451,6 +451,54 @@ DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingCount)
|
|||
ACTION_RETURN_INT(MapThingsConverted.Size());
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingEdNum)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
||||
PARAM_UINT(thing);
|
||||
|
||||
const int result = thing < MapThingsConverted.Size()
|
||||
? 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 < MapThingsConverted.Size())
|
||||
{
|
||||
auto &mti = 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 < MapThingsConverted.Size()
|
||||
? 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 < MapThingsConverted.Size())
|
||||
{
|
||||
MapThingsConverted[thing].angle = angle;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingSkills)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
||||
|
|
|
@ -13,6 +13,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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue