Finish main menu decomp
This commit is contained in:
+2
-2
@@ -28,7 +28,7 @@ _0807F644:
|
||||
bl FldEffPoison_IsActive
|
||||
cmp r0, 0
|
||||
bne _0807F686
|
||||
bl sub_812B478
|
||||
bl HelpSystem_Disable
|
||||
ldrb r0, [r4, 0x2]
|
||||
bl BT_StartOnField
|
||||
ldrh r0, [r4]
|
||||
@@ -41,7 +41,7 @@ _0807F65E:
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _0807F686
|
||||
bl sub_812B484
|
||||
bl HelpSystem_Enable
|
||||
bl CleanupOverworldWindowsAndTilemaps
|
||||
ldr r0, _0807F68C @ =sub_800FD9C
|
||||
bl SetMainCallback2
|
||||
|
||||
@@ -8327,7 +8327,7 @@ sub_81546EC: @ 81546EC
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r4, 0
|
||||
bl sub_8069788
|
||||
bl GetUserFrameGraphicsInfo
|
||||
ldr r1, [r0]
|
||||
movs r2, 0x90
|
||||
lsls r2, 1
|
||||
@@ -8335,7 +8335,7 @@ sub_81546EC: @ 81546EC
|
||||
movs r3, 0x1
|
||||
bl LoadBgTiles
|
||||
adds r0, r4, 0
|
||||
bl sub_8069788
|
||||
bl GetUserFrameGraphicsInfo
|
||||
ldr r0, [r0, 0x4]
|
||||
movs r1, 0xA0
|
||||
movs r2, 0x20
|
||||
|
||||
+3
-3
@@ -248,8 +248,8 @@ sub_806E2AC: @ 806E2AC
|
||||
_0806E2B8: .4byte 0x00000839
|
||||
thumb_func_end sub_806E2AC
|
||||
|
||||
thumb_func_start sub_806E2BC
|
||||
sub_806E2BC: @ 806E2BC
|
||||
thumb_func_start Flag_0x839_IsSet
|
||||
Flag_0x839_IsSet: @ 806E2BC
|
||||
push {lr}
|
||||
ldr r0, _0806E2CC @ =0x00000839
|
||||
bl FlagGet
|
||||
@@ -259,7 +259,7 @@ sub_806E2BC: @ 806E2BC
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_0806E2CC: .4byte 0x00000839
|
||||
thumb_func_end sub_806E2BC
|
||||
thumb_func_end Flag_0x839_IsSet
|
||||
|
||||
thumb_func_start sub_806E2D0
|
||||
sub_806E2D0: @ 806E2D0
|
||||
|
||||
@@ -388,7 +388,7 @@ EvolutionScene: @ 80CDDF4
|
||||
ldr r0, _080CE0E0 @ =sub_80D0050
|
||||
bl SetVBlankCallback
|
||||
bl m4aMPlayAllStop
|
||||
bl sub_812B478
|
||||
bl HelpSystem_Disable
|
||||
ldr r0, _080CE0E4 @ =sub_80CE710
|
||||
bl SetMainCallback2
|
||||
add sp, 0x24
|
||||
@@ -1852,7 +1852,7 @@ _080CEDB8:
|
||||
beq _080CEDC6
|
||||
b _080CF528
|
||||
_080CEDC6:
|
||||
bl sub_812B484
|
||||
bl HelpSystem_Enable
|
||||
ldr r1, _080CEE20 @ =gTasks
|
||||
mov r2, r8
|
||||
adds r0, r2, r7
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ _080F1E04:
|
||||
.4byte _080F1E88
|
||||
.4byte _080F1EC4
|
||||
_080F1E18:
|
||||
ldr r1, _080F1E40 @ =gUnknown_3005ECC
|
||||
ldr r1, _080F1E40 @ =gHelpSystemEnabled
|
||||
movs r0, 0
|
||||
strb r0, [r1]
|
||||
movs r0, 0
|
||||
@@ -74,7 +74,7 @@ _080F1E18:
|
||||
strb r1, [r0]
|
||||
b _080F1EF0
|
||||
.align 2, 0
|
||||
_080F1E40: .4byte gUnknown_3005ECC
|
||||
_080F1E40: .4byte gHelpSystemEnabled
|
||||
_080F1E44: .4byte gUnknown_203AB3C
|
||||
_080F1E48: .4byte 0x00002008
|
||||
_080F1E4C: .4byte gMain
|
||||
|
||||
-418
@@ -1,418 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_800CED4
|
||||
sub_800CED4: @ 800CED4
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x2C
|
||||
ldr r6, _0800CF30 @ =gUnknown_823468B
|
||||
str r6, [sp]
|
||||
movs r5, 0x1
|
||||
negs r5, r5
|
||||
str r5, [sp, 0x4]
|
||||
ldr r0, _0800CF34 @ =gText_Time
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
movs r1, 0x2
|
||||
movs r2, 0x2
|
||||
movs r3, 0x22
|
||||
bl AddTextPrinterParameterized3
|
||||
ldr r4, _0800CF38 @ =gSaveBlock2Ptr
|
||||
ldr r0, [r4]
|
||||
ldrh r1, [r0, 0xE]
|
||||
add r0, sp, 0xC
|
||||
movs r2, 0
|
||||
movs r3, 0x3
|
||||
bl ConvertIntToDecimalStringN
|
||||
movs r1, 0xF0
|
||||
strb r1, [r0]
|
||||
adds r0, 0x1
|
||||
ldr r1, [r4]
|
||||
ldrb r1, [r1, 0x10]
|
||||
movs r2, 0x2
|
||||
movs r3, 0x2
|
||||
bl ConvertIntToDecimalStringN
|
||||
str r6, [sp]
|
||||
str r5, [sp, 0x4]
|
||||
add r0, sp, 0xC
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
movs r1, 0x2
|
||||
movs r2, 0x3E
|
||||
movs r3, 0x22
|
||||
bl AddTextPrinterParameterized3
|
||||
add sp, 0x2C
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0800CF30: .4byte gUnknown_823468B
|
||||
_0800CF34: .4byte gText_Time
|
||||
_0800CF38: .4byte gSaveBlock2Ptr
|
||||
thumb_func_end sub_800CED4
|
||||
|
||||
thumb_func_start sub_800CF3C
|
||||
sub_800CF3C: @ 800CF3C
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x2C
|
||||
ldr r0, _0800CF60 @ =0x00000829
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _0800CFAE
|
||||
bl IsNationalPokedexEnabled
|
||||
cmp r0, 0
|
||||
beq _0800CF64
|
||||
movs r0, 0x1
|
||||
bl GetNationalPokedexCount
|
||||
b _0800CF6A
|
||||
.align 2, 0
|
||||
_0800CF60: .4byte 0x00000829
|
||||
_0800CF64:
|
||||
movs r0, 0x1
|
||||
bl GetKantoPokedexCount
|
||||
_0800CF6A:
|
||||
lsls r0, 16
|
||||
lsrs r6, r0, 16
|
||||
ldr r5, _0800CFB8 @ =gUnknown_823468B
|
||||
str r5, [sp]
|
||||
movs r4, 0x1
|
||||
negs r4, r4
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, _0800CFBC @ =gText_Pokedex
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
movs r1, 0x2
|
||||
movs r2, 0x2
|
||||
movs r3, 0x32
|
||||
bl AddTextPrinterParameterized3
|
||||
add r0, sp, 0xC
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
movs r3, 0x3
|
||||
bl ConvertIntToDecimalStringN
|
||||
ldr r1, _0800CFC0 @ =gUnknown_841B6EB
|
||||
bl StringAppend
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
add r0, sp, 0xC
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
movs r1, 0x2
|
||||
movs r2, 0x3E
|
||||
movs r3, 0x32
|
||||
bl AddTextPrinterParameterized3
|
||||
_0800CFAE:
|
||||
add sp, 0x2C
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0800CFB8: .4byte gUnknown_823468B
|
||||
_0800CFBC: .4byte gText_Pokedex
|
||||
_0800CFC0: .4byte gUnknown_841B6EB
|
||||
thumb_func_end sub_800CF3C
|
||||
|
||||
thumb_func_start sub_800CFC4
|
||||
sub_800CFC4: @ 800CFC4
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x2C
|
||||
movs r6, 0
|
||||
movs r4, 0x82
|
||||
lsls r4, 4
|
||||
_0800CFCE:
|
||||
lsls r0, r4, 16
|
||||
lsrs r0, 16
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0800CFE2
|
||||
adds r0, r6, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
_0800CFE2:
|
||||
adds r4, 0x1
|
||||
ldr r0, _0800D034 @ =0x00000827
|
||||
cmp r4, r0
|
||||
bls _0800CFCE
|
||||
ldr r5, _0800D038 @ =gUnknown_823468B
|
||||
str r5, [sp]
|
||||
movs r4, 0x1
|
||||
negs r4, r4
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, _0800D03C @ =gUnknown_841B6EC
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
movs r1, 0x2
|
||||
movs r2, 0x2
|
||||
movs r3, 0x42
|
||||
bl AddTextPrinterParameterized3
|
||||
add r0, sp, 0xC
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x2
|
||||
movs r3, 0x1
|
||||
bl ConvertIntToDecimalStringN
|
||||
ldr r1, _0800D040 @ =gUnknown_841B6F3
|
||||
bl StringAppend
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
add r0, sp, 0xC
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
movs r1, 0x2
|
||||
movs r2, 0x3E
|
||||
movs r3, 0x42
|
||||
bl AddTextPrinterParameterized3
|
||||
add sp, 0x2C
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0800D034: .4byte 0x00000827
|
||||
_0800D038: .4byte gUnknown_823468B
|
||||
_0800D03C: .4byte gUnknown_841B6EC
|
||||
_0800D040: .4byte gUnknown_841B6F3
|
||||
thumb_func_end sub_800CFC4
|
||||
|
||||
thumb_func_start sub_800D044
|
||||
sub_800D044: @ 800D044
|
||||
push {r4,r5,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r5, _0800D088 @ =gSaveBlock2Ptr
|
||||
ldr r0, [r5]
|
||||
ldrb r0, [r0, 0x14]
|
||||
lsrs r0, 3
|
||||
bl sub_8069788
|
||||
ldr r1, [r0]
|
||||
movs r2, 0x90
|
||||
lsls r2, 1
|
||||
ldr r3, _0800D08C @ =0x000001b1
|
||||
adds r0, r4, 0
|
||||
bl LoadBgTiles
|
||||
ldr r0, [r5]
|
||||
ldrb r0, [r0, 0x14]
|
||||
lsrs r0, 3
|
||||
bl sub_8069788
|
||||
ldr r0, [r0, 0x4]
|
||||
movs r1, 0x20
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
ldr r0, _0800D090 @ =gUnknown_8234638
|
||||
bl sub_800D1E8
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0800D088: .4byte gSaveBlock2Ptr
|
||||
_0800D08C: .4byte 0x000001b1
|
||||
_0800D090: .4byte gUnknown_8234638
|
||||
thumb_func_end sub_800D044
|
||||
|
||||
thumb_func_start sub_800D094
|
||||
sub_800D094: @ 800D094
|
||||
push {lr}
|
||||
ldr r1, _0800D0AC @ =0x000001b1
|
||||
movs r0, 0
|
||||
movs r2, 0x20
|
||||
bl TextWindow_SetStdFrame0_WithPal
|
||||
ldr r0, _0800D0B0 @ =gUnknown_8234638
|
||||
bl sub_800D1E8
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0800D0AC: .4byte 0x000001b1
|
||||
_0800D0B0: .4byte gUnknown_8234638
|
||||
thumb_func_end sub_800D094
|
||||
|
||||
thumb_func_start sub_800D0B4
|
||||
sub_800D0B4: @ 800D0B4
|
||||
push {r4-r6,lr}
|
||||
mov r6, r8
|
||||
push {r6}
|
||||
sub sp, 0xC
|
||||
adds r5, r0, 0
|
||||
ldrb r0, [r5]
|
||||
ldr r1, _0800D1D8 @ =0x000001b1
|
||||
ldrb r2, [r5, 0x1]
|
||||
subs r2, 0x1
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
ldrb r3, [r5, 0x2]
|
||||
subs r3, 0x1
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
movs r6, 0x1
|
||||
str r6, [sp]
|
||||
str r6, [sp, 0x4]
|
||||
movs r4, 0x2
|
||||
mov r8, r4
|
||||
str r4, [sp, 0x8]
|
||||
bl FillBgTilemapBufferRect
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0xD9
|
||||
lsls r1, 1
|
||||
ldrb r2, [r5, 0x1]
|
||||
ldrb r3, [r5, 0x2]
|
||||
subs r3, 0x1
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
ldrb r4, [r5, 0x3]
|
||||
str r4, [sp]
|
||||
ldrb r4, [r5, 0x4]
|
||||
str r4, [sp, 0x4]
|
||||
mov r4, r8
|
||||
str r4, [sp, 0x8]
|
||||
bl FillBgTilemapBufferRect
|
||||
ldrb r0, [r5]
|
||||
ldr r1, _0800D1DC @ =0x000001b3
|
||||
ldrb r2, [r5, 0x3]
|
||||
ldrb r3, [r5, 0x1]
|
||||
adds r2, r3
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
ldrb r3, [r5, 0x2]
|
||||
subs r3, 0x1
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
str r6, [sp]
|
||||
str r6, [sp, 0x4]
|
||||
str r4, [sp, 0x8]
|
||||
bl FillBgTilemapBufferRect
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0xDA
|
||||
lsls r1, 1
|
||||
ldrb r2, [r5, 0x1]
|
||||
subs r2, 0x1
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
ldrb r3, [r5, 0x2]
|
||||
str r6, [sp]
|
||||
ldrb r4, [r5, 0x4]
|
||||
str r4, [sp, 0x4]
|
||||
mov r4, r8
|
||||
str r4, [sp, 0x8]
|
||||
bl FillBgTilemapBufferRect
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0xDB
|
||||
lsls r1, 1
|
||||
ldrb r2, [r5, 0x3]
|
||||
ldrb r3, [r5, 0x1]
|
||||
adds r2, r3
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
ldrb r3, [r5, 0x2]
|
||||
str r6, [sp]
|
||||
ldrb r4, [r5, 0x4]
|
||||
str r4, [sp, 0x4]
|
||||
mov r4, r8
|
||||
str r4, [sp, 0x8]
|
||||
bl FillBgTilemapBufferRect
|
||||
ldrb r0, [r5]
|
||||
ldr r1, _0800D1E0 @ =0x000001b7
|
||||
ldrb r2, [r5, 0x1]
|
||||
subs r2, 0x1
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
ldrb r3, [r5, 0x4]
|
||||
ldrb r4, [r5, 0x2]
|
||||
adds r3, r4
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
str r6, [sp]
|
||||
str r6, [sp, 0x4]
|
||||
mov r4, r8
|
||||
str r4, [sp, 0x8]
|
||||
bl FillBgTilemapBufferRect
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0xDC
|
||||
lsls r1, 1
|
||||
ldrb r2, [r5, 0x1]
|
||||
ldrb r3, [r5, 0x4]
|
||||
ldrb r4, [r5, 0x2]
|
||||
adds r3, r4
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
ldrb r4, [r5, 0x3]
|
||||
str r4, [sp]
|
||||
str r6, [sp, 0x4]
|
||||
mov r4, r8
|
||||
str r4, [sp, 0x8]
|
||||
bl FillBgTilemapBufferRect
|
||||
ldrb r0, [r5]
|
||||
ldr r1, _0800D1E4 @ =0x000001b9
|
||||
ldrb r2, [r5, 0x3]
|
||||
ldrb r3, [r5, 0x1]
|
||||
adds r2, r3
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
ldrb r3, [r5, 0x4]
|
||||
ldrb r4, [r5, 0x2]
|
||||
adds r3, r4
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
str r6, [sp]
|
||||
str r6, [sp, 0x4]
|
||||
mov r4, r8
|
||||
str r4, [sp, 0x8]
|
||||
bl FillBgTilemapBufferRect
|
||||
ldrb r0, [r5]
|
||||
bl CopyBgTilemapBufferToVram
|
||||
add sp, 0xC
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0800D1D8: .4byte 0x000001b1
|
||||
_0800D1DC: .4byte 0x000001b3
|
||||
_0800D1E0: .4byte 0x000001b7
|
||||
_0800D1E4: .4byte 0x000001b9
|
||||
thumb_func_end sub_800D0B4
|
||||
|
||||
thumb_func_start sub_800D1E8
|
||||
sub_800D1E8: @ 800D1E8
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0xC
|
||||
adds r6, r0, 0
|
||||
ldrb r0, [r6]
|
||||
ldrb r1, [r6, 0x1]
|
||||
subs r2, r1, 0x1
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
ldrb r4, [r6, 0x2]
|
||||
subs r3, r4, 0x1
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
ldrb r5, [r6, 0x3]
|
||||
adds r1, r5
|
||||
adds r1, 0x1
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
str r1, [sp]
|
||||
ldrb r1, [r6, 0x4]
|
||||
adds r4, r1
|
||||
adds r4, 0x1
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
str r4, [sp, 0x4]
|
||||
movs r1, 0x2
|
||||
str r1, [sp, 0x8]
|
||||
movs r1, 0
|
||||
bl FillBgTilemapBufferRect
|
||||
ldrb r0, [r6]
|
||||
bl CopyBgTilemapBufferToVram
|
||||
add sp, 0xC
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_800D1E8
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
||||
+1
-1
@@ -22,7 +22,7 @@ sub_80BE478: @ 80BE478
|
||||
ldr r0, [r0]
|
||||
ldrb r0, [r0, 0x14]
|
||||
lsrs r0, 3
|
||||
bl sub_8069788
|
||||
bl GetUserFrameGraphicsInfo
|
||||
ldr r3, _080BE4B4 @ =gUnknown_20399C0
|
||||
ldr r2, [r3]
|
||||
ldr r1, [r0]
|
||||
|
||||
+4
-4
@@ -459,7 +459,7 @@ _0808870C:
|
||||
b _08088768
|
||||
_08088716:
|
||||
ldrb r0, [r0, 0xA]
|
||||
bl sub_8069788
|
||||
bl GetUserFrameGraphicsInfo
|
||||
ldr r1, [r0]
|
||||
movs r2, 0x90
|
||||
lsls r2, 1
|
||||
@@ -470,7 +470,7 @@ _08088716:
|
||||
b _0808876C
|
||||
_0808872E:
|
||||
ldrb r0, [r0, 0xA]
|
||||
bl sub_8069788
|
||||
bl GetUserFrameGraphicsInfo
|
||||
ldr r0, [r0, 0x4]
|
||||
movs r1, 0x20
|
||||
b _0808874C
|
||||
@@ -590,7 +590,7 @@ _08088824:
|
||||
ldr r4, _08088854 @ =gUnknown_2039620
|
||||
ldr r0, [r4]
|
||||
ldrb r0, [r0, 0xA]
|
||||
bl sub_8069788
|
||||
bl GetUserFrameGraphicsInfo
|
||||
ldr r1, [r0]
|
||||
movs r2, 0x90
|
||||
lsls r2, 1
|
||||
@@ -600,7 +600,7 @@ _08088824:
|
||||
bl LoadBgTiles
|
||||
ldr r0, [r4]
|
||||
ldrb r0, [r0, 0xA]
|
||||
bl sub_8069788
|
||||
bl GetUserFrameGraphicsInfo
|
||||
ldr r0, [r0, 0x4]
|
||||
movs r1, 0x20
|
||||
movs r2, 0x20
|
||||
|
||||
+3
-3
@@ -11140,7 +11140,7 @@ _0805230A:
|
||||
ldr r0, _08052328 @ =CB2_ReturnToField
|
||||
bl SetMainCallback2
|
||||
bl sub_8053AE4
|
||||
bl sub_812B484
|
||||
bl HelpSystem_Enable
|
||||
_08052318:
|
||||
movs r0, 0
|
||||
_0805231A:
|
||||
@@ -13365,7 +13365,7 @@ _08053766:
|
||||
ldr r0, _08053784 @ =CB2_ReturnToField
|
||||
bl SetMainCallback2
|
||||
bl sub_8053AE4
|
||||
bl sub_812B484
|
||||
bl HelpSystem_Enable
|
||||
_08053774:
|
||||
movs r0, 0
|
||||
_08053776:
|
||||
@@ -14854,7 +14854,7 @@ sub_8054440: @ 8054440
|
||||
movs r2, 0
|
||||
movs r3, 0x10
|
||||
bl BeginNormalPaletteFade
|
||||
bl sub_812B478
|
||||
bl HelpSystem_Disable
|
||||
add sp, 0x4
|
||||
pop {r0}
|
||||
bx r0
|
||||
|
||||
@@ -115,7 +115,7 @@ enum
|
||||
|
||||
enum
|
||||
{
|
||||
OPTIONS_BUTTON_MODE_NORMAL,
|
||||
OPTIONS_BUTTON_MODE_HELP,
|
||||
OPTIONS_BUTTON_MODE_LR,
|
||||
OPTIONS_BUTTON_MODE_L_EQUALS_A
|
||||
};
|
||||
|
||||
-45
@@ -6,51 +6,6 @@
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2, 0
|
||||
gUnknown_8234614::
|
||||
.string "$"
|
||||
|
||||
gUnknown_8234615::
|
||||
.string "\n$"
|
||||
|
||||
.align 2, 0
|
||||
gUnknown_8234618:: @ 8234618
|
||||
.byte 0x00, 0x03, 0x01, 0x18, 0x02, 0x0f
|
||||
.2byte 0x0001
|
||||
|
||||
gUnknown_8234620:: @ 8234620
|
||||
.byte 0x00, 0x03, 0x01, 0x18, 0x0a, 0x0f
|
||||
.2byte 0x0001
|
||||
.byte 0x00, 0x03, 0x0d, 0x18, 0x02, 0x0f
|
||||
.2byte 0x00f1
|
||||
.byte 0x00, 0x03, 0x11, 0x18, 0x02, 0x0f
|
||||
.2byte 0x0121
|
||||
|
||||
gUnknown_8234638:: @ 8234638
|
||||
.byte 0x00, 0x03, 0x0f, 0x18, 0x04, 0x0f
|
||||
.2byte 0x0001
|
||||
.byte 0xff, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.2byte 0x0000
|
||||
|
||||
gUnknown_8234648:: @ 8234648
|
||||
.incbin "baserom.gba", 0x234648, 0x20
|
||||
|
||||
gUnknown_8234668:: @ 8234668
|
||||
.incbin "baserom.gba", 0x234668, 0x20
|
||||
|
||||
gUnknown_8234688:: @ 8234688
|
||||
.incbin "baserom.gba", 0x234688, 0x3
|
||||
|
||||
gUnknown_823468B:: @ 823468B
|
||||
.incbin "baserom.gba", 0x23468B, 0x3
|
||||
|
||||
.align 2
|
||||
gUnknown_8234690:: @ 8234690
|
||||
.incbin "baserom.gba", 0x234690, 0x4
|
||||
|
||||
gUnknown_8234694:: @ 8234694
|
||||
.incbin "baserom.gba", 0x234694, 0x4
|
||||
|
||||
.align 2
|
||||
gUnknown_8234698:: @ 8234698
|
||||
.incbin "baserom.gba", 0x234698, 0x20
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
139 148 255
|
||||
255 255 255
|
||||
49 57 82
|
||||
90 98 115
|
||||
8 8 16
|
||||
148 156 172
|
||||
205 222 238
|
||||
180 180 189
|
||||
189 205 222
|
||||
32 32 49
|
||||
123 131 139
|
||||
49 82 123
|
||||
41 123 197
|
||||
57 139 213
|
||||
90 164 230
|
||||
139 197 246
|
||||
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
255 255 255
|
||||
255 255 255
|
||||
98 98 98
|
||||
213 213 205
|
||||
230 8 8
|
||||
255 189 115
|
||||
32 156 8
|
||||
148 246 148
|
||||
49 82 205
|
||||
164 197 246
|
||||
255 255 255
|
||||
98 98 98
|
||||
213 213 205
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
+2
-2
@@ -417,8 +417,8 @@ gSpecials:: @ 815FD60
|
||||
def_special sub_814B504
|
||||
def_special sub_80CC8CC
|
||||
def_special sub_80CC948
|
||||
def_special sub_812B478
|
||||
def_special sub_812B484
|
||||
def_special HelpSystem_Disable
|
||||
def_special HelpSystem_Enable
|
||||
def_special sub_810B82C
|
||||
def_special CheckHasAtLeastOneBerry
|
||||
def_special sub_815F094
|
||||
|
||||
+3
-3
@@ -3049,13 +3049,13 @@ gText_Colon:: @ 0x841B6E1
|
||||
gText_Pokedex:: @ 841B6E3
|
||||
.string "POKéDEX$"
|
||||
|
||||
gUnknown_841B6EB:: @ 841B6EB
|
||||
gTextJPDummy_Hiki:: @ 841B6EB
|
||||
.string "$"
|
||||
|
||||
gUnknown_841B6EC:: @ 841B6EC
|
||||
gText_Badges:: @ 841B6EC
|
||||
.string "BADGES$"
|
||||
|
||||
gUnknown_841B6F3:: @ 841B6F3
|
||||
gTextJPDummy_Ko:: @ 841B6F3
|
||||
.string "$"
|
||||
|
||||
gUnknown_841B6F4:: @ 0x841B6F4
|
||||
|
||||
@@ -1377,7 +1377,7 @@
|
||||
#define TRAINERS_FLAG_NO 0x356
|
||||
#define CODE_FLAGS (FLAG_TRAINER_FLAG_START + TRAINERS_FLAG_NO + 0xA) // 0x860
|
||||
|
||||
// TODO: Find what these are
|
||||
// TODO: These three are badge flags
|
||||
#define FLAG_UNK820 0x820
|
||||
#define FLAG_UNK824 0x824
|
||||
#define FLAG_UNK826 0x826
|
||||
|
||||
@@ -45,7 +45,7 @@ enum
|
||||
|
||||
enum
|
||||
{
|
||||
OPTIONS_BUTTON_MODE_NORMAL,
|
||||
OPTIONS_BUTTON_MODE_HELP,
|
||||
OPTIONS_BUTTON_MODE_LR,
|
||||
OPTIONS_BUTTON_MODE_L_EQUALS_A
|
||||
};
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
#define SE_SHIP_HORN 249
|
||||
#define SE_HELP_OPEN 250
|
||||
#define SE_HELP_CLOSE 251
|
||||
#define SE_HELP_PAGE 252
|
||||
#define SE_HELP_ERR 252
|
||||
|
||||
#define MUS_ME_ASA 256
|
||||
#define MUS_FANFA1 257
|
||||
|
||||
@@ -32,7 +32,7 @@ u8 FlagSet(u16 id);
|
||||
u8 FlagClear(u16 id);
|
||||
bool8 FlagGet(u16 id);
|
||||
u16 * GetVarPointer(u16 id);
|
||||
bool32 sub_806E2BC(void);
|
||||
bool32 Flag_0x839_IsSet(void);
|
||||
void sub_806E6FC(void);
|
||||
void sub_806E2D0(void);
|
||||
void sub_806E370(void);
|
||||
|
||||
@@ -25,7 +25,7 @@ struct HelpSystemListMenu
|
||||
|
||||
extern struct HelpSystemListMenu gHelpSystemListMenu;
|
||||
extern struct ListMenuItem gHelpSystemListMenuItems[];
|
||||
extern bool8 gUnknown_3005ECC;
|
||||
extern bool8 gHelpSystemEnabled;
|
||||
extern u8 gUnknown_203F175;
|
||||
|
||||
// help_system_812B1E0
|
||||
@@ -33,8 +33,8 @@ void sub_812B1E0(u8);
|
||||
void HelpSystem_SetSomeVariable2(u8);
|
||||
bool8 sub_812B40C(void);
|
||||
bool8 sub_812B45C(void);
|
||||
void sub_812B478(void);
|
||||
void sub_812B484(void);
|
||||
void HelpSystem_Disable(void);
|
||||
void HelpSystem_Enable(void);
|
||||
void sub_812B4B8(void);
|
||||
bool8 sub_812BB9C(struct HelpSystemListMenu * a0, struct ListMenuItem * a1);
|
||||
bool8 sub_812BC54(struct HelpSystemListMenu * a0, struct ListMenuItem * a1);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#ifndef GUARD_MAIN_MENU_H
|
||||
#define GUARD_MAIN_MENU_H
|
||||
|
||||
void sub_800C300(void);
|
||||
void CB2_InitMainMenu(void);
|
||||
|
||||
#endif //GUARD_MAIN_MENU_H
|
||||
|
||||
+3
-3
@@ -357,9 +357,9 @@ extern const u8 gText_Player[];
|
||||
extern const u8 gText_Time[];
|
||||
extern const u8 gText_Colon[];
|
||||
extern const u8 gText_Pokedex[];
|
||||
extern const u8 gUnknown_841B6EB[];
|
||||
extern const u8 gUnknown_841B6EC[];
|
||||
extern const u8 gUnknown_841B6F3[];
|
||||
extern const u8 gTextJPDummy_Hiki[];
|
||||
extern const u8 gText_Badges[];
|
||||
extern const u8 gTextJPDummy_Ko[];
|
||||
extern const u8 gUnknown_841B6F4[];
|
||||
|
||||
// mystery_gift_menu
|
||||
|
||||
@@ -14,6 +14,6 @@ extern const u16 gUnknown_8471DEC[][16];
|
||||
|
||||
extern const struct TextWindowGraphics gUserFrames[];
|
||||
|
||||
const struct TextWindowGraphics * sub_8069788(u8 idx);
|
||||
const struct TextWindowGraphics * GetUserFrameGraphicsInfo(u8 idx);
|
||||
|
||||
#endif //GUARD_TEXT_WINDOW_GRAPHICS_H
|
||||
|
||||
+1
-1
@@ -63,7 +63,6 @@ SECTIONS {
|
||||
src/link.o(.text);
|
||||
src/multiboot.o(.text);
|
||||
src/main_menu.o(.text);
|
||||
asm/main_menu.o(.text);
|
||||
src/battle_controllers.o(.text);
|
||||
src/decompress.o(.text);
|
||||
asm/battle_1.o(.text);
|
||||
@@ -381,6 +380,7 @@ SECTIONS {
|
||||
src/bg_regs.o(.rodata);
|
||||
src/string_util.o(.rodata);
|
||||
src/link.o(.rodata);
|
||||
src/main_menu.o(.rodata);
|
||||
data/data.o(.rodata);
|
||||
src/battle_util.o(.rodata);
|
||||
src/battle_script_commands.o(.rodata);
|
||||
|
||||
@@ -95,7 +95,7 @@ void mb_berry_fix_serve(void) // noreturn
|
||||
ResetSpriteData();
|
||||
ResetTasks();
|
||||
ScanlineEffect_Stop();
|
||||
gUnknown_3005ECC = 0;
|
||||
gHelpSystemEnabled = 0;
|
||||
taskId = CreateTask(mb_berry_fix_task, 0);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
SetMainCallback2(mb_berry_fix_maincb);
|
||||
|
||||
+3
-3
@@ -1795,7 +1795,7 @@ void EggHatch(void)
|
||||
ScriptContext2_Enable();
|
||||
CreateTask(Task_EggHatch, 10);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
sub_812B478();
|
||||
HelpSystem_Disable();
|
||||
}
|
||||
|
||||
static void Task_EggHatch(u8 taskID)
|
||||
@@ -1901,7 +1901,7 @@ static void EggHatchSetMonNickname(void)
|
||||
SetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar3);
|
||||
FreeMonSpritesGfx();
|
||||
Free(sEggHatchData);
|
||||
sub_812B484();
|
||||
HelpSystem_Enable();
|
||||
SetMainCallback2(CB2_ReturnToField);
|
||||
}
|
||||
|
||||
@@ -2024,7 +2024,7 @@ static void CB2_EggHatch_1(void)
|
||||
UnsetBgTilemapBuffer(1);
|
||||
Free(sEggHatchData);
|
||||
SetMainCallback2(CB2_ReturnToField);
|
||||
sub_812B484();
|
||||
HelpSystem_Enable();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
+3
-3
@@ -49,15 +49,15 @@ u8 RunHelpSystemCallback(void)
|
||||
{
|
||||
case 0:
|
||||
sInHelpSystem = 0;
|
||||
if (gSaveBlock2Ptr->optionsButtonMode != OPTIONS_BUTTON_MODE_NORMAL)
|
||||
if (gSaveBlock2Ptr->optionsButtonMode != OPTIONS_BUTTON_MODE_HELP)
|
||||
return 0;
|
||||
if (JOY_NEW(R_BUTTON) && gUnknown_203F175 == 1)
|
||||
return 0;
|
||||
if (JOY_NEW(L_BUTTON | R_BUTTON))
|
||||
{
|
||||
if (!sub_812B45C() || !gUnknown_3005ECC)
|
||||
if (!sub_812B45C() || !gHelpSystemEnabled)
|
||||
{
|
||||
PlaySE(SE_HELP_PAGE);
|
||||
PlaySE(SE_HELP_ERR);
|
||||
return 0;
|
||||
}
|
||||
m4aMPlayStop(&gMPlayInfo_SE1);
|
||||
|
||||
@@ -1005,16 +1005,16 @@ bool8 sub_812B45C(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_812B478(void)
|
||||
void HelpSystem_Disable(void)
|
||||
{
|
||||
gUnknown_3005ECC = 0;
|
||||
gHelpSystemEnabled = 0;
|
||||
}
|
||||
|
||||
void sub_812B484(void)
|
||||
void HelpSystem_Enable(void)
|
||||
{
|
||||
if (gUnknown_203ADFA != 2 && gUnknown_203ADFA != 3)
|
||||
{
|
||||
gUnknown_3005ECC = 1;
|
||||
gHelpSystemEnabled = 1;
|
||||
sub_812B4B8();
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1577,7 +1577,7 @@ static void CB2_PrintErrorMessage(void)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
sub_812B484();
|
||||
HelpSystem_Enable();
|
||||
PlaySE(SE_PIN);
|
||||
gWirelessCommType = 0;
|
||||
sLinkErrorBuffer.unk_06 = 0;
|
||||
@@ -1588,7 +1588,7 @@ static void CB2_PrintErrorMessage(void)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
sub_812B484();
|
||||
HelpSystem_Enable();
|
||||
rfu_REQ_stopMode();
|
||||
rfu_waitREQComplete();
|
||||
DoSoftReset();
|
||||
|
||||
+2
-2
@@ -104,7 +104,7 @@ static IntrFunc * const sTimerIntrFunc = gIntrTable + 0x7;
|
||||
EWRAM_DATA u8 gDecompressionBuffer[0x4000] = {0};
|
||||
EWRAM_DATA u16 gTrainerId = 0;
|
||||
|
||||
extern bool8 gUnknown_3005ECC;
|
||||
extern bool8 gHelpSystemEnabled;
|
||||
extern bool8 gWirelessCommType;
|
||||
extern bool8 gUnknown_3005E88;
|
||||
|
||||
@@ -138,7 +138,7 @@ void AgbMain()
|
||||
SetDefaultFontsPointer();
|
||||
|
||||
gSoftResetDisabled = FALSE;
|
||||
gUnknown_3005ECC = FALSE;
|
||||
gHelpSystemEnabled = FALSE;
|
||||
|
||||
sub_80F50F4();
|
||||
|
||||
|
||||
+261
-121
@@ -19,43 +19,104 @@
|
||||
#include "sound.h"
|
||||
#include "title_screen.h"
|
||||
#include "help_system.h"
|
||||
#include "string_util.h"
|
||||
#include "pokedex.h"
|
||||
#include "text_window.h"
|
||||
#include "text_window_graphics.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
bool32 sub_800C318(u8 a0);
|
||||
void sub_800C4D0(u8 taskId);
|
||||
void sub_800C634(u8 taskId, const u8 *str);
|
||||
void sub_800C688(u8 taskId);
|
||||
void sub_800C704(u8 taskId);
|
||||
void sub_800C780(u8 taskId);
|
||||
void sub_800C7A0(u8 taskId);
|
||||
void sub_800C9CC(u8 taskId);
|
||||
void sub_800CA28(u8 taskId);
|
||||
void sub_800CA54(u8 taskId);
|
||||
void sub_800CA94(u8 taskId);
|
||||
void sub_800CB90(u8 taskId);
|
||||
void sub_800CC68(u8 taskId);
|
||||
void sub_800CC94(u8 menuType, u8 cursorPos);
|
||||
bool8 sub_800CCF8(u8 taskId);
|
||||
void sub_800CDF8(const u8 *str);
|
||||
void sub_800CE58(void);
|
||||
void sub_800CE70(void);
|
||||
void sub_800CED4(void);
|
||||
void sub_800CF3C(void);
|
||||
void sub_800CFC4(void);
|
||||
void sub_800D044(u8 a0);
|
||||
void sub_800D094(u8 a0);
|
||||
void sub_800D0B4(const struct WindowTemplate * template);
|
||||
void sub_800D1E8(const struct WindowTemplate * template);
|
||||
static bool32 MainMenuGpuInit(u8 a0);
|
||||
static void Task_SetWin0BldRegsAndCheckSaveFile(u8 taskId);
|
||||
static void PrintSaveErrorStatus(u8 taskId, const u8 *str);
|
||||
static void Task_SaveErrorStatus_RunPrinterThenWaitButton(u8 taskId);
|
||||
static void Task_SetWin0BldRegsNoSaveFileCheck(u8 taskId);
|
||||
static void Task_WaitFadeAndPrintMainMenuText(u8 taskId);
|
||||
static void Task_PrintMainMenuText(u8 taskId);
|
||||
static void Task_WaitDma3AndFadeIn(u8 taskId);
|
||||
static void Task_UpdateVisualSelection(u8 taskId);
|
||||
static void Task_HandleMenuInput(u8 taskId);
|
||||
static void Task_ExecuteMainMenuSelection(u8 taskId);
|
||||
static void Task_MysteryGiftError(u8 taskId);
|
||||
static void Task_ReturnToTileScreen(u8 taskId);
|
||||
static void MoveWindowByMenuTypeAndCursorPos(u8 menuType, u8 cursorPos);
|
||||
static bool8 HandleMenuInput(u8 taskId);
|
||||
static void PrintMessageOnWindow4(const u8 *str);
|
||||
static void PrintContinueStats(void);
|
||||
static void PrintPlayerName(void);
|
||||
static void PrintPlayTime(void);
|
||||
static void PrintDexCount(void);
|
||||
static void PrintBadgeCount(void);
|
||||
static void LoadUserFrameToBg(u8 bgId);
|
||||
static void SetStdFrame0OnBg(u8 bgId);
|
||||
static void DrawBubbleBorder(const struct WindowTemplate * template);
|
||||
static void DestroyWindowBubbleFrame(const struct WindowTemplate * template);
|
||||
|
||||
extern const struct WindowTemplate gUnknown_8234618[];
|
||||
extern const u16 gUnknown_8234648[];
|
||||
extern const u16 gUnknown_8234668[];
|
||||
extern const u8 gUnknown_8234688[];
|
||||
extern const u8 gUnknown_823468B[];
|
||||
extern const struct BgTemplate gUnknown_8234690[1];
|
||||
extern const u8 gUnknown_8234694[];
|
||||
static const u8 sString_Dummy[] = _("");
|
||||
static const u8 sString_Newline[] = _("\n");
|
||||
|
||||
void sub_800C2D4(void)
|
||||
static const struct WindowTemplate sWindowTemplate[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 3,
|
||||
.tilemapTop = 1,
|
||||
.width = 24,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x001
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 3,
|
||||
.tilemapTop = 1,
|
||||
.width = 24,
|
||||
.height = 10,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x001
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 3,
|
||||
.tilemapTop = 13,
|
||||
.width = 24,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x0f1
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 3,
|
||||
.tilemapTop = 17,
|
||||
.width = 24,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x121
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 3,
|
||||
.tilemapTop = 15,
|
||||
.width = 24,
|
||||
.height = 4,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x001
|
||||
}, DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const u16 sBgPal00[] = INCBIN_U16("data/main_menu/unk_8234648.gbapal");
|
||||
static const u16 sBgPal15[] = INCBIN_U16("data/main_menu/unk_8234668.gbapal");
|
||||
|
||||
static const u8 sTextColor1[] = { 10, 11, 12 };
|
||||
|
||||
static const u8 sTextColor2[] = { 10, 1, 12 };
|
||||
|
||||
static const struct BgTemplate sBgTemplate[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 30,
|
||||
.priority = 0
|
||||
}
|
||||
};
|
||||
|
||||
static const u8 gUnknown_8234694[] = { 0, 1, 2 };
|
||||
|
||||
static void CB2_MainMenu(void)
|
||||
{
|
||||
RunTasks();
|
||||
AnimateSprites();
|
||||
@@ -63,24 +124,24 @@ void sub_800C2D4(void)
|
||||
UpdatePaletteFade();
|
||||
}
|
||||
|
||||
void sub_800C2EC(void)
|
||||
static void VBlankCB_MainMenu(void)
|
||||
{
|
||||
LoadOam();
|
||||
ProcessSpriteCopyRequests();
|
||||
TransferPlttBuffer();
|
||||
}
|
||||
|
||||
void sub_800C300(void)
|
||||
void CB2_InitMainMenu(void)
|
||||
{
|
||||
sub_800C318(1);
|
||||
MainMenuGpuInit(1);
|
||||
}
|
||||
|
||||
void sub_800C30C(void)
|
||||
static void CB2_InitMainMenu_2(void)
|
||||
{
|
||||
sub_800C318(1);
|
||||
MainMenuGpuInit(1);
|
||||
}
|
||||
|
||||
bool32 sub_800C318(u8 a0)
|
||||
static bool32 MainMenuGpuInit(u8 a0)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
@@ -104,17 +165,17 @@ bool32 sub_800C318(u8 a0)
|
||||
FreeAllSpritePalettes();
|
||||
ResetPaletteFade();
|
||||
ResetBgsAndClearDma3BusyFlags(FALSE);
|
||||
InitBgsFromTemplates(0, gUnknown_8234690, NELEMS(gUnknown_8234690));
|
||||
InitBgsFromTemplates(0, sBgTemplate, NELEMS(sBgTemplate));
|
||||
ChangeBgX(0, 0, 0);
|
||||
ChangeBgY(0, 0, 0);
|
||||
ChangeBgX(1, 0, 0);
|
||||
ChangeBgY(1, 0, 0);
|
||||
ChangeBgX(2, 0, 0);
|
||||
ChangeBgY(2, 0, 0);
|
||||
InitWindows(gUnknown_8234618);
|
||||
InitWindows(sWindowTemplate);
|
||||
DeactivateAllTextPrinters();
|
||||
LoadPalette(gUnknown_8234648, 0x00, 0x20);
|
||||
LoadPalette(gUnknown_8234668, 0xF0, 0x20);
|
||||
LoadPalette(sBgPal00, 0x00, 0x20);
|
||||
LoadPalette(sBgPal15, 0xF0, 0x20);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 0);
|
||||
@@ -122,15 +183,15 @@ bool32 sub_800C318(u8 a0)
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
SetMainCallback2(sub_800C2D4);
|
||||
SetMainCallback2(CB2_MainMenu);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON | DISPCNT_WIN0_ON);
|
||||
taskId = CreateTask(sub_800C4D0, 0);
|
||||
taskId = CreateTask(Task_SetWin0BldRegsAndCheckSaveFile, 0);
|
||||
gTasks[taskId].data[1] = 0;
|
||||
gTasks[taskId].data[8] = a0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_800C4D0(u8 taskId)
|
||||
static void Task_SetWin0BldRegsAndCheckSaveFile(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
@@ -144,8 +205,8 @@ void sub_800C4D0(u8 taskId)
|
||||
switch (gSaveFileStatus)
|
||||
{
|
||||
case 1:
|
||||
sub_800D044(0);
|
||||
if (sub_806E2BC() == TRUE)
|
||||
LoadUserFrameToBg(0);
|
||||
if (Flag_0x839_IsSet() == TRUE)
|
||||
{
|
||||
gTasks[taskId].data[0] = 2;
|
||||
}
|
||||
@@ -153,18 +214,18 @@ void sub_800C4D0(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].data[0] = 1;
|
||||
}
|
||||
gTasks[taskId].func = sub_800C704;
|
||||
gTasks[taskId].func = Task_SetWin0BldRegsNoSaveFileCheck;
|
||||
break;
|
||||
case 2:
|
||||
sub_800D094(0);
|
||||
SetStdFrame0OnBg(0);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
sub_800C634(taskId, gText_SaveFileHasBeenDeleted);
|
||||
PrintSaveErrorStatus(taskId, gText_SaveFileHasBeenDeleted);
|
||||
break;
|
||||
case 0xFF:
|
||||
sub_800D094(0);
|
||||
SetStdFrame0OnBg(0);
|
||||
gTasks[taskId].data[0] = 1;
|
||||
sub_800C634(taskId, gText_SaveFileCorruptedPrevWillBeLoaded);
|
||||
if (sub_806E2BC() == TRUE)
|
||||
PrintSaveErrorStatus(taskId, gText_SaveFileCorruptedPrevWillBeLoaded);
|
||||
if (Flag_0x839_IsSet() == TRUE)
|
||||
{
|
||||
gTasks[taskId].data[0] = 2;
|
||||
}
|
||||
@@ -175,29 +236,29 @@ void sub_800C4D0(u8 taskId)
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
sub_800D044(0);
|
||||
LoadUserFrameToBg(0);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].func = sub_800C704;
|
||||
gTasks[taskId].func = Task_SetWin0BldRegsNoSaveFileCheck;
|
||||
break;
|
||||
case 4:
|
||||
sub_800D094(0);
|
||||
SetStdFrame0OnBg(0);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
sub_800C634(taskId, gText_1MSubCircuitBoardNotInstalled);
|
||||
PrintSaveErrorStatus(taskId, gText_1MSubCircuitBoardNotInstalled);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800C634(u8 taskId, const u8 *str)
|
||||
static void PrintSaveErrorStatus(u8 taskId, const u8 *str)
|
||||
{
|
||||
sub_800CDF8(str);
|
||||
gTasks[taskId].func = sub_800C688;
|
||||
PrintMessageOnWindow4(str);
|
||||
gTasks[taskId].func = Task_SaveErrorStatus_RunPrinterThenWaitButton;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0xFFFF);
|
||||
ShowBg(0);
|
||||
SetVBlankCallback(sub_800C2EC);
|
||||
SetVBlankCallback(VBlankCB_MainMenu);
|
||||
}
|
||||
|
||||
void sub_800C688(u8 taskId)
|
||||
static void Task_SaveErrorStatus_RunPrinterThenWaitButton(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
@@ -205,17 +266,17 @@ void sub_800C688(u8 taskId)
|
||||
if (!IsTextPrinterActive(4) && JOY_NEW(A_BUTTON))
|
||||
{
|
||||
ClearWindowTilemap(4);
|
||||
sub_800D1E8(&gUnknown_8234618[4]);
|
||||
sub_800D044(0);
|
||||
DestroyWindowBubbleFrame(&sWindowTemplate[4]);
|
||||
LoadUserFrameToBg(0);
|
||||
if (gTasks[taskId].data[0] == 0)
|
||||
gTasks[taskId].func = sub_800C704;
|
||||
gTasks[taskId].func = Task_SetWin0BldRegsNoSaveFileCheck;
|
||||
else
|
||||
gTasks[taskId].func = sub_800C7A0;
|
||||
gTasks[taskId].func = Task_PrintMainMenuText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800C704(u8 taskId)
|
||||
static void Task_SetWin0BldRegsNoSaveFileCheck(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
@@ -229,21 +290,21 @@ void sub_800C704(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 0));
|
||||
SetGpuReg(REG_OFFSET_BLDY, 7);
|
||||
if (gTasks[taskId].data[0] == 0)
|
||||
gTasks[taskId].func = sub_800CA94;
|
||||
gTasks[taskId].func = Task_ExecuteMainMenuSelection;
|
||||
else
|
||||
gTasks[taskId].func = sub_800C780;
|
||||
gTasks[taskId].func = Task_WaitFadeAndPrintMainMenuText;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800C780(u8 taskId)
|
||||
static void Task_WaitFadeAndPrintMainMenuText(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
sub_800C7A0(taskId);
|
||||
Task_PrintMainMenuText(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800C7A0(u8 taskId)
|
||||
static void Task_PrintMainMenuText(u8 taskId)
|
||||
{
|
||||
u16 pal;
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
@@ -265,19 +326,19 @@ void sub_800C7A0(u8 taskId)
|
||||
case 0:
|
||||
default:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(10));
|
||||
AddTextPrinterParameterized3(0, 2, 2, 2, gUnknown_8234688, -1, gText_NewGame);
|
||||
sub_800D0B4(&gUnknown_8234618[0]);
|
||||
AddTextPrinterParameterized3(0, 2, 2, 2, sTextColor1, -1, gText_NewGame);
|
||||
DrawBubbleBorder(&sWindowTemplate[0]);
|
||||
PutWindowTilemap(0);
|
||||
CopyWindowToVram(0, 3);
|
||||
break;
|
||||
case 1:
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(10));
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(10));
|
||||
AddTextPrinterParameterized3(1, 2, 2, 2, gUnknown_8234688, -1, gText_Continue);
|
||||
AddTextPrinterParameterized3(2, 2, 2, 2, gUnknown_8234688, -1, gText_NewGame);
|
||||
sub_800CE58();
|
||||
sub_800D0B4(&gUnknown_8234618[1]);
|
||||
sub_800D0B4(&gUnknown_8234618[2]);
|
||||
AddTextPrinterParameterized3(1, 2, 2, 2, sTextColor1, -1, gText_Continue);
|
||||
AddTextPrinterParameterized3(2, 2, 2, 2, sTextColor1, -1, gText_NewGame);
|
||||
PrintContinueStats();
|
||||
DrawBubbleBorder(&sWindowTemplate[1]);
|
||||
DrawBubbleBorder(&sWindowTemplate[2]);
|
||||
PutWindowTilemap(1);
|
||||
PutWindowTilemap(2);
|
||||
CopyWindowToVram(1, 2);
|
||||
@@ -287,14 +348,14 @@ void sub_800C7A0(u8 taskId)
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(10));
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(10));
|
||||
FillWindowPixelBuffer(3, PIXEL_FILL(10));
|
||||
AddTextPrinterParameterized3(1, 2, 2, 2, gUnknown_8234688, -1, gText_Continue);
|
||||
AddTextPrinterParameterized3(2, 2, 2, 2, gUnknown_8234688, -1, gText_NewGame);
|
||||
AddTextPrinterParameterized3(1, 2, 2, 2, sTextColor1, -1, gText_Continue);
|
||||
AddTextPrinterParameterized3(2, 2, 2, 2, sTextColor1, -1, gText_NewGame);
|
||||
gTasks[taskId].data[10] = 1;
|
||||
AddTextPrinterParameterized3(3, 2, 2, 2, gUnknown_8234688, -1, gText_MysteryGift);
|
||||
sub_800CE58();
|
||||
sub_800D0B4(&gUnknown_8234618[1]);
|
||||
sub_800D0B4(&gUnknown_8234618[2]);
|
||||
sub_800D0B4(&gUnknown_8234618[3]);
|
||||
AddTextPrinterParameterized3(3, 2, 2, 2, sTextColor1, -1, gText_MysteryGift);
|
||||
PrintContinueStats();
|
||||
DrawBubbleBorder(&sWindowTemplate[1]);
|
||||
DrawBubbleBorder(&sWindowTemplate[2]);
|
||||
DrawBubbleBorder(&sWindowTemplate[3]);
|
||||
PutWindowTilemap(1);
|
||||
PutWindowTilemap(2);
|
||||
PutWindowTilemap(3);
|
||||
@@ -303,35 +364,35 @@ void sub_800C7A0(u8 taskId)
|
||||
CopyWindowToVram(3, 3);
|
||||
break;
|
||||
}
|
||||
gTasks[taskId].func = sub_800C9CC;
|
||||
gTasks[taskId].func = Task_WaitDma3AndFadeIn;
|
||||
}
|
||||
|
||||
void sub_800C9CC(u8 taskId)
|
||||
static void Task_WaitDma3AndFadeIn(u8 taskId)
|
||||
{
|
||||
if (CheckForSpaceForDma3Request(-1) != -1)
|
||||
{
|
||||
gTasks[taskId].func = sub_800CA28;
|
||||
gTasks[taskId].func = Task_UpdateVisualSelection;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0xFFFF);
|
||||
ShowBg(0);
|
||||
SetVBlankCallback(sub_800C2EC);
|
||||
SetVBlankCallback(VBlankCB_MainMenu);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800CA28(u8 taskId)
|
||||
static void Task_UpdateVisualSelection(u8 taskId)
|
||||
{
|
||||
sub_800CC94(gTasks[taskId].data[0], gTasks[taskId].data[1]);
|
||||
gTasks[taskId].func = sub_800CA54;
|
||||
MoveWindowByMenuTypeAndCursorPos(gTasks[taskId].data[0], gTasks[taskId].data[1]);
|
||||
gTasks[taskId].func = Task_HandleMenuInput;
|
||||
}
|
||||
|
||||
void sub_800CA54(u8 taskId)
|
||||
static void Task_HandleMenuInput(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active && sub_800CCF8(taskId))
|
||||
if (!gPaletteFade.active && HandleMenuInput(taskId))
|
||||
{
|
||||
gTasks[taskId].func = sub_800CA28;
|
||||
gTasks[taskId].func = Task_UpdateVisualSelection;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800CA94(u8 taskId)
|
||||
static void Task_ExecuteMainMenuSelection(u8 taskId)
|
||||
{
|
||||
s32 r0;
|
||||
if (!gPaletteFade.active)
|
||||
@@ -367,8 +428,8 @@ void sub_800CA94(u8 taskId)
|
||||
case 2:
|
||||
if (!IsWirelessAdapterConnected())
|
||||
{
|
||||
sub_800D094(0);
|
||||
gTasks[taskId].func = sub_800CB90;
|
||||
SetStdFrame0OnBg(0);
|
||||
gTasks[taskId].func = Task_MysteryGiftError;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
return;
|
||||
}
|
||||
@@ -398,7 +459,7 @@ void sub_800CA94(u8 taskId)
|
||||
break;
|
||||
case 2:
|
||||
SetMainCallback2(c2_mystery_gift);
|
||||
sub_812B478();
|
||||
HelpSystem_Disable();
|
||||
FreeAllWindowBuffers();
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
@@ -406,16 +467,16 @@ void sub_800CA94(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800CB90(u8 taskId)
|
||||
static void Task_MysteryGiftError(u8 taskId)
|
||||
{
|
||||
switch (gTasks[taskId].data[9])
|
||||
{
|
||||
case 0:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 30, 20);
|
||||
if (gTasks[taskId].data[10] == 1)
|
||||
sub_800CDF8(gText_WirelessAdapterIsNotConnected);
|
||||
PrintMessageOnWindow4(gText_WirelessAdapterIsNotConnected);
|
||||
else
|
||||
sub_800CDF8(gText_MysteryGiftCantBeUsedWhileWirelessAdapterIsAttached);
|
||||
PrintMessageOnWindow4(gText_MysteryGiftCantBeUsedWhileWirelessAdapterIsAttached);
|
||||
gTasks[taskId].data[9]++;
|
||||
break;
|
||||
case 1:
|
||||
@@ -432,13 +493,13 @@ void sub_800CB90(u8 taskId)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = sub_800CC68;
|
||||
gTasks[taskId].func = Task_ReturnToTileScreen;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800CC68(u8 taskId)
|
||||
static void Task_ReturnToTileScreen(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
@@ -447,7 +508,7 @@ void sub_800CC68(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800CC94(u8 menuType, u8 cursorPos)
|
||||
static void MoveWindowByMenuTypeAndCursorPos(u8 menuType, u8 cursorPos)
|
||||
{
|
||||
u16 win0v1, win0v2;
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0x12DE);
|
||||
@@ -481,14 +542,14 @@ void sub_800CC94(u8 menuType, u8 cursorPos)
|
||||
SetGpuReg(REG_OFFSET_WIN0V, (win0v1 + (2 << 8)) | (win0v2 - 2));
|
||||
}
|
||||
|
||||
bool8 sub_800CCF8(u8 taskId)
|
||||
static bool8 HandleMenuInput(u8 taskId)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
IsWirelessAdapterConnected(); // called for its side effects only
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = sub_800CA94;
|
||||
gTasks[taskId].func = Task_ExecuteMainMenuSelection;
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
@@ -496,7 +557,7 @@ bool8 sub_800CCF8(u8 taskId)
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0xF0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0xA0);
|
||||
gTasks[taskId].func = sub_800CC68;
|
||||
gTasks[taskId].func = Task_ReturnToTileScreen;
|
||||
}
|
||||
else if (JOY_NEW(DPAD_UP) && gTasks[taskId].data[1] > 0)
|
||||
{
|
||||
@@ -512,34 +573,113 @@ bool8 sub_800CCF8(u8 taskId)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_800CDF8(const u8 *str)
|
||||
static void PrintMessageOnWindow4(const u8 *str)
|
||||
{
|
||||
FillWindowPixelBuffer(4, PIXEL_FILL(10));
|
||||
sub_800D0B4(&gUnknown_8234618[4]);
|
||||
AddTextPrinterParameterized3(4, 2, 0, 2, gUnknown_8234688, 2, str);
|
||||
DrawBubbleBorder(&sWindowTemplate[4]);
|
||||
AddTextPrinterParameterized3(4, 2, 0, 2, sTextColor1, 2, str);
|
||||
PutWindowTilemap(4);
|
||||
CopyWindowToVram(4, 2);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0x13DD);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x739D);
|
||||
}
|
||||
|
||||
void sub_800CE58(void)
|
||||
static void PrintContinueStats(void)
|
||||
{
|
||||
sub_800CE70();
|
||||
sub_800CF3C();
|
||||
sub_800CED4();
|
||||
sub_800CFC4();
|
||||
PrintPlayerName();
|
||||
PrintDexCount();
|
||||
PrintPlayTime();
|
||||
PrintBadgeCount();
|
||||
}
|
||||
|
||||
void sub_800CE70(void)
|
||||
static void PrintPlayerName(void)
|
||||
{
|
||||
s32 i;
|
||||
u8 name[OT_NAME_LENGTH + 1];
|
||||
u8 *ptr;
|
||||
AddTextPrinterParameterized3(1, 2, 2, 18, gUnknown_823468B, -1, gText_Player);
|
||||
AddTextPrinterParameterized3(1, 2, 2, 18, sTextColor2, -1, gText_Player);
|
||||
ptr = name;
|
||||
for (i = 0; i < OT_NAME_LENGTH; i++)
|
||||
*ptr++ = gSaveBlock2Ptr->playerName[i];
|
||||
*ptr = EOS;
|
||||
AddTextPrinterParameterized3(1, 2, 62, 18, gUnknown_823468B, -1, name);
|
||||
AddTextPrinterParameterized3(1, 2, 62, 18, sTextColor2, -1, name);
|
||||
}
|
||||
|
||||
static void PrintPlayTime(void)
|
||||
{
|
||||
u8 strbuf[30];
|
||||
u8 *ptr;
|
||||
|
||||
AddTextPrinterParameterized3(1, 2, 2, 34, sTextColor2, -1, gText_Time);
|
||||
ptr = ConvertIntToDecimalStringN(strbuf, gSaveBlock2Ptr->playTimeHours, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
*ptr++ = CHAR_COLON;
|
||||
ConvertIntToDecimalStringN(ptr, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
AddTextPrinterParameterized3(1, 2, 62, 34, sTextColor2, -1, strbuf);
|
||||
}
|
||||
|
||||
static void PrintDexCount(void)
|
||||
{
|
||||
u8 strbuf[30];
|
||||
u8 *ptr;
|
||||
u16 dexcount;
|
||||
if (FlagGet(FLAG_0x829) == TRUE)
|
||||
{
|
||||
if (IsNationalPokedexEnabled())
|
||||
dexcount = GetNationalPokedexCount(FLAG_GET_CAUGHT);
|
||||
else
|
||||
dexcount = GetKantoPokedexCount(FLAG_GET_CAUGHT);
|
||||
AddTextPrinterParameterized3(1, 2, 2, 50, sTextColor2, -1, gText_Pokedex);
|
||||
ptr = ConvertIntToDecimalStringN(strbuf, dexcount, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
StringAppend(ptr, gTextJPDummy_Hiki);
|
||||
AddTextPrinterParameterized3(1, 2, 62, 50, sTextColor2, -1, strbuf);
|
||||
}
|
||||
}
|
||||
|
||||
static void PrintBadgeCount(void)
|
||||
{
|
||||
u8 strbuf[30];
|
||||
u8 *ptr;
|
||||
u32 flagId;
|
||||
u8 nbadges = 0;
|
||||
for (flagId = FLAG_UNK820; flagId < FLAG_UNK820 + 8; flagId++)
|
||||
{
|
||||
if (FlagGet(flagId))
|
||||
nbadges++;
|
||||
}
|
||||
AddTextPrinterParameterized3(1, 2, 2, 66, sTextColor2, -1, gText_Badges);
|
||||
ptr = ConvertIntToDecimalStringN(strbuf, nbadges, STR_CONV_MODE_LEADING_ZEROS, 1);
|
||||
StringAppend(ptr, gTextJPDummy_Ko);
|
||||
AddTextPrinterParameterized3(1, 2, 62, 66, sTextColor2, -1, strbuf);
|
||||
}
|
||||
|
||||
static void LoadUserFrameToBg(u8 bgId)
|
||||
{
|
||||
LoadBgTiles(bgId, GetUserFrameGraphicsInfo(gSaveBlock2Ptr->optionsWindowFrameType)->tiles, 0x120, 0x1B1);
|
||||
LoadPalette(GetUserFrameGraphicsInfo(gSaveBlock2Ptr->optionsWindowFrameType)->palette, 0x20, 0x20);
|
||||
DestroyWindowBubbleFrame(&sWindowTemplate[4]);
|
||||
}
|
||||
|
||||
static void SetStdFrame0OnBg(u8 bgId)
|
||||
{
|
||||
TextWindow_SetStdFrame0_WithPal(0, 0x1B1, 0x20);
|
||||
DestroyWindowBubbleFrame(&sWindowTemplate[4]);
|
||||
}
|
||||
|
||||
static void DrawBubbleBorder(const struct WindowTemplate * windowTemplate)
|
||||
{
|
||||
FillBgTilemapBufferRect(windowTemplate->bg, 0x1B1, windowTemplate->tilemapLeft - 1, windowTemplate->tilemapTop - 1, 1, 1, 2);
|
||||
FillBgTilemapBufferRect(windowTemplate->bg, 0x1B2, windowTemplate->tilemapLeft, windowTemplate->tilemapTop - 1, windowTemplate->width, windowTemplate->height, 2);
|
||||
FillBgTilemapBufferRect(windowTemplate->bg, 0x1B3, windowTemplate->tilemapLeft + windowTemplate->width, windowTemplate->tilemapTop - 1, 1, 1, 2);
|
||||
FillBgTilemapBufferRect(windowTemplate->bg, 0x1B4, windowTemplate->tilemapLeft - 1, windowTemplate->tilemapTop, 1, windowTemplate->height, 2);
|
||||
FillBgTilemapBufferRect(windowTemplate->bg, 0x1B6, windowTemplate->tilemapLeft + windowTemplate->width, windowTemplate->tilemapTop, 1, windowTemplate->height, 2);
|
||||
FillBgTilemapBufferRect(windowTemplate->bg, 0x1B7, windowTemplate->tilemapLeft - 1, windowTemplate->tilemapTop + windowTemplate->height, 1, 1, 2);
|
||||
FillBgTilemapBufferRect(windowTemplate->bg, 0x1B8, windowTemplate->tilemapLeft, windowTemplate->tilemapTop + windowTemplate->height, windowTemplate->width, 1, 2);
|
||||
FillBgTilemapBufferRect(windowTemplate->bg, 0x1B9, windowTemplate->tilemapLeft + windowTemplate->width, windowTemplate->tilemapTop + windowTemplate->height, 1, 1, 2);
|
||||
CopyBgTilemapBufferToVram(windowTemplate->bg);
|
||||
}
|
||||
|
||||
static void DestroyWindowBubbleFrame(const struct WindowTemplate * windowTemplate)
|
||||
{
|
||||
FillBgTilemapBufferRect(windowTemplate->bg, 0x000, windowTemplate->tilemapLeft - 1, windowTemplate->tilemapTop - 1, windowTemplate->tilemapLeft + windowTemplate->width + 1, windowTemplate->tilemapTop + windowTemplate->height + 1, 2);
|
||||
CopyBgTilemapBufferToVram(windowTemplate->bg);
|
||||
}
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ u16 sub_8146CE8(void)
|
||||
struct MysteryEventStruct *r4 = sub_8143D94();
|
||||
u16 r5;
|
||||
|
||||
if (!sub_806E2BC() || !ValidateReceivedWonderNews())
|
||||
if (!Flag_0x839_IsSet() || !ValidateReceivedWonderNews())
|
||||
return 0;
|
||||
|
||||
r5 = sub_8146E0C(r4);
|
||||
|
||||
+1
-1
@@ -475,7 +475,7 @@ void sub_8143910(u8 taskId)
|
||||
data->state = 0;
|
||||
break;
|
||||
case 26:
|
||||
sub_812B484();
|
||||
HelpSystem_Enable();
|
||||
Free(data->t10);
|
||||
DestroyTask(taskId);
|
||||
SetMainCallback2(MainCB_FreeAllBuffersAndReturnToInitTitleScreen);
|
||||
|
||||
@@ -1680,7 +1680,7 @@ void task00_mystery_gift(u8 taskId)
|
||||
break;
|
||||
case 37:
|
||||
CloseLink();
|
||||
sub_812B484();
|
||||
HelpSystem_Enable();
|
||||
Free(data->buffer);
|
||||
DestroyTask(taskId);
|
||||
SetMainCallback2(MainCB_FreeAllBuffersAndReturnToInitTitleScreen);
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ static void SetDefaultOptions(void)
|
||||
gSaveBlock2Ptr->optionsBattleStyle = OPTIONS_BATTLE_STYLE_SHIFT;
|
||||
gSaveBlock2Ptr->optionsBattleSceneOff = FALSE;
|
||||
gSaveBlock2Ptr->regionMapZoom = FALSE;
|
||||
gSaveBlock2Ptr->optionsButtonMode = OPTIONS_BUTTON_MODE_NORMAL;
|
||||
gSaveBlock2Ptr->optionsButtonMode = OPTIONS_BUTTON_MODE_HELP;
|
||||
}
|
||||
|
||||
static void ClearPokedexFlags(void)
|
||||
|
||||
+2
-2
@@ -854,7 +854,7 @@ void TrySetUpQuestLogScenes_ElseContinueFromSave(u8 taskId)
|
||||
|
||||
if (sNumScenes != 0)
|
||||
{
|
||||
gUnknown_3005ECC = FALSE;
|
||||
gHelpSystemEnabled = FALSE;
|
||||
sub_8110F90(taskId);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
@@ -1603,7 +1603,7 @@ void sub_81120AC(u8 taskId)
|
||||
gTextFlags.autoScroll = FALSE;
|
||||
gUnknown_2036E28 = 0;
|
||||
sub_8082740(0);
|
||||
gUnknown_3005ECC = 1;
|
||||
gHelpSystemEnabled = 1;
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
}
|
||||
|
||||
+2
-2
@@ -179,7 +179,7 @@ static const struct SpriteTemplate sWakeSpriteTemplate = {
|
||||
void ScrSpecial_SeaGallopFerry(void)
|
||||
{
|
||||
SetVBlankCallback(NULL);
|
||||
sub_812B478();
|
||||
HelpSystem_Disable();
|
||||
SetMainCallback2(CB2_SetUpSeaGallopScene);
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ static void Task_SeaGallop_2(u8 taskId)
|
||||
if (sub_8055FC4() && !gPaletteFade.active)
|
||||
{
|
||||
Task_SeaGallop_3();
|
||||
sub_812B484();
|
||||
HelpSystem_Enable();
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ const struct TextWindowGraphics gUserFrames[] = {
|
||||
{gUnknown_84717CC, gUnknown_8471A2C}
|
||||
}; // NELEMS = 10
|
||||
|
||||
const struct TextWindowGraphics * sub_8069788(u8 idx)
|
||||
const struct TextWindowGraphics * GetUserFrameGraphicsInfo(u8 idx)
|
||||
{
|
||||
if (idx >= 20) // if (idx >= NELEMS(gUserFrames))
|
||||
return &gUserFrames[0];
|
||||
|
||||
+3
-3
@@ -513,7 +513,7 @@ static void SetTitleScreenScene_Run(s16 * data)
|
||||
CreateTask(Task_FlameOrLeafSpawner, 5);
|
||||
SetGpuRegsForTitleScreenRun();
|
||||
data[6] = CreateSlashSprite();
|
||||
sub_812B484();
|
||||
HelpSystem_Enable();
|
||||
data[1]++;
|
||||
// fallthrough
|
||||
case 1:
|
||||
@@ -583,7 +583,7 @@ static void SetTitleScreenScene_Restart(s16 * data)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
sub_812B478();
|
||||
HelpSystem_Disable();
|
||||
DestroyTask(FindTaskIdByFunc(Task_TitleScreenMain));
|
||||
SetMainCallback2(sub_80EC864);
|
||||
break;
|
||||
@@ -626,7 +626,7 @@ static void SetTitleScreenScene_Cry(s16 * data)
|
||||
Sav2_ClearSetDefault();
|
||||
SetPokemonCryStereo(gSaveBlock2Ptr->optionsSound);
|
||||
InitHeap(gHeap, HEAP_SIZE);
|
||||
SetMainCallback2(sub_800C300);
|
||||
SetMainCallback2(CB2_InitMainMenu);
|
||||
DestroyTask(FindTaskIdByFunc(Task_TitleScreenMain));
|
||||
}
|
||||
break;
|
||||
|
||||
+1
-1
@@ -221,7 +221,7 @@ gUnknown_3005E98: @ 3005E98
|
||||
.align 4
|
||||
.include "fame_checker.o"
|
||||
|
||||
gUnknown_3005ECC: @ 3005ECC
|
||||
gHelpSystemEnabled: @ 3005ECC
|
||||
.space 0x4
|
||||
|
||||
.include "mevent.o"
|
||||
|
||||
Reference in New Issue
Block a user