2006-04-21 04:00:20 +01:00
|
|
|
/* $Id$ */
|
2009-01-03 22:20:18 +00:00
|
|
|
|
2009-08-21 21:21:05 +01:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2009-01-03 22:20:18 +00:00
|
|
|
/** @file newgrf_text.h Header of Action 04 "universal holder" structure and functions */
|
|
|
|
|
2006-04-21 04:00:20 +01:00
|
|
|
#ifndef NEWGRF_TEXT_H
|
|
|
|
#define NEWGRF_TEXT_H
|
|
|
|
|
2010-01-15 16:41:15 +00:00
|
|
|
#include "strings_type.h"
|
|
|
|
|
2006-05-11 17:27:46 +01:00
|
|
|
StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add, StringID def_string);
|
2006-04-21 04:00:20 +01:00
|
|
|
StringID GetGRFStringID(uint32 grfid, uint16 stringid);
|
2008-01-29 17:09:00 +00:00
|
|
|
const char *GetGRFStringPtr(uint16 stringid);
|
2007-03-07 11:47:46 +00:00
|
|
|
void CleanUpStrings();
|
2009-03-13 00:30:26 +00:00
|
|
|
void SetCurrentGrfLangID(byte language_id);
|
2008-02-29 08:48:01 +00:00
|
|
|
char *TranslateTTDPatchCodes(uint32 grfid, const char *str);
|
2006-04-21 04:00:20 +01:00
|
|
|
|
2007-06-12 14:22:14 +01:00
|
|
|
bool CheckGrfLangID(byte lang_id, byte grf_version);
|
|
|
|
|
2007-10-17 21:09:16 +01:00
|
|
|
void PrepareTextRefStackUsage(byte numEntries);
|
2007-09-23 00:55:34 +01:00
|
|
|
void StopTextRefStackUsage();
|
2007-10-17 21:09:16 +01:00
|
|
|
void SwitchToNormalRefStack();
|
|
|
|
void SwitchToErrorRefStack();
|
|
|
|
void RewindTextRefStack();
|
2010-04-06 22:16:36 +01:00
|
|
|
uint RemapNewGRFStringControlCode(uint scc, char *buf_start, char **buff, const char **str, int64 *argv);
|
2007-09-23 00:55:34 +01:00
|
|
|
|
2009-09-20 11:21:00 +01:00
|
|
|
StringID TTDPStringIDToOTTDStringIDMapping(StringID string);
|
|
|
|
|
2006-04-21 04:00:20 +01:00
|
|
|
#endif /* NEWGRF_TEXT_H */
|