mirror of
https://github.com/pret/pokeruby.git
synced 2025-01-19 11:12:26 +00:00
Babby's first decompilation success
This commit is contained in:
parent
f5435a6f5c
commit
145369b7ab
6
.gitignore
vendored
6
.gitignore
vendored
@ -26,3 +26,9 @@ ld_script_sapphire.txt
|
||||
*.nam
|
||||
*.til
|
||||
*.ld
|
||||
tags
|
||||
types_*.taghl
|
||||
*.swp
|
||||
*.swo
|
||||
*.s.old
|
||||
*.dump
|
||||
|
@ -6,96 +6,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start c2_clear_save_data_screen_2
|
||||
c2_clear_save_data_screen_2: @ 8148800
|
||||
push {lr}
|
||||
bl sub_8148970
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08148814
|
||||
ldr r0, _08148818 @ =sub_8148830
|
||||
movs r1, 0
|
||||
bl CreateTask
|
||||
_08148814:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08148818: .4byte sub_8148830
|
||||
thumb_func_end c2_clear_save_data_screen_2
|
||||
|
||||
thumb_func_start sub_814881C
|
||||
sub_814881C: @ 814881C
|
||||
push {lr}
|
||||
bl LoadOam
|
||||
bl ProcessSpriteCopyRequests
|
||||
bl TransferPlttBuffer
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_814881C
|
||||
|
||||
thumb_func_start sub_8148830
|
||||
sub_8148830: @ 8148830
|
||||
push {r4,lr}
|
||||
sub sp, 0x8
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
bl ResetSpriteData
|
||||
movs r1, 0x80
|
||||
lsls r1, 19
|
||||
movs r2, 0xCA
|
||||
lsls r2, 5
|
||||
adds r0, r2, 0
|
||||
strh r0, [r1]
|
||||
ldr r0, _081488A8 @ =sub_814881C
|
||||
bl SetVBlankCallback
|
||||
movs r0, 0x2
|
||||
movs r1, 0xE
|
||||
movs r2, 0x1B
|
||||
movs r3, 0x13
|
||||
bl MenuDrawTextWindow
|
||||
ldr r0, _081488AC @ =gSystemText_ClearAllSaveDataPrompt
|
||||
movs r1, 0x3
|
||||
movs r2, 0xF
|
||||
bl MenuPrint
|
||||
movs r0, 0x2
|
||||
movs r1, 0x1
|
||||
movs r2, 0x8
|
||||
movs r3, 0x6
|
||||
bl MenuDrawTextWindow
|
||||
ldr r3, _081488B0 @ =gUnknown_08376D74
|
||||
movs r0, 0x3
|
||||
movs r1, 0x2
|
||||
movs r2, 0x2
|
||||
bl PrintMenuItems
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
movs r0, 0x5
|
||||
str r0, [sp, 0x4]
|
||||
movs r0, 0
|
||||
movs r1, 0x3
|
||||
movs r2, 0x2
|
||||
movs r3, 0x2
|
||||
bl InitMenu
|
||||
ldr r1, _081488B4 @ =gTasks
|
||||
lsls r0, r4, 2
|
||||
adds r0, r4
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldr r1, _081488B8 @ =sub_81488BC
|
||||
str r1, [r0]
|
||||
add sp, 0x8
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_081488A8: .4byte sub_814881C
|
||||
_081488AC: .4byte gSystemText_ClearAllSaveDataPrompt
|
||||
_081488B0: .4byte gUnknown_08376D74
|
||||
_081488B4: .4byte gTasks
|
||||
_081488B8: .4byte sub_81488BC
|
||||
thumb_func_end sub_8148830
|
||||
|
||||
thumb_func_start sub_81488BC
|
||||
sub_81488BC: @ 81488BC
|
||||
push {r4,lr}
|
||||
|
@ -115,6 +115,7 @@ SECTIONS {
|
||||
asm/mystery_event_menu.o(.text);
|
||||
asm/save_failed_screen.o(.text);
|
||||
asm/rom_81473B8.o(.text);
|
||||
src/clear_save_data_menu.o(.text);
|
||||
asm/clear_save_data_menu.o(.text);
|
||||
asm/rom_8148B8C.o(.text);
|
||||
} =0
|
||||
|
41
src/clear_save_data_menu.c
Normal file
41
src/clear_save_data_menu.c
Normal file
@ -0,0 +1,41 @@
|
||||
#include "global.h"
|
||||
#include "task.h"
|
||||
|
||||
extern bool8 sub_8148970(void);
|
||||
extern void sub_8148830(u8);
|
||||
extern void sub_81488BC(u8);
|
||||
|
||||
extern u8 gSystemText_ClearAllSaveDataPrompt[];
|
||||
extern u8 *gUnknown_08376D74[][2];
|
||||
|
||||
void c2_clear_save_data_screen_2(void)
|
||||
{
|
||||
if (sub_8148970())
|
||||
{
|
||||
CreateTask(sub_8148830, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_814881C(void)
|
||||
{
|
||||
LoadOam();
|
||||
ProcessSpriteCopyRequests();
|
||||
TransferPlttBuffer();
|
||||
}
|
||||
|
||||
void sub_8148830(u8 taskId)
|
||||
{
|
||||
ResetSpriteData();
|
||||
|
||||
REG_DISPCNT = DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON | DISPCNT_BG3_ON | DISPCNT_OBJ_ON;
|
||||
|
||||
SetVBlankCallback(sub_814881C);
|
||||
MenuDrawTextWindow(2, 14, 27, 19);
|
||||
MenuPrint(gSystemText_ClearAllSaveDataPrompt, 3, 15);
|
||||
|
||||
MenuDrawTextWindow(2, 1, 8, 6);
|
||||
PrintMenuItems(3, 2, 2, gUnknown_08376D74);
|
||||
InitMenu(0, 3, 2, 2, 1, 5);
|
||||
|
||||
gTasks[taskId].func = sub_81488BC;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user