Mercurial > hg > openttd
annotate src/newgrf_text.h @ 13084:bf8ef2376932 draft
(svn r17584) -Codechange: split the NewGRF StringID mapping in a 'global' part and a part that's for NewGRF strings
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 20 Sep 2009 10:21:00 +0000 |
parents | bc7926153e19 |
children | a899d4e5ee1a |
rev | line source |
---|---|
5475
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
1 /* $Id$ */ |
10560
cd9f6490e2c3
(svn r14817) -Cleanup: unify the place where the @file header is placed
smatz <smatz@openttd.org>
parents:
8656
diff
changeset
|
2 |
12778
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11346
diff
changeset
|
3 /* |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11346
diff
changeset
|
4 * This file is part of OpenTTD. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11346
diff
changeset
|
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11346
diff
changeset
|
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11346
diff
changeset
|
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11346
diff
changeset
|
8 */ |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11346
diff
changeset
|
9 |
10560
cd9f6490e2c3
(svn r14817) -Cleanup: unify the place where the @file header is placed
smatz <smatz@openttd.org>
parents:
8656
diff
changeset
|
10 /** @file newgrf_text.h Header of Action 04 "universal holder" structure and functions */ |
cd9f6490e2c3
(svn r14817) -Cleanup: unify the place where the @file header is placed
smatz <smatz@openttd.org>
parents:
8656
diff
changeset
|
11 |
5475
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
12 #ifndef NEWGRF_TEXT_H |
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
13 #define NEWGRF_TEXT_H |
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
14 |
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
15 StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add, StringID def_string); |
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
16 StringID GetGRFStringID(uint32 grfid, uint16 stringid); |
8445
cfc312cfe346
(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 <peter1138@openttd.org>
parents:
7750
diff
changeset
|
17 const char *GetGRFStringPtr(uint16 stringid); |
6247
57363e064324
(svn r9050) -Codechange: Foo(void) -> Foo()
rubidium <rubidium@openttd.org>
parents:
5475
diff
changeset
|
18 void CleanUpStrings(); |
11346
1b8ff09217a8
(svn r15696) -Codechange: move the NewGRF language ID into the language file instead of maintaining a table in the code.
rubidium <rubidium@openttd.org>
parents:
10560
diff
changeset
|
19 void SetCurrentGrfLangID(byte language_id); |
8656
f591e76b106b
(svn r12317) -Fix [FS#1815]: Map string IDs that are embedded from other strings.
peter1138 <peter1138@openttd.org>
parents:
8445
diff
changeset
|
20 char *TranslateTTDPatchCodes(uint32 grfid, const char *str); |
5475
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
21 |
6873
608145365c5d
(svn r10114) -Fix: Only load newgrf error messages if the language matches the current
maedhros <maedhros@openttd.org>
parents:
6348
diff
changeset
|
22 bool CheckGrfLangID(byte lang_id, byte grf_version); |
608145365c5d
(svn r10114) -Fix: Only load newgrf error messages if the language matches the current
maedhros <maedhros@openttd.org>
parents:
6348
diff
changeset
|
23 |
7750
2df30880f88b
(svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka.
rubidium <rubidium@openttd.org>
parents:
7616
diff
changeset
|
24 void PrepareTextRefStackUsage(byte numEntries); |
7616
b1b321279552
(svn r11145) -Codechange: add support for "decoding" TTDPs string codes wrt to registers 0x100 to 0x10F.
rubidium <rubidium@openttd.org>
parents:
6873
diff
changeset
|
25 void StopTextRefStackUsage(); |
7750
2df30880f88b
(svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka.
rubidium <rubidium@openttd.org>
parents:
7616
diff
changeset
|
26 void SwitchToNormalRefStack(); |
2df30880f88b
(svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka.
rubidium <rubidium@openttd.org>
parents:
7616
diff
changeset
|
27 void SwitchToErrorRefStack(); |
2df30880f88b
(svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka.
rubidium <rubidium@openttd.org>
parents:
7616
diff
changeset
|
28 void RewindTextRefStack(); |
7616
b1b321279552
(svn r11145) -Codechange: add support for "decoding" TTDPs string codes wrt to registers 0x100 to 0x10F.
rubidium <rubidium@openttd.org>
parents:
6873
diff
changeset
|
29 uint RemapNewGRFStringControlCode(uint scc, char **buff, const char **str, int64 *argv); |
b1b321279552
(svn r11145) -Codechange: add support for "decoding" TTDPs string codes wrt to registers 0x100 to 0x10F.
rubidium <rubidium@openttd.org>
parents:
6873
diff
changeset
|
30 |
13084
bf8ef2376932
(svn r17584) -Codechange: split the NewGRF StringID mapping in a 'global' part and a part that's for NewGRF strings
rubidium <rubidium@openttd.org>
parents:
12778
diff
changeset
|
31 StringID TTDPStringIDToOTTDStringIDMapping(StringID string); |
bf8ef2376932
(svn r17584) -Codechange: split the NewGRF StringID mapping in a 'global' part and a part that's for NewGRF strings
rubidium <rubidium@openttd.org>
parents:
12778
diff
changeset
|
32 |
5475
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
33 #endif /* NEWGRF_TEXT_H */ |