diff --git a/src/strings.cpp b/src/strings.cpp --- a/src/strings.cpp +++ b/src/strings.cpp @@ -1624,6 +1624,12 @@ static void FormatString(StringBuilder & break; } + case SCC_COLOUR: { // {COLOUR} + StringControlCode scc = (StringControlCode)(SCC_BLUE + args.GetInt32(SCC_COLOUR)); + if (IsInsideMM(scc, SCC_BLUE, SCC_COLOUR)) builder.Utf8Encode(scc); + break; + } + default: builder.Utf8Encode(b); break; diff --git a/src/table/control_codes.h b/src/table/control_codes.h --- a/src/table/control_codes.h +++ b/src/table/control_codes.h @@ -114,6 +114,7 @@ enum StringControlCode { SCC_GRAY, SCC_DKBLUE, SCC_BLACK, + SCC_COLOUR, SCC_PUSH_COLOUR, SCC_POP_COLOUR, diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h --- a/src/table/strgen_tables.h +++ b/src/table/strgen_tables.h @@ -58,6 +58,7 @@ 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}, + {"COLOUR", EmitSingleChar, SCC_COLOUR, 1, -1, C_NONE}, {"PUSH_COLOUR", EmitSingleChar, SCC_PUSH_COLOUR, 0, -1, C_DONTCOUNT}, {"POP_COLOUR", EmitSingleChar, SCC_POP_COLOUR, 0, -1, C_DONTCOUNT},