From ca2defa6a2b68632df65d909b161a5d11d520b88 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 12 Nov 2018 00:13:14 +0100 Subject: [PATCH] - added ZScript export for side_t::SetSpecialColor. --- src/p_sectors.cpp | 20 ++++++++++++++++++++ wadsrc/static/zscript/mapdata.txt | 8 ++++++++ 2 files changed, 28 insertions(+) diff --git a/src/p_sectors.cpp b/src/p_sectors.cpp index dd0eb882cc..1abb971b61 100644 --- a/src/p_sectors.cpp +++ b/src/p_sectors.cpp @@ -2230,6 +2230,26 @@ DEFINE_ACTION_FUNCTION(_Sector, NextLowestFloorAt) ACTION_RETURN_INT(self->Index()); } + //===================================================================================== +// +// +//===================================================================================== + + DEFINE_ACTION_FUNCTION(_Side, SetSpecialColor) + { + PARAM_SELF_STRUCT_PROLOGUE(side_t); + PARAM_INT(tier); + PARAM_INT(position); + PARAM_COLOR(color); + if (tier >= 0 && tier < 3 && position >= 0 && position < 2) + { + color.a = 255; + self->SetSpecialColor(tier, position, color); + } + return 0; + } + + DEFINE_ACTION_FUNCTION(_Vertex, Index) { PARAM_SELF_STRUCT_PROLOGUE(vertex_t); diff --git a/wadsrc/static/zscript/mapdata.txt b/wadsrc/static/zscript/mapdata.txt index 549513b4ac..11827e3adb 100644 --- a/wadsrc/static/zscript/mapdata.txt +++ b/wadsrc/static/zscript/mapdata.txt @@ -45,6 +45,12 @@ struct Side native play bottom=2 }; + enum EColorPos + { + walltop = 0, + wallbottom = 1 + } + enum EWallFlags { WALLF_ABSLIGHTING = 1, // Light is absolute instead of relative @@ -57,6 +63,7 @@ struct Side native play WALLF_LIGHT_FOG = 128, // This wall's Light is used even in fog. }; + native readonly Sector sector; // Sector the SideDef is facing. //DBaseDecal* AttachedDecals; // [RH] Decals bound to the wall native readonly Line linedef; @@ -77,6 +84,7 @@ struct Side native play native void SetTextureYScale(int which, double scale); native double GetTextureYScale(int which); native void MultiplyTextureYScale(int which, double delta); + native void SetSpecialColor(int tier, int position, Color scolor); //native DInterpolation *SetInterpolation(int position); //native void StopInterpolation(int position);