mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 13:31:37 +00:00
- add native SetLineSideRefs(line, side1idx, side2idx)
- add scripted FlipLineSideRefs(line)
This commit is contained in:
parent
642cd2b160
commit
b0751db552
2 changed files with 30 additions and 0 deletions
|
@ -459,6 +459,28 @@ DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetLineVertexes)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetLineSideRefs)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
||||
PARAM_UINT(lineidx);
|
||||
PARAM_UINT(sideidx1);
|
||||
PARAM_UINT(sideidx2);
|
||||
|
||||
if (lineidx < self->Level->lines.Size() &&
|
||||
sideidx1 < self->Level->sides.Size() &&
|
||||
sideidx2 < self->Level->sides.Size())
|
||||
{
|
||||
line_t *line = &self->Level->lines[lineidx];
|
||||
side_t *side1 = &self->Level->sides[sideidx1];
|
||||
side_t *side2 = &self->Level->sides[sideidx2];
|
||||
|
||||
line->sidedef[0] = side1;
|
||||
line->sidedef[1] = side2;
|
||||
}
|
||||
self->loader->ForceNodeBuild = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetLineSectorRef)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DLevelPostProcessor);
|
||||
|
|
|
@ -48,6 +48,7 @@ class LevelPostProcessor native play
|
|||
|
||||
protected native void SetVertex(uint vertex, double x, double y);
|
||||
protected native void SetLineVertexes(uint Line, uint v1, uint v2);
|
||||
protected native void SetLineSideRefs(uint Line, uint s1, uint s2);
|
||||
protected native void SetLineSectorRef(uint line, uint side, uint sector);
|
||||
protected native Actor GetDefaultActor(Name actorclass);
|
||||
|
||||
|
@ -58,6 +59,13 @@ class LevelPostProcessor native play
|
|||
SetLineVertexes(Line, v2, v1);
|
||||
}
|
||||
|
||||
protected void FlipLineSideRefs(uint Line)
|
||||
{
|
||||
uint s1 = level.lines[Line].sidedef[0].Index();
|
||||
uint s2 = level.lines[Line].sidedef[1].Index();
|
||||
SetLineSideRefs(Line, s2, s1);
|
||||
}
|
||||
|
||||
protected void SetWallTexture(int line, int side, int texpart, String texture)
|
||||
{
|
||||
SetWallTextureID(line, side, texpart, TexMan.CheckForTexture(texture, TexMan.Type_Wall));
|
||||
|
|
Loading…
Reference in a new issue