summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arm9/src/error_message_reset.c34
-rw-r--r--arm9/src/scrcmd.c9
-rw-r--r--arm9/src/text_02054590.c42
-rw-r--r--include/script.h4
-rw-r--r--include/text_02054590.h13
5 files changed, 50 insertions, 52 deletions
diff --git a/arm9/src/error_message_reset.c b/arm9/src/error_message_reset.c
index f70fec0f..52873cdf 100644
--- a/arm9/src/error_message_reset.c
+++ b/arm9/src/error_message_reset.c
@@ -2,36 +2,28 @@
#include "GX_layers.h"
#include "unk_02031734.h"
#include "unk_0202F150.h"
+#include "unk_02016B94.h"
-const u32 UNK_020FF49C[2] = { 0x1a030300, 0x00230112 };
+const struct UnkStruct4 UNK_020FF49C = { 0, 3, 3, 0x1a, 0x12, 1, 0x23 };
const u32 UNK_020FF4A4[2] = { 0x00020000, 0x00000000 };
const struct GraphicsModes UNK_020FF4AC = { mode1 : 1 };
-const u32 UNK_020FF4BC[7] = { 0x00, 0x00, 0x0800, 0x00, 0x06000001, 0x0100, 0x00 };
+const struct UnkStruct1 UNK_020FF4BC = { 0, 0, 0x800, 0, 1, 0, 0, 6, 0, 1, 0, 0, 0 };
const struct GraphicsBanks UNK_020FF4D8 = { bg : 3 };
u32 sErrorMessagePrinterLock;
extern void FUN_0200E3A0(PMLCDTarget, int);
-extern u32 *FUN_02016B94(u32 param0);
-extern void FUN_02016BBC(const struct GraphicsModes *modes);
-extern void FUN_02016C18(u32 *param0, u32 param1, void *param2, u32 param3);
-extern void FUN_02018744(u32 *param0, u32 param1);
-extern void FUN_0200CB00(u32 *param0, u32 param1, u32 param2, u32 param3, u8 param4, u32 param5);
+extern void FUN_0200CB00(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3, u8 param4, u32 param5);
extern void FUN_02002ED0(u32 param0, u32 param1, u32 param2);
-extern void FUN_02017F18(u32 param0, u32 param1, u32 param2, u32 param3);
-extern void FUN_02017FE4(u32 param0, u32 param1);
-extern void FUN_02019150(u32 *param0, u32 *param1, const u32 *param2);
-extern void FUN_020196F4(u32 *, u8, u16, u16, u16, u16);
-extern void FUN_0200CCA4(u32 *param0, u32 param1, u32 param2, u32 param3);
+extern void FUN_0200CCA4(struct Window *param0, u32 param1, u32 param2, u32 param3);
extern void FUN_0200E394(u32 param0);
extern void FUN_0200A274(u32 param0, u32 param1, u32 param2);
-extern void FUN_02019178(u32 *param0);
THUMB_FUNC void VBlankHandler()
{
@@ -43,8 +35,8 @@ THUMB_FUNC void VBlankHandler()
THUMB_FUNC void PrintErrorMessageAndReset()
{
- u32 *ptr;
- u32 buf[4];
+ struct UnkStruct2 *ptr;
+ struct Window buf;
if (sErrorMessagePrinterLock != 1)
{
@@ -83,7 +75,7 @@ THUMB_FUNC void PrintErrorMessageAndReset()
ptr = FUN_02016B94(0);
FUN_02016BBC(&UNK_020FF4AC);
- FUN_02016C18(ptr, 0, UNK_020FF4BC, 0);
+ FUN_02016C18(ptr, 0, &UNK_020FF4BC, 0);
FUN_02018744(ptr, 0);
FUN_0200CB00(ptr, 0, 503, 2, 0, 0);
@@ -97,13 +89,13 @@ THUMB_FUNC void PrintErrorMessageAndReset()
struct String *str = String_ctor(6 << 6, 0);
FUN_0201BD5C();
- FUN_02019150(ptr, buf, UNK_020FF49C);
- FUN_020196F4(buf, 15, 0, 0, 0xd0, 0x90);
- FUN_0200CCA4(buf, 0, 0x1f7, 2);
+ FUN_02019150(ptr, &buf, &UNK_020FF49C);
+ FUN_020196F4(&buf, 15, 0, 0, 0xd0, 0x90);
+ FUN_0200CCA4(&buf, 0, 0x1f7, 2);
ReadMsgDataIntoString(msg_data, 3, str);
- AddTextPrinterParameterized((u32)buf, 0, (const u16 *)str, 0, 0, 0, NULL); // wtf
+ AddTextPrinterParameterized((u32)(&buf), 0, (const u16 *)str, 0, 0, 0, NULL); // wtf
String_dtor(str);
GX_BothDispOn();
@@ -133,7 +125,7 @@ THUMB_FUNC void PrintErrorMessageAndReset()
FUN_0200E3A0(PM_LCD_TOP, 0x7FFF);
FUN_0200E3A0(PM_LCD_BOTTOM, 0x7FFF);
- FUN_02019178(buf);
+ FUN_02019178(&buf);
DestroyMsgData(msg_data);
FreeToHeap(ptr);
diff --git a/arm9/src/scrcmd.c b/arm9/src/scrcmd.c
index fb88da54..5472e02d 100644
--- a/arm9/src/scrcmd.c
+++ b/arm9/src/scrcmd.c
@@ -4,6 +4,7 @@
#include "options.h"
#include "player_data.h"
#include "text.h"
+#include "unk_02016B94.h"
extern void *FUN_02039438(struct UnkSavStruct80* arg, u32 id);
extern void *CreateScriptContext(struct UnkSavStruct80* arg, u16 id);
@@ -27,9 +28,7 @@ extern void FUN_02055304(u32 param0, u32 param1);
extern void FUN_02039460(struct UnkSavStruct80 *arg);
extern void FUN_020545B8(u32 param0, u8 *param1, u32 param2);
extern void FUN_02054608(u8 *param0, struct Options *options);
-extern void FUN_0200D0E0(u32 *param0, u32 param1);
-extern void FUN_02019178(u32 *param0);
-extern void FUN_020179E0(u32 param0, u32 param1, u32 param2, u16 val);
+extern void FUN_0200D0E0(struct Window *param0, u32 param1);
extern u32 FUN_02058510(u32 param0, u32 param1);
extern void MOD05_021E8128(u32 param0, u8 type, u16 map);
extern void MOD05_021E8130(u32 param0, u32 param1);
@@ -777,7 +776,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0033(struct ScriptContext *ctx)
THUMB_FUNC BOOL ScrCmd_Unk0034(struct ScriptContext* ctx)
{
struct UnkSavStruct80 *unk80 = ctx->unk80;
- u32 *unk = FUN_02039438(unk80, 0x1); //windowID?
+ struct Window *unk = FUN_02039438(unk80, 0x1);
u8 *unk2 = FUN_02039438(unk80, 0x6);
FUN_0200D0E0(unk, 0); //clear window?
FUN_02019178(unk);
@@ -788,7 +787,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0034(struct ScriptContext* ctx)
THUMB_FUNC BOOL ScrCmd_Unk0035(struct ScriptContext* ctx)
{
struct UnkSavStruct80 *unk80 = ctx->unk80;
- u32 *unk = FUN_02039438(unk80, 0x1); //windowID?
+ struct Window *unk = FUN_02039438(unk80, 0x1);
u8 *unk2 = FUN_02039438(unk80, 0x6);
FUN_02019178(unk);
*unk2 = 0;
diff --git a/arm9/src/text_02054590.c b/arm9/src/text_02054590.c
index 470a2fe3..c9995715 100644
--- a/arm9/src/text_02054590.c
+++ b/arm9/src/text_02054590.c
@@ -1,25 +1,27 @@
#include "text_02054590.h"
#include "text.h"
+#include "unk_02016B94.h"
extern void FUN_0201BD5C(void);
extern void FUN_02002ED0(u32 param0, u32 param1, u32 param2);
extern void FUN_02002EEC(u32 param0, u32 param1, u32 param2);
-extern void FUN_02019064(u32 param0, u32 param1, u32 param2, u8 param3, u32 param4, u8 param5, u32 param6, u32 param7, u32 param8);
-
-extern void FUN_0200CD68(u32 param0, u32 param1, u32 param2, u32 param3, u8 param4, u32 param5);
-extern u32 FUN_0201AB08(u32 *param0);
-extern void FUN_0200D0BC(u32 *param0, u32 param1, u32 param2, u32 param3);
-
-extern void FUN_02019620(u32 *param0, u32 param1);
+extern void FUN_0200CD68(
+ struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3, u8 param4, u32 param5);
+extern void FUN_0200D0BC(struct Window *param0, u32 param1, u32 param2, u32 param3);
extern void FUN_02002B60(u8 param0);
extern void FUN_02002B7C(u32 param0);
extern void FUN_02002BB8(u32 param0);
-extern void FUN_0200D300(u32 param0, u32 param1, u32 param2, u32 param3, u8 param4, u32 param5, u32 param6);
-extern void FUN_0200D6F8(u32 *param0, u32 param1, u32 param2, u32 param3, u8 param4);
-
+extern void FUN_0200D300(struct UnkStruct2 *param0,
+ u32 param1,
+ u32 param2,
+ u32 param3,
+ u8 param4,
+ u32 param5,
+ u32 param6);
+extern void FUN_0200D6F8(struct Window *param0, u32 param1, u32 param2, u32 param3, u8 param4);
THUMB_FUNC void FUN_02054590(u32 param0, u32 param1)
{
@@ -31,7 +33,7 @@ THUMB_FUNC void FUN_02054590(u32 param0, u32 param1)
FUN_02002EEC(param0, 384, 4);
}
-THUMB_FUNC void FUN_020545B8(u32 param0, u32 param1, u32 param2)
+THUMB_FUNC void FUN_020545B8(struct UnkStruct2 *param0, struct Window *param1, u32 param2)
{
if (param2 == 3)
{
@@ -43,14 +45,14 @@ THUMB_FUNC void FUN_020545B8(u32 param0, u32 param1, u32 param2)
}
}
-THUMB_FUNC void FUN_02054608(u32 *param0, struct Options *options)
+THUMB_FUNC void FUN_02054608(struct Window *param0, struct Options *options)
{
- FUN_0200CD68(*param0, FUN_0201AB08(param0), 994, 10, (u8)Options_GetFrame(options), 4);
+ FUN_0200CD68(param0->unk00, FUN_0201AB08(param0), 994, 10, (u8)Options_GetFrame(options), 4);
FUN_0205464C(param0);
FUN_0200D0BC(param0, 0, 994, 10);
}
-THUMB_FUNC void FUN_0205464C(u32 *param0)
+THUMB_FUNC void FUN_0205464C(struct Window *param0)
{
FUN_02019620(param0, 15);
}
@@ -60,7 +62,8 @@ THUMB_FUNC u16 FUN_02054658(u8 windowId, const u16 *str, struct Options *options
FUN_02002B60(param3);
FUN_02002B7C(0);
FUN_02002BB8(0);
- return AddTextPrinterParameterized(windowId, 1, str, 0, 0, (u32)Options_GetTextFrameDelay(options), NULL);
+ return AddTextPrinterParameterized(
+ windowId, 1, str, 0, 0, (u32)Options_GetTextFrameDelay(options), NULL);
}
THUMB_FUNC u16 DrawFieldMessage(u8 windowId, const u16 *str, u8 fontId, u32 speed, u8 a4, u32 a5)
@@ -71,12 +74,13 @@ THUMB_FUNC u16 DrawFieldMessage(u8 windowId, const u16 *str, u8 fontId, u32 spee
return AddTextPrinterParameterized(windowId, fontId, str, 0, 0, speed, NULL);
}
-THUMB_FUNC u8 FUN_020546C8(u32 param0) //bool8?
+THUMB_FUNC u8 FUN_020546C8(u32 param0) // bool8?
{
return !FUN_0201BD70(param0);
}
-THUMB_FUNC void FUN_020546E0(u32 param0, u32 param1, u32 param2, u32 param3)
+THUMB_FUNC void FUN_020546E0(
+ struct UnkStruct2 *param0, struct Window *param1, u32 param2, u32 param3)
{
u32 r4 = 0;
u32 r5 = 0;
@@ -100,9 +104,9 @@ THUMB_FUNC void FUN_020546E0(u32 param0, u32 param1, u32 param2, u32 param3)
}
}
-THUMB_FUNC void FUN_02054744(u32 *param0, u32 param1, u32 param2)
+THUMB_FUNC void FUN_02054744(struct Window *param0, u32 param1, u32 param2)
{
- FUN_0200D300(*param0, FUN_0201AB08(param0), 0x399, 9, (u8)param1, param2, 4);
+ FUN_0200D300(param0->unk00, FUN_0201AB08(param0), 0x399, 9, (u8)param1, param2, 4);
FUN_02019620(param0, 15);
FUN_0200D6F8(param0, 0, 0x399, 9, (u8)param1);
}
diff --git a/include/script.h b/include/script.h
index cb41889d..92d586b6 100644
--- a/include/script.h
+++ b/include/script.h
@@ -4,6 +4,8 @@
#include "global.h"
#include "msgdata.h"
#include "save_block_2.h"
+#include "unk_02016B94.h"
+
struct ScriptContext;
@@ -26,7 +28,7 @@ struct UnkStruct_02046444
struct UnkSavStruct80
{
u8 padding[0x8];
- u32 unk08;
+ struct UnkStruct2 *unk08;
struct SaveBlock2 *saveBlock2; //0xC
struct UnkStruct_0204639C *unk10;
u8 padding2[0x8];
diff --git a/include/text_02054590.h b/include/text_02054590.h
index 725bd9b4..6c5090e7 100644
--- a/include/text_02054590.h
+++ b/include/text_02054590.h
@@ -3,15 +3,16 @@
#include "global.h"
#include "options.h"
+#include "unk_02016B94.h"
void FUN_02054590(u32 param0, u32 param1);
-void FUN_020545B8(u32 param0, u32 param1, u32 param2);
-void FUN_02054608(u32 *param0, struct Options *options);
-void FUN_0205464C(u32 *param0);
+void FUN_020545B8(struct UnkStruct2 *param0, struct Window *param1, u32 param2);
+void FUN_02054608(struct Window *param0, struct Options *options);
+void FUN_0205464C(struct Window *param0);
u16 FUN_02054658(u8 windowId, const u16 *str, struct Options *options, u8 param3);
u16 DrawFieldMessage(u8 windowId, const u16 *str, u8 fontId, u32 speed, u8 a4, u32 a5);
u8 FUN_020546C8(u32 param0);
-void FUN_020546E0(u32 param0, u32 param1, u32 param2, u32 param3);
-void FUN_02054744(u32 *param0, u32 param1, u32 param2);
+void FUN_020546E0(struct UnkStruct2 *param0, struct Window *param1, u32 param2, u32 param3);
+void FUN_02054744(struct Window *param0, u32 param1, u32 param2);
-#endif //POKEDIAMOND_UNK_02054590_H
+#endif // POKEDIAMOND_UNK_02054590_H