forked from mirror/OpenTTD
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include <utility>
|
||||
|
||||
/** 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 {
|
||||
@@ -29,21 +29,21 @@ 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 *GetGRFStringPtr(uint16 stringid);
|
||||
const char *GetGRFStringPtr(uint16_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();
|
||||
void RewindTextRefStack();
|
||||
bool UsingNewGRFTextStack();
|
||||
@@ -70,7 +70,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 */
|
||||
|
Reference in New Issue
Block a user