src/newgrf_text.h
author terom@frrb.lan
Fri, 19 Dec 2008 01:38:09 +0200
changeset 10439 50f056aa3024
parent 8656 9731ddde8722
permissions -rw-r--r--
industries, unmoveables... everything but the landscape
3601
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff changeset
     1
/* $Id$ */
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff changeset
     2
#ifndef NEWGRF_TEXT_H
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff changeset
     3
#define NEWGRF_TEXT_H
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff changeset
     4
6348
6dd01da7a02b (svn r9385) -Cleanup: doxygen changes. Today, we are exploring the letter N.
belugas
parents: 6247
diff changeset
     5
/** @file newgrf_text.h
3601
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff changeset
     6
 * Header of Action 04 "universal holder" structure and functions
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff changeset
     7
 */
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff changeset
     8
3821
57db5bab0f24 (svn r4832) - NewGRF: add support for original string ID to newgrf text handling. So far, this is used for vehicles when no English or American translation is provided.
peter1138
parents: 3641
diff changeset
     9
StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add, StringID def_string);
3601
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff changeset
    10
StringID GetGRFStringID(uint32 grfid, uint16 stringid);
8445
54a5d84d1d7d (svn r12015) -Fix [FS#1716] (Revert r11422): Patch in FS#1430 avoided instead of fixed the problem. GetStringWithArgs() discards information that SCC_GENDER_LIST needs to work. Now use pointers to retrieve GRF strings, so that GetStringPtr() will work correctly. This is advantageous as now no buffer copy is made when using all GRF strings.
peter1138
parents: 7750
diff changeset
    11
const char *GetGRFStringPtr(uint16 stringid);
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 5475
diff changeset
    12
void CleanUpStrings();
3601
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff changeset
    13
void SetCurrentGrfLangID(const char *iso_name);
8656
9731ddde8722 (svn r12317) -Fix [FS#1815]: Map string IDs that are embedded from other strings.
peter1138
parents: 8445
diff changeset
    14
char *TranslateTTDPatchCodes(uint32 grfid, const char *str);
3601
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff changeset
    15
6873
b4d0648edd29 (svn r10114) -Fix: Only load newgrf error messages if the language matches the current
maedhros
parents: 6348
diff changeset
    16
bool CheckGrfLangID(byte lang_id, byte grf_version);
b4d0648edd29 (svn r10114) -Fix: Only load newgrf error messages if the language matches the current
maedhros
parents: 6348
diff changeset
    17
7750
7afbef1235e0 (svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka.
rubidium
parents: 7616
diff changeset
    18
void PrepareTextRefStackUsage(byte numEntries);
7616
ebf15b08ac38 (svn r11145) -Codechange: add support for "decoding" TTDPs string codes wrt to registers 0x100 to 0x10F.
rubidium
parents: 6873
diff changeset
    19
void StopTextRefStackUsage();
7750
7afbef1235e0 (svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka.
rubidium
parents: 7616
diff changeset
    20
void SwitchToNormalRefStack();
7afbef1235e0 (svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka.
rubidium
parents: 7616
diff changeset
    21
void SwitchToErrorRefStack();
7afbef1235e0 (svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka.
rubidium
parents: 7616
diff changeset
    22
void RewindTextRefStack();
7616
ebf15b08ac38 (svn r11145) -Codechange: add support for "decoding" TTDPs string codes wrt to registers 0x100 to 0x10F.
rubidium
parents: 6873
diff changeset
    23
uint RemapNewGRFStringControlCode(uint scc, char **buff, const char **str, int64 *argv);
ebf15b08ac38 (svn r11145) -Codechange: add support for "decoding" TTDPs string codes wrt to registers 0x100 to 0x10F.
rubidium
parents: 6873
diff changeset
    24
3601
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff changeset
    25
#endif /* NEWGRF_TEXT_H */