text:
<!-- vim-markdown-toc GFM -->

* [Expressions and Operators](#expressions-and-operators)
* [Literals](#literals)
	* [String literals](#string-literals)
	* [Class type literals](#class-type-literals)
	* [Name literals](#name-literals)
	* [Integer literals](#integer-literals)
	* [Float literals](#float-literals)
	* [Boolean literals](#boolean-literals)
	* [Null pointer](#null-pointer)
* [Expressions](#expressions)
	* [Primary expressions](#primary-expressions)
		* [Vector literals](#vector-literals)
	* [Postfix expressions](#postfix-expressions)
		* [Argument list](#argument-list)
	* [Unary expressions](#unary-expressions)
	* [Binary expressions](#binary-expressions)
		* [Assignment expressions](#assignment-expressions)
	* [Ternary expression](#ternary-expression)

<!-- vim-markdown-toc -->

# Expressions and Operators

TODO

# Literals

Much like C or most other programming languages, ZScript has object literals,
including string literals, integer literals, float literals, name literals,
boolean literals, and the null pointer.

## String literals

String literals take the same form as in C:

```
"text here"
```

String literals have character escapes, which are formed with a backslash and a
character. Character escapes include:

| Spelling                | Output                                          |
| --------                | ------                                          |
| `\"`                    | A literal `"`.                                  |
| `\\`                    | A literal `\`.                                  |
| `\` followed by newline | Concatenates the next line with this one.       |
| `\a`                    | Byte `0x07` (`BEL` - bell, anachronism.)        |
| `\b`                    | Byte `0x08` (`BS` - backspace, anachronism.)    |
| `\c`                    | Byte `0x1c` (`TEXTCOLOR_ESCAPE`.)               |
| `\f`                    | Byte `0x0c` (`FF` - form feed, anachronism.)    |
| `\n`                    | Byte `0x0a` (`LF` - new line.)                  |
| `\t`                    | Byte `0x09` (`HT` - tab.)                       |
| `\r`                    | Byte `0x0d` (`CR` - return.)                    |
| `\v`                    | Byte `0x0b` (`VT` - vertical tab, anachronism.) |
| `\?`                    | A literal `?` (obsolete anachronism.)           |
| `\xnn` or `\Xnn`        | Byte `0xnn`.                                    |
| `\nnn`                  | Byte `0nnn` (octal.)                            |

To quote [cppreference][1], "of the octal escape sequences, `\0` is the most
useful because it represents the terminating null character in null-terminated
strings."

String literals, also like C and C++, will be concatenated when put directly
next to each other. For example, this:

```
"text 1" "text 2"
```

Will be parsed as a single string literal with the text `"text 1text 2"`.

[1]: https://en.cppreference.com/w/cpp/language/escape

## Class type literals

Class type literals take the same form as string literals, but do note that
they are not the same.

## Name literals

Name literals are similar to string literals, though they use apostrophes
instead of quote marks:

```
'text here'
```

They do not concatenate like string literals, and do not have character
escapes.

## Integer literals

Integer literals are formed similarly to C. They may take one of three forms,
and be typed `uint` or `int` based on whether there is a `u` or `U` at the end
or not.

The parser also supports an optional `l`/`L` suffix as in C, though it does not
actually do anything, and it is advised you do not use it for potential forward
compatibility purposes.

Integer literals can be in the basic base-10/decimal form:

```
1234567890 // int
500u       // uint
```

Base-16/hexadecimal form, which may use upper- or lower-case decimals and `0x`
prefix, depending on user preference:

```
0x123456789ABCDEF0
0XaBcDeF0 // don't do this, please.
0x7fff
0x7FFFFFFF
```

And, base-8/octal form, prefixed with a `0`:

```
0777
0414444
```

## Float literals

Float literals, much like integer literals, are formed similarly to C, but they
do not support hex-float notation. Float literals support exponent notation.

The parser supports an optional `f`/`F` suffix as in C, though it does not
actually do anything, and it is advised you do not use it for potential forward
compatibility purposes.

Float literals can be formed in a few ways:

```
0.5 //=> 0.5
.5  //=> 0.5
1.  //=> 1.0
```

And with exponents:

```
0.5e+2 //=> 50
50e-2  //=> 0.5
```

## Boolean literals

The two boolean literals are spelled `false` and `true`, and much like C, can
decay to the integer literals `0` and `1`.

## Null pointer

The null pointer literal is spelled `null` and represents an object that does
not exist in memory. Like C, it is not equivalent to the integer literal `0`,
and is more similar to C++'s `nullptr`.

# Expressions

Expressions contain literals or other such *expressions* of objects, including
arithmetic and various conditions.

## Primary expressions

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.

Identifiers work as you expect, they reference a variable or constant. The
`Super` keyword references the parent type or any member within it.

### Vector literals

Vector literals are not under object literals as they are not constants in the
same manner as other literals, since they contain expressions within them. As
such, they are expressions, not proper value-based literals. They can be formed
with:

```
( X , Y )     //=> vector2, where X is not a vector2
( X , Y )     //=> vector3, where X *is* a vector2
( X , Y , Z ) //=> vector3
```

All components must have type `double`, except in the second grammar where `X`
is `vector2`.

## Postfix expressions

Postfix expressions are affixed at the end of an expression, and are used for a
large variety of things, although the actual amount of postfix expressions is
small:

| Form                       | Description                                                                                |
| ----                       | -----------                                                                                |
| `A ( $[Argument-list]$ )`  | Function call.                                                                                |
| `Type ( A )`               | Type cast.                                                                                |
| `( class < Type > ) ( A )` | Class type reference cast.                                                                       |
| `A [ B ]`                  | Array access.                                                                                |
| `A.B`                      | Member access.                                                                                |
| `A++`                      | Post-increment. This increments (adds 1 to) the object after the expression is evaluated.        |
| `A--`                      | Post-decrement. This decrements (subtracts 1 from) the object after the expression is evaluated. |

### Argument list

The syntax for an argument list is:

```
Expression $[ , Expression]$...
```

Function calls may name arguments which have defaults with the syntax
`Identifier : Expression`, possibly skipping over other defaulted arguments.
After the first named defaultable argument, all other arguments must be named
as well.

## Unary expressions

Unary expressions are affixed at the beginning of an expression. The simplest
example of a unary expression is the negation operator, `-`, as in `-500`.
Unary expressions include:

| Form        | Description                                                                           |
| ----        | -----------                                                                           |
| `- A`       | Negation.                                                                             |
| `! A`       | Logical negation, "not."                                                              |
| `++ A`      | Pre-increment. This adds 1 to the object and evaluates as the resulting value.        |
| `-- A`      | Pre-decrement. This subtracts 1 from the object and evaluates as the resulting value. |
| `~ A`       | Bitwise negation. Flips all bits in an integer.                                       |
| `+ A`       | Affirmation. Does not actually do anything.                                           |
| `alignof A` | Evaluates the alignment of the type of an expression. Unknown purpose.                |
| `sizeof A`  | Evaluates the size of the type of an expression. Unknown purpose.                     |

## Binary expressions

Binary expressions operate on two expressions, and are the most common kind of
expression. They are used inline like regular math syntax, i.e. `1 + 1`. Binary
expressions include:

| Form        | Description                                                                       |
| ----        | -----------                                                                       |
| `A + B`     | Addition.                                                                         |
| `A - B`     | Subtraction.                                                                      |
| `A * B`     | Multiplication.                                                                   |
| `A / B`     | Division quotient.                                                                |
| `A % B`     | Division remainder, also known as "modulus." Unlike C, this works on floats, too. |
| `A ** B`    | Exponent ("power of.")                                                            |
| `A << B`    | Left bitwise shift.                                                               |
| `A >> B`    | Right bitwise shift.                                                              |
| `A >>> B`   | Right unsigned bitwise shift.                                                     |
| `A cross B` | Vector cross-product.                                                             |
| `A dot B`   | Vector dot-product.                                                               |
| `A .. B`    | Concatenation, creates a string from two values.                                  |
| `A < B`     | `true` if `A` is less than `B`.                                                   |
| `A > B`     | `true` if `A` is greater than `B`.                                                |
| `A <= B`    | `true` if `A` is less than or equal to `B`.                                       |
| `A >= B`    | `true` if `A` is greater than or equal to `B`.                                    |
| `A == B`    | `true` if `A` is equal to `B`.                                                    |
| `A != B`    | `true` if `A` is not equal to `B`.                                                |
| `A ~== B`   | `true` if `A` is approximately equal to `B`. For strings this is a case-insensitive comparison, for floats and vectors this checks if the difference between the two is smaller than ε. |
| `A && B`    | `true` if `A` and `B` are both `true`.                                            |
| `A \|\| B`  | `true` if `A` or `B` is `true`.                                                   |
| `A is "B"`  | `true` if `A`'s type is equal to or a descendant of `B`.                          |
| `A <>= B`   | Signed difference between `A` and `B`.                                            |
| `A & B`     | Bitwise AND.                                                                      |
| `A ^ B`     | Bitwise XOR.                                                                      |
| `A \| B`    | Bitwise OR.                                                                       |
| `A :: B`    | Scope operator. Not implemented yet.                                              |

### Assignment expressions

Assignment expressions are a subset of binary expressions which *are never
constant expressions*. They assign a value to another value, as one might
guess.

| Form       | Description               |
| ----       | -----------               |
| `A = B`    | Assigns `B` to `A`.       |
| `A += B`   | Assigns `A + B` to `A`.   |
| `A -= B`   | Assigns `A - B` to `A`.   |
| `A *= B`   | Assigns `A * B` to `A`.   |
| `A /= B`   | Assigns `A / B` to `A`.   |
| `A %= B`   | Assigns `A % B` to `A`.   |
| `A <<= B`  | Assigns `A << B` to `A`.  |
| `A >>= B`  | Assigns `A >> B` to `A`.  |
| `A >>>= B` | Assigns `A >>> B` to `A`. |
| `A \|= B`  | Assigns `A \| B` to `A`.  |
| `A &= B`   | Assigns `A & B` to `A`.   |
| `A ^= B`   | Assigns `A ^ B` to `A`.   |

## Ternary expression

The ternary expression is formed `A ? B : C`, and will evaluate to `B` if `A`
is `true`, or `C` if it is `false`.

<!-- EOF -->


text:
<!-- 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.

A member declaration is formed as so:

```
$[Member-declaration-flags...]$ Type Variable-name $[ , Variable-name]$... ;
```

## Example: Member declarations

Some basic member variables.

```
// An integer. Visible to and modifiable by everything.
int m_MyCoolInt;

// Three separate integers, defined short-hand.
int m_CoolInt1, m_CoolInt2, m_CoolInt3;

// Ten integers in one variable.
int[10] m_CoolIntArray;

// Can only be seen by this type.
private int m_CoolPrivateInt;

// Read-only (part of the class data, can only be seen by descendant types.
protected meta int m_CoolMetaInt;
```

# Member Declaration Flags

| Flag                                    | Description                                                                                |
| ----                                    | -----------                                                                                |
| `deprecated ( "ver" $[ , "reason" ]$ )` | If accessed, a script warning will occur on load if the archive version is greater than `ver`, with the reason `reason` specified in the message. |
| `internal`                              | Member is only writable from the base resource archive (`gzdoom.pk3`.) *Version 3.4.0 and newer.*                                              |
| `latent`                                | Does nothing. Purpose unknown.                                                                                |
| `meta`                                  | Member is read-only static class data. Only really useful on actors, since these can be set via properties on them.                               |
| `native`                                | Member is from the engine. Only usable internally.                                                                                |
| `play`                                  | Member has Play scope.                                                                                |
| `private`                               | Member is not visible to any class but this one.                                                                                |
| `protected`                             | Member is not visible to any class but this one and any descendants of it.                                                                            |
| `readonly`                              | Member is not writable.                                                                                |
| `transient`                             | Member is not saved into save games. Required for unserializable objects and recommended for UI context objects.                                    |
| `ui`                                    | Member has UI scope.                                                                                |
| `version ( "ver" )`                     | Restricted to ZScript version `ver` or higher.                                                                                |

<!-- EOF -->

repo_name: zdoom-docs/stable

repo_language: Ruby

mime_type: text/x-ruby


text:
<!-- 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
implicit pseudo-type `Pointer<T>`, and `null` can be passed in their place.
Also note that this means the engine can return `null` structures. Non-native
structures cannot be passed as arguments or returned normally.

Structures are preferred for basic compound data types that do not need to be
instanced and are often used as a way of generalizing code. They cannot be
returned from functions.

Structures are subject to Scoping.

A structure takes the form of:

```
struct Identifier $[Structure-flags...]$
{
	$[Structure-content...]$
}
```

Optionally followed by a semicolon.

## Example: Structure definitions

```
// Simple structure.
struct MyCoolStructure
{
	int X;
	int Y;
	int Z;
}
```

# Structure Flags

| Flag                | Description                                           |
| ----                | -----------                                           |
| `clearscope`        | Structure has Data scope. Default.                    |
| `native`            | Structure is from the engine. Only usable internally. |
| `play`              | Structure has Play scope.                             |
| `ui`                | Structure has UI scope.                               |
| `version ( "ver" )` | Restricted to ZScript version `ver` or higher.        |

# Structure Content

Structure contents are an optional list of various things logically contained
within the structure, including:

* Member declarations
* Method definitions
* Enumeration definitions
* Constant definitions

<!-- EOF -->


text:
<!-- 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)
* [Vectors](#vectors)
* [Fixed-size Arrays](#fixed-size-arrays)
* [Dynamic-size Arrays](#dynamic-size-arrays)
* [Maps](#maps)
* [Class Types](#class-types)
* [User Types](#user-types)
* [Read-only Types](#read-only-types)
* [Other Types](#other-types)
* [Variable Name](#variable-name)
* [Array Size](#array-size)

<!-- 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
are used.

Types determine what kind of value an object stores, how it acts within an
expression, etc. All objects, constants and enumerations have a type. Argument
lists use types to ensure a function is used properly.

Most basic types have methods attached to them, and both integer and
floating-point type names have symbols accessible from them. See the API
section for more information.

# Integer Types

Integer types are basic integral numbers. They include:

| Name     | Usable as argument | Bits | Lowest value   | Highest value |
| ----     | :----------------: | :--: | -----------:   | :------------ |
| `int`    | Yes                | 32   | -2,147,483,648 | 2,147,483,647 |
| `uint`   | Yes                | 32   | 0              | 4,294,967,296 |
| `int16`  | No                 | 16   | -32,768        | 32,767        |
| `uint16` | No                 | 16   | 0              | 65,535        |
| `int8`   | No                 | 8    | -128           | 127           |
| `uint8`  | No                 | 8    | 0              | 255           |

Some types have aliases as well:

| Name     | Aliases  |
| ----     | -------  |
| `sbyte`  | `int8`   |
| `byte`   | `uint8`  |
| `short`  | `int16`  |
| `ushort` | `uint16` |

## Symbols

Integer types have symbols attached which can be accessed by `typename.name`,
for instance `int.Max`.

### `Max`

Maximum value of type.

### `Min`

Minimum value of type.

# Floating-point Types

Floating-point types hold exponents, generally represented as regular decimal
numbers. There are two such types available to ZScript:

| Name      | Usable as argument | Notes                                                              |
| ----      | :----------------: | -----                                                              |
| `double`  | Yes                | 64-bit floating-point number.                                      |
| `float`   | Yes (64 bits)      | 32-bit in structures and classes, 64-bit otherwise.                |
| `float64` | Yes                | Alias for `double`.                                                |
| `float32` | No                 | 32-bit floating-point number. Not implemented correctly, unusable. |

## Symbols

Floating-point types have symbols attached which can be accessed by
`typename.name`, for instance `double.Infinity`.

### `Dig`

Number of decimal digits in type.

### `Epsilon`

ε value of type.

### `Infinity`

∞ value of type.

### `Mant_Dig`

Number of mantissa bits in type.

### `Max`

Maximum value of type.

### `Max_Exp`

Maximum exponent bits value of type.

### `Max_10_Exp`

Maximum exponent of type.

### `Min_Denormal`

Minimum positive subnormal value of type.

### `Min_Exp`

Minimum exponent bits value of type.

### `Min_Normal`

Minimum value of type.

### `Min_10_Exp`

Minimum exponent of type.

### `NaN`

Not-a-Number value of type.

# Strings

| Name     | Usable as argument |
| ----     | :----------------: |
| `string` | Yes                |

The `string` type is a mutable, garbage-collected string reference type.
Strings are not structures or classes, however there are methods attached to
the type, detailed in the API section.

# Names

| Name   | Usable as argument |
| ----   | :----------------: |
| `name` | Yes                |

The `name` type is an indexed string. While their contents are the same as a
string, their actual value is merely an integer which can be compared far
quicker than a string. Names are used for many internal purposes such as damage
type names. Strings are implicitly cast to names.

Names can be converted to `int` with an explicit cast, and the negative of
`int(name())` may be used to create an integer representation of a string
usable by action specials, most prominently `Acs_NamedExecute`.

# Colors

| Name    | Usable as argument |
| ----    | :----------------: |
| `color` | Yes                |

The `color` type can be converted from a string using the `X11RGB` lump or a
hex color in the format `#RRGGBB`, or with either of:

```
color(R, G, B)
color(A, R, G, B)
```

# Vectors

| Name      | Usable as argument |
| ----      | :----------------: |
| `vector2` | Yes                |
| `vector3` | Yes                |

There are two vector types in ZScript, `vector2` and `vector3`, which hold two
and three members, respectively. Their members can be accessed through `x`, `y`
and (for `vector3`,) `z`. `vector3` can additionally get the X and Y components
as a `vector2` with `xy`.

Vectors can use many operators and even have special ones to themselves. See
the Expressions and Operators section for more information.

# Fixed-size Arrays

| Name              | Usable as argument |
| ----              | :----------------: |
| `Type Array-size` | No                 |

Fixed-size arrays take the form `Type[size]`. They hold `size` number of `Type`
elements, which can be accessed with the array access operator.

Multi-dimensional arrays are also supported, although the dimensions will be
backwards (right to left instead of left to right) unless `version` is `3.7.2`
or greater.

Note that this kind of type can also be declared in variable names themselves.

# Dynamic-size Arrays

| Name             | Usable as argument |
| ----             | :----------------: |
| `array < Type >` | Yes                |

Dynamically sized arrays take the form `array<Type>`, and hold an arbitrary
number of `Type` elements, which can be accessed with the array access
operator.

Dynamic-sized arrays do not have their lifetime scoped to their current block,
so the following:

```
for(int i = 0; i < 5; i++)
{
	array<int> a;
	a.Push(0);
}
```

Will result in an array with 5 elements.

Dynamically sized arrays also cannot store other dynamically sized arrays, or
user-defined `struct` objects.

# Maps

| Name                  | Usable as argument |
| ----                  | :----------------: |
| `map < Type , Type >` | No                 |

Map types take the form `map<Type, Type>`. They are not yet implemented.

# Class Types

| Name             | Usable as argument |
| ----             | :----------------: |
| `class < Type >` | Yes                |
| `class`          | Yes                |

Class type references are used to describe a concrete *type* rather than an
object. They simply take the form `class`, and can be restrained to descendants
of a type with the syntax `class<Type>`. Strings are implicitly cast to class
type references.

# User Types

| Name                         | Usable as argument |
| ----                         | :----------------: |
| Any class object             | Yes                |
| Native `struct` object       | Yes                |
| User-defined `struct` object | No                 |
| `@ Type`                     | Yes                |

Any other identifier used as a type will resolve to a user class, structure or
enumeration type.

Types prefixed with `@` are native pointers to objects (as opposed to objects
placed directly in the structure's data.) This is not usable in user code.

A type name that is within a specific scope can be accessed by prefixing it
with a `.`. The type `.MyClass.MySubStructure` will resolve to the type
`MySubStructure` contained within `MyClass`.

# Read-only Types

| Name                | Usable as argument |
| ----                | :----------------: |
| `readonly < Type >` | Yes                |

A read-only type, as its name implies, may only be read from, and is
effectively immutable. They take the form `readonly<Type>`. Do note that this
is separate from the member declaration flag.

# Other Types

| Name         | Usable as argument | Description                                                     |
| ----         | :----------------: | -----------                                                     |
| `bool`       | Yes                | Holds one of two values: `true` or `false`.                     |
| `sound`      | Yes                | Holds a sound reference.                                        |
| `spriteid`   | Yes                | Holds a sprite reference.                                       |
| `state`      | Yes                | A reference to an actor state.                                  |
| `statelabel` | Yes                | The name of an actor state.                                     |
| `textureid`  | Yes                | Holds a texture reference.                                      |
| `void`       | No                 | Alias for `None`. Unknown purpose, likely implementation error. |
| `voidptr`    | No                 | A pointer to a real memory address. Implementation detail.      |

Strings will implicitly convert to `sound` and `statelabel`.

# Variable Name

Variable names can have an array's size on them, instead of on the type, or
none. Variable names are formed as either:

```
Identifier
Identifier Array-size
```

# Array Size

Array sizes can be multi-dimensional or automatically sized, so all of the
following syntaxes are available:

```
[ ]
[ Expression ] $[Array-size...]$
```

<!-- EOF -->


text:
<!-- vim-markdown-toc GFM -->

* [Statements](#statements)
* [Compound Statements](#compound-statements)
* [Expression Statements](#expression-statements)
	* [Example: Expression statements](#example-expression-statements)
* [Conditional Statements](#conditional-statements)
	* [Example: Conditional statements](#example-conditional-statements)
* [Switch Statements](#switch-statements)
	* [Example: Switch statements](#example-switch-statements)
* [Loop Statements](#loop-statements)
* [Control Flow Statements](#control-flow-statements)
	* [Example: Control flow statements](#example-control-flow-statements)
* [Local Variable Statements](#local-variable-statements)
* [Multi-assignment Statements](#multi-assignment-statements)
	* [Example: Multi-assignment statements](#example-multi-assignment-statements)
* [Static Array Statements](#static-array-statements)
* [Null Statements](#null-statements)

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

# Compound Statements

A compound statement is formed as:

```
{
	$[Statement...]$
}
```

Note that the statement list is optional, so an empty compound statement `{}`
is entirely valid.

# Expression Statements

An expression statement is the single most common type of statement in just
about any programming language. In ZScript, exactly like C and C++, an
expression statement is simply formed with any expression followed by a
semicolon. Function calls and variable assignments are expressions, for
instance, so it is quite clear why they are common.

Their syntax is:

```
Expression ;
```

## Example: Expression statements

```
// Some basic expressions.
MyCoolFunction(5, 4);
m_MyCoolMember = 500;

// Does nothing, of course, but valid.
5 * 5;
```

# Conditional Statements

A conditional statement will, conditionally, choose a statement (or none) to
execute. They work the same as in C and ACS:

```
if ( Expression ) Statement $[ else Statement]$
```

## Example: Conditional statements

```
// Simple conditional.

if(a)
	B();

// Simple conditional, with else statement and a block.

if(a)
{
	B();
	c = d;
}
else
	e = f;
```

# Switch Statements

A switch statement takes an expression of integer or name type and selects a
labeled statement to run. They work the same as in C and ACS:

```
switch ( Expression ) Statement
```

## Example: Switch statements

```
// A switch demonstrating fall-through and default cases.

switch(a)
{
case 500:
	Console.PrintF("a is 500");
	break;
case 501:
	Console.PrintF("a is 501");
	// Falls through to the next case.
case 502:
	Console.PrintF("a is 501 or 502");
	break;
default:
	Console.PrintF("not sure what a is!");
	// "break" is implied here.
}
```

# Loop Statements

ZScript has five loop statements, `for`, `while`, `until`, `do while` and `do
until`. `for`, `while` and `do while` work the same as in C, C++ and ACS, while
`until` and `do until` do the inverse of `while` and `do while`.

The `for` loop takes a limited statement and two optional expressions: The
statement for when the loop begins (which is scoped to the loop,) one
expression for checking if the loop should break, and one which is executed
every time the loop iterates. Its syntax is:

```
for ( $[Expression-or-Local-variable-statement]$ ; $[Expression]$ ; $[Expression]$ ) Statement
```

The `while` loop simply takes one expression for checking if the loop should
break, equivalent to `for(; a;)`.

The `until` loop is equivalent to `while(!a)`. Their syntax are:

```
while ( Expression ) Statement
until ( Expression ) Statement
```

`do while` and `do until` will only check the expression after the first
iteration is complete. The `do while` and `do until` loops are formed as such:

```
do
	Statement
while ( Expression ) // unlike C, you don't need a semicolon here

do
	Statement
until ( Expression )
```

# Control Flow Statements

As in C, there are three control flow statements that manipulate where the
program will execute statements next, which are available contextually. They
are `continue`, `break` and `return`.

`continue` is available in loop statements and will continue to the next
iteration immediately:

```
continue ;
```

`break` is available in loop statements and switch statements, and will break
out of the containing statement early:

```
break ;
```

`return` is available in functions. If the function does not return any values,
it may only be spelled `return;` and will simply exit the function early. If
the function does return values, it takes a comma-separated list for each value
returned:

```
return $[Expression $[ , Expression]$...]$ ;
```

## Example: Control flow statements

```
// Use of "continue."
for(int i = 0; i < 50; i++)
{
	// Don't do anything when "i" is 25.
	if(i == 25)
		continue;

	DoThing(i);
}

// Use of "break."
for(int i = 0; i < 50; i++)
{
	// "break" when "i" is 25.
	if(i == 25)
		break;

	DoThing(i);
}

// Use of `return` in various contexts.
void ReturnsNothing()
{
	// Exit early if "m_Thing" isn't 50.
	if(m_Thing != 50)
		return;

	DoThing(m_Thing);
}

int ReturnsInt()
{
	// "m_Thing" is 50, so return 50.
	if(m_Thing == 50)
		return 50;

	// Must have a return, eventually.
	return 0;
}

int, int ReturnsTwoInts()
{
	// Returns 1 and 2.
	return 1, 2;
}
```

# Local Variable Statements

Local variable statements are formed in one of 2 ways. The `let` keyword can be
used to automatically determine the type of the variable from the initializer,
while the regular syntax uses an explicit type, and initialization is optional.

Variables' syntax are one of:

```
Variable-name
Variable-name = Expression
```

And local variable statements have the syntax of either:

```
let Identifier = Expression ;
Type Variable $[ , Variable]$... ;
```

# Multi-assignment Statements

Expressions or functions that return multiple values can be assigned into
multiple variables with the syntax:

```
[ Expression $[ , Expression]$... ] = Expression ;
```

Note that the surrounding brackets are literal and not an optional element.

## Example: Multi-assignment statements

```
// Getting the actor out of "A_SpawnItemEx."
Actor mo; bool spawned; [spawned, mo] = A_SpawnItemEx("MyCoolActor");
```

# Static Array Statements

Static arrays can be defined normally as a statement.

# Null Statements

A null statement does nothing, and is formed `;`. It is similar to an empty
compound statement.

<!-- EOF -->


text:
<!-- 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)
	* [Action functions](#action-functions)

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

Methods marked as `virtual` may have their functionality overridden by derived
classes, and in those overrides one can use the `Super` keyword to call the
parent function.

Methods are formed as so:

```
$[Method-definition-flags...]$ Type $[ , Type]$... Identifier ( $[Method-argument-list]$ ) $[ const ]$
{
	$[Statement...]$
}
```

If `const` is placed after the function signature and before the function body,
the method will not be allowed to modify any members in the object instance
it's being called on.

The keyword `void` can be used in place of the return type (or type list) to
have a method which does not have any return value. Similarly, one can place
`void` where the argument list might be, although this is redundant as having
no argument list at all is allowed.

Arguments of methods may only be of certain types due to technical limitations.
See the type table for a list of which are usable and which are not.

All methods which are not `static` have an implicit `self` parameter which
refers to this object, although if you wish to refer to a member of `self`, you
do not need to reference it directly, as it is already implicitly in scope.

# Method Argument List

Method arguments must all have a name and type, and optionally the last
arguments in the list may have a default value, (*Version 3.3.0 and newer*)
except in functions marked `override`. The syntax is:

```
Type Variable-name $[ , Method-argument-list]$
Type Variable-name = Expression $[ , Method-argument-list]$
```

Or, the entire list may simply be `void` or empty.

## Example: Method argument lists

```
// With the function:
void DoSomething(int one, int two, int a = 0, int b = 0);

// One could do the following:
DoSomething(4, 5);
DoSomething(5, 6, 7);
DoSomething(6, 7, 8, 9);

// Or using named default arguments,
DoSomething(5, 6, a: 7);

// Equivalent to:
DoSomething(5, 6, 7);

// And more examples:
DoSomething(6, 7, b: 8);
DoSomething(7, 8, a: 9, b: 10);
DoSomething(7, 8, 9, 10);
```

# Method Definition Flags

| Flag                                    | Description                                                                                |
| ----                                    | -----------                                                                                |
| `action ( Scope )`                      | Same as `action`, but has a specified action scope. See "Action Scoping" for more information.                                                      |
| `action`                                | Method has implicit `invoker` and `stateinfo` parameters. See below for more info.                                                                  |
| `clearscope`                            | Method has Data scope.                                                                                |
| `deprecated ( "ver" $[ , "reason" ]$ )` | If accessed, a script warning will occur on load if the archive version is greater than `ver`, with the reason `reason` specified in the message. |
| `final`                                 | Virtual method cannot be further overridden from derived classes.                                                                                |
| `native`                                | Method is from the engine. Only usable internally.                                                                                |
| `override`                              | Method is overriding a base class' virtual method.                                                                                |
| `play`                                  | Method has Play scope.                                                                                |
| `private`                               | Method is not visible to any class but this one.                                                                                |
| `protected`                             | Method is not visible to any class but this one and any descendants of it.                                                                            |
| `static`                                | Function is not a method, but a global function without a `self` pointer.                                                                             |
| `ui`                                    | Method has UI scope.                                                                                |
| `vararg`                                | Method doesn't type-check arguments after `...`. Only usable internally.                                                                              |
| `version ( "ver" )`                     | Restricted to ZScript version `ver` or higher.                                                                                |
| `virtual`                               | Method can be overridden in derived classes.                                                                                |
| `virtualscope`                          | Method has scope of the type of the object it's being called on.                                                                                |

## Action functions

ZScript includes an extra method type for descendents of `Actor` called
*actions*, which are intended to be run from actor states and give extra
information to the function. Action functions change the meaning of the `self`
parameter and pass in `invoker` and `stateinfo` parameters as well. `stateinfo`
refers to the `State` which this action was called from. Here is a chart for
the meanings of the `self` and `invoker` variables under each scope:

| Scope     | `self` meaning                                                  | `invoker` meaning |
| -----     | --------------                                                  | ----------------- |
| None      | The actor this function operates on, ambiguous in some contexts | State owner       |
| `actor`   | The actor                                                       | The actor         |
| `item`    | Item owner                                                      | Item itself       |
| `overlay` | Weapon owner                                                    | Weapon itself     |
| `weapon`  | Weapon owner                                                    | Weapon itself     |

<!-- EOF -->


text:
<!-- vim-markdown-toc GFM -->

* [Class Definitions](#class-definitions)
	* [Example: Class headers](#example-class-headers)
	* [Example: Class definitions](#example-class-definitions)
* [Class Flags](#class-flags)
* [Class Content](#class-content)
* [Property Definitions](#property-definitions)
	* [Example: Property definitions](#example-property-definitions)
* [Flag Definitions](#flag-definitions)
	* [Example: Flag definitions](#example-flag-definitions)
* [Default Blocks](#default-blocks)
	* [Default Flag](#default-flag)
	* [Default Property](#default-property)
* [State Definitions](#state-definitions)

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

All classes inherit from other classes. The base class can be set within the
class header, but if it is not the class will automatically inherit from
`Object`.

Classes are subject to Scoping. They are also implicitly reference values, and
therefore can be null. Use `new` to instantiate a new class object.

Classes that inherit from Actor can replace other actors when spawned in maps,
and can also be used freely in `DECORATE`. Actors have states, which will not
be explained in this document as they are already well-documented on the ZDoom
wiki.

A class is formed with the syntax:

```
class Identifier $[ : Base-class]$ $[Class-flags...]$
{
	$[Class-content...]$
}
```

`Base-class` in this context is an `Identifier`.

Alternatively, the rest of the file can be used as class content. Note that
with this syntax you cannot use include directives afterward:

```
class Identifier $[ : Base-class]$ $[Class-flags...]$ ;

$[Class-content...]$
```

If the class is defined within the same archive as the current file, then one
can continue a class definition with the syntax:

```
extend class Identifier
```

In place of the class header.

## Example: Class headers

```
// Automatically inherits Object, similar to the "actor" keyword in DECORATE.
class MyCoolObject
{
}

// Equivalent to the above.
class MyCoolObjectExplicit : Object
{
}

// Has "Play" scope.
class MyCoolScopedObject play
{
}

// Inherits Thinker and can override functions on it.
class MyCoolThinker : Thinker
{
}

// Some actor.
class OtherActor : Actor
{
}

// Replaces "OtherActor."
class MyCoolActor : Actor replaces OtherActor
{
}

// Can only be inherited.
class MyCoolInterface abstract
{
}
```

## Example: Class definitions

Basic class definition with a member variable and member function.

```
class BasicClass
{
	// "m_Thing" is attached to any "instance" of BasicClass.
	int m_Thing;

	// Changes "m_Thing" to 500 on an instance of BasicClass.
	void ChangeThing()
	{
		m_Thing = 500;
	}
}
```

Alternate syntax usage.

```
// This class spans from this point to the end of the file.
class TheWholeFileIsAClassOhNo;

int m_MyMember;

// End of file, end of class.
```

# Class Flags

| Flag                     | Description                                                                       |
| ----                     | -----------                                                                       |
| `abstract`               | Cannot be instantiated with `new`.                                                |
| `native`                 | Class is from the engine. Only usable internally.                                 |
| `play`                   | Class has Play scope.                                                             |
| `replaces Replace-class` | Replaces `Replace-class` with this class. Only works with descendants of `Actor`. |
| `ui`                     | Class has UI scope.                                                               |
| `version ( "ver" )`      | Restricted to ZScript version `ver` or higher.                                    |

`Replace-class` in this context is an `Identifier` denoting a class which
inherits `Actor`.

# Class Content

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

# Property Definitions

Property definitions are used within classes to define defaultable attributes
on actors. They are not valid on classes not derived from Actor.

When registered, a property will be available in the `default` block as
`ClassName.PropertyName`. Properties can be given multiple members to
initialize.

Property definitions take the form:

```
property Identifier : Member $[ , Member]$... ;
```

Where `Member` is an identifier naming any member in the current class.

Properties defined in ZScript are usable from `DECORATE`.

## Example: Property definitions

A class with some properties.

```
class MyCoolActor : Actor
{
	// You can set defined properties in a "default" block like in DECORATE.
	// This will also be available in DECORATE code that inherits your class!
	default
	{
		MyCoolActor.MyCoolMember 5000;
		MyCoolActor.MyCoolMemberList 501, 502;
	}

	// Declare some members.
	int m_MyCoolMember;
	int m_CoolMember1, m_CoolMember2;

	// Declare some properties attached to our members.
	property MyCoolMember: m_MyCoolMember;
	property MyCoolMemberList: m_CoolMember1, m_CoolMember2;
}
```

# Flag Definitions

*Version 3.7.0 and newer.*

Flag definitions are used within classes to define defaultable boolean flags on
actors. They are not valid on classes not derived from Actor.

When registered, a flag will be available in the `default` block as
`ClassName.FlagName`, as well as a member as `bFlagName`.

Each flag operates on a singular bit of any integer member of the class. The
integer must be exactly 32 bits, though if it is signed or not does not matter.
This means each backing integer can hold exactly 32 flags each (assuming no
duplicated flags,) and more will require another one to be added. (Internally,
the `Actor` flags are currently up to over 8 backing integers.)

A flag's backing integer may not be `meta`, although it may be `readonly`,
`private`, or any other access modifier. The generated flag member will be
publicly visible regardless of the backing integer's visibility.

Flag definitions take the form:

```
flagdef Identifier : Member , Number ;
```

Where `Number` is the bit in `Member` to use, starting from `0` and ending at
`31`.

Flags defined in ZScript are usable from `DECORATE`.

## Example: Flag definitions

A class with some flags.

```
class MyCoolActorWithFlags : Actor
{
	// You can set defined flag in a "default" block like in DECORATE.
	// This will also be available in DECORATE code that inherits your class!
	// Hey, those sentences sounded familiar...
	default
	{
		+MyCoolActorWithFlags.ThisOneIsOn
		-MyCoolActorWithFlags.ThisOneIsOff
	}

	// Declare a flag field for all of the flags. This can hold up to 32 flags.
	int m_Flags;

	// Declare the flags, one at a time...
	flagdef ThisOneIsOn: m_Flags, 0;
	flagdef ThisOneIsOff: m_Flags, 1;
	flagdef ThisOneAliasesOn: m_Flags, 0;

	// Unnecessary, since you can just access it directly, but this demonstrates
	// how declared flags can be used in methods.
	bool CheckIfOnIsOn()
	{
		return bThisOneIsOn;
	}
}
```

# Default Blocks

Default blocks are used on classes derived from Actor to create an overridable
list of defaults to properties, allowing for swift creation of flexible actor
types.

In `DECORATE`, this is everything that isn't in the `states` block, but in
ZScript, for syntax flexibility purposes, it must be enclosed in a block with
`default` at the beginning, formed:

```
default
{
	$[Default-statement...]$
}
```

Default statements include either flags or properties:

## Default Flag

Default flags are formed either:

```
+ Identifier $[ ; ]$
- Identifier $[ ; ]$
```

The former will enable the flag on this actor, the latter will disable it.

## Default Property

Default properties are formed as:

```
Identifier $[ . Identifier]$ $[Expression]$ ;
```

Note that all properties *except for* `DamageFunction` require `Expression` to
be a constant expression.

There are several special properties which add pre-defined flag sets onto the
actor. Here is a list of them:

| Name         | Description |
| ----         | ----------- |
| `ClearFlags` | Clears all flags except `ARGSDEFINED`. |
| `Monster`    | Adds the flags `SHOOTABLE COUNTKILL SOLID PUSHWALL MCROSS PASSMOBJ ISMONSTER CANUSEWALLS`. |
| `Projectile` | Adds the flags `NOBLOCKMAP NOGRAVITY DROPOFF MISSILE IMPACT PCROSS NOTELEPORT`, and if the game is Heretic or Hexen, `BLOODSPLATTER`. |

Note that like any other property, they require a semicolon after them,
although they do not use an expression.

# State Definitions

These are the same as `DECORATE`, but states that do not have function blocks
require terminating semicolons. Double quotes around `#` and `-` are no longer
required. State blocks can be subject to Action Scoping with the syntax
`states(Scope)`.

A state definition block has the syntax:

```
states $[ ( Scope $[ , Scope]$... ) ]$
{
	$[State-or-label...]$
}
```

State-or-label either defines a state label or a state itself, with the syntax:

```
Identifier :
Char{4} Char... Number-or-random $[State-option...]$ State-func
```

Where `Char` is any ASCII character, `Number-or-random` is one of:

```
Number
random ( Number , Number )
```

`State-option` is one of:

```
bright
fast
slow
nodelay
canraise
offset ( Number , Number )
light ( String $[ , String]$... )
```

And finally, `State-func` is one of:

```
;
Identifier ( Argument-list ) ;
{ $[Statement...]$ }
```

The first will attach no action function to the state. The second will attach
the specified action function with the specified arguments, and the third will
create an anonymous action function and attach it.

<!-- EOF -->


text:
<!-- 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:

```
const Identifier = Expression ;
```

Constants are not assignable. Their type is inferred from their value, so if
you wish for them to have a specific type, you must cast the value to that
type.

## Example: Constant definitions

```
// Making a regular integer constant.
const MY_COOL_NUMBER = 777;

// Making an integer constant from a double.
const MY_COOL_NUMBER_FROM_BEYOND = int(777.7777);
```

# Static array definitions

Similar to constants, static arrays are named values, but for an array. They
are created with the syntax:

```
static const Type Variable-name = { $[Expression $[ , Expression]$...]$ } ;
```

Static arrays cannot be multi-dimensional, unlike normal fixed-size arrays.

<!-- EOF -->


text:
<!-- vim-markdown-toc GFM -->

* [Concepts](#concepts)
	* [Action Scoping](#action-scoping)
	* [Object Scoping](#object-scoping)
	* [Format String](#format-string)
	* [Sprite](#sprite)
	* [Game Tick](#game-tick)
	* [Interpolation](#interpolation)

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

[1]: https://doomwiki.org/wiki/Entryway

## Action Scoping

On classes derived from Actor, states and methods can be scoped to a certain
subset of uses. This is mainly to differentiate actions which take place in
inventory items and weapons, and actions which take place in the actual game
map, for disambiguating the `self` pointer usage. The available scopes are:

| Name      | Description                                   |
| ----      | -----------                                   |
| `actor`   | Actions are called from an actual map object. |
| `item`    | Actions are called from an inventory item.    |
| `overlay` | Actions are called from a weapon overlay.     |
| `weapon`  | Actions are called from a weapon.             |

These can be defined either in the `states` block header as-is, or in `Actor`'s
`DefaultStateUsage` property with the following bit flags:

| Name          | Scope     |
| ----          | -----     |
| `SUF_ACTOR`   | `actor`   |
| `SUF_ITEM`    | `item`    |
| `SUF_OVERLAY` | `overlay` |
| `SUF_WEAPON`  | `weapon`  |

## Object Scoping

Most objects are subject to object scoping, which restricts the way data can be
used in certain contexts. This is to ensure that the game simulation does not
get changed by the UI, for instance, or that the game simulation doesn't read
from the UI and break network synchronization. In other words, it is to prevent
a multitude of errors that arise when data is modified or read from the wrong
places.

There are three scopes in ZScript: Play, UI, and Data (also known as
"`clearscope`.") The Play scope is used for objects that are part of the game
simulation and interact with the world in some way or another, while the UI
scope is for objects that have no correlation with the world besides perhaps
reading information from it. The Data scope is shared between the two, and must
be used carefully.

Here is a chart of data access possibilities for each scope:

|                   | Data scope | Play scope | UI scope   |
| -                 | ---------- | ---------- | ---------- |
| From Data context | Read/write | Read-only  | No access  |
| From Play context | Read/write | Read/write | No access  |
| From UI context   | Read/write | Read-only  | Read/write |

## Format String

A format string is a string that specifies the format of a conversion from
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
binary.
* 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

## Sprite

A sprite is stored in two numbers: the *sprite ID* (represented by the
`spriteid` type or sometimes `int`) and the *sprite frame* (represented by an
`int` or `uint8` usually.) The rotation is generally irrelevant as only the `0`
(front rotation) frame is used in most contexts. The sprite frame is, unlike
the file and state block representations, not a character, but an integer. The
number `0` for instance represents the letter `A`, `1` to `B`, etc.

For more information on sprites and rotations, please refer to [the relevant
Doom Wiki article][3].

[3]: https://doomwiki.org/wiki/Sprite

## Game Tick

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

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

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

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

[4]: https://doomwiki.org/wiki/Tic

## Interpolation

TODO

<!-- EOF -->


text:
# Structures

Here is a full list of all structures in ZScript as of GZDoom 4.2.1.
There are 76 structures total. Note that some of these
are merely implementation details and should not be used in code.

```
Struct
├ AutoUseHealthInfo
├ Console
├ ConsoleEvent
├ CVar
├ DamageTypeDefinition
├ DehInfo
├ Destructible
├ DropItem
├ DynArray_F32
├ DynArray_F64
├ DynArray_I16
├ DynArray_I32
├ DynArray_I8
├ DynArray_Obj
├ DynArray_Ptr
├ DynArray_String
├ F3DFloor
├ FCheckPosition
├ FColormap
├ FLineTraceData
├ Font
├ FOptionMenuSettings
├ FRailParams
├ FStateParamInfo
├ FTranslatedLineTarget
├ GameInfoStruct
├ GIFont
├ HealthGroup
├ InputEvent
├ JoystickConfig
├ KeyBindings
├ LevelLocals
├ Line
├ LinkContext
├ LookExParams
├ MugShot
├ MusPlayingInfo
├ OptionValues
├ PatchInfo
├ PlayerClass
├ PlayerEvent
├ PlayerInfo
├ PlayerSkin
├ RenderEvent
├ ReplacedEvent
├ ReplaceEvent
├ SavegameManager
├ SaveGameNode
├ SBarInfo
├ Screen
├ SecPlane
├ SecSpecial
├ Sector
├ SectorPortal
├ Shader
├ Side
├ State
├ StrifeDialogueNode
├ StrifeDialogueReply
├ StringStruct
├ StringTable
├ Team
├ TerrainDef
├ TexMan
├ TraceResults
├ Translation
├ UiEvent
├ UserCmd
├ Vertex
├ VisStyle
├ Wads
├ WBPlayerStruct
├ WBStartStruct
├ WeaponSlots
├ WorldEvent
└ _
```

<!-- EOF -->


text:
<!-- vim-markdown-toc GFM -->

* [Versions](#versions)
	* [Version 3.1.0](#version-310)
	* [Version 3.2.0](#version-320)
	* [Version 3.2.1](#version-321)
	* [Version 3.2.2](#version-322)
	* [Version 3.2.3](#version-323)
	* [Version 3.2.4](#version-324)
	* [Version 3.2.5](#version-325)
	* [Version 3.3.0](#version-330)
	* [Version 3.3.1](#version-331)
	* [Version 3.3.2](#version-332)
	* [Version 3.4.0](#version-340)
	* [Version 3.5.0](#version-350)
	* [Version 3.5.1](#version-351)
	* [Version 3.6.0](#version-360)
	* [Version 3.7.0](#version-370)
	* [Version 3.7.2](#version-372)
	* [Version 3.8.0 (Legacy)](#version-380-legacy)
	* [Version 3.8.1 (Legacy)](#version-381-legacy)
	* [Version 3.8.2 (Legacy)](#version-382-legacy)
	* [Version 4.0.0](#version-400)
	* [Version 4.1.0](#version-410)
	* [Version 4.1.1](#version-411)
	* [Version 4.1.2](#version-412)
	* [Version 4.1.3](#version-413)
	* [Version 4.2.0](#version-420)
	* [Version 4.2.1](#version-421)

<!-- vim-markdown-toc -->

# Versions

Here is a list of differences between ZScript versions.

## Version 3.1.0

- Added `Actor::CheckFakeFloorTriggers`.
- Added `Actor::ORIG_FRICTION_FACTOR`.
- Added `Actor::ORIG_FRICTION`.
- Added `HarmonyStatusBar`.
- Added `LAF_OVERRIDEZ`.
- Added `LevelLocals::AllowRespawn`.
- Added `LevelLocals::IsCrouchingAllowed`.
- Added `LevelLocals::IsFreelookAllowed`.
- Added `LevelLocals::IsJumpingAllowed`.
- Added `ListMenuItemSlider::mDrawX`.
- Added `LocalViewPitch`.
- Added `PlayerInfo::Cmd`.
- Added `PlayerInfo::IsTotallyFrozen`.
- Added `PlayerInfo::Original_Cmd`.
- Added `PlayerInfo::Uncrouch`.
- Added `PlayerPawn::BestWeapon`.
- Added `PlayerPawn::Bob`.
- Added `PlayerPawn::CROUCHSPEED`.
- Added `PlayerPawn::CalcHeight`.
- Added `PlayerPawn::CheckAirSupply`.
- Added `PlayerPawn::CheckCheats`.
- Added `PlayerPawn::CheckCrouch`.
- Added `PlayerPawn::CheckDegeneration`.
- Added `PlayerPawn::CheckEnvironment`.
- Added `PlayerPawn::CheckFov`.
- Added `PlayerPawn::CheckFrozen`.
- Added `PlayerPawn::CheckJump`.
- Added `PlayerPawn::CheckMoveUpDown`.
- Added `PlayerPawn::CheckMusicChange`.
- Added `PlayerPawn::CheckPitch`.
- Added `PlayerPawn::CheckPoison`.
- Added `PlayerPawn::CheckUndoMorph`.
- Added `PlayerPawn::CheckUse`.
- Added `PlayerPawn::CheckWeaponButtons`.
- Added `PlayerPawn::CheckWeaponChange`.
- Added `PlayerPawn::CheckWeaponFire`.
- Added `PlayerPawn::CrouchMove`.
- Added `PlayerPawn::DeathThink`.
- Added `PlayerPawn::FireWeaponAlt`.
- Added `PlayerPawn::FireWeapon`.
- Added `PlayerPawn::ForwardThrust`.
- Added `PlayerPawn::HandleMovement`.
- Added `PlayerPawn::MovePlayer`.
- Added `PlayerPawn::PlayerThink`.
- Added `PlayerPawn::TURN180_TICKS`.
- Added `PlayerPawn::TickPSprites`.
- Added `PlayerPawn::TweakSpeeds`.
- Added `SBarInfo::GetProtrusion`.
- Added `SVEFlagSpot*`.
- Added `SVELight`.
- Added `UserCmd`.
- Added `offsetz` parameter to `Actor::LineAttack`.
- Added override for `DoomStatusBar::DrawAutomapHUD`.
- Added override for `SBarInfoWrapper::GetProtrusion`.
- Made `PlayerInfo::Cls` not `readonly`.

## Version 3.2.0

- Added `+DYNAMICLIGHT.ADDITIVE`.
- Added `+DYNAMICLIGHT.ATTENUATE`.
- Added `+DYNAMICLIGHT.SUBTRACTIVE`.
- Added `+ZDOOMTRANS`.
- Added `Actor::A_SoundVolume`.
- Added `Actor::CameraFov`.
- Added `Actor::CheckPortalTransition`.
- Added `Actor::FloatBobStrength`.
- Added `Actor::RenderHidden`.
- Added `Actor::RenderRequired`.
- Added `ActorRenderFeatureFlag`.
- Added `DropItem::Amount`.
- Added `FCheckPosition::PortalGroup`.
- Added `Font::CR_FIRE`.
- Added `Font::CR_ICE`.
- Added `Font::CR_SAPPHIRE`.
- Added `Font::CR_TEAL`.
- Added `Font::TEXTCOLOR_FIRE`.
- Added `Font::TEXTCOLOR_ICE`.
- Added `Font::TEXTCOLOR_SAPPHIRE`.
- Added `Font::TEXTCOLOR_TEAL`.
- Added `LevelLocals::GiveSecret`.
- Added `Shader`.
- Added `String::IndexOf`.
- Added `String::LastIndexOf`.
- Added `String::ToDouble`.
- Added `String::ToInt`.
- Added `String::ToLower`.
- Added `String::ToUpper`.
- Added `TEXTCOLOR_FIRE`.
- Added `TEXTCOLOR_ICE`.
- Added `TEXTCOLOR_SAPPHIRE`.
- Added `TEXTCOLOR_TEAL`.
- Added `Thinker::STAT_USER_MAX`.
- Added `Thinker::STAT_USER`.
- Changed `Screen::SetCameraToTexture`'s `fov` parameter to `double`.
- Fixed `BlockLinesIterator::Create*` returning the wrong type.

## Version 3.2.1

- Added `GameInfoStruct::mSliderColor`.

## Version 3.2.2

- Added `Actor::Warp`.
- Added `CVar::GetBool`.
- Added `CVar::SetBool`.
- Added `EmptyTokenType`.
- Added `LAF_ABSOFFSET`.
- Added `LAF_ABSPOSITION`.
- Added `LAF_TARGETISSOURCE`.
- Added `PlayerPawn::GetClassicFlight`.
- Added `String::Remove`.
- Added `String::Split`.
- Added `TexMan::GetName`.
- Added `Wads::CheckNumForFullName`.
- Added `Wads::FindLumpNamespace`.
- Added `Wads::FindLump`.
- Added `Wads::ReadLump`.
- Added `endIndex` parameter for `String::LastIndexOf`.
- Added `offsetforward` and `offsetside` parameters for `Actor::LineAttack`.
- Made `Array::Find` be `const`.
- Made `Array::Max` be `const`.

## Version 3.2.3

- Made `Ceiling::CreateCeiling` be `static`.

## Version 3.2.4

- Added `DMG_NO_PAIN`.

## Version 3.2.5

- Added `Actor::CheckMove`.
- Added `ECheckMoveFlags`.
- Added `LevelLocals::PixelStretch`.
- Added `LevelLocals::Vec2Diff`.
- Added `LevelLocals::Vec3Diff`.
- Added `SKILLP_PLAYERRESPAWN`.
- Added `Screen::DrawLine`.
- Added `alpha2` parameter to `Actor::A_SetBlend`.
- Changed `Thinker::Tics2Seconds`' logic.

## Version 3.3.0

- Added `Actor::Acs_ScriptCall`.
- Added `Actor::Distance2DSquared`.
- Added `Actor::Distance3DSquared`.
- Added `Actor::FriendlySeeBlocks`.
- Added `Actor::GetRadiusDamage`.
- Added `Actor::LineTrace`.
- Added `Array` specialization for `Object`.
- Added `BaseStatusBar::AttachMessage`.
- Added `BaseStatusBar::DI_MIRROR`.
- Added `BaseStatusBar::DetachAllMessages`.
- Added `BaseStatusBar::DetachMessageID`.
- Added `BaseStatusBar::DetachMessage`.
- Added `BaseStatusBar::EHudMsgLayer`.
- Added `CHAN_LOOP`.
- Added `DynamicLight::SpotInnerAngle`.
- Added `DynamicLight::SpotOuterAngle`.
- Added `ETrace*`, `ELineTier`, `ELineTraceFlags`.
- Added `FLineTargetData`.
- Added `HudMessageBase`.
- Added `Inventory::AltHudIcon`.
- Added `LevelLocals::ChangeSky`.
- Added `LevelLocals::GetChecksum`.
- Added `LevelLocals::SkySpeed1`.
- Added `LevelLocals::SkySpeed2`.
- Added `LevelLocals::SkyTexture1`.
- Added `LevelLocals::SkyTexture2`.
- Added `LineTracer`.
- Added `Object::S_GetLength`.
- Added `OptionMenuItemCommand::mCloseOnSelect`.
- Added `OptionMenuItemLabeledSubmenu`.
- Added `OptionMenuItemOptionBase::IsGrayed`.
- Added `ReverbEdit`.
- Added `Screen::GetViewWindow`.
- Added `Sector::CeilingData`.
- Added `Sector::FloorData`.
- Added `Sector::LightingData`.
- Added `SectorEffect::GetSector`.
- Added `SpotLight* classes`.
- Added `StaticEventHandler::PostUiTick`.
- Added `StaticEventHandler::WorldLineActivated`.
- Added `StaticEventHandler::WorldLinePreActivated`.
- Added `StrifeDialogueNode::MenuClassName`.
- Added `StrifeDialogueNode::UserData`.
- Added `TraceResults`.
- Added `WorldEvent::ActivatedLine`.
- Added `WorldEvent::ShouldActivate`.
- Default parameters in overridden virtual functions are now an error.
- Made `SecPlane::HeightDiff` be `const`.
- Made `SecPlane::ZatPoint` be `clearscope`.
- Made `Side::V1` be `clearscope`.
- Made `Side::V2` be `clearscope`.
- Made `Weapon::CheckAmmo` and `Weapon::DepleteAmmo` be `virtual`.
- Renamed `DynamicLight::ELightType::SpotLight` to `DummyLight`.

## Version 3.3.1

- Made `Actor::A_SetSize`'s `radius` parameter have a default.
- Made `Side::Sector` and `Side::Linedef` be `readonly`.
- Made all `DehInfo` members `readonly`.
- Made all `State` members `readonly`.

## Version 3.3.2

- Added `Line::Activate`.
- Added `Line::RemoteActivate`.
- Added `Spac`.

## Version 3.4.0

- Added "`internal`" keyword.
- Added `Actor::OnGiveSecret`.
- Added `DTA_COLOR`.
- Added `DTA_DESATURATE`.
- Added `DTA_FLIPY`.
- Added `DTA_SRCHEIGHT`.
- Added `DTA_SRCWIDTH`.
- Added `DTA_SRCX`.
- Added `DTA_SRCY`.
- Added `LevelLocals::Vec2OffsetZ`.
- Added `LevelLocals::Vec2Offset`.
- Added `LevelLocals::Vec3Offset`.
- Added `Line::ESide`.
- Added `WorldEvent::ActivationType`.
- Changed `PlayerPawn::ResetAirSupply`'s `playgasp` default to `true`.
- Made `LevelLocals::SectorPortals` be `internal`.
- Made `Sector::Portals` be `internal`.

## Version 3.5.0

- Added `DTA_LegacyRenderStyle`.
- Added `MeansOfDeath` parameter to `Actor::Die`.
- Added `Menu::SetVideoMode`.
- Added `Screen::DrawShape`.
- Added `Shape2D`.
- Replaced `ListMenuItemPlayerDisplay::mTranslation` with `mBaseColor` and `mAddColor`.

## Version 3.5.1

- Added `String::RightIndexOf`.
- Deprecated `String::LastIndexOf`.
- Made `Actor::AbsAngle` be `clearscope`.
- Made `Actor::AngleToVector` be `clearscope`.
- Made `Actor::BobSin` be `clearscope`.
- Made `Actor::DeltaAngle` be `clearscope`.
- Made `Actor::FindState` be `clearscope`.
- Made `Actor::GetDefaultSpeed` be `clearscope`.
- Made `Actor::GetDropItems` be `clearscope`.
- Made `Actor::Normalize180` be `clearscope`.
- Made `Actor::RotateVector` be `clearscope`.

## Version 3.6.0

- Added `Actor::A_CheckForResurrection`.
- Added `Actor::A_RaiseSelf`.
- Added `Actor::CanRaise`.
- Added `Actor::Revive`.
- Added `DMG_EXPLOSION`.
- Added `GLTextureGLOptions`.
- Added `Inventory::OnDrop`.
- Added `LevelLocals::SphericalCoords`.
- Added `Screen::DrawThickLine`.
- Added `StaticEventHandler::CheckReplacement`.
- Added `StaticEventHandler::NewGame`.
- Added `TRF_SOLIDACTORS`, `TRF_BLOCKUSE`, and `TRF_BLOCKSELF`.
- Made `StatusScreen::End` be `virtual`.

## Version 3.7.0

- Added "`flagdef`" keyword.
- Added `"AddShaded"` RenderStyle.
- Added `"ColorAdd"` RenderStyle.
- Added `"ColorBlend"` RenderStyle.
- Added `"Multiply"` RenderStyle.
- Added `ALF_NOWEAPONCHECK`.
- Added `Actor::AimBulletMissile`.
- Added `Actor::ApplyKickBack`.
- Added `Actor::Blocking3DFloor`.
- Added `Actor::BlockingCeiling`.
- Added `Actor::BlockingFloor`.
- Added `Actor::CanResurrect`.
- Added `Actor::CheckFor3DCeilingHit`.
- Added `Actor::CheckFor3DFloorHit`.
- Added `Actor::CheckMonsterUseSpecials`.
- Added `Actor::CheckSplash`.
- Added `Actor::DaggerAlert`.
- Added `Actor::DefMorphTicks`.
- Added `Actor::DestroyAllInventory`.
- Added `Actor::DisplayNameTag`.
- Added `Actor::DoGiveInventory`.
- Added `Actor::DoTakeInventory`.
- Added `Actor::GetAge`.
- Added `Actor::GetLevelSpawnTime`.
- Added `Actor::Grind`.
- Added `Actor::InitSpawnedItem`.
- Added `Actor::Morph`.
- Added `Actor::MorphedDeath`.
- Added `Actor::RadiusAttack`.
- Added `Actor::RailAttack`.
- Added `Actor::RaiseActor`.
- Added `Actor::RestoreRenderStyle`.
- Added `Actor::ShouldSpawn`.
- Added `Actor::SpawnLineAttackBlood`.
- Added `Actor::SpawnTime`.
- Added `Actor::Substitute`.
- Added `Actor::TriggerPainChance`.
- Added `Actor::UnMorph`.
- Added `Actor::VelIntercept`.
- Added `Actor::bBounceOnUnrippables`.
- Added `Actor::bDontBounceOnSky`.
- Added `Actor::bNoFrictionBounce`.
- Added `Actor::bNoFriction`.
- Added `AllClasses`.
- Added `AltHud`.
- Added `AmbientSound::MarkAmbientSounds`.
- Added `AutoUseHealthInfo`.
- Added `BaseStatusBar::UpdateScreenGeometry`.
- Added `Bobbing`.
- Added `DMG_NO_ENHANCE`.
- Added `Decal::SpawnDecal`.
- Added `Destructible`.
- Added `DynamicLight::SetOffset`.
- Added `EChangeLevelFlags`.
- Added `EFinishLevelType`.
- Added `EPlayerGender`.
- Added `FLineTraceData::TRACE_HASHITSKY`.
- Added `FRailParams`.
- Added `Font::GetBottomAlignOffset`.
- Added `GameInfoStruct::BerserkPic`.
- Added `GameInfoStruct::DefKickBack`.
- Added `GameInfoStruct::DefaultBloodColor`.
- Added `GameInfoStruct::DefaultDropStyle`.
- Added `GameInfoStruct::HealthPic`.
- Added `GameInfoStruct::TeleFogHeight`.
- Added `HealthGroup`.
- Added `IntermissionSequenceType`.
- Added `Inventory::PrevInv`.
- Added `Inventory::SetGiveAmount`.
- Added `Inventory::UseAll`.
- Added `Key::GetKeyTypeCount`.
- Added `Key::GetKeyType`.
- Added `LevelLocals::CLUSTER_HUB`.
- Added `LevelLocals::DeathSequence`.
- Added `LevelLocals::GetAutomapPosition`.
- Added `LevelLocals::IsPointInMap`.
- Added `LevelLocals::KeepFullInventory`.
- Added `LevelLocals::RemoveItems`.
- Added `LevelLocals::StartIntermission`.
- Added `Line::GetHealth`.
- Added `Line::HealthGroup`.
- Added `Line::Health`.
- Added `Line::SetHealth`.
- Added `MorphedMonster::FlagsSave`.
- Added `MorphedMonster::UndoMonsterMorph`.
- Added `NetGame`.
- Added `Object::MarkSound`.
- Added `PF_HITSKY`.
- Added `PSprite::ResetInterpolation`.
- Added `PlayerInfo::GetDeltaViewHeight`.
- Added `PlayerInfo::GetWBobSpeed`.
- Added `PlayerPawn::ActivateMorphWeapon`.
- Added `PlayerPawn::AutoUseHealth`.
- Added `PlayerPawn::AutoUseStrifeHealth`.
- Added `PlayerPawn::BobWeapon`.
- Added `PlayerPawn::BringUpWeapon`.
- Added `PlayerPawn::CheatMorph`.
- Added `PlayerPawn::CheatSetInv`.
- Added `PlayerPawn::CheatTakeWeaps`.
- Added `PlayerPawn::CurBob`.
- Added `PlayerPawn::DropWeapon`.
- Added `PlayerPawn::EndAllPowerupEffects`.
- Added `PlayerPawn::FilterCoopRespawnInventory`.
- Added `PlayerPawn::FindMostRecentWeapon`.
- Added `PlayerPawn::GetTeleportFreezeTime`.
- Added `PlayerPawn::GiveDefaultInventory`.
- Added `PlayerPawn::InitAllPowerupEffects`.
- Added `PlayerPawn::InvNext`.
- Added `PlayerPawn::InvPrev`.
- Added `PlayerPawn::MarkPlayerSounds`.
- Added `PlayerPawn::MorphPlayer`.
- Added `PlayerPawn::NUM_WEAPON_SLOTS`.
- Added `PlayerPawn::PickNewWeapon`.
- Added `PlayerPawn::PickNextWeapon`.
- Added `PlayerPawn::PickPrevWeapon`.
- Added `PlayerPawn::PickWeapon`.
- Added `PlayerPawn::PlayerFinishLevel`.
- Added `PlayerPawn::TeleportFreezeTime`.
- Added `PlayerPawn::UndoPlayerMorph`.
- Added `RadiusDamageFlags`.
- Added `SKILLP_KICKBACKFACTOR`.
- Added `ScriptUtil`.
- Added `SecActDamage3D`.
- Added `SecActDamageCeiling`.
- Added `SecActDamageFloor`.
- Added `SecActDeath3D`.
- Added `SecActDeathCeiling`.
- Added `SecActDeathFloor`.
- Added `Sector::AdditiveColors`.
- Added `Sector::GetHealth`.
- Added `Sector::HealthCeilingGroup`.
- Added `Sector::HealthCeiling`.
- Added `Sector::HealthFloorGroup`.
- Added `Sector::HealthFloor`.
- Added `Sector::SECF_NOATTACK`.
- Added `Sector::SetAdditiveColor`.
- Added `Sector::SetHealth`.
- Added `SectorAction::SECSPAC_DAMAGE3D`.
- Added `SectorAction::SECSPAC_DAMAGECEILING`.
- Added `SectorAction::SECSPAC_DAMAGEFLOOR`.
- Added `SectorAction::SECSPAC_DEATH3D`.
- Added `SectorAction::SECSPAC_DEATHCEILING`.
- Added `SectorAction::SECSPAC_DEATHFLOOR`.
- Added `SectorPart`.
- Added `Side::EnableAdditiveColor`.
- Added `Side::GetAdditiveColor`.
- Added `Side::SetAdditiveColor`.
- Added `Side::SetSpecialColor`.
- Added `Side::WallBottom`.
- Added `Side::WallTop`.
- Added `State::InStateSequence`.
- Added `StaticEventHandler::WorldLineDamaged`.
- Added `StaticEventHandler::WorldSectorDamaged`.
- Added `TRACE_HASHITSKY`.
- Added `Vertex::Index`.
- Added `Weapon::CheckAddToSlots`.
- Added `Weapon::DoReadyWeaponDisableSwitch`.
- Added `Weapon::DoReadyWeaponToBob`.
- Added `Weapon::DoReadyWeaponToFire`.
- Added `Weapon::DoReadyWeaponToSwitch`.
- Added `Weapon::GetButtonStateFlags`.
- Added `Weapon::PlayUpSound`.
- Added `Weapon::PostMorphWeapon`.
- Added `Weapon::SlotPriority`.
- Added `WeaponSlots::GetWeapon`.
- Added `WeaponSlots::SetupWeaponSlots`.
- Added `WeaponSlots::SlotSize`.
- Added `WorldEvent::DamageIsRadius`.
- Added `WorldEvent::DamageLineSide`.
- Added `WorldEvent::DamageLine`.
- Added `WorldEvent::DamagePosition`.
- Added `WorldEvent::DamageSectorPart`.
- Added `WorldEvent::DamageSector`.
- Added `WorldEvent::NewDamage`.
- Added `alpha` parameter to `Screen::DrawLine`.
- Added `alpha` parameter to `Screen::DrawThickLine`.
- Changed `PlayerInfo::PremorphWeapon`'s type to `Weapon`.
- Deprecated `Actor::CheckClass`.
- Deprecated `Actor::GetAngle`.
- Deprecated `Actor::GetDistance`.
- Deprecated `Actor::GetSpriteAngle`.
- Deprecated `Actor::GetSpriteRotation`.
- Deprecated `PlayerInfo::BringUpWeapon`.
- Deprecated `PlayerInfo::DropWeapon`.
- Deprecated `PlayerInfo::MorphPlayer`.
- Deprecated `PlayerInfo::UndoPlayerMorph`.
- Deprecated `Weapon::MinAmmo1`.
- Deprecated `Weapon::MinAmmo2`.
- Deprecated `Weapon::WeaponFlags`.
- Made `Actor::A_PlaySound` be `clearscope`.
- Made `Actor::ClearInventory` be `virtual`.
- Made `Actor::GetPointer` be `clearscope`.
- Made `Actor::InStateSequence` be `static`.
- Made `Actor::MorphMonster` be `virtual`.
- Made `Actor::UseInventory` be `virtual`.
- Made `Ammo::GetParentAmmo` be `virtual`.
- Made `BaseStatusBar::ArtiFlashTick` be `clearscope`.
- Made `BaseStatusBar::FlashItem` be `clearscope`.
- Made `BaseStatusBar::ItemFlashFade` be `clearscope`.
- Made `Inventory::ModifyDropAmount` be `virtual`.
- Made `Sector::PointInSector` be `clearscope`.
- Made `Thinker::ChangeStatNum` not be `virtual`.
- Made `Weapon::SlotNumber` be `meta`.
- Made `WeaponSlots::LocateWeapon` be `const`.

## Version 3.7.2

- Changed `Actor::A_Chase`'s argument defaults.
- Fixed multi-dimensional arrays' dimensions being backwards.
- Made `LevelLocals::ExecuteSpecial` return `int`.
- Made `ScriptUtil::PlayerAmmo` be `static`.
- Made `bool` negatable by the `-` prefix operator.

## Version 3.8.0 (Legacy)

TODO

## Version 3.8.1 (Legacy)

TODO

## Version 3.8.2 (Legacy)

TODO

## Version 4.0.0

- Added `Actor::CanTouchItem`.
- Added `Actor::GetMaxHealth`.
- Added `Actor::IsFrozen`.
- Added `COMPATF2_*`.
- Added `COMPATF_*`.
- Added `CoOpStatusScreen::DisplayFont`.
- Added `CoOpStatusScreen::FontScale`.
- Added `CoOpStatusScreen::RowHeight`.
- Added `ConversationMenu::LineHeight`.
- Added `DehInfo::MaxHealth`.
- Added `GameInfoStruct::NormForwardMove`.
- Added `GameInfoStruct::NormSideMove`.
- Added `Inventory::bUnClearable`.
- Added `LevelCompatibility::AddLineID`.
- Added `LevelCompatibility::AddSectorTag`.
- Added `LevelCompatibility::Apply`.
- Added `LevelCompatibility::ClearLineIDs`.
- Added `LevelCompatibility::ClearLineSpecial`.
- Added `LevelCompatibility::ClearSectorTags`.
- Added `LevelCompatibility::GetDefaultActor`.
- Added `LevelCompatibility::Level`.
- Added `LevelCompatibility::OffsetSectorPlane`.
- Added `LevelCompatibility::SetLineActivation`.
- Added `LevelCompatibility::SetLineFlags`.
- Added `LevelCompatibility::SetLineSectorRef`.
- Added `LevelCompatibility::SetLineSpecial`.
- Added `LevelCompatibility::SetSectorLight`.
- Added `LevelCompatibility::SetSectorSpecial`.
- Added `LevelCompatibility::SetSectorTextureID`.
- Added `LevelCompatibility::SetSectorTexture`.
- Added `LevelCompatibility::SetThingFlags`.
- Added `LevelCompatibility::SetThingSkills`.
- Added `LevelCompatibility::SetThingXY`.
- Added `LevelCompatibility::SetTingZ`.
- Added `LevelCompatibility::SetVertex`.
- Added `LevelCompatibility::SetWallTextureID`.
- Added `LevelCompatibility::SetWallTexture`.
- Added `LevelCompatibility::SetWallYScale`.
- Added `LevelLocals::CompatFlags2`.
- Added `LevelLocals::CompatFlags`.
- Added `LevelLocals::CreateActorIterator`.
- Added `LevelLocals::CreateCeiling`.
- Added `LevelLocals::CreateFloor`.
- Added `LevelLocals::CreateLineIDIterator`.
- Added `LevelLocals::CreateSectorTagIterator`.
- Added `LevelLocals::FindHealthGroup`.
- Added `LevelLocals::FindUniqueTid`.
- Added `LevelLocals::GetSkyboxPortal`.
- Added `LevelLocals::GetSpotState`.
- Added `LevelLocals::IsFrozen`.
- Added `LevelLocals::IsPointInLevel`.
- Added `LevelLocals::MakeAutoSave`.
- Added `LevelLocals::MakeScreenShot`.
- Added `LevelLocals::PickDeathmatchStart`.
- Added `LevelLocals::PickPlayerStart`.
- Added `LevelLocals::PointInSector`.
- Added `LevelLocals::ReplaceTextures`.
- Added `LevelLocals::SetFrozen`.
- Added `ListMenuItemStaticPatch::mColor`.
- Added `ListMenuItemStaticPatch::mFont`.
- Added `ListMenuItemStaticPatch::mSubstitute`.
- Added `LoadSaveMenu::BrokenSaveComment`.
- Added `LoadSaveMenu::CommentRows`.
- Added `LoadSaveMenu::FontScale`.
- Added `LoadSaveMenu::UpdateSaveComment`.
- Added `MAXPLAYERNAME`.
- Added `Menu::DrawOptionText`.
- Added `Menu::OptionColor`.
- Added `Menu::OptionFont`.
- Added `Menu::OptionHeight`.
- Added `Menu::OptionWidth`.
- Added `MusPlayingInfo`.
- Added `MusPlaying`.
- Added `NewConsoleFont`.
- Added `NewSmallFont`.
- Added `OptionMenuDescriptor::mFont`.
- Added `OptionMenuItem::DrawText`.
- Added `OptionMenuItem::DrawValue`.
- Added `PlayerInfo::GetMoveBob`.
- Added `PlayerInfo::GetStillBob`.
- Added `PlayerInfo::SendPitchLimits`.
- Added `PlayerPawn::Face`.
- Added `PlayerPawn::GetFlechetteItem`.
- Added `PlayerPawn::GetPainFlash`.
- Added `PlayerPawn::GiveDeathmatchInventory`.
- Added `PlayerPawn::MAXBOB`.
- Added `ReplacedEvent`.
- Added `SaveGameManager::SaveCommentString`.
- Added `SectorPortal::GetSkyboxPortal`.
- Added `StaticEventHandler::CheckReplacee`.
- Added `StatusScreen::DrawNumScaled`.
- Added `StatusScreen::DrawPatchOrText`.
- Added `StatusScreen::DrawPercentScaled`.
- Added `StatusScreen::DrawTextScaled`.
- Added `StatusScreen::DrawTimeFont`.
- Added `StatusScreen::EnteringPatch`.
- Added `StatusScreen::FinishedPatch`.
- Added `String::AppendCharacter`.
- Added `String::DeleteLastCharacter`.
- Added `TexMan::Localize`.
- Added `TexMan::OkForLocalization`.
- Added `TextEnterMenu::CursorSize`.
- Added `TextEnterMenu::DisplayFont`.
- Added `TextEnterMenu::OpenTextEnter`.
- Added `Thinker::Level`.
- Added `WBStartStruct::ThisName`.
- Added `Weapon::LookScale`.
- Added `desc` parameter to `ListMenuItemStaticPatch::Init`.
- Added `desc` parameter to `ListMenuItemStaticPatchCentered::Init`.
- Added `dpf` parameter to `TextEnterMenu::Init`.
- Added `flags` parameter to `Actor::GetModifiedDamage`.
- Added `flags` parameter to `Inventory::ModifyDamage`.
- Added `inflictor` parameter to `Actor::GetModifiedDamage`.
- Added `inflictor` parameter to `Inventory::ModifyDamage`.
- Added `level` parameter to `ScriptUtils::SetMarineSprite`.
- Added `level` parameter to `ScriptUtils::SetMarineWeapon`.
- Added `nomove` parameter to `StatusScreen::DrawNum`.
- Added `nomove` parameter to `StatusScreen::DrawPercent`.
- Added `OS_AnyOrAllOption`.
- Added `OS_Menu`.
- Added `OS_Query`.
- Added `OS_SearchField`.
- Added `source` parameter to `Actor::GetModifiedDamage`.
- Added `source` parameter to `Inventory::ModifyDamage`.
- Deprecated `Actor::FindUniqueTid`.
- Deprecated `ActorIterator::Create`.
- Deprecated `Ceiling::CreateCeiling`.
- Deprecated `Floor::CreateFloor`.
- Deprecated `G_PickDeathmatchStart`.
- Deprecated `G_PickPlayerStart`.
- Deprecated `GlobalFreeze`.
- Deprecated `HealthGroup::Find`.
- Deprecated `LevelLocals::Frozen`.
- Deprecated `LevelLocals::IsPointInMap`.
- Deprecated `LevelLocals::RemoveAllBots`.
- Deprecated `LineIDIterator::Create`.
- Deprecated `Menu::DrawConText`.
- Deprecated `PatchInfo::mPatch`.
- Deprecated `SaveGameManager::DrawSaveComment`.
- Deprecated `Sector::PointInSector`.
- Deprecated `SectorTagIterator::Create`.
- Deprecated `SpotState::GetSpotState`.
- Deprecated `StatusScreen::DrawPatchText`.
- Deprecated `TexMan::ReplaceTextures`.
- Deprecated `TextEnterMenu::Open`.
- Implemented compound initializers for single-dimension arrays.
- Made `GameAction` be `readonly`.
- Made `LevelLocals::ExecuteSpecial` be `play`.
- Made `LevelLocals::F1Pic` be `readonly`.
- Made `LevelLocals::GetAutomapPosition` be `ui`.
- Made `LevelLocals::GetAutomapPosition` not be `static`.
- Made `LevelLocals::GiveSecret` not be `static`.
- Made `LevelLocals::SphericalCoords` be `const`.
- Made `LevelLocals::SphericalCoords` not be `static`.
- Made `LevelLocals::StartSlideshow` not be `static`.
- Made `LevelLocals::Vec2Diff` be `const`.
- Made `LevelLocals::Vec2Diff` not be `static`.
- Made `LevelLocals::Vec2OffsetZ` be `const`.
- Made `LevelLocals::Vec2OffsetZ` not be `static`.
- Made `LevelLocals::Vec2Offset` be `const`.
- Made `LevelLocals::Vec2Offset` not be `static`.
- Made `LevelLocals::Vec3Diff` be `const`.
- Made `LevelLocals::Vec3Diff` not be `static`.
- Made `LevelLocals::Vec3Offset` be `const`.
- Made `LevelLocals::Vec3Offset` not be `static`.
- Made `LevelLocals::WorldDone` not be `static`.
- Made `PlayerMenu::AlwaysRunChanged` be `static`.
- Made `PlayerMenu::AutoaimChanged` be `static`.
- Made `PlayerMenu::ClassChanged` be `static`.
- Made `PlayerMenu::ColorChanged` be `static`.
- Made `PlayerMenu::ColorSetChanged` be `static`.
- Made `PlayerMenu::GenderChanged` be `static`.
- Made `PlayerMenu::PlayerNameChanged` be `static`.
- Made `PlayerMenu::SkinChanged` be `static`.
- Made `PlayerMenu::SwitchOnPickupChanged` be `static`.
- Made `PlayerMenu::TeamChanged` be `static`.
- Made `PlayerPawn::CalcHeight` be `virtual`.
- Made `PlayerPawn::ColorRangeEnd` be `meta`.
- Made `PlayerPawn::ColorRangeStart` be `meta`.
- Made `PlayerPawn::FlechetteType` be `class<Inventory>`.
- Made `PlayerPawn::ResetAirSupply` be `virtual`.
- Made `PlayerPawn::TweakSpeeds` be `virtual`.
- Made `SaveGameManager` be `ui`.
- Made `SaveGameNode::FileName` be `readonly`.
- Made `StatusScreen::DrawEL` be `virtual`.
- Made `StatusScreen::DrawLF` be `virtual`.
- Removed `PlayerPawn::GetMaxHealth` (as it is now an `Actor` override.)
- Removed `PlayerPawn::PlayerFlags`.
- Removed `TextEnterMenu::mSizeMode`.

## Version 4.1.0

- Added `AlternativeSmallFont`.
- Added `ConversationMenu::DisplayFont`.
- Added `ConversationMenu::DisplayHeight`.
- Added `ConversationMenu::DisplayWidth`.
- Added `ConversationMenu::FontScale`.
- Added `ConversationMenu::RefHeight`.
- Added `ConversationMenu::RefWidth`.
- Added `ConversationMenu::ReplyLineHeight`.
- Added `DTA_MONOSPACE`.
- Added `DTA_SPACING`.
- Added `DeathmatchStatusScreen::DisplayFont`.
- Added `DeathmatchStatusScreen::FontScale`.
- Added `DeathmatchStatusScreen::RowHeight`.
- Added `Font::CanPrint`.
- Added `Font::CanPrint`.
- Added `Generic_UI`.
- Added `MONO_CELLCENTER`.
- Added `MONO_CELLLEFT`.
- Added `MONO_CELLRIGHT`.
- Added `MONO_OFF`.
- Added `Menu::UpdateColorSets`.
- Added `Menu::UpdateSkinOptions`.
- Added `MessageBoxMenu::ArrowFont`.
- Added `MessageBoxMenu::DestHeight`.
- Added `MessageBoxMenu::DestWidth`.
- Added `MessageBoxMenu::Selector`.
- Added `MessageBoxMenu::TextFont`.
- Added `NewPlayerMenu`.
- Added `OptionMenu::GetIndent`.
- Added `OptionMenuItemAutoAimSlider`.
- Added `OptionMenuItemPlayerClassItem`.
- Added `OptionMenuItemPlayerColorItem`.
- Added `OptionMenuItemPlayerColorSlider`.
- Added `OptionMenuItemPlayerGenderItem`.
- Added `OptionMenuItemPlayerNameField`.
- Added `OptionMenuItemPlayerSkinItem`.
- Added `OptionMenuItemPlayerSwitchOnPickupItem`.
- Added `OptionMenuItemPlayerTeamItem`.
- Added `OriginalBigFont`.
- Added `OriginalSmallFont`.
- Added `PlayerMenuPlayerDisplay`.
- Added `String::ByteAt`.
- Added `String::CharLower`.
- Added `String::CharUpper`.
- Added `String::CodePointCount`.
- Added `String::GetNextCodePoint`.
- Added `String::MakeLower`.
- Added `String::MakeUpper`.
- Added `withmapname` parameter to `AltHud::DrawCoordinates`.
- Changed `HUDFont::Create`'s `monospaced` parameter to `EMonoSpacing` and renamed to `monospacing`.
- Deprecated `String::CharAt`.
- Deprecated `String::CharCodeAt`.
- Deprecated `String::ToLower`.
- Deprecated `String::ToUpper`.
- Made `PlayerMenu::AlwaysRunChanged` be `public`.
- Made `PlayerMenu::AutoAimChanged` be `public`.
- Made `PlayerMenu::ClassChanged` be `public`.
- Made `PlayerMenu::ColorChanged` be `public`.
- Made `PlayerMenu::ColorSetChanged` be `public`.
- Made `PlayerMenu::GenderChanged` be `public`.
- Made `PlayerMenu::PlayerNameChanged` be `public`.
- Made `PlayerMenu::SkinChanged` be `public`.
- Made `PlayerMenu::SwitchOnPickupChanged` be `public`.
- Made `PlayerMenu::TeamChanged` be `public`.
- Removed `Menu::OptionColor`.

## Version 4.1.1

- Fixed `ConversationMenu::FormatReplies` using deprecated functions.
- Fixed `ConversationMenu::FormatSpeakerMessage` using deprecated functions.
- Fixed `PatchInfo::Init` using deprecated functions.
- Fixed `PlayerPawn::GetObituary` using deprecated functions.

## Version 4.1.2

No changes.

## Version 4.1.3

- Added `PlayerInfo::SetSubtitleNumber`

## Version 4.2.0

- Added `Actor::A_AttachLightDef`.
- Added `Actor::A_AttachLight`.
- Added `Actor::A_RemoveLight`.
- Added `Actor::A_SoundPitch`.
- Added `Actor::RetargetAfterSlam`.
- Added `Array::Append`.
- Added `ConversationMenu::FontFactor`.
- Added `ConversationMenu::SpeechDisplayWidth`.
- Added `ConversationMenu::mConfineTextToBackdrop`.
- Added `ConversationMenu::mHasBackdrop`.
- Added `DoomStatusBar::DrawBarKeys`.
- Added `DoomStatusBar::DrawBarWeapons`.
- Added `DoomStatusBar::DrawFullScreenKeys`.
- Added `DynamicLight::LF_ADDITIVE`.
- Added `DynamicLight::LF_ATTENUATE`.
- Added `DynamicLight::LF_DONTLIGHTACTORS`.
- Added `DynamicLight::LF_DONTLIGHTSELF`.
- Added `DynamicLight::LF_NOSHADOWMAP`.
- Added `DynamicLight::LF_SPOT`.
- Added `DynamicLight::LF_SUBTRACTIVE`.
- Added `Font::GetDisplacement`.
- Added `Font::GetMaxAscender`.
- Added `GameInfoStruct::mStatScreenAuthorFont`.
- Added `GameInfoStruct::mStatScreenContentFont`.
- Added `LevelLocals::AuthorName`.
- Added `LevelLocals::ExitLevel`.
- Added `LevelLocals::SecretExitLevel`.
- Added `Menu::DontBlur`.
- Added `PSprite::bMirror`.
- Added `Shape2D::SetTransform`.
- Added `Shape2DTransform`.
- Added `StaticEventHandler::RenderUnderlay`.
- Added `StatusScreen::AuthorTexts`.
- Added `StatusScreen::Author`.
- Added `StatusScreen::Content`.
- Added `StatusScreen::DrawAuthor`.
- Added `WBStartStruct::NextAuthor`.
- Added `WBStartStruct::ThisAuthor`.
- Added `pitch` parameter to `Actor::A_SoundPitch`.
- Added `pitch` parameter to `Object::S_Sound`.
- Added `sound_id` parameter to `PlayerInfo::SetSubtitleNumber`.
- Added a warning for unknown `DropItem`s.

## Version 4.2.1

- Added `BaseStatusBar::DrawChat`.
- Added `BaseStatusBar::FlushNotify`.
- Added `BaseStatusBar::ProcessMidPrint`.
- Added `BaseStatusBar::ProcessNotify`.
- Added `EPrintLevel`.
- Added the ability to specify deprecation messages.

<!-- EOF -->