mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- extended level post-processing with specials and arguments
This commit is contained in:
parent
79880b2bd9
commit
1e29444152
2 changed files with 54 additions and 0 deletions
|
@ -3515,6 +3515,54 @@ DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingFlags)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingSpecial)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
||||
PARAM_UINT(thing);
|
||||
|
||||
const int result = thing < self->loader->MapThingsConverted.Size()
|
||||
? self->loader->MapThingsConverted[thing].special : 0;
|
||||
ACTION_RETURN_INT(result);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingSpecial)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
||||
PARAM_UINT(thing);
|
||||
PARAM_INT(special);
|
||||
|
||||
if (thing < self->loader->MapThingsConverted.Size())
|
||||
{
|
||||
self->loader->MapThingsConverted[thing].special = special;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, GetThingArgument)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
||||
PARAM_UINT(thing);
|
||||
PARAM_UINT(index);
|
||||
|
||||
const int result = index < 5 && thing < self->loader->MapThingsConverted.Size()
|
||||
? self->loader->MapThingsConverted[thing].args[index] : 0;
|
||||
ACTION_RETURN_INT(result);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetThingArgument)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
||||
PARAM_UINT(thing);
|
||||
PARAM_UINT(index);
|
||||
PARAM_INT(value);
|
||||
|
||||
if (index < 5 && thing < self->loader->MapThingsConverted.Size())
|
||||
{
|
||||
self->loader->MapThingsConverted[thing].args[index] = value;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetVertex)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
||||
|
|
|
@ -31,6 +31,12 @@ class LevelPostProcessor native play
|
|||
protected native uint GetThingFlags(uint thing);
|
||||
protected native void SetThingFlags(uint thing, uint flags);
|
||||
|
||||
protected native int GetThingSpecial(uint thing);
|
||||
protected native void SetThingSpecial(uint thing, int special);
|
||||
|
||||
protected native int GetThingArgument(uint thing, uint index);
|
||||
protected native void SetThingArgument(uint thing, uint index, int value);
|
||||
|
||||
protected native void SetVertex(uint vertex, double x, double y);
|
||||
protected native void SetLineSectorRef(uint line, uint side, uint sector);
|
||||
protected native Actor GetDefaultActor(Name actorclass);
|
||||
|
|
Loading…
Reference in a new issue