diff options
author | frosch <frosch@openttd.org> | 2009-11-28 20:27:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-11-28 20:27:42 +0000 |
commit | bf0b72ae9e907143455225a2a5ea68229b83e9b6 (patch) | |
tree | 8fb72f7950503cd96b1195f1851b10d7311d712d | |
parent | ae97bf029c7bdc52db4ed8acf6288b86acf6ad42 (diff) | |
download | openttd-bf0b72ae9e907143455225a2a5ea68229b83e9b6.tar.xz |
(svn r18329) -Remove: [strgen] Support for {SETX} and {SETXY}. Let it rest in peace as NewGRF relict.
-rw-r--r-- | src/strgen/strgen.cpp | 30 | ||||
-rw-r--r-- | src/table/strgen_tables.h | 6 |
2 files changed, 1 insertions, 35 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index a871a3266..1260a056e 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -239,30 +239,6 @@ static void EmitSingleChar(char *buf, int value) } -static void EmitSetX(char *buf, int value) -{ - char *err; - int x = strtol(buf, &err, 0); - if (*err != '\0') error("SetX param invalid"); - PutUtf8(SCC_SETX); - PutByte((byte)x); -} - - -static void EmitSetXY(char *buf, int value) -{ - char *err; - - int x = strtol(buf, &err, 0); - if (*err != ' ') error("SetXY param invalid"); - int y = strtol(err + 1, &err, 0); - if (*err != 0) error("SetXY param invalid"); - - PutUtf8(SCC_SETXY); - PutByte((byte)x); - PutByte((byte)y); -} - /* The plural specifier looks like * {NUM} {PLURAL -1 passenger passengers} then it picks either passenger/passengers depending on the count in NUM */ @@ -1228,11 +1204,7 @@ int CDECL main(int argc, char *argv[]) break; default: - if (cs->proc == EmitSetX) { - flags = '1'; // Command needs one parameter - } else if (cs->proc == EmitSetXY) { - flags = '2'; // Command needs two parameters - } else if (cs->proc == EmitGender) { + if (cs->proc == EmitGender) { flags = 'g'; // Command needs number of parameters defined by number of genders } else if (cs->proc == EmitPlural) { flags = 'p'; // Command needs number of parameters defined by plural value diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h index 5c12557c0..8140d1c00 100644 --- a/src/table/strgen_tables.h +++ b/src/table/strgen_tables.h @@ -28,17 +28,11 @@ struct CmdStruct { CmdFlags flags; }; -static void EmitSetX(char *buf, int value); -static void EmitSetXY(char *buf, int value); static void EmitSingleChar(char *buf, int value); static void EmitPlural(char *buf, int value); static void EmitGender(char *buf, int value); static const CmdStruct _cmd_structs[] = { - /* Update position */ - {"SETX", EmitSetX, SCC_SETX, 0, C_NONE}, - {"SETXY", EmitSetXY, SCC_SETXY, 0, C_NONE}, - /* Font size */ {"TINYFONT", EmitSingleChar, SCC_TINYFONT, 0, C_NONE}, {"BIGFONT", EmitSingleChar, SCC_BIGFONT, 0, C_NONE}, |