zscript-doc/api-level-Sector.md

197 lines
5.5 KiB
Markdown
Raw Normal View History

2018-12-29 16:05:19 -08:00
# Sector
TODO
```
struct Sector play
{
2018-12-29 20:04:32 -08:00
readonly color[5] AdditiveColors;
2018-12-29 16:05:19 -08:00
readonly FColormap ColorMap;
2018-12-29 20:04:32 -08:00
readonly color[5] SpecialColors;
2018-12-29 16:05:19 -08:00
Actor SoundTarget;
int16 LightLevel;
int16 SeqType;
2018-12-29 20:04:32 -08:00
int16 Special;
2018-12-29 16:05:19 -08:00
name SeqName;
2018-12-29 20:04:32 -08:00
int Sky;
2018-12-29 16:05:19 -08:00
readonly vector2 CenterSpot;
Actor ThingList;
2018-12-29 20:04:32 -08:00
int ValidCount;
2018-12-29 16:05:19 -08:00
2018-12-29 20:04:32 -08:00
double Friction;
double MoveFactor;
int TerrainNum[2];
2018-12-29 16:05:19 -08:00
SectorEffect CeilingData;
2018-12-29 20:04:32 -08:00
SectorEffect FloorData;
2018-12-29 16:05:19 -08:00
SectorEffect LightingData;
2018-12-29 20:04:32 -08:00
int NextSec;
int PrevSec;
2018-12-29 16:05:19 -08:00
uint8 SoundTraversed;
int8 StairLock;
readonly array<Line> Lines;
readonly SecPlane CeilingPlane;
2018-12-29 20:04:32 -08:00
readonly SecPlane FloorPlane;
2018-12-29 16:05:19 -08:00
readonly Sector HeightSec;
2018-12-29 20:04:32 -08:00
uint BottomMap;
uint MidMap;
uint TopMap;
2018-12-29 16:05:19 -08:00
int DamageAmount;
int16 DamageInterval;
2018-12-29 20:04:32 -08:00
name DamageType;
double Gravity;
2018-12-29 16:05:19 -08:00
int16 LeakyDamage;
readonly uint16 ZoneNumber;
2018-12-29 20:04:32 -08:00
readonly int HealthCeiling;
readonly int HealthCeilingGroup;
readonly int HealthFloor;
readonly int HealthFloorGroup;
2018-12-29 16:05:19 -08:00
uint Flags;
uint16 MoreFlags;
SectorAction SecActTarget;
2018-12-29 20:04:32 -08:00
readonly int PortalGroup;
internal uint[2] Portals;
2018-12-29 16:05:19 -08:00
readonly int SectorNum;
int Index();
double, Sector, F3DFloor NextHighestCeilingAt(double x, double y, double bottomz, double topz, int flags = 0);
double, Sector, F3DFloor NextLowestFloorAt(double x, double y, double z, int flags = 0, double steph = 0);
void RemoveForceField();
2018-12-29 20:04:32 -08:00
static clearscope Sector PointInSector(vector2 pt);
2018-12-29 16:05:19 -08:00
2018-12-29 20:04:32 -08:00
void CheckPortalPlane(int plane);
2018-12-29 16:05:19 -08:00
int GetCeilingLight();
2018-12-29 20:04:32 -08:00
int GetFloorLight();
2018-12-29 16:05:19 -08:00
Sector GetHeightSec();
void GetSpecial(out SecSpecial spec);
int GetTerrain(int pos);
2018-12-29 20:04:32 -08:00
bool PlaneMoving(int pos);
void SetSpecial(SecSpecial spec);
void TransferSpecial(Sector model);
2018-12-29 16:05:19 -08:00
2018-12-29 20:04:32 -08:00
double, double GetFriction(int plane);
2018-12-29 16:05:19 -08:00
double, Sector HighestCeilingAt(vector2 a);
double, Sector LowestFloorAt(vector2 a);
void AddXOffset(int pos, double o);
void AddYOffset(int pos, double o);
2018-12-29 20:04:32 -08:00
void ChangeFlags(int pos, int and, int or);
double GetAlpha(int pos);
double GetAngle(int pos, bool addbase = true);
int GetFlags(int pos);
color GetGlowColor(int pos);
double GetGlowHeight(int pos);
int GetPlaneLight(int pos);
int GetVisFlags(int pos);
double GetXOffset(int pos);
2018-12-29 16:05:19 -08:00
double GetXScale(int pos);
2018-12-29 20:04:32 -08:00
double GetYOffset(int pos, bool addbase = true);
2018-12-29 16:05:19 -08:00
double GetYScale(int pos);
2018-12-29 20:04:32 -08:00
void SetAdditiveColor(int pos, color cr);
void SetAlpha(int pos, double o);
2018-12-29 16:05:19 -08:00
void SetAngle(int pos, double o);
void SetBase(int pos, double y, double o);
void SetColor(color c, int desat = 0);
void SetFade(color c);
void SetFogDensity(int dens);
void SetGlowColor(int pos, color color);
2018-12-29 20:04:32 -08:00
void SetGlowHeight(int pos, double height);
void SetPlaneLight(int pos, int level);
2018-12-29 16:05:19 -08:00
void SetSpecialColor(int pos, color color);
2018-12-29 20:04:32 -08:00
void SetXOffset(int pos, double o);
void SetXScale(int pos, double o);
void SetYOffset(int pos, double o);
void SetYScale(int pos, double o);
2018-12-29 16:05:19 -08:00
2018-12-29 20:04:32 -08:00
void AdjustFloorClip();
2018-12-29 16:05:19 -08:00
void ChangeLightLevel(int newval);
int GetLightLevel();
2018-12-29 20:04:32 -08:00
double GetPlaneTexZ(int pos);
textureid GetTexture(int pos);
2018-12-29 16:05:19 -08:00
bool IsLinked(Sector other, bool ceiling);
2018-12-29 20:04:32 -08:00
void SetLightLevel(int newval);
void SetPlaneTexZ(int pos, double val, bool dirtify = false);
void SetTexture(int pos, textureid tex, bool floorclip = true);
2018-12-29 16:05:19 -08:00
2018-12-29 20:04:32 -08:00
double CenterCeiling();
double CenterFloor();
2018-12-29 16:05:19 -08:00
void ClearPortal(int plane);
2018-12-29 20:04:32 -08:00
int GetOppositePortalGroup(int plane);
2018-12-29 16:05:19 -08:00
vector2 GetPortalDisplacement(int plane);
2018-12-29 20:04:32 -08:00
double GetPortalPlaneZ(int plane);
2018-12-29 16:05:19 -08:00
int GetPortalType(int plane);
2018-12-29 20:04:32 -08:00
bool PortalBlocksMovement(int plane);
bool PortalBlocksSight(int plane);
bool PortalBlocksSound(int plane);
bool PortalBlocksView(int plane);
bool PortalIsLinked(int plane);
2018-12-29 16:05:19 -08:00
bool TriggerSectorActions(Actor thing, int activation);
int MoveCeiling(double speed, double dest, int crush, int direction, bool hexencrush);
2018-12-29 20:04:32 -08:00
int MoveFloor(double speed, double dest, int crush, int direction, bool hexencrush, bool instant = false);
2018-12-29 16:05:19 -08:00
Sector NextSpecialSector(int type, Sector prev);
2018-12-29 20:04:32 -08:00
double, Vertex FindHighestCeilingSurrounding();
double, Vertex FindHighestFloorPoint();
2018-12-29 16:05:19 -08:00
double, Vertex FindHighestFloorSurrounding();
2018-12-29 20:04:32 -08:00
double, Vertex FindLowestCeilingPoint();
2018-12-29 16:05:19 -08:00
double, Vertex FindLowestCeilingSurrounding();
2018-12-29 20:04:32 -08:00
double, Vertex FindLowestFloorSurrounding();
2018-12-29 16:05:19 -08:00
double, Vertex FindNextHighestCeiling();
2018-12-29 20:04:32 -08:00
double, Vertex FindNextHighestFloor();
double, Vertex FindNextLowestCeiling();
double, Vertex FindNextLowestFloor();
2018-12-29 16:05:19 -08:00
2018-12-29 20:04:32 -08:00
int FindMinSurroundingLight(int max);
Sector FindModelCeilingSector(double floordestheight);
Sector FindModelFloorSector(double floordestheight);
2018-12-29 16:05:19 -08:00
double FindShortestTextureAround();
double FindShortestUpperAround();
void SetEnvironment(string env);
void SetEnvironmentID(int envnum);
SeqNode CheckSoundSequence(int chan);
2018-12-29 20:04:32 -08:00
bool IsMakingLoopingSound();
SeqNode StartSoundSequence(int chan, name seqname, int modenum);
SeqNode StartSoundSequenceID(int chan, int sequence, int type, int modenum, bool nostop = false);
void StopSoundSequence(int chan);
2018-12-29 16:05:19 -08:00
2018-12-29 20:04:32 -08:00
void ClearSecret();
2018-12-29 16:05:19 -08:00
bool IsSecret();
bool WasSecret();
2018-12-29 20:04:32 -08:00
clearscope int GetHealth(SectorPart part);
void SetHealth(SectorPart part, int newhealth);
2018-12-29 16:05:19 -08:00
double GetUDMFFloat(name nm);
int GetUDMFInt(name nm);
string GetUDMFString(name nm);
}
```
2018-12-29 20:04:32 -08:00
TODO
2018-12-29 16:05:19 -08:00
<!-- EOF -->