Browse Source

style changes

pull/1/head
Alison Watson 9 months ago
parent
commit
c88d002505
70 changed files with 1729 additions and 1719 deletions
  1. +47
    -50
      api/actor/State.md
  2. +41
    -41
      api/base/Array.md
  3. +33
    -36
      api/base/CVar.md
  4. +2
    -2
      api/base/FixedArray.md
  5. +17
    -17
      api/base/Object.md
  6. +40
    -42
      api/base/String.md
  7. +5
    -6
      api/base/StringTable.md
  8. +16
    -16
      api/base/Thinker.md
  9. +4
    -4
      api/base/Vector.md
  10. +6
    -6
      api/drawing/BrokenLines.md
  11. +10
    -11
      api/drawing/Console.md
  12. +20
    -20
      api/drawing/Font.md
  13. +4
    -4
      api/drawing/GIFont.md
  14. +103
    -104
      api/drawing/Screen.md
  15. +13
    -13
      api/drawing/Shape2D.md
  16. +63
    -64
      api/drawing/TexMan.md
  17. +15
    -15
      api/drawing/TextureID.md
  18. +13
    -13
      api/events/ConsoleEvent.md
  19. +7
    -7
      api/events/EventHandler.md
  20. +15
    -15
      api/events/RenderEvent.md
  21. +9
    -9
      api/events/ReplaceEvent.md
  22. +115
    -116
      api/events/StaticEventHandler.md
  23. +28
    -28
      api/files/Wads.md
  24. +58
    -58
      api/global/data/Client.md
  25. +13
    -13
      api/global/data/Constants.md
  26. +48
    -48
      api/global/data/Game.md
  27. +22
    -23
      api/global/data/Information.md
  28. +10
    -10
      api/global/data/Player.md
  29. +8
    -9
      api/global/func/Classes.md
  30. +45
    -45
      api/global/func/Game.md
  31. +49
    -49
      api/global/func/Math.md
  32. +14
    -14
      api/global/func/Random.md
  33. +57
    -57
      api/global/func/Sound.md
  34. +5
    -4
      api/global/func/System.md
  35. +18
    -18
      api/global/type/DehInfo.md
  36. +16
    -16
      api/global/type/FOptionMenuSettings.md
  37. +6
    -6
      api/global/type/LevelLocals.md
  38. +8
    -8
      api/inter/InterBackground.md
  39. +11
    -11
      api/inter/PatchInfo.md
  40. +174
    -176
      api/inter/StatusScreen.md
  41. +13
    -13
      api/inter/WBPlayerStruct.md
  42. +32
    -32
      api/inter/WBStartStruct.md
  43. +9
    -9
      api/level/FColorMap.md
  44. +80
    -80
      api/level/Line.md
  45. +5
    -5
      api/level/LineIdIterator.md
  46. +24
    -24
      api/level/SecPlane.md
  47. +12
    -12
      api/level/SecSpecial.md
  48. +4
    -4
      api/level/SectorEffect.md
  49. +10
    -10
      api/level/SectorTagIterator.md
  50. +41
    -41
      api/level/Side.md
  51. +4
    -4
      api/level/Vertex.md
  52. +13
    -13
      api/player/PlayerClass.md
  53. +29
    -29
      api/player/PlayerSkin.md
  54. +6
    -6
      api/player/Team.md
  55. +12
    -12
      api/sound/SeqNode.md
  56. +45
    -45
      api/weapon/PSprite.md
  57. +10
    -10
      entry.md
  58. +25
    -25
      glossary/Concepts.md
  59. +15
    -14
      glossary/Style.md
  60. +28
    -27
      glossary/Versions.md
  61. +6
    -6
      language.md
  62. +13
    -12
      language/Classes.md
  63. +4
    -3
      language/Constants.md
  64. +4
    -4
      language/Enumerations.md
  65. +25
    -22
      language/Expressions.md
  66. +4
    -3
      language/Members.md
  67. +5
    -4
      language/Methods.md
  68. +8
    -7
      language/Statements.md
  69. +8
    -7
      language/Structures.md
  70. +47
    -32
      language/Types.md

+ 47
- 50
api/actor/State.md View File

@@ -33,90 +33,87 @@ struct State
}
```

- `Frame`
### `Frame`

The sprite frame of this state.
The sprite frame of this state.

- `NextState`
### `NextState`

A pointer to the next state in the global state table.
A pointer to the next state in the global state table.

- `Sprite`
### `Sprite`

The sprite ID of this state.
The sprite ID of this state.

- `Tics`
### `Tics`

The number of game ticks this state lasts.
The number of game ticks this state lasts.

- `Misc1`
- `Misc2`
### `Misc1`, `Misc2`

Primarily used in DeHackEd compatibility. Don't use this.
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`.
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`.

- `UseFlags`
### `UseFlags`

The scope of this state. See *Action Scoping*. Can have any of the
`DefaultStateUsage` flags.
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.
`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.
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
`#`.
`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.
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`.
Returns `true` if this state is within a contiguous state sequence beginning
with `base`.

- `ValidateSpriteFrame`
### `ValidateSpriteFrame`

Returns `true` if the sprite frame actually exists.
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 -->

+ 41
- 41
api/base/Array.md View File

@@ -30,75 +30,75 @@ struct Array<Type>
}
```

- `Max`
### `Max`

Returns the amount of allocated objects in the array.
Returns the amount of allocated objects in the array.

- `Size`
### `Size`

Returns the amount of constructed objects in the array.
Returns the amount of constructed objects in the array.

- `Clear`
### `Clear`

Clears out the entire array, possibly destroying all objects in it.
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.
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.
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.
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.
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.
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.
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`.
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.
Shrinks `Max` to `Size`. Does not mutate any objects in the array.

<!-- EOF -->

+ 33
- 36
api/base/CVar.md View File

@@ -27,59 +27,56 @@ struct CVar
}
```

- `FindCVar`
### `FindCVar`

Returns a server CVar by name, or `null` if none is found.
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.
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.
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.
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.
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:
Returns the type of the CVar as it was defined, which may be one of the
following:

| Name |
| ---- |
| `CVar.CVAR_BOOL` |
| `CVar.CVAR_COLOR |
| `CVar.CVAR_FLOAT` |
| `CVar.CVAR_INT` |
| `CVar.CVAR_STRING` |
| Name |
| ---- |
| `CVar.CVAR_BOOL` |
| `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.
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.

<!-- EOF -->

+ 2
- 2
api/base/FixedArray.md View File

@@ -9,8 +9,8 @@ struct Type[N]
}
```

- `Size`
### `Size`

Returns the size of the array. This is a compile-time constant.
Returns the size of the array. This is a compile-time constant.

<!-- EOF -->

+ 17
- 17
api/base/Object.md View File

@@ -17,33 +17,33 @@ class Object
}
```

- `bDestroyed`
### `bDestroyed`

This object wants to be destroyed but has not yet been garbage collected.
This object wants to be destroyed but has not yet been garbage collected.

- `GetClass`
### `GetClass`

Returns the class type of this object.
Returns the class type of this object.

- `GetClassName`
### `GetClassName`

Returns a string representation of the class type of this object.
Returns a string representation of the class type of this object.

- `GetParentClass`
### `GetParentClass`

Returns the class type of this object's parent class.
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.
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.

<!-- EOF -->

+ 40
- 42
api/base/String.md View File

@@ -30,84 +30,82 @@ struct String
}
```

- `Format`
### `Format`

Creates a string using a format string and any amount of arguments.
Creates a string using a format string and any amount of arguments.

- `AppendFormat`
### `AppendFormat`

Works like `Format`, but appends the result to the string.
Works like `Format`, but appends the result to the string.

- `CharAt`
### `CharAt`

Returns the character at `pos` as a new string.
Returns the character at `pos` as a new string.

- `CharCodeAt`
### `CharCodeAt`

Returns the character at `pos` as an integer.
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`.
Returns the first index of `substr` starting from the left at `start`.

- `Left`
### `Left`

Returns the first `len` characters as a new string.
Returns the first `len` characters as a new string.

- `Length`
### `Length`

Returns the number of characters in this string.
Returns the number of characters in this string.

- `Mid`
### `Mid`

Returns `len` characters starting at `pos` as a new string.
Returns `len` characters starting at `pos` as a new string.

- `Remove`
### `Remove`

Removes `amount` characters starting at `index` in place.
Removes `amount` characters starting at `index` in place.

- `Replace`
### `Replace`

Replaces all instances of `pattern` with `replacement` in place.
Replaces all instances of `pattern` with `replacement` in place.

- `RightIndexOf`
### `RightIndexOf`

Returns the first index of `substr` starting from the right at `end`.
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.
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.
Converts all characters in the string to lowercase in place.

- `ToUpper`
### `ToUpper`

Converts all characters in the string to uppercase in place.
Converts all characters in the string to uppercase in place.

- `Truncate`
### `Truncate`

Truncates the string to `len` characters in place.
Truncates the string to `len` characters in place.

- `LastIndexOf`
### `LastIndexOf`

Broken. Use `RightIndexOf` instead.
Broken. Use `RightIndexOf` instead.

<!-- EOF -->

+ 5
- 6
api/base/StringTable.md View File

@@ -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 -->

+ 16
- 16
api/base/Thinker.md View File

@@ -13,8 +13,8 @@ The user-defined stat numbers begin at `Thinker.STAT_USER` and end at
except as relative to these two.

<!--
NOTE: These tables are not alphabetically organized as their ordering is
meaningful.
NOTE: These tables are not alphabetically organized as their ordering is
meaningful.
-->

Thinkers which do not think and are elided from many checks:
@@ -65,30 +65,30 @@ class Thinker : Object play
}
```

- `TICRATE`
### `TICRATE`

The number of game ticks in a second. This value is always `int(35)`.
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.
The level this `Thinker` is in, which may differ from another one's.

- `ChangeStatNum`
### `ChangeStatNum`

Changes the statnum of this `Thinker`.
Changes the statnum of this `Thinker`.

- `PostBeginPlay`
### `PostBeginPlay`

Called at the very end of this Thinker's initialization.
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 -->

+ 4
- 4
api/base/Vector.md View File

@@ -22,12 +22,12 @@ struct Vector3
}
```

- `Length`
### `Length`

Returns the length (magnitude) of the vector.
Returns the length (magnitude) of the vector.

- `Unit`
### `Unit`

Returns a normalized vector. Equivalent to `vec / vec.Length()`.
Returns a normalized vector. Equivalent to `vec / vec.Length()`.

<!-- EOF -->

+ 6
- 6
api/drawing/BrokenLines.md View File

@@ -12,16 +12,16 @@ class BrokenLines : Object
}
```

- `Count`
### `Count`

Returns the amount of lines in this container.
Returns the amount of lines in this container.

- `StringAt`
### `StringAt`

Returns the text of line `line`.
Returns the text of line `line`.

- `StringWidth`
### `StringWidth`

Returns the width (in pixels) of line `line`.
Returns the width (in pixels) of line `line`.

<!-- EOF -->

+ 10
- 11
api/drawing/Console.md View File

@@ -11,22 +11,21 @@ struct Console
}
```

- `HideConsole`
### `HideConsole`

Hides the console if it is open and `GameState` is not `GS_FULLCONSOLE`.
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
messages and `msgmidcolor2` for bold messages.
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.
Prints a formatted string to the console.

<!-- EOF -->

+ 20
- 20
api/drawing/Font.md View File

@@ -20,42 +20,42 @@ struct Font
}
```

- `FindFont`
### `FindFont`

Gets a font as defined in `FONTDEFS`.
Gets a font as defined in `FONTDEFS`.

- `FindFontColor`
### `FindFontColor`

Returns the color range enumeration for a named color.
Returns the color range enumeration for a named color.

- `GetFont`
### `GetFont`

Gets a font either as defined in `FONTDEFS` or a ZDoom/bitmap font.
Gets a font either as defined in `FONTDEFS` or a ZDoom/bitmap font.

- `GetBottomAlignOffset`
### `GetBottomAlignOffset`

Returns the baseline for the character `code`.
Returns the baseline for the character `code`.

- `GetCharWidth`
### `GetCharWidth`

Returns the width in pixels of a character code.
Returns the width in pixels of a character code.

- `GetCursor`
### `GetCursor`

Returns the string used as a blinking cursor graphic for this font.
Returns the string used as a blinking cursor graphic for this font.

- `GetHeight`
### `GetHeight`

Returns the line height of the font.
Returns the line height of the font.

- `StringWidth`
### `StringWidth`

Returns the width in pixels of the string.
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`.
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`.

<!-- EOF -->

+ 4
- 4
api/drawing/GIFont.md View File

@@ -10,12 +10,12 @@ struct GIFont
}
```

- `Color`
### `Color`

The color of the font.
The color of the font.

- `FontName`
### `FontName`

The name of the font.
The name of the font.

<!-- EOF -->

+ 103
- 104
api/drawing/Screen.md View File

@@ -32,145 +32,144 @@ struct Screen
}
```

- `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`.

- `DrawShape`

TODO
### `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`.

### `DrawShape`

- `DrawText`
TODO

TODO
### `DrawText`

- `DrawTexture`
TODO

Draws texture `tex`, possibly animated by the animation ticker if `animate`
is `true`, at horizontal position `x` and vertical position `y`.
### `DrawTexture`

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:
Draws texture `tex`, possibly animated by the animation ticker if `animate` is
`true`, at horizontal position `x` and vertical position `y`.

| Name | Description |
| ---- | ----------- |
| `DTA_BASE` | No position scaling is performed. |
| `DTA_CLEAN` | Scales all positions by `Clean*Fac`. See the documentation for those variables for more information. |
| `DTA_CLEANNOMOVE` | Scales the destination width and height by `Clean*Fac`. |
| `DTA_CLEANNOMOVE_1` | Scales the destination width and height by `Clean*Fac_1`. |
| `DTA_FULLSCREEN` | Sets the X and Y positions to `0`. (Yes, really, this is all it does.) |
| `DTA_HUDRULES` | Scales all positions by the current status bar's scaling rules. |
| `DTA_HUDRULESC` | Scales all positions by the current status bar's scaling rules and centers the X position. |
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:

Here is a list of tags and their respective arguments which may be used:
| Name | Description |
| ---- | ----------- |
| `DTA_BASE` | No position scaling is performed. |
| `DTA_CLEAN` | Scales all positions by `Clean*Fac`. See the documentation for those variables for more information. |
| `DTA_CLEANNOMOVE` | Scales the destination width and height by `Clean*Fac`. |
| `DTA_CLEANNOMOVE_1` | Scales the destination width and height by `Clean*Fac_1`. |
| `DTA_FULLSCREEN` | Sets the X and Y positions to `0`. (Yes, really, this is all it does.) |
| `DTA_HUDRULES` | Scales all positions by the current status bar's scaling rules. |
| `DTA_HUDRULESC` | Scales all positions by the current status bar's scaling rules and centers the X position. |

| Name | Arguments | Description |
| ---- | --------- | ----------- |
| `DTA_320X200` | `bool use` | Sets `CleanMode` to `DTA_BASE` and the virtual width/height to `320`/`200` if `use` is `true`. Note that 320x200 does not scale properly to the screen as it must be 320x240 to do so. |
| `DTA_ALPHACHANNEL` | `bool use` | Does nothing unless `DTA_FILLCOLOR` is used and the render style is unspecified, in which case it will set the render style to "shaded" if `use` is `true`. |
| `DTA_ALPHA` | `double alpha` | Sets the alpha of the drawn texture to `alpha`. |
| `DTA_BOTTOM320X200` | `bool use` | Same as `DTA_320X200`, but also enables position transformation as if a call to `VirtualToRealCoords` with `vbottom` to `true`. Note that this is the only way to actually set this, but it may be overridden by following arguments to effectively toggle only this flag. |
| `DTA_CENTERBOTTOMOFFSET` | `bool use` | Same as `DTA_CENTERBOTTOMOFFSET`, but the Y offset is aligned to the bottom instead of the center. |
| `DTA_CENTEROFFSET` | `bool use` | Overrides the texture's X and Y offsets, centering them between the texture's height and width if `use` is `true`. |
| `DTA_CLEANNOMOVE1` | `bool use` | Sets `CleanMode` to `DTA_CLEANNOMOVE1` if `use` is `true`. |
| `DTA_CLEANNOMOVE` | `bool use` | Sets `CleanMode` to `DTA_CLEANNOMOVE` if `use` is `true`. |
| `DTA_CLEAN` | `bool use` | Sets `CleanMode` to `DTA_CLEAN` if `use` is `true`. |
| `DTA_CLIPBOTTOM`, `DTA_CLIPTOP` | `int length` | Sets the vertical clipping for the texture. |
| `DTA_CLIPLEFT`, `DTA_CLIPRIGHT` | `int length` | Sets the horizontal clipping for the texture. |
| `DTA_COLOROVERLAY` | `color cr` | Multiplies `cr` with the texture. Alpha determines the intensity of this overlay. Applied before render styles. |
| `DTA_COLOR` | `color cr` | Multiplies `cr` with the texture. Applied after render styles change the color. |
| `DTA_DESATURATE` | `int amount` | Desaturates the texture by `amount` (range 0-255.) |
| `DTA_DESTHEIGHTF`, `DTA_DESTWIDTHF` | `double size` | Same as `DTA_DESTHEIGHT`/`DTA_DESTWIDTH`, but with decimal arguments. |
| `DTA_DESTHEIGHT`, `DTA_DESTWIDTH` | `int size` | Sets the resulting width or height on screen of the texture and sets `CleanMode` to `DTA_BASE`. |
| `DTA_FILLCOLOR` | `color cr` | Sets the render style to "stencil" if one is not specified and the fill color to `cr`. |
| `DTA_FLIPX`, `DTA_FLIPY` | `bool use` | Flips the X or Y position if `use` is `true`.
| `DTA_FULLSCREEN` | `bool use` | Sets `CleanMode` to `DTA_FULLSCREEN` and the virtual width and height to the display size of the texture. |
| `DTA_HUDRULES` | `int type` | Sets `CleanMode` to `DTA_HUDRULESC` if `type` is `BaseStatusBar.HUD_HORIZCENTER`, or `DTA_HUDRULES` if it is `BaseStatusBar.HUD_NORMAL`. |
| `DTA_KEEPRATIO` | `bool on` | Enables aspect ratio correction if `on` is `true`. |
| `DTA_LEFTOFFSETF`, `DTA_TOPOFFSETF` | `double ofs` | Same as `DTA_LEFTOFFSET`/`DTA_TOPOFFSETF`, but with decimal arguments. |
| `DTA_LEFTOFFSET`, `DTA_TOPOFFSET` | `int ofs` | Overrides the texture's X or Y offset. |
| `DTA_LEGACYRENDERSTYLE` | `int style` | Overrides the render style. Note that there is also a `DTA_RENDERSTYLE` which cannot be used because the engine does not expose `FRenderStyle` yet. |
| `DTA_MASKED` | `bool on` | Turns the texture fully opaque (no alpha mask) if `on` is `false`. Default value is on. |
| `DTA_SRCHEIGHT`, `DTA_SRCWIDTH` | `int size` | Sets the width or height of the source image. Will cut the texture if lower than the original size. If the size is larger than the original, it will cause UV clamping, repeating the pixels at the image borders. |
| `DTA_SRCX`, `DTA_SRCY` | `int pos` | Sets the X or Y on the source image to start the texture at. Texture wrapping will cause a UV clamping effect, repeating the pixels at the image borders. |
| `DTA_TRANSLATIONINDEX` | `int index` | Remaps colors in the destination texture with translation table `index`. |
| `DTA_VIRTUALHEIGHTF`, `DTA_VIRTUALWIDTHF` | `double size` | Same as `DTA_VIRTUALHEIGHT`/`DTA_VIRTUALWIDTH`, but with decimal arguments. |
| `DTA_VIRTUALHEIGHT`, `DTA_VIRTUALWIDTH` | `int size` | Sets the virtual width or height to `size`. |
| `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. |
Here is a list of tags and their respective arguments which may be used:

- `Clear`
| Name | Arguments | Description |
| ---- | --------- | ----------- |
| `DTA_320X200` | `bool use` | Sets `CleanMode` to `DTA_BASE` and the virtual width/height to `320`/`200` if `use` is `true`. Note that 320x200 does not scale properly to the screen as it must be 320x240 to do so. |
| `DTA_ALPHACHANNEL` | `bool use` | Does nothing unless `DTA_FILLCOLOR` is used and the render style is unspecified, in which case it will set the render style to "shaded" if `use` is `true`. |
| `DTA_ALPHA` | `double alpha` | Sets the alpha of the drawn texture to `alpha`. |
| `DTA_BOTTOM320X200` | `bool use` | Same as `DTA_320X200`, but also enables position transformation as if a call to `VirtualToRealCoords` with `vbottom` to `true`. Note that this is the only way to actually set this, but it may be overridden by following arguments to effectively toggle only this flag. |
| `DTA_CENTERBOTTOMOFFSET` | `bool use` | Same as `DTA_CENTERBOTTOMOFFSET`, but the Y offset is aligned to the bottom instead of the center. |
| `DTA_CENTEROFFSET` | `bool use` | Overrides the texture's X and Y offsets, centering them between the texture's height and width if `use` is `true`. |
| `DTA_CLEANNOMOVE1` | `bool use` | Sets `CleanMode` to `DTA_CLEANNOMOVE1` if `use` is `true`. |
| `DTA_CLEANNOMOVE` | `bool use` | Sets `CleanMode` to `DTA_CLEANNOMOVE` if `use` is `true`. |
| `DTA_CLEAN` | `bool use` | Sets `CleanMode` to `DTA_CLEAN` if `use` is `true`. |
| `DTA_CLIPBOTTOM`, `DTA_CLIPTOP` | `int length` | Sets the vertical clipping for the texture. |
| `DTA_CLIPLEFT`, `DTA_CLIPRIGHT` | `int length` | Sets the horizontal clipping for the texture. |
| `DTA_COLOROVERLAY` | `color cr` | Multiplies `cr` with the texture. Alpha determines the intensity of this overlay. Applied before render styles. |
| `DTA_COLOR` | `color cr` | Multiplies `cr` with the texture. Applied after render styles change the color. |
| `DTA_DESATURATE` | `int amount` | Desaturates the texture by `amount` (range 0-255.) |
| `DTA_DESTHEIGHTF`, `DTA_DESTWIDTHF` | `double size` | Same as `DTA_DESTHEIGHT`/`DTA_DESTWIDTH`, but with decimal arguments. |
| `DTA_DESTHEIGHT`, `DTA_DESTWIDTH` | `int size` | Sets the resulting width or height on screen of the texture and sets `CleanMode` to `DTA_BASE`. |
| `DTA_FILLCOLOR` | `color cr` | Sets the render style to "stencil" if one is not specified and the fill color to `cr`. |
| `DTA_FLIPX`, `DTA_FLIPY` | `bool use` | Flips the X or Y position if `use` is `true`.
| `DTA_FULLSCREEN` | `bool use` | Sets `CleanMode` to `DTA_FULLSCREEN` and the virtual width and height to the display size of the texture. |
| `DTA_HUDRULES` | `int type` | Sets `CleanMode` to `DTA_HUDRULESC` if `type` is `BaseStatusBar.HUD_HORIZCENTER`, or `DTA_HUDRULES` if it is `BaseStatusBar.HUD_NORMAL`. |
| `DTA_KEEPRATIO` | `bool on` | Enables aspect ratio correction if `on` is `true`. |
| `DTA_LEFTOFFSETF`, `DTA_TOPOFFSETF` | `double ofs` | Same as `DTA_LEFTOFFSET`/`DTA_TOPOFFSETF`, but with decimal arguments. |
| `DTA_LEFTOFFSET`, `DTA_TOPOFFSET` | `int ofs` | Overrides the texture's X or Y offset. |
| `DTA_LEGACYRENDERSTYLE` | `int style` | Overrides the render style. Note that there is also a `DTA_RENDERSTYLE` which cannot be used because the engine does not expose `FRenderStyle` yet. |
| `DTA_MASKED` | `bool on` | Turns the texture fully opaque (no alpha mask) if `on` is `false`. Default value is on. |
| `DTA_SRCHEIGHT`, `DTA_SRCWIDTH` | `int size` | Sets the width or height of the source image. Will cut the texture if lower than the original size. If the size is larger than the original, it will cause UV clamping, repeating the pixels at the image borders. |
| `DTA_SRCX`, `DTA_SRCY` | `int pos` | Sets the X or Y on the source image to start the texture at. Texture wrapping will cause a UV clamping effect, repeating the pixels at the image borders. |
| `DTA_TRANSLATIONINDEX` | `int index` | Remaps colors in the destination texture with translation table `index`. |
| `DTA_VIRTUALHEIGHTF`, `DTA_VIRTUALWIDTHF` | `double size` | Same as `DTA_VIRTUALHEIGHT`/`DTA_VIRTUALWIDTH`, but with decimal arguments. |
| `DTA_VIRTUALHEIGHT`, `DTA_VIRTUALWIDTH` | `int size` | Sets the virtual width or height to `size`. |
| `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. |

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.
### `Clear`

- `Dim`
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.

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.
### `Dim`

- `DrawFrame`
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 frame around a rectangle at `x y` of `w h` size in screen
coordinates, using the border graphics as defined in `MAPINFO`/GameInfo.
### `DrawFrame`

- `DrawLine`
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 one pixel wide line from `x0 y0` to `x1 y1` in screen coordinates of
color `cr` with alpha `alpha` (range 0-255.)
### `DrawLine`

- `DrawThickLine`
Draws a one pixel wide line from `x0 y0` to `x1 y1` in screen coordinates of
color `cr` with alpha `alpha` (range 0-255.)

Draws a `thickness` pixel wide line from `x0 y0` to `x1 y1` in screen
coordinates of color `cr` with alpha `alpha` (range 0-255.)
### `DrawThickLine`

- `GetAspectRatio`
Draws a `thickness` pixel wide line from `x0 y0` to `x1 y1` in screen
coordinates of color `cr` with alpha `alpha` (range 0-255.)

Returns the aspect ratio of the screen.
### `GetAspectRatio`

- `GetHeight`
Returns the aspect ratio of the screen.

Returns the height of the screen.
### `GetHeight`

- `GetWidth`
Returns the height of the screen.

Returns the width of the screen.
### `GetWidth`

- `PaletteColor`
Returns the width of the screen.

Returns a `color` for a given palette index.
### `PaletteColor`

- `VirtualToRealCoords`
Returns a `color` for a given palette index.

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.
### `VirtualToRealCoords`

- `ClearClipRect`
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.

Clears the clipping rectangle if there is one.
### `ClearClipRect`

- `GetClipRect`
Clears the clipping rectangle if there is one.

Returns the clipping rectangle's `x`/`y`/`w`/`h`.
### `GetClipRect`

- `GetViewWindow`
Returns the clipping rectangle's `x`/`y`/`w`/`h`.

Returns the 3D viewing window, which may be smaller than the screen size
with any given `screenblocks` setting.
### `GetViewWindow`

- `SetClipRect`
Returns the 3D viewing window, which may be smaller than the screen size with
any given `screenblocks` setting.

Sets the clipping rectangle to restrict further drawing to the region
starting at `x y` of size `w h` in screen coordinates.
### `SetClipRect`

Sets the clipping rectangle to restrict further drawing to the region starting
at `x y` of size `w h` in screen coordinates.

<!-- EOF -->

+ 13
- 13
api/drawing/Shape2D.md View File

@@ -12,26 +12,26 @@ class Shape2D : Object
}
```

- `Clear`
### `Clear`

Clears data out of a shape. Uses these as a bit flag:
Clears data out of a shape. Uses these as a bit flag:

| Name | Description |
| ---- | ----------- |
| `Shape2D.C_Coords` | Clears texture coordinates. |
| `Shape2D.C_Indices` | Clears vertex indices. |
| `Shape2D.C_Verts` | Clears vertices. |
| Name | Description |
| ---- | ----------- |
| `Shape2D.C_Coords` | Clears texture coordinates. |
| `Shape2D.C_Indices` | Clears vertex indices. |
| `Shape2D.C_Verts` | Clears vertices. |

- `PushCoord`
### `PushCoord`

Pushes a texture coordinate into the shape buffer.
Pushes a texture coordinate into the shape buffer.

- `PushTriangle`
### `PushTriangle`

Pushes the indices of a triangle into the shape buffer.
Pushes the indices of a triangle into the shape buffer.

- `PushVertex`
### `PushVertex`

Pushes a vertex into the shape buffer.
Pushes a vertex into the shape buffer.

<!-- EOF -->

+ 63
- 64
api/drawing/TexMan.md View File

@@ -19,91 +19,90 @@ 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 |
| ---- | ----------- |
| `TexMan.TYPE_ANY` | Any kind of texture. |
| `TexMan.TYPE_AUTOPAGE` | Unused. |
| `TexMan.TYPE_BUILD` | Unused. |
| `TexMan.TYPE_DECAL` | A decal pic defined in `DECALDEF`. |
| `TexMan.TYPE_FIRSTDEFINED` | The first composite texture defined by the IWad. |
| `TexMan.TYPE_FLAT` | A flat (ceiling/floor texture,) i.e. `FLOOR0_1`. |
| `TexMan.TYPE_FONTCHAR` | Unused. |
| `TexMan.TYPE_MISCPATCH` | A loose graphic, i.e. `M_DOOM`. |
| `TexMan.TYPE_NULL` | Reserved for the null graphic. Ignores `name`. |
| `TexMan.TYPE_OVERRIDE` | Overridable generalized textures, for instance textures defined in `TX_START` or BUILD ART tiles. |
| `TexMan.TYPE_SKINGRAPHIC` | Any loose graphic defined in `S_SKIN` i.e. statusbar faces. |
| `TexMan.TYPE_SKINSPRITE` | Any sprite defined in `S_SKIN`. |
| `TexMan.TYPE_SPRITE` | A sprite in `S_START`, i.e. `MEDIA0`. |
| `TexMan.TYPE_WALLPATCH` | An uncomposited patch, i.e. `DOOR2_1`. |
| `TexMan.TYPE_WALL` | Any composited wall texture, i.e. `STARTAN2`. |
| Name | Description |
| ---- | ----------- |
| `TexMan.TYPE_ANY` | Any kind of texture. |
| `TexMan.TYPE_AUTOPAGE` | Unused. |
| `TexMan.TYPE_BUILD` | Unused. |
| `TexMan.TYPE_DECAL` | A decal pic defined in `DECALDEF`. |
| `TexMan.TYPE_FIRSTDEFINED` | The first composite texture defined by the IWad. |
| `TexMan.TYPE_FLAT` | A flat (ceiling/floor texture,) i.e. `FLOOR0_1`. |
| `TexMan.TYPE_FONTCHAR` | Unused. |
| `TexMan.TYPE_MISCPATCH` | A loose graphic, i.e. `M_DOOM`. |
| `TexMan.TYPE_NULL` | Reserved for the null graphic. Ignores `name`. |
| `TexMan.TYPE_OVERRIDE` | Overridable generalized textures, for instance textures defined in `TX_START` or BUILD ART tiles. |
| `TexMan.TYPE_SKINGRAPHIC` | Any loose graphic defined in `S_SKIN` i.e. statusbar faces. |
| `TexMan.TYPE_SKINSPRITE` | Any sprite defined in `S_SKIN`. |
| `TexMan.TYPE_SPRITE` | A sprite in `S_START`, i.e. `MEDIA0`. |
| `TexMan.TYPE_WALLPATCH` | An uncomposited patch, i.e. `DOOR2_1`. |
| `TexMan.TYPE_WALL` | Any composited wall texture, i.e. `STARTAN2`. |

`flags` may be any of the following combined (with the bitwise OR operator
`|`:)
`flags` may be any of the following combined (with the bitwise OR operator
`|`:)

| Name | Description |
| ---- | ----------- |
| `TexMan.ALLOWSKINS` | Allows `SkinGraphic`s to be returned under normal circumstances. |
| `TexMan.DONTCREATE` | Will never create a new texture when searching. |
| `TexMan.LOCALIZE` | TODO . |
| `TexMan.OVERRIDABLE` | Allows overriding of this texture by for instance `TEXTURES`. |
| `TexMan.RETURNFIRST` | Allows returning the `FirstDefined` "null" texture under normal circumstances. |
| `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. |
| Name | Description |
| ---- | ----------- |
| `TexMan.ALLOWSKINS` | Allows `SkinGraphic`s to be returned under normal circumstances. |
| `TexMan.DONTCREATE` | Will never create a new texture when searching. |
| `TexMan.LOCALIZE` | TODO . |
| `TexMan.OVERRIDABLE` | Allows overriding of this texture by for instance `TEXTURES`. |
| `TexMan.RETURNFIRST` | Allows returning the `FirstDefined` "null" texture under normal circumstances. |
| `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`.
Returns the original name of a `textureid`.

- `GetScaledOffset`
### `GetScaledOffset`

Returns the offsets for this texture used to display it (rather than the
original offsets.)
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`.
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
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 |
| ---- | ----------- |
| `TexMan.NOT_BOTTOM` | Filters out linedef bottom textures. |
| `TexMan.NOT_CEILING` | Filters out ceiling flats. |
| `TexMan.NOT_FLAT` | Filters out any flat texture. |
| `TexMan.NOT_FLOOR` | Filters out floor flats. |
| `TexMan.NOT_MIDDLE` | Filters out linedef middle textures. |
| `TexMan.NOT_TOP` | Filters out linedef upper textures. |
| `TexMan.NOT_WALL` | Filters out any linedef texture. |
| Name | Description |
| ---- | ----------- |
| `TexMan.NOT_BOTTOM` | Filters out linedef bottom textures. |
| `TexMan.NOT_CEILING` | Filters out ceiling flats. |
| `TexMan.NOT_FLAT` | Filters out any flat texture. |
| `TexMan.NOT_FLOOR` | Filters out floor flats. |
| `TexMan.NOT_MIDDLE` | Filters out linedef middle textures. |
| `TexMan.NOT_TOP` | Filters out linedef upper textures. |
| `TexMan.NOT_WALL` | Filters out any linedef texture. |

<!-- EOF -->

+ 15
- 15
api/drawing/TextureID.md View File

@@ -15,31 +15,31 @@ struct TextureID
}
```

- `Exists`
### `Exists`

Checks if the texture exists within the texture manager at all.
Checks if the texture exists within the texture manager at all.

- `IsNull`
### `IsNull`

Checks if the texture is the null index (`0`.)
Checks if the texture is the null index (`0`.)

- `IsValid`
### `IsValid`

Checks if the texture index is not the invalid index (`-1`.)
Checks if the texture index is not the invalid index (`-1`.)

- `SetInvalid`
### `SetInvalid`

Sets the texture index to `-1`.
Sets the texture index to `-1`.

- `SetNull`
### `SetNull`

Sets the texture index to `0`.
Sets the texture index to `0`.

The proper way to zero-initialize a `textureid` is:
The proper way to zero-initialize a `textureid` is:

```
textureid tex;
tex.SetNull();
```
```
textureid tex;
tex.SetNull();
```

<!-- EOF -->

+ 13
- 13
api/events/ConsoleEvent.md View File

@@ -12,25 +12,25 @@ 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
`ConsoleProcess` events.
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.
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.

- `Args`
### `Args`

The arguments as provided to `SendNetworkEvent`.
The arguments as provided to `SendNetworkEvent`.

- `IsManual`
### `IsManual`

`true` if this event was created manually, for instance through a console
command.
`true` if this event was created manually, for instance through a console
command.

<!-- EOF -->

+ 7
- 7
api/events/EventHandler.md View File

@@ -20,15 +20,15 @@ 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.
Sends a network event with no activator.

<!-- EOF -->

+ 15
- 15
api/events/RenderEvent.md View File

@@ -14,31 +14,31 @@ struct RenderEvent
}
```

- `ViewPos`
### `ViewPos`

The position at which the camera is at.
The position at which the camera is at.

- `ViewAngle`
### `ViewAngle`

The yaw angle of the camera.
The yaw angle of the camera.

- `ViewPitch`
### `ViewPitch`

The pitch angle of the camera.
The pitch angle of the camera.

- `ViewRoll`
### `ViewRoll`

The roll angle of the camera.
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.
The actor which is acting as the camera for the player's view.

<!-- EOF -->

+ 9
- 9
api/events/ReplaceEvent.md View File

@@ -12,19 +12,19 @@ struct ReplaceEvent
}
```

- `Replacee`
### `Replacee`

The actor class which is being replaced.
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 -->

+ 115
- 116
api/events/StaticEventHandler.md View File

@@ -64,186 +64,185 @@ 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`.
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.
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.
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.
Called directly after `UNLOADING` ACS scripts, just before the level is
changed.

- `WorldThingSpawned`
### `WorldThingSpawned`

Called directly after an actor's `PostBeginPlay` function.
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.
Called when an actor is revived, after everything is finished.

- `WorldThingDamaged`
### `WorldThingDamaged`

Called directly before `Die`, or directly after after `DamageMobj` finishes.
Called directly before `Die`, or directly after after `DamageMobj` finishes.

- `WorldThingDestroyed`
### `WorldThingDestroyed`

Called at the beginning of an actor's `OnDestroy` function.
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.)
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.)

- `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.
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
players have run their thinkers, just before the status bar is ticked, the
level ticks, thinkers are ticked, and the level time is updated. This is not
called when the game is paused, and its execution is entirely deterministic
regardless of how this event handler is applied.
Called on every world tick, after interpolators are updated, world freeze is
updated, sight counters are reset, particles have run their thinkers, and
players have run their thinkers, just before the status bar is ticked, the
level ticks, thinkers are ticked, and the level time is updated. This is not
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.
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.

- `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.
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.

- `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.
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.

- `PostUiTick`
### `PostUiTick`

Similar to `UiTick`, this is also deterministic, but called after all other
tickers.
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.
Called when network events which have no player activator are received.

- `NetworkProcess`
### `NetworkProcess`

Called when network events which have a player activator are received.
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.)
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`.
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`.
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`.

- `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.
If `true`, mouse events will be sent to this event handler through
`InputProcess` and/or `UiProcess`. This is mainly for optimization purposes.

<!-- EOF -->

+ 28
- 28
api/files/Wads.md View File

@@ -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`.
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`.

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.
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.
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.

<!-- EOF -->

+ 58
- 58
api/global/data/Client.md View File

@@ -32,109 +32,109 @@ readonly ui bool NetGame;
int LocalViewPitch;
```

- `AutomapBindings`
### `AutomapBindings`

TODO
TODO

- `Bindings`
### `Bindings`

TODO
TODO

- `BigFont`
### `BigFont`

The `bigfont` for the current game.
The `bigfont` for the current game.

- `CleanHeight`
### `CleanHeight`

The current screen height divided by `CleanYFac`. **Not deterministic.**
The current screen height divided by `CleanYFac`. **Not deterministic.**

- `CleanHeight_1`
### `CleanHeight_1`

The current screen height divided by `CleanYFac_1`. **Not deterministic.**
The current screen height divided by `CleanYFac_1`. **Not deterministic.**

- `CleanWidth`
### `CleanWidth`

The current screen width divided by `CleanXFac`. **Not deterministic.**
The current screen width divided by `CleanXFac`. **Not deterministic.**

- `CleanWidth_1`
### `CleanWidth_1`

The current screen width divided by `CleanYFac_1`. **Not deterministic.**
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.**
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.**
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.
The console font.

- `IntermissionFont`
### `IntermissionFont`

The font used in intermission screens.
The font used in intermission screens.

- `SmallFont`
### `SmallFont`

The `smallfnt` for the current game.
The `smallfnt` for the current game.

- `SmallFont2`
### `SmallFont2`

The alternate `smallfnt`.
The alternate `smallfnt`.

- `NewConsoleFont`