2018-11-27 23:24:00 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
2018-11-25 10:34:50 +00:00
|
|
|
//
|
|
|
|
// Copyright 2016-2018 Christoph Oelckers
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program. If not, see http://www.gnu.org/licenses/
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
2018-11-27 23:11:06 +00:00
|
|
|
// VM thunks for internal functions.
|
2018-11-25 10:34:50 +00:00
|
|
|
//
|
2018-12-01 09:29:23 +00:00
|
|
|
// Important note about this file: Since everything in here is supposed to be called
|
|
|
|
// from JIT-compiled VM code it needs to be very careful about calling conventions.
|
|
|
|
// As a result none of the integer sized struct types may be used as function
|
|
|
|
// arguments, because current C++ calling conventions require them to be passed
|
|
|
|
// by reference. The JIT code, however will pass them by value so any direct native function
|
|
|
|
// taking such an argument needs to receive it as a naked int.
|
|
|
|
//
|
2018-11-25 10:34:50 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#include "vm.h"
|
|
|
|
#include "r_defs.h"
|
|
|
|
#include "g_levellocals.h"
|
|
|
|
#include "s_sound.h"
|
|
|
|
#include "p_local.h"
|
2018-12-01 09:29:23 +00:00
|
|
|
#include "v_font.h"
|
|
|
|
#include "gstrings.h"
|
2018-11-25 10:34:50 +00:00
|
|
|
|
2018-12-01 09:29:23 +00:00
|
|
|
//=====================================================================================
|
|
|
|
//
|
|
|
|
// sector_t exports
|
|
|
|
//
|
|
|
|
//=====================================================================================
|
2018-11-27 23:11:06 +00:00
|
|
|
|
2018-11-29 16:38:58 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindLowestFloorSurrounding, FindLowestFloorSurrounding)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
vertex_t *v;
|
2018-11-29 16:38:58 +00:00
|
|
|
double h = FindLowestFloorSurrounding(self, &v);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(v);
|
|
|
|
return numret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-11-29 16:38:58 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindHighestFloorSurrounding, FindHighestFloorSurrounding)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
vertex_t *v;
|
2018-11-29 16:38:58 +00:00
|
|
|
double h = FindHighestFloorSurrounding(self, &v);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(v);
|
|
|
|
return numret;
|
|
|
|
}
|
|
|
|
|
2018-11-29 16:38:58 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindNextHighestFloor, FindNextHighestFloor)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
vertex_t *v;
|
2018-11-29 16:38:58 +00:00
|
|
|
double h = FindNextHighestFloor(self, &v);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(v);
|
|
|
|
return numret;
|
|
|
|
}
|
|
|
|
|
2018-11-29 16:38:58 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindNextLowestFloor, FindNextLowestFloor)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
vertex_t *v;
|
2018-11-29 16:38:58 +00:00
|
|
|
double h = FindNextLowestFloor(self, &v);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(v);
|
|
|
|
return numret;
|
|
|
|
}
|
|
|
|
|
2018-11-29 16:38:58 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindNextLowestCeiling, FindNextLowestCeiling)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
vertex_t *v;
|
2018-11-29 16:38:58 +00:00
|
|
|
double h = FindNextLowestCeiling(self, &v);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(v);
|
|
|
|
return numret;
|
|
|
|
}
|
|
|
|
|
2018-11-29 16:38:58 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindNextHighestCeiling, FindNextHighestCeiling)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
vertex_t *v;
|
2018-11-29 16:38:58 +00:00
|
|
|
double h = FindNextHighestCeiling(self, &v);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(v);
|
|
|
|
return numret;
|
|
|
|
}
|
|
|
|
|
2018-11-29 16:38:58 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindLowestCeilingSurrounding, FindLowestCeilingSurrounding)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
vertex_t *v;
|
2018-11-29 16:38:58 +00:00
|
|
|
double h = FindLowestCeilingSurrounding(self, &v);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(v);
|
|
|
|
return numret;
|
|
|
|
}
|
|
|
|
|
2018-11-29 16:38:58 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindHighestCeilingSurrounding, FindHighestCeilingSurrounding)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
vertex_t *v;
|
2018-11-29 16:38:58 +00:00
|
|
|
double h = FindHighestCeilingSurrounding(self, &v);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(v);
|
|
|
|
return numret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-11-29 16:55:56 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindMinSurroundingLight, FindMinSurroundingLight)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(min);
|
2018-11-29 16:55:56 +00:00
|
|
|
auto h = FindMinSurroundingLight(self, min);
|
2018-11-27 23:11:06 +00:00
|
|
|
ACTION_RETURN_INT(h);
|
|
|
|
}
|
|
|
|
|
2018-11-29 16:55:56 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindHighestFloorPoint, FindHighestFloorPoint)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
vertex_t *v;
|
2018-11-29 16:55:56 +00:00
|
|
|
double h = FindHighestFloorPoint(self, &v);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(v);
|
|
|
|
return numret;
|
|
|
|
}
|
2018-11-28 23:27:09 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindLowestCeilingPoint, FindLowestCeilingPoint)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
vertex_t *v;
|
2018-11-28 23:27:09 +00:00
|
|
|
double h = FindLowestCeilingPoint(self, &v);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(v);
|
|
|
|
return numret;
|
|
|
|
}
|
|
|
|
|
2018-11-28 23:27:09 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, HighestCeilingAt, HighestCeilingAt)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
|
|
|
sector_t *s;
|
2018-11-28 23:27:09 +00:00
|
|
|
double h = HighestCeilingAt(self, x, y, &s);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(s);
|
|
|
|
return numret;
|
|
|
|
}
|
2018-11-28 23:27:09 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, LowestFloorAt, LowestFloorAt)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
|
|
|
sector_t *s;
|
2018-11-28 23:27:09 +00:00
|
|
|
double h = LowestFloorAt(self, x, y, &s);
|
2018-11-27 23:11:06 +00:00
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetPointer(s);
|
|
|
|
return numret;
|
|
|
|
}
|
|
|
|
|
2018-11-28 20:40:25 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, NextHighestCeilingAt, NextHighestCeilingAt)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
|
|
|
PARAM_FLOAT(bottomz);
|
|
|
|
PARAM_FLOAT(topz);
|
|
|
|
PARAM_INT(flags);
|
|
|
|
sector_t *resultsec;
|
|
|
|
F3DFloor *resultff;
|
2018-11-28 20:40:25 +00:00
|
|
|
double resultheight = NextHighestCeilingAt(self, x, y, bottomz, topz, flags, &resultsec, &resultff);
|
|
|
|
|
|
|
|
if (numret > 2) ret[2].SetPointer(resultff);
|
|
|
|
if (numret > 1) ret[1].SetPointer(resultsec);
|
|
|
|
if (numret > 0) ret[0].SetFloat(resultheight);
|
2018-11-27 23:11:06 +00:00
|
|
|
return numret;
|
|
|
|
}
|
2018-11-28 23:27:09 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, NextLowestFloorAt, NextLowestFloorAt)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
|
|
|
PARAM_FLOAT(z);
|
|
|
|
PARAM_INT(flags);
|
|
|
|
PARAM_FLOAT(steph);
|
|
|
|
sector_t *resultsec;
|
|
|
|
F3DFloor *resultff;
|
2018-11-28 23:27:09 +00:00
|
|
|
double resultheight = NextLowestFloorAt(self, x, y, z, flags, steph, &resultsec, &resultff);
|
2018-11-27 23:11:06 +00:00
|
|
|
|
2018-11-28 20:40:25 +00:00
|
|
|
if (numret > 2) ret[2].SetPointer(resultff);
|
|
|
|
if (numret > 1) ret[1].SetPointer(resultsec);
|
|
|
|
if (numret > 0) ret[0].SetFloat(resultheight);
|
2018-11-27 23:11:06 +00:00
|
|
|
return numret;
|
|
|
|
}
|
|
|
|
|
2018-11-28 23:27:09 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetFriction, GetFriction)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(plane);
|
|
|
|
double mf;
|
|
|
|
double h = self->GetFriction(plane, &mf);
|
|
|
|
if (numret > 0) ret[0].SetFloat(h);
|
|
|
|
if (numret > 1) ret[1].SetFloat(mf);
|
|
|
|
return numret;
|
|
|
|
}
|
2018-11-28 23:27:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
static void GetPortalDisplacement(sector_t *sec, int plane, DVector2 *result)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
2018-11-28 23:27:09 +00:00
|
|
|
*result = sec->GetPortalDisplacement(plane);
|
2018-11-27 23:11:06 +00:00
|
|
|
}
|
|
|
|
|
2018-11-28 23:27:09 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetPortalDisplacement, GetPortalDisplacement)
|
2018-11-27 23:11:06 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_VEC2(self->GetPortalDisplacement(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 10:34:50 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindShortestTextureAround, FindShortestTextureAround)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
ACTION_RETURN_FLOAT(FindShortestTextureAround(self));
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindShortestUpperAround, FindShortestUpperAround)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
ACTION_RETURN_FLOAT(FindShortestUpperAround(self));
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindModelFloorSector, FindModelFloorSector)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_FLOAT(fdh);
|
|
|
|
auto h = FindModelFloorSector(self, fdh);
|
|
|
|
ACTION_RETURN_POINTER(h);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, FindModelCeilingSector, FindModelCeilingSector)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_FLOAT(fdh);
|
|
|
|
auto h = FindModelCeilingSector(self, fdh);
|
|
|
|
ACTION_RETURN_POINTER(h);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetColor, SetColor)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_COLOR(color);
|
|
|
|
PARAM_INT(desat);
|
|
|
|
SetColor(self, color, desat);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetFade, SetFade)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_COLOR(fade);
|
|
|
|
SetFade(self, fade);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 12:35:32 +00:00
|
|
|
static void SetSpecialColor(sector_t *self, int num, int color)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
if (num >= 0 && num < 5)
|
|
|
|
{
|
|
|
|
self->SetSpecialColor(num, color);
|
|
|
|
}
|
|
|
|
}
|
2018-11-25 12:35:32 +00:00
|
|
|
|
2018-11-25 10:34:50 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetSpecialColor, SetSpecialColor)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(num);
|
|
|
|
PARAM_COLOR(color);
|
|
|
|
SetSpecialColor(self, num, color);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void SetFogDensity(sector_t *self, int dens)
|
|
|
|
{
|
|
|
|
self->Colormap.FogDensity = dens;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetFogDensity, SetFogDensity)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(dens);
|
|
|
|
self->Colormap.FogDensity = dens;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 12:35:32 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, PlaneMoving, PlaneMoving)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
2018-11-25 12:35:32 +00:00
|
|
|
ACTION_RETURN_BOOL(PlaneMoving(self, pos));
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetFloorLight, GetFloorLight)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
ACTION_RETURN_INT(self->GetFloorLight());
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetCeilingLight, GetCeilingLight)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
ACTION_RETURN_INT(self->GetCeilingLight());
|
|
|
|
}
|
|
|
|
|
|
|
|
static sector_t *GetHeightSec(sector_t *self)
|
|
|
|
{
|
|
|
|
return self->GetHeightSec();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetHeightSec, GetHeightSec)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
ACTION_RETURN_POINTER(self->GetHeightSec());
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetSpecial, GetSpecial)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_POINTER(spec, secspecial_t);
|
2018-11-25 12:35:32 +00:00
|
|
|
GetSpecial(self, spec);
|
2018-11-25 10:34:50 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 12:35:32 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetSpecial, SetSpecial)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_POINTER(spec, secspecial_t);
|
2018-11-25 12:35:32 +00:00
|
|
|
SetSpecial(self, spec);
|
2018-11-25 10:34:50 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 12:35:32 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, TransferSpecial, TransferSpecial)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_POINTER(spec, sector_t);
|
2018-11-25 12:35:32 +00:00
|
|
|
TransferSpecial(self, spec);
|
2018-11-25 10:34:50 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 12:35:32 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetTerrain, GetTerrain)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
2018-11-25 12:35:32 +00:00
|
|
|
ACTION_RETURN_INT(GetTerrain(self, pos));
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
|
2018-11-25 12:35:32 +00:00
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, CheckPortalPlane, CheckPortalPlane)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(plane);
|
|
|
|
self->CheckPortalPlane(plane);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 12:35:32 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, RemoveForceField, RemoveForceField)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
2018-11-25 12:35:32 +00:00
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
RemoveForceField(self);
|
|
|
|
return 0;
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, AdjustFloorClip, AdjustFloorClip)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
2018-11-25 13:19:19 +00:00
|
|
|
AdjustFloorClip(self);
|
2018-11-25 10:34:50 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, PointInSector, P_PointInSectorXY)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_PROLOGUE;
|
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
|
|
|
ACTION_RETURN_POINTER(P_PointInSector(x, y));
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static void SetXOffset(sector_t *self, int pos, double o)
|
|
|
|
{
|
|
|
|
self->SetXOffset(pos, o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetXOffset, SetXOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_FLOAT(o);
|
|
|
|
self->SetXOffset(pos, o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static void AddXOffset(sector_t *self, int pos, double o)
|
|
|
|
{
|
|
|
|
self->AddXOffset(pos, o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, AddXOffset, AddXOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_FLOAT(o);
|
|
|
|
self->AddXOffset(pos, o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static double GetXOffset(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetXOffset(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetXOffset, GetXOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetXOffset(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static void SetYOffset(sector_t *self, int pos, double o)
|
|
|
|
{
|
|
|
|
self->SetYOffset(pos, o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetYOffset, SetYOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_FLOAT(o);
|
|
|
|
self->SetXOffset(pos, o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static void AddYOffset(sector_t *self, int pos, double o)
|
|
|
|
{
|
|
|
|
self->AddYOffset(pos, o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, AddYOffset, AddYOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_FLOAT(o);
|
2018-11-25 13:19:19 +00:00
|
|
|
self->AddYOffset(pos, o);
|
2018-11-25 10:34:50 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static double GetYOffset(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetYOffset(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetYOffset, GetYOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_BOOL(addbase);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetYOffset(pos, addbase));
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static void SetXScale(sector_t *self, int pos, double o)
|
|
|
|
{
|
|
|
|
self->SetXScale(pos, o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetXScale, SetXScale)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_FLOAT(o);
|
|
|
|
self->SetXScale(pos, o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static double GetXScale(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetXScale(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetXScale, GetXScale)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetXScale(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static void SetYScale(sector_t *self, int pos, double o)
|
|
|
|
{
|
|
|
|
self->SetYScale(pos, o);
|
|
|
|
}
|
|
|
|
|
2018-11-29 16:55:56 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetYScale, SetYScale)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_FLOAT(o);
|
|
|
|
self->SetYScale(pos, o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static double GetYScale(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetYScale(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetYScale, GetYScale)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetYScale(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static void SetAngle(sector_t *self, int pos, double o)
|
|
|
|
{
|
|
|
|
self->SetAngle(pos, o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetAngle, SetAngle)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_ANGLE(o);
|
|
|
|
self->SetAngle(pos, o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static double GetAngle(sector_t *self, int pos, bool addbase)
|
|
|
|
{
|
|
|
|
return self->GetAngle(pos, addbase).Degrees;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetAngle, GetAngle)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_BOOL(addbase);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetAngle(pos, addbase).Degrees);
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static void SetBase(sector_t *self, int pos, double o, double a)
|
|
|
|
{
|
|
|
|
self->SetBase(pos, o, a);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetBase, SetBase)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_FLOAT(o);
|
|
|
|
PARAM_ANGLE(a);
|
|
|
|
self->SetBase(pos, o, a);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static void SetAlpha(sector_t *self, int pos, double o)
|
|
|
|
{
|
|
|
|
self->SetAlpha(pos, o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetAlpha, SetAlpha)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_FLOAT(o);
|
|
|
|
self->SetAlpha(pos, o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static double GetAlpha(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetAlpha(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetAlpha, GetAlpha)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetAlpha(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static int GetFlags(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetFlags(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetFlags, GetFlags)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_INT(self->GetFlags(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static int GetVisFlags(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetVisFlags(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetVisFlags, GetVisFlags)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_INT(self->GetVisFlags(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 13:19:19 +00:00
|
|
|
static void ChangeFlags(sector_t *self, int pos, int a, int o)
|
|
|
|
{
|
|
|
|
self->ChangeFlags(pos, a, o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, ChangeFlags, ChangeFlags)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_INT(a);
|
|
|
|
PARAM_INT(o);
|
|
|
|
self->ChangeFlags(pos, a, o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static void SetPlaneLight(sector_t *self, int pos, int o)
|
|
|
|
{
|
|
|
|
self->SetPlaneLight(pos, o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetPlaneLight, SetPlaneLight)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_INT(o);
|
|
|
|
self->SetPlaneLight(pos, o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static int GetPlaneLight(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetPlaneLight(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetPlaneLight, GetPlaneLight)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_INT(self->GetPlaneLight(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static void SetTexture(sector_t *self, int pos, int o, bool adj)
|
|
|
|
{
|
|
|
|
self->SetTexture(pos, FSetTextureID(o), adj);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetTexture, SetTexture)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_INT(o);
|
|
|
|
PARAM_BOOL(adj);
|
|
|
|
self->SetTexture(pos, FSetTextureID(o), adj);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static int GetSectorTexture(sector_t *self, int pos)
|
2018-11-25 14:14:48 +00:00
|
|
|
{
|
|
|
|
return self->GetTexture(pos).GetIndex();
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetTexture, GetSectorTexture)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_INT(self->GetTexture(pos).GetIndex());
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static void SetPlaneTexZ(sector_t *self, int pos, double o, bool)
|
|
|
|
{
|
|
|
|
self->SetPlaneTexZ(pos, o, true); // not setting 'dirty' here is a guaranteed cause for problems.
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetPlaneTexZ, SetPlaneTexZ)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_FLOAT(o);
|
|
|
|
PARAM_BOOL(dirty);
|
|
|
|
self->SetPlaneTexZ(pos, o, true); // not setting 'dirty' here is a guaranteed cause for problems.
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static double GetPlaneTexZ(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetPlaneTexZ(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetPlaneTexZ, GetPlaneTexZ)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetPlaneTexZ(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static void SetLightLevel(sector_t *self, int o)
|
|
|
|
{
|
|
|
|
self->SetLightLevel(o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetLightLevel, SetLightLevel)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(o);
|
|
|
|
self->SetLightLevel(o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static void ChangeLightLevel(sector_t *self, int o)
|
|
|
|
{
|
|
|
|
self->ChangeLightLevel(o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, ChangeLightLevel, ChangeLightLevel)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(o);
|
|
|
|
self->ChangeLightLevel(o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static int GetLightLevel(sector_t *self)
|
|
|
|
{
|
|
|
|
return self->GetLightLevel();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetLightLevel, GetLightLevel)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
ACTION_RETURN_INT(self->GetLightLevel());
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static int PortalBlocksView(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->PortalBlocksView(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, PortalBlocksView, PortalBlocksView)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_BOOL(self->PortalBlocksView(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static int PortalBlocksSight(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->PortalBlocksSight(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, PortalBlocksSight, PortalBlocksSight)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_BOOL(self->PortalBlocksSight(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static int PortalBlocksMovement(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->PortalBlocksMovement(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, PortalBlocksMovement, PortalBlocksMovement)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_BOOL(self->PortalBlocksMovement(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static int PortalBlocksSound(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->PortalBlocksSound(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, PortalBlocksSound, PortalBlocksSound)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_BOOL(self->PortalBlocksSound(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static int PortalIsLinked(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->PortalIsLinked(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, PortalIsLinked, PortalIsLinked)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_BOOL(self->PortalIsLinked(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static void ClearPortal(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
self->ClearPortal(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, ClearPortal, ClearPortal)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
self->ClearPortal(pos);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static double GetPortalPlaneZ(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetPortalPlaneZ(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetPortalPlaneZ, GetPortalPlaneZ)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetPortalPlaneZ(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static int GetPortalType(sector_t *self, int pos)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
2018-11-25 14:14:48 +00:00
|
|
|
return self->GetPortalType(pos);
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetPortalType, GetPortalType)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_INT(self->GetPortalType(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static int GetOppositePortalGroup(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetOppositePortalGroup(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetOppositePortalGroup, GetOppositePortalGroup)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_INT(self->GetOppositePortalGroup(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static double CenterFloor(sector_t *self)
|
|
|
|
{
|
|
|
|
return self->CenterFloor();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, CenterFloor, CenterFloor)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
ACTION_RETURN_FLOAT(self->CenterFloor());
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static double CenterCeiling(sector_t *self)
|
|
|
|
{
|
|
|
|
return self->CenterCeiling();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, CenterCeiling, CenterCeiling)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
ACTION_RETURN_FLOAT(self->CenterCeiling());
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static int SectorIndex(sector_t *self)
|
2018-11-25 14:14:48 +00:00
|
|
|
{
|
|
|
|
unsigned ndx = self->Index();
|
|
|
|
if (ndx >= level.sectors.Size()) return -1; // This must not throw because it is the only means to check that the given pointer is valid.
|
|
|
|
return ndx;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, Index, SectorIndex)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
2018-11-25 15:12:15 +00:00
|
|
|
ACTION_RETURN_INT(SectorIndex(self));
|
2018-11-25 14:14:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void SetEnvironmentID(sector_t *self, int envnum)
|
|
|
|
{
|
|
|
|
level.Zones[self->ZoneNumber].Environment = S_FindEnvironment(envnum);
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetEnvironmentID, SetEnvironmentID)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(envnum);
|
2018-11-25 14:14:48 +00:00
|
|
|
SetEnvironmentID(self, envnum);
|
2018-11-25 10:34:50 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static void SetEnvironment(sector_t *self, const FString &env)
|
|
|
|
{
|
|
|
|
level.Zones[self->ZoneNumber].Environment = S_FindEnvironment(env);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetEnvironment, SetEnvironment)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_STRING(env);
|
2018-11-25 14:14:48 +00:00
|
|
|
SetEnvironment(self, env);
|
2018-11-25 10:34:50 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static double GetGlowHeight(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetGlowHeight(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetGlowHeight, GetGlowHeight)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetGlowHeight(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static double GetGlowColor(sector_t *self, int pos)
|
|
|
|
{
|
|
|
|
return self->GetGlowColor(pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetGlowColor, GetGlowColor)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
ACTION_RETURN_INT(self->GetGlowColor(pos));
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static void SetGlowHeight(sector_t *self, int pos, double o)
|
|
|
|
{
|
|
|
|
self->SetGlowHeight(pos, float(o));
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetGlowHeight, SetGlowHeight)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_FLOAT(o);
|
|
|
|
self->SetGlowHeight(pos, float(o));
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 14:14:48 +00:00
|
|
|
static void SetGlowColor(sector_t *self, int pos, int o)
|
|
|
|
{
|
|
|
|
self->SetGlowColor(pos, o);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetGlowColor, SetGlowColor)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
|
|
|
PARAM_INT(pos);
|
|
|
|
PARAM_COLOR(o);
|
|
|
|
self->SetGlowColor(pos, o);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// line_t exports
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static int isLinePortal(line_t *self)
|
|
|
|
{
|
|
|
|
return self->isLinePortal();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Line, isLinePortal, isLinePortal)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(line_t);
|
|
|
|
ACTION_RETURN_BOOL(self->isLinePortal());
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static int isVisualPortal(line_t *self)
|
|
|
|
{
|
|
|
|
return self->isVisualPortal();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Line, isVisualPortal, isVisualPortal)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(line_t);
|
|
|
|
ACTION_RETURN_BOOL(self->isVisualPortal());
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static line_t *getPortalDestination(line_t *self)
|
|
|
|
{
|
|
|
|
return self->getPortalDestination();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Line, getPortalDestination, getPortalDestination)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(line_t);
|
|
|
|
ACTION_RETURN_POINTER(self->getPortalDestination());
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static int getPortalAlignment(line_t *self)
|
|
|
|
{
|
|
|
|
return self->getPortalAlignment();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Line, getPortalAlignment, getPortalAlignment)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(line_t);
|
|
|
|
ACTION_RETURN_INT(self->getPortalAlignment());
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static int LineIndex(line_t *self)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
unsigned ndx = self->Index();
|
|
|
|
if (ndx >= level.lines.Size())
|
|
|
|
{
|
2018-11-25 15:12:15 +00:00
|
|
|
return -1;
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
2018-11-25 15:12:15 +00:00
|
|
|
return ndx;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Line, Index, LineIndex)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(line_t);
|
|
|
|
ACTION_RETURN_INT(LineIndex(self));
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//===========================================================================
|
|
|
|
//
|
2018-12-01 09:29:23 +00:00
|
|
|
// side_t exports
|
2018-11-25 10:34:50 +00:00
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static int GetSideTexture(side_t *self, int which)
|
|
|
|
{
|
|
|
|
return self->GetTexture(which).GetIndex();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, GetTexture, GetSideTexture)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
ACTION_RETURN_INT(self->GetTexture(which).GetIndex());
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static void SetSideTexture(side_t *self, int which, int tex)
|
|
|
|
{
|
|
|
|
self->SetTexture(which, FSetTextureID(tex));
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, SetTexture, SetSideTexture)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
PARAM_INT(tex);
|
|
|
|
self->SetTexture(which, FSetTextureID(tex));
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static void SetTextureXOffset(side_t *self, int which, double ofs)
|
|
|
|
{
|
|
|
|
self->SetTextureXOffset(which, ofs);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, SetTextureXOffset, SetTextureXOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
PARAM_FLOAT(ofs);
|
|
|
|
self->SetTextureXOffset(which, ofs);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static void AddTextureXOffset(side_t *self, int which, double ofs)
|
|
|
|
{
|
|
|
|
self->AddTextureXOffset(which, ofs);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, AddTextureXOffset, AddTextureXOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
PARAM_FLOAT(ofs);
|
|
|
|
self->AddTextureXOffset(which, ofs);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static double GetTextureXOffset(side_t *self, int which)
|
|
|
|
{
|
|
|
|
return self->GetTextureXOffset(which);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, GetTextureXOffset, GetTextureXOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetTextureXOffset(which));
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static void SetTextureYOffset(side_t *self, int which, double ofs)
|
|
|
|
{
|
|
|
|
self->SetTextureYOffset(which, ofs);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, SetTextureYOffset, SetTextureYOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
PARAM_FLOAT(ofs);
|
|
|
|
self->SetTextureYOffset(which, ofs);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static void AddTextureYOffset(side_t *self, int which, double ofs)
|
|
|
|
{
|
|
|
|
self->AddTextureYOffset(which, ofs);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, AddTextureYOffset, AddTextureYOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
PARAM_FLOAT(ofs);
|
|
|
|
self->AddTextureYOffset(which, ofs);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static double GetTextureYOffset(side_t *self, int which)
|
|
|
|
{
|
|
|
|
return self->GetTextureYOffset(which);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, GetTextureYOffset, GetTextureYOffset)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetTextureYOffset(which));
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static void SetTextureXScale(side_t *self, int which, double ofs)
|
|
|
|
{
|
|
|
|
self->SetTextureXScale(which, ofs);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, SetTextureXScale, SetTextureXScale)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
PARAM_FLOAT(ofs);
|
|
|
|
self->SetTextureXScale(which, ofs);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static void MultiplyTextureXScale(side_t *self, int which, double ofs)
|
|
|
|
{
|
|
|
|
self->MultiplyTextureXScale(which, ofs);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, MultiplyTextureXScale, MultiplyTextureXScale)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
PARAM_FLOAT(ofs);
|
|
|
|
self->MultiplyTextureXScale(which, ofs);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static double GetTextureXScale(side_t *self, int which)
|
|
|
|
{
|
|
|
|
return self->GetTextureXScale(which);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, GetTextureXScale, GetTextureXScale)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetTextureXScale(which));
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static void SetTextureYScale(side_t *self, int which, double ofs)
|
|
|
|
{
|
|
|
|
self->SetTextureYScale(which, ofs);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, SetTextureYScale, SetTextureYScale)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
PARAM_FLOAT(ofs);
|
|
|
|
self->SetTextureYScale(which, ofs);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static void MultiplyTextureYScale(side_t *self, int which, double ofs)
|
|
|
|
{
|
|
|
|
self->MultiplyTextureYScale(which, ofs);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, MultiplyTextureYScale, MultiplyTextureYScale)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
PARAM_FLOAT(ofs);
|
|
|
|
self->MultiplyTextureYScale(which, ofs);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static double GetTextureYScale(side_t *self, int which)
|
|
|
|
{
|
|
|
|
return self->GetTextureYScale(which);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, GetTextureYScale, GetTextureYScale)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(which);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetTextureYScale(which));
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static vertex_t *GetSideV1(side_t *self)
|
|
|
|
{
|
|
|
|
return self->V1();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, V1, GetSideV1)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
ACTION_RETURN_POINTER(self->V1());
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static vertex_t *GetSideV2(side_t *self)
|
|
|
|
{
|
|
|
|
return self->V2();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, V2, GetSideV2)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
ACTION_RETURN_POINTER(self->V2());
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static void SetSideSpecialColor(side_t *self, int tier, int position, int color)
|
|
|
|
{
|
|
|
|
if (tier >= 0 && tier < 3 && position >= 0 && position < 2)
|
|
|
|
{
|
|
|
|
self->SetSpecialColor(tier, position, color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, SetSpecialColor, SetSideSpecialColor)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
|
|
|
PARAM_INT(tier);
|
|
|
|
PARAM_INT(position);
|
|
|
|
PARAM_COLOR(color);
|
|
|
|
SetSideSpecialColor(self, tier, position, color);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int SideIndex(side_t *self)
|
|
|
|
{
|
|
|
|
unsigned ndx = self->Index();
|
|
|
|
if (ndx >= level.sides.Size())
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
return ndx;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Side, Index, SideIndex)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
2018-11-25 15:12:15 +00:00
|
|
|
ACTION_RETURN_INT(SideIndex(self));
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//=====================================================================================
|
|
|
|
//
|
2018-12-01 09:29:23 +00:00
|
|
|
// vertex_t exports
|
2018-11-25 10:34:50 +00:00
|
|
|
//
|
|
|
|
//=====================================================================================
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static int VertexIndex(vertex_t *self)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
2018-11-25 15:12:15 +00:00
|
|
|
unsigned ndx = self->Index();
|
|
|
|
if (ndx >= level.vertexes.Size())
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
2018-11-25 15:12:15 +00:00
|
|
|
return -1;
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
2018-11-25 15:12:15 +00:00
|
|
|
return ndx;
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Vertex, Index, VertexIndex)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(vertex_t);
|
2018-11-25 15:12:15 +00:00
|
|
|
ACTION_RETURN_INT(VertexIndex(self));
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
|
2018-12-01 09:29:23 +00:00
|
|
|
//=====================================================================================
|
|
|
|
//
|
|
|
|
// TexMan exports
|
|
|
|
//
|
|
|
|
//=====================================================================================
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
// This is needed to convert the strings to char pointers.
|
|
|
|
static void ReplaceTextures(const FString &from, const FString &to, int flags)
|
|
|
|
{
|
|
|
|
P_ReplaceTextures(from, to, flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, ReplaceTextures, ReplaceTextures)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_PROLOGUE;
|
|
|
|
PARAM_STRING(from);
|
|
|
|
PARAM_STRING(to);
|
|
|
|
PARAM_INT(flags);
|
|
|
|
P_ReplaceTextures(from, to, flags);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
//=====================================================================================
|
|
|
|
//
|
2018-12-01 09:29:23 +00:00
|
|
|
// secplane_t exports
|
2018-11-25 15:12:15 +00:00
|
|
|
//
|
|
|
|
//=====================================================================================
|
|
|
|
|
|
|
|
static int isSlope(secplane_t *self)
|
|
|
|
{
|
|
|
|
return !self->normal.XY().isZero();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Secplane, isSlope, isSlope)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(secplane_t);
|
|
|
|
ACTION_RETURN_BOOL(!self->normal.XY().isZero());
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static int PointOnSide(const secplane_t *self, double x, double y, double z)
|
|
|
|
{
|
|
|
|
return self->PointOnSide(DVector3(x, y, z));
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Secplane, PointOnSide, PointOnSide)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(secplane_t);
|
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
|
|
|
PARAM_FLOAT(z);
|
|
|
|
ACTION_RETURN_INT(self->PointOnSide(DVector3(x, y, z)));
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static double ZatPoint(const secplane_t *self, double x, double y)
|
|
|
|
{
|
|
|
|
return self->ZatPoint(x, y);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Secplane, ZatPoint, ZatPoint)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(secplane_t);
|
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
|
|
|
ACTION_RETURN_FLOAT(self->ZatPoint(x, y));
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static double ZatPointDist(const secplane_t *self, double x, double y, double d)
|
|
|
|
{
|
|
|
|
return (d + self->normal.X*x + self->normal.Y*y) * self->negiC;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Secplane, ZatPointDist, ZatPointDist)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(secplane_t);
|
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
|
|
|
PARAM_FLOAT(d);
|
2018-11-25 15:12:15 +00:00
|
|
|
ACTION_RETURN_FLOAT(ZatPointDist(self, x, y, d));
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static int isPlaneEqual(const secplane_t *self, const secplane_t *other)
|
|
|
|
{
|
|
|
|
return *self == *other;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Secplane, isEqual, isPlaneEqual)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(secplane_t);
|
|
|
|
PARAM_POINTER(other, secplane_t);
|
|
|
|
ACTION_RETURN_BOOL(*self == *other);
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static void ChangeHeight(secplane_t *self, double hdiff)
|
|
|
|
{
|
|
|
|
self->ChangeHeight(hdiff);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Secplane, ChangeHeight, ChangeHeight)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(secplane_t);
|
|
|
|
PARAM_FLOAT(hdiff);
|
|
|
|
self->ChangeHeight(hdiff);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static double GetChangedHeight(const secplane_t *self, double hdiff)
|
|
|
|
{
|
|
|
|
return self->GetChangedHeight(hdiff);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Secplane, GetChangedHeight, GetChangedHeight)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(secplane_t);
|
|
|
|
PARAM_FLOAT(hdiff);
|
|
|
|
ACTION_RETURN_FLOAT(self->GetChangedHeight(hdiff));
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
static double HeightDiff(const secplane_t *self, double oldd, double newd)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
if (newd != 1e37)
|
|
|
|
{
|
2018-11-25 15:12:15 +00:00
|
|
|
return self->HeightDiff(oldd);
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-11-25 15:12:15 +00:00
|
|
|
return self->HeightDiff(oldd, newd);
|
2018-11-25 10:34:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-11-25 15:12:15 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Secplane, HeightDiff, HeightDiff)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(secplane_t);
|
|
|
|
PARAM_FLOAT(oldd);
|
|
|
|
PARAM_FLOAT(newd);
|
|
|
|
ACTION_RETURN_FLOAT(HeightDiff(self, oldd, newd));
|
|
|
|
}
|
|
|
|
|
|
|
|
static double PointToDist(const secplane_t *self, double x, double y, double z)
|
|
|
|
{
|
|
|
|
return self->PointToDist(DVector2(x, y), z);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(_Secplane, PointToDist, PointToDist)
|
2018-11-25 10:34:50 +00:00
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(secplane_t);
|
|
|
|
PARAM_FLOAT(x);
|
|
|
|
PARAM_FLOAT(y);
|
|
|
|
PARAM_FLOAT(z);
|
|
|
|
ACTION_RETURN_FLOAT(self->PointToDist(DVector2(x, y), z));
|
|
|
|
}
|
|
|
|
|
2018-12-01 09:29:23 +00:00
|
|
|
//=====================================================================================
|
|
|
|
//
|
|
|
|
// FFont exports
|
|
|
|
//
|
|
|
|
//=====================================================================================
|
|
|
|
|
|
|
|
static FFont *GetFont(int name)
|
|
|
|
{
|
|
|
|
return V_GetFont(FName(ENamedName(name)).GetChars());
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetFont, GetFont)
|
|
|
|
{
|
|
|
|
PARAM_PROLOGUE;
|
|
|
|
PARAM_INT(name);
|
|
|
|
ACTION_RETURN_POINTER(GetFont(name));
|
|
|
|
}
|
|
|
|
|
|
|
|
static FFont *FindFont(int name)
|
|
|
|
{
|
|
|
|
return FFont::FindFont(FName(ENamedName(name)));
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(FFont, FindFont, FindFont)
|
|
|
|
{
|
|
|
|
PARAM_PROLOGUE;
|
|
|
|
PARAM_NAME(name);
|
|
|
|
ACTION_RETURN_POINTER(FFont::FindFont(name));
|
|
|
|
}
|
|
|
|
|
|
|
|
static int GetCharWidth(FFont *font, int code)
|
|
|
|
{
|
|
|
|
return font->GetCharWidth(code);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetCharWidth, GetCharWidth)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(FFont);
|
|
|
|
PARAM_INT(code);
|
|
|
|
ACTION_RETURN_INT(self->GetCharWidth(code));
|
|
|
|
}
|
|
|
|
|
|
|
|
static int GetHeight(FFont *font)
|
|
|
|
{
|
|
|
|
return font->GetHeight();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetHeight, GetHeight)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(FFont);
|
|
|
|
ACTION_RETURN_INT(self->GetHeight());
|
|
|
|
}
|
|
|
|
|
|
|
|
double GetBottomAlignOffset(FFont *font, int c);
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetBottomAlignOffset, GetBottomAlignOffset)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(FFont);
|
|
|
|
PARAM_INT(code);
|
|
|
|
ACTION_RETURN_FLOAT(GetBottomAlignOffset(self, code));
|
|
|
|
}
|
|
|
|
|
|
|
|
static int StringWidth(FFont *font, const FString &str)
|
|
|
|
{
|
|
|
|
const char *txt = str[0] == '$' ? GStrings(&str[1]) : str.GetChars();
|
|
|
|
return font->StringWidth(txt);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(FFont, StringWidth, StringWidth)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(FFont);
|
|
|
|
PARAM_STRING(str);
|
|
|
|
ACTION_RETURN_INT(StringWidth(self, str));
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(FFont, FindFontColor, V_FindFontColor)
|
|
|
|
{
|
|
|
|
PARAM_PROLOGUE;
|
|
|
|
PARAM_NAME(code);
|
|
|
|
ACTION_RETURN_INT((int)V_FindFontColor(code));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void GetCursor(FFont *font, FString *result)
|
|
|
|
{
|
|
|
|
*result = font->GetCursor();
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetCursor, GetCursor)
|
|
|
|
{
|
|
|
|
PARAM_SELF_STRUCT_PROLOGUE(FFont);
|
|
|
|
ACTION_RETURN_STRING(FString(self->GetCursor()));
|
|
|
|
}
|
|
|
|
|
|
|
|
//=====================================================================================
|
|
|
|
//
|
|
|
|
// AActor exports (this will be expanded)
|
|
|
|
//
|
|
|
|
//=====================================================================================
|
|
|
|
|
2018-11-25 17:40:26 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_PlaySound, A_PlaySound)
|
|
|
|
{
|
|
|
|
PARAM_SELF_PROLOGUE(AActor);
|
|
|
|
PARAM_SOUND(soundid);
|
|
|
|
PARAM_INT(channel);
|
|
|
|
PARAM_FLOAT(volume);
|
|
|
|
PARAM_BOOL(looping);
|
|
|
|
PARAM_FLOAT(attenuation);
|
|
|
|
PARAM_BOOL(local);
|
|
|
|
A_PlaySound(self, soundid, channel, volume, looping, attenuation, local);
|
|
|
|
return 0;
|
|
|
|
}
|
2018-11-27 23:11:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, floorplane)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, ceilingplane)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, Colormap)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, SpecialColors)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, SoundTarget)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, special)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, lightlevel)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, seqType)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, sky)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, SeqName)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, centerspot)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, validcount)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, thinglist)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, friction)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, movefactor)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, terrainnum)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, floordata)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, ceilingdata)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, lightingdata)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, interpolations)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, soundtraversed)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, stairlock)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, prevsec)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, nextsec)
|
|
|
|
DEFINE_FIELD_UNSIZED(Sector, sector_t, Lines)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, heightsec)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, bottommap)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, midmap)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, topmap)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, touching_thinglist)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, sectorportal_thinglist)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, gravity)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, damagetype)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, damageamount)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, damageinterval)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, leakydamage)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, ZoneNumber)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, healthceiling)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, healthfloor)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, healthceilinggroup)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, healthfloorgroup)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, MoreFlags)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, Flags)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, SecActTarget)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, Portals)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, PortalGroup)
|
|
|
|
DEFINE_FIELD_X(Sector, sector_t, sectornum)
|
|
|
|
|
|
|
|
DEFINE_FIELD_X(Line, line_t, v1)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, v2)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, delta)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, flags)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, activation)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, special)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, args)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, alpha)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, sidedef)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, bbox)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, frontsector)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, backsector)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, validcount)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, locknumber)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, portalindex)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, portaltransferred)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, health)
|
|
|
|
DEFINE_FIELD_X(Line, line_t, healthgroup)
|
|
|
|
|
|
|
|
DEFINE_FIELD_X(Side, side_t, sector)
|
|
|
|
DEFINE_FIELD_X(Side, side_t, linedef)
|
|
|
|
DEFINE_FIELD_X(Side, side_t, Light)
|
|
|
|
DEFINE_FIELD_X(Side, side_t, Flags)
|
|
|
|
|
|
|
|
DEFINE_FIELD_X(Secplane, secplane_t, normal)
|
|
|
|
DEFINE_FIELD_X(Secplane, secplane_t, D)
|
|
|
|
DEFINE_FIELD_X(Secplane, secplane_t, negiC)
|
|
|
|
|
|
|
|
DEFINE_FIELD_X(Vertex, vertex_t, p)
|