mirror of https://github.com/marrub--/zscript-doc
change flags style
parent
0d8b097846
commit
03f151dca4
|
@ -17,13 +17,13 @@ struct State
|
|||
readonly uint16 TicRange;
|
||||
readonly uint8 UseFlags;
|
||||
|
||||
readonly bool bCANRAISE;
|
||||
readonly bool bDEHACKED;
|
||||
readonly bool bFAST;
|
||||
readonly bool bFULLBRIGHT;
|
||||
readonly bool bNODELAY;
|
||||
readonly bool bSAMEFRAME;
|
||||
readonly bool bSLOW;
|
||||
readonly bool bCanRaise;
|
||||
readonly bool bDeHackEd;
|
||||
readonly bool bFast;
|
||||
readonly bool bFullBright;
|
||||
readonly bool bNoDelay;
|
||||
readonly bool bSameFrame;
|
||||
readonly bool bSlow;
|
||||
|
||||
int DistanceTo(State other);
|
||||
bool InStateSequence(State base);
|
||||
|
@ -65,38 +65,38 @@ struct State
|
|||
The scope of this state. See *Action Scoping*. Can have any of the
|
||||
`DefaultStateUsage` flags.
|
||||
|
||||
- `bCANRAISE`
|
||||
- `bCanRaise`
|
||||
|
||||
State has the `CANRAISE` flag, allowing `A_VileChase` to target this actor
|
||||
State has the `CanRaise` flag, allowing `A_VileChase` to target this actor
|
||||
for healing without entering an infinitely long state.
|
||||
|
||||
- `bDEHACKED`
|
||||
- `bDeHackEd`
|
||||
|
||||
`true` if the state has been modified by DeHackEd.
|
||||
|
||||
- `bFAST`
|
||||
- `bFast`
|
||||
|
||||
State has the `FAST` flag, halving the duration when fast monsters is
|
||||
State has the `Fast` flag, halving the duration when fast monsters is
|
||||
enabled.
|
||||
|
||||
- `bFULLBRIGHT`
|
||||
- `bFullBright`
|
||||
|
||||
State has the `BRIGHT` flag, making it fully bright regardless of other
|
||||
State has the `Bright` flag, making it fully bright regardless of other
|
||||
lighting conditions.
|
||||
|
||||
- `bNODELAY`
|
||||
- `bNoDelay`
|
||||
|
||||
State has the `NODELAY` flag, forcing the associated action function to be
|
||||
State has the `NoDelay` flag, forcing the associated action function to be
|
||||
run if the actor is in its first tic.
|
||||
|
||||
- `bSAMEFRAME`
|
||||
- `bSameFrame`
|
||||
|
||||
`true` if the state's frame is to be kept from the last frame used, i.e., is
|
||||
`#`.
|
||||
|
||||
- `bSLOW`
|
||||
- `bSlow`
|
||||
|
||||
State has the `SLOW` flag, doubling the duration when slow monsters is
|
||||
State has the `Slow` flag, doubling the duration when slow monsters is
|
||||
enabled.
|
||||
|
||||
- `DistanceTo`
|
||||
|
|
|
@ -5,7 +5,7 @@ The base class of all `class` types.
|
|||
```
|
||||
class Object
|
||||
{
|
||||
bool bDESTROYED;
|
||||
bool bDestroyed;
|
||||
|
||||
class GetClass();
|
||||
string GetClassName();
|
||||
|
@ -17,7 +17,7 @@ class Object
|
|||
}
|
||||
```
|
||||
|
||||
- `bDESTROYED`
|
||||
- `bDestroyed`
|
||||
|
||||
This object wants to be destroyed but has not yet been garbage collected.
|
||||
|
||||
|
|
|
@ -36,11 +36,11 @@ class PSprite : Object play
|
|||
double X;
|
||||
double Y;
|
||||
|
||||
bool bADDBOB;
|
||||
bool bADDWEAPON;
|
||||
bool bCVARFAST;
|
||||
bool bFLIP;
|
||||
bool bPOWDOUBLE;
|
||||
bool bAddBob;
|
||||
bool bAddWeapon;
|
||||
bool bCVarFast;
|
||||
bool bFlip;
|
||||
bool bPowDouble;
|
||||
|
||||
void SetState(State newstate, bool pending = false);
|
||||
void Tick();
|
||||
|
@ -108,23 +108,23 @@ class PSprite : Object play
|
|||
The offset from the weapon's normal resting position on the vertical axis.
|
||||
Note that `32` is the real resting position because of `A_Raise`.
|
||||
|
||||
- `bADDBOB`
|
||||
- `bAddBob`
|
||||
|
||||
Adds the weapon's bobbing to this layer's offset.
|
||||
|
||||
- `bADDWEAPON`
|
||||
- `bAddWeapon`
|
||||
|
||||
Adds the weapon layer's offsets to this layer's offset.
|
||||
|
||||
- `bCVARFAST`
|
||||
- `bCVarFast`
|
||||
|
||||
Layer will respect `sv_fastweapons`.
|
||||
|
||||
- `bFLIP`
|
||||
- `bFlip`
|
||||
|
||||
Flips the weapon visually horizontally.
|
||||
|
||||
- `bPOWDOUBLE`
|
||||
- `bPowDouble`
|
||||
|
||||
Layer will respect `PowerDoubleFiringSpeed`.
|
||||
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Example: Class headers](#example-class-headers)
|
||||
* [Example: Class definitions](#example-class-definitions)
|
||||
* [Example: Class headers](#example-class-headers)
|
||||
* [Example: Class definitions](#example-class-definitions)
|
||||
* [Class Flags](#class-flags)
|
||||
* [Class Content](#class-content)
|
||||
* [Property Definitions](#property-definitions)
|
||||
* [Example: Property definitions](#example-property-definitions)
|
||||
* [Example: Property definitions](#example-property-definitions)
|
||||
* [Flag Definitions](#flag-definitions)
|
||||
* [Example: Flag definitions](#example-flag-definitions)
|
||||
* [Example: Flag definitions](#example-flag-definitions)
|
||||
* [Default Blocks](#default-blocks)
|
||||
* [Default Flag](#default-flag)
|
||||
* [Default Property](#default-property)
|
||||
* [Default Flag](#default-flag)
|
||||
* [Default Property](#default-property)
|
||||
* [State Definitions](#state-definitions)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
@ -211,7 +211,7 @@ Flag definitions are used within classes to define defaultable boolean flags on
|
|||
actors. They are not valid on classes not derived from Actor.
|
||||
|
||||
When registered, a flag will be available in the `default` block as
|
||||
`CLASSNAME.FLAGNAME`, as well as a member as `bFLAGNAME`.
|
||||
`ClassName.FlagName`, as well as a member as `bFlagName`.
|
||||
|
||||
Each flag operates on a singular bit of any integer member of the class. The
|
||||
integer must be exactly 32 bits, though if it is signed or not does not matter.
|
||||
|
@ -246,23 +246,23 @@ class MyCoolActorWithFlags : Actor
|
|||
// Hey, those sentences sounded familiar...
|
||||
default
|
||||
{
|
||||
+MYCOOLACTORWITHFLAGS.THIS_ONE_IS_ON
|
||||
-MYCOOLACTORWITHFLAGS.THIS_ONE_IS_OFF
|
||||
+MyCoolActorWithFlags.ThisOneIsOn
|
||||
-MyCoolActorWithFlags.ThisOneIsOff
|
||||
}
|
||||
|
||||
// Declare a flag field for all of the flags. This can hold up to 32 flags.
|
||||
int m_Flags;
|
||||
|
||||
// Declare the flags, one at a time...
|
||||
flagdef THIS_ONE_IS_ON: m_Flags, 0;
|
||||
flagdef THIS_ONE_IS_OFF: m_Flags, 1;
|
||||
flagdef THIS_ONE_ALIASES_ON: m_Flags, 0;
|
||||
flagdef ThisOneIsOn: m_Flags, 0;
|
||||
flagdef ThisOneIsOff: m_Flags, 1;
|
||||
flagdef ThisOneAliasesOn: m_Flags, 0;
|
||||
|
||||
// Unnecessary, since you can just access it directly, but this demonstrates
|
||||
// how declared flags can be used in methods.
|
||||
bool CheckIfOnIsOn()
|
||||
{
|
||||
return bTHIS_ONE_IS_ON;
|
||||
return bThisOneIsOn;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue