link_rfu_4 is part of mystery_gift_menu
This commit is contained in:
+2
-2
@@ -2742,14 +2742,14 @@ _080EDC0C:
|
|||||||
bl DisableInterrupts
|
bl DisableInterrupts
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl SetHBlankCallback
|
bl SetHBlankCallback
|
||||||
ldr r0, _080EDC3C @ =sub_8078914
|
ldr r0, _080EDC3C @ =CB2_InitTitleScreen
|
||||||
bl SetMainCallback2
|
bl SetMainCallback2
|
||||||
_080EDC34:
|
_080EDC34:
|
||||||
pop {r4}
|
pop {r4}
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
_080EDC3C: .4byte sub_8078914
|
_080EDC3C: .4byte CB2_InitTitleScreen
|
||||||
thumb_func_end sub_80EDBE8
|
thumb_func_end sub_80EDBE8
|
||||||
|
|
||||||
thumb_func_start sub_80EDC40
|
thumb_func_start sub_80EDC40
|
||||||
|
|||||||
-2316
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -1005,7 +1005,7 @@ _0800CB64: .4byte gPlttBufferUnfaded
|
|||||||
_0800CB68: .4byte gPlttBufferFaded
|
_0800CB68: .4byte gPlttBufferFaded
|
||||||
_0800CB6C: .4byte gUnknown_2031DE0
|
_0800CB6C: .4byte gUnknown_2031DE0
|
||||||
_0800CB70:
|
_0800CB70:
|
||||||
ldr r0, _0800CB8C @ =sub_81422AC
|
ldr r0, _0800CB8C @ =c2_mystery_gift
|
||||||
bl SetMainCallback2
|
bl SetMainCallback2
|
||||||
bl sub_812B478
|
bl sub_812B478
|
||||||
bl FreeAllWindowBuffers
|
bl FreeAllWindowBuffers
|
||||||
@@ -1017,7 +1017,7 @@ _0800CB84:
|
|||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
_0800CB8C: .4byte sub_81422AC
|
_0800CB8C: .4byte c2_mystery_gift
|
||||||
thumb_func_end sub_800CA94
|
thumb_func_end sub_800CA94
|
||||||
|
|
||||||
thumb_func_start sub_800CB90
|
thumb_func_start sub_800CB90
|
||||||
@@ -1141,7 +1141,7 @@ sub_800CC68: @ 800CC68
|
|||||||
ands r0, r1
|
ands r0, r1
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _0800CC86
|
bne _0800CC86
|
||||||
ldr r0, _0800CC90 @ =sub_8078914
|
ldr r0, _0800CC90 @ =CB2_InitTitleScreen
|
||||||
bl SetMainCallback2
|
bl SetMainCallback2
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl DestroyTask
|
bl DestroyTask
|
||||||
@@ -1151,7 +1151,7 @@ _0800CC86:
|
|||||||
bx r0
|
bx r0
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
_0800CC8C: .4byte gPaletteFade
|
_0800CC8C: .4byte gPaletteFade
|
||||||
_0800CC90: .4byte sub_8078914
|
_0800CC90: .4byte CB2_InitTitleScreen
|
||||||
thumb_func_end sub_800CC68
|
thumb_func_end sub_800CC68
|
||||||
|
|
||||||
thumb_func_start sub_800CC94
|
thumb_func_start sub_800CC94
|
||||||
|
|||||||
+2287
-142
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_8078914
|
thumb_func_start CB2_InitTitleScreen
|
||||||
sub_8078914: @ 8078914
|
CB2_InitTitleScreen: @ 8078914
|
||||||
push {r4-r6,lr}
|
push {r4-r6,lr}
|
||||||
sub sp, 0xC
|
sub sp, 0xC
|
||||||
ldr r0, _08078930 @ =gMain
|
ldr r0, _08078930 @ =gMain
|
||||||
@@ -230,7 +230,7 @@ _08078B26:
|
|||||||
bx r0
|
bx r0
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
_08078B30: .4byte gMain
|
_08078B30: .4byte gMain
|
||||||
thumb_func_end sub_8078914
|
thumb_func_end CB2_InitTitleScreen
|
||||||
|
|
||||||
thumb_func_start sub_8078B34
|
thumb_func_start sub_8078B34
|
||||||
sub_8078B34: @ 8078B34
|
sub_8078B34: @ 8078B34
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#ifndef GUARD_MYSTERY_GIFT_MENU_H
|
#ifndef GUARD_MYSTERY_GIFT_MENU_H
|
||||||
#define GUARD_MYSTERY_GIFT_MENU_H
|
#define GUARD_MYSTERY_GIFT_MENU_H
|
||||||
|
|
||||||
extern bool8 gUnknown_203F3B8;
|
extern bool8 gGiftIsFromEReader;
|
||||||
|
|
||||||
void sub_81422FC(void);
|
void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void);
|
||||||
void sub_8142344(bool8, bool32);
|
void PrintMysteryGiftOrEReaderTopMenu(bool8, bool32);
|
||||||
|
|
||||||
#endif //GUARD_MYSTERY_GIFT_MENU_H
|
#endif //GUARD_MYSTERY_GIFT_MENU_H
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#ifndef GUARD_TITLE_SCREEN_H
|
||||||
|
#define GUARD_TITLE_SCREEN_H
|
||||||
|
|
||||||
|
void CB2_InitTitleScreen(void);
|
||||||
|
|
||||||
|
#endif //GUARD_TITLE_SCREEN_H
|
||||||
+1
-2
@@ -243,7 +243,6 @@ SECTIONS {
|
|||||||
src/roamer.o(.text);
|
src/roamer.o(.text);
|
||||||
src/mystery_gift_menu.o(.text);
|
src/mystery_gift_menu.o(.text);
|
||||||
asm/mystery_gift_menu.o(.text);
|
asm/mystery_gift_menu.o(.text);
|
||||||
asm/link_rfu_4.o(.text);
|
|
||||||
src/mevent.o(.text);
|
src/mevent.o(.text);
|
||||||
src/mevent_server_helpers.o(.text);
|
src/mevent_server_helpers.o(.text);
|
||||||
src/mevent_server.o(.text);
|
src/mevent_server.o(.text);
|
||||||
@@ -411,7 +410,7 @@ SECTIONS {
|
|||||||
data/slot_machine.o(.rodata);
|
data/slot_machine.o(.rodata);
|
||||||
src/roamer.o(.rodata);
|
src/roamer.o(.rodata);
|
||||||
src/mystery_gift_menu.o(.rodata);
|
src/mystery_gift_menu.o(.rodata);
|
||||||
data/link_rfu_4.o(.rodata);
|
data/mystery_gift_menu.o(.rodata);
|
||||||
src/mevent.o(.rodata);
|
src/mevent.o(.rodata);
|
||||||
src/mevent_server_helpers.o(.rodata);
|
src/mevent_server_helpers.o(.rodata);
|
||||||
src/mevent_server.o(.rodata);
|
src/mevent_server.o(.rodata);
|
||||||
|
|||||||
+2
-2
@@ -240,7 +240,7 @@ u32 sub_8143770(u8 * r4, u16 * r5)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81438A0(void)
|
void task_add_00_ereader(void)
|
||||||
{
|
{
|
||||||
u8 taskId = CreateTask(sub_8143910, 0);
|
u8 taskId = CreateTask(sub_8143910, 0);
|
||||||
struct MEventTaskData1 *data = (struct MEventTaskData1 *)gTasks[taskId].data;
|
struct MEventTaskData1 *data = (struct MEventTaskData1 *)gTasks[taskId].data;
|
||||||
@@ -478,7 +478,7 @@ void sub_8143910(u8 taskId)
|
|||||||
sub_812B484();
|
sub_812B484();
|
||||||
Free(data->t10);
|
Free(data->t10);
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
SetMainCallback2(sub_81422FC);
|
SetMainCallback2(MainCB_FreeAllBuffersAndReturnToInitTitleScreen);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ s32 sub_814593C(bool32 flag)
|
|||||||
FreeMonIconPalettes();
|
FreeMonIconPalettes();
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
sub_8142344(gUnknown_203F3B8, flag);
|
PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
CopyBgTilemapBufferToVram(0);
|
CopyBgTilemapBufferToVram(0);
|
||||||
@@ -653,7 +653,7 @@ s32 sub_8146604(bool32 flag)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
sub_8142344(gUnknown_203F3B8, flag);
|
PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
sub_8142420();
|
sub_8142420();
|
||||||
|
|||||||
+66
-1
@@ -9,15 +9,22 @@
|
|||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "text_window.h"
|
#include "text_window.h"
|
||||||
|
#include "menu.h"
|
||||||
#include "new_menu_helpers.h"
|
#include "new_menu_helpers.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "mystery_gift_menu.h"
|
#include "mystery_gift_menu.h"
|
||||||
|
#include "title_screen.h"
|
||||||
#include "link_rfu.h"
|
#include "link_rfu.h"
|
||||||
#include "constants/songs.h"
|
#include "constants/songs.h"
|
||||||
|
|
||||||
|
extern const struct TextColor gUnknown_8466EE8;
|
||||||
|
|
||||||
EWRAM_DATA u8 sDownArrowCounterAndYCoordIdx[8] = {};
|
EWRAM_DATA u8 sDownArrowCounterAndYCoordIdx[8] = {};
|
||||||
EWRAM_DATA bool8 gGiftIsFromEReader = FALSE;
|
EWRAM_DATA bool8 gGiftIsFromEReader = FALSE;
|
||||||
|
|
||||||
|
void task_add_00_mystery_gift(void);
|
||||||
|
void task_add_00_ereader(void);
|
||||||
|
|
||||||
static const u16 gUnkTextboxBorderPal[] = INCBIN_U16("graphics/interface/unk_textbox_border.gbapal");
|
static const u16 gUnkTextboxBorderPal[] = INCBIN_U16("graphics/interface/unk_textbox_border.gbapal");
|
||||||
static const u32 gUnkTextboxBorderGfx[] = INCBIN_U32("graphics/interface/unk_textbox_border.4bpp.lz");
|
static const u32 gUnkTextboxBorderGfx[] = INCBIN_U32("graphics/interface/unk_textbox_border.4bpp.lz");
|
||||||
|
|
||||||
@@ -164,7 +171,7 @@ bool32 HandleMysteryGiftOrEReaderSetup(s32 mg_or_ereader)
|
|||||||
FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11);
|
FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11);
|
||||||
FillBgTilemapBufferRect(2, 0x000, 0, 0, 32, 32, 0x11);
|
FillBgTilemapBufferRect(2, 0x000, 0, 0, 32, 32, 0x11);
|
||||||
sub_8142420();
|
sub_8142420();
|
||||||
sub_8142344(mg_or_ereader, 0);
|
PrintMysteryGiftOrEReaderTopMenu(mg_or_ereader, 0);
|
||||||
gMain.state++;
|
gMain.state++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@@ -186,3 +193,61 @@ bool32 HandleMysteryGiftOrEReaderSetup(s32 mg_or_ereader)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void c2_mystery_gift(void)
|
||||||
|
{
|
||||||
|
if (HandleMysteryGiftOrEReaderSetup(0))
|
||||||
|
{
|
||||||
|
SetMainCallback2(c2_mystery_gift_e_reader_run);
|
||||||
|
gGiftIsFromEReader = FALSE;
|
||||||
|
task_add_00_mystery_gift();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void c2_ereader(void)
|
||||||
|
{
|
||||||
|
if (HandleMysteryGiftOrEReaderSetup(1))
|
||||||
|
{
|
||||||
|
SetMainCallback2(c2_mystery_gift_e_reader_run);
|
||||||
|
gGiftIsFromEReader = TRUE;
|
||||||
|
task_add_00_ereader();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void)
|
||||||
|
{
|
||||||
|
gGiftIsFromEReader = FALSE;
|
||||||
|
FreeAllWindowBuffers();
|
||||||
|
Free(GetBgTilemapBuffer(0));
|
||||||
|
Free(GetBgTilemapBuffer(1));
|
||||||
|
Free(GetBgTilemapBuffer(2));
|
||||||
|
Free(GetBgTilemapBuffer(3));
|
||||||
|
SetMainCallback2(CB2_InitTitleScreen);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern const u8 gUnknown_8415F51[];
|
||||||
|
extern const u8 gUnknown_841EDCA[];
|
||||||
|
extern const u8 gUnknown_841EDBD[];
|
||||||
|
extern const u8 gUnknown_841DE50[];
|
||||||
|
extern const u8 gUnknown_841DE51[];
|
||||||
|
|
||||||
|
void PrintMysteryGiftOrEReaderTopMenu(bool8 mg_or_ereader, bool32 usePickOkCancel)
|
||||||
|
{
|
||||||
|
const u8 * src;
|
||||||
|
s32 width;
|
||||||
|
FillWindowPixelBuffer(0, 0x00);
|
||||||
|
if (!mg_or_ereader)
|
||||||
|
{
|
||||||
|
src = usePickOkCancel == TRUE ? gUnknown_8415F51 : gUnknown_841EDCA;
|
||||||
|
AddTextPrinterParametrized2(0, 2, 2, 2, 0, 0, &gUnknown_8466EE8, 0, gUnknown_841EDBD);
|
||||||
|
width = 222 - GetStringWidth(0, src, 0);
|
||||||
|
AddTextPrinterParametrized2(0, 0, width, 2, 0, 0, &gUnknown_8466EE8, 0, src);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AddTextPrinterParametrized2(0, 2, 2, 2, 0, 0, &gUnknown_8466EE8, 0, gUnknown_841DE50);
|
||||||
|
AddTextPrinterParametrized2(0, 0, 0x78, 2, 0, 0, &gUnknown_8466EE8, 0, gUnknown_841DE51);
|
||||||
|
}
|
||||||
|
CopyWindowToVram(0, 2);
|
||||||
|
PutWindowTilemap(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-6
@@ -1615,12 +1615,7 @@ sLocationHistory: @ 203F3A8
|
|||||||
sRoamerLocation: @ 203F3AE
|
sRoamerLocation: @ 203F3AE
|
||||||
.space 0x2
|
.space 0x2
|
||||||
|
|
||||||
gUnknown_203F3B0: @ 203F3B0
|
.include "src/mystery_gift_menu.o"
|
||||||
.space 0x8
|
|
||||||
|
|
||||||
gUnknown_203F3B8: @ 203F3B8
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
.include "src/mevent.o"
|
.include "src/mevent.o"
|
||||||
.include "src/mevent_server_helpers.o"
|
.include "src/mevent_server_helpers.o"
|
||||||
.include "src/mevent_server.o"
|
.include "src/mevent_server.o"
|
||||||
|
|||||||
Reference in New Issue
Block a user