Streamline pointer notation (#2139)

This commit is contained in:
Bassoonian
2025-05-16 13:04:44 +02:00
committed by GitHub
parent 74bf498aaa
commit 16357c7e29
89 changed files with 406 additions and 406 deletions
+20 -20
View File
@@ -64,7 +64,7 @@ struct MysteryGiftTaskData
bool8 isWonderNews;
bool8 sourceIsFriend;
u8 msgId;
u8 * clientMsg;
u8 *clientMsg;
};
static const struct BgTemplate sBGTemplates[] = {
@@ -485,8 +485,8 @@ void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void)
// Print the text window at the top of the screen with the title and control instructions
void PrintMysteryGiftOrEReaderHeader(bool8 isEReader, bool32 useCancel)
{
const u8 * title;
const u8 * options;
const u8 *title;
const u8 *options;
FillWindowPixelBuffer(WIN_HEADER, 0);
if (!isEReader)
{
@@ -597,7 +597,7 @@ static void ShowDownArrow(void)
DrawDownArrow(WIN_MSG, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]);
}
static bool32 UNUSED HideDownArrowAndWaitButton(u8 * textState)
static bool32 UNUSED HideDownArrowAndWaitButton(u8 *textState)
{
switch (*textState)
{
@@ -614,7 +614,7 @@ static bool32 UNUSED HideDownArrowAndWaitButton(u8 * textState)
return FALSE;
}
static bool32 PrintStringAndWait2Seconds(u8 * counter, const u8 * str)
static bool32 PrintStringAndWait2Seconds(u8 *counter, const u8 *str)
{
if (*counter == 0)
MG_AddMessageTextPrinter(str);
@@ -631,7 +631,7 @@ static bool32 PrintStringAndWait2Seconds(u8 * counter, const u8 * str)
}
}
static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whichMenu)
static u32 MysteryGift_HandleThreeOptionMenu(u8 *unused0, u16 *unused1, u8 whichMenu)
{
struct ListMenuTemplate listMenuTemplate = sListMenuTemplate_ThreeOptions;
struct WindowTemplate windowTemplate = sWindowTemplate_ThreeOptions;
@@ -662,7 +662,7 @@ static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whi
return response;
}
s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, const u8 * str)
s8 DoMysteryGiftYesNo(u8 *textState, u16 *windowId, bool8 yesNoBoxPlacement, const u8 *str)
{
struct WindowTemplate windowTemplate;
s8 input;
@@ -719,7 +719,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c
}
// Handle the "Receive/Send/Toss" menu that appears when selecting Wonder Card/News
static s32 HandleGiftSelectMenu(u8 * textState, u16 * windowId, bool32 cannotToss, bool32 cannotSend)
static s32 HandleGiftSelectMenu(u8 *textState, u16 *windowId, bool32 cannotToss, bool32 cannotSend)
{
struct WindowTemplate UNUSED windowTemplate;
s32 input;
@@ -786,7 +786,7 @@ static bool32 ValidateCardOrNews(bool32 isWonderNews)
return ValidateSavedWonderNews();
}
static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 isWonderNews)
static bool32 HandleLoadWonderCardOrNews(u8 *state, bool32 isWonderNews)
{
switch (*state)
{
@@ -852,7 +852,7 @@ static bool32 ExitWonderCardOrNews(bool32 isWonderNews, bool32 useCancel)
}
}
static s32 AskDiscardGift(u8 * textState, u16 * windowId, bool32 isWonderNews)
static s32 AskDiscardGift(u8 *textState, u16 *windowId, bool32 isWonderNews)
{
if (!isWonderNews)
return DoMysteryGiftYesNo(textState, windowId, TRUE, gText_IfThrowAwayCardEventWontHappen);
@@ -860,7 +860,7 @@ static s32 AskDiscardGift(u8 * textState, u16 * windowId, bool32 isWonderNews)
return DoMysteryGiftYesNo(textState, windowId, TRUE, gText_OkayToDiscardNews);
}
static bool32 PrintThrownAway(u8 * textState, bool32 isWonderNews)
static bool32 PrintThrownAway(u8 *textState, bool32 isWonderNews)
{
if (!isWonderNews)
return PrintMysteryGiftMenuMessage(textState, gText_WonderCardThrownAway);
@@ -868,7 +868,7 @@ static bool32 PrintThrownAway(u8 * textState, bool32 isWonderNews)
return PrintMysteryGiftMenuMessage(textState, gText_WonderNewsThrownAway);
}
static bool32 SaveOnMysteryGiftMenu(u8 * state)
static bool32 SaveOnMysteryGiftMenu(u8 *state)
{
switch (*state)
{
@@ -897,9 +897,9 @@ static bool32 SaveOnMysteryGiftMenu(u8 * state)
return FALSE;
}
static const u8 * GetClientResultMessage(bool32 * successMsg, bool8 isWonderNews, bool8 sourceIsFriend, u32 msgId)
static const u8 * GetClientResultMessage(bool32 *successMsg, bool8 isWonderNews, bool8 sourceIsFriend, u32 msgId)
{
const u8 * msg = NULL;
const u8 *msg = NULL;
*successMsg = FALSE;
switch (msgId)
@@ -969,7 +969,7 @@ static const u8 * GetClientResultMessage(bool32 * successMsg, bool8 isWonderNews
return msg;
}
static bool32 PrintSuccessMessage(u8 * state, const u8 * msg, u16 * timer)
static bool32 PrintSuccessMessage(u8 *state, const u8 *msg, u16 *timer)
{
switch (*state)
{
@@ -996,9 +996,9 @@ static bool32 PrintSuccessMessage(u8 * state, const u8 * msg, u16 * timer)
return FALSE;
}
static const u8 * GetServerResultMessage(bool32 * wonderSuccess, bool8 sourceIsFriend, u32 msgId)
static const u8 * GetServerResultMessage(bool32 *wonderSuccess, bool8 sourceIsFriend, u32 msgId)
{
const u8 * result = gText_CommunicationError;
const u8 *result = gText_CommunicationError;
*wonderSuccess = FALSE;
switch (msgId)
{
@@ -1053,10 +1053,10 @@ static const u8 * GetServerResultMessage(bool32 * wonderSuccess, bool8 sourceIsF
return result;
}
static bool32 PrintServerResultMessage(u8 * state, u16 * timer, bool8 sourceIsFriend, u32 msgId)
static bool32 PrintServerResultMessage(u8 *state, u16 *timer, bool8 sourceIsFriend, u32 msgId)
{
bool32 wonderSuccess;
const u8 * str = GetServerResultMessage(&wonderSuccess, sourceIsFriend, msgId);
const u8 *str = GetServerResultMessage(&wonderSuccess, sourceIsFriend, msgId);
if (wonderSuccess)
return PrintSuccessMessage(state, str, timer);
else
@@ -1111,7 +1111,7 @@ enum {
static void CreateMysteryGiftTask(void)
{
u8 taskId = CreateTask(Task_MysteryGift, 0);
struct MysteryGiftTaskData * data = (void *)gTasks[taskId].data;
struct MysteryGiftTaskData *data = (void *)gTasks[taskId].data;
data->state = MG_STATE_TO_MAIN_MENU;
data->textState = 0;
data->unused4 = 0;