Adding of _t to (u)int types, and WChar to char32_t

See: eaae0bb5e
This commit is contained in:
Jonathan G Rennison
2024-01-07 16:41:53 +00:00
parent 55d78a23be
commit 97e6f3062e
655 changed files with 7555 additions and 7555 deletions

View File

@@ -18,7 +18,7 @@
#include <string>
/** This character, the thorn ('þ'), indicates a unicode string to NFO. */
static const WChar NFO_UTF8_IDENTIFIER = 0x00DE;
static const char32_t NFO_UTF8_IDENTIFIER = 0x00DE;
/** A GRF text with associated language ID. */
struct GRFText {
@@ -31,23 +31,23 @@ typedef std::vector<GRFText> GRFTextList;
/** Reference counted wrapper around a GRFText pointer. */
typedef std::shared_ptr<GRFTextList> GRFTextWrapper;
StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, bool allow_newlines, const char *text_to_add, StringID def_string);
StringID GetGRFStringID(uint32 grfid, StringID stringid);
StringID AddGRFString(uint32_t grfid, uint16_t stringid, byte langid, bool new_scheme, bool allow_newlines, const char *text_to_add, StringID def_string);
StringID GetGRFStringID(uint32_t grfid, StringID stringid);
const char *GetGRFStringFromGRFText(const GRFTextList &text_list);
const char *GetGRFStringFromGRFText(const GRFTextWrapper &text);
const char *GetDefaultLangGRFStringFromGRFText(const GRFTextList &text_list);
const char *GetDefaultLangGRFStringFromGRFText(const GRFTextWrapper &text);
const char *GetGRFStringPtr(uint32 stringid);
const char *GetGRFStringPtr(uint32_t stringid);
void CleanUpStrings();
void SetCurrentGrfLangID(byte language_id);
std::string TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, bool allow_newlines, const std::string &str, StringControlCode byte80 = SCC_NEWGRF_PRINT_WORD_STRING_ID);
void AddGRFTextToList(GRFTextList &list, byte langid, uint32 grfid, bool allow_newlines, const char *text_to_add);
void AddGRFTextToList(GRFTextWrapper &list, byte langid, uint32 grfid, bool allow_newlines, const char *text_to_add);
std::string TranslateTTDPatchCodes(uint32_t grfid, uint8_t language_id, bool allow_newlines, const std::string &str, StringControlCode byte80 = SCC_NEWGRF_PRINT_WORD_STRING_ID);
void AddGRFTextToList(GRFTextList &list, byte langid, uint32_t grfid, bool allow_newlines, const char *text_to_add);
void AddGRFTextToList(GRFTextWrapper &list, byte langid, uint32_t grfid, bool allow_newlines, const char *text_to_add);
void AddGRFTextToList(GRFTextWrapper &list, const std::string &text_to_add);
bool CheckGrfLangID(byte lang_id, byte grf_version);
void StartTextRefStackUsage(const struct GRFFile *grffile, byte numEntries, const uint32 *values = nullptr);
void StartTextRefStackUsage(const struct GRFFile *grffile, byte numEntries, const uint32_t *values = nullptr);
void StopTextRefStackUsage();
bool UsingNewGRFTextStack();
struct TextRefStack *CreateTextRefStackBackup();
@@ -76,7 +76,7 @@ struct LanguageMap {
int GetMapping(int newgrf_id, bool gender) const;
int GetReverseMapping(int openttd_id, bool gender) const;
static const LanguageMap *GetLanguageMap(uint32 grfid, uint8 language_id);
static const LanguageMap *GetLanguageMap(uint32_t grfid, uint8_t language_id);
};
#endif /* NEWGRF_TEXT_H */