Squashed commit of the following:
commit 6ecd831eb45a8258995c02664450c3ca8cfe5b48 Merge: a4fb1f61cafbd7f7a2Author: Marisa Kirisame <marisa@sayachan.org> Date: Sun Jul 28 22:02:19 2019 +0200 Merge branch 'master' of github.com:coelckers/gzdoom into f3dfloor_export commit a4fb1f61c0532d3a6051d4c1fca4ac72ec33e060 Author: Marisa Kirisame <marisa@sayachan.org> Date: Fri Jul 12 15:43:25 2019 +0200 Renamed EFFloorType enum in ZScript to the more descriptive EF3DFloorFlags commit 9ad1c3b5625d53c06229be2a94d44fa0f36f41fd Author: Marisa Kirisame <marisa@sayachan.org> Date: Sun Jul 7 20:25:31 2019 +0200 Add bounds checks to Get3DFloor/GetAttached commit dd2a7956a887b92ed24ce5e79f10b1a445664d6c Author: Marisa Kirisame <marisa@sayachan.org> Date: Sun Jul 7 17:13:44 2019 +0200 Correct handling of 3d floor plane texture getting. commit 9b748287892c8fdee9ac67019bf1f66bc4b69eab Author: Marisa Kirisame <marisa@sayachan.org> Date: Sun Jul 7 16:14:45 2019 +0200 Implemented requested changes to F3DFloor exports. * Getters for ffloors/attached arrays. * Getter for 3D floor top/bottom texture. commit 6a1482bb0637a70890629e4c13e8759c7a3673f3 Author: Marisa Kirisame <marisa@sayachan.org> Date: Sat Jul 6 13:42:52 2019 +0200 Renamed exported extsector pointer in Sector struct to something more descriptive. commit 7c6783d43b898cbd7a01fb2191fd401ed8e8c300 Merge: ff64e04b28d36f0a0cAuthor: Marisa Kirisame <marisa@sayachan.org> Date: Mon Apr 29 12:40:44 2019 +0200 Merge branch 'master' into f3dfloor_export commit ff64e04b251f23325d2f72bc25c59f34b4cab6fa Merge: a909473925b6bae409Author: Marisa Kirisame <marisa@sayachan.org> Date: Sun Apr 21 16:56:18 2019 +0200 Merge branch 'master' into f3dfloor_export commit a90947392a27eb1c2dac7005614592ec2f410274 Author: Marisa Kirisame <marisa@sayachan.org> Date: Mon Feb 4 17:47:25 2019 +0100 Export F3DFloor structure and related data. Small changes to Trace code to better use this struct.
This commit is contained in:
parent
0535961a7a
commit
bcef440511
4 changed files with 165 additions and 5 deletions
|
|
@ -1340,6 +1340,72 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetXOffset, SetXOffset)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static F3DFloor* Get3DFloor(sector_t *self, int index)
|
||||
{
|
||||
if ((index < 0) || (index >= self->e->XFloor.ffloors.Size()))
|
||||
return nullptr;
|
||||
return self->e->XFloor.ffloors[index];
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, Get3DFloor, Get3DFloor)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
||||
PARAM_INT(index);
|
||||
ACTION_RETURN_POINTER(Get3DFloor(self,index));
|
||||
}
|
||||
|
||||
static int Get3DFloorCount(sector_t *self)
|
||||
{
|
||||
return self->e->XFloor.ffloors.Size();
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, Get3DFloorCount, Get3DFloorCount)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
||||
ACTION_RETURN_INT(self->e->XFloor.ffloors.Size());
|
||||
}
|
||||
|
||||
static sector_t* GetAttached(sector_t *self, int index)
|
||||
{
|
||||
if ((index < 0) || (index >= self->e->XFloor.attached.Size()))
|
||||
return nullptr;
|
||||
return self->e->XFloor.attached[index];
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetAttached, GetAttached)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
||||
PARAM_INT(index);
|
||||
ACTION_RETURN_POINTER(GetAttached(self,index));
|
||||
}
|
||||
|
||||
static int GetAttachedCount(sector_t *self)
|
||||
{
|
||||
return self->e->XFloor.attached.Size();
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetAttachedCount, GetAttachedCount)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
||||
ACTION_RETURN_INT(self->e->XFloor.attached.Size());
|
||||
}
|
||||
|
||||
static int Get3DFloorTexture(F3DFloor *self, int pos)
|
||||
{
|
||||
if ( pos )
|
||||
return self->bottom.texture->GetIndex();
|
||||
return self->top.texture->GetIndex();
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_F3DFloor, GetTexture, Get3DFloorTexture)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(F3DFloor);
|
||||
PARAM_INT(pos);
|
||||
if ( pos )
|
||||
ACTION_RETURN_INT(self->bottom.texture->GetIndex());
|
||||
ACTION_RETURN_INT(self->top.texture->GetIndex());
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// line_t exports
|
||||
|
|
@ -3183,6 +3249,14 @@ DEFINE_FIELD_X(Secplane, secplane_t, normal)
|
|||
DEFINE_FIELD_X(Secplane, secplane_t, D)
|
||||
DEFINE_FIELD_X(Secplane, secplane_t, negiC)
|
||||
|
||||
DEFINE_FIELD_NAMED_X(F3DFloor, F3DFloor, bottom.plane, bottom);
|
||||
DEFINE_FIELD_NAMED_X(F3DFloor, F3DFloor, top.plane, top);
|
||||
DEFINE_FIELD_X(F3DFloor, F3DFloor, flags);
|
||||
DEFINE_FIELD_X(F3DFloor, F3DFloor, master);
|
||||
DEFINE_FIELD_X(F3DFloor, F3DFloor, model);
|
||||
DEFINE_FIELD_X(F3DFloor, F3DFloor, target);
|
||||
DEFINE_FIELD_X(F3DFloor, F3DFloor, alpha);
|
||||
|
||||
DEFINE_FIELD_X(Vertex, vertex_t, p)
|
||||
|
||||
DEFINE_FIELD(DBaseStatusBar, RelTop);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue