diff options
author | rubidium <rubidium@openttd.org> | 2009-11-19 13:53:54 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-11-19 13:53:54 +0000 |
commit | 2f0b1ef5f136bd32fd7be8253c034048e59a490e (patch) | |
tree | 1e00d989610c6967ef7a271db370bf4a826fa7e3 /src/table | |
parent | 4987d97810a74dc1b070e44fd15a6943fb7dfaab (diff) | |
download | openttd-2f0b1ef5f136bd32fd7be8253c034048e59a490e.tar.xz |
(svn r18181) -Add: the concept of zero filled numbers to strgen
Diffstat (limited to 'src/table')
-rw-r--r-- | src/table/control_codes.h | 1 | ||||
-rw-r--r-- | src/table/strgen_tables.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/table/control_codes.h b/src/table/control_codes.h index dea4ff822..cf533847a 100644 --- a/src/table/control_codes.h +++ b/src/table/control_codes.h @@ -72,6 +72,7 @@ enum StringControlCode { SCC_STRING, SCC_COMMA, SCC_NUM, + SCC_ZEROFILL_NUM, SCC_HEX, SCC_BYTES, diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h index 8aae5cf3e..5c12557c0 100644 --- a/src/table/strgen_tables.h +++ b/src/table/strgen_tables.h @@ -99,6 +99,7 @@ static const CmdStruct _cmd_structs[] = { /* Numbers */ {"COMMA", EmitSingleChar, SCC_COMMA, 1, C_NONE}, // Number with comma {"NUM", EmitSingleChar, SCC_NUM, 1, C_NONE}, // Signed number + {"ZEROFILL_NUM", EmitSingleChar, SCC_ZEROFILL_NUM, 2, C_NONE}, // Unsigned number with zero fill, e.g. "02". First parameter is number, second minimum length {"BYTES", EmitSingleChar, SCC_BYTES, 1, C_NONE}, // Unsigned number with "bytes", i.e. "1.02 MiB or 123 KiB" {"CURRENCY", EmitSingleChar, SCC_CURRENCY, 1, C_NONE}, |