diff options
author | PeterN <peter@fuzzle.org> | 2018-04-19 19:33:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-19 19:33:21 +0100 |
commit | 3b32075e8a3440c9bca8764289c0b1e3c2f4c28d (patch) | |
tree | cc5dde691f49ec264e0f932bb2ad56a689dc3c80 /src/table | |
parent | f4f9e18790b23862239164721dba831756ae24d7 (diff) | |
download | openttd-3b32075e8a3440c9bca8764289c0b1e3c2f4c28d.tar.xz |
Add: {PUSH_COLOUR} and {POP_COLOUR} control codes to handle switching colours. (#6737)
This replaces the internal SCC_PREVIOUS_COLOUR swap.
Diffstat (limited to 'src/table')
-rw-r--r-- | src/table/control_codes.h | 3 | ||||
-rw-r--r-- | src/table/strgen_tables.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/table/control_codes.h b/src/table/control_codes.h index ad620197a..d8e9673e9 100644 --- a/src/table/control_codes.h +++ b/src/table/control_codes.h @@ -115,7 +115,8 @@ enum StringControlCode { SCC_GRAY, SCC_DKBLUE, SCC_BLACK, - SCC_PREVIOUS_COLOUR, + SCC_PUSH_COLOUR, + SCC_POP_COLOUR, /** * The next variables are part of a NewGRF subsystem for creating text strings. diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h index d4294fa84..6297eea3b 100644 --- a/src/table/strgen_tables.h +++ b/src/table/strgen_tables.h @@ -60,6 +60,8 @@ static const CmdStruct _cmd_structs[] = { {"GRAY", EmitSingleChar, SCC_GRAY, 0, -1, C_DONTCOUNT}, {"DKBLUE", EmitSingleChar, SCC_DKBLUE, 0, -1, C_DONTCOUNT}, {"BLACK", EmitSingleChar, SCC_BLACK, 0, -1, C_DONTCOUNT}, + {"PUSH_COLOUR", EmitSingleChar, SCC_PUSH_COLOUR, 0, -1, C_DONTCOUNT}, + {"POP_COLOUR", EmitSingleChar, SCC_POP_COLOUR, 0, -1, C_DONTCOUNT}, {"REV", EmitSingleChar, SCC_REVISION, 0, -1, C_NONE}, // openttd revision string |