From fb87616e9d147de21fe2eba278f0f74737ebfc32 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 29 Sep 2022 15:48:19 -0400 Subject: [PATCH] Use window constants in mystery_gift_menu --- include/mystery_gift_menu.h | 4 +- src/ereader_screen.c | 14 ++-- src/mystery_gift_menu.c | 133 +++++++++++++++++++----------------- src/mystery_gift_view.c | 4 +- src/union_room.c | 18 ++--- 5 files changed, 91 insertions(+), 82 deletions(-) diff --git a/include/mystery_gift_menu.h b/include/mystery_gift_menu.h index dc30d3051..665c4596e 100644 --- a/include/mystery_gift_menu.h +++ b/include/mystery_gift_menu.h @@ -5,11 +5,11 @@ extern bool8 gGiftIsFromEReader; u16 GetMysteryGiftBaseBlock(void); void CB2_MysteryGiftEReader(void); -void PrintMysteryGiftOrEReaderTopMenu(bool8 isJapanese, bool32 usePickOkCancel); +void PrintMysteryGiftOrEReaderHeader(bool8 isJapanese, bool32 usePickOkCancel); void MG_DrawCheckerboardPattern(u32 bg); void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void); bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str); -void AddTextPrinterToWindow1(const u8 *src); +void MG_AddMessageTextPrinter(const u8 *src); void CB2_InitEReader(void); void CB2_InitMysteryGift(void); void MG_DrawTextBorder(u8 windowId); diff --git a/src/ereader_screen.c b/src/ereader_screen.c index b6bf7133a..8079c9900 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -342,7 +342,7 @@ static void Task_EReader(u8 taskId) case ER_STATE_MSG_SELECT_CONNECT: if (PrintMysteryGiftMenuMessage(&data->textState, gJPText_SelectConnectFromEReaderMenu)) { - AddTextPrinterToWindow1(gJPText_SelectConnectWithGBA); + MG_AddMessageTextPrinter(gJPText_SelectConnectWithGBA); ResetTimer(&data->timer); data->state = ER_STATE_MSG_SELECT_CONNECT_WAIT; } @@ -396,7 +396,7 @@ static void Task_EReader(u8 taskId) data->state = ER_STATE_MSG_SELECT_CONNECT; break; case ER_STATE_CONNECTING: - AddTextPrinterToWindow1(gJPText_Connecting); + MG_AddMessageTextPrinter(gJPText_Connecting); // XXX: This (u32 *) cast is discarding the const qualifier from gMultiBootProgram_EReader_Start EReader_Load(&gEReaderData, gMultiBootProgram_EReader_End - gMultiBootProgram_EReader_Start, (u32 *)gMultiBootProgram_EReader_Start); data->state = ER_STATE_TRANSFER; @@ -415,7 +415,7 @@ static void Task_EReader(u8 taskId) else if (data->status == TRANSFER_SUCCESS) { ResetTimer(&data->timer); - AddTextPrinterToWindow1(gJPText_PleaseWaitAMoment); + MG_AddMessageTextPrinter(gJPText_PleaseWaitAMoment); data->state = ER_STATE_TRANSFER_SUCCESS; } else // TRANSFER_CANCELED @@ -429,7 +429,7 @@ static void Task_EReader(u8 taskId) break; case ER_STATE_LOAD_CARD_START: OpenEReaderLink(); - AddTextPrinterToWindow1(gJPText_AllowEReaderToLoadCard); + MG_AddMessageTextPrinter(gJPText_AllowEReaderToLoadCard); data->state = ER_STATE_LOAD_CARD; break; case ER_STATE_LOAD_CARD: @@ -438,7 +438,7 @@ static void Task_EReader(u8 taskId) case RECV_ACTIVE: break; case RECV_SUCCESS: - AddTextPrinterToWindow1(gJPText_Connecting); + MG_AddMessageTextPrinter(gJPText_Connecting); data->state = ER_STATE_WAIT_RECV_CARD; break; case RECV_CANCELED: @@ -486,7 +486,7 @@ static void Task_EReader(u8 taskId) case ER_STATE_SAVE: if (TryWriteTrainerHill((struct EReaderTrainerHillSet *)&gDecompressionBuffer)) { - AddTextPrinterToWindow1(gJPText_ConnectionComplete); + MG_AddMessageTextPrinter(gJPText_ConnectionComplete); ResetTimer(&data->timer); data->state = ER_STATE_SUCCESS_MSG; } @@ -498,7 +498,7 @@ static void Task_EReader(u8 taskId) case ER_STATE_SUCCESS_MSG: if (UpdateTimer(&data->timer, 120)) { - AddTextPrinterToWindow1(gJPText_NewTrainerHasComeToHoenn); + MG_AddMessageTextPrinter(gJPText_NewTrainerHasComeToHoenn); PlayFanfare(MUS_OBTAIN_ITEM); data->state = ER_STATE_SUCCESS_END; } diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c index 9e4796bb2..9c8aea4d6 100644 --- a/src/mystery_gift_menu.c +++ b/src/mystery_gift_menu.c @@ -32,6 +32,12 @@ #include "wonder_news.h" #include "constants/cable_club.h" +enum { + WIN_HEADER, + WIN_MSG, + WIN_UNK, // Cleared, but nothing is ever apparently rendered on it +}; + #define LIST_MENU_TILE_NUM 10 #define LIST_MENU_PAL_NUM 224 @@ -98,7 +104,7 @@ static const struct BgTemplate sBGTemplates[] = { }; static const struct WindowTemplate sMainWindows[] = { - { + [WIN_HEADER] = { .bg = 0, .tilemapLeft = 0, .tilemapTop = 0, @@ -106,7 +112,8 @@ static const struct WindowTemplate sMainWindows[] = { .height = 2, .paletteNum = 12, .baseBlock = 0x0013 - }, { + }, + [WIN_MSG] = { .bg = 0, .tilemapLeft = 1, .tilemapTop = 15, @@ -114,7 +121,8 @@ static const struct WindowTemplate sMainWindows[] = { .height = 4, .paletteNum = 12, .baseBlock = 0x004f - }, { + }, + [WIN_UNK] = { .bg = 0, .tilemapLeft = 0, .tilemapTop = 15, @@ -224,7 +232,7 @@ static const struct ListMenuTemplate sListMenuTemplate_ThreeOptions = { .itemPrintFunc = NULL, .totalItems = 3, .maxShowed = 3, - .windowId = 0, + .windowId = 0, // Overwritten by DoMysteryGiftListMenu .header_X = 0, .item_X = 8, .cursor_X = 0, @@ -269,7 +277,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveSendToss = { .itemPrintFunc = NULL, .totalItems = 4, .maxShowed = 4, - .windowId = 0, + .windowId = 0, // Overwritten by DoMysteryGiftListMenu .header_X = 0, .item_X = 8, .cursor_X = 0, @@ -290,7 +298,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveToss = { .itemPrintFunc = NULL, .totalItems = 3, .maxShowed = 3, - .windowId = 0, + .windowId = 0, // Overwritten by DoMysteryGiftListMenu .header_X = 0, .item_X = 8, .cursor_X = 0, @@ -311,7 +319,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveSend = { .itemPrintFunc = NULL, .totalItems = 3, .maxShowed = 3, - .windowId = 0, + .windowId = 0, // Overwritten by DoMysteryGiftListMenu .header_X = 0, .item_X = 8, .cursor_X = 0, @@ -332,7 +340,7 @@ static const struct ListMenuTemplate sListMenu_Receive = { .itemPrintFunc = NULL, .totalItems = 2, .maxShowed = 2, - .windowId = 0, + .windowId = 0, // Overwritten by DoMysteryGiftListMenu .header_X = 0, .item_X = 8, .cursor_X = 0, @@ -354,9 +362,9 @@ static const u8 *const sUnusedMenuTexts[] = { gText_ReturnToTitle }; -ALIGNED(2) static const u8 sTextColors_TopMenu[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; -ALIGNED(2) static const u8 sTextColors_TopMenu_Copy[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; -ALIGNED(2) static const u8 sMG_Ereader_TextColor_2[] = { TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY }; +ALIGNED(2) static const u8 sTextColors_Header[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; +ALIGNED(2) static const u8 sTextColors_Header_Copy[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; +ALIGNED(2) static const u8 sMG_Ereader_TextColor_2[] = { TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY }; static void VBlankCB_MysteryGiftEReader(void) { @@ -420,7 +428,7 @@ static bool32 HandleMysteryGiftOrEReaderSetup(s32 isEReader) FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); FillBgTilemapBufferRect(2, 0x000, 0, 0, 32, 32, 0x11); MG_DrawCheckerboardPattern(3); - PrintMysteryGiftOrEReaderTopMenu(isEReader, FALSE); + PrintMysteryGiftOrEReaderHeader(isEReader, FALSE); gMain.state++; break; case 2: @@ -474,26 +482,27 @@ void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void) SetMainCallback2(CB2_InitTitleScreen); } -void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 useCancel) +// Print the text window at the top of the screen with the title and control instructions +void PrintMysteryGiftOrEReaderHeader(bool8 isEReader, bool32 useCancel) { - const u8 * header; + const u8 * title; const u8 * options; - FillWindowPixelBuffer(0, 0); + FillWindowPixelBuffer(WIN_HEADER, 0); if (!isEReader) { - header = gText_MysteryGift; + title = gText_MysteryGift; options = !useCancel ? gText_PickOKExit : gText_PickOKCancel; } else { - header = gJPText_MysteryGift; + title = gJPText_MysteryGift; options = gJPText_DecideStop; } - AddTextPrinterParameterized4(0, FONT_NORMAL, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SKIP_DRAW, header); - AddTextPrinterParameterized4(0, FONT_SMALL, GetStringRightAlignXOffset(FONT_SMALL, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SKIP_DRAW, options); - CopyWindowToVram(0, COPYWIN_GFX); - PutWindowTilemap(0); + AddTextPrinterParameterized4(WIN_HEADER, FONT_NORMAL, 4, 1, 0, 0, sTextColors_Header, TEXT_SKIP_DRAW, title); + AddTextPrinterParameterized4(WIN_HEADER, FONT_SMALL, GetStringRightAlignXOffset(FONT_SMALL, options, 0xDE), 1, 0, 0, sTextColors_Header, TEXT_SKIP_DRAW, options); + CopyWindowToVram(WIN_HEADER, COPYWIN_GFX); + PutWindowTilemap(WIN_HEADER); } void MG_DrawTextBorder(u8 windowId) @@ -533,21 +542,21 @@ static void ClearScreenInBg0(bool32 ignoreTopTwoRows) CopyBgTilemapBufferToVram(0); } -void AddTextPrinterToWindow1(const u8 *str) +void MG_AddMessageTextPrinter(const u8 *str) { StringExpandPlaceholders(gStringVar4, str); - FillWindowPixelBuffer(1, 0x11); - AddTextPrinterParameterized4(1, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); - DrawTextBorderOuter(1, 0x001, 0xF); - PutWindowTilemap(1); - CopyWindowToVram(1, COPYWIN_FULL); + FillWindowPixelBuffer(WIN_MSG, 0x11); + AddTextPrinterParameterized4(WIN_MSG, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); + DrawTextBorderOuter(WIN_MSG, 0x001, 0xF); + PutWindowTilemap(WIN_MSG); + CopyWindowToVram(WIN_MSG, COPYWIN_FULL); } -static void ClearTextWindow(void) +static void ClearMessage(void) { - rbox_fill_rectangle(1); - ClearWindowTilemap(1); - CopyWindowToVram(1, COPYWIN_MAP); + rbox_fill_rectangle(WIN_MSG); + ClearWindowTilemap(WIN_MSG); + CopyWindowToVram(WIN_MSG, COPYWIN_MAP); } #define DOWN_ARROW_X 208 @@ -558,18 +567,18 @@ bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str) switch (*textState) { case 0: - AddTextPrinterToWindow1(str); + MG_AddMessageTextPrinter(str); (*textState)++; break; case 1: - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); - if (({JOY_NEW(A_BUTTON | B_BUTTON);})) + DrawDownArrow(WIN_MSG, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + if (JOY_NEW(A_BUTTON | B_BUTTON)) (*textState)++; break; case 2: - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + DrawDownArrow(WIN_MSG, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); *textState = 0; - ClearTextWindow(); + ClearMessage(); return TRUE; case 0xFF: *textState = 2; @@ -580,12 +589,12 @@ bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str) static void HideDownArrow(void) { - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + DrawDownArrow(WIN_MSG, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); } static void ShowDownArrow(void) { - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + DrawDownArrow(WIN_MSG, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); } // Unused @@ -609,12 +618,12 @@ static bool32 HideDownArrowAndWaitButton(u8 * textState) static bool32 PrintStringAndWait2Seconds(u8 * counter, const u8 * str) { if (*counter == 0) - AddTextPrinterToWindow1(str); + MG_AddMessageTextPrinter(str); if (++(*counter) > 120) { *counter = 0; - ClearTextWindow(); + ClearMessage(); return TRUE; } else @@ -648,8 +657,8 @@ static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whi response = DoMysteryGiftListMenu(&windowTemplate, &listMenuTemplate, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); if (response != LIST_NOTHING_CHOSEN) { - ClearWindowTilemap(2); - CopyWindowToVram(2, COPYWIN_MAP); + ClearWindowTilemap(WIN_UNK); + CopyWindowToVram(WIN_UNK, COPYWIN_MAP); } return response; } @@ -865,7 +874,7 @@ static bool32 SaveOnMysteryGiftMenu(u8 * state) switch (*state) { case 0: - AddTextPrinterToWindow1(gText_DataWillBeSaved); + MG_AddMessageTextPrinter(gText_DataWillBeSaved); (*state)++; break; case 1: @@ -873,7 +882,7 @@ static bool32 SaveOnMysteryGiftMenu(u8 * state) (*state)++; break; case 2: - AddTextPrinterToWindow1(gText_SaveCompletedPressA); + MG_AddMessageTextPrinter(gText_SaveCompletedPressA); (*state)++; break; case 3: @@ -882,7 +891,7 @@ static bool32 SaveOnMysteryGiftMenu(u8 * state) break; case 4: *state = 0; - ClearTextWindow(); + ClearMessage(); return TRUE; } @@ -967,7 +976,7 @@ static bool32 PrintSuccessMessage(u8 * state, const u8 * msg, u16 * timer) { case 0: if (msg != NULL) - AddTextPrinterToWindow1(msg); + MG_AddMessageTextPrinter(msg); PlayFanfare(MUS_OBTAIN_ITEM); *timer = 0; (*state)++; @@ -980,7 +989,7 @@ static bool32 PrintSuccessMessage(u8 * state, const u8 * msg, u16 * timer) if (IsFanfareTaskInactive()) { *state = 0; - ClearTextWindow(); + ClearMessage(); return TRUE; } break; @@ -1161,7 +1170,7 @@ static void Task_MysteryGift(u8 taskId) if (PrintMysteryGiftMenuMessage(&data->textState, gText_DontHaveCardNewOneInput)) { data->state = MG_STATE_SOURCE_PROMPT; - PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); + PrintMysteryGiftOrEReaderHeader(FALSE, TRUE); } } else @@ -1169,16 +1178,16 @@ static void Task_MysteryGift(u8 taskId) if (PrintMysteryGiftMenuMessage(&data->textState, gText_DontHaveNewsNewOneInput)) { data->state = MG_STATE_SOURCE_PROMPT; - PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); + PrintMysteryGiftOrEReaderHeader(FALSE, TRUE); } } break; } case MG_STATE_SOURCE_PROMPT: if (!data->isWonderNews) - AddTextPrinterToWindow1(gText_WhereShouldCardBeAccessed); + MG_AddMessageTextPrinter(gText_WhereShouldCardBeAccessed); else - AddTextPrinterToWindow1(gText_WhereShouldNewsBeAccessed); + MG_AddMessageTextPrinter(gText_WhereShouldNewsBeAccessed); data->state = MG_STATE_SOURCE_PROMPT_INPUT; break; case MG_STATE_SOURCE_PROMPT_INPUT: @@ -1186,17 +1195,17 @@ static void Task_MysteryGift(u8 taskId) switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->var, TRUE)) { case 0: // "Wireless Communication" - ClearTextWindow(); + ClearMessage(); data->state = MG_STATE_CLIENT_LINK_START; data->sourceIsFriend = FALSE; break; case 1: // "Friend" - ClearTextWindow(); + ClearMessage(); data->state = MG_STATE_CLIENT_LINK_START; data->sourceIsFriend = TRUE; break; case LIST_CANCEL: - ClearTextWindow(); + ClearMessage(); if (ValidateCardOrNews(data->isWonderNews)) { data->state = MG_STATE_LOAD_GIFT; @@ -1204,7 +1213,7 @@ static void Task_MysteryGift(u8 taskId) else { data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + PrintMysteryGiftOrEReaderHeader(FALSE, FALSE); } break; } @@ -1246,7 +1255,7 @@ static void Task_MysteryGift(u8 taskId) } break; case MG_STATE_CLIENT_COMMUNICATING: - AddTextPrinterToWindow1(gText_Communicating); + MG_AddMessageTextPrinter(gText_Communicating); data->state = MG_STATE_CLIENT_LINK; break; case MG_STATE_CLIENT_LINK: @@ -1379,7 +1388,7 @@ static void Task_MysteryGift(u8 taskId) { // Did not receive card/news, return to main menu data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + PrintMysteryGiftOrEReaderHeader(FALSE, FALSE); } else { @@ -1500,7 +1509,7 @@ static void Task_MysteryGift(u8 taskId) if (PrintThrownAway(&data->textState, data->isWonderNews)) { data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + PrintMysteryGiftOrEReaderHeader(FALSE, FALSE); } break; case MG_STATE_GIFT_INPUT_EXIT: @@ -1546,12 +1555,12 @@ static void Task_MysteryGift(u8 taskId) if (!data->isWonderNews) { - AddTextPrinterToWindow1(gText_SendingWonderCard); + MG_AddMessageTextPrinter(gText_SendingWonderCard); MysterGiftServer_CreateForCard(); } else { - AddTextPrinterToWindow1(gText_SendingWonderNews); + MG_AddMessageTextPrinter(gText_SendingWonderNews); MysterGiftServer_CreateForNews(); } data->state = MG_STATE_SERVER_LINK; @@ -1586,7 +1595,7 @@ static void Task_MysteryGift(u8 taskId) else { data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + PrintMysteryGiftOrEReaderHeader(FALSE, FALSE); } } break; @@ -1595,7 +1604,7 @@ static void Task_MysteryGift(u8 taskId) if (PrintMysteryGiftMenuMessage(&data->textState, gText_CommunicationError)) { data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + PrintMysteryGiftOrEReaderHeader(FALSE, FALSE); } break; case MG_STATE_EXIT: diff --git a/src/mystery_gift_view.c b/src/mystery_gift_view.c index b059b183c..a1e294f23 100644 --- a/src/mystery_gift_view.c +++ b/src/mystery_gift_view.c @@ -310,7 +310,7 @@ s32 WonderCard_Exit(bool32 useCancel) FreeMonIconPalettes(); break; case 5: - PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, useCancel); + PrintMysteryGiftOrEReaderHeader(gGiftIsFromEReader, useCancel); CopyBgTilemapBufferToVram(0); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); break; @@ -785,7 +785,7 @@ s32 WonderNews_Exit(bool32 useCancel) } break; case 5: - PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, useCancel); + PrintMysteryGiftOrEReaderHeader(gGiftIsFromEReader, useCancel); MG_DrawCheckerboardPattern(3); CopyBgTilemapBufferToVram(0); CopyBgTilemapBufferToVram(3); diff --git a/src/union_room.c b/src/union_room.c index b47ddb41c..1396aa224 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1927,7 +1927,7 @@ static void Task_SendMysteryGift(u8 taskId) data->state = 3; break; case 3: - AddTextPrinterToWindow1(gStringVar4); + MG_AddMessageTextPrinter(gStringVar4); data->state = 4; break; case 4: @@ -2001,7 +2001,7 @@ static void Task_SendMysteryGift(u8 taskId) } break; case 9: - AddTextPrinterToWindow1(gStringVar4); + MG_AddMessageTextPrinter(gStringVar4); data->state = 10; break; case 10: @@ -2104,7 +2104,7 @@ static void Task_CardOrNewsWithFriend(u8 taskId) data->state = 1; break; case 1: - AddTextPrinterToWindow1(sText_ChooseTrainer); + MG_AddMessageTextPrinter(sText_ChooseTrainer); data->state = 2; break; case 2: @@ -2177,7 +2177,7 @@ static void Task_CardOrNewsWithFriend(u8 taskId) } break; case 4: - AddTextPrinterToWindow1(sText_AwaitingPlayersResponse); + MG_AddMessageTextPrinter(sText_AwaitingPlayersResponse); CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->leaderId]); data->state = 5; break; @@ -2196,7 +2196,7 @@ static void Task_CardOrNewsWithFriend(u8 taskId) data->state = 8; break; case RFU_STATUS_JOIN_GROUP_OK: - AddTextPrinterToWindow1(sText_PlayerSentBackOK); + MG_AddMessageTextPrinter(sText_PlayerSentBackOK); RfuSetStatus(RFU_STATUS_OK, 0); break; } @@ -2224,7 +2224,7 @@ static void Task_CardOrNewsWithFriend(u8 taskId) break; case 7: DestroyWirelessStatusIndicatorSprite(); - AddTextPrinterToWindow1(sText_PleaseStartOver); + MG_AddMessageTextPrinter(sText_PleaseStartOver); DestroyTask(taskId); LinkRfu_Shutdown(); gSpecialVar_Result = LINKUP_FAILED; @@ -2273,7 +2273,7 @@ static void Task_CardOrNewsOverWireless(u8 taskId) data->state = 1; break; case 1: - AddTextPrinterToWindow1(sText_SearchingForWirelessSystemWait); + MG_AddMessageTextPrinter(sText_SearchingForWirelessSystemWait); data->state = 2; break; case 2: @@ -2342,7 +2342,7 @@ static void Task_CardOrNewsOverWireless(u8 taskId) } break; case 4: - AddTextPrinterToWindow1(sText_AwaitingResponseFromWirelessSystem); + MG_AddMessageTextPrinter(sText_AwaitingResponseFromWirelessSystem); CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->leaderId]); data->state = 5; break; @@ -2361,7 +2361,7 @@ static void Task_CardOrNewsOverWireless(u8 taskId) data->state = 8; break; case RFU_STATUS_JOIN_GROUP_OK: - AddTextPrinterToWindow1(sText_WirelessLinkEstablished); + MG_AddMessageTextPrinter(sText_WirelessLinkEstablished); RfuSetStatus(RFU_STATUS_OK, 0); break; }