Use window constants in mystery_gift_menu

This commit is contained in:
GriffinR
2022-09-29 15:48:19 -04:00
parent 5af7355fbd
commit fb87616e9d
5 changed files with 91 additions and 82 deletions

View File

@@ -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;
}