mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 03:57:38 +01:00
Merge branch 'master' of https://github.com/pret/pokeemerald into decompile_main_menu
This commit is contained in:
commit
03f8d0d6ce
@ -16009,6 +16009,44 @@ _0819715C:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
|
||||
thumb_func_end sub_8197080
|
||||
thumb_func_start sub_8197184
|
||||
sub_8197184: @ 8197184
|
||||
push {r4,r5,lr}
|
||||
adds r4, r1, 0
|
||||
adds r5, r2, 0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0
|
||||
bl GetWindowAttribute
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =gUnknown_0860EA6C
|
||||
movs r2, 0x80
|
||||
lsls r2, 1
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
adds r3, r4, 0
|
||||
bl LoadBgTiles
|
||||
ldr r0, =gUnknown_0860EA4C
|
||||
lsls r5, 20
|
||||
lsrs r5, 16
|
||||
adds r1, r5, 0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8197184
|
||||
|
||||
thumb_func_start sub_81971C4
|
||||
sub_81971C4: @ 81971C4
|
||||
push {lr}
|
||||
bl sub_819645C
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81971C4
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
||||
|
@ -5,6 +5,70 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_819A44C
|
||||
sub_819A44C: @ 819A44C
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
ldrb r4, [r5, 0x5]
|
||||
lsrs r4, 4
|
||||
movs r0, 0x65
|
||||
bl IndexOfSpritePaletteTag
|
||||
lsls r0, 24
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
lsrs r0, 24
|
||||
cmp r4, r0
|
||||
bne _0819A4BA
|
||||
adds r0, r5, 0
|
||||
adds r0, 0x3F
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x10
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0819A4B0
|
||||
ldrh r1, [r5, 0x2E]
|
||||
movs r2, 0x2E
|
||||
ldrsh r0, [r5, r2]
|
||||
cmp r0, 0
|
||||
beq _0819A484
|
||||
subs r0, r1, 0x1
|
||||
strh r0, [r5, 0x2E]
|
||||
b _0819A4C2
|
||||
_0819A484:
|
||||
bl Random
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x5
|
||||
bl __umodsi3
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
bne _0819A4A6
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
bl StartSpriteAnim
|
||||
movs r0, 0x20
|
||||
strh r0, [r5, 0x2E]
|
||||
b _0819A4C2
|
||||
_0819A4A6:
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x1
|
||||
bl StartSpriteAnim
|
||||
b _0819A4C2
|
||||
_0819A4B0:
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x1
|
||||
bl StartSpriteAnimIfDifferent
|
||||
b _0819A4C2
|
||||
_0819A4BA:
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
bl StartSpriteAnimIfDifferent
|
||||
_0819A4C2:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_819A44C
|
||||
|
||||
thumb_func_start sub_819A4C8
|
||||
sub_819A4C8: @ 819A4C8
|
||||
push {lr}
|
||||
@ -12385,7 +12449,7 @@ sub_81A0C9C: @ 81A0C9C
|
||||
bl sub_808BCF4
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
bl sub_81A0A70
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -14586,7 +14650,7 @@ sub_81A1EA8: @ 81A1EA8
|
||||
strb r0, [r4]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
@ -14874,7 +14938,7 @@ sub_81A2134: @ 81A2134
|
||||
strb r0, [r4]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
@ -15227,7 +15291,7 @@ sub_81A2460: @ 81A2460
|
||||
strb r0, [r4]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
@ -15475,7 +15539,7 @@ sub_81A2698: @ 81A2698
|
||||
strb r0, [r6]
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
@ -15778,7 +15842,7 @@ sub_81A2968: @ 81A2968
|
||||
strb r0, [r5]
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
@ -16153,7 +16217,7 @@ sub_81A2C94: @ 81A2C94
|
||||
strb r0, [r4]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
@ -16448,7 +16512,7 @@ sub_81A2F38: @ 81A2F38
|
||||
strb r0, [r5]
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
@ -16526,7 +16590,7 @@ sub_81A2FF8: @ 81A2FF8
|
||||
strb r0, [r4]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
@ -19573,7 +19637,7 @@ sub_81A4AA0: @ 81A4AA0
|
||||
strb r0, [r4]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
|
@ -667,7 +667,7 @@ sub_813C4BC: @ 813C4BC
|
||||
strb r0, [r6]
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
|
26
asm/link.s
26
asm/link.s
@ -18242,7 +18242,7 @@ _08012938:
|
||||
bl CopyWindowToVram
|
||||
ldrb r0, [r6, 0xF]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldr r0, =gMultiuseListMenuTemplate
|
||||
adds r2, r0, 0
|
||||
ldr r1, =gUnknown_082F015C
|
||||
@ -18258,7 +18258,7 @@ _08012938:
|
||||
strb r0, [r6, 0x12]
|
||||
ldrb r0, [r6, 0x11]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r6, 0x11]
|
||||
bl PutWindowTilemap
|
||||
ldrb r0, [r6, 0x11]
|
||||
@ -19723,7 +19723,7 @@ _0801360C:
|
||||
bl CopyWindowToVram
|
||||
ldrb r0, [r6, 0xB]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldr r0, =gMultiuseListMenuTemplate
|
||||
adds r2, r0, 0
|
||||
ldr r1, =gUnknown_082F0204
|
||||
@ -19739,7 +19739,7 @@ _0801360C:
|
||||
strb r0, [r6, 0xE]
|
||||
ldrb r0, [r6, 0xD]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r6, 0xD]
|
||||
bl PutWindowTilemap
|
||||
ldrb r0, [r6, 0xD]
|
||||
@ -26036,7 +26036,7 @@ sub_8017020: @ 8017020
|
||||
bl sub_81973A4
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldr r0, =gStringVar4
|
||||
adds r1, r4, 0
|
||||
bl StringExpandPlaceholders
|
||||
@ -26081,7 +26081,7 @@ _08017076:
|
||||
bl sub_81973A4
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldr r0, =gStringVar4
|
||||
adds r1, r5, 0
|
||||
bl StringExpandPlaceholders
|
||||
@ -26173,7 +26173,7 @@ sub_8017118: @ 8017118
|
||||
lsrs r4, 24
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
adds r0, r4, 0
|
||||
movs r1, 0xFF
|
||||
bl FillWindowPixelBuffer
|
||||
@ -26269,7 +26269,7 @@ _080171DC:
|
||||
strb r0, [r5]
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldr r0, =gMultiuseListMenuTemplate
|
||||
adds r2, r0, 0
|
||||
ldr r1, [sp, 0x24]
|
||||
@ -26382,7 +26382,7 @@ _080172C8:
|
||||
strb r0, [r6]
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldr r0, =gMultiuseListMenuTemplate
|
||||
adds r2, r0, 0
|
||||
ldr r1, [sp, 0x24]
|
||||
@ -49423,7 +49423,7 @@ _08022D38:
|
||||
_08022D42:
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldrb r1, [r5, 0x1]
|
||||
movs r0, 0x2
|
||||
mov r8, r0
|
||||
@ -52021,7 +52021,7 @@ _080241A6:
|
||||
beq _0802421E
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldr r2, =gText_SavingDontTurnOffPower
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
@ -52378,7 +52378,7 @@ _0802445A:
|
||||
_08024460:
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldrh r1, [r5, 0x14]
|
||||
cmp r1, 0x3
|
||||
bne _08024490
|
||||
@ -64111,7 +64111,7 @@ _0802A3A4:
|
||||
_0802A3AE:
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldr r2, =gText_SavingDontTurnOffPower
|
||||
str r4, [sp]
|
||||
movs r0, 0x2
|
||||
|
@ -800,7 +800,7 @@ sub_8120708: @ 8120708
|
||||
adds r5, r0, 0
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
movs r4, 0x1
|
||||
str r4, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
|
5505
asm/menu.s
5505
asm/menu.s
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -463,7 +463,7 @@ sub_816B21C: @ 816B21C
|
||||
adds r4, r0, 0
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
movs r0, 0
|
||||
@ -599,7 +599,7 @@ mapldr_080EBC0C: @ 816B33C
|
||||
bl sub_81973A4
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldr r0, =sub_816B368
|
||||
movs r1, 0
|
||||
bl CreateTask
|
||||
@ -2540,7 +2540,7 @@ bx_battle_menu_t3: @ 816C3A4
|
||||
bne _0816C3F2
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
movs r1, 0x6
|
||||
ldrsh r0, [r5, r1]
|
||||
cmp r0, 0
|
||||
|
@ -211,7 +211,7 @@ _080C72AC:
|
||||
bl sub_81973A4
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
movs r0, 0
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
@ -627,7 +627,7 @@ sub_80C75FC: @ 80C75FC
|
||||
lsrs r4, 24
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x5
|
||||
mov r2, r8
|
||||
|
@ -461,7 +461,7 @@ sub_80E70F4: @ 80E70F4
|
||||
adds r4, r0, 0
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
movs r0, 0
|
||||
|
@ -508,7 +508,7 @@ _081406E0:
|
||||
ldr r4, =gUnknown_0203AB8C
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
ldr r2, =gUnknown_082A5B89
|
||||
movs r1, 0x1
|
||||
@ -740,7 +740,7 @@ sub_8140914: @ 8140914
|
||||
ldr r5, =gUnknown_0203AB8C
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r5]
|
||||
ldr r2, =gUnknown_082A5C13
|
||||
movs r1, 0x1
|
||||
@ -2631,7 +2631,7 @@ sub_814189C: @ 814189C
|
||||
ldr r4, =gUnknown_0203AB8C
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
ldr r2, =gUnknown_082A5BD7
|
||||
b _08141902
|
||||
@ -2643,7 +2643,7 @@ _081418EC:
|
||||
ldr r4, =gUnknown_0203AB8C
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
ldr r2, =gUnknown_082A5BCB
|
||||
_08141902:
|
||||
@ -2667,7 +2667,7 @@ _08141928:
|
||||
ldr r4, =gUnknown_0203AB8C
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
ldr r2, =gUnknown_082A5BE0
|
||||
movs r1, 0x1
|
||||
@ -2805,7 +2805,7 @@ sub_8141A18: @ 8141A18
|
||||
ldr r5, =gUnknown_0203AB8C
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x1
|
||||
str r1, [sp]
|
||||
@ -3001,7 +3001,7 @@ _08141BB0:
|
||||
ldr r4, =gUnknown_0203AB8C
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
ldr r2, =gUnknown_082A5C21
|
||||
movs r1, 0x1
|
||||
@ -3028,7 +3028,7 @@ _08141C58:
|
||||
ldr r4, =gUnknown_0203AB8C
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
ldr r2, =gUnknown_082A5C61
|
||||
movs r1, 0x1
|
||||
@ -3060,7 +3060,7 @@ _08141CBC:
|
||||
ldr r4, =gUnknown_0203AB8C
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
ldr r2, =gUnknown_082A5C04
|
||||
movs r1, 0x1
|
||||
@ -3147,7 +3147,7 @@ _08141D44:
|
||||
ldr r4, =gUnknown_0203AB8C
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldrb r0, [r4]
|
||||
ldr r2, =gUnknown_082A5C61
|
||||
movs r1, 0x1
|
||||
@ -4667,7 +4667,7 @@ sub_81429F0: @ 81429F0
|
||||
bl StringExpandPlaceholders
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
str r5, [sp]
|
||||
movs r0, 0xFF
|
||||
str r0, [sp, 0x4]
|
||||
@ -4744,7 +4744,7 @@ sub_8142A88: @ 8142A88
|
||||
beq _08142B28
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldr r2, =gUnknown_082A5B6B
|
||||
str r7, [sp]
|
||||
movs r0, 0xFF
|
||||
@ -4768,7 +4768,7 @@ _08142B28:
|
||||
bl StringExpandPlaceholders
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
movs r0, 0xFF
|
||||
@ -4798,7 +4798,7 @@ _08142B78:
|
||||
bl StringExpandPlaceholders
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
str r7, [sp]
|
||||
movs r0, 0xFF
|
||||
str r0, [sp, 0x4]
|
||||
|
@ -975,7 +975,7 @@ sub_812ACF4: @ 812ACF4
|
||||
sub sp, 0xC
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldr r2, =gText_YouDontHaveThreeCoins
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
@ -1543,7 +1543,7 @@ sub_812B158: @ 812B158
|
||||
sub sp, 0xC
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldr r2, =gText_QuitTheGame
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
@ -1633,7 +1633,7 @@ sub_812B214: @ 812B214
|
||||
sub sp, 0xC
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldr r2, =gText_YouveGot9999Coins
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
@ -1686,7 +1686,7 @@ sub_812B280: @ 812B280
|
||||
sub sp, 0xC
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldr r2, =gText_YouveRunOutOfCoins
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
|
@ -148,7 +148,7 @@ _0809F8E4:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldr r1, =gUnknown_02037619
|
||||
movs r0, 0
|
||||
strb r0, [r1, 0x1]
|
||||
@ -1832,7 +1832,7 @@ _080A06EC:
|
||||
strb r0, [r6]
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0
|
||||
bl sub_81973FC
|
||||
bl NewMenuHelpers_DrawStdWindowFrame
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r0, [r0]
|
||||
ldrb r0, [r0, 0x8]
|
||||
|
@ -409,7 +409,7 @@ _080C2A2C:
|
||||
bl sub_800AC34
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
bl sub_81973C4
|
||||
bl NewMenuHelpers_DrawDialogueFrame
|
||||
ldr r2, =gText_WaitingTrainerFinishReading
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
|
@ -2004,14 +2004,14 @@ gUnknown_082F06F8:: @ 82F06F8
|
||||
.4byte gText_ReturnToTitle
|
||||
|
||||
.align 2
|
||||
gUnknown_082F0720:: @ 82F0720 struct TextColor
|
||||
gUnknown_082F0720:: @ 82F0720
|
||||
.byte 0x00, 0x01, 0x02
|
||||
|
||||
.align 2
|
||||
.byte 0x00, 0x01, 0x02
|
||||
|
||||
.align 2
|
||||
gUnknown_082F0728:: @ 82F0728 struct TextColor
|
||||
gUnknown_082F0728:: @ 82F0728
|
||||
.byte 0x01, 0x02, 0x03
|
||||
|
||||
.align 2
|
||||
|
@ -1,53 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
gUnknown_0860F074:: @ 860F074
|
||||
.incbin "graphics/interface/860F074.gbapal"
|
||||
|
||||
gUnknown_0860F094:: @ 860F094
|
||||
.byte 8, 4, 1, 0
|
||||
|
||||
gUnknown_0860F098:: @ 860F098
|
||||
window_template 0, 2, 15, 27, 4, 15, 0x194
|
||||
null_window_template
|
||||
|
||||
gUnknown_0860F0A8:: @ 860F0A8
|
||||
window_template 0, 21, 9, 5, 4, 15, 0x125
|
||||
|
||||
@ These are not referenced in src/new_menu_helpers.c; rather, they are in src/menu.c. Regardless, they were plopped here.
|
||||
|
||||
gUnknown_0860F0B0:: @ 860F0B0
|
||||
.incbin "graphics/interface/860F0B0.gbapal"
|
||||
|
||||
gUnknown_0860F0D0:: @ 860F0D0
|
||||
.byte 15, 1, 2, 0
|
||||
|
||||
gUnknown_0860F0D4:: @ 860F0D4
|
||||
.2byte 0xC0C, 0
|
||||
.2byte 0xC20, 32
|
||||
.2byte 0xC20, 100
|
||||
.2byte 0xC20, 0x60
|
||||
.2byte 0xC20, 0x80
|
||||
.2byte 0xC20, 0x48
|
||||
.2byte 0xC20, 0x44
|
||||
.2byte 0xC20, 0x6C
|
||||
.2byte 0xC20, 0x68
|
||||
.2byte 0xC20, 0x88
|
||||
.2byte 0xC20, 0xA4
|
||||
.2byte 0xC20, 0x24
|
||||
.2byte 0xC20, 0x28
|
||||
.2byte 0xC20, 0x2C
|
||||
.2byte 0xC20, 0x40
|
||||
.2byte 0xC20, 0x84
|
||||
.2byte 0xC20, 0x4C
|
||||
.2byte 0xC20, 0xA0
|
||||
.2byte 0xC20, 0x8C
|
||||
.2byte 0xC2A, 0xA8
|
||||
.2byte 0xC2A, 0xC0
|
||||
.2byte 0xC2A, 0xC8
|
||||
.2byte 0xC2A, 0xE0
|
||||
.2byte 0xC2A, 0xE8
|
||||
.2byte 0x808, 0xAE
|
||||
.2byte 0x808, 0xAF
|
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.1 KiB |
7
include/battle_frontier_1.h
Normal file
7
include/battle_frontier_1.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef GUARD_BATTLE_FRONTIER_1_H
|
||||
#define GUARD_BATTLE_FRONTIER_1_H
|
||||
|
||||
bool32 sub_8196094(void);
|
||||
void sub_8196080(const u8 *str);
|
||||
|
||||
#endif // GUARD_BATTLE_FRONTIER_1_H
|
@ -5,6 +5,6 @@ void ClearDma3Requests(void);
|
||||
void ProcessDma3Requests(void);
|
||||
s16 RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode);
|
||||
s16 RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode);
|
||||
int CheckForSpaceForDma3Request(s16 index);
|
||||
s16 CheckForSpaceForDma3Request(s16 index);
|
||||
|
||||
#endif // GUARD_DMA3_H
|
||||
|
@ -39,6 +39,9 @@
|
||||
#define BG_CHAR_ADDR(n) (BG_VRAM + (BG_CHAR_SIZE * (n)))
|
||||
#define BG_SCREEN_ADDR(n) (BG_VRAM + (BG_SCREEN_SIZE * (n)))
|
||||
|
||||
#define BG_TILE_H_FLIP(n) (0x400 + (n))
|
||||
#define BG_TILE_V_FLIP(n) (0x800 + (n))
|
||||
|
||||
// text-mode BG
|
||||
#define OBJ_VRAM0 (VRAM + 0x10000)
|
||||
#define OBJ_VRAM0_SIZE 0x8000
|
||||
|
@ -24,7 +24,7 @@
|
||||
#define INCBIN_S32 {0}
|
||||
#endif // __APPLE__
|
||||
|
||||
#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#define ARRAY_COUNT(array) (size_t)(sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
// useful math macros
|
||||
|
||||
|
@ -2713,4 +2713,10 @@ extern const u8 gRaySceneHushBg_Pal[];
|
||||
extern const u8 gRaySceneHushBg_Gfx[];
|
||||
extern const u8 gRaySceneHushRing_Gfx[];
|
||||
|
||||
//menu graphics
|
||||
extern const u16 gFireRedMenuElements1_Pal[16];
|
||||
extern const u16 gFireRedMenuElements2_Pal[16];
|
||||
extern const u16 gFireRedMenuElements3_Pal[16];
|
||||
extern const u8 gFireRedMenuElements_Gfx[];
|
||||
|
||||
#endif //GUARD_GRAPHICS_H
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef GUARD_MENU_H
|
||||
#define GUARD_MENU_H
|
||||
|
||||
#include "task.h"
|
||||
#include "text.h"
|
||||
#include "window.h"
|
||||
|
||||
@ -16,28 +17,47 @@ struct MenuAction
|
||||
} func;
|
||||
};
|
||||
|
||||
void box_print(u8, u8, u8, u8, const void *, s8, const u8 *);
|
||||
void sub_81971D0(void);
|
||||
void sub_8197200(void);
|
||||
u16 sub_8197224(void);
|
||||
void sub_81973A4(void);
|
||||
void NewMenuHelpers_DrawDialogueFrame(u8, u8);
|
||||
void sub_819746C(u8 windowId, bool8 copyToVram);
|
||||
void NewMenuHelpers_DrawStdWindowFrame(u8, u8);
|
||||
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
|
||||
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
|
||||
void sub_8197434(u8 a0, u8 a1);
|
||||
void SetStandardWindowBorderStyle(u8 a0, u8 a1);
|
||||
void sub_8197930(void);
|
||||
u8 GetPlayerTextSpeed(void);
|
||||
void sub_81978B0(u16 arg0);
|
||||
|
||||
void box_print(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
|
||||
void sub_8198070(u8 windowId, bool8 copyToVram);
|
||||
void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
|
||||
void SetWindowBorderStyle(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette);
|
||||
void schedule_bg_copy_tilemap_to_vram(u8 bgNum);
|
||||
void PrintMenuTable(u8 idx, u8 nstrs, const struct MenuAction *strs);
|
||||
void InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 idx, u8 nstrs,u8);
|
||||
void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs);
|
||||
u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 numItems, u8 initialCursorPos);
|
||||
u8 GetMenuCursorPos(void);
|
||||
s8 ProcessMenuInput(void);
|
||||
s8 ProcessMenuInputNoWrapAround(void);
|
||||
void blit_move_info_icon(u8 winId, u8 a2, u16 x, u16 y);
|
||||
void reset_temp_tile_data_buffers(void);
|
||||
int decompress_and_copy_tile_data_to_vram(u8 bg_id, const void *src, int size, u16 offset, u8 mode);
|
||||
void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, int size, u16 offset, u8 mode);
|
||||
bool8 free_temp_tile_data_buffers_if_possible(void);
|
||||
u64 sub_8198A50(struct WindowTemplate*, u8, u8, u8, u8, u8, u8, u16); // returns something but it isn't used, fix when menu.s is decomp'd
|
||||
struct WindowTemplate sub_8198A50(u8, u8, u8, u8, u8, u8, u16);
|
||||
void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos);
|
||||
s8 ProcessMenuInputNoWrap_(void);
|
||||
void do_scheduled_bg_tilemap_copies_to_vram(void);
|
||||
void clear_scheduled_bg_copies_to_vram(void);
|
||||
void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str);
|
||||
void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u16 a3);
|
||||
void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str);
|
||||
void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u8 a3);
|
||||
void sub_81995E4(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds);
|
||||
void sub_8197DF8(u8 windowId, bool8 copyToVram);
|
||||
u16 sub_8198AA4(u8, u8, u8, u8, u8, u8, u16);
|
||||
void *malloc_and_decompress(const void *src, int *sizeOut);
|
||||
u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode);
|
||||
void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress);
|
||||
|
||||
#endif // GUARD_MENU_H
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef GUARD_MENU_HELPERS_H
|
||||
#define GUARD_MENU_HELPERS_H
|
||||
|
||||
#include "task.h"
|
||||
|
||||
// Exported type declarations
|
||||
|
||||
struct YesNoFuncTable
|
||||
@ -28,5 +30,7 @@ void sub_81223FC(u8 *a0, u8 count, u8 a2);
|
||||
void sub_8122448(u8 *a0, u8 count, u16 x, u16 y);
|
||||
void DisplayMessageAndContinueTask(u8 taskId, u8 arg1, u16 arg2, u8 arg3, u8 arg4, u8 textSpeed, const u8 *string, void *taskFunc);
|
||||
void CreateYesNoMenuWithCallbacks(u8 taskId, const struct WindowTemplate *template, u8 arg2, u8 arg3, u8 arg4, u16 tileStart, u8 palette, const struct YesNoFuncTable *yesNo);
|
||||
u8 GetLRKeysState(void);
|
||||
u8 sub_812210C(void);
|
||||
|
||||
#endif //GUARD_MENU_HELPERS_H
|
||||
|
@ -1,25 +0,0 @@
|
||||
#ifndef GUARD_NEW_MENU_HELPERS_H
|
||||
#define GUARD_NEW_MENU_HELPERS_H
|
||||
|
||||
#include "text.h"
|
||||
#include "task.h"
|
||||
|
||||
void sub_81971D0(void);
|
||||
void sub_8197200(void);
|
||||
void sub_81973A4(void);
|
||||
void sub_81973C4(u8, u8);
|
||||
void sub_819746C(u8 windowId, bool8 copyToVram);
|
||||
void sub_81973FC(u8, u8);
|
||||
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void ( *callback)(u16, struct TextPrinter *), u8 fgColor, u8 bgColor, u8 shadowColor);
|
||||
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
|
||||
void sub_8197434(u8 a0, u8 a1);
|
||||
void SetStandardWindowBorderStyle(u8 a0, u8 a1);
|
||||
void sub_8197930(void);
|
||||
u8 GetPlayerTextSpeed(void);
|
||||
void sub_81978B0(u16 arg0);
|
||||
u16 sub_8197224(void);
|
||||
int sub_8196094(void);
|
||||
void sub_8196080(u8*);
|
||||
void AddTextPrinterForMessage(u8);
|
||||
|
||||
#endif // GUARD_NEW_MENU_HELPERS_H
|
@ -93,5 +93,6 @@ void CreateRegionMapPlayerIcon(u16 x, u16 y);
|
||||
void CreateRegionMapCursor(u16 tileTag, u16 paletteTag);
|
||||
u8 *GetMapName(u8 *, u16, u16);
|
||||
bool32 sub_8124668(u8 mapSecId);
|
||||
u8 *sub_81245DC(u8 *dest, u16 mapSecId);
|
||||
|
||||
#endif //GUARD_REGION_MAP_H
|
||||
|
@ -215,6 +215,9 @@ extern const u8 gText_ButtonMode[];
|
||||
extern const u8 gText_MaleSymbol[];
|
||||
extern const u8 gText_FemaleSymbol[];
|
||||
|
||||
extern const u8 gText_SelectorArrow3[];
|
||||
extern const u8 gText_YesNo[];
|
||||
|
||||
// mystery event menu text
|
||||
extern const u8 gText_EventSafelyLoaded[];
|
||||
extern const u8 gText_LoadErrorEndingSession[];
|
||||
|
@ -75,6 +75,10 @@
|
||||
#define CHAR_NEWLINE 0xFE
|
||||
#define EOS 0xFF // end of string
|
||||
|
||||
#define EXT_CTRL_CODE_COLOR 0x1
|
||||
#define EXT_CTRL_CODE_HIGHLIGHT 0x2
|
||||
#define EXT_CTRL_CODE_SHADOW 0x3
|
||||
|
||||
#define TEXT_COLOR_TRANSPARENT 0x0
|
||||
#define TEXT_COLOR_WHITE 0x1
|
||||
#define TEXT_COLOR_DARK_GREY 0x2
|
||||
@ -116,7 +120,7 @@ struct TextSubPrinter // TODO: Better name
|
||||
u8 letterSpacing;
|
||||
u8 lineSpacing;
|
||||
u8 fontColor_l:4; // 0xC
|
||||
u8 fontColor_h:4;
|
||||
u8 fgColor:4;
|
||||
u8 bgColor:4;
|
||||
u8 shadowColor:4;
|
||||
};
|
||||
@ -149,7 +153,7 @@ struct FontInfo
|
||||
u8 letterSpacing;
|
||||
u8 lineSpacing;
|
||||
u8 fontColor_l:4;
|
||||
u8 fontColor_h:4;
|
||||
u8 fgColor:4;
|
||||
u8 bgColor:4;
|
||||
u8 shadowColor:4;
|
||||
};
|
||||
@ -178,20 +182,6 @@ typedef struct {
|
||||
|
||||
extern TextFlags gTextFlags;
|
||||
|
||||
struct __attribute__((packed)) TextColor
|
||||
{
|
||||
u8 fgColor;
|
||||
u8 bgColor;
|
||||
u8 shadowColor;
|
||||
};
|
||||
|
||||
struct AlignedTextColor // because sometimes it's necessary
|
||||
{
|
||||
u8 fgColor;
|
||||
u8 bgColor;
|
||||
u8 shadowColor;
|
||||
};
|
||||
|
||||
extern u8 gStringVar1[];
|
||||
extern u8 gStringVar2[];
|
||||
extern u8 gStringVar3[];
|
||||
|
@ -52,7 +52,7 @@ void PutWindowTilemap(u8 windowId);
|
||||
void PutWindowRectTilemapOverridePalette(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 palette);
|
||||
void ClearWindowTilemap(u8 windowId);
|
||||
void PutWindowRectTilemap(u8 windowId, u8 x, u8 y, u8 width, u8 height);
|
||||
void BlitBitmapToWindow(u8 windowId, u8 *pixels, u16 x, u16 y, u16 width, u16 height);
|
||||
void BlitBitmapToWindow(u8 windowId, const u8 *pixels, u16 x, u16 y, u16 width, u16 height);
|
||||
void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight);
|
||||
void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height);
|
||||
void CopyToWindowPixelBuffer(u8 windowId, const u8 *src, u16 size, u16 tileOffset);
|
||||
|
@ -248,8 +248,7 @@ SECTIONS {
|
||||
src/battle_dome_cards.o(.text);
|
||||
src/lilycove_lady.o(.text);
|
||||
asm/battle_frontier_1.o(.text);
|
||||
asm/new_menu_helpers.o(.text);
|
||||
asm/menu.o(.text);
|
||||
src/menu.o(.text);
|
||||
asm/battle_frontier_2.o(.text);
|
||||
asm/item_menu.o(.text);
|
||||
asm/list_menu.o(.text);
|
||||
@ -520,7 +519,7 @@ SECTIONS {
|
||||
src/battle_dome_cards.o(.rodata);
|
||||
src/lilycove_lady.o(.rodata);
|
||||
data/battle_frontier_1.o(.rodata);
|
||||
data/new_menu_helpers.o(.rodata);
|
||||
src/menu.o(.rodata);
|
||||
data/battle_frontier_2.o(.rodata);
|
||||
data/item_menu.o(.rodata);
|
||||
data/menu_indicators.o(.rodata);
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "strings.h"
|
||||
#include "window.h"
|
||||
#include "text_window.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "menu.h"
|
||||
|
||||
struct BattleBackground
|
||||
{
|
||||
|
@ -2566,17 +2566,17 @@ u8 GetHPBarLevel(s16 hp, s16 maxhp)
|
||||
static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 arg3, u32 *windowId)
|
||||
{
|
||||
u16 winId;
|
||||
struct TextColor color;
|
||||
u8 color[3];
|
||||
struct WindowTemplate winTemplate = sHealthboxWindowTemplate;
|
||||
|
||||
winId = AddWindow(&winTemplate);
|
||||
FillWindowPixelBuffer(winId, (arg3 << 4) | (arg3));
|
||||
|
||||
color.fgColor = arg3;
|
||||
color.bgColor = 1;
|
||||
color.shadowColor = 3;
|
||||
color[0] = arg3;
|
||||
color[1] = 1;
|
||||
color[2] = 3;
|
||||
|
||||
AddTextPrinterParameterized2(winId, 0, x, y, 0, 0, &color, -1, str);
|
||||
AddTextPrinterParameterized2(winId, 0, x, y, 0, 0, color, -1, str);
|
||||
|
||||
*windowId = winId;
|
||||
return (u8*)(GetWindowAttribute(winId, WINDOW_TILE_DATA));
|
||||
|
@ -2440,7 +2440,7 @@ void BattleHandleAddTextPrinter(const u8 *text, u8 arg1)
|
||||
textSubPrinter.letterSpacing = r8[(12 * arg1) + 4];
|
||||
textSubPrinter.lineSpacing = r8[(12 * arg1) + 5];
|
||||
textSubPrinter.fontColor_l = 0;
|
||||
textSubPrinter.fontColor_h = r8[(12 * arg1) + 7];
|
||||
textSubPrinter.fgColor = r8[(12 * arg1) + 7];
|
||||
textSubPrinter.bgColor = r8[(12 * arg1) + 8];
|
||||
textSubPrinter.shadowColor = r8[(12 * arg1) + 9];
|
||||
|
||||
|
@ -6724,7 +6724,7 @@ static void PutLevelAndGenderOnLvlUpBox(void)
|
||||
subPrinter.letterSpacing = 0;
|
||||
subPrinter.lineSpacing = 0;
|
||||
subPrinter.fontColor_l = TEXT_COLOR_TRANSPARENT;
|
||||
subPrinter.fontColor_h = TEXT_COLOR_WHITE;
|
||||
subPrinter.fgColor = TEXT_COLOR_WHITE;
|
||||
subPrinter.bgColor = TEXT_COLOR_TRANSPARENT;
|
||||
subPrinter.shadowColor = TEXT_COLOR_DARK_GREY;
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "event_data.h"
|
||||
#include "main.h"
|
||||
#include "link.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "item_menu_icons.h"
|
||||
#include "berry.h"
|
||||
#include "item.h"
|
||||
@ -3489,7 +3488,7 @@ void ShowBerryBlenderRecordWindow(void)
|
||||
|
||||
winTemplate = sBlenderRecordWindowTemplate;
|
||||
gResultsWindowId = AddWindow(&winTemplate);
|
||||
sub_81973FC(gResultsWindowId, 0);
|
||||
NewMenuHelpers_DrawStdWindowFrame(gResultsWindowId, 0);
|
||||
FillWindowPixelBuffer(gResultsWindowId, 0x11);
|
||||
|
||||
xPos = GetStringCenterAlignXOffset(1, gText_BlenderMaxSpeedRecord, 0x90);
|
||||
@ -3574,35 +3573,35 @@ static bool32 TryAddContestLinkTvShow(struct Pokeblock *pokeblock, struct TvBlen
|
||||
|
||||
static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s32 speed, s32 caseId)
|
||||
{
|
||||
struct TextColor txtColor;
|
||||
u8 txtColor[3];
|
||||
u32 letterSpacing = 0;
|
||||
|
||||
switch (caseId)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
txtColor.fgColor = 1;
|
||||
txtColor.bgColor = 2;
|
||||
txtColor.shadowColor = 3;
|
||||
txtColor[0] = 1;
|
||||
txtColor[1] = 2;
|
||||
txtColor[2] = 3;
|
||||
break;
|
||||
case 1:
|
||||
txtColor.fgColor = 0;
|
||||
txtColor.bgColor = 2;
|
||||
txtColor.shadowColor = 3;
|
||||
txtColor[0] = 0;
|
||||
txtColor[1] = 2;
|
||||
txtColor[2] = 3;
|
||||
break;
|
||||
case 2:
|
||||
txtColor.fgColor = 0;
|
||||
txtColor.bgColor = 4;
|
||||
txtColor.shadowColor = 5;
|
||||
txtColor[0] = 0;
|
||||
txtColor[1] = 4;
|
||||
txtColor[2] = 5;
|
||||
break;
|
||||
}
|
||||
|
||||
if (caseId != 3)
|
||||
{
|
||||
FillWindowPixelBuffer(windowId, txtColor.fgColor | (txtColor.fgColor << 4));
|
||||
FillWindowPixelBuffer(windowId, txtColor[0] | (txtColor[0] << 4));
|
||||
}
|
||||
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, 1, &txtColor, speed, string);
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, 1, txtColor, speed, string);
|
||||
}
|
||||
|
||||
static bool32 Blender_PrintText(s16 *textState, const u8 *string, s32 textSpeed)
|
||||
|
@ -93,7 +93,7 @@ static const struct BgTemplate sBackgroundTemplates[] =
|
||||
|
||||
static const u16 sFontPalette[] = INCBIN_U16("graphics/interface/berry_tag_screen.gbapal");
|
||||
|
||||
static const struct TextColor sTextColors[] =
|
||||
static const u8 sTextColors[2][3] =
|
||||
{
|
||||
{0, 2, 3},
|
||||
{15, 14, 13}
|
||||
@ -343,7 +343,7 @@ static void HandleInitWindows(void)
|
||||
|
||||
static void PrintTextInBerryTagScreen(u8 windowId, const u8 *text, u8 x, u8 y, s32 speed, u8 colorStructId)
|
||||
{
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, 0, 0, &sTextColors[colorStructId], speed, text);
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, 0, 0, sTextColors[colorStructId], speed, text);
|
||||
}
|
||||
|
||||
static void AddBerryTagTextToBg0(void)
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include "window.h"
|
||||
#include "strings.h"
|
||||
#include "string_util.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "menu.h"
|
||||
#include "international_string_util.h"
|
||||
|
||||
|
@ -43,7 +43,7 @@ extern u16 ItemIdToBattleMoveId(u16);
|
||||
extern s32 ListMenuHandleInputGetItemId(u8);
|
||||
extern void sub_81AE6C8(u8, u16*, u16*);
|
||||
extern void sub_819746C(u8, bool8);
|
||||
extern void sub_81973FC(u8, bool8);
|
||||
extern void NewMenuHelpers_DrawStdWindowFrame(u8, bool8);
|
||||
extern void sub_81B9328(void);
|
||||
extern void sub_81AF078(u32, bool8, struct ListMenu *);
|
||||
extern void c2_exit_to_overworld_2_switch(void);
|
||||
@ -1212,7 +1212,7 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y)
|
||||
gTextFlags.flag_1 = 0;
|
||||
printer.letterSpacing = 0;
|
||||
printer.lineSpacing = 1;
|
||||
printer.fontColor_h = 2;
|
||||
printer.fgColor = 2;
|
||||
printer.bgColor = 1;
|
||||
printer.shadowColor = 3;
|
||||
|
||||
@ -1296,7 +1296,7 @@ void ShowDaycareLevelMenu(void)
|
||||
u8 daycareMenuTaskId;
|
||||
|
||||
windowId = AddWindow(&sDaycareLevelMenuWindowTemplate);
|
||||
sub_81973FC(windowId, FALSE);
|
||||
NewMenuHelpers_DrawStdWindowFrame(windowId, FALSE);
|
||||
|
||||
menuTemplate = sDaycareListMenuLevelTemplate;
|
||||
menuTemplate.unk_10 = windowId;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "field_map_obj.h"
|
||||
#include "list_menu.h"
|
||||
#include "menu_helpers.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "menu.h"
|
||||
#include "menu_indicators.h"
|
||||
#include "sound.h"
|
||||
#include "event_scripts.h"
|
||||
@ -727,7 +727,7 @@ void sub_81271CC(u8 taskId)
|
||||
{
|
||||
sub_8126A58(1);
|
||||
sub_8126A88();
|
||||
sub_81973C4(0, 0);
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
sub_8126C08();
|
||||
gTasks[taskId].func = sub_8126B80;
|
||||
}
|
||||
@ -2712,7 +2712,7 @@ void sub_812A334(void)
|
||||
u8 taskId;
|
||||
|
||||
pal_fill_black();
|
||||
sub_81973C4(0, 1);
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 1);
|
||||
sub_8126ABC();
|
||||
taskId = CreateTask(sub_812A2C4, 8);
|
||||
gTasks[taskId].data[2] = 0;
|
||||
|
@ -17,7 +17,7 @@ extern int decompress_and_copy_tile_data_to_vram(u8 bg_id, void *src, int size,
|
||||
extern bool8 free_temp_tile_data_buffers_if_possible(void);
|
||||
extern void sub_80861E8(void); // rom4
|
||||
extern bool16 sub_80C0944(void);
|
||||
extern void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor *color, s8 speed, u8 *str);
|
||||
extern void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 *color, s8 speed, u8 *str);
|
||||
|
||||
extern u16 gUnknown_0860F074[];
|
||||
|
||||
@ -208,12 +208,7 @@ static void InitDiplomaWindow(void)
|
||||
|
||||
static void PrintDiplomaText(u8 *text, u8 var1, u8 var2)
|
||||
{
|
||||
struct TextColor color =
|
||||
{
|
||||
.fgColor = 0,
|
||||
.bgColor = 2,
|
||||
.shadowColor = 3,
|
||||
};
|
||||
u8 color[3] = {0, 2, 3};
|
||||
|
||||
AddTextPrinterParameterized2(0, 1, var1, var2, 0, 0, &color, -1, text);
|
||||
AddTextPrinterParameterized2(0, 1, var1, var2, 0, 0, color, -1, text);
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ s16 RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode)
|
||||
return -1; // no free DMA request was found
|
||||
}
|
||||
|
||||
int CheckForSpaceForDma3Request(s16 index)
|
||||
s16 CheckForSpaceForDma3Request(s16 index)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
|
@ -41,7 +41,7 @@ struct EggHatchData
|
||||
u8 unused_9;
|
||||
u8 unused_A;
|
||||
u16 species;
|
||||
struct TextColor textColor;
|
||||
u8 textColor[3];
|
||||
};
|
||||
|
||||
extern struct SpriteTemplate gUnknown_0202499C;
|
||||
@ -863,10 +863,10 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8
|
||||
static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed)
|
||||
{
|
||||
FillWindowPixelBuffer(windowId, 0xFF);
|
||||
sEggHatchData->textColor.fgColor = 0;
|
||||
sEggHatchData->textColor.bgColor = 5;
|
||||
sEggHatchData->textColor.shadowColor = 6;
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, 0, 0, &sEggHatchData->textColor, speed, string);
|
||||
sEggHatchData->textColor[0] = 0;
|
||||
sEggHatchData->textColor[1] = 5;
|
||||
sEggHatchData->textColor[2] = 6;
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, 0, 0, sEggHatchData->textColor, speed, string);
|
||||
}
|
||||
|
||||
u8 GetEggStepsToSubtract(void)
|
||||
|
@ -1,9 +1,10 @@
|
||||
#include "global.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "menu.h"
|
||||
#include "string.h"
|
||||
#include "string_util.h"
|
||||
#include "task.h"
|
||||
#include "text.h"
|
||||
#include "battle_frontier_1.h"
|
||||
|
||||
EWRAM_DATA u8 gUnknown_020375BC = 0;
|
||||
|
||||
@ -30,7 +31,7 @@ void sub_8098154(u8 taskId)
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
sub_81973C4(0, 1);
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 1);
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 2:
|
||||
@ -143,7 +144,7 @@ bool8 IsFieldMessageBoxHidden(void)
|
||||
void sub_8098358(void)
|
||||
{
|
||||
task_del_textbox();
|
||||
sub_81973FC(0, 1);
|
||||
NewMenuHelpers_DrawStdWindowFrame(0, 1);
|
||||
gUnknown_020375BC = 0;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "random.h"
|
||||
#include "event_data.h"
|
||||
#include "overworld.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "menu.h"
|
||||
|
||||
struct HallofFameMon
|
||||
{
|
||||
@ -81,7 +81,7 @@ extern const u8 gText_MainMenuTime[];
|
||||
extern const u8 gContestConfetti_Gfx[];
|
||||
extern const u8 gContestConfetti_Pal[];
|
||||
|
||||
extern void sub_81973C4(u8, u8);
|
||||
extern void NewMenuHelpers_DrawDialogueFrame(u8, u8);
|
||||
extern void sub_8175620(void);
|
||||
extern u8 TrySavingData(u8);
|
||||
extern u8 sub_818D3E4(u16 species, u32 trainerId, u32 personality, u8 flags, s16 x, s16 y, u8, u16);
|
||||
@ -538,7 +538,7 @@ static void Task_Hof_InitTeamSaveData(u8 taskId)
|
||||
}
|
||||
*lastSavedTeam = *sHofMonPtr;
|
||||
|
||||
sub_81973C4(0, 0);
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_Hof_TrySaveData;
|
||||
@ -745,7 +745,7 @@ static void Task_Hof_WaitAndPrintPlayerInfo(u8 taskId)
|
||||
{
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20);
|
||||
HallOfFame_PrintPlayerInfo(1, 2);
|
||||
sub_81973C4(0, 0);
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_LeagueChamp, 0, NULL, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_Hof_ExitOnKeyPressed;
|
||||
@ -1114,7 +1114,7 @@ static void Task_HofPC_HandleExit(u8 taskId)
|
||||
static void Task_HofPC_PrintDataIsCorrupted(u8 taskId)
|
||||
{
|
||||
sub_8198180(gText_UnkCtrlF800Exit, 8, 1);
|
||||
sub_81973C4(0, 0);
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_HOFCorrupted, 0, NULL, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_HofPC_ExitOnButtonPress;
|
||||
|
2414
src/menu.c
Normal file
2414
src/menu.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,6 @@
|
||||
#include "window.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "text_window.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "decompress.h"
|
||||
|
||||
// this file's functions
|
||||
@ -291,13 +290,13 @@ static void CB2_MysteryEventMenu(void)
|
||||
|
||||
static void PrintMysteryMenuText(u8 windowId, const u8 *text, u8 x, u8 y, s32 speed)
|
||||
{
|
||||
struct TextColor textColor;
|
||||
u8 textColor[3];
|
||||
u8 letterSpacing = 0;
|
||||
u8 lineSpacing = 1;
|
||||
textColor.fgColor = 1;
|
||||
textColor.bgColor = 2;
|
||||
textColor.shadowColor = 3;
|
||||
textColor[0] = 1;
|
||||
textColor[1] = 2;
|
||||
textColor[2] = 3;
|
||||
|
||||
FillWindowPixelBuffer(windowId, (textColor.fgColor) | (textColor.fgColor << 4));
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, lineSpacing, &textColor, speed, text);
|
||||
FillWindowPixelBuffer(windowId, (textColor[0]) | (textColor[0] << 4));
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, lineSpacing, textColor, speed, text);
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "task.h"
|
||||
#include "sprite.h"
|
||||
#include "string_util.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "window.h"
|
||||
#include "bg.h"
|
||||
#include "gpu_regs.h"
|
||||
@ -530,7 +529,7 @@ static void DisplaySentToPCMessage(void)
|
||||
stringToDisplay++;
|
||||
|
||||
StringExpandPlaceholders(gStringVar4, gUnknown_0858BDB8[stringToDisplay]);
|
||||
sub_81973C4(0, 0);
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
gTextFlags.flag_0 = TRUE;
|
||||
AddTextPrinterParameterized(0, 1, gStringVar4, GetPlayerTextSpeed(), 0, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
@ -1496,7 +1495,7 @@ static void TaskDummy3(void)
|
||||
|
||||
}
|
||||
|
||||
static const struct TextColor sGenderColors[2] =
|
||||
static const u8 sGenderColors[2][3] =
|
||||
{
|
||||
{0, 9, 8},
|
||||
{0, 5, 4}
|
||||
@ -1516,7 +1515,7 @@ static void sub_80E49BC(void)
|
||||
StringCopy(genderSymbol, gText_FemaleSymbol);
|
||||
isFemale = TRUE;
|
||||
}
|
||||
box_print(gNamingScreenData->windows[2], 1, 0x68, 1, &sGenderColors[isFemale], -1, genderSymbol);
|
||||
box_print(gNamingScreenData->windows[2], 1, 0x68, 1, sGenderColors[isFemale], -1, genderSymbol);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1661,19 +1660,18 @@ static void sub_80E4D10(void)
|
||||
PutWindowTilemap(gNamingScreenData->windows[2]);
|
||||
}
|
||||
|
||||
static const struct AlignedTextColor sUnkColor1 =
|
||||
struct TextColorThing // needed because of alignment... it's so stupid
|
||||
{
|
||||
13, 1, 2
|
||||
u8 colors[3][4];
|
||||
};
|
||||
|
||||
static const struct AlignedTextColor sUnkColor2 =
|
||||
static const struct TextColorThing sUnkColorStruct =
|
||||
{
|
||||
14, 1, 2
|
||||
};
|
||||
|
||||
static const struct AlignedTextColor sUnkColor3 =
|
||||
{
|
||||
15, 1, 2
|
||||
{
|
||||
{13, 1, 2},
|
||||
{14, 1, 2},
|
||||
{15, 1, 2}
|
||||
}
|
||||
};
|
||||
|
||||
static const u8 sFillValues[3] =
|
||||
@ -1681,11 +1679,11 @@ static const u8 sFillValues[3] =
|
||||
0xEE, 0xDD, 0xFF
|
||||
};
|
||||
|
||||
static const struct AlignedTextColor *const sUnkColors[3] =
|
||||
static const u8 *const sUnkColors[3] =
|
||||
{
|
||||
&sUnkColor2,
|
||||
&sUnkColor1,
|
||||
&sUnkColor3
|
||||
sUnkColorStruct.colors[1],
|
||||
sUnkColorStruct.colors[0],
|
||||
sUnkColorStruct.colors[2]
|
||||
};
|
||||
|
||||
static void sub_80E4DE4(u8 window, u8 a1)
|
||||
@ -1738,7 +1736,7 @@ static void sub_80E4E5C(void)
|
||||
|
||||
static void sub_80E4EF0(void)
|
||||
{
|
||||
const struct TextColor color[] = { 15, 1, 2 };
|
||||
const u8 color[3] = { 15, 1, 2 };
|
||||
|
||||
FillWindowPixelBuffer(gNamingScreenData->windows[4], 0xFF);
|
||||
box_print(gNamingScreenData->windows[4], 0, 2, 1, color, 0, gText_MoveOkBack);
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include "menu.h"
|
||||
#include "task.h"
|
||||
#include "menu_helpers.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "pokemon.h"
|
||||
#include "graphics.h"
|
||||
#include "malloc.h"
|
||||
@ -284,7 +283,7 @@ static const struct SpriteTemplate sSpriteTemplate_PokeblockCase =
|
||||
SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const struct TextColor sTextColorInPokeblockMenu = {0, 2, 3};
|
||||
static const u8 sTextColorInPokeblockMenu[3] = {0, 2, 3};
|
||||
|
||||
static const struct Pokeblock sFavoritePokeblocksTable[] =
|
||||
{
|
||||
@ -583,7 +582,7 @@ static void HandleInitWindows(void)
|
||||
|
||||
static void PrintOnPokeblockWindow(u8 windowId, const u8 *string, s32 x)
|
||||
{
|
||||
AddTextPrinterParameterized2(windowId, 1, x, 1, 0, 0, &sTextColorInPokeblockMenu, 0, string);
|
||||
AddTextPrinterParameterized2(windowId, 1, x, 1, 0, 0, sTextColorInPokeblockMenu, 0, string);
|
||||
}
|
||||
|
||||
static void PutPokeblockInfoText(void)
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "event_data.h"
|
||||
#include "strings.h"
|
||||
#include "string_util.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "party_menu.h"
|
||||
#include "m4a.h"
|
||||
#include "sound.h"
|
||||
|
@ -71,7 +71,7 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_8571730[] =
|
||||
sSpriteAffineAnim_8571720
|
||||
};
|
||||
|
||||
const struct TextColor gUnknown_08571734[] = {4, 0xF, 0xE};
|
||||
const u8 gUnknown_08571734[] = {4, 0xF, 0xE};
|
||||
const u8 gUnknown_08571737[] = _("/30");
|
||||
|
||||
// code
|
||||
|
@ -54,7 +54,7 @@ extern u16 gSummaryScreenWindow_Tilemap[];
|
||||
extern struct ContestMove gContestMoves[];
|
||||
extern struct ContestEffect gContestEffects[];
|
||||
extern struct WindowTemplate gUnknown_0861CC24;
|
||||
extern struct TextColor gUnknown_0861CD2C[];
|
||||
extern u8 gUnknown_0861CD2C[][3];
|
||||
extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1];
|
||||
extern u8 gText_MaleSymbol[];
|
||||
extern u8 gText_FemaleSymbol[];
|
||||
@ -162,7 +162,7 @@ extern struct BattleMove gBattleMoves[];
|
||||
|
||||
extern u32 ChangeBgX(u8 bg, u32 value, u8 op);
|
||||
extern void sub_8199C30(u8 a, u8 b, u8 c, u8 d, u8 e, u8 f);
|
||||
extern void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor* colors, s8 speed, u8 *str);
|
||||
extern void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8* colors, s8 speed, u8 *str);
|
||||
extern s32 GetStringCenterAlignXOffset(u8 fontId, u8 *str, s32 totalWidth);
|
||||
extern s32 GetStringRightAlignXOffset(u8 fontId, u8 *str, s32 totalWidth);
|
||||
extern bool8 sub_81A6BF4();
|
||||
@ -2557,7 +2557,7 @@ void sub_81C2554()
|
||||
|
||||
void sub_81C25A4(u8 a, u8 *b, u8 c, u8 d, u8 e, u8 f)
|
||||
{
|
||||
AddTextPrinterParameterized2(a, 1, c, d, 0, e, &gUnknown_0861CD2C[f], 0, b);
|
||||
AddTextPrinterParameterized2(a, 1, c, d, 0, e, gUnknown_0861CD2C[f], 0, b);
|
||||
}
|
||||
|
||||
void sub_81C25E8()
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "bg.h"
|
||||
#include "window.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "new_menu_helpers.h"
|
||||
|
||||
struct ResetRtcStruct
|
||||
{
|
||||
|
@ -168,12 +168,12 @@ static bool8 WipeSectors(u32);
|
||||
// although this is a general text printer, it's only used in this file.
|
||||
static void SaveFailedScreenTextPrint(u8 *text, u8 var1, u8 var2)
|
||||
{
|
||||
struct TextColor color;
|
||||
u8 color[3];
|
||||
|
||||
color.fgColor = 0;
|
||||
color.bgColor = 15;
|
||||
color.shadowColor = 3;
|
||||
AddTextPrinterParameterized2(gSaveFailedWindowIds[TEXT_WIN_ID], 1, var1 * 8, var2 * 8 + 1, 0, 0, &color, 0, text);
|
||||
color[0] = 0;
|
||||
color[1] = 15;
|
||||
color[2] = 3;
|
||||
AddTextPrinterParameterized2(gSaveFailedWindowIds[TEXT_WIN_ID], 1, var1 * 8, var2 * 8 + 1, 0, 0, color, 0, text);
|
||||
}
|
||||
|
||||
void DoSaveFailedScreen(u8 saveType)
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "menu.h"
|
||||
#include "money.h"
|
||||
#include "mystery_event_script.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "palette.h"
|
||||
#include "party_menu.h"
|
||||
#include "pokemon_3.h"
|
||||
@ -1313,7 +1312,7 @@ bool8 ScrCmd_cmdDB(struct ScriptContext *ctx)
|
||||
if (msg == NULL)
|
||||
msg = (const u8 *)ctx->data[0];
|
||||
sub_81973A4();
|
||||
sub_81973C4(0, 1);
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 1);
|
||||
PrintTextOnWindow(0, 1, msg, 0, 1, 0, 0);
|
||||
return FALSE;
|
||||
}
|
||||
@ -1530,7 +1529,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
|
||||
template2 = template1;
|
||||
gUnknown_03000F30 = AddWindow(&template2);
|
||||
sub_809882C(gUnknown_03000F30, 0x214, 0xE0);
|
||||
sub_81973FC(gUnknown_03000F30, 0);
|
||||
NewMenuHelpers_DrawStdWindowFrame(gUnknown_03000F30, 0);
|
||||
PutWindowTilemap(gUnknown_03000F30);
|
||||
FillWindowPixelBuffer(gUnknown_03000F30, 0x11);
|
||||
PrintTextOnWindow(gUnknown_03000F30, 6, gStringVar4, temp1, temp2, 0xFF, 0x0);
|
||||
@ -1651,7 +1650,7 @@ _0809AEC6:\n\
|
||||
bl sub_809882C\n\
|
||||
ldrb r0, [r5]\n\
|
||||
mov r1, #0\n\
|
||||
bl sub_81973FC\n\
|
||||
bl NewMenuHelpers_DrawStdWindowFrame\n\
|
||||
ldrb r0, [r5]\n\
|
||||
bl PutWindowTilemap\n\
|
||||
ldrb r0, [r5]\n\
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "window.h"
|
||||
#include "menu.h"
|
||||
#include "menu_helpers.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "menu_indicators.h"
|
||||
#include "constants/maps.h"
|
||||
#include "constants/songs.h"
|
||||
|
@ -32,7 +32,7 @@ extern bool32 InUnionRoom(void);
|
||||
extern bool8 InBattlePike(void);
|
||||
extern bool8 InBattlePyramid(void);
|
||||
extern bool8 InMultiBattleRoom(void);
|
||||
extern void sub_81973FC(u8 windowId, u8 a1);
|
||||
extern void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, u8 a1);
|
||||
extern void sub_8198070(u8 windowId, u8 a1);
|
||||
|
||||
// this file's functions
|
||||
@ -236,7 +236,7 @@ void DisplaySafariBallsWindow(void)
|
||||
{
|
||||
sSafariBallsWindowId = AddWindow(&gSafariBallsWindowTemplate);
|
||||
PutWindowTilemap(sSafariBallsWindowId);
|
||||
sub_81973FC(sSafariBallsWindowId, 0);
|
||||
NewMenuHelpers_DrawStdWindowFrame(sSafariBallsWindowId, 0);
|
||||
ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_SafariBallStock);
|
||||
PrintTextOnWindow(sSafariBallsWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL);
|
||||
@ -251,7 +251,7 @@ void DisplayPyramidFloorWindow(void)
|
||||
else
|
||||
sBattlePyramidFloorWindowId = AddWindow(&gPyramidFloorWindowTemplate_2);
|
||||
PutWindowTilemap(sBattlePyramidFloorWindowId);
|
||||
sub_81973FC(sBattlePyramidFloorWindowId, 0);
|
||||
NewMenuHelpers_DrawStdWindowFrame(sBattlePyramidFloorWindowId, 0);
|
||||
StringCopy(gStringVar1, sPyramindFloorNames[gSaveBlock2Ptr->field_CAA[4]]);
|
||||
StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor);
|
||||
PrintTextOnWindow(sBattlePyramidFloorWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL);
|
||||
|
@ -164,7 +164,7 @@ u16 PrintTextOnWindow(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 spee
|
||||
subPrinter.letterSpacing = gFonts[fontId].letterSpacing;
|
||||
subPrinter.lineSpacing = gFonts[fontId].lineSpacing;
|
||||
subPrinter.fontColor_l = gFonts[fontId].fontColor_l;
|
||||
subPrinter.fontColor_h = gFonts[fontId].fontColor_h;
|
||||
subPrinter.fgColor = gFonts[fontId].fgColor;
|
||||
subPrinter.bgColor = gFonts[fontId].bgColor;
|
||||
subPrinter.shadowColor = gFonts[fontId].shadowColor;
|
||||
return AddTextPrinter(&subPrinter, speed, callback);
|
||||
@ -194,7 +194,7 @@ bool16 AddTextPrinter(struct TextSubPrinter *textSubPrinter, u8 speed, void (*ca
|
||||
gTempTextPrinter.minLetterSpacing = 0;
|
||||
gTempTextPrinter.japanese = 0;
|
||||
|
||||
GenerateFontHalfRowLookupTable(textSubPrinter->fontColor_h, textSubPrinter->bgColor, textSubPrinter->shadowColor);
|
||||
GenerateFontHalfRowLookupTable(textSubPrinter->fgColor, textSubPrinter->bgColor, textSubPrinter->shadowColor);
|
||||
if (speed != TEXT_SPEED_FF && speed != 0x0)
|
||||
{
|
||||
--gTempTextPrinter.text_speed;
|
||||
@ -3518,7 +3518,7 @@ u8 GetFontAttribute(u8 fontId, u8 attributeId)
|
||||
result = gFontInfos[fontId].fontColor_l;
|
||||
break;
|
||||
case 5:
|
||||
result = gFontInfos[fontId].fontColor_h;
|
||||
result = gFontInfos[fontId].fgColor;
|
||||
break;
|
||||
case 6:
|
||||
result = gFontInfos[fontId].bgColor;
|
||||
|
@ -57,24 +57,24 @@ u16 Font6Func(struct TextPrinter *textPrinter)
|
||||
switch (char_)
|
||||
{
|
||||
case 1:
|
||||
textPrinter->subPrinter.fontColor_h = *textPrinter->subPrinter.current_text_offset ++;
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
textPrinter->subPrinter.fgColor = *textPrinter->subPrinter.current_text_offset ++;
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fgColor, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
return 2;
|
||||
case 2:
|
||||
textPrinter->subPrinter.bgColor = *textPrinter->subPrinter.current_text_offset ++;
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fgColor, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
return 2;
|
||||
case 3:
|
||||
textPrinter->subPrinter.shadowColor = *textPrinter->subPrinter.current_text_offset ++;
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fgColor, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
return 2;
|
||||
case 4:
|
||||
textPrinter->subPrinter.fontColor_h = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.fgColor = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.bgColor = *++ textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.shadowColor = *++ textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset ++;
|
||||
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fgColor, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
return 2;
|
||||
case 5:
|
||||
textPrinter->subPrinter.current_text_offset ++;
|
||||
|
@ -403,7 +403,7 @@ void PutWindowRectTilemap(u8 windowId, u8 x, u8 y, u8 width, u8 height)
|
||||
}
|
||||
}
|
||||
|
||||
void BlitBitmapToWindow(u8 windowId, u8 *pixels, u16 x, u16 y, u16 width, u16 height)
|
||||
void BlitBitmapToWindow(u8 windowId, const u8 *pixels, u16 x, u16 y, u16 width, u16 height)
|
||||
{
|
||||
BlitBitmapRectToWindow(windowId, pixels, 0, 0, width, height, x, y, width, height);
|
||||
}
|
||||
|
@ -1287,36 +1287,9 @@ gUnknown_0203CD80: @ 203CD80
|
||||
gUnknown_0203CD88: @ 203CD88
|
||||
.space 0x4
|
||||
|
||||
gUnknown_0203CD8C: @ 203CD8C
|
||||
.space 0x1
|
||||
|
||||
gUnknown_0203CD8D: @ 203CD8D
|
||||
.space 0x3
|
||||
|
||||
gUnknown_0203CD90: @ 203CD90
|
||||
.space 0xC
|
||||
|
||||
gUnknown_0203CD9C: @ 203CD9C
|
||||
.space 0x2
|
||||
|
||||
gUnknown_0203CD9E: @ 203CD9E
|
||||
.space 0x1
|
||||
|
||||
gUnknown_0203CD9F: @ 203CD9F
|
||||
.space 0x1
|
||||
|
||||
gUnknown_0203CDA0: @ 203CDA0
|
||||
.space 0x4
|
||||
|
||||
gUnknown_0203CDA4: @ 203CDA4
|
||||
.space 0x4
|
||||
|
||||
gUnknown_0203CDA8: @ 203CDA8
|
||||
.space 0x4
|
||||
|
||||
gUnknown_0203CDAC: @ 203CDAC
|
||||
.space 0x80
|
||||
.include "src/menu.o"
|
||||
|
||||
.align 2
|
||||
gUnknown_0203CE2C: @ 203CE2C
|
||||
.space 0x4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user