mirror of https://github.com/marrub--/zscript-doc
style changes
parent
6a1c2320a6
commit
c88d002505
|
@ -33,90 +33,87 @@ struct State
|
|||
}
|
||||
```
|
||||
|
||||
- `Frame`
|
||||
### `Frame`
|
||||
|
||||
The sprite frame of this state.
|
||||
|
||||
- `NextState`
|
||||
### `NextState`
|
||||
|
||||
A pointer to the next state in the global state table.
|
||||
|
||||
- `Sprite`
|
||||
### `Sprite`
|
||||
|
||||
The sprite ID of this state.
|
||||
|
||||
- `Tics`
|
||||
### `Tics`
|
||||
|
||||
The number of game ticks this state lasts.
|
||||
|
||||
- `Misc1`
|
||||
- `Misc2`
|
||||
### `Misc1`, `Misc2`
|
||||
|
||||
Primarily used in DeHackEd compatibility. Don't use this.
|
||||
|
||||
- `TicRange`
|
||||
### `TicRange`
|
||||
|
||||
The maximum amount of tics to add for random tic durations, or `0` if the
|
||||
duration is not random. For example, `TNT1 A random(5, 7)` would have a
|
||||
`Tics` value of `5` and a `TicRange` of `2`.
|
||||
duration is not random. For example, `TNT1 A random(5, 7)` would have a `Tics`
|
||||
value of `5` and a `TicRange` of `2`.
|
||||
|
||||
- `UseFlags`
|
||||
### `UseFlags`
|
||||
|
||||
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
|
||||
for healing without entering an infinitely long state.
|
||||
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
|
||||
enabled.
|
||||
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
|
||||
lighting conditions.
|
||||
|
||||
- `bNoDelay`
|
||||
### `bNoDelay`
|
||||
|
||||
State has the `NoDelay` flag, forcing the associated action function to be
|
||||
run if the actor is in its first tic.
|
||||
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
|
||||
enabled.
|
||||
State has the `Slow` flag, doubling the duration when slow monsters is enabled.
|
||||
|
||||
- `DistanceTo`
|
||||
### `DistanceTo`
|
||||
|
||||
Returns the offset between this state and `other` in the global frame table.
|
||||
Only works if both states are owned by the same actor.
|
||||
|
||||
- `InStateSequence`
|
||||
### `InStateSequence`
|
||||
|
||||
Returns `true` if this state is within a contiguous state sequence beginning
|
||||
with `base`.
|
||||
|
||||
- `ValidateSpriteFrame`
|
||||
### `ValidateSpriteFrame`
|
||||
|
||||
Returns `true` if the sprite frame actually exists.
|
||||
|
||||
- `GetSpriteTexture`
|
||||
### `GetSpriteTexture`
|
||||
|
||||
Returns the texture, if the texture should be flipped horizontally, and
|
||||
scaling of this state's sprite. Scaling will return `scale` unless `skin` is
|
||||
nonzero. `skin` determines the player skin used.
|
||||
Returns the texture, if the texture should be flipped horizontally, and scaling
|
||||
of this state's sprite. Scaling will return `scale` unless `skin` is nonzero.
|
||||
`skin` determines the player skin used.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -30,74 +30,74 @@ struct Array<Type>
|
|||
}
|
||||
```
|
||||
|
||||
- `Max`
|
||||
### `Max`
|
||||
|
||||
Returns the amount of allocated objects in the array.
|
||||
|
||||
- `Size`
|
||||
### `Size`
|
||||
|
||||
Returns the amount of constructed objects in the array.
|
||||
|
||||
- `Clear`
|
||||
### `Clear`
|
||||
|
||||
Clears out the entire array, possibly destroying all objects in it.
|
||||
|
||||
- `Delete`
|
||||
### `Delete`
|
||||
|
||||
Removes `count` objects starting at `index`, possibly destroying them. Moves
|
||||
objects after `index + count` to the left.
|
||||
|
||||
- `Pop`
|
||||
### `Pop`
|
||||
|
||||
Removes the last item in the array, possibly destroying it. Returns `false`
|
||||
if there are no items in the array to begin with.
|
||||
Removes the last item in the array, possibly destroying it. Returns `false` if
|
||||
there are no items in the array to begin with.
|
||||
|
||||
- `Append`
|
||||
### `Append`
|
||||
|
||||
Value-copies another array's contents and places them into this array at the
|
||||
end.
|
||||
|
||||
- `Copy`
|
||||
### `Copy`
|
||||
|
||||
Value-copies another array's contents into this array. The contents of
|
||||
`other` are preserved. This operation can be extremely taxing in some cases.
|
||||
Value-copies another array's contents into this array. The contents of `other`
|
||||
are preserved. This operation can be extremely taxing in some cases.
|
||||
|
||||
- `Move`
|
||||
### `Move`
|
||||
|
||||
Moves another array's contents into this array. The contents of `other` are
|
||||
left indeterminate and shall not be used. This operation is extremely fast
|
||||
as it only copies pointers but must be used carefully to avoid error.
|
||||
|
||||
- `Find`
|
||||
### `Find`
|
||||
|
||||
Finds the index of `item` in the array, or `Size` if it couldn't be found.
|
||||
|
||||
- `Grow`
|
||||
### `Grow`
|
||||
|
||||
Ensures the array can hold at least `amount` new members, growing the
|
||||
allocated object amount if necessary.
|
||||
Ensures the array can hold at least `amount` new members, growing the allocated
|
||||
object amount if necessary.
|
||||
|
||||
- `Insert`
|
||||
### `Insert`
|
||||
|
||||
Inserts `item` at `index`. Moves objects after `index` to the right.
|
||||
|
||||
- `Push`
|
||||
### `Push`
|
||||
|
||||
Places `item` at the end of the array, calling `Grow` if necessary.
|
||||
|
||||
- `Reserve`
|
||||
### `Reserve`
|
||||
|
||||
Adds `amount` new empty-constructed objects at the end of the array,
|
||||
increasing `Size` and calling `Grow` if necessary. Value types are
|
||||
initialized to zero and reference types to `null`.
|
||||
Adds `amount` new empty-constructed objects at the end of the array, increasing
|
||||
`Size` and calling `Grow` if necessary. Value types are initialized to zero and
|
||||
reference types to `null`.
|
||||
|
||||
- `Resize`
|
||||
### `Resize`
|
||||
|
||||
Adds or removes objects based on `amount`. If it is less than `Size` then
|
||||
objects are destroyed, if it is more then objects are empty-constructed. New
|
||||
objects follow the same initialization rules as `Reserve`.
|
||||
|
||||
- `ShrinkToFit`
|
||||
### `ShrinkToFit`
|
||||
|
||||
Shrinks `Max` to `Size`. Does not mutate any objects in the array.
|
||||
|
||||
|
|
|
@ -27,44 +27,41 @@ struct CVar
|
|||
}
|
||||
```
|
||||
|
||||
- `FindCVar`
|
||||
### `FindCVar`
|
||||
|
||||
Returns a server CVar by name, or `null` if none is found.
|
||||
|
||||
- `GetCVar`
|
||||
### `GetCVar`
|
||||
|
||||
Returns a user or server CVar by name, with `player` as the user if
|
||||
applicable, or `null` if none is found.
|
||||
Returns a user or server CVar by name, with `player` as the user if applicable,
|
||||
or `null` if none is found.
|
||||
|
||||
- `GetBool`
|
||||
### `GetBool`
|
||||
|
||||
Returns a boolean representing the value of the CVar, or `false` if it
|
||||
cannot be represented.
|
||||
|
||||
- `GetFloat`
|
||||
### `GetFloat`
|
||||
|
||||
Returns a float representing the value of the CVar, or `0.0` if it cannot be
|
||||
represented.
|
||||
|
||||
- `GetInt`
|
||||
### `GetInt`
|
||||
|
||||
Returns an integer representing the value of the CVar, or `0` if it cannot
|
||||
be represented.
|
||||
Returns an integer representing the value of the CVar, or `0` if it cannot be
|
||||
represented.
|
||||
|
||||
- `GetString`
|
||||
### `GetString`
|
||||
|
||||
Returns a string representing the value of the CVar. CVars can always be
|
||||
represented as strings.
|
||||
|
||||
- `SetBool`
|
||||
- `SetFloat`
|
||||
- `SetInt`
|
||||
- `SetString`
|
||||
### `SetBool`, `SetFloat`, `SetInt`, `SetString`
|
||||
|
||||
Sets the representation of the CVar to `v`. May only be used on mod-defined
|
||||
CVars.
|
||||
|
||||
- `GetRealType`
|
||||
### `GetRealType`
|
||||
|
||||
Returns the type of the CVar as it was defined, which may be one of the
|
||||
following:
|
||||
|
@ -72,12 +69,12 @@ struct CVar
|
|||
| Name |
|
||||
| ---- |
|
||||
| `CVar.CVAR_BOOL` |
|
||||
| `CVar.CVAR_COLOR |
|
||||
| `CVar.CVAR_COLOR` |
|
||||
| `CVar.CVAR_FLOAT` |
|
||||
| `CVar.CVAR_INT` |
|
||||
| `CVar.CVAR_STRING` |
|
||||
|
||||
- `ResetToDefault`
|
||||
### `ResetToDefault`
|
||||
|
||||
Resets the CVar to its default value and returns 0. The purpose of the
|
||||
return is unknown. May only be used on mod-defined CVars.
|
||||
|
|
|
@ -9,7 +9,7 @@ struct Type[N]
|
|||
}
|
||||
```
|
||||
|
||||
- `Size`
|
||||
### `Size`
|
||||
|
||||
Returns the size of the array. This is a compile-time constant.
|
||||
|
||||
|
|
|
@ -17,33 +17,33 @@ class Object
|
|||
}
|
||||
```
|
||||
|
||||
- `bDestroyed`
|
||||
### `bDestroyed`
|
||||
|
||||
This object wants to be destroyed but has not yet been garbage collected.
|
||||
|
||||
- `GetClass`
|
||||
### `GetClass`
|
||||
|
||||
Returns the class type of this object.
|
||||
|
||||
- `GetClassName`
|
||||
### `GetClassName`
|
||||
|
||||
Returns a string representation of the class type of this object.
|
||||
|
||||
- `GetParentClass`
|
||||
### `GetParentClass`
|
||||
|
||||
Returns the class type of this object's parent class.
|
||||
|
||||
- `Destroy`
|
||||
### `Destroy`
|
||||
|
||||
Destroys this object. Do not use the object after calling this. References
|
||||
to it will be invalidated.
|
||||
Destroys this object. Do not use the object after calling this. References to
|
||||
it will be invalidated.
|
||||
|
||||
- `OnDestroy`
|
||||
### `OnDestroy`
|
||||
|
||||
Called just before the object is collected by the garbage collector. **Not
|
||||
deterministic** unless the object is linked into the thinker list, in which
|
||||
case it is destroyed earlier in a deterministic setting. Not all `Thinker`s
|
||||
are linked into this list, so be careful when overriding this. Any `Actor`
|
||||
will generally be safe.
|
||||
case it is destroyed earlier in a deterministic setting. Not all `Thinker`s are
|
||||
linked into this list, so be careful when overriding this. Any `Actor` will
|
||||
generally be safe.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -30,83 +30,81 @@ struct String
|
|||
}
|
||||
```
|
||||
|
||||
- `Format`
|
||||
### `Format`
|
||||
|
||||
Creates a string using a format string and any amount of arguments.
|
||||
|
||||
- `AppendFormat`
|
||||
### `AppendFormat`
|
||||
|
||||
Works like `Format`, but appends the result to the string.
|
||||
|
||||
- `CharAt`
|
||||
### `CharAt`
|
||||
|
||||
Returns the character at `pos` as a new string.
|
||||
|
||||
- `CharCodeAt`
|
||||
### `CharCodeAt`
|
||||
|
||||
Returns the character at `pos` as an integer.
|
||||
|
||||
- `Filter`
|
||||
### `Filter`
|
||||
|
||||
Replaces escape sequences in a string with escaped characters as a new
|
||||
string.
|
||||
Replaces escape sequences in a string with escaped characters as a new string.
|
||||
|
||||
- `IndexOf`
|
||||
### `IndexOf`
|
||||
|
||||
Returns the first index of `substr` starting from the left at `start`.
|
||||
|
||||
- `Left`
|
||||
### `Left`
|
||||
|
||||
Returns the first `len` characters as a new string.
|
||||
|
||||
- `Length`
|
||||
### `Length`
|
||||
|
||||
Returns the number of characters in this string.
|
||||
|
||||
- `Mid`
|
||||
### `Mid`
|
||||
|
||||
Returns `len` characters starting at `pos` as a new string.
|
||||
|
||||
- `Remove`
|
||||
### `Remove`
|
||||
|
||||
Removes `amount` characters starting at `index` in place.
|
||||
|
||||
- `Replace`
|
||||
### `Replace`
|
||||
|
||||
Replaces all instances of `pattern` with `replacement` in place.
|
||||
|
||||
- `RightIndexOf`
|
||||
### `RightIndexOf`
|
||||
|
||||
Returns the first index of `substr` starting from the right at `end`.
|
||||
|
||||
- `Split`
|
||||
### `Split`
|
||||
|
||||
Splits the string by each `delimiter` into `tokens`. `keepEmpty` may be
|
||||
either `TOK_SKIPEMPTY` (the default) or `TOK_KEEPEMPTY`, which will keep or
|
||||
discard empty strings found while splitting.
|
||||
Splits the string by each `delimiter` into `tokens`. `keepEmpty` may be either
|
||||
`TOK_SKIPEMPTY` (the default) or `TOK_KEEPEMPTY`, which will keep or discard
|
||||
empty strings found while splitting.
|
||||
|
||||
- `ToDouble`
|
||||
### `ToDouble`
|
||||
|
||||
Interprets the string as a double precision floating point number.
|
||||
|
||||
- `ToInt`
|
||||
### `ToInt`
|
||||
|
||||
Interprets the string as a base `base` integer, guessing the base if it is
|
||||
`0`.
|
||||
Interprets the string as a base `base` integer, guessing the base if it is `0`.
|
||||
|
||||
- `ToLower`
|
||||
### `ToLower`
|
||||
|
||||
Converts all characters in the string to lowercase in place.
|
||||
|
||||
- `ToUpper`
|
||||
### `ToUpper`
|
||||
|
||||
Converts all characters in the string to uppercase in place.
|
||||
|
||||
- `Truncate`
|
||||
### `Truncate`
|
||||
|
||||
Truncates the string to `len` characters in place.
|
||||
|
||||
- `LastIndexOf`
|
||||
### `LastIndexOf`
|
||||
|
||||
Broken. Use `RightIndexOf` instead.
|
||||
|
||||
|
|
|
@ -9,12 +9,11 @@ struct StringTable
|
|||
}
|
||||
```
|
||||
|
||||
- `Localize`
|
||||
### `Localize`
|
||||
|
||||
Returns the localized variant of `val`. If `prefixed` is `true`, the string
|
||||
is returned as-is unless it is prefixed with `$` where the `$` character
|
||||
itself is ignored. **Not deterministic** unless there is only one variant of
|
||||
`val`. This is generally fine because this should only be used for visual
|
||||
strings anyway.
|
||||
Returns the localized variant of `val`. If `prefixed` is `true`, the string is
|
||||
returned as-is unless it is prefixed with `$` where the `$` character itself is
|
||||
ignored. **Not deterministic** unless there is only one variant of `val`. This
|
||||
is generally fine because this should only be used for visual strings anyway.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -65,30 +65,30 @@ class Thinker : Object play
|
|||
}
|
||||
```
|
||||
|
||||
- `TICRATE`
|
||||
### `TICRATE`
|
||||
|
||||
The number of game ticks in a second. This value is always `int(35)`.
|
||||
|
||||
- `Level`
|
||||
### `Level`
|
||||
|
||||
The level this `Thinker` is in, which may differ from another one's.
|
||||
|
||||
- `ChangeStatNum`
|
||||
### `ChangeStatNum`
|
||||
|
||||
Changes the statnum of this `Thinker`.
|
||||
|
||||
- `PostBeginPlay`
|
||||
### `PostBeginPlay`
|
||||
|
||||
Called at the very end of this Thinker's initialization.
|
||||
|
||||
- `Tick`
|
||||
### `Tick`
|
||||
|
||||
Called every game tick. The order between this thinker's `Tick` and every
|
||||
other thinker in the same statnum is unspecified.
|
||||
Called every game tick. The order between this thinker's `Tick` and every other
|
||||
thinker in the same statnum is unspecified.
|
||||
|
||||
- `Tics2Seconds`
|
||||
### `Tics2Seconds`
|
||||
|
||||
Roughly converts a number of tics to an integral amount of seconds.
|
||||
Equivalent to `tics / TICRATE`.
|
||||
Roughly converts a number of tics to an integral amount of seconds. Equivalent
|
||||
to `tics / TICRATE`.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -22,11 +22,11 @@ struct Vector3
|
|||
}
|
||||
```
|
||||
|
||||
- `Length`
|
||||
### `Length`
|
||||
|
||||
Returns the length (magnitude) of the vector.
|
||||
|
||||
- `Unit`
|
||||
### `Unit`
|
||||
|
||||
Returns a normalized vector. Equivalent to `vec / vec.Length()`.
|
||||
|
||||
|
|
|
@ -12,15 +12,15 @@ class BrokenLines : Object
|
|||
}
|
||||
```
|
||||
|
||||
- `Count`
|
||||
### `Count`
|
||||
|
||||
Returns the amount of lines in this container.
|
||||
|
||||
- `StringAt`
|
||||
### `StringAt`
|
||||
|
||||
Returns the text of line `line`.
|
||||
|
||||
- `StringWidth`
|
||||
### `StringWidth`
|
||||
|
||||
Returns the width (in pixels) of line `line`.
|
||||
|
||||
|
|
|
@ -11,21 +11,20 @@ struct Console
|
|||
}
|
||||
```
|
||||
|
||||
- `HideConsole`
|
||||
### `HideConsole`
|
||||
|
||||
Hides the console if it is open and `GameState` is not `GS_FULLCONSOLE`.
|
||||
|
||||
- `MidPrint`
|
||||
### `MidPrint`
|
||||
|
||||
Prints `text` (possibly a `LANGUAGE` string if prefixed with `$`) in `font`
|
||||
to the middle of the screen for 1½ seconds. Will print even if the player is
|
||||
a spectator if `bold` is `true`. Uses the `msgmidcolor` CVar for non-bold
|
||||
Prints `text` (possibly a `LANGUAGE` string if prefixed with `$`) in `font` to
|
||||
the middle of the screen for 1½ seconds. Will print even if the player is a
|
||||
spectator if `bold` is `true`. Uses the `msgmidcolor` CVar for non-bold
|
||||
messages and `msgmidcolor2` for bold messages.
|
||||
|
||||
This is the function used internally by ACS' `Print` and `PrintBold`
|
||||
functions.
|
||||
This is the function used internally by ACS' `Print` and `PrintBold` functions.
|
||||
|
||||
- `PrintF`
|
||||
### `PrintF`
|
||||
|
||||
Prints a formatted string to the console.
|
||||
|
||||
|
|
|
@ -20,42 +20,42 @@ struct Font
|
|||
}
|
||||
```
|
||||
|
||||
- `FindFont`
|
||||
### `FindFont`
|
||||
|
||||
Gets a font as defined in `FONTDEFS`.
|
||||
|
||||
- `FindFontColor`
|
||||
### `FindFontColor`
|
||||
|
||||
Returns the color range enumeration for a named color.
|
||||
|
||||
- `GetFont`
|
||||
### `GetFont`
|
||||
|
||||
Gets a font either as defined in `FONTDEFS` or a ZDoom/bitmap font.
|
||||
|
||||
- `GetBottomAlignOffset`
|
||||
### `GetBottomAlignOffset`
|
||||
|
||||
Returns the baseline for the character `code`.
|
||||
|
||||
- `GetCharWidth`
|
||||
### `GetCharWidth`
|
||||
|
||||
Returns the width in pixels of a character code.
|
||||
|
||||
- `GetCursor`
|
||||
### `GetCursor`
|
||||
|
||||
Returns the string used as a blinking cursor graphic for this font.
|
||||
|
||||
- `GetHeight`
|
||||
### `GetHeight`
|
||||
|
||||
Returns the line height of the font.
|
||||
|
||||
- `StringWidth`
|
||||
### `StringWidth`
|
||||
|
||||
Returns the width in pixels of the string.
|
||||
|
||||
- `BreakLines`
|
||||
### `BreakLines`
|
||||
|
||||
Breaks `text` up into a `BrokenLines` structure according to the screen and
|
||||
clip region, as well as appropriately accounting for a maximum width in
|
||||
pixels of `maxlen`.
|
||||
clip region, as well as appropriately accounting for a maximum width in pixels
|
||||
of `maxlen`.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -10,11 +10,11 @@ struct GIFont
|
|||
}
|
||||
```
|
||||
|
||||
- `Color`
|
||||
### `Color`
|
||||
|
||||
The color of the font.
|
||||
|
||||
- `FontName`
|
||||
### `FontName`
|
||||
|
||||
The name of the font.
|
||||
|
||||
|
|
|
@ -32,30 +32,29 @@ struct Screen
|
|||
}
|
||||
```
|
||||
|
||||
- `DrawChar`
|
||||
### `DrawChar`
|
||||
|
||||
The same as `DrawTexture`, but draws the texture of character code
|
||||
`character` from `font`. The output color may be modified by the font color
|
||||
`cr`.
|
||||
The same as `DrawTexture`, but draws the texture of character code `character`
|
||||
from `font`. The output color may be modified by the font color `cr`.
|
||||
|
||||
- `DrawShape`
|
||||
### `DrawShape`
|
||||
|
||||
TODO
|
||||
|
||||
- `DrawText`
|
||||
### `DrawText`
|
||||
|
||||
TODO
|
||||
|
||||
- `DrawTexture`
|
||||
### `DrawTexture`
|
||||
|
||||
Draws texture `tex`, possibly animated by the animation ticker if `animate`
|
||||
is `true`, at horizontal position `x` and vertical position `y`.
|
||||
Draws texture `tex`, possibly animated by the animation ticker if `animate` is
|
||||
`true`, at horizontal position `x` and vertical position `y`.
|
||||
|
||||
Various properties of this drawing process can be changed by passing extra
|
||||
arguments to this function. After all arguments are parsed, the
|
||||
"`CleanMode`" internal variable is used along with the specified virtual
|
||||
width/height to determine how to finally transform positions. `CleanMode`
|
||||
may be one of the following:
|
||||
arguments to this function. After all arguments are parsed, the "`CleanMode`"
|
||||
internal variable is used along with the specified virtual width/height to
|
||||
determine how to finally transform positions. `CleanMode` may be one of the
|
||||
following:
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
|
@ -104,73 +103,73 @@ struct Screen
|
|||
| `DTA_WINDOWLEFTF`, `DTA_WINDOWRIGHTF` | `double size` | Same as `DTA_WINDOWLEFT`/`DTA_WINDOWRIGHT`, but with decimal arguments. |
|
||||
| `DTA_WINDOWLEFT`, `DTA_WINDOWRIGHT` | `int size` | Crops `size` pixels from the left or right. |
|
||||
|
||||
- `Clear`
|
||||
### `Clear`
|
||||
|
||||
Draws a rectangle from `top left` to `bottom right` in screen coordinates of
|
||||
`cr` color. Does not support translucent colors. `palcolor` is a palette
|
||||
index to use as a color in paletted renderers or `-1` for automatic
|
||||
conversion from the given RGB color.
|
||||
`cr` color. Does not support translucent colors. `palcolor` is a palette index
|
||||
to use as a color in paletted renderers or `-1` for automatic conversion from
|
||||
the given RGB color.
|
||||
|
||||
- `Dim`
|
||||
### `Dim`
|
||||
|
||||
Draws a rectangle at `x y` of `w h` size in screen coordinates of `cr`
|
||||
color. Does not support translucent colors, but `amount` may be used to
|
||||
specify the translucency in a range of 0-1 inclusive.
|
||||
Draws a rectangle at `x y` of `w h` size in screen coordinates of `cr` color.
|
||||
Does not support translucent colors, but `amount` may be used to specify the
|
||||
translucency in a range of 0-1 inclusive.
|
||||
|
||||
- `DrawFrame`
|
||||
### `DrawFrame`
|
||||
|
||||
Draws a frame around a rectangle at `x y` of `w h` size in screen
|
||||
coordinates, using the border graphics as defined in `MAPINFO`/GameInfo.
|
||||
Draws a frame around a rectangle at `x y` of `w h` size in screen coordinates,
|
||||
using the border graphics as defined in `MAPINFO`/GameInfo.
|
||||
|
||||
- `DrawLine`
|
||||
### `DrawLine`
|
||||
|
||||
Draws a one pixel wide line from `x0 y0` to `x1 y1` in screen coordinates of
|
||||
color `cr` with alpha `alpha` (range 0-255.)
|
||||
|
||||
- `DrawThickLine`
|
||||
### `DrawThickLine`
|
||||
|
||||
Draws a `thickness` pixel wide line from `x0 y0` to `x1 y1` in screen
|
||||
coordinates of color `cr` with alpha `alpha` (range 0-255.)
|
||||
|
||||
- `GetAspectRatio`
|
||||
### `GetAspectRatio`
|
||||
|
||||
Returns the aspect ratio of the screen.
|
||||
|
||||
- `GetHeight`
|
||||
### `GetHeight`
|
||||
|
||||
Returns the height of the screen.
|
||||
|
||||
- `GetWidth`
|
||||
### `GetWidth`
|
||||
|
||||
Returns the width of the screen.
|
||||
|
||||
- `PaletteColor`
|
||||
### `PaletteColor`
|
||||
|
||||
Returns a `color` for a given palette index.
|
||||
|
||||
- `VirtualToRealCoords`
|
||||
### `VirtualToRealCoords`
|
||||
|
||||
Converts virtual coordinates `pos` from virtual coordinate space `vsize` to
|
||||
screen coordinate space `size`, possibly accounting for aspect ratio
|
||||
differences if `handleaspect` is true. If the ratio is 5:4, `vbottom` will
|
||||
account for the higher-than-wide conversion by repositioning vertically.
|
||||
|
||||
- `ClearClipRect`
|
||||
### `ClearClipRect`
|
||||
|
||||
Clears the clipping rectangle if there is one.
|
||||
|
||||
- `GetClipRect`
|
||||
### `GetClipRect`
|
||||
|
||||
Returns the clipping rectangle's `x`/`y`/`w`/`h`.
|
||||
|
||||
- `GetViewWindow`
|
||||
### `GetViewWindow`
|
||||
|
||||
Returns the 3D viewing window, which may be smaller than the screen size
|
||||
with any given `screenblocks` setting.
|
||||
Returns the 3D viewing window, which may be smaller than the screen size with
|
||||
any given `screenblocks` setting.
|
||||
|
||||
- `SetClipRect`
|
||||
### `SetClipRect`
|
||||
|
||||
Sets the clipping rectangle to restrict further drawing to the region
|
||||
starting at `x y` of size `w h` in screen coordinates.
|
||||
Sets the clipping rectangle to restrict further drawing to the region starting
|
||||
at `x y` of size `w h` in screen coordinates.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -12,7 +12,7 @@ class Shape2D : Object
|
|||
}
|
||||
```
|
||||
|
||||
- `Clear`
|
||||
### `Clear`
|
||||
|
||||
Clears data out of a shape. Uses these as a bit flag:
|
||||
|
||||
|
@ -22,15 +22,15 @@ class Shape2D : Object
|
|||
| `Shape2D.C_Indices` | Clears vertex indices. |
|
||||
| `Shape2D.C_Verts` | Clears vertices. |
|
||||
|
||||
- `PushCoord`
|
||||
### `PushCoord`
|
||||
|
||||
Pushes a texture coordinate into the shape buffer.
|
||||
|
||||
- `PushTriangle`
|
||||
### `PushTriangle`
|
||||
|
||||
Pushes the indices of a triangle into the shape buffer.
|
||||
|
||||
- `PushVertex`
|
||||
### `PushVertex`
|
||||
|
||||
Pushes a vertex into the shape buffer.
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ struct TexMan
|
|||
}
|
||||
```
|
||||
|
||||
- `CheckForTexture`
|
||||
### `CheckForTexture`
|
||||
|
||||
Returns a `textureid` for the texture named `name`. `usetype` may be one of
|
||||
the following, which selects what kind of texture to find:
|
||||
Returns a `textureid` for the texture named `name`. `usetype` may be one of the
|
||||
following, which selects what kind of texture to find:
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
|
@ -55,46 +55,45 @@ struct TexMan
|
|||
| `TexMan.SHORTNAMEONLY` | Will force use of a short name when searching. |
|
||||
| `TexMan.TRYANY` | Returns any other type of texture if one is not found in the specified use type. Default. |
|
||||
|
||||
- `CheckRealHeight`
|
||||
### `CheckRealHeight`
|
||||
|
||||
Returns the height in pixels of the texture down to the last scanline which
|
||||
has actual pixel data. Note that this operation is extremely slow and should
|
||||
be used sparingly.
|
||||
Returns the height in pixels of the texture down to the last scanline which has
|
||||
actual pixel data. Note that this operation is extremely slow and should be
|
||||
used sparingly.
|
||||
|
||||
- `GetName`
|
||||
### `GetName`
|
||||
|
||||
Returns the original name of a `textureid`.
|
||||
|
||||
- `GetScaledOffset`
|
||||
### `GetScaledOffset`
|
||||
|
||||
Returns the offsets for this texture used to display it (rather than the
|
||||
original offsets.)
|
||||
|
||||
- `GetScaledSize`
|
||||
### `GetScaledSize`
|
||||
|
||||
Returns the size used to display this texture (rather than the physical
|
||||
size.)
|
||||
Returns the size used to display this texture (rather than the physical size.)
|
||||
|
||||
- `GetSize`
|
||||
### `GetSize`
|
||||
|
||||
Returns the width and height of a `textureid`.
|
||||
|
||||
- `SetCameraToTexture`
|
||||
### `SetCameraToTexture`
|
||||
|
||||
Sets the camera texture (as defined in `ANIMDEFS`) `texture` to the
|
||||
viewpoint of `viewpoint` with a fov of `fov`.
|
||||
Sets the camera texture (as defined in `ANIMDEFS`) `texture` to the viewpoint
|
||||
of `viewpoint` with a fov of `fov`.
|
||||
|
||||
- `OkForLocalization`
|
||||
### `OkForLocalization`
|
||||
|
||||
TODO
|
||||
|
||||
- `ReplaceTextures`
|
||||
### `ReplaceTextures`
|
||||
|
||||
Note: This function is deprecated and `LevelLocals::ReplaceTextures` should
|
||||
be used instead.
|
||||
Note: This function is deprecated and `LevelLocals::ReplaceTextures` should be
|
||||
used instead.
|
||||
|
||||
Replaces textures named `from` with `to` within the map. `flags` may be used
|
||||
to filter out certain textures from being replaced:
|
||||
Replaces textures named `from` with `to` within the map. `flags` may be used to
|
||||
filter out certain textures from being replaced:
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
|
|
|
@ -15,23 +15,23 @@ struct TextureID
|
|||
}
|
||||
```
|
||||
|
||||
- `Exists`
|
||||
### `Exists`
|
||||
|
||||
Checks if the texture exists within the texture manager at all.
|
||||
|
||||
- `IsNull`
|
||||
### `IsNull`
|
||||
|
||||
Checks if the texture is the null index (`0`.)
|
||||
|
||||
- `IsValid`
|
||||
### `IsValid`
|
||||
|
||||
Checks if the texture index is not the invalid index (`-1`.)
|
||||
|
||||
- `SetInvalid`
|
||||
### `SetInvalid`
|
||||
|
||||
Sets the texture index to `-1`.
|
||||
|
||||
- `SetNull`
|
||||
### `SetNull`
|
||||
|
||||
Sets the texture index to `0`.
|
||||
|
||||
|
|
|
@ -12,23 +12,23 @@ struct ConsoleEvent
|
|||
}
|
||||
```
|
||||
|
||||
- `Player`
|
||||
### `Player`
|
||||
|
||||
The player who created this event, or `-1` if there was no activator. This
|
||||
will always be positive for `NetworkProcess` events and always `-1` for
|
||||
The player who created this event, or `-1` if there was no activator. This will
|
||||
always be positive for `NetworkProcess` events and always `-1` for
|
||||
`ConsoleProcess` events.
|
||||
|
||||
- `Name`
|
||||
### `Name`
|
||||
|
||||
The name as provided to `SendNetworkEvent`. Use this to distinguish between
|
||||
event types. It is favorable to prefix names with the name of your mod or
|
||||
game so that it will not potentially conflict with other mods.
|
||||
event types. It is favorable to prefix names with the name of your mod or game
|
||||
so that it will not potentially conflict with other mods.
|
||||
|
||||
- `Args`
|
||||
### `Args`
|
||||
|
||||
The arguments as provided to `SendNetworkEvent`.
|
||||
|
||||
- `IsManual`
|
||||
### `IsManual`
|
||||
|
||||
`true` if this event was created manually, for instance through a console
|
||||
command.
|
||||
|
|
|
@ -20,14 +20,14 @@ class EventHandler : StaticEventHandler
|
|||
}
|
||||
```
|
||||
|
||||
- `Find`
|
||||
### `Find`
|
||||
|
||||
Finds and returns the `StaticEventHandler` type `type` if it is registered,
|
||||
or `null` if it does not exist. It should be noted that this is exactly the
|
||||
same as `StaticEventHandler`'s, and does not actually check for
|
||||
`EventHandlers`, although due to inheritance will return them correctly.
|
||||
Finds and returns the `StaticEventHandler` type `type` if it is registered, or
|
||||
`null` if it does not exist. It should be noted that this is exactly the same
|
||||
as `StaticEventHandler`'s, and does not actually check for `EventHandlers`,
|
||||
although due to inheritance will return them correctly.
|
||||
|
||||
- `SendNetworkEvent`
|
||||
### `SendNetworkEvent`
|
||||
|
||||
Sends a network event with no activator.
|
||||
|
||||
|
|
|
@ -14,30 +14,30 @@ struct RenderEvent
|
|||
}
|
||||
```
|
||||
|
||||
- `ViewPos`
|
||||
### `ViewPos`
|
||||
|
||||
The position at which the camera is at.
|
||||
|
||||
- `ViewAngle`
|
||||
### `ViewAngle`
|
||||
|
||||
The yaw angle of the camera.
|
||||
|
||||
- `ViewPitch`
|
||||
### `ViewPitch`
|
||||
|
||||
The pitch angle of the camera.
|
||||
|
||||
- `ViewRoll`
|
||||
### `ViewRoll`
|
||||
|
||||
The roll angle of the camera.
|
||||
|
||||
- `FracTic`
|
||||
### `FracTic`
|
||||
|
||||
A value between 0 and 1 (exclusive) representing the time between the last
|
||||
game tick and the next game tick. This is most useful for interpolation, and
|
||||
you can add it to the current game tick to get the real time at which this
|
||||
event has been called. Precision is not specified.
|
||||
A value between 0 and 1 (exclusive) representing the time between the last game
|
||||
tick and the next game tick. This is most useful for interpolation, and you can
|
||||
add it to the current game tick to get the real time at which this event has
|
||||
been called. Precision is not specified.
|
||||
|
||||
- `Camera`
|
||||
### `Camera`
|
||||
|
||||
The actor which is acting as the camera for the player's view.
|
||||
|
||||
|
|
|
@ -12,19 +12,19 @@ struct ReplaceEvent
|
|||
}
|
||||
```
|
||||
|
||||
- `Replacee`
|
||||
### `Replacee`
|
||||
|
||||
The actor class which is being replaced.
|
||||
|
||||
- `Replacement`
|
||||
### `Replacement`
|
||||
|
||||
What to replace it with. This class type is already effected by skill and
|
||||
actor definition replacements, so it may be useful to read it. Modify this
|
||||
to change what the resulting replacement class ends up being.
|
||||
What to replace it with. This class type is already effected by skill and actor
|
||||
definition replacements, so it may be useful to read it. Modify this to change
|
||||
what the resulting replacement class ends up being.
|
||||
|
||||
- `IsFinal`
|
||||
### `IsFinal`
|
||||
|
||||
If `true`, the engine will not attempt to continue going down the
|
||||
replacement chain, and will directly replace the actor with `Replacement`.
|
||||
If `true`, the engine will not attempt to continue going down the replacement
|
||||
chain, and will directly replace the actor with `Replacement`.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -64,81 +64,81 @@ class StaticEventHandler : Object play
|
|||
}
|
||||
```
|
||||
|
||||
- `Find`
|
||||
### `Find`
|
||||
|
||||
Finds and returns the `StaticEventHandler` type `type` if it is registered,
|
||||
or `null` if it does not exist.
|
||||
Finds and returns the `StaticEventHandler` type `type` if it is registered, or
|
||||
`null` if it does not exist.
|
||||
|
||||
- `OnRegister`
|
||||
### `OnRegister`
|
||||
|
||||
Called when this type is registered. This is where you should set `Order`,
|
||||
`IsUiProcessor` and `RequireMouse`.
|
||||
|
||||
- `OnUnregister`
|
||||
### `OnUnregister`
|
||||
|
||||
Called when this type is un-registered. With `StaticEventHandler`s this is
|
||||
called when the engine shuts down, so it isn't particularly useful.
|
||||
|
||||
- `WorldLoaded`
|
||||
### `WorldLoaded`
|
||||
|
||||
Called directly after the status bar is attached to the player and after
|
||||
`REOPEN` ACS scripts are called, just before the display is flushed and
|
||||
auto-save is done.
|
||||
|
||||
- `WorldUnloaded`
|
||||
### `WorldUnloaded`
|
||||
|
||||
Called directly after `UNLOADING` ACS scripts, just before the level is
|
||||
changed.
|
||||
|
||||
- `WorldThingSpawned`
|
||||
### `WorldThingSpawned`
|
||||
|
||||
Called directly after an actor's `PostBeginPlay` function.
|
||||
|
||||
- `WorldThingDied`
|
||||
### `WorldThingDied`
|
||||
|
||||
Called after `MorphedDeath`, inventory items have called `OwnerDied`, and
|
||||
the target is set to the damage source, just before `KILL` ACS scripts are
|
||||
called and the rest of the death handling is done.
|
||||
Called after `MorphedDeath`, inventory items have called `OwnerDied`, and the
|
||||
target is set to the damage source, just before `KILL` ACS scripts are called
|
||||
and the rest of the death handling is done.
|
||||
|
||||
- `WorldThingRevived`
|
||||
### `WorldThingRevived`
|
||||
|
||||
Called when an actor is revived, after everything is finished.
|
||||
|
||||
- `WorldThingDamaged`
|
||||
### `WorldThingDamaged`
|
||||
|
||||
Called directly before `Die`, or directly after after `DamageMobj` finishes.
|
||||
|
||||
- `WorldThingDestroyed`
|
||||
### `WorldThingDestroyed`
|
||||
|
||||
Called at the beginning of an actor's `OnDestroy` function.
|
||||
|
||||
- `WorldLinePreActivated`
|
||||
### `WorldLinePreActivated`
|
||||
|
||||
Called directly after a line is tested for activation, before any other
|
||||
activation specials are called (such as checking for keys, executing the
|
||||
line special, etc.)
|
||||
activation specials are called (such as checking for keys, executing the line
|
||||
special, etc.)
|
||||
|
||||
- `WorldLineActivated`
|
||||
### `WorldLineActivated`
|
||||
|
||||
Called directly after a line's special is executed, if it succeeded, before
|
||||
any other handling (such as changing a switch's texture) is completed.
|
||||
Called directly after a line's special is executed, if it succeeded, before any
|
||||
other handling (such as changing a switch's texture) is completed.
|
||||
|
||||
- `WorldSectorDamaged`
|
||||
### `WorldSectorDamaged`
|
||||
|
||||
Called when a sector is damaged if it has any health groups, before any
|
||||
other handling is done.
|
||||
Called when a sector is damaged if it has any health groups, before any other
|
||||
handling is done.
|
||||
|
||||
- `WorldLineDamaged`
|
||||
### `WorldLineDamaged`
|
||||
|
||||
Called when a line is damaged if it has any health groups, before any other
|
||||
handling is done.
|
||||
|
||||
- `WorldLightning`
|
||||
### `WorldLightning`
|
||||
|
||||
Called when lightning strikes, directly after the sound is played, just
|
||||
before `LIGHTNING` ACS scripts are called.
|
||||
Called when lightning strikes, directly after the sound is played, just before
|
||||
`LIGHTNING` ACS scripts are called.
|
||||
|
||||
- `WorldTick`
|
||||
### `WorldTick`
|
||||
|
||||
Called on every world tick, after interpolators are updated, world freeze is
|
||||
updated, sight counters are reset, particles have run their thinkers, and
|
||||
|
@ -147,101 +147,100 @@ class StaticEventHandler : Object play
|
|||
called when the game is paused, and its execution is entirely deterministic
|
||||
regardless of how this event handler is applied.
|
||||
|
||||
- `RenderOverlay`
|
||||
### `RenderOverlay`
|
||||
|
||||
Despite the name, this is actually run on the status bar, specifically in
|
||||
`BaseStatusBar::DrawTopStuff`. It is run after `HudMessage`s are drawn and
|
||||
power-ups are drawn, just before ゴゴゴ「The Log」ゴゴゴ is drawn. You may
|
||||
use `Screen` functions in this function.
|
||||
power-ups are drawn, just before ゴゴゴ「The Log」ゴゴゴ is drawn. You may use
|
||||
`Screen` functions in this function.
|
||||
|
||||
- `PlayerEntered`
|
||||
### `PlayerEntered`
|
||||
|
||||
Called during level load when each player enters the game, after the camera
|
||||
is set but just before `RETURN` ACS scripts are called.
|
||||
Called during level load when each player enters the game, after the camera is
|
||||
set but just before `RETURN` ACS scripts are called.
|
||||
|
||||
- `PlayerRespawned`
|
||||
### `PlayerRespawned`
|
||||
|
||||
Called when a player spawns, directly after the teleport fog is spanwed and
|
||||
just before `RESPAWN` ACS scripts are called. Also called similarly at the
|
||||
end of the `Respawn` function, for example when the `resurrect` cheat is
|
||||
used.
|
||||
just before `RESPAWN` ACS scripts are called. Also called similarly at the end
|
||||
of the `Respawn` function, for example when the `resurrect` cheat is used.
|
||||
|
||||
- `PlayerDied`
|
||||
### `PlayerDied`
|
||||
|
||||
Called after `WorldThingDied` and `GetDeathHeight`, and after the actor's
|
||||
thing special is activated, when the obituary has been displayed, just
|
||||
before `DEATH` ACS scripts have been called.
|
||||
Called after `WorldThingDied` and `GetDeathHeight`, and after the actor's thing
|
||||
special is activated, when the obituary has been displayed, just before `DEATH`
|
||||
ACS scripts have been called.
|
||||
|
||||
- `PlayerDisconnected`
|
||||
### `PlayerDisconnected`
|
||||
|
||||
Called when a bot is removed and when a player disconnects from the game,
|
||||
just before `DISCONNECT` ACS scripts are called.
|
||||
Called when a bot is removed and when a player disconnects from the game, just
|
||||
before `DISCONNECT` ACS scripts are called.
|
||||
|
||||
- `UiProcess`
|
||||
### `UiProcess`
|
||||
|
||||
Called only if `IsUiProcessor` is `true`. Called when a GUI event is
|
||||
dispatched by the engine, for example when the UI is active and the player
|
||||
has pressed a key or moved the mouse. Mouse movements will only be captured
|
||||
if `RequireMouse` is `true`. Because this interacts directly with the OS it
|
||||
is not part of the game simulation, therefore has `ui` scope and must
|
||||
dispatch commands to the game as networked events. If the return value is
|
||||
`true`, the function will block any further handlers from processing this
|
||||
event, essentially "eating" it. If the return value is `false`, other
|
||||
handlers will continue to be called as normal.
|
||||
Called only if `IsUiProcessor` is `true`. Called when a GUI event is dispatched
|
||||
by the engine, for example when the UI is active and the player has pressed a
|
||||
key or moved the mouse. Mouse movements will only be captured if `RequireMouse`
|
||||
is `true`. Because this interacts directly with the OS it is not part of the
|
||||
game simulation, therefore has `ui` scope and must dispatch commands to the
|
||||
game as networked events. If the return value is `true`, the function will
|
||||
block any further handlers from processing this event, essentially "eating"
|
||||
it. If the return value is `false`, other handlers will continue to be called
|
||||
as normal.
|
||||
|
||||
- `UiTick`
|
||||
### `UiTick`
|
||||
|
||||
Despite what it may seem, this function is actually called deterministically
|
||||
within the game loop, just before the level is ticked and after the player's
|
||||
network commands are created. Albeit this, it is `ui` scope, so it should
|
||||
be used to process UI code.
|
||||
network commands are created. Albeit this, it is `ui` scope, so it should be
|
||||
used to process UI code.
|
||||
|
||||
- `PostUiTick`
|
||||
### `PostUiTick`
|
||||
|
||||
Similar to `UiTick`, this is also deterministic, but called after all other
|
||||
tickers.
|
||||
|
||||
- `InputProcess`
|
||||
### `InputProcess`
|
||||
|
||||
The same as `UiProcess`, but this is only called when inputs are being
|
||||
directed to the game, rather than to the GUI. All of the same restrictions
|
||||
apply to this as they do to `UiProcess`, and the return value acts the same.
|
||||
The same as `UiProcess`, but this is only called when inputs are being directed
|
||||
to the game, rather than to the GUI. All of the same restrictions apply to this
|
||||
as they do to `UiProcess`, and the return value acts the same.
|
||||
|
||||
- `ConsoleProcess`
|
||||
### `ConsoleProcess`
|
||||
|
||||
Called when network events which have no player activator are received.
|
||||
|
||||
- `NetworkProcess`
|
||||
### `NetworkProcess`
|
||||
|
||||
Called when network events which have a player activator are received.
|
||||
|
||||
- `CheckReplacement`
|
||||
### `CheckReplacement`
|
||||
|
||||
Called during actor replacement, after skill replacement is done, but before
|
||||
any other replacement (such as actor replacements done in ZScript actor
|
||||
definitions.)
|
||||
|
||||
- `NewGame`
|
||||
### `NewGame`
|
||||
|
||||
Called on a new game, directly after level data is reset and right before
|
||||
the level is set up.
|
||||
Called on a new game, directly after level data is reset and right before the
|
||||
level is set up.
|
||||
|
||||
- `SetOrder`
|
||||
### `SetOrder`
|
||||
|
||||
Sets the ordering of this event handler, which can be read from `Order`.
|
||||
|
||||
- `Order`
|
||||
### `Order`
|
||||
|
||||
The arbitrary ordering of this event handler relative to other ones. Event
|
||||
handlers with lower ordering numbers have their functions executed first.
|
||||
You can set this variable with `SetOrder`.
|
||||
handlers with lower ordering numbers have their functions executed first. You
|
||||
can set this variable with `SetOrder`.
|
||||
|
||||
- `IsUiProcessor`
|
||||
### `IsUiProcessor`
|
||||
|
||||
If `true`, GUI events will be sent to this event handler through
|
||||
`UiProcess`. This is mainly for optimization purposes.
|
||||
If `true`, GUI events will be sent to this event handler through `UiProcess`.
|
||||
This is mainly for optimization purposes.
|
||||
|
||||
- `RequireMouse`
|
||||
### `RequireMouse`
|
||||
|
||||
If `true`, mouse events will be sent to this event handler through
|
||||
`InputProcess` and/or `UiProcess`. This is mainly for optimization purposes.
|
||||
|
|
|
@ -22,11 +22,11 @@ Single files can also be loaded as archives, containing only themselves.
|
|||
|
||||
In short:
|
||||
|
||||
- *Lump* refers to an object from any archive type with an 8 character filename (extension removed.)
|
||||
- *File* refers to fully qualified object from a resource archive, which can also be used as a lump through its truncated name.
|
||||
- *Archives* are real files or folders which hold *lumps*.
|
||||
- *Resource archives* are archives with a folder structure for determining lump namespaces, and also store fully qualified paths for files.
|
||||
- *Wad files* are archives which hold only lumps, and use markers for determining lump namespaces.
|
||||
* *Lump* refers to an object from any archive type with an 8 character filename (extension removed.)
|
||||
* *File* refers to fully qualified object from a resource archive, which can also be used as a lump through its truncated name.
|
||||
* *Archives* are real files or folders which hold *lumps*.
|
||||
* *Resource archives* are archives with a folder structure for determining lump namespaces, and also store fully qualified paths for files.
|
||||
* *Wad files* are archives which hold only lumps, and use markers for determining lump namespaces.
|
||||
|
||||
| Name | Description | Resource path | Wad file marker |
|
||||
| ---- | ----------- | ------------- | --------------- |
|
||||
|
@ -61,37 +61,37 @@ struct Wads
|
|||
}
|
||||
```
|
||||
|
||||
- `CheckNumForFullName`
|
||||
### `CheckNumForFullName`
|
||||
|
||||
Returns the handle of the first file named `name`, matching only the full
|
||||
path to it, including the extension, or `-1` if the file was not found. Only
|
||||
works with files defined in resource archives.
|
||||
Returns the handle of the first file named `name`, matching only the full path
|
||||
to it, including the extension, or `-1` if the file was not found. Only works
|
||||
with files defined in resource archives.
|
||||
|
||||
- `CheckNumForName`
|
||||
### `CheckNumForName`
|
||||
|
||||
Returns the handle of the first lump named `name` within namespace `ns`. If
|
||||
`wadnum` is not `-1`, then it signifies, if `exact` is false, the number of
|
||||
the last archive to search in, or the only archive to search in if `exact`
|
||||
is `true`.
|
||||
`wadnum` is not `-1`, then it signifies, if `exact` is false, the number of the
|
||||
last archive to search in, or the only archive to search in if `exact` is
|
||||
`true`.
|
||||
|
||||
Note there is currently no way to actually *get* the number of an archive,
|
||||
even the current one. The only guarantee is that archive `0` will be the
|
||||
base archive (`gzdoom.pk3`.)
|
||||
Note there is currently no way to actually *get* the number of an archive, even
|
||||
the current one. The only guarantee is that archive `0` will be the base
|
||||
archive (`gzdoom.pk3`.)
|
||||
|
||||
- `FindLump`
|
||||
### `FindLump`
|
||||
|
||||
Returns the handle of the first lump named `name` starting at `startlump`
|
||||
(zero indicates the first lump) in either the global namespace or any
|
||||
namespace. `ns` can be either `Wads.GLOBALNAMESPACE` or `Wads.ANYNAMESPACE`
|
||||
to specify this. Returns `-1` if there are no lumps with that name left.
|
||||
Returns the handle of the first lump named `name` starting at `startlump` (zero
|
||||
indicates the first lump) in either the global namespace or any namespace. `ns`
|
||||
can be either `Wads.GLOBALNAMESPACE` or `Wads.ANYNAMESPACE` to specify this.
|
||||
Returns `-1` if there are no lumps with that name left.
|
||||
|
||||
This function can be used in a loop to find all lumps with a specified name.
|
||||
|
||||
- `ReadLump`
|
||||
### `ReadLump`
|
||||
|
||||
Reads the whole contents of `lump` into a string and returns the result. If
|
||||
`lump` is not valid, returns an empty string. Note that binary lumps can be
|
||||
loaded this way and the string's length will be correct according to the
|
||||
lump's size even if null characters are present in the lump.
|
||||
loaded this way and the string's length will be correct according to the lump's
|
||||
size even if null characters are present in the lump.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -32,89 +32,89 @@ readonly ui bool NetGame;
|
|||
int LocalViewPitch;
|
||||
```
|
||||
|
||||
- `AutomapBindings`
|
||||
### `AutomapBindings`
|
||||
|
||||
TODO
|
||||
|
||||
- `Bindings`
|
||||
### `Bindings`
|
||||
|
||||
TODO
|
||||
|
||||
- `BigFont`
|
||||
### `BigFont`
|
||||
|
||||
The `bigfont` for the current game.
|
||||
|
||||
- `CleanHeight`
|
||||
### `CleanHeight`
|
||||
|
||||
The current screen height divided by `CleanYFac`. **Not deterministic.**
|
||||
|
||||
- `CleanHeight_1`
|
||||
### `CleanHeight_1`
|
||||
|
||||
The current screen height divided by `CleanYFac_1`. **Not deterministic.**
|
||||
|
||||
- `CleanWidth`
|
||||
### `CleanWidth`
|
||||
|
||||
The current screen width divided by `CleanXFac`. **Not deterministic.**
|
||||
|
||||
- `CleanWidth_1`
|
||||
### `CleanWidth_1`
|
||||
|
||||
The current screen width divided by `CleanYFac_1`. **Not deterministic.**
|
||||
|
||||
- `CleanXFac`
|
||||
### `CleanXFac`
|
||||
|
||||
Integral scaling factor for horizontal positions to scale from 320x200 to
|
||||
the current virtual resolution. **Not deterministic.**
|
||||
Integral scaling factor for horizontal positions to scale from 320x200 to the
|
||||
current virtual resolution. **Not deterministic.**
|
||||
|
||||
- `CleanXFac_1`
|
||||
### `CleanXFac_1`
|
||||
|
||||
Integral scaling factor for horizontal positions to scale from 320x200 to
|
||||
the current virtual resolution, accounting for aspect ratio differences.
|
||||
**Not deterministic.**
|
||||
Integral scaling factor for horizontal positions to scale from 320x200 to the
|
||||
current virtual resolution, accounting for aspect ratio differences. **Not
|
||||
deterministic.**
|
||||
|
||||
- `CleanYFac`
|
||||
### `CleanYFac`
|
||||
|
||||
Integral scaling factor for vertical positions to scale from 320x200 to the
|
||||
current virtual resolution. **Not deterministic.**
|
||||
|
||||
- `CleanYFac_1`
|
||||
### `CleanYFac_1`
|
||||
|
||||
Integral scaling factor for vertical positions to scale from 320x200 to the
|
||||
current virtual resolution, accounting for aspect ratio differences. **Not
|
||||
deterministic.**
|
||||
|
||||
- `ConFont`
|
||||
### `ConFont`
|
||||
|
||||
The console font.
|
||||
|
||||
- `IntermissionFont`
|
||||
### `IntermissionFont`
|
||||
|
||||
The font used in intermission screens.
|
||||
|
||||
- `SmallFont`
|
||||
### `SmallFont`
|
||||
|
||||
The `smallfnt` for the current game.
|
||||
|
||||
- `SmallFont2`
|
||||
### `SmallFont2`
|
||||
|
||||
The alternate `smallfnt`.
|
||||
|
||||
- `NewConsoleFont`
|
||||
### `NewConsoleFont`
|
||||
|
||||
TODO
|
||||
|
||||
- `NewSmallFont`
|
||||
### `NewSmallFont`
|
||||
|
||||
TODO
|
||||
|
||||
- `BackbuttonAlpha`
|
||||
### `BackbuttonAlpha`
|
||||
|
||||
Alpha of the back button in menus.
|
||||
|
||||
- `BackbuttonTime`
|
||||
### `BackbuttonTime`
|
||||
|
||||
The time until the back button starts fading out in menus.
|
||||
|
||||
- `MenuActive`
|
||||
### `MenuActive`
|
||||
|
||||
The current active menu state. One of:
|
||||
|
||||
|
@ -125,15 +125,15 @@ int LocalViewPitch;
|
|||
| `Menu.On` | Menu is open, game is paused. |
|
||||
| `Menu.WaitKey` | Menu is opened, waiting for a key for a controls menu binding. |
|
||||
|
||||
- `StatusBar`
|
||||
### `StatusBar`
|
||||
|
||||
TODO
|
||||
|
||||
- `NetGame`
|
||||
### `NetGame`
|
||||
|
||||
Whether this is a networked game or not.
|
||||
|
||||
- `LocalViewPitch`
|
||||
### `LocalViewPitch`
|
||||
|
||||
The pitch angle (in degrees) of `ConsolePlayer`'s view. **Not deterministic.**
|
||||
|
||||
|
|
|
@ -12,28 +12,28 @@ const PLAYERMISSILERANGE;
|
|||
const SAWRANGE;
|
||||
```
|
||||
|
||||
- `MAXPLAYERNAME`
|
||||
### `MAXPLAYERNAME`
|
||||
|
||||
The maximum length of a player name.
|
||||
|
||||
- `MAXPLAYERS`
|
||||
### `MAXPLAYERS`
|
||||
|
||||
The maximum amount of players in game.
|
||||
|
||||
- `DEFMELEERANGE`
|
||||
### `DEFMELEERANGE`
|
||||
|
||||
The range where melee will be used for monsters, and the range for the
|
||||
player's melee attacks.
|
||||
The range where melee will be used for monsters, and the range for the player's
|
||||
melee attacks.
|
||||
|
||||
- `MISSILERANGE`
|
||||
### `MISSILERANGE`
|
||||
|
||||
The maximum range for monster missile/hit-scan attacks.
|
||||
|
||||
- `PLAYERMISSILERANGE`
|
||||
### `PLAYERMISSILERANGE`
|
||||
|
||||
The maximum range for player missile/hit-scan attacks.
|
||||
|
||||
- `SAWRANGE`
|
||||
### `SAWRANGE`
|
||||
|
||||
The range of Doom's Chainsaw weapon.
|
||||
|
||||
|
|
|
@ -15,15 +15,15 @@ deprecated("3.8") readonly bool GlobalFreeze;
|
|||
int ValidCount;
|
||||
```
|
||||
|
||||
- `AutomapActive`
|
||||
### `AutomapActive`
|
||||
|
||||
`true` if the auto-map is currently open on the client. **Not deterministic.**
|
||||
|
||||
- `DemoPlayback`
|
||||
### `DemoPlayback`
|
||||
|
||||
User is watching a demo.
|
||||
|
||||
- `GameAction`
|
||||
### `GameAction`
|
||||
|
||||
Current global game action. May be one of:
|
||||
|
||||
|
@ -48,7 +48,7 @@ int ValidCount;
|
|||
| `ga_togglemap` | Toggles the auto-map. |
|
||||
| `ga_worlddone` | Don't use this. |
|
||||
|
||||
- `GameState`
|
||||
### `GameState`
|
||||
|
||||
Current global game state. May be one of:
|
||||
|
||||
|
@ -63,23 +63,23 @@ int ValidCount;
|
|||
| `GS_STARTUP` | Game not yet initialized. |
|
||||
| `GS_TITLELEVEL` | Watching a `TITLEMAP` in the main menu. |
|
||||
|
||||
- `GameTic`
|
||||
### `GameTic`
|
||||
|
||||
Number of game tics passed since engine initialization. **Not deterministic.**
|
||||
|
||||
- `Level`
|
||||
### `Level`
|
||||
|
||||
All level info as defined in `LevelLocals`.
|
||||
|
||||
- `MusPlaying`
|
||||
### `MusPlaying`
|
||||
|
||||
TODO
|
||||
|
||||
- `GlobalFreeze`
|
||||
### `GlobalFreeze`
|
||||
|
||||
Deprecated. Don't use.
|
||||
|
||||
- `ValidCount`
|
||||
### `ValidCount`
|
||||
|
||||
Don't use this.
|
||||
|
||||
|
|
|
@ -16,47 +16,46 @@ readonly textureid SkyFlatNum;
|
|||
readonly Weapon WP_NOCHANGE;
|
||||
```
|
||||
|
||||
- `AllActorClasses`
|
||||
### `AllActorClasses`
|
||||
|
||||
An array of every actor class type reference.
|
||||
|
||||
- `AllClasses`
|
||||
### `AllClasses`
|
||||
|
||||
An array of every class type reference.
|
||||
|
||||
- `PlayerClasses`
|
||||
### `PlayerClasses`
|
||||
|
||||
An array of all player classes as defined in `MAPINFO`/GameInfo and
|
||||
`KEYCONF`.
|
||||
An array of all player classes as defined in `MAPINFO`/GameInfo and `KEYCONF`.
|
||||
|
||||
- `PlayerSkins`
|
||||
### `PlayerSkins`
|
||||
|
||||
An array of all player skins as defined in `SKININFO` and `S_SKIN`.
|
||||
|
||||
- `Teams`
|
||||
### `Teams`
|
||||
|
||||
An array of all teams. Maximum index is `Team.Max`.
|
||||
|
||||
- `Deh`
|
||||
### `Deh`
|
||||
|
||||
Static DeHackEd information.
|
||||
|
||||
- `GameInfo`
|
||||
### `GameInfo`
|
||||
|
||||
Static information from `MAPINFO`/GameInfo.
|
||||
|
||||
- `OptionMenuSettings`
|
||||
### `OptionMenuSettings`
|
||||
|
||||
Defaults for `OptionMenu`s as defined in `MENUDEF`'s `OptionMenuSettings`
|
||||
block and `MAPINFO`/GameInfo.
|
||||
Defaults for `OptionMenu`s as defined in `MENUDEF`'s `OptionMenuSettings` block
|
||||
and `MAPINFO`/GameInfo.
|
||||
|
||||
- `SkyFlatNum`
|
||||
### `SkyFlatNum`
|
||||
|
||||
The texture ID for sky flats. `F_SKY1` by default in Doom.
|
||||
|
||||
- `WP_NOCHANGE`
|
||||
### `WP_NOCHANGE`
|
||||
|
||||
A constant denoting that the weapon the player is currently holding
|
||||
shouldn't be switched from.
|
||||
A constant denoting that the weapon the player is currently holding shouldn't
|
||||
be switched from.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -10,23 +10,23 @@ readonly bool PlayerInGame[MAXPLAYERS];
|
|||
play PlayerInfo Players[MAXPLAYERS];
|
||||
```
|
||||
|
||||
- `ConsolePlayer`
|
||||
### `ConsolePlayer`
|
||||
|
||||
Number of the player running the client. **Not deterministic.**
|
||||
|
||||
- `Multiplayer`
|
||||
### `Multiplayer`
|
||||
|
||||
Game is networked.
|
||||
|
||||
- `Net_Arbitrator`
|
||||
### `Net_Arbitrator`
|
||||
|
||||
Number of the player who initiated or currently hosts the game.
|
||||
|
||||
- `PlayerInGame`
|
||||
### `PlayerInGame`
|
||||
|
||||
`true` if the player is currently in-game.
|
||||
|
||||
- `Players`
|
||||
### `Players`
|
||||
|
||||
`PlayerInfo` structures for each player.
|
||||
|
||||
|
|
|
@ -7,15 +7,14 @@ Type GetDefaultByType(class<Actor> type);
|
|||
Type New(class typename = ThisClass);
|
||||
```
|
||||
|
||||
- `GetDefaultByType`
|
||||
### `GetDefaultByType`
|
||||
|
||||
Returns an object containing the default values for each member of the
|
||||
`Actor` type provided as they would be set in `BeginPlay`. **Note that the
|
||||
return value cannot be serialized and if stored must be marked as
|
||||
`transient`.** The returned object is a pseudo-object which is stored only
|
||||
in-memory.
|
||||
Returns an object containing the default values for each member of the `Actor`
|
||||
type provided as they would be set in `BeginPlay`. **Note that the return value
|
||||
cannot be serialized and if stored must be marked as `transient`.** The
|
||||
returned object is a pseudo-object which is stored only in-memory.
|
||||
|
||||
- `New`
|
||||
### `New`
|
||||
|
||||
Typically spelled lowercase (`new`), creates an object with type `typename`.
|
||||
Defaults to using the class of the calling object.
|
||||
|
|
|
@ -11,11 +11,11 @@ deprecated("3.8") vector3, int G_PickDeathmatchStart();
|
|||
deprecated("3.8") vector3, int G_PickPlayerStart(int pnum, int flags = 0);
|
||||
```
|
||||
|
||||
- `G_SkillName`
|
||||
### `G_SkillName`
|
||||
|
||||
The name of the skill in play.
|
||||
|
||||
- `G_SkillPropertyInt`
|
||||
### `G_SkillPropertyInt`
|
||||
|
||||
Returns a skill property. `p` may be:
|
||||
|
||||
|
@ -35,7 +35,7 @@ deprecated("3.8") vector3, int G_PickPlayerStart(int pnum, int flags = 0);
|
|||
| `SKILLP_SLOWMONSTERS` |
|
||||
| `SKILLP_SPAWNFILTER` |
|
||||
|
||||
- `G_SkillPropertyFloat`
|
||||
### `G_SkillPropertyFloat`
|
||||
|
||||
Returns a skill property. `p` may be:
|
||||
|
||||
|
@ -51,20 +51,20 @@ deprecated("3.8") vector3, int G_PickPlayerStart(int pnum, int flags = 0);
|
|||
| `SKILLP_MONSTERHEALTH` |
|
||||
| `SKILLP_KICKBACKFACTOR` |
|
||||
|
||||
- `G_PickDeathmatchStart`
|
||||
### `G_PickDeathmatchStart`
|
||||
|
||||
Note: This function is deprecated and `LevelLocals::PickDeathmatchStart`
|
||||
should be used instead.
|
||||
Note: This function is deprecated and `LevelLocals::PickDeathmatchStart` should
|
||||
be used instead.
|
||||
|
||||
Returns the position and angle of a random death-match start location.
|
||||
|
||||
- `G_PickPlayerStart`
|
||||
### `G_PickPlayerStart`
|
||||
|
||||
Note: This function is deprecated and `LevelLocals::PickPlayerStart` should
|
||||
be used instead.
|
||||
Note: This function is deprecated and `LevelLocals::PickPlayerStart` should be
|
||||
used instead.
|
||||
|
||||
Returns the position and angle of a player start for player `pnum`. `flags`
|
||||
may be:
|
||||
Returns the position and angle of a player start for player `pnum`. `flags` may
|
||||
be:
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
|
|
|
@ -28,96 +28,96 @@ double TanH(double n);
|
|||
double VectorAngle(double x, double y);
|
||||
```
|
||||
|
||||
- `Abs`
|
||||
### `Abs`
|
||||
|
||||
Returns `|n|` (absolute of `n`.)
|
||||
|
||||
- `ACos`
|
||||
### `ACos`
|
||||
|
||||
Returns the arc-cosine of `n`.
|
||||
|
||||
- `ASin`
|
||||
### `ASin`
|
||||
|
||||
Returns the arc-sine of `n`.
|
||||
|
||||
- `ATan`
|
||||
### `ATan`
|
||||
|
||||
Returns the arc-tangent of `n`.
|
||||
|
||||
- `ATan2`
|
||||
### `ATan2`
|
||||
|
||||
Returns the arc-tangent of `y / x` using the arguments' signs to determine
|
||||
the correct quadrant.
|
||||
Returns the arc-tangent of `y / x` using the arguments' signs to determine the
|
||||
correct quadrant.
|
||||
|
||||
- `BAM`
|
||||
### `BAM`
|
||||
|
||||
Returns a byte angle of `angle` (`degrees * (0x40000000 / 90.0)`.)
|
||||
|
||||
- `Ceil`
|
||||
### `Ceil`
|
||||
|
||||
Returns the integral portion of `n`, rounded up.
|
||||
|
||||
- `Clamp`
|
||||
### `Clamp`
|
||||
|
||||
Returns `n` if `n` is more than `minimum` and less than `maximum`, or either
|
||||
of those values if it is not.
|
||||
Returns `n` if `n` is more than `minimum` and less than `maximum`, or either of
|
||||
those values if it is not.
|
||||
|
||||
- `Cos`
|
||||
### `Cos`
|
||||
|
||||
Returns the cosine of `n`.
|
||||
|
||||
- `CosH`
|
||||
### `CosH`
|
||||
|
||||
Returns the hyperbolic cosine of `n`.
|
||||
|
||||
- `Exp`
|
||||
### `Exp`
|
||||
|
||||
Returns euler's number raised to the power `n`. Note that you probably want
|
||||
instead the `**` binary operator, as in `a ** b`, since euler's number is
|
||||
generally not a very useful constant when programming games.
|
||||
|
||||
- `Floor`
|
||||
### `Floor`
|
||||
|
||||
Returns the integral portion of `n`, rounded down.
|
||||
|
||||
- `Log`
|
||||
### `Log`
|
||||
|
||||
Returns the natural (base of euler's number) logarithm of `n`.
|
||||
|
||||
- `Log10`
|
||||
### `Log10`
|
||||
|
||||
Returns the common (base 10) logarithm of `n`. Note that this is useful for
|
||||
instance when calculating the number of decimal digits in a number.
|
||||
|
||||
- `Max`
|
||||
### `Max`
|
||||
|
||||
Returns `n` if `n` is less than `maximum`, or `maximum`.
|
||||
|
||||
- `Min`
|
||||
### `Min`
|
||||
|
||||
Returns `n` if `n` is more than `minimum`, or `minimum`.
|
||||
|
||||
- `Sin`
|
||||
### `Sin`
|
||||
|
||||
Returns the sine of `n`.
|
||||
|
||||
- `SinH`
|
||||
### `SinH`
|
||||
|
||||
Returns the hyperbolic sine of `n`.
|
||||
|
||||
- `Sqrt`
|
||||
### `Sqrt`
|
||||
|
||||
Returns the square root of `n`.
|
||||
|
||||
- `Tan`
|
||||
### `Tan`
|
||||
|
||||
Returns the tangent of `n`.
|
||||
|
||||
- `TanH`
|
||||
### `TanH`
|
||||
|
||||
Returns the hyperbolic tangent of `n`.
|
||||
|
||||
- `VectorAngle`
|
||||
### `VectorAngle`
|
||||
|
||||
Same as `ATan2`, but with arguments reversed.
|
||||
|
||||
|
|
|
@ -13,29 +13,29 @@ int RandomPick(int...);
|
|||
void SetRandomSeed(uint num);
|
||||
```
|
||||
|
||||
- `FRandom`
|
||||
### `FRandom`
|
||||
|
||||
Returns a random float between `min` and `max`.
|
||||
|
||||
- `FRandomPick`
|
||||
### `FRandomPick`
|
||||
|
||||
Same as `RandomPick`, but with floats.
|
||||
|
||||
- `Random`
|
||||
### `Random`
|
||||
|
||||
Returns a random integer between `min` and `max`.
|
||||
|
||||
- `Random2`
|
||||
### `Random2`
|
||||
|
||||
Returns a random integer value between `-mask` and `mask`. `mask` is used as
|
||||
a bit mask, so it is recommended to use a value of one less than a power of
|
||||
two (i.e. 3, 7, 15, 31, 63, 127, 255...)
|
||||
Returns a random integer value between `-mask` and `mask`. `mask` is used as a
|
||||
bit mask, so it is recommended to use a value of one less than a power of two
|
||||
(i.e. 3, 7, 15, 31, 63, 127, 255...)
|
||||
|
||||
- `RandomPick`
|
||||
### `RandomPick`
|
||||
|
||||
Returns one of the provided parameters randomly.
|
||||
|
||||
- `SetRandomSeed`
|
||||
### `SetRandomSeed`
|
||||
|
||||
Sets the seed of the RNG table to `num`.
|
||||
|
||||
|
|
|
@ -12,20 +12,20 @@ void S_ResumeSound(bool notsfx);
|
|||
void S_Sound(sound id, int channel, float volume = 1, float attenuation = ATTN_NORM);
|
||||
```
|
||||
|
||||
- `MarkSound`
|
||||
### `MarkSound`
|
||||
|
||||
Marks `snd` to be pre-cached (loaded into memory early.)
|
||||
|
||||
- `SetMusicVolume`
|
||||
### `SetMusicVolume`
|
||||
|
||||
Sets the volume of the music relative to the user's volume. Range is 0-1,
|
||||
inclusive.
|
||||
|
||||
- `S_ChangeMusic`
|
||||
### `S_ChangeMusic`
|
||||
|
||||
Changes the music to `name`. If `name` is `"*"`, the music will be set to
|
||||
the default music for this level. Will loop if `looping` is `true`. `force`
|
||||
will force the music to play even if a playlist (from the `playlist` console
|
||||
Changes the music to `name`. If `name` is `"*"`, the music will be set to the
|
||||
default music for this level. Will loop if `looping` is `true`. `force` will
|
||||
force the music to play even if a playlist (from the `playlist` console
|
||||
command) is playing.
|
||||
|
||||
`order` may mean something different based on the music format:
|
||||
|
@ -36,24 +36,24 @@ void S_Sound(sound id, int channel, float volume = 1, float attenuation = ATTN_
|
|||
| Multi-track `.ogg`, `.flac`, etc. | Specifies the track to begin playing at. |
|
||||
| Any other format | No meaning, will be ignored. |
|
||||
|
||||
- `S_GetLength`
|
||||
### `S_GetLength`
|
||||
|
||||
Returns the length of a sound in seconds. **Potentially non-deterministic if
|
||||
all users in a networked game are not using the same sounds.**
|
||||
|
||||
- `S_PauseSound`
|
||||
### `S_PauseSound`
|
||||
|
||||
Pauses music if `notmusic` is `false` and all game sounds if `notsfx` is
|
||||
`false`. Used for instance in the time stop power-up.
|
||||
|
||||
- `S_ResumeSound`
|
||||
### `S_ResumeSound`
|
||||
|
||||
Resumes playing music and, if `notsfx` is `false`, all game sounds as well.
|
||||
|
||||
- `S_Sound`
|
||||
### `S_Sound`
|
||||
|
||||
Plays a sound (as defined in `SNDINFO`) from the calling object if it has
|
||||
world presence (is an actor or sector etc.)
|
||||
Plays a sound (as defined in `SNDINFO`) from the calling object if it has world
|
||||
presence (is an actor or sector etc.)
|
||||
|
||||
`channel` may be:
|
||||
|
||||
|
|
|
@ -7,11 +7,12 @@ uint MSTime();
|
|||
vararg void ThrowAbortException(string format, ...);
|
||||
```
|
||||
|
||||
- `MSTime`
|
||||
### `MSTime`
|
||||
|
||||
Returns the number of milliseconds since the engine was started. **Not deterministic.**
|
||||
Returns the number of milliseconds since the engine was started. **Not
|
||||
deterministic.**
|
||||
|
||||
- `ThrowAbortException`
|
||||
### `ThrowAbortException`
|
||||
|
||||
Kills the VM and ends the game (without exiting) with a formatted error.
|
||||
|
||||
|
|
|
@ -15,36 +15,36 @@ struct DehInfo
|
|||
}
|
||||
```
|
||||
|
||||
- `BfgCells`
|
||||
### `BfgCells`
|
||||
|
||||
The amount of ammunition `A_FireBfg` will deplete. Default is 40.
|
||||
|
||||
- `BlueAC`
|
||||
### `BlueAC`
|
||||
|
||||
Multiple of 100 for `BlueArmor`'s `Armor.SaveAmount`. Default is 2 for 200
|
||||
armor.
|
||||
|
||||
- `ExplosionAlpha`
|
||||
### `ExplosionAlpha`
|
||||
|
||||
For actors with the `DEHEXPLOSION` flag, the alpha to set the actor to on
|
||||
explosion.
|
||||
|
||||
- `ExplosionStyle`
|
||||
### `ExplosionStyle`
|
||||
|
||||
For actors with the `DEHEXPLOSION` flag, the render style to be applied on
|
||||
explosion.
|
||||
|
||||
- `MaxHealth`
|
||||
### `MaxHealth`
|
||||
|
||||
TODO
|
||||
|
||||
- `MaxSoulsphere`
|
||||
### `MaxSoulsphere`
|
||||
|
||||
The `Inventory.MaxAmount` for `Soulsphere`. Default is 200.
|
||||
|
||||
- `NoAutofreeze`
|
||||
### `NoAutofreeze`
|
||||
|
||||
Overrides generic freezing deaths if not zero, making all actors act as if
|
||||
they had the `NOICEDEATH` flag.
|
||||
Overrides generic freezing deaths if not zero, making all actors act as if they
|
||||
had the `NOICEDEATH` flag.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -17,35 +17,35 @@ struct FOptionMenuSettings
|
|||
}
|
||||
```
|
||||
|
||||
- `mTitleColor`
|
||||
### `mTitleColor`
|
||||
|
||||
TODO
|
||||
|
||||
- `mFontColor`
|
||||
### `mFontColor`
|
||||
|
||||
TODO
|
||||
|
||||
- `mFontColorValue`
|
||||
### `mFontColorValue`
|
||||
|
||||
TODO
|
||||
|
||||
- `mFontColorMore`
|
||||
### `mFontColorMore`
|
||||
|
||||
TODO
|
||||
|
||||
- `mFontColorHeader`
|
||||
### `mFontColorHeader`
|
||||
|
||||
TODO
|
||||
|
||||
- `mFontColorHighlight`
|
||||
### `mFontColorHighlight`
|
||||
|
||||
TODO
|
||||
|
||||
- `mFontColorSelection`
|
||||
### `mFontColorSelection`
|
||||
|
||||
TODO
|
||||
|
||||
- `mLineSpacing`
|
||||
### `mLineSpacing`
|
||||
|
||||
The spacing in virtual pixels between two lines in an `OptionMenu`.
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ struct LevelLocals
|
|||
float SkySpeed2;
|
||||
|
||||
// Physics
|
||||
play double AirControl
|
||||
play double AirControl;
|
||||
play double AirFriction;
|
||||
play int AirSupply;
|
||||
play double Gravity;
|
||||
|
@ -149,7 +149,7 @@ struct LevelLocals
|
|||
|
||||
TODO
|
||||
|
||||
- `ClusterFlags`
|
||||
### `ClusterFlags`
|
||||
|
||||
Flags for this cluster. May contain any of the following bit flags:
|
||||
|
||||
|
|
|
@ -13,19 +13,19 @@ class InterBackground : Object play
|
|||
}
|
||||
```
|
||||
|
||||
- `Create`
|
||||
### `Create`
|
||||
|
||||
TODO
|
||||
|
||||
- `DrawBackground`
|
||||
### `DrawBackground`
|
||||
|
||||
TODO
|
||||
|
||||
- `LoadBackground`
|
||||
### `LoadBackground`
|
||||
|
||||
TODO
|
||||
|
||||
- `UpdateAnimatedBack`
|
||||
### `UpdateAnimatedBack`
|
||||
|
||||
TODO
|
||||
|
||||
|
|
|
@ -13,23 +13,23 @@ struct PatchInfo play
|
|||
}
|
||||
```
|
||||
|
||||
- `mColor`
|
||||
### `mColor`
|
||||
|
||||
The color of the font, if this is a string.
|
||||
|
||||
- `mFont`
|
||||
### `mFont`
|
||||
|
||||
The font, if this is a string, or `null`.
|
||||
|
||||
- `mPatch`
|
||||
### `mPatch`
|
||||
|
||||
The patch, if this is a patch, or an invalid texture.
|
||||
|
||||
- `Init`
|
||||
### `Init`
|
||||
|
||||
Initializes the structure. If `gifont.Color` is `'Null'`, and
|
||||
`gifont.FontName` is a valid patch, `mPatch` will be set accordingly.
|
||||
Otherwise, if the font has a color or the patch is invalid,
|
||||
`gifont.FontName` is used to set `mFont` (or it is defaulted to `BigFont`.)
|
||||
Initializes the structure. If `gifont.Color` is `'Null'`, and `gifont.FontName`
|
||||
is a valid patch, `mPatch` will be set accordingly. Otherwise, if the font has
|
||||
a color or the patch is invalid, `gifont.FontName` is used to set `mFont` (or
|
||||
it is defaulted to `BigFont`.)
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -5,10 +5,10 @@ The base class for intermission status screens. Any status screen used by
|
|||
|
||||
Status screens have four stages:
|
||||
|
||||
- `STATCOUNT`, where the stats are counted and displayed.
|
||||
- `SHOWNEXTLOC`, where the next map is shown as "ENTERING (map name)" and in episodic maps, the world map.
|
||||
- `NOSTATE`, at the very end of this process, where the last frame is drawn and the intermission is exited.
|
||||
- `LEAVINGINTERMISSION`, which is used only to signify that all stages are done and the status screen has been exited.
|
||||
* `STATCOUNT`, where the stats are counted and displayed.
|
||||
* `SHOWNEXTLOC`, where the next map is shown as "ENTERING (map name)" and in episodic maps, the world map.
|
||||
* `NOSTATE`, at the very end of this process, where the last frame is drawn and the intermission is exited.
|
||||
* `LEAVINGINTERMISSION`, which is used only to signify that all stages are done and the status screen has been exited.
|
||||
|
||||
These are provided as constants in `StatusScreen`. The starting stage is `STATCOUNT`.
|
||||
|
||||
|
@ -103,323 +103,321 @@ class StatusScreen : Object abstract play
|
|||
}
|
||||
```
|
||||
|
||||
- `NG_STATSY`
|
||||
### `NG_STATSY`
|
||||
|
||||
TODO
|
||||
|
||||
- `SHOWNEXTLOCDELAY`
|
||||
### `SHOWNEXTLOCDELAY`
|
||||
|
||||
TODO
|
||||
|
||||
- `SP_STATSX`
|
||||
### `SP_STATSX`
|
||||
|
||||
TODO
|
||||
|
||||
- `SP_STATSY`
|
||||
### `SP_STATSY`
|
||||
|
||||
TODO
|
||||
|
||||
- `SP_TIMEX`
|
||||
### `SP_TIMEX`
|
||||
|
||||
TODO
|
||||
|
||||
- `SP_TIMEY`
|
||||
### `SP_TIMEY`
|
||||
|
||||
TODO
|
||||
|
||||
- `TITLEY`
|
||||
### `TITLEY`
|
||||
|
||||
The Y position (in 320x200 pixels) to draw the top of the "finished" and
|
||||
"entering" texts. Used by `DrawEL` and `DrawLF`.
|
||||
|
||||
- `BG`
|
||||
### `BG`
|
||||
|
||||
The `InterBackground` object for this intermission, set by `Start` with the
|
||||
initial `Wbs` object.
|
||||
|
||||
- `Plrs`
|
||||
### `Plrs`
|
||||
|
||||
The value of `Wbs.Plyr` when `Start` was called. Usually not changed, so
|
||||
essentially equivalent to `Wbs.Plyr`.
|
||||
|
||||
- `Wbs`
|
||||
### `Wbs`
|
||||
|
||||
The `WBStartStruct` passed to this class via the `Start` function.
|
||||
|
||||
- `AccelerateStage`
|
||||
### `AccelerateStage`
|
||||
|
||||
Used to signify to the current stage that it should go quicker or be skipped
|
||||
entirely.
|
||||
|
||||
- `BCnt`
|
||||
### `BCnt`
|
||||
|
||||
TODO
|
||||
|
||||
- `Cnt`
|
||||
### `Cnt`
|
||||
|
||||
TODO
|
||||
|
||||
- `Cnt_Deaths`
|
||||
### `Cnt_Deaths`
|
||||
|
||||
TODO
|
||||
|
||||
- `Cnt_Frags`
|
||||
### `Cnt_Frags`
|
||||
|
||||
TODO
|
||||
|
||||
- `Cnt_Items`
|
||||
### `Cnt_Items`
|
||||
|
||||
TODO
|
||||
|
||||
- `Cnt_Kills`
|
||||
### `Cnt_Kills`
|
||||
|
||||
TODO
|
||||
|
||||
- `Cnt_Par`
|
||||
### `Cnt_Par`
|
||||
|
||||
TODO
|
||||
|
||||
- `Cnt_Pause`
|
||||
### `Cnt_Pause`
|
||||
|
||||
TODO
|
||||
|
||||
- `Cnt_Secret`
|
||||
### `Cnt_Secret`
|
||||
|
||||
TODO
|
||||
|
||||
- `Cnt_Time`
|
||||
### `Cnt_Time`
|
||||
|
||||
TODO
|
||||
|
||||
- `Cnt_Total_Time`
|
||||
### `Cnt_Total_Time`
|
||||
|
||||
TODO
|
||||
|
||||
- `CurState`
|
||||
### `CurState`
|
||||
|
||||
The current stage the intermission is in.
|
||||
|
||||
- `DoFrags`
|
||||
### `DoFrags`
|
||||
|
||||
TODO
|
||||
|
||||
- `Me`
|
||||
### `Me`
|
||||
|
||||
The value of `Wbs.PNum` when `Start` was called. Usually not changed, so
|
||||
essentially equivalent to `Wbs.PNum`.
|
||||
|
||||
- `NG_State`
|
||||
### `NG_State`
|
||||
|
||||
TODO
|
||||
|
||||
- `NoAutoStartMap`
|
||||
### `NoAutoStartMap`
|
||||
|
||||
TODO
|
||||
|
||||
- `PlayerReady`
|
||||
### `PlayerReady`
|
||||
|
||||
Used in networked games to signify when each player is ready to continue to
|
||||
the next map. Set by `CheckForAccelerate`.
|
||||
Used in networked games to signify when each player is ready to continue to the
|
||||
next map. Set by `CheckForAccelerate`.
|
||||
|
||||
- `Player_Deaths`
|
||||
### `Player_Deaths`
|
||||
|
||||
TODO
|
||||
|
||||
- `Snl_PointerOn`
|
||||
### `Snl_PointerOn`
|
||||
|
||||
TODO
|
||||
|
||||
- `SP_State`
|
||||
### `SP_State`
|
||||
|
||||
Used in single-player status screens during the `STATCOUNT` stage for
|
||||
indicating the current round of statistics to count up.
|
||||
|
||||
- `ShadowAlpha`
|
||||
### `ShadowAlpha`
|
||||
|
||||
TODO
|
||||
|
||||
- `Total_Deaths`
|
||||
### `Total_Deaths`
|
||||
|
||||
TODO
|
||||
|
||||
- `Total_Frags`
|
||||
### `Total_Frags`
|
||||
|
||||
TODO
|
||||
|
||||
- `Entering`
|
||||
### `Entering`
|
||||
|
||||
TODO
|
||||
|
||||
- `Finished`
|
||||
### `Finished`
|
||||
|
||||
TODO
|
||||
|
||||
- `MapName`
|
||||
### `MapName`
|
||||
|
||||
TODO
|
||||
|
||||
- `Items`
|
||||
### `Items`
|
||||
|
||||
The "ITEMS" (default `WIOSTI`) graphic.
|
||||
|
||||
- `Kills`
|
||||
### `Kills`
|
||||
|
||||
The "KILLS" (default `WIOSTK`) graphic.
|
||||
|
||||
- `P_Secret`
|
||||
### `P_Secret`
|
||||
|
||||
The "SECRET" (default `WISCRT2`) graphic.
|
||||
|
||||
- `Par`
|
||||
### `Par`
|
||||
|
||||
The "PAR" (default `WIPAR`) graphic.
|
||||
|
||||
- `Secret`
|
||||
### `Secret`
|
||||
|
||||
The "SCRT" (default `WIOSTS`) graphic.
|
||||
|
||||
- `Sucks`
|
||||
### `Sucks`
|
||||
|
||||
The "SUCKS" (default `WISUCKS`) graphic.
|
||||
|
||||
- `Timepic`
|
||||
### `Timepic`
|
||||
|
||||
The "TIME" (default `WITIME`) graphic.
|
||||
|
||||
- `LNameTexts`
|
||||
### `LNameTexts`
|
||||
|
||||
TODO
|
||||
|
||||
- `DrawCharPatch`
|
||||
### `DrawCharPatch`
|
||||
|
||||
TODO
|
||||
|
||||
- `DrawEL`
|
||||
### `DrawEL`
|
||||
|
||||
TODO
|
||||
|
||||
- `DrawLF`
|
||||
### `DrawLF`
|
||||
|
||||
TODO
|
||||
|
||||
- `DrawName`
|
||||
### `DrawName`
|
||||
|
||||
TODO
|
||||
|
||||
- `DrawNum`
|
||||
### `DrawNum`
|
||||
|
||||
TODO
|
||||
|
||||
- `DrawPatchText`
|
||||
### `DrawPatchText`
|
||||
|
||||
TODO
|
||||
|
||||
- `DrawPercent`
|
||||
### `DrawPercent`
|
||||
|
||||
TODO
|
||||
|
||||
- `DrawTime`
|
||||
### `DrawTime`
|
||||
|
||||
TODO
|
||||
|
||||
- `AutoSkip`
|
||||
### `AutoSkip`
|
||||
|
||||
TODO
|
||||
|
||||
- `Drawer`
|
||||
### `Drawer`
|
||||
|
||||
Called by `WI_Drawer`, which is called every frame when `GameState` is
|
||||
`GS_INTERMISSION`.
|
||||
|
||||
- `End`
|
||||
### `End`
|
||||
|
||||
Called when the intermission should end. Default behaviour is to set
|
||||
`CurState` to `LEAVINGINTERMISSION` and remove bots in death-match.
|
||||
Generally, `Level.WorldDone` should be called directly after this.
|
||||
Called when the intermission should end. Default behaviour is to set `CurState`
|
||||
to `LEAVINGINTERMISSION` and remove bots in death-match. Generally,
|
||||
`Level.WorldDone` should be called directly after this.
|
||||
|
||||
- `Start`
|
||||
### `Start`
|
||||
|
||||
Called by `WI_Start` after the `WBStartStruct` is populated, sounds are
|
||||
stopped and the screen blend is set to black. Sets up initial values and
|
||||
runs `InitStats`.
|
||||
Called by `WI_Start` after the `WBStartStruct` is populated, sounds are stopped
|
||||
and the screen blend is set to black. Sets up initial values and runs
|
||||
`InitStats`.
|
||||
|
||||
- `StartMusic`
|
||||
### `StartMusic`
|
||||
|
||||
Called in the first tick by `Ticker` to set the intermission music.
|
||||
|
||||
- `Ticker`
|
||||
### `Ticker`
|
||||
|
||||
Called by `WI_Ticker`, which is called every game tick when `GameState` is
|
||||
`GS_INTERMISSION`.
|
||||
|
||||
- `DrawNoState`
|
||||
### `DrawNoState`
|
||||
|
||||
Called by `Drawer` when `CurState` is `NOSTATE` or any other non-state.
|
||||
|
||||
- `DrawShowNextLoc`
|
||||
### `DrawShowNextLoc`
|
||||
|
||||
Called by `Drawer` when `CurState` is `SHOWNEXTLOC` and, by default,
|
||||
`DrawNoState` after setting `Snl_PointerOn` to `true`.
|
||||
|
||||
- `DrawStats`
|
||||
### `DrawStats`
|
||||
|
||||
Called by `Drawer` directly after drawing the animated background when
|
||||
`CurState` is `STATCOUNT`.
|
||||
|
||||
- `InitNoState`
|
||||
### `InitNoState`
|
||||
|
||||
Called by `UpdateShowNextLoc` to initiate the `NOSTATE` stage.
|
||||
|
||||
- `InitShowNextLoc`
|
||||
### `InitShowNextLoc`
|
||||
|
||||
Called by `UpdateStats` to initiate the `SHOWNEXTLOC` stage.
|
||||
|
||||
- `InitStats`
|
||||
### `InitStats`
|
||||
|
||||
Called by `Start` to initiate the `STATCOUNT` stage.
|
||||
|
||||
- `UpdateNoState`
|
||||
### `UpdateNoState`
|
||||
|
||||
Called by `Ticker` when `CurState` is `NOSTATE` or any other non-state.
|
||||
Exits the intermission by calling `End` and `Level.WorldDone` when
|
||||
appropriate.
|
||||
Called by `Ticker` when `CurState` is `NOSTATE` or any other non-state. Exits
|
||||
the intermission by calling `End` and `Level.WorldDone` when appropriate.
|
||||
|
||||
- `UpdateShowNextLoc`
|
||||
### `UpdateShowNextLoc`
|
||||
|
||||
Called by `Ticker` when `CurState` is `SHOWNEXTLOC`. Runs `InitNoState` when
|
||||
appropriate and alternates `Snl_PointerOn`.
|
||||
|
||||
- `UpdateStats`
|
||||
### `UpdateStats`
|
||||
|
||||
Called by `Ticker` when `CurState` is `STATCOUNT`. Runs `InitShowNextLoc`
|
||||
when appropriate.
|
||||
|
||||
- `CheckForAccelerate`
|
||||
### `CheckForAccelerate`
|
||||
|
||||
Updates the values of `AccelerateStage` and `PlayerReady` according to each
|
||||
player's inputs.
|
||||
|
||||
- `FragSum`
|
||||
### `FragSum`
|
||||
|
||||
Returns the number of frags player `playernum` has accumulated against all
|
||||
currently in-game players. This is different from `WBPlayerStruct.FragCount`
|
||||
because it is counted dynamically, i.e. if a player leaves the count will be
|
||||
changed. This is only useful for game modes where frags do not count as
|
||||
score.
|
||||
changed. This is only useful for game modes where frags do not count as score.
|
||||
|
||||
- `GetPlayerWidths`
|
||||
### `GetPlayerWidths`
|
||||
|
||||
TODO
|
||||
|
||||
- `GetRowColor`
|
||||
### `GetRowColor`
|
||||
|
||||
TODO
|
||||
|
||||
- `GetSortedPlayers`
|
||||
### `GetSortedPlayers`
|
||||
|
||||
TODO
|
||||
|
||||
- `PlaySound`
|
||||
### `PlaySound`
|
||||
|
||||
Plays a UI sound at full volume using `S_Sound`.
|
||||
|
||||
|
|
|
@ -15,28 +15,28 @@ struct WBPlayerStruct
|
|||
}
|
||||
```
|
||||
|
||||
- `SItems`
|
||||
### `SItems`
|
||||
|
||||
The number of items this player acquired.
|
||||
|
||||
- `SKills`
|
||||
### `SKills`
|
||||
|
||||
The number of monsters this player killed.
|
||||
|
||||
- `SSecret`
|
||||
### `SSecret`
|
||||
|
||||
The number of secrets this player found.
|
||||
|
||||
- `STime`
|
||||
### `STime`
|
||||
|
||||
The time this player finished the level at, in ticks. (This is the same for
|
||||
all players.)
|
||||
The time this player finished the level at, in ticks. (This is the same for all
|
||||
players.)
|
||||
|
||||
- `FragCount`
|
||||
### `FragCount`
|
||||
|
||||
The total amount of frags this player scored against all players.
|
||||
|
||||
- `Frags`
|
||||
### `Frags`
|
||||
|
||||
The number of frags this player scored against each other player.
|
||||
|
||||
|
|
|
@ -29,67 +29,67 @@ struct WBStartStruct
|
|||
}
|
||||
```
|
||||
|
||||
- `Plyr`
|
||||
### `Plyr`
|
||||
|
||||
The `WBPlayerStruct` for each player.
|
||||
|
||||
- `PNum`
|
||||
### `PNum`
|
||||
|
||||
The index of the player to show stats for.
|
||||
|
||||
- `Finished_Ep`
|
||||
### `Finished_Ep`
|
||||
|
||||
The cluster of the finished map, minus one.
|
||||
|
||||
- `Next_Ep`
|
||||
### `Next_Ep`
|
||||
|
||||
The cluster of the next map, minus one.
|
||||
|
||||
- `Current`
|
||||
### `Current`
|
||||
|
||||
The name of the map that was finished.
|
||||
|
||||
- `Next`
|
||||
### `Next`
|
||||
|
||||
The name of the next map.
|
||||
|
||||
- `NextName`
|
||||
### `NextName`
|
||||
|
||||
The printable name of the next map.
|
||||
|
||||
- `LName0`
|
||||
### `LName0`
|
||||
|
||||
Texture ID of the level name of the map that was finished.
|
||||
|
||||
- `LName1`
|
||||
### `LName1`
|
||||
|
||||
Texture ID of the level name of the map being entered.
|
||||
|
||||
- `MaxFrags`
|
||||
### `MaxFrags`
|
||||
|
||||
Unknown purpose, not actually used by any part of the engine.
|
||||
|
||||
- `MaxItems`
|
||||
### `MaxItems`
|
||||
|
||||
The maximum number of acquired items in the map.
|
||||
|
||||
- `MaxKills`
|
||||
### `MaxKills`
|
||||
|
||||
The maximum number of killed monsters in the map.
|
||||
|
||||
- `MaxSecret`
|
||||
### `MaxSecret`
|
||||
|
||||
The maximum number of found secrets in the map.
|
||||
|
||||
- `ParTime`
|
||||
### `ParTime`
|
||||
|
||||
The par time of the map, in ticks.
|
||||
|
||||
- `SuckTime`
|
||||
### `SuckTime`
|
||||
|
||||
The suck time of the map, in minutes.
|
||||
|
||||
- `TotalTime`
|
||||
### `TotalTime`
|
||||
|
||||
The total time for the whole game, in ticks.
|
||||
|
||||
|
|
|
@ -12,20 +12,20 @@ struct FColorMap
|
|||
}
|
||||
```
|
||||
|
||||
- `BlendFactor`
|
||||
### `BlendFactor`
|
||||
|
||||
TODO: "This is for handling Legacy-style color maps which use a different
|
||||
formula to calculate how the color affects lighting."
|
||||
|
||||
- `Desaturation`
|
||||
### `Desaturation`
|
||||
|
||||
How much to desaturate colors in this sector. Range is 0 to 255, inclusive.
|
||||
|
||||
- `FadeColor`
|
||||
### `FadeColor`
|
||||
|
||||
The color of fog in this sector. None if all components are 0.
|
||||
|
||||
- `LightColor`
|
||||
### `LightColor`
|
||||
|
||||
The color of the sector. Default if all components are 0.
|
||||
|
||||
|
|
|
@ -44,48 +44,48 @@ struct Line play
|
|||
}
|
||||
```
|
||||
|
||||
- `BackSector`, `FrontSector`
|
||||
### `BackSector`, `FrontSector`
|
||||
|
||||
The sector of the front and back sides of this line.
|
||||
|
||||
- `BBox`
|
||||
### `BBox`
|
||||
|
||||
The top, bottom, left and right of the line, respective to array index.
|
||||
|
||||
- `Delta`
|
||||
### `Delta`
|
||||
|
||||
Equivalent to `V2 - V1`.
|
||||
|
||||
- `V1`, `V2`
|
||||
### `V1`, `V2`
|
||||
|
||||
Returns the start and end points of this line segment, respectively.
|
||||
|
||||
- `Sidedef`
|
||||
### `Sidedef`
|
||||
|
||||
The front and back sides of this line, 0 and 1 respectively. The aliases
|
||||
`Line.Front` and `Line.Back` are provided as well.
|
||||
|
||||
- `PortalIndex`
|
||||
### `PortalIndex`
|
||||
|
||||
TODO
|
||||
|
||||
- `PortalTransferred`
|
||||
### `PortalTransferred`
|
||||
|
||||
TODO
|
||||
|
||||
- `Health`
|
||||
### `Health`
|
||||
|
||||
TODO
|
||||
|
||||
- `HealthGroup`
|
||||
### `HealthGroup`
|
||||
|
||||
TODO
|
||||
|
||||
- `Alpha`
|
||||
### `Alpha`
|
||||
|
||||
Alpha of the middle texture on both sides.
|
||||
|
||||
- `Flags`
|
||||
### `Flags`
|
||||
|
||||
Any combination of the following bit flags:
|
||||
|
||||
|
@ -119,59 +119,59 @@ struct Line play
|
|||
| `ML_WRAP_MIDTEX` | Applies `WALLF_WRAP_MIDTEX` to both sides. |
|
||||
| `ML_ZONEBOUNDARY` | Reverb zone boundary. |
|
||||
|
||||
- `ValidCount`
|
||||
### `ValidCount`
|
||||
|
||||
Don't use this.
|
||||
|
||||
- `Activation`
|
||||
### `Activation`
|
||||
|
||||
TODO
|
||||
|
||||
- `Args`
|
||||
### `Args`
|
||||
|
||||
Arguments of the line's special action.
|
||||
|
||||
- `LockNumber`
|
||||
### `LockNumber`
|
||||
|
||||
TODO
|
||||
|
||||
- `Special`
|
||||
### `Special`
|
||||
|
||||
Number of the special action to be executed when this line is activated.
|
||||
|
||||
- `Index`
|
||||
### `Index`
|
||||
|
||||
Returns the index of this line.
|
||||
|
||||
- `Activate`
|
||||
### `Activate`
|
||||
|
||||
TODO
|
||||
|
||||
- `RemoteActivate`
|
||||
### `RemoteActivate`
|
||||
|
||||
TODO
|
||||
|
||||
- `GetPortalDestination`
|
||||
### `GetPortalDestination`
|
||||
|
||||
TODO
|
||||
|
||||
- `IsLinePortal`
|
||||
### `IsLinePortal`
|
||||
|
||||
TODO
|
||||
|
||||
- `IsVisualPortal`
|
||||
### `IsVisualPortal`
|
||||
|
||||
TODO
|
||||
|
||||
- `GetHealth`
|
||||
### `GetHealth`
|
||||
|
||||
TODO
|
||||
|
||||
- `SetHealth`
|
||||
### `SetHealth`
|
||||
|
||||
TODO
|
||||
|
||||
- `GetUdmfFloat`, `GetUdmfInt`, `GetUdmfString`
|
||||
### `GetUdmfFloat`, `GetUdmfInt`, `GetUdmfString`
|
||||
|
||||
Gets a named UDMF property attached to this linedef.
|
||||
|
||||
|
|
|
@ -11,13 +11,13 @@ class LineIdIterator : Object
|
|||
}
|
||||
```
|
||||
|
||||
- `Create`
|
||||
### `Create`
|
||||
|
||||
Creates a new iterator over lines with tag `tag`.
|
||||
|
||||
- `Next`
|
||||
### `Next`
|
||||
|
||||
Returns the index of the current line and advances the iterator. Returns
|
||||
`-1` when the list is exhausted.
|
||||
Returns the index of the current line and advances the iterator. Returns `-1`
|
||||
when the list is exhausted.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -22,51 +22,51 @@ struct SecPlane play
|
|||
}
|
||||
```
|
||||
|
||||
- `D`
|
||||
### `D`
|
||||
|
||||
TODO
|
||||
|
||||
- `NegiC`
|
||||
### `NegiC`
|
||||
|
||||
TODO
|
||||
|
||||
- `Normal`
|
||||
### `Normal`
|
||||
|
||||
TODO
|
||||
|
||||
- `ChangeHeight`
|
||||
### `ChangeHeight`
|
||||
|
||||
TODO
|
||||
|
||||
- `GetChangedHeight`
|
||||
### `GetChangedHeight`
|
||||
|
||||
TODO
|
||||
|
||||
- `HeightDiff`
|
||||
### `HeightDiff`
|
||||
|
||||
TODO
|
||||
|
||||
- `IsEqual`
|
||||
### `IsEqual`
|
||||
|
||||
TODO
|
||||
|
||||
- `IsSlope`
|
||||
### `IsSlope`
|
||||
|
||||
TODO
|
||||
|
||||
- `PointOnSide`
|
||||
### `PointOnSide`
|
||||
|
||||
TODO
|
||||
|
||||
- `PointToDist`
|
||||
### `PointToDist`
|
||||
|
||||
TODO
|
||||
|
||||
- `ZAtPointDist`
|
||||
### `ZAtPointDist`
|
||||
|
||||
TODO
|
||||
|
||||
- `ZAtPoint`
|
||||
### `ZAtPoint`
|
||||
|
||||
TODO
|
||||
|
||||
|
|
|
@ -14,27 +14,27 @@ struct SecSpecial play
|
|||
}
|
||||
```
|
||||
|
||||
- `DamageAmount`
|
||||
### `DamageAmount`
|
||||
|
||||
TODO
|
||||
|
||||
- `DamageInterval`
|
||||
### `DamageInterval`
|
||||
|
||||
TODO
|
||||
|
||||
- `DamageType`
|
||||
### `DamageType`
|
||||
|
||||
TODO
|
||||
|
||||
- `Flags`
|
||||
### `Flags`
|
||||
|
||||
TODO
|
||||
|
||||
- `LeakyDamage`
|
||||
### `LeakyDamage`
|
||||
|
||||
TODO
|
||||
|
||||
- `Special`
|
||||
### `Special`
|
||||
|
||||
TODO
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@ class SectorEffect : Thinker
|
|||
}
|
||||
```
|
||||
|
||||
- `m_Sector`
|
||||
### `m_Sector`
|
||||
|
||||
The sector this effect is attached to.
|
||||
|
||||
- `GetSector`
|
||||
### `GetSector`
|
||||
|
||||
Returns the sector this effect is attached to.
|
||||
|
||||
|
|
|
@ -12,20 +12,20 @@ class SectorTagIterator : Object
|
|||
}
|
||||
```
|
||||
|
||||
- `Create`
|
||||
### `Create`
|
||||
|
||||
Creates a new iterator over sectors with tag `tag`. TODO: I can't find where
|
||||
`defline` is actually used. It is a mystery.
|
||||
|
||||
- `Next`
|
||||
### `Next`
|
||||
|
||||
Returns the index of the current sector and advances the iterator. Returns
|
||||
`-1` when the list is exhausted.
|
||||
Returns the index of the current sector and advances the iterator. Returns `-1`
|
||||
when the list is exhausted.
|
||||
|
||||
- `NextCompat`
|
||||
### `NextCompat`
|
||||
|
||||
If `compat` is `false`, acts exactly as `Next`. Otherwise, returns the
|
||||
index of the current sector and advances the iterator in a manner
|
||||
compatible with Doom's stair builders.
|
||||
If `compat` is `false`, acts exactly as `Next`. Otherwise, returns the index of
|
||||
the current sector and advances the iterator in a manner compatible with Doom's
|
||||
stair builders.
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -61,15 +61,15 @@ struct Side play
|
|||
}
|
||||
```
|
||||
|
||||
- `Linedef`
|
||||
### `Linedef`
|
||||
|
||||
The line this side belongs to.
|
||||
|
||||
- `Sector`
|
||||
### `Sector`
|
||||
|
||||
The sector this side belongs to.
|
||||
|
||||
- `Flags`
|
||||
### `Flags`
|
||||
|
||||
Any combination of the following bit flags:
|
||||
|
||||
|
@ -84,52 +84,52 @@ struct Side play
|
|||
| `WALLF_SMOOTHLIGHTING` | Applies a unique contrast at all angles. |
|
||||
| `WALLF_WRAP_MIDTEX` | Repeats the middle texture infinitely on the vertical axis. |
|
||||
|
||||
- `Light`
|
||||
### `Light`
|
||||
|
||||
The light level of this side. Relative to the sector lighting unless
|
||||
`WALLF_ABSLIGHTING`.
|
||||
|
||||
- `Index`
|
||||
### `Index`
|
||||
|
||||
Returns the index of this side.
|
||||
|
||||
- `V1`, `V2`
|
||||
### `V1`, `V2`
|
||||
|
||||
Returns the start and end points of this sidedef, respectively.
|
||||
|
||||
- `GetTexture`, `SetTexture`
|
||||
### `GetTexture`, `SetTexture`
|
||||
|
||||
Gets or sets the texture of one portion of the sidedef.
|
||||
|
||||
- `GetTextureXOffset`, `SetTextureXOffset`, `AddTextureXOffset`
|
||||
### `GetTextureXOffset`, `SetTextureXOffset`, `AddTextureXOffset`
|
||||
|
||||
Gets, sets or adds to the texture portion's horizontal offset.
|
||||
|
||||
- `GetTextureYOffset`, `SetTextureYOffset`, `AddTextureYOffset`
|
||||
### `GetTextureYOffset`, `SetTextureYOffset`, `AddTextureYOffset`
|
||||
|
||||
Gets, sets or adds to the texture portion's vertical offset.
|
||||
|
||||
- `GetTextureXScale`, `SetTextureXScale`, `MultiplyTextureXScale`
|
||||
### `GetTextureXScale`, `SetTextureXScale`, `MultiplyTextureXScale`
|
||||
|
||||
Gets, sets or multiplies the texture portion's horizontal scale.
|
||||
|
||||
- `GetTextureYScale`, `SetTextureYScale`, `MultiplyTextureYScale`
|
||||
### `GetTextureYScale`, `SetTextureYScale`, `MultiplyTextureYScale`
|
||||
|
||||
Gets, sets or multiplies the texture portion's vertical scale.
|
||||
|
||||
- `SetSpecialColor`
|
||||
### `SetSpecialColor`
|
||||
|
||||
TODO
|
||||
|
||||
- `GetAdditiveColor`, `SetAdditiveColor`
|
||||
### `GetAdditiveColor`, `SetAdditiveColor`
|
||||
|
||||
TODO
|
||||
|
||||
- `EnableAdditiveColor`
|
||||
### `EnableAdditiveColor`
|
||||
|
||||
TODO
|
||||
|
||||
- `GetUdmfFloat`, `GetUdmfInt`, `GetUdmfString`
|
||||
### `GetUdmfFloat`, `GetUdmfInt`, `GetUdmfString`
|
||||
|
||||
Gets a named UDMF property attached to this sidedef.
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@ struct Vertex play
|
|||
}
|
||||
```
|
||||
|
||||
- `P`
|
||||
### `P`
|
||||
|
||||
The point this object represents.
|
||||
|
||||
- `Index`
|
||||
### `Index`
|
||||
|
||||
The index of this vertex in the global vertices array.
|
||||
|
||||
|
|
|
@ -15,28 +15,28 @@ struct PlayerClass
|
|||
}
|
||||
```
|
||||
|
||||
- `Flags`
|
||||
### `Flags`
|
||||
|
||||
Not currently implemented correctly, `PCF_NOMENU` does not exist in ZScript,
|
||||
but its value is `1` if you need to check for that.
|
||||
|
||||
- `Skins`
|
||||
### `Skins`
|
||||
|
||||
Skin indices available to this player class.
|
||||
|
||||
- `Type`
|
||||
### `Type`
|
||||
|
||||
The class type reference for this player class.
|
||||
|
||||
- `CheckSkin`
|
||||
### `CheckSkin`
|
||||
|
||||
Checks if `skin` is in `Skins`.
|
||||
|
||||
- `EnumColorsets`
|
||||
### `EnumColorsets`
|
||||
|
||||
TODO
|
||||
|
||||
- `GetColorsetName`
|
||||
### `GetColorsetName`
|
||||
|
||||
TODO
|
||||
|
||||
|
|
|
@ -18,15 +18,15 @@ struct PlayerSkin
|
|||
}
|
||||
```
|
||||
|
||||
- `CrouchSprite`
|
||||
### `CrouchSprite`
|
||||
|
||||
The crouching sprite ID for this skin.
|
||||
|
||||
- `Face`
|
||||
### `Face`
|
||||
|
||||
Prefix for statusbar face graphics.
|
||||
|
||||
- `Gender`
|
||||
### `Gender`
|
||||
|
||||
Default gender of the skin. May be one of the following:
|
||||
|
||||
|
@ -37,34 +37,34 @@ struct PlayerSkin
|
|||
| `GENDER_NEUTRAL` | `2` | Neutral. |
|
||||
| `GENDER_OTHER` | `3` | Other (robot, zombie, etc.) |
|
||||
|
||||
- `NameSpc`
|
||||
### `NameSpc`
|
||||
|
||||
If this skin was defined in S_SKIN, this is the lump ID of the marker itself.
|
||||
|
||||
- `OtherGame`
|
||||
### `OtherGame`
|
||||
|
||||
The player skin is made for another game and needs to be color remapped
|
||||
differently.
|
||||
|
||||
- `Range0End`
|
||||
### `Range0End`
|
||||
|
||||
The end index of the translation range to be used for changing the player
|
||||
sprite's color.
|
||||
|
||||
- `Range0Start`
|
||||
### `Range0Start`
|
||||
|
||||
The beginning index of the translation range to be used for changing the
|
||||
player sprite's color.
|
||||
The beginning index of the translation range to be used for changing the player
|
||||
sprite's color.
|
||||
|
||||
- `Scale`
|
||||
### `Scale`
|
||||
|
||||
The scaling factor used for the player sprite.
|
||||
|
||||
- `SkinName`
|
||||
### `SkinName`
|
||||
|
||||
Name of the skin.
|
||||
|
||||
- `Sprite`
|
||||
### `Sprite`
|
||||
|
||||
The sprite ID for this skin.
|
||||
|
||||
|
|
|
@ -12,15 +12,15 @@ struct Team
|
|||
}
|
||||
```
|
||||
|
||||
- `Max`
|
||||
### `Max`
|
||||
|
||||
The maximum number of teams.
|
||||
|
||||
- `NoTeam`
|
||||
### `NoTeam`
|
||||
|
||||
A constant index for a player with no team.
|
||||
|
||||
- `mName`
|
||||
### `mName`
|
||||
|
||||
The name of the team.
|
||||
|
||||
|
|
|
@ -15,27 +15,27 @@ class SeqNode : Object
|
|||
}
|
||||
```
|
||||
|
||||
- `GetSequenceSlot`
|
||||
### `GetSequenceSlot`
|
||||
|
||||
TODO
|
||||
|
||||
- `MarkPrecacheSounds`
|
||||
### `MarkPrecacheSounds`
|
||||
|
||||
TODO
|
||||
|
||||
- `AddChoice`
|
||||
### `AddChoice`
|
||||
|
||||
TODO
|
||||
|
||||
- `AreModesSame`
|
||||
### `AreModesSame`
|
||||
|
||||
TODO
|
||||
|
||||
- `AreModesSameID`
|
||||
### `AreModesSameID`
|
||||
|
||||
TODO
|
||||
|
||||
- `GetSequenceName`
|
||||
### `GetSequenceName`
|
||||
|
||||
TODO
|
||||
|
||||
|
|
|
@ -47,92 +47,92 @@ class PSprite : Object play
|
|||
}
|
||||
```
|
||||
|
||||
- `CurState`
|
||||
### `CurState`
|
||||
|
||||
TODO
|
||||
|
||||
- `ID`
|
||||
### `ID`
|
||||
|
||||
TODO
|
||||
|
||||
- `Next`
|
||||
### `Next`
|
||||
|
||||
TODO
|
||||
|
||||
- `Owner`
|
||||
### `Owner`
|
||||
|
||||
TODO
|
||||
|
||||
- `Alpha`
|
||||
### `Alpha`
|
||||
|
||||
The amount of translucency of the PSprite, range 0-1 inclusive.
|
||||
|
||||
- `Caller`
|
||||
### `Caller`
|
||||
|
||||
TODO
|
||||
|
||||
- `FirstTic`
|
||||
### `FirstTic`
|
||||
|
||||
TODO
|
||||
|
||||
- `Frame`
|
||||
### `Frame`
|
||||
|
||||
Frame number of the sprite.
|
||||
|
||||
- `OldX`
|
||||
### `OldX`
|
||||
|
||||
TODO
|
||||
|
||||
- `OldY`
|
||||
### `OldY`
|
||||
|
||||
TODO
|
||||
|
||||
- `ProcessPending`
|
||||
### `ProcessPending`
|
||||
|
||||
TODO
|
||||
|
||||
- `Sprite`
|
||||
### `Sprite`
|
||||
|
||||
The sprite to display on this layer.
|
||||
|
||||
- `Tics`
|
||||
### `Tics`
|
||||
|
||||
The number of game ticks before the next state takes over.
|
||||
|
||||
- `X`
|
||||
### `X`
|
||||
|
||||
The offset from the weapon's normal resting position on the horizontal axis.
|
||||
|
||||
- `Y`
|
||||
### `Y`
|
||||
|
||||
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`.
|
||||
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`.
|
||||
|
||||
- `SetState`
|
||||
### `SetState`
|
||||
|
||||
TODO
|
||||
|
||||
- `Tick`
|
||||
### `Tick`
|
||||
|
||||
Called by `PlayerPawn::TickPSprites` to advance the frame.
|
||||
|
||||
|
|
18
entry.md
18
entry.md
|
@ -125,24 +125,24 @@ TODO: this can be used for custom buttons
|
|||
In `MAPINFO`, the `GameInfo` block (referred to as `MAPINFO`/GameInfo in this
|
||||
document) the following properties interact directly with ZScript:
|
||||
|
||||
- `EventHandlers` and `AddEventHandlers` override or add to the list of
|
||||
* `EventHandlers` and `AddEventHandlers` override or add to the list of
|
||||
`StaticEventHandler` or `EventHandler` classes registered by the game (as
|
||||
opposed to event handlers registered per-map.)
|
||||
- `MessageBoxClass` sets the `MessageBoxMenu` class to use for message boxes
|
||||
* `MessageBoxClass` sets the `MessageBoxMenu` class to use for message boxes
|
||||
used by the engine's GUI.
|
||||
- `PlayerClasses` and `AddPlayerClasses` override or add to the list of
|
||||
* `PlayerClasses` and `AddPlayerClasses` override or add to the list of
|
||||
`PlayerPawn` classes the game provides.
|
||||
- `PrecacheClasses` will pre-cache all sprites used by an `Actor` class. Note
|
||||
* `PrecacheClasses` will pre-cache all sprites used by an `Actor` class. Note
|
||||
that this also works for `StateProvider` degenerates like `Weapon`.
|
||||
- `StatScreen_CoOp` sets the `StatusScreen` class to use for co-op intermission
|
||||
* `StatScreen_CoOp` sets the `StatusScreen` class to use for co-op intermission
|
||||
screens.
|
||||
- `StatScreen_DM` sets the `StatusScreen` class to use for Deathmatch
|
||||
* `StatScreen_DM` sets the `StatusScreen` class to use for Deathmatch
|
||||
intermission screens.
|
||||
- `StatScreen_Single` sets the `StatusScreen` class to use for single-player
|
||||
* `StatScreen_Single` sets the `StatusScreen` class to use for single-player
|
||||
intermission screens.
|
||||
- `StatusBarClass` sets the status bar class used by the game to the provided
|
||||
* `StatusBarClass` sets the status bar class used by the game to the provided
|
||||
`BaseStatusBar` class.
|
||||
- `WeaponSlot` sets the game's default weapon slots to the provided `Weapon`
|
||||
* `WeaponSlot` sets the game's default weapon slots to the provided `Weapon`
|
||||
classes.
|
||||
|
||||
TODO: there are other things here as well, like map event handlers
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Concepts
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Concepts](#concepts)
|
||||
* [Action Scoping](#action-scoping)
|
||||
* [Object Scoping](#object-scoping)
|
||||
* [Format String](#format-string)
|
||||
|
@ -11,6 +10,8 @@
|
|||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Concepts
|
||||
|
||||
Here is a cursory view of concepts vital to ZScript and ZDoom in general. If
|
||||
you can't find something here, it's likely inherited directly from Doom, so you
|
||||
should check [the Doom Wiki][1] for more relevant information.
|
||||
|
@ -72,12 +73,12 @@ arbitrary data to a contiguous character string. A format string contains
|
|||
normal characters and *conversion specifiers*. See [this page][2] for more
|
||||
information. Differences between C's `printf` and ZScript formats include:
|
||||
|
||||
- Since there's no `char` type, `int` is used for `%c`.
|
||||
- `%s` also works for `name`.
|
||||
- No `%n` specifier.
|
||||
- An additional conversion specifier `%B` exists which converts a number to
|
||||
* Since there's no `char` type, `int` is used for `%c`.
|
||||
* `%s` also works for `name`.
|
||||
* No `%n` specifier.
|
||||
* An additional conversion specifier `%B` exists which converts a number to
|
||||
binary.
|
||||
- An additional conversion specifier `%H` exists which works like `%g` but
|
||||
* An additional conversion specifier `%H` exists which works like `%g` but
|
||||
automatically selects the smallest appropriate precision.
|
||||
|
||||
[2]: https://en.cppreference.com/w/c/io/fprintf
|
||||
|
@ -102,23 +103,22 @@ The Doom engine, as long as it has existed and into every faithful-enough port
|
|||
of it, no matter how different from the source material, runs the game
|
||||
simulation in the same way:
|
||||
|
||||
- Input events are processed.
|
||||
*Input events are processed.*
|
||||
|
||||
Keyboard, mouse, gamepad, etc. if a local player, the demo file if watching
|
||||
a demo, packets over the internet in networked games.
|
||||
Keyboard, mouse, gamepad, etc. if a local player, the demo file if watching a
|
||||
demo, packets over the internet in networked games.
|
||||
|
||||
- The game is *ticked*.
|
||||
*The game is "ticked".*
|
||||
|
||||
Every 1/35th of a second that passes, a new "game tick" takes place, also
|
||||
referred to as *gametic*, *tick* or simply *tic*.
|
||||
|
||||
- The game is rendered.
|
||||
*The game is rendered.*
|
||||
|
||||
All information from the *current* game tick is rendered. This usually
|
||||
happens more often than the game is actually ticked. In ZDoom, Eternity
|
||||
Engine, and some other ports, the information is interpolated between the
|
||||
last and current game tick when there is extra time available to give
|
||||
smoother rendering.
|
||||
All information from the *current* game tick is rendered. This usually happens
|
||||
more often than the game is actually ticked. In ZDoom, Eternity Engine, and
|
||||
some other ports, the information is interpolated between the last and current
|
||||
game tick when there is extra time available to give smoother rendering.
|
||||
|
||||
For more information on ticks, please refer to [the relevant Doom Wiki
|
||||
article][4].
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Style
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Style](#style)
|
||||
* [Capitalization Conventions](#capitalization-conventions)
|
||||
* [Rationale](#rationale)
|
||||
* [Word Choice](#word-choice)
|
||||
|
@ -17,6 +16,8 @@
|
|||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Style
|
||||
|
||||
This is a style guide for the ZScript documentation to encourage best-practice
|
||||
coding with it, focused on clarity and consistency of formatting. It is also
|
||||
intended to be a general style guide for writing new code, but this purpose is
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Versions
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Versions](#versions)
|
||||
* [Version 3.1.0](#version-310)
|
||||
* [Version 3.2.0](#version-320)
|
||||
* [Version 3.2.1](#version-321)
|
||||
|
@ -30,6 +29,8 @@
|
|||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Versions
|
||||
|
||||
Here is a list of differences between ZScript versions.
|
||||
|
||||
## Version 3.1.0
|
||||
|
|
10
language.md
10
language.md
|
@ -89,11 +89,11 @@ version of ZScript. The minimum version supported by this documentation is 3.0.
|
|||
A ZScript file can have one of several things at the top level of the file,
|
||||
following a version directive:
|
||||
|
||||
- Class definitions
|
||||
- Structure definitions
|
||||
- Enumeration definitions
|
||||
- Constant definitions
|
||||
- Include directives
|
||||
* Class definitions
|
||||
* Structure definitions
|
||||
* Enumeration definitions
|
||||
* Constant definitions
|
||||
* Include directives
|
||||
|
||||
|
||||
# Include directives
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Class Definitions
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Class Definitions](#class-definitions)
|
||||
* [Example: Class headers](#example-class-headers)
|
||||
* [Example: Class definitions](#example-class-definitions)
|
||||
* [Class Flags](#class-flags)
|
||||
|
@ -17,6 +16,8 @@
|
|||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Class Definitions
|
||||
|
||||
A class defines an object type within ZScript, and is most of what you'll be
|
||||
creating within the language.
|
||||
|
||||
|
@ -148,16 +149,16 @@ inherits `Actor`.
|
|||
Class contents are an optional list of various things logically contained
|
||||
within the class, including:
|
||||
|
||||
- Member declarations
|
||||
- Method definitions
|
||||
- Property definitions
|
||||
- Flag definitions
|
||||
- Default blocks
|
||||
- State definitions
|
||||
- Enumeration definitions
|
||||
- Structure definitions
|
||||
- Constant definitions
|
||||
- Static array definitions
|
||||
* Member declarations
|
||||
* Method definitions
|
||||
* Property definitions
|
||||
* Flag definitions
|
||||
* Default blocks
|
||||
* State definitions
|
||||
* Enumeration definitions
|
||||
* Structure definitions
|
||||
* Constant definitions
|
||||
* Static array definitions
|
||||
|
||||
# Property Definitions
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
# Constant Definitions
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Constant Definitions](#constant-definitions)
|
||||
* [Example: Constant definitions](#example-constant-definitions)
|
||||
* [Static array definitions](#static-array-definitions)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Constant Definitions
|
||||
|
||||
Constants are simple named values. They are created with the syntax:
|
||||
|
||||
```
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
Enumeration Definitions
|
||||
=======================
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Enumeration Definitions](#enumeration-definitions)
|
||||
* [Example: Enumeration definitions](#example-enumeration-definitions)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Enumeration Definitions
|
||||
|
||||
An enumeration is a list of named numbers, which by default will be incremental
|
||||
from 0. By default they decay to the type `int`, but the default decay type can
|
||||
be set manually.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Expressions and Operators
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Expressions and Operators](#expressions-and-operators)
|
||||
* [Literals](#literals)
|
||||
* [String literals](#string-literals)
|
||||
* [Class type literals](#class-type-literals)
|
||||
|
@ -22,6 +21,10 @@
|
|||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Expressions and Operators
|
||||
|
||||
TODO
|
||||
|
||||
# Literals
|
||||
|
||||
Much like C or most other programming languages, ZScript has object literals,
|
||||
|
@ -166,11 +169,11 @@ arithmetic and various conditions.
|
|||
|
||||
Basic expressions, also known as primary expressions, can be one of:
|
||||
|
||||
- An identifier for a constant or variable.
|
||||
- The `Super` keyword.
|
||||
- Any object literal.
|
||||
- A vector literal.
|
||||
- An expression in parentheses.
|
||||
* An identifier for a constant or variable.
|
||||
* The `Super` keyword.
|
||||
* Any object literal.
|
||||
* A vector literal.
|
||||
* An expression in parentheses.
|
||||
|
||||
Identifiers work as you expect, they reference a variable or constant. The
|
||||
`Super` keyword references the parent type or any member within it.
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
# Member Declarations
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Member Declarations](#member-declarations)
|
||||
* [Example: Member declarations](#example-member-declarations)
|
||||
* [Member Declaration Flags](#member-declaration-flags)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Member Declarations
|
||||
|
||||
Member declarations define data within a structure or class that can be
|
||||
accessed directly within methods of the object (or its derived classes,) or
|
||||
indirectly from instances of it with the member access operator.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Method Definitions
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Method Definitions](#method-definitions)
|
||||
* [Method Argument List](#method-argument-list)
|
||||
* [Example: Method argument lists](#example-method-argument-lists)
|
||||
* [Method Definition Flags](#method-definition-flags)
|
||||
|
@ -9,6 +8,8 @@
|
|||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Method Definitions
|
||||
|
||||
Method definitions define functions within a structure or class that can be
|
||||
accessed directly within other methods of the object (or its derived classes,)
|
||||
or indirectly from instances of it with the member access operator.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Statements
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Statements](#statements)
|
||||
* [Compound Statements](#compound-statements)
|
||||
* [Expression Statements](#expression-statements)
|
||||
* [Example: Expression statements](#example-expression-statements)
|
||||
|
@ -20,6 +19,8 @@
|
|||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Statements
|
||||
|
||||
All functions are made up of a list of *statements* enclosed with left and
|
||||
right braces, which in and of itself is a statement called a *compound
|
||||
statement*, or *block*.
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
# Structure Definitions
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Structure Definitions](#structure-definitions)
|
||||
* [Example: Structure definitions](#example-structure-definitions)
|
||||
* [Structure Flags](#structure-flags)
|
||||
* [Structure Content](#structure-content)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Structure Definitions
|
||||
|
||||
A structure is an object type that does not inherit from Object and is not
|
||||
always (though occasionally is) a reference type, unlike classes. Structures
|
||||
marked as `native` are passed by-reference to and from the engine in an
|
||||
|
@ -59,9 +60,9 @@ struct MyCoolStructure
|
|||
Structure contents are an optional list of various things logically contained
|
||||
within the structure, including:
|
||||
|
||||
- Member declarations
|
||||
- Method definitions
|
||||
- Enumeration definitions
|
||||
- Constant definitions
|
||||
* Member declarations
|
||||
* Method definitions
|
||||
* Enumeration definitions
|
||||
* Constant definitions
|
||||
|
||||
<!-- EOF -->
|
||||
|
|
|
@ -1,11 +1,24 @@
|
|||
# Types
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [Types](#types)
|
||||
* [Integer Types](#integer-types)
|
||||
* [Symbols](#symbols)
|
||||
* [`Max`](#max)
|
||||
* [`Min`](#min)
|
||||
* [Floating-point Types](#floating-point-types)
|
||||
* [Symbols](#symbols-1)
|
||||
* [`Dig`](#dig)
|
||||
* [`Epsilon`](#epsilon)
|
||||
* [`Infinity`](#infinity)
|
||||
* [`Mant_Dig`](#mant_dig)
|
||||
* [`Max`](#max-1)
|
||||
* [`Max_Exp`](#max_exp)
|
||||
* [`Max_10_Exp`](#max_10_exp)
|
||||
* [`Min_Denormal`](#min_denormal)
|
||||
* [`Min_Exp`](#min_exp)
|
||||
* [`Min_Normal`](#min_normal)
|
||||
* [`Min_10_Exp`](#min_10_exp)
|
||||
* [`NaN`](#nan)
|
||||
* [Strings](#strings)
|
||||
* [Names](#names)
|
||||
* [Colors](#colors)
|
||||
|
@ -22,6 +35,8 @@
|
|||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# Types
|
||||
|
||||
ZScript has several categories of types: Integer types, floating-point
|
||||
(decimal) types, strings, vectors, names, classes, et al. There are a wide
|
||||
variety of ways to use these types, as well as a wide variety of places they
|
||||
|
@ -62,11 +77,11 @@ Some types have aliases as well:
|
|||
Integer types have symbols attached which can be accessed by `typename.name`,
|
||||
for instance `int.Max`.
|
||||
|
||||
- `Max`
|
||||
### `Max`
|
||||
|
||||
Maximum value of type.
|
||||
|
||||
- `Min`
|
||||
### `Min`
|
||||
|
||||
Minimum value of type.
|
||||
|
||||
|
@ -87,51 +102,51 @@ numbers. There are two such types available to ZScript:
|
|||
Floating-point types have symbols attached which can be accessed by
|
||||
`typename.name`, for instance `double.Infinity`.
|
||||
|
||||
- `Dig`
|
||||
### `Dig`
|
||||
|
||||
Number of decimal digits in type.
|
||||
|
||||
- `Epsilon`
|
||||
### `Epsilon`
|
||||
|
||||
ε value of type.
|
||||
|
||||
- `Infinity`
|
||||
### `Infinity`
|
||||
|
||||
∞ value of type.
|
||||
|
||||
- `Mant_Dig`
|
||||
### `Mant_Dig`
|
||||
|
||||
Number of mantissa bits in type.
|
||||
|
||||
- `Max`
|
||||
### `Max`
|
||||
|
||||
Maximum value of type.
|
||||
|
||||
- `Max_Exp`
|
||||
### `Max_Exp`
|
||||
|
||||
Maximum exponent bits value of type.
|
||||
|
||||
- `Max_10_Exp`
|
||||
### `Max_10_Exp`
|
||||
|
||||
Maximum exponent of type.
|
||||
|
||||
- `Min_Denormal`
|
||||
### `Min_Denormal`
|
||||
|
||||
Minimum positive subnormal value of type.
|
||||
|
||||
- `Min_Exp`
|
||||
### `Min_Exp`
|
||||
|
||||
Minimum exponent bits value of type.
|
||||
|
||||
- `Min_Normal`
|
||||
### `Min_Normal`
|
||||
|
||||
Minimum value of type.
|
||||
|
||||
- `Min_10_Exp`
|
||||
### `Min_10_Exp`
|
||||
|
||||
Minimum exponent of type.
|
||||
|
||||
- `NaN`
|
||||
### `NaN`
|
||||
|
||||
Not-a-Number value of type.
|
||||
|
||||
|
|
Loading…
Reference in New Issue