- implement the following functions under LevelCompatibility:

GetNumMapThings, GetMapThingPos, GetMapThingAngle, SetMapThingAngle

# Conflicts:
#	src/maploader/compatibility.cpp
This commit is contained in:
Rachael Alexanderson 2019-08-14 06:36:19 -04:00 committed by drfrag
parent 1a85206983
commit 6537eca669
2 changed files with 40 additions and 0 deletions

View file

@ -559,6 +559,42 @@ DEFINE_ACTION_FUNCTION(DLevelCompatibility, GetDefaultActor)
ACTION_RETURN_OBJECT(GetDefaultByName(actorclass));
}
DEFINE_ACTION_FUNCTION(DLevelCompatibility, GetNumMapThings)
{
PARAM_SELF_PROLOGUE(DLevelCompatibility);
ACTION_RETURN_INT(MapThingsConverted.Size());
}
DEFINE_ACTION_FUNCTION(DLevelCompatibility, GetMapThingPos)
{
PARAM_SELF_PROLOGUE(DLevelCompatibility);
PARAM_INT(thingnum);
if (MapThingsConverted.Size())
ACTION_RETURN_VEC3(MapThingsConverted[thingnum].pos);
else
return 0;
}
DEFINE_ACTION_FUNCTION(DLevelCompatibility, GetMapThingAngle)
{
PARAM_SELF_PROLOGUE(DLevelCompatibility);
PARAM_INT(thingnum);
if (MapThingsConverted.Size())
ACTION_RETURN_INT(MapThingsConverted[thingnum].angle);
else
return 0;
}
DEFINE_ACTION_FUNCTION(DLevelCompatibility, SetMapThingAngle)
{
PARAM_SELF_PROLOGUE(DLevelCompatibility);
PARAM_INT(thingnum);
PARAM_INT(thingangle);
if (MapThingsConverted.Size())
MapThingsConverted[thingnum].angle = thingangle;
return 0;
}
//==========================================================================
//

View file

@ -1414,6 +1414,10 @@ class LevelCompatibility native play
protected native void SetLineSectorRef(uint line, uint side, uint sector);
protected native void FlipLine(uint Line);
protected native Actor GetDefaultActor(Name actorclass);
protected native int GetNumMapThings();
protected native Vector3 GetMapThingPos(int thing);
protected native int GetMapThingAngle(int thing);
protected native void SetMapThingAngle(int thing, int angle);
protected void SetWallTexture(int line, int side, int texpart, String texture)
{