(svn r5952) - struct GRFText{Entry,} are private to newgrf_text.c

- use a variable size array instead of another malloc()
This commit is contained in:
tron
2006-08-19 16:30:05 +00:00
parent 3e087242a7
commit a2129f3799
2 changed files with 32 additions and 34 deletions

View File

@@ -6,31 +6,6 @@
* Header of Action 04 "universal holder" structure and functions
*/
/**
* Element of the linked list.
* Each of those elements represent the string,
* but according to a different lang.
*/
typedef struct GRFText {
byte langid;
char *text;
struct GRFText *next;
} GRFText;
/**
* Holder of the above structure.
* Putting both grfid and stringid togueter allow us to avoid duplicates,
* since it is NOT SUPPOSED to happen.
*/
typedef struct GRFTextEntry {
uint32 grfid;
uint16 stringid;
StringID def_string;
GRFText *textholder;
} GRFTextEntry;
StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add, StringID def_string);
StringID GetGRFStringID(uint32 grfid, uint16 stringid);
char *GetGRFString(char *buff, uint16 stringid);