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

@@ -31,8 +31,8 @@
StoryPageElementID _new_story_page_element_id;
StoryPageID _new_story_page_id;
uint32 _story_page_element_next_sort_value;
uint32 _story_page_next_sort_value;
uint32_t _story_page_element_next_sort_value;
uint32_t _story_page_next_sort_value;
StoryPageElementPool _story_page_element_pool("StoryPageElement");
StoryPagePool _story_page_pool("StoryPage");
@@ -49,7 +49,7 @@ INSTANTIATE_POOL_METHODS(StoryPage)
* @param text The text parameter of the DoCommand proc
* @return true, if and only if the given parameters are valid for the given page element type and page id.
*/
static bool VerifyElementContentParameters(StoryPageID page_id, StoryPageElementType type, TileIndex tile, uint32 reference, const std::string &text)
static bool VerifyElementContentParameters(StoryPageID page_id, StoryPageElementType type, TileIndex tile, uint32_t reference, const std::string &text)
{
StoryPageButtonData button_data{ reference };
@@ -93,7 +93,7 @@ static bool VerifyElementContentParameters(StoryPageID page_id, StoryPageElement
* @param reference The reference parameter of the DoCommand proc (p2)
* @param text The text parameter of the DoCommand proc
*/
static void UpdateElement(StoryPageElement &pe, TileIndex tile, uint32 reference, const std::string &text)
static void UpdateElement(StoryPageElement &pe, TileIndex tile, uint32_t reference, const std::string &text)
{
switch (pe.type) {
case SPET_TEXT:
@@ -204,7 +204,7 @@ bool StoryPageButtonData::ValidateVehicleType() const
* @param text Title of the story page. Null is allowed in which case a generic page title is provided by OpenTTD.
* @return the cost of this operation or an error
*/
CommandCost CmdCreateStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdCreateStoryPage(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
if (!StoryPage::CanAllocateItem()) return CMD_ERROR;
@@ -250,7 +250,7 @@ CommandCost CmdCreateStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, u
* @param text Text content in case it is a text or location page element
* @return the cost of this operation or an error
*/
CommandCost CmdCreateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdCreateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
if (!StoryPageElement::CanAllocateItem()) return CMD_ERROR;
@@ -258,7 +258,7 @@ CommandCost CmdCreateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3
StoryPageElementType type = Extract<StoryPageElementType, 16, 8>(p1);
/* Allow at most 128 elements per page. */
uint16 element_count = 0;
uint16_t element_count = 0;
for (StoryPageElement *iter : StoryPageElement::Iterate()) {
if (iter->page == page_id) element_count++;
}
@@ -300,7 +300,7 @@ CommandCost CmdCreateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3
* @param text Text content in case it is a text or location page element
* @return the cost of this operation or an error
*/
CommandCost CmdUpdateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdUpdateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
StoryPageElementID page_element_id = (StoryPageElementID)GB(p1, 0, 16);
@@ -330,7 +330,7 @@ CommandCost CmdUpdateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3
* @param text title text of the story page.
* @return the cost of this operation or an error
*/
CommandCost CmdSetStoryPageTitle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdSetStoryPageTitle(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
if (_current_company != OWNER_DEITY) return CMD_ERROR;
StoryPageID page_id = (StoryPageID)GB(p1, 0, 16);
@@ -359,7 +359,7 @@ CommandCost CmdSetStoryPageTitle(TileIndex tile, DoCommandFlag flags, uint32 p1,
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdSetStoryPageDate(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdSetStoryPageDate(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
if (_current_company != OWNER_DEITY) return CMD_ERROR;
StoryPageID page_id = (StoryPageID)GB(p1, 0, 16);
@@ -386,7 +386,7 @@ CommandCost CmdSetStoryPageDate(TileIndex tile, DoCommandFlag flags, uint32 p1,
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdShowStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdShowStoryPage(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
if (_current_company != OWNER_DEITY) return CMD_ERROR;
StoryPageID page_id = (StoryPageID)GB(p1, 0, 16);
@@ -408,7 +408,7 @@ CommandCost CmdShowStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
* @param text unused.
* @return the cost of this operation or an error
*/
CommandCost CmdRemoveStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdRemoveStoryPage(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
if (_current_company != OWNER_DEITY) return CMD_ERROR;
StoryPageID page_id = (StoryPageID)p1;
@@ -441,7 +441,7 @@ CommandCost CmdRemoveStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, u
* @param text unused.
* @return the cost of this operation or an error
*/
CommandCost CmdRemoveStoryPageElement(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdRemoveStoryPageElement(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
if (_current_company != OWNER_DEITY) return CMD_ERROR;
StoryPageElementID page_element_id = (StoryPageElementID)p1;
@@ -468,7 +468,7 @@ CommandCost CmdRemoveStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3
* @param text Unused.
* @return The cost of the operation, or an error.
*/
CommandCost CmdStoryPageButton(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdStoryPageButton(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
StoryPageElementID page_element_id = (StoryPageElementID)GB(p1, 0, 16);