mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Document mystery_gift
This commit is contained in:
parent
6d70b8adb1
commit
ade0183378
@ -6401,7 +6401,7 @@ sub_8027BEC: @ 8027BEC
|
||||
adds r0, r7, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0xD
|
||||
bl sub_8098858
|
||||
bl DrawTextBorderOuter
|
||||
adds r0, r7, 0
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
|
@ -39,8 +39,8 @@ mevent_srv_new_wcard: @ 801D0A0
|
||||
.pool
|
||||
thumb_func_end mevent_srv_new_wcard
|
||||
|
||||
thumb_func_start sub_801D0C4
|
||||
sub_801D0C4: @ 801D0C4
|
||||
thumb_func_start mevent_srv_common_do_exec
|
||||
mevent_srv_common_do_exec: @ 801D0C4
|
||||
push {r4-r6,lr}
|
||||
adds r6, r0, 0
|
||||
ldr r4, =gUnknown_02022C7C
|
||||
@ -69,7 +69,7 @@ _0801D0F8:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_801D0C4
|
||||
thumb_func_end mevent_srv_common_do_exec
|
||||
|
||||
thumb_func_start mevent_srv_init_common
|
||||
mevent_srv_init_common: @ 801D100
|
||||
@ -493,7 +493,7 @@ _0801D422:
|
||||
b _0801D464
|
||||
_0801D43C:
|
||||
ldr r4, [r5, 0x1C]
|
||||
bl sub_801B00C
|
||||
bl sav1_get_mevent_buffer_0
|
||||
adds r1, r0, 0
|
||||
movs r2, 0xDE
|
||||
lsls r2, 1
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_801D484
|
||||
sub_801D484: @ 801D484
|
||||
thumb_func_start mevent_srv_ish_do_init
|
||||
mevent_srv_ish_do_init: @ 801D484
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
ldr r4, =gUnknown_02022C80
|
||||
ldr r4, =s_mevent_srv_ish_ptr
|
||||
movs r0, 0x50
|
||||
bl AllocZeroed
|
||||
str r0, [r4]
|
||||
@ -22,13 +22,13 @@ sub_801D484: @ 801D484
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_801D484
|
||||
thumb_func_end mevent_srv_ish_do_init
|
||||
|
||||
thumb_func_start sub_801D4A8
|
||||
sub_801D4A8: @ 801D4A8
|
||||
thumb_func_start mevent_srv_ish_do_exec
|
||||
mevent_srv_ish_do_exec: @ 801D4A8
|
||||
push {r4-r6,lr}
|
||||
adds r6, r0, 0
|
||||
ldr r4, =gUnknown_02022C80
|
||||
ldr r4, =s_mevent_srv_ish_ptr
|
||||
ldr r0, [r4]
|
||||
cmp r0, 0
|
||||
bne _0801D4BC
|
||||
@ -43,7 +43,7 @@ _0801D4BC:
|
||||
ldr r0, [r4]
|
||||
ldr r1, [r0, 0x4]
|
||||
strh r1, [r6]
|
||||
bl sub_801D55C
|
||||
bl mevent_srv_ish_free_resources
|
||||
ldr r0, [r4]
|
||||
bl Free
|
||||
movs r0, 0
|
||||
@ -54,36 +54,36 @@ _0801D4DC:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_801D4A8
|
||||
thumb_func_end mevent_srv_ish_do_exec
|
||||
|
||||
thumb_func_start sub_801D4E4
|
||||
sub_801D4E4: @ 801D4E4
|
||||
ldr r0, =gUnknown_02022C80
|
||||
thumb_func_start mevent_srv_ish_inc_flag
|
||||
mevent_srv_ish_inc_flag: @ 801D4E4
|
||||
ldr r0, =s_mevent_srv_ish_ptr
|
||||
ldr r1, [r0]
|
||||
ldr r0, [r1, 0xC]
|
||||
adds r0, 0x1
|
||||
str r0, [r1, 0xC]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_801D4E4
|
||||
thumb_func_end mevent_srv_ish_inc_flag
|
||||
|
||||
thumb_func_start sub_801D4F4
|
||||
sub_801D4F4: @ 801D4F4
|
||||
ldr r0, =gUnknown_02022C80
|
||||
thumb_func_start mevent_srv_ish_get_buffer
|
||||
mevent_srv_ish_get_buffer: @ 801D4F4
|
||||
ldr r0, =s_mevent_srv_ish_ptr
|
||||
ldr r0, [r0]
|
||||
ldr r0, [r0, 0x20]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_801D4F4
|
||||
thumb_func_end mevent_srv_ish_get_buffer
|
||||
|
||||
thumb_func_start sub_801D500
|
||||
sub_801D500: @ 801D500
|
||||
ldr r1, =gUnknown_02022C80
|
||||
thumb_func_start mevent_srv_ish_set_param
|
||||
mevent_srv_ish_set_param: @ 801D500
|
||||
ldr r1, =s_mevent_srv_ish_ptr
|
||||
ldr r1, [r1]
|
||||
str r0, [r1, 0x4]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_801D500
|
||||
thumb_func_end mevent_srv_ish_set_param
|
||||
|
||||
thumb_func_start mevent_srv_ish_init
|
||||
mevent_srv_ish_init: @ 801D50C
|
||||
@ -123,8 +123,8 @@ mevent_srv_ish_init: @ 801D50C
|
||||
bx r0
|
||||
thumb_func_end mevent_srv_ish_init
|
||||
|
||||
thumb_func_start sub_801D55C
|
||||
sub_801D55C: @ 801D55C
|
||||
thumb_func_start mevent_srv_ish_free_resources
|
||||
mevent_srv_ish_free_resources: @ 801D55C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
ldr r0, [r4, 0x14]
|
||||
@ -138,10 +138,10 @@ sub_801D55C: @ 801D55C
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_801D55C
|
||||
thumb_func_end mevent_srv_ish_free_resources
|
||||
|
||||
thumb_func_start sub_801D580
|
||||
sub_801D580: @ 801D580
|
||||
thumb_func_start mevent_srv_ish_jmp_buffer
|
||||
mevent_srv_ish_jmp_buffer: @ 801D580
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
ldr r0, [r4, 0x1C]
|
||||
@ -154,7 +154,7 @@ sub_801D580: @ 801D580
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_801D580
|
||||
thumb_func_end mevent_srv_ish_jmp_buffer
|
||||
|
||||
thumb_func_start sub_801D59C
|
||||
sub_801D59C: @ 801D59C
|
||||
@ -340,7 +340,7 @@ _0801D708:
|
||||
bne _0801D804
|
||||
_0801D70E:
|
||||
adds r0, r4, 0
|
||||
bl sub_801D580
|
||||
bl mevent_srv_ish_jmp_buffer
|
||||
b _0801D804
|
||||
_0801D716:
|
||||
ldr r0, [r4, 0x20]
|
||||
|
@ -5491,7 +5491,7 @@ _0802D4A4:
|
||||
ldrb r0, [r0, 0x12]
|
||||
movs r1, 0x1
|
||||
movs r2, 0xE
|
||||
bl sub_8098858
|
||||
bl DrawTextBorderOuter
|
||||
movs r0, 0x17
|
||||
movs r1, 0x7
|
||||
movs r2, 0
|
||||
@ -5575,7 +5575,7 @@ _0802D550:
|
||||
ldrb r0, [r0, 0x12]
|
||||
movs r1, 0x1
|
||||
movs r2, 0xE
|
||||
bl sub_8098858
|
||||
bl DrawTextBorderOuter
|
||||
movs r0, 0
|
||||
bl CopyBgTilemapBufferToVram
|
||||
_0802D574:
|
||||
@ -5693,7 +5693,7 @@ _0802D640:
|
||||
ldrb r0, [r0, 0x12]
|
||||
movs r1, 0x1
|
||||
movs r2, 0xE
|
||||
bl sub_8098858
|
||||
bl DrawTextBorderOuter
|
||||
movs r0, 0
|
||||
bl CopyBgTilemapBufferToVram
|
||||
_0802D664:
|
||||
@ -5773,7 +5773,7 @@ _0802D6E4:
|
||||
ldrb r0, [r0, 0x12]
|
||||
movs r1, 0x1
|
||||
movs r2, 0xE
|
||||
bl sub_8098858
|
||||
bl DrawTextBorderOuter
|
||||
movs r0, 0
|
||||
bl CopyBgTilemapBufferToVram
|
||||
_0802D708:
|
||||
@ -6107,7 +6107,7 @@ _0802D99A:
|
||||
ldrb r0, [r0, 0x12]
|
||||
movs r1, 0x1
|
||||
movs r2, 0xE
|
||||
bl sub_8098858
|
||||
bl DrawTextBorderOuter
|
||||
movs r0, 0
|
||||
bl CopyBgTilemapBufferToVram
|
||||
ldr r1, [r4]
|
||||
@ -7596,7 +7596,7 @@ sub_802E500: @ 802E500
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0xD
|
||||
bl sub_8098858
|
||||
bl DrawTextBorderOuter
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
|
@ -8104,7 +8104,7 @@ sub_81CC09C: @ 81CC09C
|
||||
ldrb r0, [r4, 0x14]
|
||||
movs r1, 0x1
|
||||
movs r2, 0x4
|
||||
bl sub_8098858
|
||||
bl DrawTextBorderOuter
|
||||
ldrb r0, [r4, 0x14]
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
@ -9354,7 +9354,7 @@ sub_81CCA1C: @ 81CCA1C
|
||||
ldrb r0, [r5, 0x8]
|
||||
movs r1, 0x42
|
||||
movs r2, 0x4
|
||||
bl sub_8098858
|
||||
bl DrawTextBorderOuter
|
||||
ldr r1, =gUnknown_08622888
|
||||
str r4, [sp]
|
||||
movs r0, 0x1
|
||||
|
@ -5,31 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8019930
|
||||
sub_8019930: @ 8019930
|
||||
ldr r0, =0x000001a9
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_8019930
|
||||
|
||||
thumb_func_start bgid_upload_textbox_1
|
||||
bgid_upload_textbox_1: @ 8019938
|
||||
push {lr}
|
||||
sub sp, 0x4
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =gUnkTextboxBorderGfx
|
||||
movs r2, 0x80
|
||||
lsls r2, 1
|
||||
movs r3, 0
|
||||
str r3, [sp]
|
||||
bl DecompressAndLoadBgGfxUsingHeap
|
||||
add sp, 0x4
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end bgid_upload_textbox_1
|
||||
|
||||
thumb_func_start is_walking_or_running
|
||||
is_walking_or_running: @ 8019958
|
||||
push {lr}
|
||||
@ -1550,7 +1525,7 @@ sub_801A43C: @ 801A43C
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
movs r0, 0xF0
|
||||
bl sub_81978B0
|
||||
bl Menu_LoadStdPalAt
|
||||
bl DynamicPlaceholderTextUtil_Reset
|
||||
movs r0, 0x20
|
||||
str r0, [sp]
|
||||
@ -2393,7 +2368,7 @@ _0801ABF4:
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
movs r2, 0xD
|
||||
bl sub_8098858
|
||||
bl DrawTextBorderOuter
|
||||
str r5, [sp]
|
||||
movs r0, 0
|
||||
adds r1, r6, 0
|
||||
|
@ -22,7 +22,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276AD5:: @ 8276AD5
|
||||
specialvar VAR_RESULT, sub_813B514
|
||||
compare VAR_RESULT, 1
|
||||
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276AFB
|
||||
specialvar VAR_RESULT, sub_801B27C
|
||||
specialvar VAR_RESULT, ValidateReceivedWonderCard
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276AFF
|
||||
goto OldaleTown_PokemonCenter_2F_EventScript_276AFB
|
||||
|
@ -434,7 +434,7 @@ gSpecials:: @ 81DBA64
|
||||
def_special sub_81B8958
|
||||
def_special sub_8018090
|
||||
def_special sub_813990C
|
||||
def_special sub_801B27C
|
||||
def_special ValidateReceivedWonderCard
|
||||
def_special HasAtLeastOneBerry
|
||||
def_special sub_802C920
|
||||
def_special sub_802E3C4
|
||||
|
@ -1,6 +1,6 @@
|
||||
#ifndef GUARD_EREADER_SCREEN_H
|
||||
#define GUARD_EREADER_SCREEN_H
|
||||
|
||||
void sub_81D5014(void);
|
||||
void task_add_00_ereader(void);
|
||||
|
||||
#endif // GUARD_EREADER_SCREEN_H
|
||||
|
@ -12,7 +12,7 @@ int GetStringCenterAlignXOffsetWithLetterSpacing(int fontId, const u8 *str, int
|
||||
int GetStringWidthDifference(int fontId, const u8 *str, int totalWidth, int letterSpacing);
|
||||
int GetMaxWidthInMenuTable(const struct MenuAction *str, int arg1);
|
||||
int sub_81DB3D8(const struct MenuAction *str, const u8* arg1, int arg2);
|
||||
int sub_81DB41C(const struct ListMenuTemplate *listMenu);
|
||||
int Intl_GetListMenuWidth(const struct ListMenuTemplate *listMenu);
|
||||
void CopyMonCategoryText(int dexNum, u8 *dest);
|
||||
u8 *sub_81DB494(u8 *str, int fontId, u8 *str2, int totalStringWidth);
|
||||
void PadNameString(u8 *dest, u8 padChar);
|
||||
|
@ -200,8 +200,6 @@ extern bool8 gLinkVSyncDisabled;
|
||||
extern u32 gLinkStatus;
|
||||
|
||||
|
||||
void c2_mystery_gift(void);
|
||||
void sub_801867C(void);
|
||||
bool8 IsWirelessAdapterConnected(void);
|
||||
void Task_DestroySelf(u8 taskId);
|
||||
void OpenLink(void);
|
||||
|
@ -260,7 +260,7 @@ u32 sub_8010714(u16 a0, const u8 *a1);
|
||||
void sub_8011DC0(const u8 *a0, u16 a1);
|
||||
bool8 sub_800EF1C(void);
|
||||
bool32 sub_800EF58(bool32 a0);
|
||||
void sub_800E084(void);
|
||||
void DestroyWirelessStatusIndicatorSprite(void);
|
||||
void sub_801103C(void);
|
||||
void sub_8011C5C(void);
|
||||
void sub_80106D4(void);
|
||||
|
@ -35,7 +35,7 @@ void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram);
|
||||
void DisplayYesNoMenuDefaultYes(void);
|
||||
u32 GetPlayerTextSpeed(void);
|
||||
u8 GetPlayerTextSpeedDelay(void);
|
||||
void sub_81978B0(u16 arg0);
|
||||
void Menu_LoadStdPalAt(u16 arg0);
|
||||
void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextPrinterTemplate *, u16));
|
||||
void sub_8199DF0(u32 bg, u8 a1, int a2, int a3);
|
||||
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
|
||||
|
@ -32,23 +32,23 @@ struct MEventStruct_Unk1442CC
|
||||
};
|
||||
|
||||
void sub_801AFD8(void);
|
||||
struct MEventBuffer_3120_Sub *sub_801B00C(void);
|
||||
struct MEventBuffer_3120_Sub *sav1_get_mevent_buffer_0(void);
|
||||
struct MEventBuffer_32E0_Sub *sav1_get_mevent_buffer_1(void);
|
||||
struct MEventBuffer_3430_Sub *sav1_get_mevent_buffer_2(void);
|
||||
struct MysteryEventStruct *sub_801B044(void);
|
||||
u16 *sub_801B058(void);
|
||||
void sub_801B06C(void);
|
||||
void DestroyWonderNews(void);
|
||||
bool32 sub_801B078(const struct MEventBuffer_3120_Sub *src);
|
||||
bool32 sub_801B0CC(void);
|
||||
bool32 sub_801B128(void);
|
||||
bool32 ValidateReceivedWonderNews(void);
|
||||
bool32 WonderNews_Test_Unk_02(void);
|
||||
bool32 sub_801B1A4(const u8 *src);
|
||||
void sub_801B1E8(void);
|
||||
void DestroyWonderCard(void);
|
||||
bool32 sub_801B21C(const struct MEventBuffer_32E0_Sub *data);
|
||||
bool32 sub_801B27C(void);
|
||||
bool32 sub_801B308(void);
|
||||
u16 sub_801B39C(void);
|
||||
bool32 ValidateReceivedWonderCard(void);
|
||||
bool32 WonderCard_Test_Unk_08_6(void);
|
||||
u16 GetWonderCardFlagID(void);
|
||||
void sub_801B3C0(struct MEventBuffer_32E0_Sub *buffer);
|
||||
bool32 sub_801B3F8(void);
|
||||
bool32 CheckReceivedGiftFromWonderCard(void);
|
||||
bool32 sub_801B508(const u16 *data);
|
||||
void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 a1);
|
||||
bool32 sub_801B6A0(const struct MEventStruct_Unk1442CC *data, bool32 a1);
|
||||
|
@ -1,16 +1,16 @@
|
||||
#ifndef GUARD_MEVENT_801BAAC_H
|
||||
#define GUARD_MEVENT_801BAAC_H
|
||||
|
||||
bool32 sub_801BAAC(struct MEventBuffer_32E0_Sub * r5, struct MEventBuffer_3430_Sub * r6);
|
||||
bool32 sub_801C6C8(const struct MEventBuffer_3120_Sub * a0);
|
||||
s32 sub_801BB74(void);
|
||||
s32 sub_801C758(void);
|
||||
s32 sub_801BDA4(bool32 flag);
|
||||
void sub_801BB48(void);
|
||||
s32 sub_801CA50(bool32 flag);
|
||||
void sub_801C72C(void);
|
||||
u32 sub_801CCD0(u16 input);
|
||||
void sub_801CC80(void);
|
||||
void sub_801CC38(void);
|
||||
bool32 InitWonderCardResources(struct MEventBuffer_32E0_Sub * r5, struct MEventBuffer_3430_Sub * r6);
|
||||
bool32 InitWonderNewsResources(const struct MEventBuffer_3120_Sub * a0);
|
||||
s32 FadeToWonderCardMenu(void);
|
||||
s32 FadeToWonderNewsMenu(void);
|
||||
s32 FadeOutFromWonderCard(bool32 flag);
|
||||
void DestroyWonderCardResources(void);
|
||||
s32 FadeOutFromWonderNews(bool32 flag);
|
||||
void DestroyWonderNewsResources(void);
|
||||
u32 MENews_GetInput(u16 input);
|
||||
void MENews_AddScrollIndicatorArrowPair(void);
|
||||
void MENews_RemoveScrollIndicatorArrowPair(void);
|
||||
|
||||
#endif //GUARD_MEVENT_801BAAC_H
|
||||
|
@ -2,6 +2,6 @@
|
||||
#define GUARD_MEVENT_NEWS_H
|
||||
|
||||
void sub_801DBC0(void);
|
||||
void sub_801DB68(u32 a0);
|
||||
void GenerateRandomNews(u32 a0);
|
||||
|
||||
#endif //GUARD_MEVENT_NEWS_H
|
||||
|
@ -3,6 +3,6 @@
|
||||
|
||||
void mevent_srv_new_wcard();
|
||||
void mevent_srv_init_wnews();
|
||||
u32 sub_801D0C4(u16 * a0);
|
||||
u32 mevent_srv_common_do_exec(u16 * a0);
|
||||
|
||||
#endif //GUARD_MEVENT_SERVER_H
|
||||
|
@ -1,10 +1,10 @@
|
||||
#ifndef GUARD_MEVENT_SERVER_ISH_H
|
||||
#define GUARD_MEVENT_SERVER_ISH_H
|
||||
|
||||
void sub_801D484(u32 arg);
|
||||
u32 sub_801D4A8(u16 * a0);
|
||||
void sub_801D4E4(void);
|
||||
void * sub_801D4F4(void);
|
||||
void sub_801D500(u32 a0);
|
||||
void mevent_srv_ish_do_init(u32 arg);
|
||||
u32 mevent_srv_ish_do_exec(u16 * a0);
|
||||
void mevent_srv_ish_inc_flag(void);
|
||||
void * mevent_srv_ish_get_buffer(void);
|
||||
void mevent_srv_ish_set_param(u32 a0);
|
||||
|
||||
#endif //GUARD_MEVENT_SERVER_ISH_H
|
||||
|
@ -1,8 +1,16 @@
|
||||
#ifndef GUARD_MYSTERY_GIFT_H
|
||||
#define GUARD_MYSTERY_GIFT_H
|
||||
|
||||
void sub_8018438(void);
|
||||
void sub_80186EC(bool8 isJapanese, bool32 usePickOkCancel);
|
||||
void sub_8018798(u32 bg);
|
||||
extern bool8 gGiftIsFromEReader;
|
||||
|
||||
u16 GetMysteryGiftBaseBlock(void);
|
||||
void c2_mystery_gift_e_reader_run(void);
|
||||
void PrintMysteryGiftOrEReaderTopMenu(bool8 isJapanese, bool32 usePickOkCancel);
|
||||
void MG_DrawCheckerboardPattern(u32 bg);
|
||||
void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void);
|
||||
bool32 MG_PrintTextOnWindow1AndWaitButton(u8 *textState, const u8 *str);
|
||||
void AddTextPrinterToWindow1(const u8 *src);
|
||||
void c2_ereader(void);
|
||||
void c2_mystery_gift(void);
|
||||
|
||||
#endif //GUARD_MYSTERY_GIFT_H
|
||||
|
@ -17,8 +17,8 @@ void LoadMessageBoxGfx(u8 windowId, u16 destOffset, u8 palOffset);
|
||||
void LoadUserWindowBorderGfx(u8 windowId, u16 destOffset, u8 palOffset);
|
||||
void LoadWindowGfx(u8 windowId, u8 frameId, u16 destOffset, u8 palOffset);
|
||||
void LoadUserWindowBorderGfx_(u8 windowId, u16 destOffset, u8 palOffset);
|
||||
void sub_8098858(u8 windowId, u16 tileNum, u8 palNum);
|
||||
void sub_80989E0(u8 windowId, u16 tileNum, u8 palNum);
|
||||
void DrawTextBorderOuter(u8 windowId, u16 tileNum, u8 palNum);
|
||||
void DrawTextBorderInner(u8 windowId, u16 tileNum, u8 palNum);
|
||||
void rbox_fill_rectangle(u8 windowId);
|
||||
const u16 *stdpal_get(u8 id);
|
||||
const u16 *GetOverworldTextboxPalettePtr(void);
|
||||
|
@ -165,14 +165,8 @@ u8 sub_8013F78(void);
|
||||
bool32 sub_802C908(u16);
|
||||
void nullsub_89(u8 taskId);
|
||||
void var_800D_set_xB(void);
|
||||
|
||||
bool32 mevent_0814257C(u8 *textState, const u8 *str);
|
||||
void sub_8018884(const u8 *src);
|
||||
void sub_80186A4(void);
|
||||
void sub_8014EFC(u32 arg0);
|
||||
void sub_80152A8(u32 arg0);
|
||||
void sub_8014A00(u32 arg0);
|
||||
|
||||
extern bool8 gUnknown_02022C60;
|
||||
void MEvent_CreateTask_CardOrNewsWithFriend(u32 arg0);
|
||||
void MEvent_CreateTask_CardOrNewsOverWireless(u32 arg0);
|
||||
void MEvent_CreateTask_Leader(u32 arg0);
|
||||
|
||||
#endif //GUARD_UNION_ROOM_H
|
||||
|
@ -709,7 +709,7 @@ void LoadBattleMenuWindowGfx(void)
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_ARENA)
|
||||
{
|
||||
sub_81978B0(0x70);
|
||||
Menu_LoadStdPalAt(0x70);
|
||||
LoadMessageBoxGfx(0, 0x30, 0x70);
|
||||
gPlttBufferUnfaded[0x76] = 0;
|
||||
CpuCopy16(&gPlttBufferUnfaded[0x76], &gPlttBufferFaded[0x76], 2);
|
||||
|
@ -940,7 +940,7 @@ static void InitBerryBlenderWindows(void)
|
||||
FillWindowPixelBuffer(i, PIXEL_FILL(0));
|
||||
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14);
|
||||
sub_81978B0(0xE0);
|
||||
Menu_LoadStdPalAt(0xE0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -582,7 +582,7 @@ int sub_802130C(void)
|
||||
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
break;
|
||||
case 6:
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
sub_8022960(var0);
|
||||
sub_8034CC8();
|
||||
break;
|
||||
|
@ -778,7 +778,7 @@ static void sub_80F677C(u8 taskId)
|
||||
if (!gReceivedRemoteLinkPlayers)
|
||||
{
|
||||
if (gIsLinkContest & 0x2)
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
|
||||
sub_80F7144();
|
||||
gTasks[taskId].func = sub_80F67C4;
|
||||
|
@ -3721,7 +3721,7 @@ static void sub_811D0BC(void)
|
||||
{
|
||||
FillBgTilemapBufferRect(0, 0, 0, 0, 32, 20, 17);
|
||||
LoadUserWindowBorderGfx(1, 1, 0xE0);
|
||||
sub_8098858(1, 1, 14);
|
||||
DrawTextBorderOuter(1, 1, 14);
|
||||
sub_811D104(0);
|
||||
PutWindowTilemap(1);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "ereader_helpers.h"
|
||||
#include "link.h"
|
||||
#include "main.h"
|
||||
#include "union_room.h"
|
||||
#include "mystery_gift.h"
|
||||
#include "save.h"
|
||||
#include "sound.h"
|
||||
#include "sprite.h"
|
||||
@ -209,7 +209,7 @@ static u32 sub_81D4EE4(u8 *arg0, u16 *arg1)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sub_81D5014(void)
|
||||
void task_add_00_ereader(void)
|
||||
{
|
||||
int value;
|
||||
struct Unk81D5014 *data;
|
||||
@ -251,7 +251,7 @@ static void sub_81D5084(u8 taskId)
|
||||
switch (data->unk8)
|
||||
{
|
||||
case 0:
|
||||
if (mevent_0814257C(&data->unk9, gUnknown_085EDFD6))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EDFD6))
|
||||
data->unk8 = 1;
|
||||
break;
|
||||
case 1:
|
||||
@ -275,9 +275,9 @@ static void sub_81D5084(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (mevent_0814257C(&data->unk9, gUnknown_085EDFF5))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EDFF5))
|
||||
{
|
||||
sub_8018884(gUnknown_085EE014);
|
||||
AddTextPrinterToWindow1(gUnknown_085EE014);
|
||||
sub_81D505C(&data->unk0);
|
||||
data->unk8 = 5;
|
||||
}
|
||||
@ -324,11 +324,11 @@ static void sub_81D5084(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (mevent_0814257C(&data->unk9, gUnknown_085EE05C))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EE05C))
|
||||
data->unk8 = 4;
|
||||
break;
|
||||
case 8:
|
||||
sub_8018884(gUnknown_085EE097);
|
||||
AddTextPrinterToWindow1(gUnknown_085EE097);
|
||||
// XXX: This (u32*) cast is discarding the const qualifier from gUnknown_089A3470
|
||||
sub_81D4D50(&gUnknown_03006370, gMultiBootProgram_BerryGlitchFix_Start - gUnknown_089A3470, (u32*)gUnknown_089A3470);
|
||||
data->unk8 = 9;
|
||||
@ -347,7 +347,7 @@ static void sub_81D5084(u8 taskId)
|
||||
else if (data->unkE == 1)
|
||||
{
|
||||
sub_81D505C(&data->unk0);
|
||||
sub_8018884(gUnknown_085EE120);
|
||||
AddTextPrinterToWindow1(gUnknown_085EE120);
|
||||
data->unk8 = 11;
|
||||
}
|
||||
else
|
||||
@ -361,7 +361,7 @@ static void sub_81D5084(u8 taskId)
|
||||
break;
|
||||
case 12:
|
||||
sub_81D4E30();
|
||||
sub_8018884(gUnknown_085EE0DC);
|
||||
AddTextPrinterToWindow1(gUnknown_085EE0DC);
|
||||
data->unk8 = 13;
|
||||
break;
|
||||
case 13:
|
||||
@ -370,7 +370,7 @@ static void sub_81D5084(u8 taskId)
|
||||
case 0:
|
||||
break;
|
||||
case 2:
|
||||
sub_8018884(gUnknown_085EE097);
|
||||
AddTextPrinterToWindow1(gUnknown_085EE097);
|
||||
data->unk8 = 14;
|
||||
break;
|
||||
case 1:
|
||||
@ -418,7 +418,7 @@ static void sub_81D5084(u8 taskId)
|
||||
case 17:
|
||||
if (sub_81D3AB0((struct Unk81D38FC *)&gDecompressionBuffer))
|
||||
{
|
||||
sub_8018884(gUnknown_085EE0FA);
|
||||
AddTextPrinterToWindow1(gUnknown_085EE0FA);
|
||||
sub_81D505C(&data->unk0);
|
||||
data->unk8 = 18;
|
||||
}
|
||||
@ -430,7 +430,7 @@ static void sub_81D5084(u8 taskId)
|
||||
case 18:
|
||||
if (sub_81D5064(&data->unk0, 120))
|
||||
{
|
||||
sub_8018884(gUnknown_085EE107);
|
||||
AddTextPrinterToWindow1(gUnknown_085EE107);
|
||||
PlayFanfare(MUS_FANFA4);
|
||||
data->unk8 = 19;
|
||||
}
|
||||
@ -440,25 +440,25 @@ static void sub_81D5084(u8 taskId)
|
||||
data->unk8 = 26;
|
||||
break;
|
||||
case 23:
|
||||
if (mevent_0814257C(&data->unk9,gUnknown_085EE06B))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9,gUnknown_085EE06B))
|
||||
data->unk8 = 26;
|
||||
break;
|
||||
case 20:
|
||||
if (mevent_0814257C(&data->unk9, gUnknown_085EE0A3))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EE0A3))
|
||||
data->unk8 = 0;
|
||||
break;
|
||||
case 21:
|
||||
if (mevent_0814257C(&data->unk9, gUnknown_085EE0BF))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EE0BF))
|
||||
data->unk8 = 0;
|
||||
break;
|
||||
case 22:
|
||||
if (mevent_0814257C(&data->unk9, gUnknown_085EE12D))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EE12D))
|
||||
data->unk8 = 0;
|
||||
break;
|
||||
case 26:
|
||||
Free(data->unk10);
|
||||
DestroyTask(taskId);
|
||||
SetMainCallback2(sub_80186A4);
|
||||
SetMainCallback2(MainCB_FreeAllBuffersAndReturnToInitTitleScreen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1228,7 +1228,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
if (gWirelessCommType)
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
|
||||
Free(GetBgTilemapBuffer(3));
|
||||
Free(GetBgTilemapBuffer(1));
|
||||
|
@ -62,7 +62,7 @@ int sub_81DB3D8(const struct MenuAction *str, const u8* arg1, int arg2)
|
||||
return convert_pixel_width_to_tile_width(var);
|
||||
}
|
||||
|
||||
int sub_81DB41C(const struct ListMenuTemplate *listMenu)
|
||||
int Intl_GetListMenuWidth(const struct ListMenuTemplate *listMenu)
|
||||
{
|
||||
int i, maxWidth, finalWidth;
|
||||
const struct ListMenuItem *items = listMenu->items;
|
||||
|
@ -2243,7 +2243,7 @@ void CreateWirelessStatusIndicatorSprite(u8 x, u8 y)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800E084(void)
|
||||
void DestroyWirelessStatusIndicatorSprite(void)
|
||||
{
|
||||
if (gSprites[gWirelessStatusIndicatorSpriteId].data[7] == 0x1234)
|
||||
{
|
||||
@ -2356,7 +2356,7 @@ void sub_800E174(void)
|
||||
CpuCopy16(gMain.oamBuffer + 125, (struct OamData *)OAM + 125, sizeof(struct OamData));
|
||||
if (sub_8011A74() == 1)
|
||||
{
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4209,7 +4209,7 @@ void sub_8010DB4(void)
|
||||
{
|
||||
if (gUnknown_03005000.unk_ee == 1 && gUnknown_03004140.unk_02 == 0)
|
||||
{
|
||||
if (gMain.callback2 == sub_8018438 || gUnknown_03004140.unk_3c->unk_04)
|
||||
if (gMain.callback2 == c2_mystery_gift_e_reader_run || gUnknown_03004140.unk_3c->unk_04)
|
||||
gWirelessCommType = 2;
|
||||
SetMainCallback2(CB2_LinkError);
|
||||
gMain.savedCallback = CB2_LinkError;
|
||||
|
@ -324,7 +324,7 @@ s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const str
|
||||
case 2:
|
||||
LoadUserWindowBorderGfx(sMysteryGiftLinkMenu.windowId, tileNum, palNum);
|
||||
case 1:
|
||||
sub_8098858(sMysteryGiftLinkMenu.windowId, tileNum, palNum / 16);
|
||||
DrawTextBorderOuter(sMysteryGiftLinkMenu.windowId, tileNum, palNum / 16);
|
||||
break;
|
||||
}
|
||||
gMultiuseListMenuTemplate = *listMenuTemplate;
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "text_window.h"
|
||||
#include "title_screen.h"
|
||||
#include "window.h"
|
||||
#include "mystery_gift.h"
|
||||
|
||||
/*
|
||||
* Main menu state machine
|
||||
@ -1083,7 +1084,7 @@ static void Task_HandleMainMenuAPressed(u8 taskId)
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
case ACTION_EREADER:
|
||||
SetMainCallback2(sub_801867C);
|
||||
SetMainCallback2(c2_ereader);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
case ACTION_INVALID:
|
||||
|
@ -432,7 +432,7 @@ void sub_819789C(void)
|
||||
LoadPalette(gUnknown_0860F074, STD_WINDOW_PALETTE_NUM * 0x10, 0x14);
|
||||
}
|
||||
|
||||
void sub_81978B0(u16 offset)
|
||||
void Menu_LoadStdPalAt(u16 offset)
|
||||
{
|
||||
LoadPalette(gUnknown_0860F074, offset, 0x14);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
static EWRAM_DATA bool32 gUnknown_02022C70 = FALSE;
|
||||
|
||||
static void sub_801B180(void);
|
||||
static void sub_801B14C(void);
|
||||
static void s_DestroyWonderNews(void);
|
||||
static bool32 sub_801B114(const struct MEventBuffer_3120_Sub *data);
|
||||
static bool32 sub_801B2CC(const struct MEventBuffer_32E0_Sub *data);
|
||||
static void sub_801B330(void);
|
||||
@ -29,7 +29,7 @@ void sub_801AFD8(void)
|
||||
sub_811F8BC();
|
||||
}
|
||||
|
||||
struct MEventBuffer_3120_Sub *sub_801B00C(void)
|
||||
struct MEventBuffer_3120_Sub *sav1_get_mevent_buffer_0(void)
|
||||
{
|
||||
return &gSaveBlock1Ptr->unk_322C.buffer_000.data;
|
||||
}
|
||||
@ -54,9 +54,9 @@ u16 *sub_801B058(void)
|
||||
return gSaveBlock1Ptr->unk_322C.unk_338;
|
||||
}
|
||||
|
||||
void sub_801B06C(void)
|
||||
void DestroyWonderNews(void)
|
||||
{
|
||||
sub_801B14C();
|
||||
s_DestroyWonderNews();
|
||||
}
|
||||
|
||||
bool32 sub_801B078(const struct MEventBuffer_3120_Sub *src)
|
||||
@ -64,13 +64,13 @@ bool32 sub_801B078(const struct MEventBuffer_3120_Sub *src)
|
||||
if (!sub_801B114(src))
|
||||
return FALSE;
|
||||
|
||||
sub_801B14C();
|
||||
s_DestroyWonderNews();
|
||||
gSaveBlock1Ptr->unk_322C.buffer_000.data = *src;
|
||||
gSaveBlock1Ptr->unk_322C.buffer_000.crc = CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.buffer_000.data, sizeof(struct MEventBuffer_3120_Sub));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 sub_801B0CC(void)
|
||||
bool32 ValidateReceivedWonderNews(void)
|
||||
{
|
||||
if (CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.buffer_000.data, sizeof(struct MEventBuffer_3120_Sub)) != gSaveBlock1Ptr->unk_322C.buffer_000.crc)
|
||||
return FALSE;
|
||||
@ -88,7 +88,7 @@ static bool32 sub_801B114(const struct MEventBuffer_3120_Sub *data)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 sub_801B128(void)
|
||||
bool32 WonderNews_Test_Unk_02(void)
|
||||
{
|
||||
const struct MEventBuffer_3120_Sub *data = &gSaveBlock1Ptr->unk_322C.buffer_000.data;
|
||||
if (data->unk_02 == 0)
|
||||
@ -97,9 +97,9 @@ bool32 sub_801B128(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void sub_801B14C(void)
|
||||
static void s_DestroyWonderNews(void)
|
||||
{
|
||||
CpuFill32(0, sub_801B00C(), sizeof(gSaveBlock1Ptr->unk_322C.buffer_000.data));
|
||||
CpuFill32(0, sav1_get_mevent_buffer_0(), sizeof(gSaveBlock1Ptr->unk_322C.buffer_000.data));
|
||||
gSaveBlock1Ptr->unk_322C.buffer_000.crc = 0;
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ bool32 sub_801B1A4(const u8 *src)
|
||||
{
|
||||
const u8 *r5 = (const u8 *)&gSaveBlock1Ptr->unk_322C.buffer_000.data;
|
||||
u32 i;
|
||||
if (!sub_801B0CC())
|
||||
if (!ValidateReceivedWonderNews())
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; i < sizeof(struct MEventBuffer_3120_Sub); i++)
|
||||
@ -125,7 +125,7 @@ bool32 sub_801B1A4(const u8 *src)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_801B1E8(void)
|
||||
void DestroyWonderCard(void)
|
||||
{
|
||||
sub_801B330();
|
||||
sub_801B368();
|
||||
@ -143,7 +143,7 @@ bool32 sub_801B21C(const struct MEventBuffer_32E0_Sub *data)
|
||||
if (!sub_801B2CC(data))
|
||||
return FALSE;
|
||||
|
||||
sub_801B1E8();
|
||||
DestroyWonderCard();
|
||||
memcpy(&gSaveBlock1Ptr->unk_322C.buffer_1c0.data, data, sizeof(struct MEventBuffer_32E0_Sub));
|
||||
gSaveBlock1Ptr->unk_322C.buffer_1c0.crc = CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.buffer_1c0.data, sizeof(struct MEventBuffer_32E0_Sub));
|
||||
r2 = &gSaveBlock1Ptr->unk_322C.buffer_310.data;
|
||||
@ -152,7 +152,7 @@ bool32 sub_801B21C(const struct MEventBuffer_32E0_Sub *data)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 sub_801B27C(void)
|
||||
bool32 ValidateReceivedWonderCard(void)
|
||||
{
|
||||
if (gSaveBlock1Ptr->unk_322C.buffer_1c0.crc != CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.buffer_1c0.data, sizeof(struct MEventBuffer_32E0_Sub)))
|
||||
return FALSE;
|
||||
@ -180,7 +180,7 @@ static bool32 sub_801B2CC(const struct MEventBuffer_32E0_Sub *data)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 sub_801B308(void)
|
||||
bool32 WonderCard_Test_Unk_08_6(void)
|
||||
{
|
||||
const struct MEventBuffer_32E0_Sub *data = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
|
||||
if (data->unk_08_6 == 0)
|
||||
@ -201,9 +201,9 @@ static void sub_801B368(void)
|
||||
gSaveBlock1Ptr->unk_322C.buffer_310.crc = 0;
|
||||
}
|
||||
|
||||
u16 sub_801B39C(void)
|
||||
u16 GetWonderCardFlagID(void)
|
||||
{
|
||||
if (sub_801B27C())
|
||||
if (ValidateReceivedWonderCard())
|
||||
return gSaveBlock1Ptr->unk_322C.buffer_1c0.data.unk_00;
|
||||
|
||||
return 0;
|
||||
@ -215,7 +215,7 @@ void sub_801B3C0(struct MEventBuffer_32E0_Sub *buffer)
|
||||
buffer->unk_08_6 = 0;
|
||||
}
|
||||
|
||||
static bool32 sub_801B3D8(u16 a0)
|
||||
static bool32 IsWonderCardFlagIDInValidRange(u16 a0)
|
||||
{
|
||||
if (a0 >= 1000 && a0 < 1020)
|
||||
return TRUE;
|
||||
@ -247,10 +247,10 @@ static const u16 sMysteryGiftFlags[] =
|
||||
FLAG_UNUSED_MYSTERY_GIFT_0x14D,
|
||||
};
|
||||
|
||||
bool32 sub_801B3F8(void)
|
||||
bool32 CheckReceivedGiftFromWonderCard(void)
|
||||
{
|
||||
u16 value = sub_801B39C();
|
||||
if (!sub_801B3D8(value))
|
||||
u16 value = GetWonderCardFlagID();
|
||||
if (!IsWonderCardFlagIDInValidRange(value))
|
||||
return FALSE;
|
||||
|
||||
if (FlagGet(sMysteryGiftFlags[value - 1000]) == TRUE)
|
||||
@ -300,7 +300,7 @@ static bool32 sub_801B4A4(const u16 *data)
|
||||
static int sub_801B4CC(void)
|
||||
{
|
||||
struct MEventBuffer_32E0_Sub *data;
|
||||
if (!sub_801B27C())
|
||||
if (!ValidateReceivedWonderCard())
|
||||
return 0;
|
||||
|
||||
data = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
|
||||
@ -353,7 +353,7 @@ void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 a1)
|
||||
data->unk_10 = 0x0200;
|
||||
}
|
||||
|
||||
if (sub_801B27C())
|
||||
if (ValidateReceivedWonderCard())
|
||||
{
|
||||
data->unk_14 = sav1_get_mevent_buffer_1()->unk_00;
|
||||
data->unk_20 = *sav1_get_mevent_buffer_2();
|
||||
@ -554,7 +554,7 @@ bool32 sub_801B94C(u16 a0)
|
||||
if (a0 == 0)
|
||||
return FALSE;
|
||||
|
||||
if (!sub_801B27C())
|
||||
if (!ValidateReceivedWonderCard())
|
||||
return FALSE;
|
||||
|
||||
if (gSaveBlock1Ptr->unk_322C.buffer_1c0.data.unk_00 != a0)
|
||||
|
@ -53,7 +53,7 @@ struct UnkStruct_203F3C8
|
||||
/*045C*/ u8 buffer_045C[0x1000];
|
||||
};
|
||||
|
||||
EWRAM_DATA struct UnkStruct_203F3C8 * gUnknown_02022C74 = NULL;
|
||||
EWRAM_DATA struct UnkStruct_203F3C8 * sWonderCardData = NULL;
|
||||
|
||||
void sub_801BEF8(void);
|
||||
void sub_801C178(u8 whichWindow);
|
||||
@ -150,40 +150,40 @@ const struct UnkStruct_8467FB8 gUnknown_082F1D60[8] = {
|
||||
{1, 0, 0, 7, gWonderCardBgGfx8, gWonderCardBgTilemap8, gWonderCardBgPal8}
|
||||
};
|
||||
|
||||
bool32 sub_801BAAC(struct MEventBuffer_32E0_Sub * r5, struct MEventBuffer_3430_Sub * r6)
|
||||
bool32 InitWonderCardResources(struct MEventBuffer_32E0_Sub * r5, struct MEventBuffer_3430_Sub * r6)
|
||||
{
|
||||
if (r5 == NULL || r6 == NULL)
|
||||
return FALSE;
|
||||
gUnknown_02022C74 = AllocZeroed(sizeof(struct UnkStruct_203F3C8));
|
||||
if (gUnknown_02022C74 == NULL)
|
||||
sWonderCardData = AllocZeroed(sizeof(struct UnkStruct_203F3C8));
|
||||
if (sWonderCardData == NULL)
|
||||
return FALSE;
|
||||
gUnknown_02022C74->unk_0000 = *r5;
|
||||
gUnknown_02022C74->unk_014C = *r6;
|
||||
if (gUnknown_02022C74->unk_0000.unk_08_2 >= ARRAY_COUNT(gUnknown_082F1D60))
|
||||
gUnknown_02022C74->unk_0000.unk_08_2 = 0;
|
||||
if (gUnknown_02022C74->unk_0000.unk_08_0 >= ARRAY_COUNT(gUnknown_082F0E18))
|
||||
gUnknown_02022C74->unk_0000.unk_08_0 = 0;
|
||||
if (gUnknown_02022C74->unk_0000.unk_09 > ARRAY_COUNT(gUnknown_02022C74->unk_017D))
|
||||
gUnknown_02022C74->unk_0000.unk_09 = 0;
|
||||
gUnknown_02022C74->unk_0170 = &gUnknown_082F1D60[gUnknown_02022C74->unk_0000.unk_08_2];
|
||||
sWonderCardData->unk_0000 = *r5;
|
||||
sWonderCardData->unk_014C = *r6;
|
||||
if (sWonderCardData->unk_0000.unk_08_2 >= ARRAY_COUNT(gUnknown_082F1D60))
|
||||
sWonderCardData->unk_0000.unk_08_2 = 0;
|
||||
if (sWonderCardData->unk_0000.unk_08_0 >= ARRAY_COUNT(gUnknown_082F0E18))
|
||||
sWonderCardData->unk_0000.unk_08_0 = 0;
|
||||
if (sWonderCardData->unk_0000.unk_09 > ARRAY_COUNT(sWonderCardData->unk_017D))
|
||||
sWonderCardData->unk_0000.unk_09 = 0;
|
||||
sWonderCardData->unk_0170 = &gUnknown_082F1D60[sWonderCardData->unk_0000.unk_08_2];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_801BB48(void)
|
||||
void DestroyWonderCardResources(void)
|
||||
{
|
||||
if (gUnknown_02022C74 != NULL)
|
||||
if (sWonderCardData != NULL)
|
||||
{
|
||||
*gUnknown_02022C74 = (struct UnkStruct_203F3C8){};
|
||||
Free(gUnknown_02022C74);
|
||||
gUnknown_02022C74 = NULL;
|
||||
*sWonderCardData = (struct UnkStruct_203F3C8){};
|
||||
Free(sWonderCardData);
|
||||
sWonderCardData = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
s32 sub_801BB74(void)
|
||||
s32 FadeToWonderCardMenu(void)
|
||||
{
|
||||
if (gUnknown_02022C74 == NULL)
|
||||
if (sWonderCardData == NULL)
|
||||
return -1;
|
||||
switch(gUnknown_02022C74->unk_0174)
|
||||
switch(sWonderCardData->unk_0174)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
@ -199,19 +199,19 @@ s32 sub_801BB74(void)
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
decompress_and_copy_tile_data_to_vram(2, gUnknown_02022C74->unk_0170->tiles, 0, 0x008, 0);
|
||||
gUnknown_02022C74->unk_0176[0] = AddWindow(&gUnknown_082F0E1C[0]);
|
||||
gUnknown_02022C74->unk_0176[1] = AddWindow(&gUnknown_082F0E1C[1]);
|
||||
gUnknown_02022C74->unk_0176[2] = AddWindow(&gUnknown_082F0E1C[2]);
|
||||
decompress_and_copy_tile_data_to_vram(2, sWonderCardData->unk_0170->tiles, 0, 0x008, 0);
|
||||
sWonderCardData->unk_0176[0] = AddWindow(&gUnknown_082F0E1C[0]);
|
||||
sWonderCardData->unk_0176[1] = AddWindow(&gUnknown_082F0E1C[1]);
|
||||
sWonderCardData->unk_0176[2] = AddWindow(&gUnknown_082F0E1C[2]);
|
||||
break;
|
||||
case 3:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
return 0;
|
||||
LoadPalette(stdpal_get(1), 0x20, 0x20);
|
||||
gPaletteFade.bufferTransferDisabled = TRUE;
|
||||
LoadPalette(gUnknown_02022C74->unk_0170->pal, 0x10, 0x20);
|
||||
LZ77UnCompWram(gUnknown_02022C74->unk_0170->map, gUnknown_02022C74->buffer_045C);
|
||||
CopyRectToBgTilemapBufferRect(2, gUnknown_02022C74->buffer_045C, 0, 0, 30, 20, 0, 0, 30, 20, 1, 0x008, 0);
|
||||
LoadPalette(sWonderCardData->unk_0170->pal, 0x10, 0x20);
|
||||
LZ77UnCompWram(sWonderCardData->unk_0170->map, sWonderCardData->buffer_045C);
|
||||
CopyRectToBgTilemapBufferRect(2, sWonderCardData->buffer_045C, 0, 0, 30, 20, 0, 0, 30, 20, 1, 0x008, 0);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
break;
|
||||
case 4:
|
||||
@ -237,18 +237,18 @@ s32 sub_801BB74(void)
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
gUnknown_02022C74->unk_0174 = 0;
|
||||
sWonderCardData->unk_0174 = 0;
|
||||
return 1;
|
||||
}
|
||||
++gUnknown_02022C74->unk_0174;
|
||||
++sWonderCardData->unk_0174;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 sub_801BDA4(bool32 flag)
|
||||
s32 FadeOutFromWonderCard(bool32 flag)
|
||||
{
|
||||
if (gUnknown_02022C74 == NULL)
|
||||
if (sWonderCardData == NULL)
|
||||
return -1;
|
||||
switch (gUnknown_02022C74->unk_0174)
|
||||
switch (sWonderCardData->unk_0174)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
@ -268,26 +268,26 @@ s32 sub_801BDA4(bool32 flag)
|
||||
case 3:
|
||||
HideBg(1);
|
||||
HideBg(2);
|
||||
RemoveWindow(gUnknown_02022C74->unk_0176[2]);
|
||||
RemoveWindow(gUnknown_02022C74->unk_0176[1]);
|
||||
RemoveWindow(gUnknown_02022C74->unk_0176[0]);
|
||||
RemoveWindow(sWonderCardData->unk_0176[2]);
|
||||
RemoveWindow(sWonderCardData->unk_0176[1]);
|
||||
RemoveWindow(sWonderCardData->unk_0176[0]);
|
||||
break;
|
||||
case 4:
|
||||
sub_801C61C();
|
||||
FreeMonIconPalettes();
|
||||
break;
|
||||
case 5:
|
||||
sub_80186EC(gUnknown_02022C60, flag);
|
||||
PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
gUnknown_02022C74->unk_0174 = 0;
|
||||
sWonderCardData->unk_0174 = 0;
|
||||
return 1;
|
||||
}
|
||||
++gUnknown_02022C74->unk_0174;
|
||||
++sWonderCardData->unk_0174;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -297,59 +297,59 @@ void sub_801BEF8(void)
|
||||
u16 r6;
|
||||
u16 sp0[3] = {0, 0, 0};
|
||||
|
||||
memcpy(gUnknown_02022C74->unk_018B, gUnknown_02022C74->unk_0000.unk_0A, 40);
|
||||
gUnknown_02022C74->unk_018B[40] = EOS;
|
||||
memcpy(gUnknown_02022C74->unk_01B4, gUnknown_02022C74->unk_0000.unk_32, 40);
|
||||
gUnknown_02022C74->unk_01B4[40] = EOS;
|
||||
if (gUnknown_02022C74->unk_0000.unk_04 > 999999)
|
||||
gUnknown_02022C74->unk_0000.unk_04 = 999999;
|
||||
ConvertIntToDecimalStringN(gUnknown_02022C74->unk_01DD, gUnknown_02022C74->unk_0000.unk_04, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
memcpy(sWonderCardData->unk_018B, sWonderCardData->unk_0000.unk_0A, 40);
|
||||
sWonderCardData->unk_018B[40] = EOS;
|
||||
memcpy(sWonderCardData->unk_01B4, sWonderCardData->unk_0000.unk_32, 40);
|
||||
sWonderCardData->unk_01B4[40] = EOS;
|
||||
if (sWonderCardData->unk_0000.unk_04 > 999999)
|
||||
sWonderCardData->unk_0000.unk_04 = 999999;
|
||||
ConvertIntToDecimalStringN(sWonderCardData->unk_01DD, sWonderCardData->unk_0000.unk_04, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
memcpy(gUnknown_02022C74->unk_01E4[i], gUnknown_02022C74->unk_0000.unk_5A[i], 40);
|
||||
gUnknown_02022C74->unk_01E4[i][40] = EOS;
|
||||
memcpy(sWonderCardData->unk_01E4[i], sWonderCardData->unk_0000.unk_5A[i], 40);
|
||||
sWonderCardData->unk_01E4[i][40] = EOS;
|
||||
}
|
||||
memcpy(gUnknown_02022C74->unk_0288, gUnknown_02022C74->unk_0000.unk_FA, 40);
|
||||
gUnknown_02022C74->unk_0288[40] = EOS;
|
||||
switch (gUnknown_02022C74->unk_0000.unk_08_0)
|
||||
memcpy(sWonderCardData->unk_0288, sWonderCardData->unk_0000.unk_FA, 40);
|
||||
sWonderCardData->unk_0288[40] = EOS;
|
||||
switch (sWonderCardData->unk_0000.unk_08_0)
|
||||
{
|
||||
case 0:
|
||||
memcpy(gUnknown_02022C74->unk_02B1, gUnknown_02022C74->unk_0000.unk_122, 40);
|
||||
gUnknown_02022C74->unk_02B1[40] = EOS;
|
||||
memcpy(sWonderCardData->unk_02B1, sWonderCardData->unk_0000.unk_122, 40);
|
||||
sWonderCardData->unk_02B1[40] = EOS;
|
||||
break;
|
||||
case 1:
|
||||
gUnknown_02022C74->unk_02B1[00] = EOS;
|
||||
sWonderCardData->unk_02B1[00] = EOS;
|
||||
break;
|
||||
case 2:
|
||||
gUnknown_02022C74->unk_02B1[00] = EOS;
|
||||
sp0[0] = gUnknown_02022C74->unk_014C.unk_00 < 999 ? gUnknown_02022C74->unk_014C.unk_00 : 999;
|
||||
sp0[1] = gUnknown_02022C74->unk_014C.unk_02 < 999 ? gUnknown_02022C74->unk_014C.unk_02 : 999;
|
||||
sp0[2] = gUnknown_02022C74->unk_014C.unk_04 < 999 ? gUnknown_02022C74->unk_014C.unk_04 : 999;
|
||||
sWonderCardData->unk_02B1[00] = EOS;
|
||||
sp0[0] = sWonderCardData->unk_014C.unk_00 < 999 ? sWonderCardData->unk_014C.unk_00 : 999;
|
||||
sp0[1] = sWonderCardData->unk_014C.unk_02 < 999 ? sWonderCardData->unk_014C.unk_02 : 999;
|
||||
sp0[2] = sWonderCardData->unk_014C.unk_04 < 999 ? sWonderCardData->unk_014C.unk_04 : 999;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
memset(gUnknown_02022C74->unk_02DC[i].unk_42, EOS, 4);
|
||||
memset(gUnknown_02022C74->unk_02DC[i].unk_01, EOS, 41);
|
||||
memset(sWonderCardData->unk_02DC[i].unk_42, EOS, 4);
|
||||
memset(sWonderCardData->unk_02DC[i].unk_01, EOS, 41);
|
||||
}
|
||||
for (i = 0, r6 = 0; i < 40; i++)
|
||||
{
|
||||
if (gUnknown_02022C74->unk_0000.unk_122[i] != 0xF7)
|
||||
if (sWonderCardData->unk_0000.unk_122[i] != 0xF7)
|
||||
{
|
||||
gUnknown_02022C74->unk_02DC[gUnknown_02022C74->unk_0175].unk_01[r6] = gUnknown_02022C74->unk_0000.unk_122[i];
|
||||
sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_01[r6] = sWonderCardData->unk_0000.unk_122[i];
|
||||
r6++;
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 r3 = gUnknown_02022C74->unk_0000.unk_122[i + 1];
|
||||
u8 r3 = sWonderCardData->unk_0000.unk_122[i + 1];
|
||||
if (r3 > 2)
|
||||
{
|
||||
i += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
ConvertIntToDecimalStringN(gUnknown_02022C74->unk_02DC[gUnknown_02022C74->unk_0175].unk_42, sp0[r3], STR_CONV_MODE_LEADING_ZEROS, 3);
|
||||
gUnknown_02022C74->unk_02DC[gUnknown_02022C74->unk_0175].unk_00 = gUnknown_02022C74->unk_0000.unk_122[i + 2];
|
||||
gUnknown_02022C74->unk_0175++;
|
||||
if (gUnknown_02022C74->unk_0175 > 7)
|
||||
ConvertIntToDecimalStringN(sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_42, sp0[r3], STR_CONV_MODE_LEADING_ZEROS, 3);
|
||||
sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_00 = sWonderCardData->unk_0000.unk_122[i + 2];
|
||||
sWonderCardData->unk_0175++;
|
||||
if (sWonderCardData->unk_0175 > 7)
|
||||
break;
|
||||
r6 = 0;
|
||||
i += 2;
|
||||
@ -362,7 +362,7 @@ void sub_801BEF8(void)
|
||||
void sub_801C178(u8 whichWindow)
|
||||
{
|
||||
s8 sp0C = 0;
|
||||
s32 windowId = gUnknown_02022C74->unk_0176[whichWindow];
|
||||
s32 windowId = sWonderCardData->unk_0176[whichWindow];
|
||||
PutWindowTilemap(windowId);
|
||||
FillWindowPixelBuffer(windowId, 0);
|
||||
switch (whichWindow)
|
||||
@ -370,42 +370,42 @@ void sub_801C178(u8 whichWindow)
|
||||
case 0:
|
||||
{
|
||||
s32 x;
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, 1, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal1], 0, gUnknown_02022C74->unk_018B);
|
||||
x = 160 - GetStringWidth(3, gUnknown_02022C74->unk_01B4, GetFontAttribute(3, 2));
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, 1, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_018B);
|
||||
x = 160 - GetStringWidth(3, sWonderCardData->unk_01B4, GetFontAttribute(3, 2));
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
AddTextPrinterParameterized3(windowId, 3, x, 17, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal1], 0, gUnknown_02022C74->unk_01B4);
|
||||
if (gUnknown_02022C74->unk_0000.unk_04 != 0)
|
||||
AddTextPrinterParameterized3(windowId, 3, x, 17, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_01B4);
|
||||
if (sWonderCardData->unk_0000.unk_04 != 0)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, 1, 166, 17, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal1], 0, gUnknown_02022C74->unk_01DD);
|
||||
AddTextPrinterParameterized3(windowId, 1, 166, 17, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_01DD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
for (; sp0C < 4; sp0C++)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal2], 0, gUnknown_02022C74->unk_01E4[sp0C]);
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal2], 0, sWonderCardData->unk_01E4[sp0C]);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, gUnknown_082F0E18[gUnknown_02022C74->unk_0000.unk_08_0], gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_0288);
|
||||
if (gUnknown_02022C74->unk_0000.unk_08_0 != 2)
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, gUnknown_082F0E18[sWonderCardData->unk_0000.unk_08_0], gUnknown_082F0E10[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_0288);
|
||||
if (sWonderCardData->unk_0000.unk_08_0 != 2)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, 16 + gUnknown_082F0E18[gUnknown_02022C74->unk_0000.unk_08_0], gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_02B1);
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, 16 + gUnknown_082F0E18[sWonderCardData->unk_0000.unk_08_0], gUnknown_082F0E10[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02B1);
|
||||
}
|
||||
else
|
||||
{
|
||||
s32 x = 0;
|
||||
s32 y = gUnknown_082F0E18[gUnknown_02022C74->unk_0000.unk_08_0] + 16;
|
||||
s32 y = gUnknown_082F0E18[sWonderCardData->unk_0000.unk_08_0] + 16;
|
||||
s32 spacing = GetFontAttribute(3, 2);
|
||||
for (; sp0C < gUnknown_02022C74->unk_0175; sp0C++)
|
||||
for (; sp0C < sWonderCardData->unk_0175; sp0C++)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_02DC[sp0C].unk_01);
|
||||
if (gUnknown_02022C74->unk_02DC[sp0C].unk_42[0] != EOS)
|
||||
AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_01);
|
||||
if (sWonderCardData->unk_02DC[sp0C].unk_42[0] != EOS)
|
||||
{
|
||||
x += GetStringWidth(3, gUnknown_02022C74->unk_02DC[sp0C].unk_01, spacing);
|
||||
AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_02DC[sp0C].unk_42);
|
||||
x += GetStringWidth(3, gUnknown_02022C74->unk_02DC[sp0C].unk_42, spacing) + gUnknown_02022C74->unk_02DC[sp0C].unk_00;
|
||||
x += GetStringWidth(3, sWonderCardData->unk_02DC[sp0C].unk_01, spacing);
|
||||
AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_42);
|
||||
x += GetStringWidth(3, sWonderCardData->unk_02DC[sp0C].unk_42, spacing) + sWonderCardData->unk_02DC[sp0C].unk_00;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -417,24 +417,24 @@ void sub_801C178(u8 whichWindow)
|
||||
void sub_801C4C0(void)
|
||||
{
|
||||
u8 r7 = 0;
|
||||
gUnknown_02022C74->unk_017C = 0xFF;
|
||||
if (gUnknown_02022C74->unk_014C.unk_06 != SPECIES_NONE)
|
||||
sWonderCardData->unk_017C = 0xFF;
|
||||
if (sWonderCardData->unk_014C.unk_06 != SPECIES_NONE)
|
||||
{
|
||||
gUnknown_02022C74->unk_017C = sub_80D2D78(sub_80D2E84(gUnknown_02022C74->unk_014C.unk_06), SpriteCallbackDummy, 0xDC, 0x14, 0, FALSE);
|
||||
gSprites[gUnknown_02022C74->unk_017C].oam.priority = 2;
|
||||
sWonderCardData->unk_017C = sub_80D2D78(sub_80D2E84(sWonderCardData->unk_014C.unk_06), SpriteCallbackDummy, 0xDC, 0x14, 0, FALSE);
|
||||
gSprites[sWonderCardData->unk_017C].oam.priority = 2;
|
||||
}
|
||||
if (gUnknown_02022C74->unk_0000.unk_09 != 0 && gUnknown_02022C74->unk_0000.unk_08_0 == 1)
|
||||
if (sWonderCardData->unk_0000.unk_09 != 0 && sWonderCardData->unk_0000.unk_08_0 == 1)
|
||||
{
|
||||
LoadCompressedSpriteSheetUsingHeap(&gUnknown_082F1D00);
|
||||
LoadSpritePalette(&gUnknown_082F1D08[gUnknown_02022C74->unk_0170->textPal4]);
|
||||
for (; r7 < gUnknown_02022C74->unk_0000.unk_09; r7++)
|
||||
LoadSpritePalette(&gUnknown_082F1D08[sWonderCardData->unk_0170->textPal4]);
|
||||
for (; r7 < sWonderCardData->unk_0000.unk_09; r7++)
|
||||
{
|
||||
gUnknown_02022C74->unk_017D[r7][0] = 0xFF;
|
||||
gUnknown_02022C74->unk_017D[r7][1] = 0xFF;
|
||||
gUnknown_02022C74->unk_017D[r7][0] = CreateSprite(&gUnknown_082F1D48, 0xd8 - 32 * r7, 0x90, 8);
|
||||
if (gUnknown_02022C74->unk_014C.unk_08[0][r7] != 0)
|
||||
sWonderCardData->unk_017D[r7][0] = 0xFF;
|
||||
sWonderCardData->unk_017D[r7][1] = 0xFF;
|
||||
sWonderCardData->unk_017D[r7][0] = CreateSprite(&gUnknown_082F1D48, 0xd8 - 32 * r7, 0x90, 8);
|
||||
if (sWonderCardData->unk_014C.unk_08[0][r7] != 0)
|
||||
{
|
||||
gUnknown_02022C74->unk_017D[r7][1] = sub_80D2D78(sub_80D2E84(gUnknown_02022C74->unk_014C.unk_08[0][r7]), SpriteCallbackDummy, 0xd8 - 32 * r7, 0x88, 0, 0);
|
||||
sWonderCardData->unk_017D[r7][1] = sub_80D2D78(sub_80D2E84(sWonderCardData->unk_014C.unk_08[0][r7]), SpriteCallbackDummy, 0xd8 - 32 * r7, 0x88, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -443,19 +443,19 @@ void sub_801C4C0(void)
|
||||
void sub_801C61C(void)
|
||||
{
|
||||
u8 r6 = 0;
|
||||
if (gUnknown_02022C74->unk_017C != 0xFF)
|
||||
sub_80D2EF8(&gSprites[gUnknown_02022C74->unk_017C]);
|
||||
if (gUnknown_02022C74->unk_0000.unk_09 != 0 && gUnknown_02022C74->unk_0000.unk_08_0 == 1)
|
||||
if (sWonderCardData->unk_017C != 0xFF)
|
||||
sub_80D2EF8(&gSprites[sWonderCardData->unk_017C]);
|
||||
if (sWonderCardData->unk_0000.unk_09 != 0 && sWonderCardData->unk_0000.unk_08_0 == 1)
|
||||
{
|
||||
for (; r6 < gUnknown_02022C74->unk_0000.unk_09; r6++)
|
||||
for (; r6 < sWonderCardData->unk_0000.unk_09; r6++)
|
||||
{
|
||||
if (gUnknown_02022C74->unk_017D[r6][0] != 0xFF)
|
||||
if (sWonderCardData->unk_017D[r6][0] != 0xFF)
|
||||
{
|
||||
DestroySprite(&gSprites[gUnknown_02022C74->unk_017D[r6][0]]);
|
||||
DestroySprite(&gSprites[sWonderCardData->unk_017D[r6][0]]);
|
||||
}
|
||||
if (gUnknown_02022C74->unk_017D[r6][1] != 0xFF)
|
||||
if (sWonderCardData->unk_017D[r6][1] != 0xFF)
|
||||
{
|
||||
sub_80D2EF8(&gSprites[gUnknown_02022C74->unk_017D[r6][1]]);
|
||||
sub_80D2EF8(&gSprites[sWonderCardData->unk_017D[r6][1]]);
|
||||
}
|
||||
}
|
||||
FreeSpriteTilesByTag(0x8000);
|
||||
@ -484,7 +484,7 @@ struct UnkStruct_203F3CC
|
||||
/*03a4*/ u8 buffer_03A4[0x1000];
|
||||
};
|
||||
|
||||
EWRAM_DATA struct UnkStruct_203F3CC * gUnknown_02022C78 = NULL;
|
||||
EWRAM_DATA struct UnkStruct_203F3CC * sWonderNewsData = NULL;
|
||||
|
||||
void sub_801CDCC(void);
|
||||
void sub_801CE7C(void);
|
||||
@ -542,37 +542,37 @@ const struct UnkStruct_8467FB8 gUnknown_082F24C8[] = {
|
||||
{1, 0, 0, 0, gWonderNewsGfx8, gWonderNewsTilemap8, gWonderNewsPal8}
|
||||
};
|
||||
|
||||
bool32 sub_801C6C8(const struct MEventBuffer_3120_Sub * a0)
|
||||
bool32 InitWonderNewsResources(const struct MEventBuffer_3120_Sub * a0)
|
||||
{
|
||||
if (a0 == NULL)
|
||||
return FALSE;
|
||||
gUnknown_02022C78 = AllocZeroed(sizeof(struct UnkStruct_203F3CC));
|
||||
if (gUnknown_02022C78 == NULL)
|
||||
sWonderNewsData = AllocZeroed(sizeof(struct UnkStruct_203F3CC));
|
||||
if (sWonderNewsData == NULL)
|
||||
return FALSE;
|
||||
gUnknown_02022C78->unk_0000 = *a0;
|
||||
if (gUnknown_02022C78->unk_0000.unk_03 >= ARRAY_COUNT(gUnknown_082F24C8))
|
||||
gUnknown_02022C78->unk_0000.unk_03 = 0;
|
||||
gUnknown_02022C78->unk_01BC = &gUnknown_082F24C8[gUnknown_02022C78->unk_0000.unk_03];
|
||||
gUnknown_02022C78->unk_01C1 = 0xFF;
|
||||
sWonderNewsData->unk_0000 = *a0;
|
||||
if (sWonderNewsData->unk_0000.unk_03 >= ARRAY_COUNT(gUnknown_082F24C8))
|
||||
sWonderNewsData->unk_0000.unk_03 = 0;
|
||||
sWonderNewsData->unk_01BC = &gUnknown_082F24C8[sWonderNewsData->unk_0000.unk_03];
|
||||
sWonderNewsData->unk_01C1 = 0xFF;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_801C72C(void)
|
||||
void DestroyWonderNewsResources(void)
|
||||
{
|
||||
if (gUnknown_02022C78 != NULL)
|
||||
if (sWonderNewsData != NULL)
|
||||
{
|
||||
*gUnknown_02022C78 = (struct UnkStruct_203F3CC){};
|
||||
Free(gUnknown_02022C78);
|
||||
gUnknown_02022C78 = NULL;
|
||||
*sWonderNewsData = (struct UnkStruct_203F3CC){};
|
||||
Free(sWonderNewsData);
|
||||
sWonderNewsData = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
s32 sub_801C758(void)
|
||||
s32 FadeToWonderNewsMenu(void)
|
||||
{
|
||||
if (gUnknown_02022C78 == NULL)
|
||||
if (sWonderNewsData == NULL)
|
||||
return -1;
|
||||
|
||||
switch (gUnknown_02022C78->unk_01C0_1)
|
||||
switch (sWonderNewsData->unk_01C0_1)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
@ -599,19 +599,19 @@ s32 sub_801C758(void)
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
decompress_and_copy_tile_data_to_vram(3, gUnknown_02022C78->unk_01BC->tiles, 0, 8, 0);
|
||||
gUnknown_02022C78->unk_01C8[0] = AddWindow(&gUnknown_082F1DE8[0]);
|
||||
gUnknown_02022C78->unk_01C8[1] = AddWindow(&gUnknown_082F1DE8[1]);
|
||||
decompress_and_copy_tile_data_to_vram(3, sWonderNewsData->unk_01BC->tiles, 0, 8, 0);
|
||||
sWonderNewsData->unk_01C8[0] = AddWindow(&gUnknown_082F1DE8[0]);
|
||||
sWonderNewsData->unk_01C8[1] = AddWindow(&gUnknown_082F1DE8[1]);
|
||||
break;
|
||||
case 3:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
return 0;
|
||||
LoadPalette(stdpal_get(1), 0x20, 0x20);
|
||||
gPaletteFade.bufferTransferDisabled = TRUE;
|
||||
LoadPalette(gUnknown_02022C78->unk_01BC->pal, 0x10, 0x20);
|
||||
LZ77UnCompWram(gUnknown_02022C78->unk_01BC->map, gUnknown_02022C78->buffer_03A4);
|
||||
CopyRectToBgTilemapBufferRect(1, gUnknown_02022C78->buffer_03A4, 0, 0, 30, 3, 0, 0, 30, 3, 1, 8, 0);
|
||||
CopyRectToBgTilemapBufferRect(3, gUnknown_02022C78->buffer_03A4, 0, 3, 30, 23, 0, 3, 30, 23, 1, 8, 0);
|
||||
LoadPalette(sWonderNewsData->unk_01BC->pal, 0x10, 0x20);
|
||||
LZ77UnCompWram(sWonderNewsData->unk_01BC->map, sWonderNewsData->buffer_03A4);
|
||||
CopyRectToBgTilemapBufferRect(1, sWonderNewsData->buffer_03A4, 0, 0, 30, 3, 0, 0, 30, 3, 1, 8, 0);
|
||||
CopyRectToBgTilemapBufferRect(3, sWonderNewsData->buffer_03A4, 0, 3, 30, 23, 0, 3, 30, 23, 1, 8, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
break;
|
||||
@ -628,26 +628,26 @@ s32 sub_801C758(void)
|
||||
ShowBg(2);
|
||||
ShowBg(3);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
gUnknown_02022C78->unk_01C1 = AddScrollIndicatorArrowPair(&gUnknown_02022C78->unk_0394, &gUnknown_02022C78->unk_01C6);
|
||||
sWonderNewsData->unk_01C1 = AddScrollIndicatorArrowPair(&sWonderNewsData->unk_0394, &sWonderNewsData->unk_01C6);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
gUnknown_02022C78->unk_01C0_1 = 0;
|
||||
sWonderNewsData->unk_01C0_1 = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
++gUnknown_02022C78->unk_01C0_1;
|
||||
++sWonderNewsData->unk_01C0_1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 sub_801CA50(bool32 flag)
|
||||
s32 FadeOutFromWonderNews(bool32 flag)
|
||||
{
|
||||
if (gUnknown_02022C78 == NULL)
|
||||
if (sWonderNewsData == NULL)
|
||||
return -1;
|
||||
switch (gUnknown_02022C78->unk_01C0_1)
|
||||
switch (sWonderNewsData->unk_01C0_1)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
@ -675,21 +675,21 @@ s32 sub_801CA50(bool32 flag)
|
||||
case 3:
|
||||
HideBg(1);
|
||||
HideBg(2);
|
||||
RemoveWindow(gUnknown_02022C78->unk_01C8[1]);
|
||||
RemoveWindow(gUnknown_02022C78->unk_01C8[0]);
|
||||
RemoveWindow(sWonderNewsData->unk_01C8[1]);
|
||||
RemoveWindow(sWonderNewsData->unk_01C8[0]);
|
||||
break;
|
||||
case 4:
|
||||
ChangeBgY(2, 0, 0);
|
||||
ChangeBgY(3, 0, 0);
|
||||
if (gUnknown_02022C78->unk_01C1 != 0xFF)
|
||||
if (sWonderNewsData->unk_01C1 != 0xFF)
|
||||
{
|
||||
RemoveScrollIndicatorArrowPair(gUnknown_02022C78->unk_01C1);
|
||||
gUnknown_02022C78->unk_01C1 = 0xFF;
|
||||
RemoveScrollIndicatorArrowPair(sWonderNewsData->unk_01C1);
|
||||
sWonderNewsData->unk_01C1 = 0xFF;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
sub_80186EC(gUnknown_02022C60, flag);
|
||||
sub_8018798(3);
|
||||
PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag);
|
||||
MG_DrawCheckerboardPattern(3);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
@ -697,36 +697,36 @@ s32 sub_801CA50(bool32 flag)
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
gUnknown_02022C78->unk_01C0_1 = 0;
|
||||
sWonderNewsData->unk_01C0_1 = 0;
|
||||
return 1;
|
||||
}
|
||||
++gUnknown_02022C78->unk_01C0_1;
|
||||
++sWonderNewsData->unk_01C0_1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sub_801CC38(void)
|
||||
void MENews_RemoveScrollIndicatorArrowPair(void)
|
||||
{
|
||||
if (!gUnknown_02022C78->unk_01C0_0 && gUnknown_02022C78->unk_01C1 != 0xFF)
|
||||
if (!sWonderNewsData->unk_01C0_0 && sWonderNewsData->unk_01C1 != 0xFF)
|
||||
{
|
||||
RemoveScrollIndicatorArrowPair(gUnknown_02022C78->unk_01C1);
|
||||
gUnknown_02022C78->unk_01C1 = 0xFF;
|
||||
gUnknown_02022C78->unk_01C0_0 = TRUE;
|
||||
RemoveScrollIndicatorArrowPair(sWonderNewsData->unk_01C1);
|
||||
sWonderNewsData->unk_01C1 = 0xFF;
|
||||
sWonderNewsData->unk_01C0_0 = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void sub_801CC80(void)
|
||||
void MENews_AddScrollIndicatorArrowPair(void)
|
||||
{
|
||||
if (gUnknown_02022C78->unk_01C0_0)
|
||||
if (sWonderNewsData->unk_01C0_0)
|
||||
{
|
||||
gUnknown_02022C78->unk_01C1 = AddScrollIndicatorArrowPair(&gUnknown_02022C78->unk_0394, &gUnknown_02022C78->unk_01C6);
|
||||
gUnknown_02022C78->unk_01C0_0 = FALSE;
|
||||
sWonderNewsData->unk_01C1 = AddScrollIndicatorArrowPair(&sWonderNewsData->unk_0394, &sWonderNewsData->unk_01C6);
|
||||
sWonderNewsData->unk_01C0_0 = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_801CCD0(u16 input)
|
||||
u32 MENews_GetInput(u16 input)
|
||||
{
|
||||
if (gUnknown_02022C78->unk_01C2_0)
|
||||
if (sWonderNewsData->unk_01C2_0)
|
||||
{
|
||||
sub_801CFA4();
|
||||
return 0xFF;
|
||||
@ -738,26 +738,26 @@ u32 sub_801CCD0(u16 input)
|
||||
case B_BUTTON:
|
||||
return 1;
|
||||
case DPAD_UP:
|
||||
if (gUnknown_02022C78->unk_01C6 == 0)
|
||||
if (sWonderNewsData->unk_01C6 == 0)
|
||||
return 0xFF;
|
||||
if (gUnknown_02022C78->unk_01C0_0)
|
||||
if (sWonderNewsData->unk_01C0_0)
|
||||
return 0xFF;
|
||||
gUnknown_02022C78->unk_01C3_0 = FALSE;
|
||||
sWonderNewsData->unk_01C3_0 = FALSE;
|
||||
break;
|
||||
case DPAD_DOWN:
|
||||
if (gUnknown_02022C78->unk_01C6 == gUnknown_02022C78->unk_01C4)
|
||||
if (sWonderNewsData->unk_01C6 == sWonderNewsData->unk_01C4)
|
||||
return 0xFF;
|
||||
if (gUnknown_02022C78->unk_01C0_0)
|
||||
if (sWonderNewsData->unk_01C0_0)
|
||||
return 0xFF;
|
||||
gUnknown_02022C78->unk_01C3_0 = TRUE;
|
||||
sWonderNewsData->unk_01C3_0 = TRUE;
|
||||
break;
|
||||
default:
|
||||
return 0xFF;
|
||||
}
|
||||
gUnknown_02022C78->unk_01C2_0 = TRUE;
|
||||
gUnknown_02022C78->unk_01C2_1 = 2;
|
||||
gUnknown_02022C78->unk_01C3_1 = 0;
|
||||
if (gUnknown_02022C78->unk_01C3_0 == FALSE)
|
||||
sWonderNewsData->unk_01C2_0 = TRUE;
|
||||
sWonderNewsData->unk_01C2_1 = 2;
|
||||
sWonderNewsData->unk_01C3_1 = 0;
|
||||
if (sWonderNewsData->unk_01C3_0 == FALSE)
|
||||
return 2;
|
||||
else
|
||||
return 3;
|
||||
@ -766,44 +766,44 @@ u32 sub_801CCD0(u16 input)
|
||||
void sub_801CDCC(void)
|
||||
{
|
||||
u8 i = 0;
|
||||
memcpy(gUnknown_02022C78->unk_01CE, gUnknown_02022C78->unk_0000.unk_04, 40);
|
||||
gUnknown_02022C78->unk_01CE[40] = EOS;
|
||||
memcpy(sWonderNewsData->unk_01CE, sWonderNewsData->unk_0000.unk_04, 40);
|
||||
sWonderNewsData->unk_01CE[40] = EOS;
|
||||
for (; i < 10; ++i)
|
||||
{
|
||||
memcpy(gUnknown_02022C78->unk_01F7[i], gUnknown_02022C78->unk_0000.unk_2C[i], 40);
|
||||
gUnknown_02022C78->unk_01F7[i][40] = EOS;
|
||||
if (i > 7 && gUnknown_02022C78->unk_01F7[i][0] != EOS)
|
||||
++gUnknown_02022C78->unk_01C4;
|
||||
memcpy(sWonderNewsData->unk_01F7[i], sWonderNewsData->unk_0000.unk_2C[i], 40);
|
||||
sWonderNewsData->unk_01F7[i][40] = EOS;
|
||||
if (i > 7 && sWonderNewsData->unk_01F7[i][0] != EOS)
|
||||
++sWonderNewsData->unk_01C4;
|
||||
}
|
||||
gUnknown_02022C78->unk_0394 = gUnknown_082F1DF8;
|
||||
gUnknown_02022C78->unk_0394.fullyDownThreshold = gUnknown_02022C78->unk_01C4;
|
||||
sWonderNewsData->unk_0394 = gUnknown_082F1DF8;
|
||||
sWonderNewsData->unk_0394.fullyDownThreshold = sWonderNewsData->unk_01C4;
|
||||
}
|
||||
|
||||
void sub_801CE7C(void)
|
||||
{
|
||||
u8 i = 0;
|
||||
s32 x;
|
||||
PutWindowTilemap(gUnknown_02022C78->unk_01C8[0]);
|
||||
PutWindowTilemap(gUnknown_02022C78->unk_01C8[1]);
|
||||
FillWindowPixelBuffer(gUnknown_02022C78->unk_01C8[0], 0);
|
||||
FillWindowPixelBuffer(gUnknown_02022C78->unk_01C8[1], 0);
|
||||
x = (0xe0 - GetStringWidth(3, gUnknown_02022C78->unk_01CE, GetFontAttribute(3, 2))) / 2;
|
||||
PutWindowTilemap(sWonderNewsData->unk_01C8[0]);
|
||||
PutWindowTilemap(sWonderNewsData->unk_01C8[1]);
|
||||
FillWindowPixelBuffer(sWonderNewsData->unk_01C8[0], 0);
|
||||
FillWindowPixelBuffer(sWonderNewsData->unk_01C8[1], 0);
|
||||
x = (0xe0 - GetStringWidth(3, sWonderNewsData->unk_01CE, GetFontAttribute(3, 2))) / 2;
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
AddTextPrinterParameterized3(gUnknown_02022C78->unk_01C8[0], 3, x, 6, gUnknown_082F1DE0[gUnknown_02022C78->unk_01BC->textPal1], 0, gUnknown_02022C78->unk_01CE);
|
||||
AddTextPrinterParameterized3(sWonderNewsData->unk_01C8[0], 3, x, 6, gUnknown_082F1DE0[sWonderNewsData->unk_01BC->textPal1], 0, sWonderNewsData->unk_01CE);
|
||||
for (; i < 10; ++i)
|
||||
{
|
||||
AddTextPrinterParameterized3(gUnknown_02022C78->unk_01C8[1], 3, 0, 16 * i + 2, gUnknown_082F1DE0[gUnknown_02022C78->unk_01BC->textPal2], 0, gUnknown_02022C78->unk_01F7[i]);
|
||||
AddTextPrinterParameterized3(sWonderNewsData->unk_01C8[1], 3, 0, 16 * i + 2, gUnknown_082F1DE0[sWonderNewsData->unk_01BC->textPal2], 0, sWonderNewsData->unk_01F7[i]);
|
||||
}
|
||||
CopyWindowToVram(gUnknown_02022C78->unk_01C8[0], 3);
|
||||
CopyWindowToVram(gUnknown_02022C78->unk_01C8[1], 3);
|
||||
CopyWindowToVram(sWonderNewsData->unk_01C8[0], 3);
|
||||
CopyWindowToVram(sWonderNewsData->unk_01C8[1], 3);
|
||||
}
|
||||
|
||||
void sub_801CFA4(void)
|
||||
{
|
||||
u16 r4 = gUnknown_02022C78->unk_01C2_1;
|
||||
u16 r4 = sWonderNewsData->unk_01C2_1;
|
||||
r4 <<= 8;
|
||||
if (gUnknown_02022C78->unk_01C3_0)
|
||||
if (sWonderNewsData->unk_01C3_0)
|
||||
{
|
||||
ChangeBgY(2, r4, 1);
|
||||
ChangeBgY(3, r4, 1);
|
||||
@ -813,14 +813,14 @@ void sub_801CFA4(void)
|
||||
ChangeBgY(2, r4, 2);
|
||||
ChangeBgY(3, r4, 2);
|
||||
}
|
||||
gUnknown_02022C78->unk_01C3_1 += gUnknown_02022C78->unk_01C2_1;
|
||||
if (gUnknown_02022C78->unk_01C3_1 > 15)
|
||||
sWonderNewsData->unk_01C3_1 += sWonderNewsData->unk_01C2_1;
|
||||
if (sWonderNewsData->unk_01C3_1 > 15)
|
||||
{
|
||||
if (gUnknown_02022C78->unk_01C3_0)
|
||||
++gUnknown_02022C78->unk_01C6;
|
||||
if (sWonderNewsData->unk_01C3_0)
|
||||
++sWonderNewsData->unk_01C6;
|
||||
else
|
||||
--gUnknown_02022C78->unk_01C6;
|
||||
gUnknown_02022C78->unk_01C2_0 = FALSE;
|
||||
gUnknown_02022C78->unk_01C3_1 = 0;
|
||||
--sWonderNewsData->unk_01C6;
|
||||
sWonderNewsData->unk_01C2_0 = FALSE;
|
||||
sWonderNewsData->unk_01C3_1 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ static u32 sub_801DD44(struct MysteryEventStruct *);
|
||||
static void sub_801DCD8(struct MysteryEventStruct *);
|
||||
static void sub_801DCCC(struct MysteryEventStruct *);
|
||||
|
||||
void sub_801DB68(u32 a0)
|
||||
void GenerateRandomNews(u32 a0)
|
||||
{
|
||||
struct MysteryEventStruct *r5 = sub_801B044();
|
||||
|
||||
@ -59,7 +59,7 @@ u16 sub_801DC20(void)
|
||||
struct MysteryEventStruct *r4 = sub_801B044();
|
||||
u16 r5;
|
||||
|
||||
if (!IsMysteryEventEnabled() || !sub_801B0CC())
|
||||
if (!IsMysteryEventEnabled() || !ValidateReceivedWonderNews())
|
||||
return 0;
|
||||
|
||||
r5 = sub_801DD44(r4);
|
||||
|
@ -94,7 +94,7 @@ void CB2_InitMysteryEventMenu(void)
|
||||
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14);
|
||||
LoadUserWindowBorderGfx(0, 1u, 0xD0u);
|
||||
sub_81978B0(0xE0);
|
||||
Menu_LoadStdPalAt(0xE0);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
CreateTask(Task_DestroySelf, 0);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4419,7 +4419,7 @@ static void PrintStorageActionText(u8 id)
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPSSData->field_2190, gPCStorageActionTexts[id].text);
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(1, 1, sPSSData->field_2190, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
sub_8098858(1, 2, 14);
|
||||
DrawTextBorderOuter(1, 2, 14);
|
||||
PutWindowTilemap(1);
|
||||
CopyWindowToVram(1, 2);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
|
@ -405,7 +405,7 @@ bool32 sub_80991F8(void)
|
||||
u8 *sub_8099244(void)
|
||||
{
|
||||
struct RamScriptData *scriptData = &gSaveBlock1Ptr->ramScript.data;
|
||||
if (!sub_801B27C())
|
||||
if (!ValidateReceivedWonderCard())
|
||||
return NULL;
|
||||
if (scriptData->magic != RAM_SCRIPT_MAGIC)
|
||||
return NULL;
|
||||
|
@ -488,7 +488,7 @@ void sub_80F910C(void)
|
||||
if (gIsLinkContest & 2)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers)
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1185,7 +1185,7 @@ static bool32 sub_80A03E4(u8 *par1)
|
||||
InitBgsFromTemplates(0, sUnknown_085105A8, ARRAY_COUNT(sUnknown_085105A8));
|
||||
InitWindows(sUnknown_085105AC);
|
||||
LoadUserWindowBorderGfx_(0, 8, 224);
|
||||
sub_81978B0(240);
|
||||
Menu_LoadStdPalAt(240);
|
||||
break;
|
||||
case 3:
|
||||
ShowBg(0);
|
||||
@ -1234,7 +1234,7 @@ static void sub_80A0550(u8 taskId)
|
||||
2,
|
||||
1,
|
||||
3);
|
||||
sub_8098858(0, 8, 14);
|
||||
DrawTextBorderOuter(0, 8, 14);
|
||||
PutWindowTilemap(0);
|
||||
CopyWindowToVram(0, 3);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
|
@ -113,7 +113,7 @@ void LoadUserWindowBorderGfx(u8 windowId, u16 destOffset, u8 palOffset)
|
||||
LoadWindowGfx(windowId, gSaveBlock2Ptr->optionsWindowFrameType, destOffset, palOffset);
|
||||
}
|
||||
|
||||
void sub_8098858(u8 windowId, u16 tileNum, u8 palNum)
|
||||
void DrawTextBorderOuter(u8 windowId, u16 tileNum, u8 palNum)
|
||||
{
|
||||
u8 bgLayer = GetWindowAttribute(windowId, WINDOW_BG);
|
||||
u16 tilemapLeft = GetWindowAttribute(windowId, WINDOW_TILEMAP_LEFT);
|
||||
@ -131,7 +131,7 @@ void sub_8098858(u8 windowId, u16 tileNum, u8 palNum)
|
||||
FillBgTilemapBufferRect(bgLayer, tileNum + 8, tilemapLeft + width, tilemapTop + height, 1, 1, palNum);
|
||||
}
|
||||
|
||||
void sub_80989E0(u8 windowId, u16 tileNum, u8 palNum)
|
||||
void DrawTextBorderInner(u8 windowId, u16 tileNum, u8 palNum)
|
||||
{
|
||||
u8 bgLayer = GetWindowAttribute(windowId, WINDOW_BG);
|
||||
u16 tilemapLeft = GetWindowAttribute(windowId, WINDOW_TILEMAP_LEFT);
|
||||
|
10
src/trade.c
10
src/trade.c
@ -2014,7 +2014,7 @@ static void sub_80781C8(void)
|
||||
FreeAllWindowBuffers();
|
||||
Free(gUnknown_0203229C);
|
||||
gMain.callback1 = NULL;
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
SetMainCallback2(sub_807AE50);
|
||||
}
|
||||
}
|
||||
@ -2543,7 +2543,7 @@ static void sub_8078DBC(void)
|
||||
|
||||
if (gUnknown_0203229C->tradeMenuCursorPosition < 6)
|
||||
{
|
||||
sub_8098858(1, 1, 14);
|
||||
DrawTextBorderOuter(1, 1, 14);
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
||||
PrintMenuTable(1, 2, gUnknown_0832DEAC);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0);
|
||||
@ -2844,7 +2844,7 @@ static void sub_80794CC(void)
|
||||
Free(gUnknown_02032184);
|
||||
Free(gUnknown_0203229C);
|
||||
FreeAllWindowBuffers();
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
SetMainCallback2(CB2_ReturnToFieldFromMultiplayer);
|
||||
}
|
||||
}
|
||||
@ -3341,7 +3341,7 @@ static void sub_807A19C(u8 a0)
|
||||
{
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(0, 1, gUnknown_0832DEBC[a0], 0, 1, TEXT_SPEED_FF, NULL);
|
||||
sub_8098858(0, 20, 12);
|
||||
DrawTextBorderOuter(0, 20, 12);
|
||||
PutWindowTilemap(0);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
@ -6123,7 +6123,7 @@ static void c2_080543C4(void)
|
||||
FreeMonSpritesGfx();
|
||||
FREE_AND_SET_NULL(gUnknown_020322A0);
|
||||
if (gWirelessCommType)
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
SetMainCallback2(gMain.savedCallback);
|
||||
}
|
||||
RunTasks();
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include "event_obj_lock.h"
|
||||
#include "union_room_chat.h"
|
||||
#include "berry_crush.h"
|
||||
#include "mystery_gift.h"
|
||||
|
||||
EWRAM_DATA u8 gUnknown_02022C20[12] = {};
|
||||
EWRAM_DATA u8 gUnknown_02022C2C = 0;
|
||||
@ -100,9 +101,8 @@ void sub_801AC54(void);
|
||||
void sub_802A9A8(u8 monId, MainCallback callback);
|
||||
void sub_802493C(u8 monId, MainCallback callback);
|
||||
void sub_80149D8(void);
|
||||
u16 sub_8019930(void);
|
||||
void sub_8018784(u8 windowId);
|
||||
s8 sub_8018B08(u8 *textState, u8 *arg1, u8 arg2, const u8 *str);
|
||||
void MG_DrawTextBorder(u8 windowId);
|
||||
s8 mevent_message_print_and_prompt_yes_no(u8 *textState, u8 *arg1, u8 arg2, const u8 *str);
|
||||
bool32 sub_8016F1C(struct UnkLinkRfuStruct_02022B14 *arg0, s16 arg1);
|
||||
u8 sub_8016DF0(struct UnkStruct_Main4 *arg0, struct UnkStruct_Main4 *arg1, u32 arg2);
|
||||
void sub_8019F2C(void);
|
||||
@ -1555,7 +1555,7 @@ void sub_8012780(u8 taskId)
|
||||
break;
|
||||
case 21:
|
||||
case 23:
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
sub_800EDD4();
|
||||
sub_8012F64(data);
|
||||
data->state++;
|
||||
@ -2076,7 +2076,7 @@ void sub_80134E8(u8 taskId)
|
||||
data->state++;
|
||||
break;
|
||||
case 13:
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
if (PrintOnTextbox(&data->textState, gUnknown_082EDE9C[sub_8011A74()]))
|
||||
{
|
||||
gSpecialVar_Result = 6;
|
||||
@ -2084,12 +2084,12 @@ void sub_80134E8(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
gSpecialVar_Result = 5;
|
||||
data->state = 23;
|
||||
break;
|
||||
case 15:
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
if (PrintOnTextbox(&data->textState, gUnknown_082EDE9C[sub_8011A74()]))
|
||||
{
|
||||
gSpecialVar_Result = 8;
|
||||
@ -2481,7 +2481,7 @@ void sub_80143E4(void *arg0, bool32 arg1)
|
||||
|
||||
TrainerCard_GenerateCardForPlayer((struct TrainerCard *)argAsU16Ptr);
|
||||
if (arg1)
|
||||
argAsU16Ptr[48] = sub_801B39C();
|
||||
argAsU16Ptr[48] = GetWonderCardFlagID();
|
||||
else
|
||||
argAsU16Ptr[48] = 0;
|
||||
}
|
||||
@ -2680,7 +2680,7 @@ void sub_8014790(u8 taskId)
|
||||
case 8:
|
||||
if (gReceivedRemoteLinkPlayers == 0)
|
||||
{
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
EnableBothScriptContexts();
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
@ -2699,7 +2699,7 @@ void sub_80149D8(void)
|
||||
gTasks[taskId].data[0] = 0;
|
||||
}
|
||||
|
||||
void sub_8014A00(u32 arg0)
|
||||
void MEvent_CreateTask_Leader(u32 arg0)
|
||||
{
|
||||
u8 taskId;
|
||||
struct UnkStruct_Leader *dataPtr;
|
||||
@ -2745,10 +2745,10 @@ void sub_8014A40(u8 taskId)
|
||||
data->field_17 = sub_8016FC0(data->field_4, 0xFF);
|
||||
|
||||
winTemplate = gUnknown_082F011C;
|
||||
winTemplate.baseBlock = sub_8019930();
|
||||
winTemplate.baseBlock = GetMysteryGiftBaseBlock();
|
||||
winTemplate.paletteNum = 0xC;
|
||||
data->listWindowId = AddWindow(&winTemplate);
|
||||
sub_8018784(data->listWindowId);
|
||||
MG_DrawTextBorder(data->listWindowId);
|
||||
gMultiuseListMenuTemplate = gUnknown_082F015C;
|
||||
gMultiuseListMenuTemplate.windowId = data->listWindowId;
|
||||
data->listTaskId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0);
|
||||
@ -2763,7 +2763,7 @@ void sub_8014A40(u8 taskId)
|
||||
data->state = 3;
|
||||
break;
|
||||
case 3:
|
||||
sub_8018884(gStringVar4);
|
||||
AddTextPrinterToWindow1(gStringVar4);
|
||||
data->state = 4;
|
||||
break;
|
||||
case 4:
|
||||
@ -2771,11 +2771,11 @@ void sub_8014A40(u8 taskId)
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
data->state = 13;
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (mevent_0814257C(&data->textState, gUnknown_082EDF40))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gUnknown_082EDF40))
|
||||
{
|
||||
data->field_13 = sub_8013398(data->field_0);
|
||||
RedrawListMenu(data->listTaskId);
|
||||
@ -2786,7 +2786,7 @@ void sub_8014A40(u8 taskId)
|
||||
data->state = 7;
|
||||
break;
|
||||
case 7:
|
||||
switch (sub_8018B08(&data->textState, &data->field_14, 0, gStringVar4))
|
||||
switch (mevent_message_print_and_prompt_yes_no(&data->textState, &data->field_14, 0, gStringVar4))
|
||||
{
|
||||
case 0:
|
||||
sub_800E0E8();
|
||||
@ -2837,7 +2837,7 @@ void sub_8014A40(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
sub_8018884(gStringVar4);
|
||||
AddTextPrinterToWindow1(gStringVar4);
|
||||
data->state = 10;
|
||||
break;
|
||||
case 10:
|
||||
@ -2860,7 +2860,7 @@ void sub_8014A40(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
sub_800EDD4();
|
||||
DestroyListMenuTask(data->listTaskId, 0, 0);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
@ -2872,7 +2872,7 @@ void sub_8014A40(u8 taskId)
|
||||
data->state++;
|
||||
break;
|
||||
case 14:
|
||||
if (mevent_0814257C(&data->textState, gText_PleaseStartOver))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gText_PleaseStartOver))
|
||||
{
|
||||
DestroyTask(taskId);
|
||||
gSpecialVar_Result = 5;
|
||||
@ -2907,7 +2907,7 @@ void sub_8014A40(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8014EFC(u32 arg0)
|
||||
void MEvent_CreateTask_CardOrNewsWithFriend(u32 arg0)
|
||||
{
|
||||
u8 taskId;
|
||||
struct UnkStruct_Group *dataPtr;
|
||||
@ -2940,7 +2940,7 @@ void sub_8014F48(u8 taskId)
|
||||
data->state = 1;
|
||||
break;
|
||||
case 1:
|
||||
sub_8018884(gUnknown_082EF7F8);
|
||||
AddTextPrinterToWindow1(gUnknown_082EF7F8);
|
||||
data->state = 2;
|
||||
break;
|
||||
case 2:
|
||||
@ -2949,7 +2949,7 @@ void sub_8014F48(u8 taskId)
|
||||
data->field_11 = sub_8016FC0(data->field_4, data->field_12 + 7);
|
||||
|
||||
winTemplate1 = gUnknown_082F0174;
|
||||
winTemplate1.baseBlock = sub_8019930();
|
||||
winTemplate1.baseBlock = GetMysteryGiftBaseBlock();
|
||||
winTemplate1.paletteNum = 0xC;
|
||||
data->listWindowId = AddWindow(&winTemplate1);
|
||||
|
||||
@ -2957,12 +2957,12 @@ void sub_8014F48(u8 taskId)
|
||||
winTemplate2.paletteNum = 0xC;
|
||||
data->field_D = AddWindow(&winTemplate2);
|
||||
|
||||
sub_8018784(data->listWindowId);
|
||||
MG_DrawTextBorder(data->listWindowId);
|
||||
gMultiuseListMenuTemplate = gUnknown_082F0204;
|
||||
gMultiuseListMenuTemplate.windowId = data->listWindowId;
|
||||
data->listTaskId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0);
|
||||
|
||||
sub_8018784(data->field_D);
|
||||
MG_DrawTextBorder(data->field_D);
|
||||
FillWindowPixelBuffer(data->field_D, PIXEL_FILL(1));
|
||||
PutWindowTilemap(data->field_D);
|
||||
sub_80125BC(data->field_D);
|
||||
@ -3013,7 +3013,7 @@ void sub_8014F48(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
sub_8018884(gUnknown_082EFC3C);
|
||||
AddTextPrinterToWindow1(gUnknown_082EFC3C);
|
||||
sub_8018404(gStringVar1, &data->field_0->arr[data->field_F]);
|
||||
data->state = 5;
|
||||
break;
|
||||
@ -3032,7 +3032,7 @@ void sub_8014F48(u8 taskId)
|
||||
data->state = 8;
|
||||
break;
|
||||
case 5:
|
||||
sub_8018884(gUnknown_082EDDF4);
|
||||
AddTextPrinterToWindow1(gUnknown_082EDDF4);
|
||||
sub_8011A64(0, 0);
|
||||
break;
|
||||
}
|
||||
@ -3050,17 +3050,17 @@ void sub_8014F48(u8 taskId)
|
||||
data->state++;
|
||||
break;
|
||||
case 9:
|
||||
if (mevent_0814257C(&data->textState, gUnknown_082EDF80[sub_8011A74()]))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gUnknown_082EDF80[sub_8011A74()]))
|
||||
{
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
DestroyTask(taskId);
|
||||
sub_800EDD4();
|
||||
gSpecialVar_Result = 5;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
sub_800E084();
|
||||
sub_8018884(gText_PleaseStartOver);
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
AddTextPrinterToWindow1(gText_PleaseStartOver);
|
||||
DestroyTask(taskId);
|
||||
sub_800EDD4();
|
||||
gSpecialVar_Result = 5;
|
||||
@ -3076,7 +3076,7 @@ void sub_8014F48(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80152A8(u32 arg0)
|
||||
void MEvent_CreateTask_CardOrNewsOverWireless(u32 arg0)
|
||||
{
|
||||
u8 taskId;
|
||||
struct UnkStruct_Group *dataPtr;
|
||||
@ -3109,7 +3109,7 @@ void sub_80152F4(u8 taskId)
|
||||
data->state = 1;
|
||||
break;
|
||||
case 1:
|
||||
sub_8018884(gUnknown_082EFBC8);
|
||||
AddTextPrinterToWindow1(gUnknown_082EFBC8);
|
||||
data->state = 2;
|
||||
break;
|
||||
case 2:
|
||||
@ -3120,10 +3120,10 @@ void sub_80152F4(u8 taskId)
|
||||
if (data->field_13 != 0)
|
||||
{
|
||||
winTemplate = gUnknown_082F0174;
|
||||
winTemplate.baseBlock = sub_8019930();
|
||||
winTemplate.baseBlock = GetMysteryGiftBaseBlock();
|
||||
data->listWindowId = AddWindow(&winTemplate);
|
||||
|
||||
sub_8018784(data->listWindowId);
|
||||
MG_DrawTextBorder(data->listWindowId);
|
||||
gMultiuseListMenuTemplate = gUnknown_082F0204;
|
||||
gMultiuseListMenuTemplate.windowId = data->listWindowId;
|
||||
data->listTaskId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0);
|
||||
@ -3178,7 +3178,7 @@ void sub_80152F4(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
sub_8018884(gUnknown_082EFC90);
|
||||
AddTextPrinterToWindow1(gUnknown_082EFC90);
|
||||
sub_8018404(gStringVar1, &data->field_0->arr[data->field_F]);
|
||||
data->state = 5;
|
||||
break;
|
||||
@ -3197,7 +3197,7 @@ void sub_80152F4(u8 taskId)
|
||||
data->state = 8;
|
||||
break;
|
||||
case 5:
|
||||
sub_8018884(gUnknown_082EDEC4);
|
||||
AddTextPrinterToWindow1(gUnknown_082EDEC4);
|
||||
sub_8011A64(0, 0);
|
||||
break;
|
||||
}
|
||||
@ -3218,27 +3218,27 @@ void sub_80152F4(u8 taskId)
|
||||
data->state++;
|
||||
break;
|
||||
case 9:
|
||||
if (mevent_0814257C(&data->textState, gUnknown_082EDF04))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gUnknown_082EDF04))
|
||||
{
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
DestroyTask(taskId);
|
||||
sub_800EDD4();
|
||||
gSpecialVar_Result = 5;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (mevent_0814257C(&data->textState, gText_WirelessSearchCanceled))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gText_WirelessSearchCanceled))
|
||||
{
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
DestroyTask(taskId);
|
||||
sub_800EDD4();
|
||||
gSpecialVar_Result = 5;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (mevent_0814257C(&data->textState, gUnknown_082EFD58[data->field_12]))
|
||||
if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gUnknown_082EFD58[data->field_12]))
|
||||
{
|
||||
sub_800E084();
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
DestroyTask(taskId);
|
||||
sub_800EDD4();
|
||||
gSpecialVar_Result = 5;
|
||||
@ -4513,7 +4513,7 @@ s32 sub_8017178(u8 *arg0, u8 *arg1, u8 *arg2, const struct WindowTemplate *winTe
|
||||
{
|
||||
case 0:
|
||||
winTemplateCopy = *winTemplate;
|
||||
r1 = sub_81DB41C(menuTemplate);
|
||||
r1 = Intl_GetListMenuWidth(menuTemplate);
|
||||
if (winTemplateCopy.width > r1)
|
||||
{
|
||||
winTemplateCopy.width = r1;
|
||||
|
@ -2074,7 +2074,7 @@ static void sub_801FDDC(u8 left, u8 top, u8 initialCursorPos)
|
||||
PutWindowTilemap(gUnknown_02022C88->unk18);
|
||||
AddTextPrinterParameterized(gUnknown_02022C88->unk18, 1, gText_Yes, 8, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gUnknown_02022C88->unk18, 1, gText_No, 8, 17, TEXT_SPEED_FF, NULL);
|
||||
sub_8098858(gUnknown_02022C88->unk18, 1, 13);
|
||||
DrawTextBorderOuter(gUnknown_02022C88->unk18, 1, 13);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(gUnknown_02022C88->unk18, 2, initialCursorPos);
|
||||
}
|
||||
}
|
||||
@ -2140,7 +2140,7 @@ static void sub_801FF18(int arg0, u16 arg1)
|
||||
PutWindowTilemap(windowId);
|
||||
if (gUnknown_082F2D40[arg0].unk4 == 1)
|
||||
{
|
||||
sub_80989E0(windowId, 0xA, 2);
|
||||
DrawTextBorderInner(windowId, 0xA, 2);
|
||||
AddTextPrinterParameterized5(
|
||||
windowId,
|
||||
1,
|
||||
@ -2154,7 +2154,7 @@ static void sub_801FF18(int arg0, u16 arg1)
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_8098858(windowId, 0xA, 2);
|
||||
DrawTextBorderOuter(windowId, 0xA, 2);
|
||||
AddTextPrinterParameterized5(
|
||||
windowId,
|
||||
1,
|
||||
@ -2316,7 +2316,7 @@ static bool32 sub_8020368(void)
|
||||
static void sub_80203B0(void)
|
||||
{
|
||||
FillWindowPixelBuffer(3, PIXEL_FILL(1));
|
||||
sub_8098858(3, 1, 13);
|
||||
DrawTextBorderOuter(3, 1, 13);
|
||||
PrintTextArray(3, 2, 8, 1, 14, 5, gUnknown_082F2DC8);
|
||||
sub_81983AC(3, 2, 0, 1, 14, 5, sub_801F0B0());
|
||||
PutWindowTilemap(3);
|
||||
|
@ -617,7 +617,7 @@ void sub_8166D44(void)
|
||||
StringAppend(stringBuffer, gText_GetsAPokeBlockQuestion);
|
||||
StringCopy(gStringVar4, stringBuffer);
|
||||
FillWindowPixelBuffer(2, 17);
|
||||
sub_8098858(2, 151, 14);
|
||||
DrawTextBorderOuter(2, 151, 14);
|
||||
AddTextPrinterParameterized(2, 1, gStringVar4, 0, 1, 0, NULL);
|
||||
PutWindowTilemap(2);
|
||||
CopyWindowToVram(2, 3);
|
||||
@ -645,7 +645,7 @@ s8 sub_8166DE4(void)
|
||||
|
||||
void sub_8166E24(void)
|
||||
{
|
||||
sub_8098858(2, 151, 14);
|
||||
DrawTextBorderOuter(2, 151, 14);
|
||||
FillWindowPixelBuffer(2, 17);
|
||||
|
||||
for (gUnknown_0203BC90->field_53 = 0; gUnknown_0203BC90->field_53 < 5; gUnknown_0203BC90->field_53++)
|
||||
@ -693,7 +693,7 @@ bool8 sub_8166EDC(void)
|
||||
void sub_8166F50(void)
|
||||
{
|
||||
FillWindowPixelBuffer(2, 17);
|
||||
sub_8098858(2, 151, 14);
|
||||
DrawTextBorderOuter(2, 151, 14);
|
||||
AddTextPrinterParameterized(2, 1, gText_WontEatAnymore, 0, 1, 0, NULL);
|
||||
PutWindowTilemap(2);
|
||||
CopyWindowToVram(2, 3);
|
||||
|
@ -9,10 +9,8 @@
|
||||
.include "src/union_room.o"
|
||||
.include "src/mystery_gift.o"
|
||||
|
||||
.align 3
|
||||
gUnknown_02022C60: @ 2022C60
|
||||
.space 0x4
|
||||
|
||||
@ union room player avatar
|
||||
.align 2
|
||||
gUnknown_02022C64: @ 2022C64
|
||||
.space 0x4
|
||||
|
||||
@ -23,17 +21,13 @@ gUnknown_02022C6C: @ 2022C6C
|
||||
.space 0x4
|
||||
|
||||
.include "src/mevent2.o"
|
||||
.include "src/mevent_801BAAC.o"
|
||||
|
||||
gUnknown_02022C74: @ 2022C74
|
||||
.space 0x4
|
||||
|
||||
gUnknown_02022C78: @ 2022C78
|
||||
.space 0x4
|
||||
|
||||
@ mevent_server
|
||||
gUnknown_02022C7C: @ 2022C7C
|
||||
.space 0x4
|
||||
|
||||
gUnknown_02022C80: @ 2022C80
|
||||
s_mevent_srv_ish_ptr: @ 2022C80
|
||||
.space 0x4
|
||||
|
||||
gUnknown_02022C84: @ 2022C84
|
||||
|
Loading…
Reference in New Issue
Block a user