2017-01-14 12:02:08 +00:00
2017-03-03 21:26:06 +00:00
struct SectorPortal native play
2017-01-14 15:05:40 +00:00
{
2017-01-14 17:04:49 +00:00
enum EType
{
TYPE_SKYVIEWPOINT = 0, // a regular skybox
TYPE_STACKEDSECTORTHING, // stacked sectors with the thing method
TYPE_PORTAL, // stacked sectors with Sector_SetPortal
TYPE_LINKEDPORTAL, // linked portal (interactive)
TYPE_PLANE, // EE-style plane portal (not implemented in SW renderer)
TYPE_HORIZON, // EE-style horizon portal (not implemented in SW renderer)
};
enum EFlags
{
FLAG_SKYFLATONLY = 1, // portal is only active on skyflatnum
FLAG_INSKYBOX = 2, // to avoid recursion
};
2017-01-14 15:05:40 +00:00
native int mType;
native int mFlags;
native uint mPartner;
native int mPlane;
native Sector mOrigin;
native Sector mDestination;
native Vector2 mDisplacement;
native double mPlaneZ;
2019-01-24 23:30:55 +00:00
native Actor mSkybox;
2017-01-14 15:05:40 +00:00
};
2023-01-15 20:29:23 +00:00
struct LinePortal native play
{
enum EType
{
PORTT_VISUAL,
PORTT_TELEPORT,
PORTT_INTERACTIVE,
PORTT_LINKED,
PORTT_LINKEDEE // Eternity compatible definition which uses only one line ID and a different anchor type to link to.
};
enum EFlags
{
PORTF_VISIBLE = 1,
PORTF_PASSABLE = 2,
PORTF_SOUNDTRAVERSE = 4,
PORTF_INTERACTIVE = 8,
PORTF_POLYOBJ = 16,
PORTF_TYPETELEPORT = PORTF_VISIBLE | PORTF_PASSABLE | PORTF_SOUNDTRAVERSE,
PORTF_TYPEINTERACTIVE = PORTF_VISIBLE | PORTF_PASSABLE | PORTF_SOUNDTRAVERSE | PORTF_INTERACTIVE,
};
enum EAlignment
{
PORG_ABSOLUTE, // does not align at all. z-ccoordinates must match.
PORG_FLOOR,
PORG_CEILING,
};
native Line mOrigin;
native Line mDestination;
native Vector2 mDisplacement;
native uint8 mType;
native uint8 mFlags;
native uint8 mDefFlags;
native uint8 mAlign;
native double mAngleDiff;
native double mSinRot;
native double mCosRot;
}
2017-01-14 15:05:40 +00:00
2017-03-03 21:26:06 +00:00
struct Vertex native play
2017-01-14 12:02:08 +00:00
{
native readonly Vector2 p;
2022-11-19 07:45:16 +00:00
native clearscope int Index() const;
2017-01-14 12:02:08 +00:00
}
2017-03-03 21:26:06 +00:00
struct Side native play
2017-01-14 12:02:08 +00:00
{
enum ETexpart
{
top=0,
mid=1,
bottom=2
};
2018-11-11 23:13:14 +00:00
enum EColorPos
{
walltop = 0,
wallbottom = 1
}
2017-01-14 12:02:08 +00:00
enum EWallFlags
{
WALLF_ABSLIGHTING = 1, // Light is absolute instead of relative
WALLF_NOAUTODECALS = 2, // Do not attach impact decals to this wall
WALLF_NOFAKECONTRAST = 4, // Don't do fake contrast for this wall in side_t::GetLightLevel
WALLF_SMOOTHLIGHTING = 8, // Similar to autocontrast but applies to all angles.
WALLF_CLIP_MIDTEX = 16, // Like the line counterpart, but only for this side.
WALLF_WRAP_MIDTEX = 32, // Like the line counterpart, but only for this side.
WALLF_POLYOBJ = 64, // This wall belongs to a polyobject.
WALLF_LIGHT_FOG = 128, // This wall's Light is used even in fog.
};
2020-10-24 23:29:31 +00:00
enum EPartFlags
{
NoGradient = 1,
FlipGradient = 2,
ClampGradient = 4,
UseOwnSpecialColors = 8,
UseOwnAdditiveColor = 16,
};
2018-11-11 23:13:14 +00:00
2018-03-25 20:39:10 +00:00
native readonly Sector sector; // Sector the SideDef is facing.
2017-01-14 12:02:08 +00:00
//DBaseDecal* AttachedDecals; // [RH] Decals bound to the wall
2018-03-25 20:39:10 +00:00
native readonly Line linedef;
2017-01-14 12:02:08 +00:00
native int16 Light;
2019-12-29 11:11:16 +00:00
native uint16 Flags;
2017-01-14 12:02:08 +00:00
2022-11-19 07:45:16 +00:00
native clearscope TextureID GetTexture(int which) const;
2017-01-14 12:02:08 +00:00
native void SetTexture(int which, TextureID tex);
native void SetTextureXOffset(int which, double offset);
2022-11-19 07:45:16 +00:00
native clearscope double GetTextureXOffset(int which) const;
2017-01-14 12:02:08 +00:00
native void AddTextureXOffset(int which, double delta);
native void SetTextureYOffset(int which, double offset);
2022-11-19 07:45:16 +00:00
native clearscope double GetTextureYOffset(int which) const;
2017-01-14 12:02:08 +00:00
native void AddTextureYOffset(int which, double delta);
native void SetTextureXScale(int which, double scale);
2022-11-19 07:45:16 +00:00
native clearscope double GetTextureXScale(int which) const;
2017-01-14 12:02:08 +00:00
native void MultiplyTextureXScale(int which, double delta);
native void SetTextureYScale(int which, double scale);
2022-11-19 07:45:16 +00:00
native clearscope double GetTextureYScale(int which) const;
2017-01-14 12:02:08 +00:00
native void MultiplyTextureYScale(int which, double delta);
2022-11-19 07:45:16 +00:00
native clearscope int GetTextureFlags(int tier) const;
2020-10-24 23:29:31 +00:00
native void ChangeTextureFlags(int tier, int And, int Or);
2020-10-17 10:28:22 +00:00
native void SetSpecialColor(int tier, int position, Color scolor, bool useowncolor = true);
2022-11-19 07:45:16 +00:00
native clearscope Color GetAdditiveColor(int tier) const;
2018-12-23 06:36:25 +00:00
native void SetAdditiveColor(int tier, Color color);
native void EnableAdditiveColor(int tier, bool enable);
2019-12-22 15:08:34 +00:00
native void SetColorization(int tier, Name cname);
2017-01-14 12:02:08 +00:00
//native DInterpolation *SetInterpolation(int position);
//native void StopInterpolation(int position);
2022-11-19 07:45:16 +00:00
native clearscope Vertex V1() const;
native clearscope Vertex V2() const;
2017-01-14 12:02:08 +00:00
2022-11-19 07:45:16 +00:00
native clearscope int Index() const;
2017-02-15 00:03:47 +00:00
2022-11-19 07:45:16 +00:00
clearscope int GetUDMFInt(Name nm) const
2017-02-15 00:03:47 +00:00
{
2019-02-01 23:24:43 +00:00
return Level.GetUDMFInt(LevelLocals.UDMF_Side, Index(), nm);
2017-02-15 00:03:47 +00:00
}
2022-11-19 07:45:16 +00:00
clearscope double GetUDMFFloat(Name nm) const
2017-02-15 00:03:47 +00:00
{
2019-02-01 23:24:43 +00:00
return Level.GetUDMFFloat(LevelLocals.UDMF_Side, Index(), nm);
2017-02-15 00:03:47 +00:00
}
2022-11-19 07:45:16 +00:00
clearscope String GetUDMFString(Name nm) const
2017-02-15 00:03:47 +00:00
{
2019-02-01 23:24:43 +00:00
return Level.GetUDMFString(LevelLocals.UDMF_Side, Index(), nm);
2017-02-15 00:03:47 +00:00
}
2017-01-14 12:02:08 +00:00
};
2017-03-03 21:26:06 +00:00
struct Line native play
2017-01-14 12:02:08 +00:00
{
2018-04-09 14:53:52 +00:00
enum ESide
{
front=0,
back=1
}
2017-01-14 12:02:08 +00:00
enum ELineFlags
{
ML_BLOCKING =0x00000001, // solid, is an obstacle
ML_BLOCKMONSTERS =0x00000002, // blocks monsters only
ML_TWOSIDED =0x00000004, // backside will not be present at all if not two sided
ML_DONTPEGTOP = 0x00000008, // upper texture unpegged
ML_DONTPEGBOTTOM = 0x00000010, // lower texture unpegged
ML_SECRET = 0x00000020, // don't map as two sided: IT'S A SECRET!
ML_SOUNDBLOCK = 0x00000040, // don't let sound cross two of these
ML_DONTDRAW = 0x00000080, // don't draw on the automap
ML_MAPPED = 0x00000100, // set if already drawn in automap
ML_REPEAT_SPECIAL = 0x00000200, // special is repeatable
ML_ADDTRANS = 0x00000400, // additive translucency (can only be set internally)
// Extended flags
ML_MONSTERSCANACTIVATE = 0x00002000, // [RH] Monsters (as well as players) can activate the line
ML_BLOCK_PLAYERS = 0x00004000,
ML_BLOCKEVERYTHING = 0x00008000, // [RH] Line blocks everything
ML_ZONEBOUNDARY = 0x00010000,
ML_RAILING = 0x00020000,
ML_BLOCK_FLOATERS = 0x00040000,
ML_CLIP_MIDTEX = 0x00080000, // Automatic for every Strife line
ML_WRAP_MIDTEX = 0x00100000,
ML_3DMIDTEX = 0x00200000,
ML_CHECKSWITCHRANGE = 0x00400000,
ML_FIRSTSIDEONLY = 0x00800000, // activated only when crossed from front side
ML_BLOCKPROJECTILE = 0x01000000,
ML_BLOCKUSE = 0x02000000, // blocks all use actions through this line
ML_BLOCKSIGHT = 0x04000000, // blocks monster line of sight
ML_BLOCKHITSCAN = 0x08000000, // blocks hitscan attacks
ML_3DMIDTEX_IMPASS = 0x10000000, // [TP] if 3D midtex, behaves like a height-restricted ML_BLOCKING
};
2021-06-28 18:17:08 +00:00
enum ELineFlags2
{
ML2_BLOCKLANDMONSTERS = 1,
}
2017-01-14 12:02:08 +00:00
native readonly vertex v1, v2; // vertices, from v1 to v2
native readonly Vector2 delta; // precalculated v2 - v1 for side checking
native uint flags;
2021-06-28 18:17:08 +00:00
native uint flags2;
2017-01-14 12:02:08 +00:00
native uint activation; // activation type
native int special;
native int args[5]; // <--- hexen-style arguments (expanded to ZDoom's full width)
2019-12-29 11:11:16 +00:00
native double alpha; // <--- translucency (0=invisible, 1.0=opaque)
2017-03-04 10:48:36 +00:00
native readonly Side sidedef[2];
2017-01-14 12:02:08 +00:00
native readonly double bbox[4]; // bounding box, for the extent of the LineDef.
native readonly Sector frontsector, backsector;
native int validcount; // if == validcount, already checked
native int locknumber; // [Dusk] lock number for special
native readonly uint portalindex;
native readonly uint portaltransferred;
2018-10-31 20:40:08 +00:00
native readonly int health;
native readonly int healthgroup;
2017-01-14 12:02:08 +00:00
2022-11-19 07:45:16 +00:00
native clearscope bool isLinePortal() const;
native clearscope bool isVisualPortal() const;
native clearscope Line getPortalDestination() const;
2023-01-15 20:29:23 +00:00
native clearscope int getPortalFlags() const;
2022-11-19 07:45:16 +00:00
native clearscope int getPortalAlignment() const;
2023-01-15 20:29:23 +00:00
native clearscope int getPortalType() const;
native clearscope Vector2 getPortalDisplacement() const;
native clearscope double getPortalAngleDiff() const;
2022-11-19 07:45:16 +00:00
native clearscope int Index() const;
2018-04-07 15:08:23 +00:00
native bool Activate(Actor activator, int side, int type);
native bool RemoteActivate(Actor activator, int side, int type, Vector3 pos);
2023-10-15 09:30:02 +00:00
native bool, double, double GetMidTexturePosition (int side);
2017-02-15 00:03:47 +00:00
2022-11-19 07:45:16 +00:00
clearscope int GetUDMFInt(Name nm) const
2017-02-15 00:03:47 +00:00
{
2019-02-01 23:24:43 +00:00
return Level.GetUDMFInt(LevelLocals.UDMF_Line, Index(), nm);
2017-02-15 00:03:47 +00:00
}
2022-11-19 07:45:16 +00:00
clearscope double GetUDMFFloat(Name nm) const
2017-02-15 00:03:47 +00:00
{
2019-02-01 23:24:43 +00:00
return Level.GetUDMFFloat(LevelLocals.UDMF_Line, Index(), nm);
2017-02-15 00:03:47 +00:00
}
2022-11-19 07:45:16 +00:00
clearscope String GetUDMFString(Name nm) const
2017-02-15 00:03:47 +00:00
{
2019-02-01 23:24:43 +00:00
return Level.GetUDMFString(LevelLocals.UDMF_Line, Index(), nm);
2017-02-15 00:03:47 +00:00
}
2018-11-06 02:59:17 +00:00
2022-11-19 07:45:16 +00:00
native clearscope int GetHealth() const;
2018-11-06 02:59:17 +00:00
native void SetHealth(int newhealth);
2023-01-18 00:55:46 +00:00
native int CountIDs() const;
native int GetID(int index) const;
2017-01-14 12:02:08 +00:00
}
2017-03-03 21:26:06 +00:00
struct SecPlane native play
2017-01-14 12:02:08 +00:00
{
native Vector3 Normal;
native double D;
native double negiC;
2022-11-19 07:45:16 +00:00
native clearscope bool isSlope() const;
native clearscope int PointOnSide(Vector3 pos) const;
2018-03-03 15:39:13 +00:00
native clearscope double ZatPoint (Vector2 v) const;
2022-11-19 07:45:16 +00:00
native clearscope double ZatPointDist(Vector2 v, double dist) const;
native clearscope bool isEqual(Secplane other) const;
2017-01-14 12:02:08 +00:00
native void ChangeHeight(double hdiff);
2022-11-19 07:45:16 +00:00
native clearscope double GetChangedHeight(double hdiff) const;
native clearscope double HeightDiff(double oldd, double newd = 1e37) const;
native clearscope double PointToDist(Vector2 xy, double z) const;
2017-01-14 12:02:08 +00:00
}
2019-08-04 13:55:17 +00:00
struct F3DFloor native play
{
enum EF3DFloorFlags
{
FF_EXISTS = 0x1, //MAKE SURE IT'S VALID
FF_SOLID = 0x2, //Does it clip things?
FF_RENDERSIDES = 0x4, //Render the sides?
FF_RENDERPLANES = 0x8, //Render the floor/ceiling?
FF_RENDERALL = 0xC, //Render everything?
FF_SWIMMABLE = 0x10, //Can we swim?
FF_NOSHADE = 0x20, //Does it mess with the lighting?
FF_BOTHPLANES = 0x200, //Render both planes all the time?
FF_TRANSLUCENT = 0x800, //See through!
FF_FOG = 0x1000, //Fog "brush"?
FF_INVERTPLANES = 0x2000, //Reverse the plane visibility rules?
FF_ALLSIDES = 0x4000, //Render inside and outside sides?
FF_INVERTSIDES = 0x8000, //Only render inside sides?
FF_DOUBLESHADOW = 0x10000,//Make two lightlist entries to reset light?
FF_UPPERTEXTURE = 0x20000,
FF_LOWERTEXTURE = 0x40000,
FF_THINFLOOR = 0x80000, // EDGE
2020-04-19 11:40:21 +00:00
FF_SCROLLY = 0x100000, // old leftover definition
FF_NODAMAGE = 0x100000, // no damage transfers
2019-08-04 13:55:17 +00:00
FF_FIX = 0x200000, // use floor of model sector as floor and floor of real sector as ceiling
FF_INVERTSECTOR = 0x400000, // swap meaning of sector planes
FF_DYNAMIC = 0x800000, // created by partitioning another 3D-floor due to overlap
FF_CLIPPED = 0x1000000, // split into several dynamic ffloors
FF_SEETHROUGH = 0x2000000,
FF_SHOOTTHROUGH = 0x4000000,
FF_FADEWALLS = 0x8000000, // Applies real fog to walls and doesn't blend the view
FF_ADDITIVETRANS = 0x10000000, // Render this floor with additive translucency
FF_FLOOD = 0x20000000, // extends towards the next lowest flooding or solid 3D floor or the bottom of the sector
FF_THISINSIDE = 0x40000000, // hack for software 3D with FF_BOTHPLANES
FF_RESET = 0x80000000, // light effect is completely reset, once interrupted
};
native readonly secplane bottom;
native readonly secplane top;
native readonly uint flags;
native readonly Line master;
native readonly Sector model;
native readonly Sector target;
native readonly int alpha;
2022-11-19 07:45:16 +00:00
native clearscope TextureID GetTexture(int pos) const;
2019-08-04 13:55:17 +00:00
}
2017-01-14 12:02:08 +00:00
// This encapsulates all info Doom's original 'special' field contained - for saving and transferring.
2017-03-03 21:26:06 +00:00
struct SecSpecial play
2017-01-14 12:02:08 +00:00
{
Name damagetype;
int damageamount;
2021-06-28 14:19:59 +00:00
int special;
2017-01-14 12:02:08 +00:00
short damageinterval;
short leakydamage;
int Flags;
}
2017-03-16 09:37:55 +00:00
struct FColormap
{
Color LightColor;
Color FadeColor;
uint8 Desaturation;
uint8 BlendFactor;
uint16 FogDensity;
}
2017-03-03 21:26:06 +00:00
struct Sector native play
2017-01-14 12:02:08 +00:00
{
2017-03-13 11:48:25 +00:00
2017-03-16 09:37:55 +00:00
native readonly FColormap ColorMap;
2018-12-21 00:03:52 +00:00
native readonly Color SpecialColors[5];
native readonly Color AdditiveColors[5];
2017-01-14 12:02:08 +00:00
native Actor SoundTarget;
2021-06-28 14:19:59 +00:00
native int special;
2017-01-14 12:02:08 +00:00
native int16 lightlevel;
native int16 seqType;
native int sky;
native Name SeqName;
native readonly Vector2 centerspot;
native int validcount;
native Actor thinglist;
native double friction, movefactor;
native int terrainnum[2];
// thinker_t for reversable actions
2018-01-28 18:41:26 +00:00
native SectorEffect floordata;
native SectorEffect ceilingdata;
native SectorEffect lightingdata;
2017-01-14 12:02:08 +00:00
enum EPlane
{
floor,
2017-03-16 09:37:55 +00:00
ceiling,
// only used for specialcolors array
walltop,
wallbottom,
sprites
2017-01-14 12:02:08 +00:00
};
enum EInterpolationType
{
CeilingMove,
FloorMove,
CeilingScroll,
FloorScroll
};
//Interpolation interpolations[4];
native uint8 soundtraversed;
native int8 stairlock;
native int prevsec;
native int nextsec;
2017-03-13 11:48:25 +00:00
native readonly Array<Line> lines;
2017-01-14 12:02:08 +00:00
2017-03-13 11:48:25 +00:00
native readonly @secplane floorplane;
native readonly @secplane ceilingplane;
2017-01-14 12:02:08 +00:00
native readonly Sector heightsec;
native uint bottommap, midmap, topmap;
//struct msecnode_t *touching_thinglist;
//struct msecnode_t *sectorportal_thinglist;
native double gravity;
native Name damagetype;
native int damageamount;
native int16 damageinterval;
native int16 leakydamage;
native readonly uint16 ZoneNumber;
2018-10-31 20:40:08 +00:00
native readonly int healthceiling;
native readonly int healthfloor;
native readonly int healthceilinggroup;
native readonly int healthfloorgroup;
2017-01-14 12:02:08 +00:00
enum ESectorMoreFlags
{
SECMF_FAKEFLOORONLY = 2, // when used as heightsec in R_FakeFlat, only copies floor
SECMF_CLIPFAKEPLANES = 4, // as a heightsec, clip planes to target sector's planes
SECMF_NOFAKELIGHT = 8, // heightsec does not change lighting
SECMF_IGNOREHEIGHTSEC= 16, // heightsec is only for triggering sector actions
SECMF_UNDERWATER = 32, // sector is underwater
SECMF_FORCEDUNDERWATER= 64, // sector is forced to be underwater
SECMF_UNDERWATERMASK = 32+64,
SECMF_DRAWN = 128, // sector has been drawn at least once
SECMF_HIDDEN = 256, // Do not draw on textured automap
}
native uint16 MoreFlags;
enum ESectorFlags
{
SECF_SILENT = 1, // actors in sector make no noise
SECF_NOFALLINGDAMAGE= 2, // No falling damage in this sector
SECF_FLOORDROP = 4, // all actors standing on this floor will remain on it when it lowers very fast.
SECF_NORESPAWN = 8, // players can not respawn in this sector
SECF_FRICTION = 16, // sector has friction enabled
SECF_PUSH = 32, // pushers enabled
SECF_SILENTMOVE = 64, // Sector movement makes mo sound (Eternity got this so this may be useful for an extended cross-port standard.)
SECF_DMGTERRAINFX = 128, // spawns terrain splash when inflicting damage
SECF_ENDGODMODE = 256, // getting damaged by this sector ends god mode
SECF_ENDLEVEL = 512, // ends level when health goes below 10
SECF_HAZARD = 1024, // Change to Strife's delayed damage handling.
2018-12-05 17:58:15 +00:00
SECF_NOATTACK = 2048, // monsters cannot start attacks in this sector.
2017-01-14 12:02:08 +00:00
SECF_WASSECRET = 1 << 30, // a secret that was discovered
SECF_SECRET = 1 << 31, // a secret sector
SECF_DAMAGEFLAGS = SECF_ENDGODMODE|SECF_ENDLEVEL|SECF_DMGTERRAINFX|SECF_HAZARD,
SECF_NOMODIFY = SECF_SECRET|SECF_WASSECRET, // not modifiable by Sector_ChangeFlags
SECF_SPECIALFLAGS = SECF_DAMAGEFLAGS|SECF_FRICTION|SECF_PUSH, // these flags originate from 'special and must be transferrable by floor thinkers
}
enum EMoveResult
{
MOVE_OK,
MOVE_CRUSHED,
MOVE_PASTDEST
};
native uint Flags;
native SectorAction SecActTarget;
2018-04-15 10:12:29 +00:00
native internal uint Portals[2];
2017-01-14 12:02:08 +00:00
native readonly int PortalGroup;
native readonly int sectornum;
2022-11-19 07:45:16 +00:00
native clearscope int Index() const;
2017-01-14 12:02:08 +00:00
2022-11-19 07:45:16 +00:00
native clearscope double, Sector, F3DFloor NextHighestCeilingAt(double x, double y, double bottomz, double topz, int flags = 0) const;
native clearscope double, Sector, F3DFloor NextLowestFloorAt(double x, double y, double z, int flags = 0, double steph = 0) const;
2017-01-14 12:02:08 +00:00
2022-11-19 07:45:16 +00:00
native clearscope F3DFloor Get3DFloor(int index) const;
native clearscope int Get3DFloorCount() const;
native clearscope Sector GetAttached(int index) const;
native clearscope int GetAttachedCount() const;
2019-08-04 13:55:17 +00:00
2017-01-14 12:02:08 +00:00
native void RemoveForceField();
2020-03-10 08:31:21 +00:00
deprecated("3.8", "Use Level.PointInSector instead") static clearscope Sector PointInSector(Vector2 pt)
2019-01-29 00:30:41 +00:00
{
return level.PointInSector(pt);
}
2017-01-14 12:02:08 +00:00
2022-11-19 07:45:16 +00:00
native clearscope bool PlaneMoving(int pos) const;
native clearscope int GetFloorLight() const;
native clearscope int GetCeilingLight() const;
native clearscope Sector GetHeightSec() const;
2017-01-14 12:02:08 +00:00
native void TransferSpecial(Sector model);
2022-11-19 07:45:16 +00:00
native clearscope void GetSpecial(out SecSpecial spec) const;
2017-01-14 12:02:08 +00:00
native void SetSpecial( SecSpecial spec);
2022-11-19 07:45:16 +00:00
native clearscope int GetTerrain(int pos) const;
native clearscope TerrainDef GetFloorTerrain(int pos) const; // Gets the terraindef from floor/ceiling (see EPlane const).
2017-01-14 12:02:08 +00:00
native void CheckPortalPlane(int plane);
2022-11-19 07:45:16 +00:00
native clearscope double, Sector HighestCeilingAt(Vector2 a) const;
native clearscope double, Sector LowestFloorAt(Vector2 a) const;
native clearscope double, double GetFriction(int plane) const;
2017-01-14 12:02:08 +00:00
native void SetXOffset(int pos, double o);
native void AddXOffset(int pos, double o);
2022-11-19 07:45:16 +00:00
native clearscope double GetXOffset(int pos) const;
2017-01-14 12:02:08 +00:00
native void SetYOffset(int pos, double o);
native void AddYOffset(int pos, double o);
2022-11-19 07:45:16 +00:00
native clearscope double GetYOffset(int pos, bool addbase = true) const;
2017-01-14 12:02:08 +00:00
native void SetXScale(int pos, double o);
2022-11-19 07:45:16 +00:00
native clearscope double GetXScale(int pos) const;
2017-01-14 12:02:08 +00:00
native void SetYScale(int pos, double o);
2022-11-19 07:45:16 +00:00
native clearscope double GetYScale(int pos) const;
2017-01-14 12:02:08 +00:00
native void SetAngle(int pos, double o);
2022-11-19 07:45:16 +00:00
native clearscope double GetAngle(int pos, bool addbase = true) const;
2017-01-14 12:02:08 +00:00
native void SetBase(int pos, double y, double o);
native void SetAlpha(int pos, double o);
2022-11-19 07:45:16 +00:00
native clearscope double GetAlpha(int pos) const;
native clearscope int GetFlags(int pos) const;
native clearscope int GetVisFlags(int pos) const;
2017-01-14 12:02:08 +00:00
native void ChangeFlags(int pos, int And, int Or);
2022-11-19 07:45:16 +00:00
native clearscope int GetPlaneLight(int pos) const;
2017-01-14 12:02:08 +00:00
native void SetPlaneLight(int pos, int level);
2017-03-16 09:37:55 +00:00
native void SetColor(color c, int desat = 0);
native void SetFade(color c);
native void SetFogDensity(int dens);
2022-11-19 07:45:16 +00:00
native clearscope double GetGlowHeight(int pos) const;
native clearscope color GetGlowColor(int pos) const;
2017-03-14 12:54:24 +00:00
native void SetGlowHeight(int pos, double height);
native void SetGlowColor(int pos, color color);
2019-12-20 21:25:10 +00:00
native void SetSpecialColor(int pos, color color);
2018-12-21 00:03:52 +00:00
native void SetAdditiveColor(int pos, Color color);
2019-12-22 15:08:34 +00:00
native void SetColorization(int tier, Name cname);
2017-03-14 12:54:24 +00:00
2022-11-19 07:45:16 +00:00
native clearscope TextureID GetTexture(int pos) const;
2017-01-14 12:02:08 +00:00
native void SetTexture(int pos, TextureID tex, bool floorclip = true);
2022-11-19 07:45:16 +00:00
native clearscope double GetPlaneTexZ(int pos) const;
2017-01-14 12:02:08 +00:00
native void SetPlaneTexZ(int pos, double val, bool dirtify = false); // This mainly gets used by init code. The only place where it must set the vertex to dirty is the interpolation code.
native void ChangeLightLevel(int newval);
native void SetLightLevel(int newval);
2022-11-19 07:45:16 +00:00
native clearscope int GetLightLevel() const;
2017-01-14 12:02:08 +00:00
native void AdjustFloorClip();
2022-11-19 07:45:16 +00:00
native clearscope bool IsLinked(Sector other, bool ceiling) const;
2017-01-14 12:02:08 +00:00
2022-11-19 07:45:16 +00:00
native clearscope bool PortalBlocksView(int plane) const;
native clearscope bool PortalBlocksSight(int plane) const;
native clearscope bool PortalBlocksMovement(int plane) const;
native clearscope bool PortalBlocksSound(int plane) const;
native clearscope bool PortalIsLinked(int plane) const;
2017-01-14 12:02:08 +00:00
native void ClearPortal(int plane);
2022-11-19 07:45:16 +00:00
native clearscope double GetPortalPlaneZ(int plane) const;
native clearscope Vector2 GetPortalDisplacement(int plane) const;
native clearscope int GetPortalType(int plane) const;
native clearscope int GetOppositePortalGroup(int plane) const;
native clearscope double CenterFloor() const;
native clearscope double CenterCeiling() const;
2017-01-14 12:02:08 +00:00
native int MoveFloor(double speed, double dest, int crush, int direction, bool hexencrush, bool instant = false);
native int MoveCeiling(double speed, double dest, int crush, int direction, bool hexencrush);
2022-11-19 07:45:16 +00:00
native clearscope Sector NextSpecialSector(int type, Sector prev) const;
native clearscope double, Vertex FindLowestFloorSurrounding() const;
native clearscope double, Vertex FindHighestFloorSurrounding() const;
native clearscope double, Vertex FindNextHighestFloor() const;
native clearscope double, Vertex FindNextLowestFloor() const;
native clearscope double, Vertex FindLowestCeilingSurrounding() const;
native clearscope double, Vertex FindHighestCeilingSurrounding() const;
native clearscope double, Vertex FindNextLowestCeiling() const;
native clearscope double, Vertex FindNextHighestCeiling() const;
native clearscope double FindShortestTextureAround() const;
native clearscope double FindShortestUpperAround() const;
native clearscope Sector FindModelFloorSector(double floordestheight) const;
native clearscope Sector FindModelCeilingSector(double floordestheight) const;
native clearscope int FindMinSurroundingLight(int max) const;
native clearscope double, Vertex FindLowestCeilingPoint() const;
native clearscope double, Vertex FindHighestFloorPoint() const;
2017-01-14 12:02:08 +00:00
native void SetEnvironment(String env);
native void SetEnvironmentID(int envnum);
native SeqNode StartSoundSequenceID (int chan, int sequence, int type, int modenum, bool nostop = false);
native SeqNode StartSoundSequence (int chan, Name seqname, int modenum);
2022-11-19 07:45:16 +00:00
native clearscope SeqNode CheckSoundSequence (int chan) const;
2017-01-14 12:02:08 +00:00
native void StopSoundSequence(int chan);
2022-11-19 07:45:16 +00:00
native clearscope bool IsMakingLoopingSound () const;
2017-01-14 12:02:08 +00:00
2022-11-19 07:45:16 +00:00
clearscope bool isSecret() const
2017-01-14 12:02:08 +00:00
{
return !!(Flags & SECF_SECRET);
}
2022-11-19 07:45:16 +00:00
clearscope bool wasSecret() const
2017-01-14 12:02:08 +00:00
{
return !!(Flags & SECF_WASSECRET);
}
void ClearSecret()
{
Flags &= ~SECF_SECRET;
}
2017-02-15 00:03:47 +00:00
2022-11-19 07:45:16 +00:00
clearscope int GetUDMFInt(Name nm) const
2017-02-15 00:03:47 +00:00
{
return Level.GetUDMFInt(LevelLocals.UDMF_Sector, Index(), nm);
}
2022-11-19 07:45:16 +00:00
clearscope double GetUDMFFloat(Name nm) const
2017-02-15 00:03:47 +00:00
{
return Level.GetUDMFFloat(LevelLocals.UDMF_Sector, Index(), nm);
}
2022-11-19 07:45:16 +00:00
clearscope String GetUDMFString(Name nm) const
2017-02-15 00:03:47 +00:00
{
return Level.GetUDMFString(LevelLocals.UDMF_Sector, Index(), nm);
}
2018-11-28 23:27:09 +00:00
//===========================================================================
//
//
//
//===========================================================================
bool TriggerSectorActions(Actor thing, int activation)
{
let act = SecActTarget;
bool res = false;
while (act != null)
{
Actor next = act.tracer;
if (act.TriggerAction(thing, activation))
{
if (act.bStandStill)
{
act.Destroy();
}
res = true;
}
act = SectorAction(next);
}
return res;
}
2022-11-19 07:45:16 +00:00
native clearscope int GetHealth(SectorPart part) const;
2018-11-06 02:59:17 +00:00
native void SetHealth(SectorPart part, int newhealth);
2023-01-18 00:55:46 +00:00
native int CountTags() const;
native int GetTag(int index) const;
2017-01-14 12:02:08 +00:00
}
2017-03-09 16:05:51 +00:00
class SectorTagIterator : Object native
{
2020-03-10 08:31:21 +00:00
deprecated("3.8", "Use Level.CreateSectorTagIterator() instead") static SectorTagIterator Create(int tag, line defline = null)
2019-01-24 01:17:10 +00:00
{
return level.CreateSectorTagIterator(tag, defline);
}
2017-03-09 16:05:51 +00:00
native int Next();
native int NextCompat(bool compat, int secnum);
}
class LineIdIterator : Object native
{
2020-03-10 08:31:21 +00:00
deprecated("3.8", "Use Level.CreateLineIdIterator() instead") static LineIdIterator Create(int tag)
2019-01-24 01:17:10 +00:00
{
return level.CreateLineIdIterator(tag);
}
2017-03-09 16:05:51 +00:00
native int Next();
}