summaryrefslogtreecommitdiff
path: root/src/strgen/strgen.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-10-18 20:35:59 +0000
committerglx <glx@openttd.org>2007-10-18 20:35:59 +0000
commitf6907db7088216bec78bf092f6d6db1a9b2e706e (patch)
tree679c53438421bed321195e97ced6e0a2e0b32a4a /src/strgen/strgen.cpp
parent4ce24d8a4044086c809d21ccfed63da9212258fc (diff)
downloadopenttd-f6907db7088216bec78bf092f6d6db1a9b2e706e.tar.xz
(svn r11293) -Fix: newgrf defined industry news messages use TTD format for args, which is not the same as our. So we must detect those strings and pass them the right params
Diffstat (limited to 'src/strgen/strgen.cpp')
-rw-r--r--src/strgen/strgen.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index cfae3814d..9b9c2dca3 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -1014,7 +1014,6 @@ static void WriteStringsH(const char *filename)
FILE *out;
int i;
int next = -1;
- int lastgrp;
out = fopen("tmp.xxx", "w");
if (out == NULL) fatal("can't open tmp.xxx");
@@ -1023,8 +1022,6 @@ static void WriteStringsH(const char *filename)
fprintf(out, "#ifndef TABLE_STRINGS_H\n");
fprintf(out, "#define TABLE_STRINGS_H\n");
- lastgrp = 0;
-
for (i = 0; i != lengthof(_strings); i++) {
if (_strings[i] != NULL) {
if (next != i) fprintf(out, "\n");
@@ -1033,6 +1030,8 @@ static void WriteStringsH(const char *filename)
}
}
+ fprintf(out, "\nstatic const StringID STR_LAST_STRINGID = 0x%X;\n", next - 1);
+
fprintf(out,
"\nenum {\n"
"\tLANGUAGE_PACK_IDENT = 0x474E414C, // Big Endian value for 'LANG' (LE is 0x 4C 41 4E 47)\n"