summaryrefslogtreecommitdiff
path: root/src/ereader_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ereader_screen.c')
-rwxr-xr-xsrc/ereader_screen.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/ereader_screen.c b/src/ereader_screen.c
index f5edbc628..73a1b870e 100755
--- a/src/ereader_screen.c
+++ b/src/ereader_screen.c
@@ -4,7 +4,7 @@
#include "ereader_helpers.h"
#include "link.h"
#include "main.h"
-#include "mystery_gift.h"
+#include "mystery_gift_menu.h"
#include "save.h"
#include "sound.h"
#include "sprite.h"
@@ -13,7 +13,7 @@
#include "util.h"
#include "constants/songs.h"
-struct Unk81D5014
+struct EReaderTaskData
{
u16 unk0;
u16 unk2;
@@ -36,7 +36,7 @@ struct Unk03006370
u32 *unk8;
};
-static void sub_81D5084(u8);
+static void Task_EReader(u8);
struct Unk03006370 gUnknown_03006370;
@@ -209,11 +209,11 @@ static u32 sub_81D4EE4(u8 *arg0, u16 *arg1)
return 0;
}
-void task_add_00_ereader(void)
+void CreateEReaderTask(void)
{
- struct Unk81D5014 *data;
- u8 taskId = CreateTask(sub_81D5084, 0);
- data = (struct Unk81D5014 *)gTasks[taskId].data;
+ struct EReaderTaskData *data;
+ u8 taskId = CreateTask(Task_EReader, 0);
+ data = (struct EReaderTaskData *)gTasks[taskId].data;
data->unk8 = 0;
data->unk9 = 0;
data->unkA = 0;
@@ -244,13 +244,13 @@ static bool32 sub_81D5064(u16 *arg0, u16 arg1)
return FALSE;
}
-static void sub_81D5084(u8 taskId)
+static void Task_EReader(u8 taskId)
{
- struct Unk81D5014 *data = (struct Unk81D5014 *)gTasks[taskId].data;
+ struct EReaderTaskData *data = (struct EReaderTaskData *)gTasks[taskId].data;
switch (data->unk8)
{
case 0:
- if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_ReceiveMysteryGiftWithEReader))
+ if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_ReceiveMysteryGiftWithEReader))
data->unk8 = 1;
break;
case 1:
@@ -274,7 +274,7 @@ static void sub_81D5084(u8 taskId)
}
break;
case 4:
- if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_SelectConnectFromEReaderMenu))
+ if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_SelectConnectFromEReaderMenu))
{
AddTextPrinterToWindow1(gJPText_SelectConnectWithGBA);
sub_81D505C(&data->unk0);
@@ -323,7 +323,7 @@ static void sub_81D5084(u8 taskId)
}
break;
case 7:
- if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_LinkIsIncorrect))
+ if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_LinkIsIncorrect))
data->unk8 = 4;
break;
case 8:
@@ -439,19 +439,19 @@ static void sub_81D5084(u8 taskId)
data->unk8 = 26;
break;
case 23:
- if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_CardReadingHasBeenHalted))
+ if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_CardReadingHasBeenHalted))
data->unk8 = 26;
break;
case 20:
- if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_ConnectionErrorCheckLink))
+ if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_ConnectionErrorCheckLink))
data->unk8 = 0;
break;
case 21:
- if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_ConnectionErrorTryAgain))
+ if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_ConnectionErrorTryAgain))
data->unk8 = 0;
break;
case 22:
- if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_WriteErrorUnableToSaveData))
+ if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_WriteErrorUnableToSaveData))
data->unk8 = 0;
break;
case 26: