mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Document list_menu.c and main_menu.c
This commit is contained in:
parent
abc1905cab
commit
731d6d59bc
@ -5988,7 +5988,7 @@ sub_811D0BC: @ 811D0BC
|
||||
movs r0, 0x1
|
||||
movs r1, 0x1
|
||||
movs r2, 0xE0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
movs r0, 0x1
|
||||
movs r1, 0x1
|
||||
movs r2, 0xE
|
||||
|
@ -912,7 +912,7 @@ _0813839C:
|
||||
adds r0, r5, 0
|
||||
adds r2, r4, 0
|
||||
mov r3, r12
|
||||
bl SpawnSpecialEventObjectParametrized
|
||||
bl SpawnSpecialEventObjectParameterized
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
adds r2, r6, 0
|
||||
@ -2557,7 +2557,7 @@ SpawnScriptEventObject: @ 8139158
|
||||
movs r0, 0x7
|
||||
movs r1, 0x8
|
||||
movs r2, 0x7F
|
||||
bl SpawnSpecialEventObjectParametrized
|
||||
bl SpawnSpecialEventObjectParameterized
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r2, =gEventObjects
|
||||
|
@ -1270,7 +1270,7 @@ _081611D4:
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0xFF
|
||||
bne _08161210
|
||||
ldr r0, =gUnknown_0203CE8C
|
||||
ldr r0, =gTempScrollArrowTemplate
|
||||
adds r2, r0, 0
|
||||
ldr r1, =gUnknown_085CEBD0
|
||||
ldm r1!, {r3,r5,r6}
|
||||
|
@ -856,7 +856,7 @@ sub_8011AFC: @ 8011AFC
|
||||
bl ResetPaletteFade
|
||||
ldr r0, =sub_8011AE8
|
||||
bl SetVBlankCallback
|
||||
bl sub_80093CC
|
||||
bl IsWirelessAdapterConnected
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08011B70
|
||||
|
@ -4396,7 +4396,7 @@ _081B23E8:
|
||||
movs r0, 0
|
||||
movs r1, 0x4F
|
||||
movs r2, 0xD0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
bl GetOverworldTextboxPalettePtr
|
||||
movs r1, 0xE0
|
||||
movs r2, 0x20
|
||||
|
@ -1837,7 +1837,7 @@ _080C805E:
|
||||
movs r0, 0x1
|
||||
movs r1, 0xB
|
||||
movs r2, 0xE0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
b _080C8198
|
||||
.pool
|
||||
_080C808C:
|
||||
@ -6712,7 +6712,7 @@ sub_80CAC1C: @ 80CAC1C
|
||||
movs r0, 0x1
|
||||
movs r1, 0x2
|
||||
movs r2, 0xD0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
movs r0, 0x20
|
||||
str r0, [sp]
|
||||
movs r0, 0x14
|
||||
|
@ -2869,7 +2869,7 @@ sub_81C5674: @ 81C5674
|
||||
movs r1, 0xAC
|
||||
movs r2, 0xC
|
||||
movs r3, 0x94
|
||||
bl AddScrollIndicatorArrowPairParametrized
|
||||
bl AddScrollIndicatorArrowPairParameterized
|
||||
ldr r1, [r4]
|
||||
ldr r2, =0x00000816
|
||||
adds r1, r2
|
||||
@ -4868,7 +4868,7 @@ sub_81C67CC: @ 81C67CC
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x10
|
||||
movs r2, 0x1
|
||||
bl sub_81AF15C
|
||||
bl ListMenuSetUnkIndicatorsStructField
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r3, [r0]
|
||||
movs r0, 0x2
|
||||
@ -5293,7 +5293,7 @@ sub_81C6BD8: @ 81C6BD8
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
movs r2, 0xE0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
movs r0, 0
|
||||
movs r1, 0xA
|
||||
movs r2, 0xD0
|
||||
|
@ -10101,7 +10101,7 @@ sub_81CC09C: @ 81CC09C
|
||||
ldrb r0, [r4, 0x14]
|
||||
movs r1, 0x1
|
||||
movs r2, 0x40
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
ldrb r0, [r4, 0x14]
|
||||
movs r1, 0x1
|
||||
movs r2, 0x4
|
||||
@ -21001,7 +21001,7 @@ sub_81D1E90: @ 81D1E90
|
||||
movs r1, 0xC8
|
||||
movs r2, 0xC
|
||||
movs r3, 0x94
|
||||
bl AddScrollIndicatorArrowPairParametrized
|
||||
bl AddScrollIndicatorArrowPairParameterized
|
||||
strb r0, [r4, 0x9]
|
||||
add sp, 0x10
|
||||
pop {r4}
|
||||
@ -22282,7 +22282,7 @@ sub_81D2824: @ 81D2824
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
movs r2, 0xE0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
ldr r0, =gUnknown_0860F074
|
||||
movs r1, 0xF0
|
||||
movs r2, 0x20
|
||||
|
@ -679,7 +679,7 @@ _08012B3C:
|
||||
bl sub_8013398
|
||||
strb r0, [r6, 0x13]
|
||||
ldrb r0, [r6, 0x12]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
b _08012E5C
|
||||
.pool
|
||||
_08012B54:
|
||||
@ -837,7 +837,7 @@ _08012C5C:
|
||||
movs r0, 0
|
||||
strb r0, [r1, 0x1B]
|
||||
ldrb r0, [r6, 0x12]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
ldrb r0, [r6, 0x13]
|
||||
adds r0, 0x1
|
||||
strb r0, [r6, 0x13]
|
||||
@ -908,7 +908,7 @@ _08012D04:
|
||||
ldr r0, [r6]
|
||||
bl sub_8013398
|
||||
ldrb r0, [r6, 0x12]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
_08012D40:
|
||||
movs r0, 0x4
|
||||
strb r0, [r6, 0xC]
|
||||
@ -1459,7 +1459,7 @@ _08013228:
|
||||
movs r0, 0x2
|
||||
bl PlaySE
|
||||
ldrb r0, [r4, 0x12]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
ldr r0, =gStringVar2
|
||||
ldrb r2, [r4, 0x13]
|
||||
lsls r2, 5
|
||||
@ -1478,7 +1478,7 @@ _0801325C:
|
||||
movs r1, 0
|
||||
bl sub_8011A64
|
||||
ldrb r0, [r4, 0x12]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
strb r5, [r4, 0xC]
|
||||
movs r0, 0x1
|
||||
b _08013272
|
||||
@ -2373,7 +2373,7 @@ _08013A70:
|
||||
strb r0, [r6, 0x8]
|
||||
_08013A72:
|
||||
ldrb r0, [r6, 0xE]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
b _08013B82
|
||||
_08013A7A:
|
||||
bl sub_8011A74
|
||||
@ -2542,7 +2542,7 @@ sub_8013BD8: @ 8013BD8
|
||||
movs r1, 0
|
||||
bl CreateWirelessStatusIndicatorSprite
|
||||
ldrb r0, [r4, 0xE]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
ldr r0, =gStringVar1
|
||||
ldrb r2, [r4, 0xF]
|
||||
lsls r2, 5
|
||||
@ -4281,7 +4281,7 @@ _08014C34:
|
||||
bl sub_8013398
|
||||
strb r0, [r5, 0x13]
|
||||
ldrb r0, [r5, 0x12]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
_08014C42:
|
||||
movs r0, 0x2
|
||||
strb r0, [r5, 0xC]
|
||||
@ -4326,7 +4326,7 @@ _08014C82:
|
||||
adds r1, r0
|
||||
strb r4, [r1, 0x1B]
|
||||
ldrb r0, [r5, 0x12]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
movs r0, 0x5
|
||||
strb r0, [r5, 0x19]
|
||||
ldrb r1, [r5, 0x13]
|
||||
@ -4396,7 +4396,7 @@ _08014CF2:
|
||||
movs r0, 0
|
||||
strb r0, [r1, 0x1B]
|
||||
ldrb r0, [r5, 0x12]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
ldrb r0, [r5, 0x13]
|
||||
adds r0, 0x1
|
||||
strb r0, [r5, 0x13]
|
||||
@ -4441,7 +4441,7 @@ _08014D64:
|
||||
ldr r0, [r5]
|
||||
bl sub_8013398
|
||||
ldrb r0, [r5, 0x12]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
movs r0, 0x2
|
||||
strb r0, [r5, 0xC]
|
||||
_08014DA4:
|
||||
@ -4784,7 +4784,7 @@ _080150B8:
|
||||
bl PlaySE
|
||||
_080150CE:
|
||||
ldrb r0, [r7, 0xE]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
b _080152A0
|
||||
_080150D6:
|
||||
ldrb r0, [r7, 0xE]
|
||||
@ -4818,7 +4818,7 @@ _080150D6:
|
||||
movs r1, 0
|
||||
bl CreateWirelessStatusIndicatorSprite
|
||||
ldrb r0, [r7, 0xE]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
ldr r0, =gStringVar1
|
||||
ldrb r2, [r7, 0xF]
|
||||
lsls r2, 5
|
||||
@ -5152,7 +5152,7 @@ _08015436:
|
||||
b _08015604
|
||||
_0801543E:
|
||||
ldrb r0, [r5, 0xE]
|
||||
bl sub_81AE70C
|
||||
bl RedrawListMenu
|
||||
b _08015604
|
||||
_08015446:
|
||||
ldrb r0, [r5, 0x13]
|
||||
@ -10972,7 +10972,7 @@ _08018574:
|
||||
movs r0, 0
|
||||
movs r1, 0xA
|
||||
movs r2, 0xE0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
movs r2, 0xF0
|
||||
@ -15907,7 +15907,7 @@ _0801AD8C:
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
movs r2, 0xD0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
movs r2, 0xD0
|
||||
@ -27081,7 +27081,7 @@ sub_8020740: @ 8020740
|
||||
movs r0, 0x3
|
||||
movs r1, 0x1
|
||||
movs r2, 0xD0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
movs r0, 0x3
|
||||
movs r1, 0xA
|
||||
movs r2, 0x20
|
||||
|
@ -877,7 +877,7 @@ BuyMenuAddScrollIndicatorArrows: @ 80E01C8
|
||||
movs r1, 0xAC
|
||||
movs r2, 0xC
|
||||
movs r3, 0x94
|
||||
bl AddScrollIndicatorArrowPairParametrized
|
||||
bl AddScrollIndicatorArrowPairParameterized
|
||||
ldr r1, [r5]
|
||||
adds r1, r4
|
||||
strb r0, [r1]
|
||||
@ -1157,7 +1157,7 @@ BuyMenuInitWindows: @ 80E0468
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
movs r2, 0xD0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
movs r0, 0
|
||||
movs r1, 0xA
|
||||
movs r2, 0xE0
|
||||
|
@ -639,7 +639,7 @@ sub_812AA48: @ 812AA48
|
||||
lsls r1, 2
|
||||
movs r0, 0
|
||||
movs r2, 0xE0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
movs r0, 0
|
||||
bl PutWindowTilemap
|
||||
pop {r0}
|
||||
|
@ -245,7 +245,7 @@ _08077310:
|
||||
movs r0, 0x2
|
||||
movs r1, 0x1
|
||||
movs r2, 0xE0
|
||||
bl sub_809882C
|
||||
bl LoadUserWindowBorderGfx
|
||||
bl LoadMonIconPalettes
|
||||
ldr r2, =gUnknown_0203229C
|
||||
ldr r0, [r2]
|
||||
|
@ -1,2 +1,2 @@
|
||||
gUnknown_03006300
|
||||
gListMenuOverride
|
||||
gMultiuseListMenuTemplate
|
||||
|
@ -551,7 +551,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EE68:: @ 823EE68
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
|
||||
incrementgamestat 30
|
||||
specialvar VAR_RESULT, sub_80093CC
|
||||
specialvar VAR_RESULT, IsWirelessAdapterConnected
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F3E8
|
||||
goto BattleFrontier_BattleTowerLobby_EventScript_23F2C5
|
||||
|
@ -649,7 +649,7 @@ LilycoveCity_ContestLobby_EventScript_21A856:: @ 821A856
|
||||
goto_eq LilycoveCity_ContestLobby_EventScript_21A97F
|
||||
message LilycoveCity_ContestLobby_Text_27C8FD
|
||||
waitmessage
|
||||
specialvar VAR_TEMP_D, sub_80093CC
|
||||
specialvar VAR_TEMP_D, IsWirelessAdapterConnected
|
||||
multichoice 0, 0, 85, 0
|
||||
switch VAR_RESULT
|
||||
case 0, LilycoveCity_ContestLobby_EventScript_21A8BB
|
||||
|
@ -1315,7 +1315,7 @@ gUnknown_082F0184:: @ 82F0184
|
||||
.align 2
|
||||
gUnknown_082F0204:: @ 82F0204 struct ListMenuTemplate
|
||||
.4byte gUnknown_082F0184
|
||||
.4byte sub_81AF078
|
||||
.4byte ListMenuDefaultCursorMoveFunc
|
||||
.4byte sub_8013DF4
|
||||
.byte 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00
|
||||
.byte 0x21, 0x31, 0x40, 0x01
|
||||
@ -1351,7 +1351,7 @@ gUnknown_082F0264:: @ 82F0264
|
||||
.align 2
|
||||
gUnknown_082F027C:: @ 82F027C
|
||||
.4byte gUnknown_082F0264
|
||||
.4byte sub_81AF078
|
||||
.4byte ListMenuDefaultCursorMoveFunc
|
||||
.4byte NULL
|
||||
.byte 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00
|
||||
.byte 0x21, 0x31, 0x00, 0x01
|
||||
@ -1384,7 +1384,7 @@ gUnknown_082F029C:: @ 82F029C
|
||||
.align 2
|
||||
gUnknown_082F032C:: @ 82F032C
|
||||
.4byte gUnknown_082F029C
|
||||
.4byte sub_81AF078
|
||||
.4byte ListMenuDefaultCursorMoveFunc
|
||||
.4byte NULL
|
||||
.byte 0x12, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00
|
||||
.byte 0x21, 0x31, 0x00, 0x01
|
||||
@ -1413,7 +1413,7 @@ gUnknown_082F0354:: @ 82F0354
|
||||
.align 2
|
||||
gUnknown_082F03A4:: @ 82F03A4
|
||||
.4byte gUnknown_082F0354
|
||||
.4byte sub_81AF078
|
||||
.4byte ListMenuDefaultCursorMoveFunc
|
||||
.4byte sub_8017BE8
|
||||
.byte 0x0a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00
|
||||
.byte 0xe1, 0xdf, 0x00, 0x01
|
||||
@ -1442,7 +1442,7 @@ gUnknown_082F03C4:: @ 82F03C4
|
||||
|
||||
.align 2
|
||||
.4byte gUnknown_082F03C4
|
||||
.4byte sub_81AF078
|
||||
.4byte ListMenuDefaultCursorMoveFunc
|
||||
.4byte nullsub_14
|
||||
.byte 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00
|
||||
.byte 0x21, 0x31, 0x40, 0x01
|
||||
@ -1637,7 +1637,7 @@ gUnknown_082F0620:: @ 82F0620
|
||||
.align 2
|
||||
gUnknown_082F0638:: @ 82F0638 struct ListMenuTemplate
|
||||
.4byte NULL
|
||||
.4byte sub_81AF078
|
||||
.4byte ListMenuDefaultCursorMoveFunc
|
||||
.4byte NULL
|
||||
.byte 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00
|
||||
.byte 0x21, 0x31, 0x00, 0x01
|
||||
@ -1669,7 +1669,7 @@ gUnknown_082F06A0:: @ 82F06A0
|
||||
.align 2
|
||||
gUnknown_082F06B0:: @ 82F06B0 struct ListMenuTemplate
|
||||
.4byte gUnknown_082F0650
|
||||
.4byte sub_81AF078
|
||||
.4byte ListMenuDefaultCursorMoveFunc
|
||||
.4byte NULL
|
||||
.byte 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00
|
||||
.byte 0x21, 0x31, 0x00, 0x01
|
||||
@ -1677,7 +1677,7 @@ gUnknown_082F06B0:: @ 82F06B0 struct ListMenuTemplate
|
||||
.align 2
|
||||
gUnknown_082F06C8:: @ 82F06C8
|
||||
.4byte gUnknown_082F0670
|
||||
.4byte sub_81AF078
|
||||
.4byte ListMenuDefaultCursorMoveFunc
|
||||
.4byte NULL
|
||||
.byte 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00
|
||||
.byte 0x21, 0x31, 0x00, 0x01
|
||||
@ -1685,7 +1685,7 @@ gUnknown_082F06C8:: @ 82F06C8
|
||||
.align 2
|
||||
gUnknown_082F06E0:: @ 82F06E0
|
||||
.4byte gUnknown_082F0688
|
||||
.4byte sub_81AF078
|
||||
.4byte ListMenuDefaultCursorMoveFunc
|
||||
.4byte NULL
|
||||
.byte 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00
|
||||
.byte 0x21, 0x31, 0x00, 0x01
|
||||
@ -1693,7 +1693,7 @@ gUnknown_082F06E0:: @ 82F06E0
|
||||
.align 2
|
||||
gUnknown_082F06F8:: @ 82F06F8
|
||||
.4byte gUnknown_082F06A0
|
||||
.4byte sub_81AF078
|
||||
.4byte ListMenuDefaultCursorMoveFunc
|
||||
.4byte NULL
|
||||
.byte 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00
|
||||
.byte 0x21, 0x31, 0x00, 0x01
|
||||
|
@ -999,7 +999,7 @@ OldaleTown_PokemonCenter_2F_EventScript_27751B:: @ 827751B
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq OldaleTown_PokemonCenter_2F_EventScript_27731B
|
||||
copyvar VAR_0x8007, VAR_LAST_TALKED
|
||||
specialvar VAR_RESULT, sub_80093CC
|
||||
specialvar VAR_RESULT, IsWirelessAdapterConnected
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq OldaleTown_PokemonCenter_2F_EventScript_277668
|
||||
message OldaleTown_PokemonCenter_2F_Text_27940D
|
||||
@ -1108,7 +1108,7 @@ OldaleTown_PokemonCenter_2F_EventScript_2776A4:: @ 82776A4
|
||||
specialvar VAR_RESULT, sub_813990C
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq OldaleTown_PokemonCenter_2F_EventScript_27731B
|
||||
specialvar VAR_RESULT, sub_80093CC
|
||||
specialvar VAR_RESULT, IsWirelessAdapterConnected
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq OldaleTown_PokemonCenter_2F_EventScript_276E13
|
||||
message OldaleTown_PokemonCenter_2F_Text_279013
|
||||
@ -1396,7 +1396,7 @@ OldaleTown_PokemonCenter_2F_EventScript_277B8A:: @ 8277B8A
|
||||
lockall
|
||||
checkflag FLAG_SYS_POKEDEX_GET
|
||||
goto_if 0, OldaleTown_PokemonCenter_2F_EventScript_27733F
|
||||
specialvar VAR_RESULT, sub_80093CC
|
||||
specialvar VAR_RESULT, IsWirelessAdapterConnected
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq EventScript_277BB4
|
||||
fadescreen 1
|
||||
@ -1495,7 +1495,7 @@ MossdeepCity_GameCorner_1F_EventScript_277C91:: @ 8277C91
|
||||
faceplayer
|
||||
message MossdeepCity_GameCorner_1F_Text_278CEB
|
||||
waitmessage
|
||||
specialvar VAR_RESULT, sub_80093CC
|
||||
specialvar VAR_RESULT, IsWirelessAdapterConnected
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MossdeepCity_GameCorner_1F_EventScript_277E48
|
||||
delay 60
|
||||
|
@ -594,7 +594,7 @@ LilycoveCity_ContestLobby_EventScript_2940BB:: @ 82940BB
|
||||
call LilycoveCity_ContestLobby_EventScript_27134F
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq LilycoveCity_ContestLobby_EventScript_294160
|
||||
specialvar VAR_RESULT, sub_80093CC
|
||||
specialvar VAR_RESULT, IsWirelessAdapterConnected
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq LilycoveCity_ContestLobby_EventScript_2941ED
|
||||
message LilycoveCity_ContestLobby_Text_293955
|
||||
|
@ -423,7 +423,7 @@ gSpecials:: @ 81DBA64
|
||||
def_special sub_81BE79C
|
||||
def_special sub_81BE7F4
|
||||
def_special sub_81398C0
|
||||
def_special sub_80093CC
|
||||
def_special IsWirelessAdapterConnected
|
||||
def_special BerryBlenderLinkBecomeLeader
|
||||
def_special BerryBlenderLinkJoinGroup
|
||||
def_special UnionRoomSpecial
|
||||
|
@ -351,7 +351,7 @@ void TrySpawnEventObjects(s16, s16);
|
||||
u8 sprite_new(u8, u8, s16, s16, u8, u8);
|
||||
u8 AddPseudoEventObject(u16, void (*)(struct Sprite *), s16, s16, u8);
|
||||
u8 show_sprite(u8, u8, u8);
|
||||
u8 SpawnSpecialEventObjectParametrized(u8, u8, u8, s16, s16, u8);
|
||||
u8 SpawnSpecialEventObjectParameterized(u8, u8, u8, s16, s16, u8);
|
||||
u8 SpawnSpecialEventObject(struct EventObjectTemplate *);
|
||||
void sub_8093038(s16, s16, s16 *, s16 *);
|
||||
void CameraObjectReset1(void);
|
||||
|
@ -545,6 +545,35 @@
|
||||
#define BGCNT_AFF512x512 0x8000
|
||||
#define BGCNT_AFF1024x1024 0xC000
|
||||
|
||||
// WININ/OUT
|
||||
#define WININ_WIN0_BG0 (1 << 0)
|
||||
#define WININ_WIN0_BG1 (1 << 1)
|
||||
#define WININ_WIN0_BG2 (1 << 2)
|
||||
#define WININ_WIN0_BG3 (1 << 3)
|
||||
#define WININ_WIN0_OBJ (1 << 4)
|
||||
#define WININ_WIN0_CLR (1 << 5)
|
||||
#define WININ_WIN1_BG0 (1 << 8)
|
||||
#define WININ_WIN1_BG1 (1 << 9)
|
||||
#define WININ_WIN1_BG2 (1 << 10)
|
||||
#define WININ_WIN1_BG3 (1 << 11)
|
||||
#define WININ_WIN1_OBJ (1 << 12)
|
||||
#define WININ_WIN1_CLR (1 << 13)
|
||||
|
||||
#define WINOUT_WIN01_BG0 (1 << 0)
|
||||
#define WINOUT_WIN01_BG1 (1 << 1)
|
||||
#define WINOUT_WIN01_BG2 (1 << 2)
|
||||
#define WINOUT_WIN01_BG3 (1 << 3)
|
||||
#define WINOUT_WIN01_OBJ (1 << 4)
|
||||
#define WINOUT_WIN01_CLR (1 << 5)
|
||||
#define WINOUT_WINOBJ_BG0 (1 << 8)
|
||||
#define WINOUT_WINOBJ_BG1 (1 << 9)
|
||||
#define WINOUT_WINOBJ_BG2 (1 << 10)
|
||||
#define WINOUT_WINOBJ_BG3 (1 << 11)
|
||||
#define WINOUT_WINOBJ_OBJ (1 << 12)
|
||||
#define WINOUT_WINOBJ_CLR (1 << 13)
|
||||
|
||||
#define WINHV_COORDS(m, n) (((m) << 8) | (n))
|
||||
|
||||
// BLDCNT
|
||||
// Bits 0-5 select layers for the 1st target
|
||||
#define BLDCNT_TGT1_BG0 (1 << 0)
|
||||
|
@ -201,7 +201,7 @@ extern u32 gLinkStatus;
|
||||
|
||||
void c2_mystery_gift(void);
|
||||
void sub_801867C(void);
|
||||
bool8 sub_80093CC(void);
|
||||
bool8 IsWirelessAdapterConnected(void);
|
||||
void Task_DestroySelf(u8 taskId);
|
||||
void OpenLink(void);
|
||||
void CloseLink(void);
|
||||
|
@ -3,11 +3,19 @@
|
||||
|
||||
#define LIST_NOTHING_CHOSEN -1
|
||||
#define LIST_B_PRESSED -2
|
||||
#define LIST_HEADER -3
|
||||
|
||||
#define LIST_NO_MULTIPLE_SCROLL 0
|
||||
#define LIST_MULTIPLE_SCROLL_DPAD 1
|
||||
#define LIST_MULTIPLE_SCROLL_L_R 2
|
||||
|
||||
enum {
|
||||
SCROLL_ARROW_LEFT,
|
||||
SCROLL_ARROW_RIGHT,
|
||||
SCROLL_ARROW_UP,
|
||||
SCROLL_ARROW_DOWN
|
||||
};
|
||||
|
||||
struct ListMenu;
|
||||
|
||||
struct ListMenuItem
|
||||
@ -19,20 +27,20 @@ struct ListMenuItem
|
||||
struct ListMenuTemplate
|
||||
{
|
||||
const struct ListMenuItem *items;
|
||||
void (* moveCursorFunc)(s32, bool8, struct ListMenu *);
|
||||
void (* unk_08)(u8 windowId, s32 itemId, u8 y);
|
||||
void (* moveCursorFunc)(s32 itemIndex, bool8 onInit, struct ListMenu *list);
|
||||
void (* itemPrintFunc)(u8 windowId, s32 itemId, u8 y);
|
||||
u16 totalItems;
|
||||
u16 maxShowed;
|
||||
u8 windowId;
|
||||
u8 unk_11;
|
||||
u8 unk_12;
|
||||
u8 header_X;
|
||||
u8 item_X;
|
||||
u8 cursor_X;
|
||||
u8 upText_Y:4; // x1, x2, x4, x8 = xF
|
||||
u8 cursorPal:4; // x10, x20, x40, x80 = xF0
|
||||
u8 fillValue:4; // x1, x2, x4, x8 = xF
|
||||
u8 cursorShadowPal:4; // x10, x20, x40, x80 = xF0
|
||||
u8 lettersSpacing:3;
|
||||
u8 unk_16_3:3;
|
||||
u8 itemVerticalPadding:3;
|
||||
u8 scrollMultiple:2; // x40, x80 = xC0
|
||||
u8 fontId:6; // x1, x2, x4, x8, x10, x20 = x3F
|
||||
u8 cursorKind:2; // x40, x80
|
||||
@ -45,11 +53,11 @@ struct ListMenu
|
||||
u16 selectedRow;
|
||||
u8 unk_1C;
|
||||
u8 unk_1D;
|
||||
u8 unk_1E;
|
||||
u8 taskId;
|
||||
u8 unk_1F;
|
||||
};
|
||||
|
||||
struct UnknownListMenuWindowStruct
|
||||
struct ListMenuWindowRect
|
||||
{
|
||||
u8 x;
|
||||
u8 y;
|
||||
@ -58,16 +66,16 @@ struct UnknownListMenuWindowStruct
|
||||
u8 palNum;
|
||||
};
|
||||
|
||||
struct ArrowStruct
|
||||
struct ScrollArrowsTemplate
|
||||
{
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
u8 unk2;
|
||||
u8 unk3;
|
||||
u8 unk4;
|
||||
u8 unk5;
|
||||
u16 unk6;
|
||||
u16 unk8;
|
||||
u8 firstArrowType;
|
||||
u8 firstX;
|
||||
u8 firstY;
|
||||
u8 secondArrowType;
|
||||
u8 secondX;
|
||||
u8 secondY;
|
||||
u16 fullyUpThreshold;
|
||||
u16 fullyDownThreshold;
|
||||
u16 tileTag;
|
||||
u16 palTag;
|
||||
u8 palNum;
|
||||
@ -75,36 +83,36 @@ struct ArrowStruct
|
||||
|
||||
struct CursorStruct
|
||||
{
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
u16 unk2;
|
||||
u16 unk4;
|
||||
u8 left;
|
||||
u8 top;
|
||||
u16 rowWidth;
|
||||
u16 rowHeight;
|
||||
u16 tileTag;
|
||||
u16 palTag;
|
||||
u8 palNum;
|
||||
};
|
||||
|
||||
extern struct ArrowStruct gUnknown_0203CE8C;
|
||||
extern struct ScrollArrowsTemplate gTempScrollArrowTemplate;
|
||||
extern struct ListMenuTemplate gMultiuseListMenuTemplate;
|
||||
|
||||
s32 DoMysteryGiftListMenu(struct WindowTemplate *windowTemplate, struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum);
|
||||
u8 ListMenuInit(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow);
|
||||
u8 ListMenuInitWithWindows(struct ListMenuTemplate *listMenuTemplate, struct UnknownListMenuWindowStruct *arg1, u16 scrollOffset, u16 selectedRow);
|
||||
u8 ListMenuInitInRect(struct ListMenuTemplate *listMenuTemplate, struct ListMenuWindowRect *arg1, u16 scrollOffset, u16 selectedRow);
|
||||
s32 ListMenuHandleInputGetItemId(u8 listTaskId);
|
||||
void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow);
|
||||
void sub_81AE70C(u8 listTaskId);
|
||||
void RedrawListMenu(u8 listTaskId);
|
||||
void ChangeListMenuPals(u8 listTaskId, u8 cursorPal, u8 fillValue, u8 cursorShadowPal);
|
||||
void ChangeListMenuCoords(u8 listTaskId, u8 x, u8 y);
|
||||
s32 ListMenuTestInput(struct ListMenuTemplate *template, u32 scrollOffset, u32 selectedRow, u16 keys, u16 *newScrollOffset, u16 *newSelectedRow);
|
||||
void ListMenuGetCurrentItemArrayId(u8 listTaskId, u16 *arrayId);
|
||||
void ListMenuGetScrollAndRow(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow);
|
||||
u16 ListMenuGetYCoordForPrintingArrowCursor(u8 listTaskId);
|
||||
void sub_81AF028(u8 cursorPal, u8 fillValue, u8 cursorShadowPal);
|
||||
void sub_81AF078(s32 arg0, u8 arg1, struct ListMenu *list);
|
||||
s32 sub_81AF08C(u8 taskId, u8 field);
|
||||
void sub_81AF15C(u8 taskId, u8 field, s32 value);
|
||||
u8 AddScrollIndicatorArrowPair(const struct ArrowStruct *arrowInfo, u16 *arg1);
|
||||
u8 AddScrollIndicatorArrowPairParametrized(u32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 tileTag, s32 palTag, void *arg7);
|
||||
void ListMenuOverrideSetColors(u8 cursorPal, u8 fillValue, u8 cursorShadowPal);
|
||||
void ListMenuDefaultCursorMoveFunc(s32 arg0, u8 arg1, struct ListMenu *list);
|
||||
s32 ListMenuGetUnkIndicatorsStructFields(u8 taskId, u8 field);
|
||||
void ListMenuSetUnkIndicatorsStructField(u8 taskId, u8 field, s32 value);
|
||||
u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate *arrowInfo, u16 *arg1);
|
||||
u8 AddScrollIndicatorArrowPairParameterized(u32 arrowType, s32 commonPos, s32 firstPos, s32 secondPos, s32 fullyDownThreshold, s32 tileTag, s32 palTag, u16 *currItemPtr);
|
||||
void RemoveScrollIndicatorArrowPair(u8 taskId);
|
||||
void Task_ScrollIndicatorArrowPairOnMainMenu(u8 taskId);
|
||||
|
||||
|
@ -24,16 +24,16 @@ struct PaletteFadeControl
|
||||
u16 y:5; // blend coefficient
|
||||
u16 targetY:5; // target blend coefficient
|
||||
u16 blendColor:15;
|
||||
u16 active:1;
|
||||
bool16 active:1;
|
||||
u16 multipurpose2:6;
|
||||
u16 yDec:1; // whether blend coefficient is decreasing
|
||||
u16 bufferTransferDisabled:1;
|
||||
bool16 yDec:1; // whether blend coefficient is decreasing
|
||||
bool16 bufferTransferDisabled:1;
|
||||
u16 mode:2;
|
||||
u16 shouldResetBlendRegisters:1;
|
||||
u16 hardwareFadeFinishing:1;
|
||||
bool16 shouldResetBlendRegisters:1;
|
||||
bool16 hardwareFadeFinishing:1;
|
||||
u16 softwareFadeFinishingCounter:5;
|
||||
u16 softwareFadeFinishing:1;
|
||||
u16 objPaletteToggle:1;
|
||||
bool16 softwareFadeFinishing:1;
|
||||
bool16 objPaletteToggle:1;
|
||||
u8 deltaY:4; // rate of change of blend coefficient
|
||||
};
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define GUARD_SPRITE_H
|
||||
|
||||
#define MAX_SPRITES 64
|
||||
#define SPRITE_INVALID_TAG 0xFFFF
|
||||
|
||||
struct SpriteSheet
|
||||
{
|
||||
@ -186,29 +187,29 @@ struct Sprite
|
||||
/*0x2A*/ u8 animNum;
|
||||
/*0x2B*/ u8 animCmdIndex;
|
||||
/*0x2C*/ u8 animDelayCounter:6;
|
||||
u8 animPaused:1;
|
||||
u8 affineAnimPaused:1;
|
||||
bool8 animPaused:1;
|
||||
bool8 affineAnimPaused:1;
|
||||
/*0x2D*/ u8 animLoopCounter;
|
||||
|
||||
// general purpose data fields
|
||||
/*0x2E*/ s16 data[8];
|
||||
|
||||
/*0x3E*/ u16 inUse:1; //1
|
||||
u16 coordOffsetEnabled:1; //2
|
||||
u16 invisible:1; //4
|
||||
u16 flags_3:1; //8
|
||||
u16 flags_4:1; //0x10
|
||||
u16 flags_5:1; //0x20
|
||||
u16 flags_6:1; //0x40
|
||||
u16 flags_7:1; //0x80
|
||||
/*0x3F*/ u16 hFlip:1; //1
|
||||
u16 vFlip:1; //2
|
||||
u16 animBeginning:1; //4
|
||||
u16 affineAnimBeginning:1; //8
|
||||
u16 animEnded:1; //0x10
|
||||
u16 affineAnimEnded:1; //0x20
|
||||
u16 usingSheet:1; //0x40
|
||||
u16 flags_f:1; //0x80
|
||||
/*0x3E*/ bool16 inUse:1; //1
|
||||
bool16 coordOffsetEnabled:1; //2
|
||||
bool16 invisible:1; //4
|
||||
bool16 flags_3:1; //8
|
||||
bool16 flags_4:1; //0x10
|
||||
bool16 flags_5:1; //0x20
|
||||
bool16 flags_6:1; //0x40
|
||||
bool16 flags_7:1; //0x80
|
||||
/*0x3F*/ bool16 hFlip:1; //1
|
||||
bool16 vFlip:1; //2
|
||||
bool16 animBeginning:1; //4
|
||||
bool16 affineAnimBeginning:1; //8
|
||||
bool16 animEnded:1; //0x10
|
||||
bool16 affineAnimEnded:1; //0x20
|
||||
bool16 usingSheet:1; //0x40
|
||||
bool16 flags_f:1; //0x80
|
||||
|
||||
/*0x40*/ u16 sheetTileStart;
|
||||
|
||||
|
@ -98,6 +98,17 @@
|
||||
|
||||
#define TEXT_SPEED_FF 0xFF
|
||||
|
||||
enum {
|
||||
FONTATTR_MAX_LETTER_WIDTH,
|
||||
FONTATTR_MAX_LETTER_HEIGHT,
|
||||
FONTATTR_LETTER_SPACING,
|
||||
FONTATTR_LINE_SPACING,
|
||||
FONTATTR_COLOR_LOWNIBBLE, // dunno what this is yet
|
||||
FONTATTR_COLOR_FOREGROUND,
|
||||
FONTATTR_COLOR_BACKGROUND,
|
||||
FONTATTR_COLOR_SHADOW
|
||||
};
|
||||
|
||||
struct TextPrinterSubStruct
|
||||
{
|
||||
u8 font_type:4; // 0x14
|
||||
|
@ -14,8 +14,8 @@ extern const u16 gTextWindowFrame1_Pal[];
|
||||
|
||||
const struct TilesPal* GetWindowFrameTilesPal(u8 id);
|
||||
void copy_textbox_border_tile_patterns_to_vram(u8 windowId, u16 destOffset, u8 palOffset);
|
||||
void sub_809882C(u8 windowId, u16 destOffset, u8 palOffset);
|
||||
void sub_80987D4(u8 windowId, u8 frameId, u16 destOffset, u8 palOffset);
|
||||
void LoadUserWindowBorderGfx(u8 windowId, u16 destOffset, u8 palOffset);
|
||||
void LoadWindowGfx(u8 windowId, u8 frameId, u16 destOffset, u8 palOffset);
|
||||
void box_border_load_tiles_and_pal(u8 windowId, u16 destOffset, u8 palOffset);
|
||||
void sub_8098858(u8 windowId, u16 tileNum, u8 palNum);
|
||||
void sub_80989E0(u8 windowId, u16 tileNum, u8 palNum);
|
||||
|
@ -75,8 +75,8 @@ void sub_80356D0(void)
|
||||
|
||||
void ApplyPlayerChosenFrameToBattleMenu(void)
|
||||
{
|
||||
sub_809882C(2, 0x12, 0x10);
|
||||
sub_809882C(2, 0x22, 0x10);
|
||||
LoadUserWindowBorderGfx(2, 0x12, 0x10);
|
||||
LoadUserWindowBorderGfx(2, 0x22, 0x10);
|
||||
LoadCompressedPalette(gUnknown_08D85600, 0x50, 0x20);
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_ARENA)
|
||||
|
@ -2420,7 +2420,7 @@ static void PlayerHandleFaintAnimation(void)
|
||||
|
||||
static void PlayerHandlePaletteFade(void)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 2, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 2, 0, 16, 0);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@ -2640,7 +2640,7 @@ static void PlayerHandleChooseItem(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gBattlerControllerFuncs[gActiveBattler] = OpenBagAndChooseItem;
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
|
||||
@ -2667,7 +2667,7 @@ static void PlayerHandleChoosePokemon(void)
|
||||
*(&gBattleStruct->field_49) = gBattleBufferA[gActiveBattler][1] >> 4;
|
||||
*(&gBattleStruct->field_8B) = gBattleBufferA[gActiveBattler][2];
|
||||
*(&gBattleStruct->field_B0) = gBattleBufferA[gActiveBattler][3];
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
gBattlerControllerFuncs[gActiveBattler] = sub_80597CC;
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
}
|
||||
@ -2676,7 +2676,7 @@ static void PlayerHandleChoosePokemon(void)
|
||||
static void PlayerHandleCmd23(void)
|
||||
{
|
||||
BattleStopLowHpSound();
|
||||
BeginNormalPaletteFade(-1, 2, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 2, 0, 16, 0);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
|
@ -478,7 +478,7 @@ static void SafariHandleChooseItem(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gBattlerControllerFuncs[gActiveBattler] = SafariOpenPokeblockCase;
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
}
|
||||
|
@ -1251,7 +1251,7 @@ static void WallyHandleChooseMove(void)
|
||||
|
||||
static void WallyHandleChooseItem(void)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gBattlerControllerFuncs[gActiveBattler] = OpenBagAfterPaletteFade;
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
}
|
||||
|
@ -1819,7 +1819,7 @@ void BattleMainCB2(void)
|
||||
{
|
||||
gSpecialVar_Result = gBattleOutcome = B_OUTCOME_PLAYER_TELEPORTED;
|
||||
ResetPaletteFadeControl();
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
SetMainCallback2(CB2_QuitRecordedBattle);
|
||||
}
|
||||
}
|
||||
@ -2255,7 +2255,7 @@ static void sub_8038F34(void)
|
||||
case 1:
|
||||
if (--gBattleCommunication[1] == 0)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
break;
|
||||
@ -2312,7 +2312,7 @@ static void sub_8038F34(void)
|
||||
for (i = 0; i < 2; i++)
|
||||
LoadChosenBattleElement(i);
|
||||
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
break;
|
||||
case 4:
|
||||
@ -2417,7 +2417,7 @@ static void sub_80392A8(void)
|
||||
gReservedSpritePaletteCount = 4;
|
||||
SetVBlankCallback(VBlankCB_Battle);
|
||||
SetMainCallback2(sub_803937C);
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
gBattleCommunication[MULTIUSE_STATE] = 0;
|
||||
}
|
||||
|
||||
@ -2577,7 +2577,7 @@ static void sub_803939C(void)
|
||||
{
|
||||
if (sub_800A520() == TRUE)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gBattleCommunication[1] = 0x20;
|
||||
gBattleCommunication[MULTIUSE_STATE] = 8;
|
||||
}
|
||||
@ -2585,7 +2585,7 @@ static void sub_803939C(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gBattleCommunication[1] = 0x20;
|
||||
gBattleCommunication[MULTIUSE_STATE] = 8;
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ static void Task_CloseTrainerHillRecordsOnButton(u8 taskId)
|
||||
|
||||
static void Task_BeginPaletteFade(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gTasks[taskId].func = Task_ExitTrainerHillRecords;
|
||||
}
|
||||
|
||||
@ -495,7 +495,7 @@ static void CB2_ShowTrainerHillRecords(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 6:
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 7:
|
||||
|
@ -5713,7 +5713,7 @@ static void atk5A_yesnoboxlearnmove(void)
|
||||
if (gBattleCommunication[1] == 0)
|
||||
{
|
||||
HandleBattleWindow(0x18, 0x8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gBattleScripting.learnMoveState++;
|
||||
}
|
||||
else
|
||||
@ -10288,7 +10288,7 @@ static void atkF2_displaydexinfo(void)
|
||||
switch (gBattleCommunication[0])
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gBattleCommunication[0]++;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -1080,7 +1080,7 @@ static bool8 Phase2_Blur_Func2(struct Task *task)
|
||||
{
|
||||
task->tData1 = 4;
|
||||
if (++task->tData2 == 10)
|
||||
BeginNormalPaletteFade(-1, -1, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, 0);
|
||||
SetGpuReg(REG_OFFSET_MOSAIC, (task->tData2 & 15) * 17);
|
||||
if (task->tData2 > 14)
|
||||
task->tState++;
|
||||
@ -1107,7 +1107,7 @@ static bool8 Phase2_Swirl_Func1(struct Task *task)
|
||||
{
|
||||
sub_8149F08();
|
||||
ScanlineEffect_Clear();
|
||||
BeginNormalPaletteFade(-1, 4, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, 0);
|
||||
sub_8149F98(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_14, 0, 2, 0, 160);
|
||||
|
||||
SetVBlankCallback(VBlankCB_Phase2_Swirl);
|
||||
@ -1162,7 +1162,7 @@ static bool8 Phase2_Shuffle_Func1(struct Task *task)
|
||||
sub_8149F08();
|
||||
ScanlineEffect_Clear();
|
||||
|
||||
BeginNormalPaletteFade(-1, 4, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, 0);
|
||||
memset(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_16, 0x140);
|
||||
|
||||
SetVBlankCallback(VBlankCB_Phase2_Shuffle);
|
||||
@ -1973,7 +1973,7 @@ static bool8 Phase2_Ripple_Func2(struct Task *task)
|
||||
if (++task->tData3 == 81)
|
||||
{
|
||||
task->tData4++;
|
||||
BeginNormalPaletteFade(-1, -2, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 0x10, 0);
|
||||
}
|
||||
|
||||
if (task->tData4 != 0 && !gPaletteFade.active)
|
||||
@ -3982,7 +3982,7 @@ static bool8 Phase2_30_Func4(struct Task *task)
|
||||
if (++task->tData3 == 101)
|
||||
{
|
||||
task->tData4++;
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
}
|
||||
|
||||
if (task->tData4 != 0 && !gPaletteFade.active)
|
||||
|
@ -153,7 +153,7 @@ extern const u8 gText_234Players[];
|
||||
|
||||
extern void sub_800A418(void);
|
||||
extern u8 sub_800A9D8(void);
|
||||
extern void sub_809882C(u8, u16, u8);
|
||||
extern void LoadUserWindowBorderGfx(u8, u16, u8);
|
||||
extern void copy_textbox_border_tile_patterns_to_vram(u8, u16, u8);
|
||||
extern void sub_81AABF0(void (*callback)(void));
|
||||
extern void sub_800B4C0(void);
|
||||
@ -927,7 +927,7 @@ static void sub_807FAC8(void)
|
||||
InitBgsFromTemplates(1, sBerryBlenderBgTemplates, ARRAY_COUNT(sBerryBlenderBgTemplates));
|
||||
SetBgTilemapBuffer(1, sBerryBlenderData->tilemapBuffers[0]);
|
||||
SetBgTilemapBuffer(2, sBerryBlenderData->tilemapBuffers[1]);
|
||||
sub_809882C(0, 1, 0xD0);
|
||||
LoadUserWindowBorderGfx(0, 1, 0xD0);
|
||||
copy_textbox_border_tile_patterns_to_vram(0, 0x14, 0xF0);
|
||||
InitBerryBlenderWindows();
|
||||
|
||||
@ -959,7 +959,7 @@ static void sub_807FAC8(void)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
sub_8082D28();
|
||||
sBerryBlenderData->mainState++;
|
||||
break;
|
||||
@ -973,7 +973,7 @@ static void sub_807FAC8(void)
|
||||
sBerryBlenderData->mainState++;
|
||||
break;
|
||||
case 5:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
sBerryBlenderData->mainState++;
|
||||
break;
|
||||
case 6:
|
||||
@ -1163,7 +1163,7 @@ static void sub_8080018(void)
|
||||
sBerryBlenderData->mainState++;
|
||||
break;
|
||||
case 3:
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
sBerryBlenderData->mainState++;
|
||||
break;
|
||||
case 4:
|
||||
@ -1331,7 +1331,7 @@ static void sub_8080588(void)
|
||||
SetBgTilemapBuffer(1, sBerryBlenderData->tilemapBuffers[0]);
|
||||
SetBgTilemapBuffer(2, sBerryBlenderData->tilemapBuffers[1]);
|
||||
|
||||
sub_809882C(0, 1, 0xD0);
|
||||
LoadUserWindowBorderGfx(0, 1, 0xD0);
|
||||
copy_textbox_border_tile_patterns_to_vram(0, 0x14, 0xF0);
|
||||
InitBerryBlenderWindows();
|
||||
|
||||
@ -1490,7 +1490,7 @@ static void sub_80808D4(void)
|
||||
sBerryBlenderData->mainState++;
|
||||
break;
|
||||
case 3:
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
sBerryBlenderData->mainState++;
|
||||
sBerryBlenderData->framesToWait = 0;
|
||||
break;
|
||||
@ -2656,7 +2656,7 @@ static void CB2_HandlePlayerLinkPlayAgainChoice(void)
|
||||
case 9:
|
||||
if (sub_800A520())
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
sBerryBlenderData->gameEndState++;
|
||||
}
|
||||
break;
|
||||
|
@ -247,7 +247,7 @@ static bool8 InitBerryTagScreen(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 15:
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
gPaletteFade.bufferTransferDisabled = 0;
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -481,7 +481,7 @@ static void DestroyFlavorCircleSprites(void)
|
||||
static void PrepareToCloseBerryTagScreen(u8 taskId)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gTasks[taskId].func = Task_CloseBerryTagScreen;
|
||||
}
|
||||
|
||||
|
@ -202,6 +202,6 @@ static void InitClearSaveDataScreenWindows(void)
|
||||
InitWindows(sClearSaveTextWindow);
|
||||
DeactivateAllTextPrinters();
|
||||
FillWindowPixelBuffer(0, 0);
|
||||
sub_80987D4(0, 0, 2, 224);
|
||||
LoadWindowGfx(0, 0, 2, 224);
|
||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||
}
|
||||
|
@ -73,20 +73,20 @@ static const struct ListMenuItem sLevelMenuItems[] =
|
||||
static const struct ListMenuTemplate sDaycareListMenuLevelTemplate =
|
||||
{
|
||||
.items = sLevelMenuItems,
|
||||
.moveCursorFunc = sub_81AF078,
|
||||
.unk_08 = DaycarePrintMonInfo,
|
||||
.moveCursorFunc = ListMenuDefaultCursorMoveFunc,
|
||||
.itemPrintFunc = DaycarePrintMonInfo,
|
||||
.totalItems = 3,
|
||||
.maxShowed = 3,
|
||||
.windowId = 0,
|
||||
.unk_11 = 0,
|
||||
.unk_12 = 8,
|
||||
.header_X = 0,
|
||||
.item_X = 8,
|
||||
.cursor_X = 0,
|
||||
.upText_Y = 1,
|
||||
.cursorPal = 2,
|
||||
.fillValue = 1,
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 1,
|
||||
.unk_16_3 = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = 1,
|
||||
.cursorKind = 0
|
||||
|
@ -838,7 +838,7 @@ void sub_8127500(void)
|
||||
{
|
||||
if (sDecorPCBuffer->unk_522 == 0xFF)
|
||||
{
|
||||
sDecorPCBuffer->unk_522 = AddScrollIndicatorArrowPairParametrized(0x02, 0x3c, 0x0c, 0x94, sDecorPCBuffer->unk_520 - sDecorPCBuffer->unk_521, 0x6e, 0x6e, &sSecretBasePCSelectDecorPageNo);
|
||||
sDecorPCBuffer->unk_522 = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 0x3c, 0x0c, 0x94, sDecorPCBuffer->unk_520 - sDecorPCBuffer->unk_521, 0x6e, 0x6e, &sSecretBasePCSelectDecorPageNo);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ void CB2_ShowDiploma(void)
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
DisplayDiplomaText();
|
||||
BlendPalettes(-1, 16, 0);
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
EnableInterrupts(1);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
SetMainCallback2(MainCB2);
|
||||
@ -114,7 +114,7 @@ static void Task_DiplomaWaitForKeyPress(u8 taskId)
|
||||
{
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
gTasks[taskId].func = Task_DiplomaFadeOut;
|
||||
}
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ static void CB2_EggHatch_1(void)
|
||||
switch (sEggHatchData->CB2_state)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
sEggHatchData->eggSpriteID = CreateSprite(&sSpriteTemplate_EggHatch, 120, 75, 5);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -655,7 +655,7 @@ static void CB2_EggHatch_1(void)
|
||||
case 9:
|
||||
if (!IsTextPrinterActive(sEggHatchData->windowId))
|
||||
{
|
||||
sub_809882C(sEggHatchData->windowId, 0x140, 0xE0);
|
||||
LoadUserWindowBorderGfx(sEggHatchData->windowId, 0x140, 0xE0);
|
||||
CreateYesNoMenu(&sYesNoWinTemplate, 0x140, 0xE, 0);
|
||||
sEggHatchData->CB2_state++;
|
||||
}
|
||||
@ -676,7 +676,7 @@ static void CB2_EggHatch_1(void)
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
sEggHatchData->CB2_state++;
|
||||
break;
|
||||
case 12:
|
||||
@ -786,7 +786,7 @@ static void SpriteCB_Egg_4(struct Sprite* sprite)
|
||||
{
|
||||
s16 i;
|
||||
if (sprite->data[0] == 0)
|
||||
BeginNormalPaletteFade(-1, -1, 0, 0x10, 0xFFFF);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, 0xFFFF);
|
||||
if (sprite->data[0] < 4u)
|
||||
{
|
||||
for (i = 0; i <= 3; i++)
|
||||
@ -810,7 +810,7 @@ static void SpriteCB_Egg_5(struct Sprite* sprite)
|
||||
StartSpriteAffineAnim(&gSprites[sEggHatchData->pokeSpriteID], 1);
|
||||
}
|
||||
if (sprite->data[0] == 8)
|
||||
BeginNormalPaletteFade(-1, -1, 0x10, 0, 0xFFFF);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0x10, 0, 0xFFFF);
|
||||
if (sprite->data[0] <= 9)
|
||||
gSprites[sEggHatchData->pokeSpriteID].pos1.y -= 1;
|
||||
if (sprite->data[0] > 40)
|
||||
|
@ -1537,7 +1537,7 @@ u8 SpawnSpecialEventObject(struct EventObjectTemplate *eventObjectTemplate)
|
||||
return TrySpawnEventObject(eventObjectTemplate, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, cameraX, cameraY);
|
||||
}
|
||||
|
||||
u8 SpawnSpecialEventObjectParametrized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 z)
|
||||
u8 SpawnSpecialEventObjectParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 z)
|
||||
{
|
||||
struct EventObjectTemplate eventObjectTemplate;
|
||||
|
||||
|
@ -189,7 +189,7 @@ static void Task_BeginEvolutionScene(u8 taskID)
|
||||
switch (gTasks[taskID].tState)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gTasks[taskID].tState++;
|
||||
break;
|
||||
case 1:
|
||||
@ -386,7 +386,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
||||
SetVBlankCallback(VBlankCB_EvolutionScene);
|
||||
SetMainCallback2(CB2_EvolutionSceneUpdate);
|
||||
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -470,7 +470,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 7:
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
sub_807B140();
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -623,7 +623,7 @@ static void Task_EvolutionScene(u8 taskID)
|
||||
switch (gTasks[taskID].tState)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
gSprites[sEvoStructPtr->preEvoSpriteID].invisible = 0;
|
||||
gTasks[taskID].tState++;
|
||||
ShowBg(0);
|
||||
@ -771,7 +771,7 @@ static void Task_EvolutionScene(u8 taskID)
|
||||
}
|
||||
else // no move to learn
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gTasks[taskID].tState++;
|
||||
}
|
||||
}
|
||||
@ -905,7 +905,7 @@ static void Task_EvolutionScene(u8 taskID)
|
||||
{
|
||||
gTasks[taskID].tLearnMoveState = gTasks[taskID].tData7;
|
||||
if (gTasks[taskID].tLearnMoveState == 5)
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
}
|
||||
}
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
@ -1215,7 +1215,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
case 3:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
sub_809882C(0, 0xA8, 0xE0);
|
||||
LoadUserWindowBorderGfx(0, 0xA8, 0xE0);
|
||||
CreateYesNoMenu(&gUnknown_0833900C, 0xA8, 0xE, 0);
|
||||
sEvoCursorPos = 0;
|
||||
gTasks[taskID].tLearnMoveState++;
|
||||
@ -1231,7 +1231,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tLearnMoveState = gTasks[taskID].tData7;
|
||||
if (gTasks[taskID].tLearnMoveState == 5)
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
break;
|
||||
case 1:
|
||||
case -1:
|
||||
|
@ -89,7 +89,7 @@ static void MCB2_InitRegionMapRegisters(void)
|
||||
InitBgsFromTemplates(1, gUnknown_085E5068, 2);
|
||||
InitWindows(gUnknown_085E5070);
|
||||
DeactivateAllTextPrinters();
|
||||
sub_809882C(0, 0x27, 0xd0);
|
||||
LoadUserWindowBorderGfx(0, 0x27, 0xd0);
|
||||
clear_scheduled_bg_copies_to_vram();
|
||||
SetMainCallback2(MCB2_FieldUpdateRegionMap);
|
||||
SetVBlankCallback(VBCB_FieldUpdateRegionMap);
|
||||
@ -130,7 +130,7 @@ static void FieldUpdateRegionMap(void)
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
SetWindowBorderStyle(0, 0, 0x27, 0xd);
|
||||
PrintRegionMapSecName();
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
sFieldRegionMapHandler->state++;
|
||||
break;
|
||||
case 2:
|
||||
@ -158,7 +158,7 @@ static void FieldUpdateRegionMap(void)
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
sFieldRegionMapHandler->state++;
|
||||
break;
|
||||
case 6:
|
||||
|
@ -89,7 +89,7 @@ extern void sub_8197434(u8, u8);
|
||||
extern u16 sub_818D97C(u8 playerGender, u8);
|
||||
extern u16 sub_818D8AC(u16, u8, s16, s16, u8, u16);
|
||||
extern const void* stdpal_get(u8);
|
||||
extern void sub_80987D4(u8, u8, u16, u8);
|
||||
extern void LoadWindowGfx(u8, u8, u16, u8);
|
||||
extern u16 sub_818D820(u16);
|
||||
extern u16 sub_818D8F0(u16);
|
||||
extern u16 sub_818D7D8(u16 species, u32 trainerId, u32 personality, u8 arg3, s16 sp0, s16 sp1, u8 sp2, u16 sp3);
|
||||
@ -414,7 +414,7 @@ static bool8 InitHallOfFameScreen(void)
|
||||
if (!sub_8175024())
|
||||
{
|
||||
SetVBlankCallback(VBlankCB_HallOfFame);
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
gMain.state++;
|
||||
}
|
||||
break;
|
||||
@ -725,7 +725,7 @@ static void sub_8173EE4(u8 taskId)
|
||||
ShowBg(3);
|
||||
gTasks[taskId].tPlayerSpriteID = sub_818D8AC(sub_818D97C(gSaveBlock2Ptr->playerGender, 1), 1, 120, 72, 6, 0xFFFF);
|
||||
AddWindow(&sHof_WindowTemplate);
|
||||
sub_80987D4(1, gSaveBlock2Ptr->optionsWindowFrameType, 0x21D, 0xD0);
|
||||
LoadWindowGfx(1, gSaveBlock2Ptr->optionsWindowFrameType, 0x21D, 0xD0);
|
||||
LoadPalette(stdpal_get(1), 0xE0, 0x20);
|
||||
gTasks[taskId].tFrameCount = 120;
|
||||
gTasks[taskId].func = Task_Hof_WaitAndPrintPlayerInfo;
|
||||
@ -764,7 +764,7 @@ static void Task_Hof_ExitOnKeyPressed(u8 taskId)
|
||||
static void Task_Hof_HandlePaletteOnExit(u8 taskId)
|
||||
{
|
||||
CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400);
|
||||
BeginNormalPaletteFade(-1, 8, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 8, 0, 0x10, 0);
|
||||
gTasks[taskId].func = Task_Hof_HandleExit;
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ const struct YesNoFuncTable gUnknown_08614084 = {BagMenuActuallyToss, BagMenuCan
|
||||
|
||||
const struct YesNoFuncTable gUnknown_0861408C = {sub_81AD84C, sub_81AD6FC};
|
||||
|
||||
const struct ArrowStruct gUnknown_08614094 = {0, 0x1C, 16, 1, 100, 16, -1, -1, 0x6F, 0x6F, 0};
|
||||
const struct ScrollArrowsTemplate gUnknown_08614094 = {SCROLL_ARROW_LEFT, 0x1C, 16, SCROLL_ARROW_RIGHT, 100, 16, -1, -1, 0x6F, 0x6F, 0};
|
||||
|
||||
const u8 gUnknown_086140A4[] = INCBIN_U8("graphics/interface/select_button.4bpp");
|
||||
|
||||
@ -488,7 +488,7 @@ bool8 setup_bag_menu(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 20:
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -733,7 +733,7 @@ void bag_menu_print_cursor(u8 a, u8 b)
|
||||
void bag_menu_add_pocket_scroll_arrow_indicators_maybe(void)
|
||||
{
|
||||
if (gUnknown_0203CE54->unk81E == 0xFF)
|
||||
gUnknown_0203CE54->unk81E = AddScrollIndicatorArrowPairParametrized(2, 0xAC, 12, 0x94, gUnknown_0203CE54->unk829[gUnknown_0203CE58.pocket] - gUnknown_0203CE54->unk82E[gUnknown_0203CE58.pocket], 0x6E, 0x6E, &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket]);
|
||||
gUnknown_0203CE54->unk81E = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 0xAC, 12, 0x94, gUnknown_0203CE54->unk829[gUnknown_0203CE58.pocket] - gUnknown_0203CE54->unk82E[gUnknown_0203CE58.pocket], 0x6E, 0x6E, &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket]);
|
||||
}
|
||||
|
||||
void sub_81AB824(void)
|
||||
@ -771,7 +771,7 @@ void free_bag_item_list_buffers(void)
|
||||
|
||||
void unknown_ItemMenu_Confirm(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
gTasks[taskId].func = task_close_bag_menu_2;
|
||||
}
|
||||
|
||||
@ -1114,7 +1114,7 @@ void bag_menu_swap_items(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
|
||||
sub_81AF15C(data[0], 16, 1);
|
||||
ListMenuSetUnkIndicatorsStructField(data[0], 16, 1);
|
||||
data[1] = gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket] + gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket];
|
||||
gUnknown_0203CE54->unk81A = data[1];
|
||||
CopyItemName(BagGetItemIdByPocketPosition(gUnknown_0203CE58.pocket + 1, data[1]), gStringVar1);
|
||||
@ -2078,7 +2078,7 @@ void bag_menu_print_pocket_names(u8 *pocketName1, u8 *pocketName2)
|
||||
offset = GetStringCenterAlignXOffset(1, pocketName2, 0x40);
|
||||
bag_menu_print(windowId, 1, pocketName2, offset + 0x40, 1, 0, 0, -1, 1);
|
||||
}
|
||||
CpuCopy32((u8*)GetWindowAttribute(windowId, 7), gUnknown_0203CE54->unk844, 0x400);
|
||||
CpuCopy32((u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA), gUnknown_0203CE54->unk844, 0x400);
|
||||
RemoveWindow(windowId);
|
||||
}
|
||||
|
||||
@ -2090,7 +2090,7 @@ void bag_menu_copy_pocket_name_to_window(u32 a)
|
||||
if (a > 8)
|
||||
a = 8;
|
||||
r4 = &gUnknown_0203CE54->unk844;
|
||||
windowAttribute = (u8*)GetWindowAttribute(2, 7);
|
||||
windowAttribute = (u8*)GetWindowAttribute(2, WINDOW_TILE_DATA);
|
||||
CpuCopy32(r4[0][a], windowAttribute, 0x100);
|
||||
b = a + 16;
|
||||
CpuCopy32(r4[0][b], windowAttribute + 0x100, 0x100);
|
||||
@ -2103,7 +2103,7 @@ void setup_bag_menu_textboxes(void)
|
||||
|
||||
InitWindows(gUnknown_08614174);
|
||||
DeactivateAllTextPrinters();
|
||||
sub_809882C(0, 1, -32);
|
||||
LoadUserWindowBorderGfx(0, 1, -32);
|
||||
copy_textbox_border_tile_patterns_to_vram(0, 10, -48);
|
||||
sub_819A2BC(-64, 1);
|
||||
LoadPalette(&gUnknown_0860F074, 0xF0, 0x20);
|
||||
|
@ -219,7 +219,7 @@ const u8 gUnknown_082ED224[] = {
|
||||
|
||||
// .text
|
||||
|
||||
bool8 sub_80093CC(void)
|
||||
bool8 IsWirelessAdapterConnected(void)
|
||||
{
|
||||
sub_800B488();
|
||||
sub_800E700();
|
||||
@ -444,7 +444,7 @@ static void LinkTestProcessKeyInput(void)
|
||||
}
|
||||
if (gMain.newKeys & L_BUTTON)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 2);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 2);
|
||||
}
|
||||
if (gMain.newKeys & START_BUTTON)
|
||||
{
|
||||
|
611
src/list_menu.c
611
src/list_menu.c
File diff suppressed because it is too large
Load Diff
@ -417,7 +417,7 @@ static bool8 MailReadBuildGraphics(void)
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
ShowBg(2);
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
sMailRead->callback2 = CB2_WaitForPaletteExitOnKeyPress;
|
||||
return TRUE;
|
||||
@ -526,7 +526,7 @@ static void CB2_ExitOnKeyPress(void)
|
||||
{
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
sMailRead->callback2 = CB2_ExitMailReadFreeVars;
|
||||
}
|
||||
}
|
||||
|
380
src/main_menu.c
380
src/main_menu.c
@ -44,10 +44,10 @@
|
||||
|
||||
// Static RAM declarations
|
||||
|
||||
EWRAM_DATA u8 gUnknown_02022D04 = 0;
|
||||
EWRAM_DATA u16 gUnknown_02022D06 = 0;
|
||||
static EWRAM_DATA u8 gUnknown_02022D04 = 0;
|
||||
static EWRAM_DATA u16 sCurrItemAndOptionMenuCheck = 0;
|
||||
|
||||
IWRAM_DATA u8 gUnknown_03000DD0;
|
||||
static IWRAM_DATA u8 gUnknown_03000DD0;
|
||||
|
||||
// Static ROM declarations
|
||||
|
||||
@ -56,7 +56,7 @@ void Task_MainMenuCheckSaveFile(u8);
|
||||
void Task_MainMenuCheckBattery(u8);
|
||||
void Task_WaitForSaveFileErrorWindow(u8);
|
||||
void CreateMainMenuErrorWindow(const u8*);
|
||||
void sub_8032250(const struct WindowTemplate*);
|
||||
static void ClearMainMenuWindowTilemap(const struct WindowTemplate*);
|
||||
void Task_DisplayMainMenu(u8);
|
||||
void Task_WaitForBatteryDryErrorWindow(u8);
|
||||
void fmt_savegame(void);
|
||||
@ -133,12 +133,12 @@ const u8 gUnknown_082FEEF0[] = INCBIN_U8("graphics/birch_speech/map.bin.lz");
|
||||
const u16 gUnknown_082FF018[] = INCBIN_U16("graphics/birch_speech/bg2.gbapal");
|
||||
const u16 gUnknown_082FF028[] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
|
||||
const struct WindowTemplate gUnknown_082FF038[] = {
|
||||
const struct WindowTemplate sWindowTemplates_NoSavedGame[] = {
|
||||
{0, 2, 1, 26, 2, 15, 1},
|
||||
{0, 2, 5, 26, 2, 15, 0x35}
|
||||
};
|
||||
|
||||
const struct WindowTemplate gUnknown_082FF048[] = {
|
||||
const struct WindowTemplate sWindowTemplates_HasSavedGame[] = {
|
||||
{0, 2, 1, 26, 6, 15, 1},
|
||||
{0, 2, 9, 26, 2, 15, 0x9D},
|
||||
{0, 2, 13, 26, 2, 15, 0xD1},
|
||||
@ -146,7 +146,7 @@ const struct WindowTemplate gUnknown_082FF048[] = {
|
||||
{0, 2, 21, 26, 2, 15, 0x139}
|
||||
};
|
||||
|
||||
const struct WindowTemplate gUnknown_082FF070[] = {
|
||||
const struct WindowTemplate sWindowTemplate_ErrorWindow[] = {
|
||||
{0, 2, 15, 26, 4, 15, 0x16D},
|
||||
{0xFF, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
@ -161,7 +161,7 @@ const struct WindowTemplate gUnknown_082FF080[] = {
|
||||
const u16 gMainMenuBgPal[] = INCBIN_U16("graphics/misc/main_menu_bg.gbapal");
|
||||
const u16 gMainMenuTextPal[] = INCBIN_U16("graphics/misc/main_menu_text.gbapal");
|
||||
|
||||
const u8 gUnknown_082FF0E0[] = {10, 11, 12};
|
||||
const u8 gTextColor_Headers[] = {10, 11, 12};
|
||||
const u8 gUnknown_082FF0E3[] = {10, 1, 12};
|
||||
|
||||
const struct BgTemplate gUnknown_082FF0E8[] = {
|
||||
@ -195,7 +195,7 @@ const struct BgTemplate gUnknown_082FF0F0 = {
|
||||
.baseTile = 0
|
||||
};
|
||||
|
||||
const struct ArrowStruct gUnknown_082FF0F4 = {2, 0x78, 8, 3, 0x78, 0x98, 3, 4, 1, 1, 0};
|
||||
const struct ScrollArrowsTemplate sScrollArrowsTemplate_MainMenu = {2, 0x78, 8, 3, 0x78, 0x98, 3, 4, 1, 1, 0};
|
||||
|
||||
const union AffineAnimCmd gUnknown_082FF104[] = {
|
||||
AFFINEANIMCMD_FRAME(-2, -2, 0, 0x30),
|
||||
@ -265,6 +265,16 @@ enum
|
||||
HAS_MYSTERY_EVENTS,
|
||||
};
|
||||
|
||||
enum {
|
||||
ACTION_NEW_GAME,
|
||||
ACTION_CONTINUE,
|
||||
ACTION_OPTIONS,
|
||||
ACTION_MYSTERY_GIFT,
|
||||
ACTION_MYSTERY_EVENTS,
|
||||
ACTION_UNKNOWN, // TODO: change when rom_8011DC0 decompiled
|
||||
ACTION_INVALID
|
||||
};
|
||||
|
||||
#define MAIN_MENU_BORDER_TILE 0x1D5
|
||||
|
||||
void CB2_MainMenu(void)
|
||||
@ -319,16 +329,16 @@ u32 InitMainMenu(bool8 returningFromOptionsMenu)
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
if (returningFromOptionsMenu)
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0x0000); // fade to black
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0x0000); // fade to black
|
||||
else
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0xFFFF); // fade to white
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0xFFFF); // fade to white
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, gUnknown_082FF0E8, 2);
|
||||
ChangeBgX(0, 0, 0);
|
||||
ChangeBgY(0, 0, 0);
|
||||
ChangeBgX(1, 0, 0);
|
||||
ChangeBgY(1, 0, 0);
|
||||
InitWindows(gUnknown_082FF038);
|
||||
InitWindows(sWindowTemplates_NoSavedGame);
|
||||
DeactivateAllTextPrinters();
|
||||
LoadMainMenuWindowFrameTiles(0, MAIN_MENU_BORDER_TILE);
|
||||
|
||||
@ -351,6 +361,15 @@ u32 InitMainMenu(bool8 returningFromOptionsMenu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define tMenuType data[0]
|
||||
#define tCurrItem data[1]
|
||||
#define tItemCount data[12]
|
||||
#define tScrollArrowTaskId data[13]
|
||||
#define tIsScrolled data[14]
|
||||
#define tWirelessAdapterConnected data[15]
|
||||
|
||||
#define tArrowTaskIsScrolled data[15] // For scroll indicator arrow task
|
||||
|
||||
void Task_MainMenuCheckSaveFile(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
@ -359,64 +378,64 @@ void Task_MainMenuCheckSaveFile(u8 taskId)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 17);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0x31);
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG0 | WININ_WIN0_OBJ);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG0 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_DARKEN | BLDCNT_TGT1_BG0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 7);
|
||||
|
||||
if (sub_80093CC())
|
||||
data[15] = 1;
|
||||
if (IsWirelessAdapterConnected())
|
||||
tWirelessAdapterConnected = TRUE;
|
||||
switch (gSaveFileStatus)
|
||||
{
|
||||
case 1:
|
||||
data[0] = HAS_SAVED_GAME;
|
||||
tMenuType = HAS_SAVED_GAME;
|
||||
if (IsMysteryGiftEnabled())
|
||||
data[0]++;
|
||||
tMenuType++;
|
||||
gTasks[taskId].func = Task_MainMenuCheckBattery;
|
||||
break;
|
||||
case 2:
|
||||
CreateMainMenuErrorWindow(gText_SaveFileErased);
|
||||
data[0] = 0;
|
||||
tMenuType = HAS_NO_SAVED_GAME;
|
||||
gTasks[taskId].func = Task_WaitForSaveFileErrorWindow;
|
||||
break;
|
||||
case 0xFF:
|
||||
CreateMainMenuErrorWindow(gText_SaveFileCorrupted);
|
||||
gTasks[taskId].func = Task_WaitForSaveFileErrorWindow;
|
||||
data[0] = HAS_SAVED_GAME;
|
||||
tMenuType = HAS_SAVED_GAME;
|
||||
if (IsMysteryGiftEnabled() == TRUE)
|
||||
data[0]++;
|
||||
tMenuType++;
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
data[0] = HAS_NO_SAVED_GAME;
|
||||
tMenuType = HAS_NO_SAVED_GAME;
|
||||
gTasks[taskId].func = Task_MainMenuCheckBattery;
|
||||
break;
|
||||
case 4:
|
||||
CreateMainMenuErrorWindow(gJPText_No1MSubCircuit);
|
||||
gTasks[taskId].data[0] = HAS_NO_SAVED_GAME;
|
||||
gTasks[taskId].tMenuType = HAS_NO_SAVED_GAME;
|
||||
gTasks[taskId].func = Task_WaitForSaveFileErrorWindow;
|
||||
break;
|
||||
}
|
||||
if (gUnknown_02022D06 & 0x8000)
|
||||
if (sCurrItemAndOptionMenuCheck & 0x8000) // are we returning from the options menu?
|
||||
{
|
||||
switch (data[0])
|
||||
switch (tMenuType) // if so, highlight the OPTIONS item
|
||||
{
|
||||
case HAS_NO_SAVED_GAME:
|
||||
case HAS_SAVED_GAME:
|
||||
gUnknown_02022D06 = data[0] + 1;
|
||||
sCurrItemAndOptionMenuCheck = tMenuType + 1;
|
||||
break;
|
||||
case HAS_MYSTERY_GIFT:
|
||||
gUnknown_02022D06 = 3;
|
||||
sCurrItemAndOptionMenuCheck = 3;
|
||||
break;
|
||||
case 3:
|
||||
gUnknown_02022D06 = 4;
|
||||
case HAS_MYSTERY_EVENTS:
|
||||
sCurrItemAndOptionMenuCheck = 4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
gUnknown_02022D06 &= 0x7FFF;
|
||||
data[1] = gUnknown_02022D06;
|
||||
data[12] = data[0] + 2;
|
||||
sCurrItemAndOptionMenuCheck &= 0x7FFF; // turn off the "returning from options menu" flag
|
||||
tCurrItem = sCurrItemAndOptionMenuCheck;
|
||||
tItemCount = tMenuType + 2;
|
||||
}
|
||||
}
|
||||
|
||||
@ -426,7 +445,7 @@ void Task_WaitForSaveFileErrorWindow(u8 taskId)
|
||||
if (!IsTextPrinterActive(7) && (gMain.newKeys & A_BUTTON))
|
||||
{
|
||||
ClearWindowTilemap(7);
|
||||
sub_8032250(gUnknown_082FF070);
|
||||
ClearMainMenuWindowTilemap(sWindowTemplate_ErrorWindow);
|
||||
gTasks[taskId].func = Task_MainMenuCheckBattery;
|
||||
}
|
||||
}
|
||||
@ -437,8 +456,8 @@ void Task_MainMenuCheckBattery(u8 taskId)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 17);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0x31);
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG0 | WININ_WIN0_OBJ);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG0 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_DARKEN | BLDCNT_TGT1_BG0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 7);
|
||||
@ -461,7 +480,7 @@ void Task_WaitForBatteryDryErrorWindow(u8 taskId)
|
||||
if (!IsTextPrinterActive(7) && (gMain.newKeys & A_BUTTON))
|
||||
{
|
||||
ClearWindowTilemap(7);
|
||||
sub_8032250(gUnknown_082FF070);
|
||||
ClearMainMenuWindowTilemap(sWindowTemplate_ErrorWindow);
|
||||
gTasks[taskId].func = Task_DisplayMainMenu;
|
||||
}
|
||||
}
|
||||
@ -475,8 +494,8 @@ void Task_DisplayMainMenu(u8 taskId)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 17);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0x31);
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG0 | WININ_WIN0_OBJ);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG0 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_DARKEN | BLDCNT_TGT1_BG0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 7);
|
||||
@ -504,28 +523,28 @@ void Task_DisplayMainMenu(u8 taskId)
|
||||
LoadPalette(&palette, 241, 2);
|
||||
}
|
||||
|
||||
switch (gTasks[taskId].data[0])
|
||||
switch (gTasks[taskId].tMenuType)
|
||||
{
|
||||
case HAS_NO_SAVED_GAME:
|
||||
default:
|
||||
FillWindowPixelBuffer(0, 0xAA);
|
||||
FillWindowPixelBuffer(1, 0xAA);
|
||||
box_print(0, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuNewGame);
|
||||
box_print(1, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuOption);
|
||||
box_print(0, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
box_print(1, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuOption);
|
||||
PutWindowTilemap(0);
|
||||
PutWindowTilemap(1);
|
||||
CopyWindowToVram(0, 2);
|
||||
CopyWindowToVram(1, 2);
|
||||
DrawMainMenuWindowBorder(gUnknown_082FF038, MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&gUnknown_082FF038[1], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_NoSavedGame[0], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_NoSavedGame[1], MAIN_MENU_BORDER_TILE);
|
||||
break;
|
||||
case HAS_SAVED_GAME:
|
||||
FillWindowPixelBuffer(2, 0xAA);
|
||||
FillWindowPixelBuffer(3, 0xAA);
|
||||
FillWindowPixelBuffer(4, 0xAA);
|
||||
box_print(2, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuContinue);
|
||||
box_print(3, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuNewGame);
|
||||
box_print(4, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuOption);
|
||||
box_print(2, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuContinue);
|
||||
box_print(3, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
box_print(4, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuOption);
|
||||
fmt_savegame();
|
||||
PutWindowTilemap(2);
|
||||
PutWindowTilemap(3);
|
||||
@ -533,19 +552,19 @@ void Task_DisplayMainMenu(u8 taskId)
|
||||
CopyWindowToVram(2, 2);
|
||||
CopyWindowToVram(3, 2);
|
||||
CopyWindowToVram(4, 2);
|
||||
DrawMainMenuWindowBorder(gUnknown_082FF048, MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&gUnknown_082FF048[1], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&gUnknown_082FF048[2], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_HasSavedGame[0], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_HasSavedGame[1], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_HasSavedGame[2], MAIN_MENU_BORDER_TILE);
|
||||
break;
|
||||
case HAS_MYSTERY_GIFT:
|
||||
FillWindowPixelBuffer(2, 0xAA);
|
||||
FillWindowPixelBuffer(3, 0xAA);
|
||||
FillWindowPixelBuffer(4, 0xAA);
|
||||
FillWindowPixelBuffer(5, 0xAA);
|
||||
box_print(2, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuContinue);
|
||||
box_print(3, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuNewGame);
|
||||
box_print(4, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuMysteryGift);
|
||||
box_print(5, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuOption);
|
||||
box_print(2, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuContinue);
|
||||
box_print(3, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
box_print(4, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuMysteryGift);
|
||||
box_print(5, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuOption);
|
||||
fmt_savegame();
|
||||
PutWindowTilemap(2);
|
||||
PutWindowTilemap(3);
|
||||
@ -555,10 +574,10 @@ void Task_DisplayMainMenu(u8 taskId)
|
||||
CopyWindowToVram(3, 2);
|
||||
CopyWindowToVram(4, 2);
|
||||
CopyWindowToVram(5, 2);
|
||||
DrawMainMenuWindowBorder(gUnknown_082FF048, MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&gUnknown_082FF048[1], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&gUnknown_082FF048[2], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&gUnknown_082FF048[3], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(sWindowTemplates_HasSavedGame, MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_HasSavedGame[1], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_HasSavedGame[2], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_HasSavedGame[3], MAIN_MENU_BORDER_TILE);
|
||||
break;
|
||||
case HAS_MYSTERY_EVENTS:
|
||||
FillWindowPixelBuffer(2, 0xAA);
|
||||
@ -566,11 +585,11 @@ void Task_DisplayMainMenu(u8 taskId)
|
||||
FillWindowPixelBuffer(4, 0xAA);
|
||||
FillWindowPixelBuffer(5, 0xAA);
|
||||
FillWindowPixelBuffer(6, 0xAA);
|
||||
box_print(2, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuContinue);
|
||||
box_print(3, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuNewGame);
|
||||
box_print(4, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuMysteryGift2);
|
||||
box_print(5, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuMysteryEvents);
|
||||
box_print(6, 1, 0, 1, gUnknown_082FF0E0, -1, gText_MainMenuOption);
|
||||
box_print(2, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuContinue);
|
||||
box_print(3, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
box_print(4, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuMysteryGift2);
|
||||
box_print(5, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuMysteryEvents);
|
||||
box_print(6, 1, 0, 1, gTextColor_Headers, -1, gText_MainMenuOption);
|
||||
fmt_savegame();
|
||||
PutWindowTilemap(2);
|
||||
PutWindowTilemap(3);
|
||||
@ -582,19 +601,19 @@ void Task_DisplayMainMenu(u8 taskId)
|
||||
CopyWindowToVram(4, 2);
|
||||
CopyWindowToVram(5, 2);
|
||||
CopyWindowToVram(6, 2);
|
||||
DrawMainMenuWindowBorder(gUnknown_082FF048, MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&gUnknown_082FF048[1], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&gUnknown_082FF048[2], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&gUnknown_082FF048[3], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&gUnknown_082FF048[4], MAIN_MENU_BORDER_TILE);
|
||||
data[13] = AddScrollIndicatorArrowPair(&gUnknown_082FF0F4, &gUnknown_02022D06);
|
||||
gTasks[data[13]].func = Task_ScrollIndicatorArrowPairOnMainMenu;
|
||||
if (gUnknown_02022D06 == 4)
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_HasSavedGame[0], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_HasSavedGame[1], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_HasSavedGame[2], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_HasSavedGame[3], MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_HasSavedGame[4], MAIN_MENU_BORDER_TILE);
|
||||
tScrollArrowTaskId = AddScrollIndicatorArrowPair(&sScrollArrowsTemplate_MainMenu, &sCurrItemAndOptionMenuCheck);
|
||||
gTasks[tScrollArrowTaskId].func = Task_ScrollIndicatorArrowPairOnMainMenu;
|
||||
if (sCurrItemAndOptionMenuCheck == 4)
|
||||
{
|
||||
ChangeBgY(0, 0x2000, 1);
|
||||
ChangeBgY(1, 0x2000, 1);
|
||||
data[14] = 1;
|
||||
gTasks[data[13]].data[15] = 1;
|
||||
tIsScrolled = TRUE;
|
||||
gTasks[tScrollArrowTaskId].tArrowTaskIsScrolled = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -604,7 +623,7 @@ void Task_DisplayMainMenu(u8 taskId)
|
||||
|
||||
void Task_HighlightSelectedMainMenuItem(u8 taskId)
|
||||
{
|
||||
HighlightSelectedMainMenuItem(gTasks[taskId].data[0], gTasks[taskId].data[1], gTasks[taskId].data[14]);
|
||||
HighlightSelectedMainMenuItem(gTasks[taskId].tMenuType, gTasks[taskId].tCurrItem, gTasks[taskId].tIsScrolled);
|
||||
gTasks[taskId].func = Task_HandleMainMenuInput;
|
||||
}
|
||||
|
||||
@ -615,40 +634,40 @@ bool8 HandleMainMenuInput(u8 taskId)
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sub_80093CC();
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, RGB_BLACK);
|
||||
IsWirelessAdapterConnected(); // why bother calling this here? debug? Task_HandleMainMenuAPressed will check too
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_HandleMainMenuAPressed;
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0xF0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0xA0);
|
||||
gTasks[taskId].func = Task_HandleMainMenuBPressed;
|
||||
}
|
||||
else if ((gMain.newKeys & DPAD_UP) && data[1] > 0)
|
||||
else if ((gMain.newKeys & DPAD_UP) && tCurrItem > 0)
|
||||
{
|
||||
if (data[0] == 3 && data[14] == 1 && data[1] == 1)
|
||||
if (tMenuType == HAS_MYSTERY_EVENTS && tIsScrolled == TRUE && tCurrItem == 1)
|
||||
{
|
||||
ChangeBgY(0, 0x2000, 2);
|
||||
ChangeBgY(1, 0x2000, 2);
|
||||
gTasks[data[13]].data[15] = data[14] = 0;
|
||||
gTasks[tScrollArrowTaskId].tArrowTaskIsScrolled = tIsScrolled = FALSE;
|
||||
}
|
||||
data[1]--;
|
||||
gUnknown_02022D06 = data[1];
|
||||
tCurrItem--;
|
||||
sCurrItemAndOptionMenuCheck = tCurrItem;
|
||||
return TRUE;
|
||||
}
|
||||
else if ((gMain.newKeys & DPAD_DOWN) && data[1] < data[12] - 1)
|
||||
else if ((gMain.newKeys & DPAD_DOWN) && tCurrItem < tItemCount - 1)
|
||||
{
|
||||
if (data[0] == 3 && data[1] == 3 && data[14] == 0)
|
||||
if (tMenuType == HAS_MYSTERY_EVENTS && tCurrItem == 3 && tIsScrolled == FALSE)
|
||||
{
|
||||
ChangeBgY(0, 0x2000, 1);
|
||||
ChangeBgY(1, 0x2000, 1);
|
||||
gTasks[data[13]].data[15] = data[14] = 1;
|
||||
gTasks[tScrollArrowTaskId].tArrowTaskIsScrolled = tIsScrolled = TRUE;
|
||||
}
|
||||
data[1]++;
|
||||
gUnknown_02022D06 = data[1];
|
||||
tCurrItem++;
|
||||
sCurrItemAndOptionMenuCheck = tCurrItem;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@ -662,13 +681,13 @@ void Task_HandleMainMenuInput(u8 taskId)
|
||||
|
||||
void Task_HandleMainMenuAPressed(u8 taskId)
|
||||
{
|
||||
bool8 r2;
|
||||
bool8 wirelessAdapterConnected;
|
||||
u8 action;
|
||||
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
if (gTasks[taskId].data[0] == 3)
|
||||
RemoveScrollIndicatorArrowPair(gTasks[taskId].data[13]);
|
||||
if (gTasks[taskId].tMenuType == HAS_MYSTERY_EVENTS)
|
||||
RemoveScrollIndicatorArrowPair(gTasks[taskId].tScrollArrowTaskId);
|
||||
sub_819746C(0, 1);
|
||||
sub_819746C(1, 1);
|
||||
sub_819746C(2, 1);
|
||||
@ -677,103 +696,103 @@ void Task_HandleMainMenuAPressed(u8 taskId)
|
||||
sub_819746C(5, 1);
|
||||
sub_819746C(6, 1);
|
||||
sub_819746C(7, 1);
|
||||
r2 = sub_80093CC();
|
||||
switch (gTasks[taskId].data[0])
|
||||
wirelessAdapterConnected = IsWirelessAdapterConnected();
|
||||
switch (gTasks[taskId].tMenuType)
|
||||
{
|
||||
case HAS_NO_SAVED_GAME:
|
||||
default:
|
||||
switch (gTasks[taskId].data[1])
|
||||
switch (gTasks[taskId].tCurrItem)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
action = 0;
|
||||
action = ACTION_NEW_GAME;
|
||||
break;
|
||||
case 1:
|
||||
action = 2;
|
||||
action = ACTION_OPTIONS;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case HAS_SAVED_GAME:
|
||||
switch (gTasks[taskId].data[1])
|
||||
switch (gTasks[taskId].tCurrItem)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
action = 1;
|
||||
action = ACTION_CONTINUE;
|
||||
break;
|
||||
case 1:
|
||||
action = 0;
|
||||
action = ACTION_NEW_GAME;
|
||||
break;
|
||||
case 2:
|
||||
action = 2;
|
||||
action = ACTION_OPTIONS;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case HAS_MYSTERY_GIFT:
|
||||
switch (gTasks[taskId].data[1])
|
||||
switch (gTasks[taskId].tCurrItem)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
action = 1;
|
||||
action = ACTION_CONTINUE;
|
||||
break;
|
||||
case 1:
|
||||
action = 0;
|
||||
action = ACTION_NEW_GAME;
|
||||
break;
|
||||
case 2:
|
||||
action = 3;
|
||||
if (r2 == FALSE)
|
||||
action = ACTION_MYSTERY_GIFT;
|
||||
if (!wirelessAdapterConnected)
|
||||
{
|
||||
action = 6;
|
||||
gTasks[taskId].data[0] = 0;
|
||||
action = ACTION_INVALID;
|
||||
gTasks[taskId].tMenuType = 0;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
action = 2;
|
||||
action = ACTION_OPTIONS;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case HAS_MYSTERY_EVENTS:
|
||||
switch (gTasks[taskId].data[1])
|
||||
switch (gTasks[taskId].tCurrItem)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
action = 1;
|
||||
action = ACTION_CONTINUE;
|
||||
break;
|
||||
case 1:
|
||||
action = 0;
|
||||
action = ACTION_NEW_GAME;
|
||||
break;
|
||||
case 2:
|
||||
if (gTasks[taskId].data[15])
|
||||
if (gTasks[taskId].tWirelessAdapterConnected)
|
||||
{
|
||||
action = 3;
|
||||
if (r2 == FALSE)
|
||||
action = ACTION_MYSTERY_GIFT;
|
||||
if (!wirelessAdapterConnected)
|
||||
{
|
||||
action = 6;
|
||||
gTasks[taskId].data[0] = 0;
|
||||
action = ACTION_INVALID;
|
||||
gTasks[taskId].tMenuType = 0;
|
||||
}
|
||||
}
|
||||
else if (r2)
|
||||
else if (wirelessAdapterConnected)
|
||||
{
|
||||
action = 6;
|
||||
gTasks[taskId].data[0] = 1;
|
||||
action = ACTION_INVALID;
|
||||
gTasks[taskId].tMenuType = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
action = 5;
|
||||
action = ACTION_UNKNOWN;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (r2)
|
||||
if (wirelessAdapterConnected)
|
||||
{
|
||||
action = 6;
|
||||
gTasks[taskId].data[0] = 2;
|
||||
action = ACTION_INVALID;
|
||||
gTasks[taskId].tMenuType = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
action = 4;
|
||||
action = ACTION_MYSTERY_EVENTS;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
action = 2;
|
||||
action = ACTION_OPTIONS;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -782,37 +801,37 @@ void Task_HandleMainMenuAPressed(u8 taskId)
|
||||
ChangeBgY(1, 0, 0);
|
||||
switch (action)
|
||||
{
|
||||
case 0:
|
||||
case ACTION_NEW_GAME:
|
||||
default:
|
||||
gPlttBufferUnfaded[0] = RGB_BLACK;
|
||||
gPlttBufferFaded[0] = RGB_BLACK;
|
||||
gTasks[taskId].func = task_new_game_prof_birch_speech_1;
|
||||
break;
|
||||
case 1:
|
||||
case ACTION_CONTINUE:
|
||||
gPlttBufferUnfaded[0] = RGB_BLACK;
|
||||
gPlttBufferFaded[0] = RGB_BLACK;
|
||||
SetMainCallback2(CB2_ContinueSavedGame);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
case 2:
|
||||
case ACTION_OPTIONS:
|
||||
gMain.savedCallback = CB2_ReinitMainMenu;
|
||||
SetMainCallback2(CB2_InitOptionMenu);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
case 3:
|
||||
case ACTION_MYSTERY_GIFT:
|
||||
SetMainCallback2(c2_mystery_gift);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
case 4:
|
||||
case ACTION_MYSTERY_EVENTS:
|
||||
SetMainCallback2(CB2_InitMysteryEventMenu);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
case 5:
|
||||
case ACTION_UNKNOWN:
|
||||
SetMainCallback2(sub_801867C);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
case 6:
|
||||
gTasks[taskId].data[1] = 0;
|
||||
case ACTION_INVALID:
|
||||
gTasks[taskId].tCurrItem = 0;
|
||||
gTasks[taskId].func = Task_DisplayMainMenuInvalidActionError;
|
||||
gPlttBufferUnfaded[0xF1] = RGB_WHITE;
|
||||
gPlttBufferFaded[0xF1] = RGB_WHITE;
|
||||
@ -822,14 +841,14 @@ void Task_HandleMainMenuAPressed(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
return;
|
||||
}
|
||||
FreeAllWindowBuffers();
|
||||
if (action != 2)
|
||||
gUnknown_02022D06 = 0;
|
||||
if (action != ACTION_OPTIONS)
|
||||
sCurrItemAndOptionMenuCheck = 0;
|
||||
else
|
||||
gUnknown_02022D06 |= 0x8000;
|
||||
sCurrItemAndOptionMenuCheck |= 0x8000; // entering the options menu
|
||||
}
|
||||
}
|
||||
|
||||
@ -837,9 +856,9 @@ void Task_HandleMainMenuBPressed(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
if (gTasks[taskId].data[0] == 3)
|
||||
RemoveScrollIndicatorArrowPair(gTasks[taskId].data[13]);
|
||||
gUnknown_02022D06 = 0;
|
||||
if (gTasks[taskId].tMenuType == 3)
|
||||
RemoveScrollIndicatorArrowPair(gTasks[taskId].tScrollArrowTaskId);
|
||||
sCurrItemAndOptionMenuCheck = 0;
|
||||
FreeAllWindowBuffers();
|
||||
SetMainCallback2(CB2_InitTitleScreen);
|
||||
DestroyTask(taskId);
|
||||
@ -848,11 +867,11 @@ void Task_HandleMainMenuBPressed(u8 taskId)
|
||||
|
||||
void Task_DisplayMainMenuInvalidActionError(u8 taskId)
|
||||
{
|
||||
switch (gTasks[taskId].data[1])
|
||||
switch (gTasks[taskId].tCurrItem)
|
||||
{
|
||||
case 0:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 30, 20);
|
||||
switch (gTasks[taskId].data[0])
|
||||
switch (gTasks[taskId].tMenuType)
|
||||
{
|
||||
case 0:
|
||||
CreateMainMenuErrorWindow(gText_WirelessNotConnected);
|
||||
@ -864,30 +883,39 @@ void Task_DisplayMainMenuInvalidActionError(u8 taskId)
|
||||
CreateMainMenuErrorWindow(gText_MysteryEventsCantUse);
|
||||
break;
|
||||
}
|
||||
gTasks[taskId].data[1]++;
|
||||
gTasks[taskId].tCurrItem++;
|
||||
break;
|
||||
case 1:
|
||||
if (!gPaletteFade.active)
|
||||
gTasks[taskId].data[1]++;
|
||||
gTasks[taskId].tCurrItem++;
|
||||
break;
|
||||
case 2:
|
||||
RunTextPrinters();
|
||||
if (!IsTextPrinterActive(7))
|
||||
gTasks[taskId].data[1]++;
|
||||
gTasks[taskId].tCurrItem++;
|
||||
break;
|
||||
case 3:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_HandleMainMenuBPressed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HighlightSelectedMainMenuItem(u8 menuType, u8 selectedMenuItem, s16 a)
|
||||
#undef tMenuType
|
||||
#undef tCurrItem
|
||||
#undef tItemCount
|
||||
#undef tScrollArrowTaskId
|
||||
#undef tIsScrolled
|
||||
#undef tWirelessAdapterConnected
|
||||
|
||||
#undef tArrowTaskIsScrolled
|
||||
|
||||
void HighlightSelectedMainMenuItem(u8 menuType, u8 selectedMenuItem, s16 isScrolled)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0x9E7);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WINHV_COORDS(9, 231));
|
||||
|
||||
switch (menuType)
|
||||
{
|
||||
@ -897,10 +925,10 @@ void HighlightSelectedMainMenuItem(u8 menuType, u8 selectedMenuItem, s16 a)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x11F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(1, 31));
|
||||
break;
|
||||
case 1:
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x213F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(33, 63));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -909,13 +937,13 @@ void HighlightSelectedMainMenuItem(u8 menuType, u8 selectedMenuItem, s16 a)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x13F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(1, 63));
|
||||
break;
|
||||
case 1:
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x415F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(65, 95));
|
||||
break;
|
||||
case 2:
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x617F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(97, 127));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -924,16 +952,16 @@ void HighlightSelectedMainMenuItem(u8 menuType, u8 selectedMenuItem, s16 a)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x13F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(1, 63));
|
||||
break;
|
||||
case 1:
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x415F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(65, 95));
|
||||
break;
|
||||
case 2:
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x617F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(97, 127));
|
||||
break;
|
||||
case 3:
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x819F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(129, 159));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -942,28 +970,28 @@ void HighlightSelectedMainMenuItem(u8 menuType, u8 selectedMenuItem, s16 a)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x13F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(1, 63));
|
||||
break;
|
||||
case 1:
|
||||
if (a)
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x213F);
|
||||
if (isScrolled)
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(33, 63));
|
||||
else
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x415F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(65, 95));
|
||||
break;
|
||||
case 2:
|
||||
if (a)
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x415F);
|
||||
if (isScrolled)
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(65, 95));
|
||||
else
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x617F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(97, 127));
|
||||
break;
|
||||
case 3:
|
||||
if (a)
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x617F);
|
||||
if (isScrolled)
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(97, 127));
|
||||
else
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x819F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(129, 159));
|
||||
break;
|
||||
case 4:
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x819F);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WINHV_COORDS(129, 159));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -992,7 +1020,7 @@ void task_new_game_prof_birch_speech_1(u8 taskId)
|
||||
FreeAllSpritePalettes();
|
||||
dp13_810BB8C();
|
||||
AddBirchSpeechObjects(taskId);
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
gTasks[taskId].data[4] = 0;
|
||||
gTasks[taskId].func = task_new_game_prof_birch_speech_2;
|
||||
gTasks[taskId].data[2] = 0xFF;
|
||||
@ -1298,7 +1326,7 @@ void task_new_game_prof_birch_speech_16(u8 taskId)
|
||||
{
|
||||
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = task_new_game_prof_birch_speech_17;
|
||||
}
|
||||
}
|
||||
@ -1547,7 +1575,7 @@ void new_game_prof_birch_speech_part2_start(void)
|
||||
gSprites[spriteId].invisible = 0;
|
||||
gTasks[taskId].data[2] = spriteId;
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, -60);
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 0);
|
||||
@ -1797,7 +1825,7 @@ void CreateMainMenuErrorWindow(const u8* str)
|
||||
PrintTextOnWindow(7, 1, str, 0, 1, 2, 0);
|
||||
PutWindowTilemap(7);
|
||||
CopyWindowToVram(7, 2);
|
||||
DrawMainMenuWindowBorder(gUnknown_082FF070, MAIN_MENU_BORDER_TILE);
|
||||
DrawMainMenuWindowBorder(sWindowTemplate_ErrorWindow, MAIN_MENU_BORDER_TILE);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0x9E7);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x719F);
|
||||
}
|
||||
@ -1892,7 +1920,7 @@ void DrawMainMenuWindowBorder(const struct WindowTemplate *template, u16 baseTil
|
||||
CopyBgTilemapBufferToVram(template->priority);
|
||||
}
|
||||
|
||||
void sub_8032250(const struct WindowTemplate *template)
|
||||
static void ClearMainMenuWindowTilemap(const struct WindowTemplate *template)
|
||||
{
|
||||
FillBgTilemapBufferRect(template->priority, 0, template->tilemapLeft - 1, template->tilemapTop - 1, template->tilemapLeft + template->width + 1, template->tilemapTop + template->height + 1, 2);
|
||||
CopyBgTilemapBufferToVram(template->priority);
|
||||
@ -1914,11 +1942,11 @@ void sub_80322E0(u8 windowId, u8 a)
|
||||
|
||||
void sub_8032318(u8 a)
|
||||
{
|
||||
u8 fontAttribute = GetFontAttribute(1, 6);
|
||||
u8 fontAttribute2 = GetFontAttribute(1, 0);
|
||||
u8 fontAttribute3 = GetFontAttribute(1, 1);
|
||||
u8 windowAttribute = GetWindowAttribute(a, 3);
|
||||
u8 windowAttribute2 = GetWindowAttribute(a, 4);
|
||||
u8 fontAttribute = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND);
|
||||
u8 fontAttribute2 = GetFontAttribute(1, FONTATTR_MAX_LETTER_WIDTH);
|
||||
u8 fontAttribute3 = GetFontAttribute(1, FONTATTR_MAX_LETTER_HEIGHT);
|
||||
u8 windowAttribute = GetWindowAttribute(a, WINDOW_WIDTH);
|
||||
u8 windowAttribute2 = GetWindowAttribute(a, WINDOW_HEIGHT);
|
||||
|
||||
FillWindowPixelRect(a, fontAttribute, 0, 0, fontAttribute2 * windowAttribute, fontAttribute3 * windowAttribute2);
|
||||
CopyWindowToVram(a, 2);
|
||||
|
@ -463,7 +463,7 @@ static void LoadMapNamePopUpWindowBg(void)
|
||||
}
|
||||
popUpThemeId = gRegionMapSectionId_To_PopUpThemeIdMapping[regionMapSectionId];
|
||||
|
||||
LoadBgTiles(GetWindowAttribute(popupWindowId, 0), &(gMapPopUp_Outline_Table[popUpThemeId][0]), 0x400, 0x21D);
|
||||
LoadBgTiles(GetWindowAttribute(popupWindowId, WINDOW_PRIORITY), &(gMapPopUp_Outline_Table[popUpThemeId][0]), 0x400, 0x21D);
|
||||
CallWindowFunction(popupWindowId, sub_80D4A78);
|
||||
PutWindowTilemap(popupWindowId);
|
||||
if(gMapHeader.weather == WEATHER_BUBBLES)
|
||||
|
30
src/menu.c
30
src/menu.c
@ -194,7 +194,7 @@ void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonP
|
||||
void sub_81973A4(void)
|
||||
{
|
||||
copy_textbox_border_tile_patterns_to_vram(0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10);
|
||||
sub_809882C(0, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM * 0x10);
|
||||
LoadUserWindowBorderGfx(0, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM * 0x10);
|
||||
}
|
||||
|
||||
void NewMenuHelpers_DrawDialogueFrame(u8 windowId, bool8 copyToVram)
|
||||
@ -1107,12 +1107,12 @@ void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 l
|
||||
|
||||
printer.windowId = windowId;
|
||||
printer.fontId = fontId;
|
||||
printer.fgColor = GetFontAttribute(fontId, 5);
|
||||
printer.bgColor = GetFontAttribute(fontId, 6);
|
||||
printer.shadowColor = GetFontAttribute(fontId, 7);
|
||||
printer.fontColor_l = GetFontAttribute(fontId, 4);
|
||||
printer.fgColor = GetFontAttribute(fontId, FONTATTR_COLOR_FOREGROUND);
|
||||
printer.bgColor = GetFontAttribute(fontId, FONTATTR_COLOR_BACKGROUND);
|
||||
printer.shadowColor = GetFontAttribute(fontId, FONTATTR_COLOR_SHADOW);
|
||||
printer.fontColor_l = GetFontAttribute(fontId, FONTATTR_COLOR_LOWNIBBLE);
|
||||
printer.letterSpacing = letterSpacing;
|
||||
printer.lineSpacing = GetFontAttribute(fontId, 3);
|
||||
printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING);
|
||||
printer.x = left;
|
||||
printer.currentX = left;
|
||||
|
||||
@ -1129,7 +1129,7 @@ void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 l
|
||||
|
||||
void sub_81989B8(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *strs, const u8 *a5)
|
||||
{
|
||||
AddItemMenuActionTextPrinters(windowId, fontId, GetFontAttribute(fontId, 0), 1, GetFontAttribute(fontId, 2), lineHeight, itemCount, strs, a5);
|
||||
AddItemMenuActionTextPrinters(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 1, GetFontAttribute(fontId, FONTATTR_LETTER_SPACING), lineHeight, itemCount, strs, a5);
|
||||
}
|
||||
|
||||
void SetWindowTemplateFields(struct WindowTemplate *template, u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock)
|
||||
@ -1167,20 +1167,20 @@ void sub_8198AF8(const struct WindowTemplate *window, u8 fontId, u8 left, u8 top
|
||||
printer.current_text_offset = gText_YesNo;
|
||||
printer.windowId = gUnknown_0203CD9F;
|
||||
printer.fontId = fontId;
|
||||
printer.x = GetFontAttribute(fontId, 0) + left;
|
||||
printer.x = GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH) + left;
|
||||
printer.y = top;
|
||||
printer.currentX = printer.x;
|
||||
printer.currentY = printer.y;
|
||||
printer.fgColor = GetFontAttribute(fontId, 5);
|
||||
printer.bgColor = GetFontAttribute(fontId, 6);
|
||||
printer.shadowColor = GetFontAttribute(fontId, 7);
|
||||
printer.fontColor_l = GetFontAttribute(fontId, 4);
|
||||
printer.letterSpacing = GetFontAttribute(fontId, 2);
|
||||
printer.lineSpacing = GetFontAttribute(fontId, 3);
|
||||
printer.fgColor = GetFontAttribute(fontId, FONTATTR_COLOR_FOREGROUND);
|
||||
printer.bgColor = GetFontAttribute(fontId, FONTATTR_COLOR_BACKGROUND);
|
||||
printer.shadowColor = GetFontAttribute(fontId, FONTATTR_COLOR_SHADOW);
|
||||
printer.fontColor_l = GetFontAttribute(fontId, FONTATTR_COLOR_LOWNIBBLE);
|
||||
printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING);
|
||||
printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING);
|
||||
|
||||
AddTextPrinter(&printer, 0xFF, NULL);
|
||||
|
||||
sub_81983AC(gUnknown_0203CD9F, fontId, left, top, GetFontAttribute(fontId, 1), 2, initialCursorPos);
|
||||
sub_81983AC(gUnknown_0203CD9F, fontId, left, top, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT), 2, initialCursorPos);
|
||||
}
|
||||
|
||||
void sub_8198C34(const struct WindowTemplate *window, u8 fontId, u16 baseTileNum, u8 paletteNum)
|
||||
|
@ -77,7 +77,7 @@ void CB2_InitMysteryEventMenu(void)
|
||||
FillWindowPixelBuffer(i, 0);
|
||||
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14);
|
||||
sub_809882C(0, 1u, 0xD0u);
|
||||
LoadUserWindowBorderGfx(0, 1u, 0xD0u);
|
||||
sub_81978B0(0xE0);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
@ -121,7 +121,7 @@ static void CB2_MysteryEventMenu(void)
|
||||
PutWindowTilemap(0);
|
||||
CopyWindowToVram(0, 3);
|
||||
ShowBg(0);
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 1:
|
||||
@ -264,7 +264,7 @@ static void CB2_MysteryEventMenu(void)
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 16:
|
||||
|
@ -235,7 +235,7 @@ void CB2_InitOptionMenu(void)
|
||||
break;
|
||||
}
|
||||
case 11:
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
SetMainCallback2(MainCB2);
|
||||
return;
|
||||
@ -344,7 +344,7 @@ static void Task_OptionMenuSave(u8 taskId)
|
||||
gSaveBlock2Ptr->optionsButtonMode = gTasks[taskId].data[TD_BUTTONMODE];
|
||||
gSaveBlock2Ptr->optionsWindowFrameType = gTasks[taskId].data[TD_FRAMETYPE];
|
||||
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gTasks[taskId].func = Task_OptionMenuFadeOut;
|
||||
}
|
||||
|
||||
|
@ -903,7 +903,7 @@ static void sub_816BEF0(s32 id)
|
||||
static void ItemStorage_StartScrollIndicator(void)
|
||||
{
|
||||
if(playerPCItemPageInfo.scrollIndicatorId == 0xFF)
|
||||
playerPCItemPageInfo.scrollIndicatorId = AddScrollIndicatorArrowPairParametrized(0x2, 0xB0, 0xC, 0x94, playerPCItemPageInfo.count - playerPCItemPageInfo.pageItems, 0x13F8, 0x13F8, &(playerPCItemPageInfo.itemsAbove));
|
||||
playerPCItemPageInfo.scrollIndicatorId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 0xB0, 0xC, 0x94, playerPCItemPageInfo.count - playerPCItemPageInfo.pageItems, 0x13F8, 0x13F8, &(playerPCItemPageInfo.itemsAbove));
|
||||
}
|
||||
|
||||
static void ItemStorage_RemoveScrollIndicator(void)
|
||||
@ -1116,7 +1116,7 @@ static void ItemStorage_ItemSwapChoosePrompt(u8 taskId)
|
||||
s16 *data;
|
||||
|
||||
data = gTasks[taskId].data;
|
||||
sub_81AF15C(data[5], 16, 1);
|
||||
ListMenuSetUnkIndicatorsStructField(data[5], 16, 1);
|
||||
gUnknown_0203BCC4->unk666 = (playerPCItemPageInfo.itemsAbove + playerPCItemPageInfo.cursorPos);
|
||||
sub_816BFB8(data[5], 0, 0);
|
||||
sub_816C690(gUnknown_0203BCC4->unk666);
|
||||
|
@ -75,7 +75,7 @@ extern const u16 gUnknown_0860F074[];
|
||||
|
||||
extern void CB2_ReturnToField(void);
|
||||
extern bool8 sub_81221EC(void);
|
||||
extern void sub_809882C(u8, u16, u8);
|
||||
extern void LoadUserWindowBorderGfx(u8, u16, u8);
|
||||
extern void copy_textbox_border_tile_patterns_to_vram(u8, u16, u8);
|
||||
extern void sub_80AF168(void);
|
||||
|
||||
@ -315,19 +315,19 @@ static const struct ListMenuTemplate sPokeblockListMenuTemplate =
|
||||
{
|
||||
.items = NULL,
|
||||
.moveCursorFunc = MovePokeblockMenuCursor,
|
||||
.unk_08 = NULL,
|
||||
.itemPrintFunc = NULL,
|
||||
.totalItems = 0,
|
||||
.maxShowed = 0,
|
||||
.windowId = 1,
|
||||
.unk_11 = 0,
|
||||
.unk_12 = 1,
|
||||
.header_X = 0,
|
||||
.item_X = 1,
|
||||
.cursor_X = 0,
|
||||
.upText_Y = 1,
|
||||
.cursorPal = 2,
|
||||
.fillValue = 0,
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.unk_16_3 = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD,
|
||||
.fontId = 1,
|
||||
.cursorKind = 1
|
||||
@ -492,7 +492,7 @@ static bool8 InitPokeblockMenu(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 18:
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
gPaletteFade.bufferTransferDisabled = 0;
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -566,7 +566,7 @@ static void HandleInitWindows(void)
|
||||
|
||||
InitWindows(sWindowTemplatesForPokeblockMenu);
|
||||
DeactivateAllTextPrinters();
|
||||
sub_809882C(0, 1, 0xE0);
|
||||
LoadUserWindowBorderGfx(0, 1, 0xE0);
|
||||
copy_textbox_border_tile_patterns_to_vram(0, 0xA, 0xD0);
|
||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||
|
||||
@ -807,7 +807,7 @@ static void sub_81363BC(void)
|
||||
{
|
||||
if (sPokeblockMenu->unkTaskId == 0xFF)
|
||||
{
|
||||
sPokeblockMenu->unkTaskId = AddScrollIndicatorArrowPairParametrized(2, 0xB0, 8, 0x98, sPokeblockMenu->itemsNo - sPokeblockMenu->maxShowed,
|
||||
sPokeblockMenu->unkTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 0xB0, 8, 0x98, sPokeblockMenu->itemsNo - sPokeblockMenu->maxShowed,
|
||||
0x456, 0x456, &sSavedPokeblockData.lastItemPage);
|
||||
}
|
||||
}
|
||||
@ -855,7 +855,7 @@ static void sub_8136470(struct Sprite *sprite)
|
||||
|
||||
static void FadePaletteAndSetTaskToClosePokeblockCase(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gTasks[taskId].func = Task_FreeDataAndExitPokeblockCase;
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ extern const u16 gUnknown_0860F074[];
|
||||
|
||||
extern bool8 sub_81221EC(void);
|
||||
extern void sub_806A068(u16, u8);
|
||||
extern void sub_809882C(u8, u16, u8);
|
||||
extern void LoadUserWindowBorderGfx(u8, u16, u8);
|
||||
|
||||
// this file's functions
|
||||
static void HandleInitBackgrounds(void);
|
||||
@ -597,7 +597,7 @@ static bool8 TransitionToPokeblockFeedScene(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 13:
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
gPaletteFade.bufferTransferDisabled = 0;
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -706,7 +706,7 @@ static void HandleInitWindows(void)
|
||||
{
|
||||
InitWindows(sWindowTemplates);
|
||||
DeactivateAllTextPrinters();
|
||||
sub_809882C(0, 1, 0xE0);
|
||||
LoadUserWindowBorderGfx(0, 1, 0xE0);
|
||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||
FillWindowPixelBuffer(0, 0);
|
||||
PutWindowTilemap(0);
|
||||
@ -811,7 +811,7 @@ static void Task_ReturnAfterPaletteFade(u8 taskId)
|
||||
|
||||
static void Task_PaletteFadeToReturn(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gTasks[taskId].func = Task_ReturnAfterPaletteFade;
|
||||
}
|
||||
|
||||
|
@ -541,7 +541,7 @@ bool8 sub_81BFB10(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 24:
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
gPaletteFade.bufferTransferDisabled = 0;
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -761,7 +761,7 @@ void sub_81C0434()
|
||||
|
||||
void sub_81C044C(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
gTasks[taskId].func = sub_81C0484;
|
||||
}
|
||||
|
||||
|
@ -1563,7 +1563,7 @@ static void Task_DuoFightAnim(u8 taskId)
|
||||
}
|
||||
|
||||
BlendPalettes(-1, 0x10, 0);
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
SetVBlankCallback(VBlankCB_DuoFight);
|
||||
PlaySE(SE_T_OOAME);
|
||||
}
|
||||
@ -1715,7 +1715,7 @@ static void sub_81D752C(u8 taskId)
|
||||
static void DuoFightEnd(u8 taskId, s8 palDelay)
|
||||
{
|
||||
PlaySE(SE_T_OOAME_E);
|
||||
BeginNormalPaletteFade(-1, palDelay, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, palDelay, 0, 0x10, 0);
|
||||
gTasks[taskId].func = Task_DuoFightEnd;
|
||||
}
|
||||
|
||||
@ -1971,7 +1971,7 @@ static void Task_HandleRayTakesFlight(u8 taskId)
|
||||
case 0:
|
||||
if (data[1] == 8)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
data[2] = 0;
|
||||
data[3] = 30;
|
||||
data[4] = 0;
|
||||
@ -2012,7 +2012,7 @@ static void Task_HandleRayTakesFlight(u8 taskId)
|
||||
if (data[1] > 295)
|
||||
{
|
||||
data[0]++;
|
||||
BeginNormalPaletteFade(-1, 6, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 6, 0, 0x10, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -2174,7 +2174,7 @@ static void Task_HandleRayDescends(u8 taskId)
|
||||
case 0:
|
||||
if (data[1] == 8)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
data[1] = 0;
|
||||
data[0]++;
|
||||
}
|
||||
@ -2219,7 +2219,7 @@ static void Task_HandleRayDescends(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gTasks[taskId].func = Task_RayDescendsEnd;
|
||||
break;
|
||||
}
|
||||
@ -2366,7 +2366,7 @@ static void Task_HandleRayCharges(u8 taskId)
|
||||
case 0:
|
||||
if (data[1] == 8)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
data[1] = 0;
|
||||
data[0]++;
|
||||
}
|
||||
@ -2399,7 +2399,7 @@ static void Task_HandleRayCharges(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
gTasks[taskId].func = Task_RayChargesEnd;
|
||||
break;
|
||||
}
|
||||
@ -2532,7 +2532,7 @@ static void Task_HandleRayChasesAway(u8 taskId)
|
||||
if (data[1] == 8)
|
||||
{
|
||||
sub_81D90A8(taskId);
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
data[1] = 0;
|
||||
data[0]++;
|
||||
}
|
||||
@ -2574,7 +2574,7 @@ static void Task_HandleRayChasesAway(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
BeginNormalPaletteFade(-1, 4, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, 0);
|
||||
gTasks[taskId].func = Task_RayChasesAwayEnd;
|
||||
break;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ u8 RecordedBattle_GetBattlerAction(u8 battlerId)
|
||||
{
|
||||
gSpecialVar_Result = gBattleOutcome = B_OUTCOME_PLAYER_TELEPORTED; // hah
|
||||
ResetPaletteFadeControl();
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
SetMainCallback2(CB2_QuitRecordedBattle);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1603,7 +1603,7 @@ void MCB2_FlyMap(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 3:
|
||||
sub_809882C(0, 0x65, 0xd0);
|
||||
LoadUserWindowBorderGfx(0, 0x65, 0xd0);
|
||||
clear_scheduled_bg_copies_to_vram();
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -1849,7 +1849,7 @@ static void sub_8124D14(void)
|
||||
switch (gUnknown_0203A148->unk_004)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
gUnknown_0203A148->unk_004++;
|
||||
break;
|
||||
case 1:
|
||||
@ -1896,7 +1896,7 @@ static void sub_8124E0C(void)
|
||||
switch (gUnknown_0203A148->unk_004)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
gUnknown_0203A148->unk_004++;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -552,7 +552,7 @@ static void Task_ResetRtcScreen(u8 taskId)
|
||||
switch (data[0])
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(-1, 1, 0x10, 0, 0xFFFF);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0x10, 0, 0xFFFF);
|
||||
data[0] = 1;
|
||||
break;
|
||||
case 1:
|
||||
@ -621,7 +621,7 @@ static void Task_ResetRtcScreen(u8 taskId)
|
||||
case 5:
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 1, 0, 0x10, 0xFFFF);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0, 0x10, 0xFFFF);
|
||||
data[0] = 6;
|
||||
}
|
||||
else
|
||||
|
@ -1517,7 +1517,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
|
||||
|
||||
winTemplate = sub_8198A50(0, xWindow, yWindow + 1, width, height, 0xF, 0x1);
|
||||
gUnknown_03000F30 = AddWindow(&winTemplate);
|
||||
sub_809882C(gUnknown_03000F30, 0x214, 0xE0);
|
||||
LoadUserWindowBorderGfx(gUnknown_03000F30, 0x214, 0xE0);
|
||||
NewMenuHelpers_DrawStdWindowFrame(gUnknown_03000F30, 0);
|
||||
PutWindowTilemap(gUnknown_03000F30);
|
||||
FillWindowPixelBuffer(gUnknown_03000F30, 0x11);
|
||||
|
@ -940,7 +940,7 @@ void sub_80E9E44(u8 taskId)
|
||||
s16 *data;
|
||||
|
||||
data = gTasks[taskId].data;
|
||||
data[8] = AddScrollIndicatorArrowPairParametrized(0x02, 0xbc, 0x0c, 0x94, data[0] - data[3], 0x13f8, 0x13f8, &data[2]);
|
||||
data[8] = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 0xbc, 0x0c, 0x94, data[0] - data[3], 0x13f8, 0x13f8, &data[2]);
|
||||
}
|
||||
|
||||
void sub_80E9E90(u8 taskId)
|
||||
|
@ -1261,7 +1261,7 @@ static void sub_80A0550(u8 taskId)
|
||||
sub_8098858(0, 8, 14);
|
||||
PutWindowTilemap(0);
|
||||
CopyWindowToVram(0, 3);
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
|
||||
if (gWirelessCommType != 0 && InUnionRoom())
|
||||
{
|
||||
@ -1294,7 +1294,7 @@ static void sub_80A0550(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
*step = 4;
|
||||
break;
|
||||
case 4:
|
||||
|
@ -46,7 +46,7 @@ extern const u8 gStarterChoose_LabelCoords[][2];
|
||||
extern const u8 gUnknown_085B1E0C[];
|
||||
extern const u8 gUnknown_085B1E28[][2];
|
||||
|
||||
extern void sub_809882C(u8, u16, u8);
|
||||
extern void LoadUserWindowBorderGfx(u8, u16, u8);
|
||||
extern void ScanlineEffect_Stop(void);
|
||||
extern void clear_scheduled_bg_copies_to_vram(void);
|
||||
extern void dp13_810BB8C(void);
|
||||
@ -126,7 +126,7 @@ void CB2_ChooseStarter(void)
|
||||
InitWindows(gUnknown_085B1DCC);
|
||||
|
||||
DeactivateAllTextPrinters();
|
||||
sub_809882C(0, 0x2A8, 0xD0);
|
||||
LoadUserWindowBorderGfx(0, 0x2A8, 0xD0);
|
||||
clear_scheduled_bg_copies_to_vram();
|
||||
ScanlineEffect_Stop();
|
||||
ResetTasks();
|
||||
@ -140,7 +140,7 @@ void CB2_ChooseStarter(void)
|
||||
LoadCompressedObjectPic(&gUnknown_085B1ED8[0]);
|
||||
LoadCompressedObjectPic(&gUnknown_085B1EE8[0]);
|
||||
LoadSpritePalettes(gUnknown_085B1EF8);
|
||||
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
|
||||
EnableInterrupts(DISPSTAT_VBLANK);
|
||||
SetVBlankCallback(VblankCB_StarterChoose);
|
||||
|
22
src/text.c
22
src/text.c
@ -3157,7 +3157,7 @@ u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing)
|
||||
width = lineWidths[strPos];
|
||||
}
|
||||
|
||||
return (u8)(GetFontAttribute(fontId, 0) + letterSpacing) * width;
|
||||
return (u8)(GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH) + letterSpacing) * width;
|
||||
}
|
||||
|
||||
u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32)
|
||||
@ -3193,7 +3193,7 @@ u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
return 0;
|
||||
|
||||
if (letterSpacing == -1)
|
||||
localLetterSpacing = GetFontAttribute(fontId, 2);
|
||||
localLetterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING);
|
||||
else
|
||||
localLetterSpacing = letterSpacing;
|
||||
|
||||
@ -3269,7 +3269,7 @@ u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
if (func == NULL)
|
||||
return 0;
|
||||
if (letterSpacing == -1)
|
||||
localLetterSpacing = GetFontAttribute(*str, 2);
|
||||
localLetterSpacing = GetFontAttribute(*str, FONTATTR_LETTER_SPACING);
|
||||
break;
|
||||
case 0x11:
|
||||
glyphWidth = *++str;
|
||||
@ -3497,28 +3497,28 @@ u8 GetFontAttribute(u8 fontId, u8 attributeId)
|
||||
int result = 0;
|
||||
switch (attributeId)
|
||||
{
|
||||
case 0:
|
||||
case FONTATTR_MAX_LETTER_WIDTH:
|
||||
result = gFontInfos[fontId].maxLetterWidth;
|
||||
break;
|
||||
case 1:
|
||||
case FONTATTR_MAX_LETTER_HEIGHT:
|
||||
result = gFontInfos[fontId].maxLetterHeight;
|
||||
break;
|
||||
case 2:
|
||||
case FONTATTR_LETTER_SPACING:
|
||||
result = gFontInfos[fontId].letterSpacing;
|
||||
break;
|
||||
case 3:
|
||||
case FONTATTR_LINE_SPACING:
|
||||
result = gFontInfos[fontId].lineSpacing;
|
||||
break;
|
||||
case 4:
|
||||
case FONTATTR_COLOR_LOWNIBBLE:
|
||||
result = gFontInfos[fontId].fontColor_l;
|
||||
break;
|
||||
case 5:
|
||||
case FONTATTR_COLOR_FOREGROUND:
|
||||
result = gFontInfos[fontId].fgColor;
|
||||
break;
|
||||
case 6:
|
||||
case FONTATTR_COLOR_BACKGROUND:
|
||||
result = gFontInfos[fontId].bgColor;
|
||||
break;
|
||||
case 7:
|
||||
case FONTATTR_COLOR_SHADOW:
|
||||
result = gFontInfos[fontId].shadowColor;
|
||||
break;
|
||||
}
|
||||
|
@ -99,18 +99,18 @@ void copy_textbox_border_tile_patterns_to_vram(u8 windowId, u16 destOffset, u8 p
|
||||
|
||||
void box_border_load_tiles_and_pal(u8 windowId, u16 destOffset, u8 palOffset)
|
||||
{
|
||||
sub_809882C(windowId, destOffset, palOffset);
|
||||
LoadUserWindowBorderGfx(windowId, destOffset, palOffset);
|
||||
}
|
||||
|
||||
void sub_80987D4(u8 windowId, u8 frameId, u16 destOffset, u8 palOffset)
|
||||
void LoadWindowGfx(u8 windowId, u8 frameId, u16 destOffset, u8 palOffset)
|
||||
{
|
||||
LoadBgTiles(GetWindowAttribute(windowId, WINDOW_PRIORITY), sWindowFrames[frameId].tiles, 0x120, destOffset);
|
||||
LoadPalette(sWindowFrames[frameId].pal, palOffset, 0x20);
|
||||
}
|
||||
|
||||
void sub_809882C(u8 windowId, u16 destOffset, u8 palOffset)
|
||||
void LoadUserWindowBorderGfx(u8 windowId, u16 destOffset, u8 palOffset)
|
||||
{
|
||||
sub_80987D4(windowId, gSaveBlock2Ptr->optionsWindowFrameType, destOffset, palOffset);
|
||||
LoadWindowGfx(windowId, gSaveBlock2Ptr->optionsWindowFrameType, destOffset, palOffset);
|
||||
}
|
||||
|
||||
void sub_8098858(u8 windowId, u16 tileNum, u8 palNum)
|
||||
|
@ -546,7 +546,7 @@ void CB2_InitTitleScreen(void)
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
BeginNormalPaletteFade(-1, 1, 0x10, 0, 0xFFFF);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0x10, 0, 0xFFFF);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
gMain.state = 4;
|
||||
break;
|
||||
@ -696,7 +696,7 @@ static void Task_TitleScreenPhase3(u8 taskId)
|
||||
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & START_BUTTON))
|
||||
{
|
||||
FadeOutBGM(4);
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0xFFFF);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0xFFFF);
|
||||
SetMainCallback2(CB2_GoToMainMenu);
|
||||
}
|
||||
else if ((gMain.heldKeys & CLEAR_SAVE_BUTTON_COMBO) == CLEAR_SAVE_BUTTON_COMBO)
|
||||
@ -707,13 +707,13 @@ static void Task_TitleScreenPhase3(u8 taskId)
|
||||
&& CanResetRTC() == TRUE)
|
||||
{
|
||||
FadeOutBGM(4);
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
SetMainCallback2(CB2_GoToResetRtcScreen);
|
||||
}
|
||||
else if ((gMain.heldKeys & BERRY_UPDATE_BUTTON_COMBO) == BERRY_UPDATE_BUTTON_COMBO)
|
||||
{
|
||||
FadeOutBGM(4);
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
SetMainCallback2(CB2_GoToBerryFixScreen);
|
||||
}
|
||||
else
|
||||
@ -730,7 +730,7 @@ static void Task_TitleScreenPhase3(u8 taskId)
|
||||
UpdateLegendaryMarkingColor(gTasks[taskId].tCounter);
|
||||
if ((gMPlayInfo_BGM.status & 0xFFFF) == 0)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0xFFFF);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0xFFFF);
|
||||
SetMainCallback2(CB2_GoToCopyrightScreen);
|
||||
}
|
||||
}
|
||||
|
@ -356,7 +356,7 @@ static bool8 sub_81DAB4C(struct Task *task)
|
||||
{
|
||||
if (task->data[3] == 31)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, -1, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, 0);
|
||||
task->tState++;
|
||||
}
|
||||
else
|
||||
|
@ -164,7 +164,7 @@ void sub_8166380(void)
|
||||
InitBgsFromTemplates(0, gUnknown_085DFCCC, ARRAY_COUNT(gUnknown_085DFCCC));
|
||||
InitWindows(gUnknown_085DFCDC);
|
||||
DeactivateAllTextPrinters();
|
||||
sub_809882C(0, 0x97, 0xE0);
|
||||
LoadUserWindowBorderGfx(0, 0x97, 0xE0);
|
||||
gUnknown_0203BC90->field_50++;
|
||||
break;
|
||||
case 4:
|
||||
|
@ -576,7 +576,7 @@ static void LoadWallClockGraphics(void)
|
||||
InitBgsFromTemplates(0, gUnknown_085B21FC, 3);
|
||||
InitWindows(gUnknown_085B21DC);
|
||||
DeactivateAllTextPrinters();
|
||||
sub_809882C(0, 0x250, 0xd0);
|
||||
LoadUserWindowBorderGfx(0, 0x250, 0xd0);
|
||||
clear_scheduled_bg_copies_to_vram();
|
||||
ScanlineEffect_Stop();
|
||||
ResetTasks();
|
||||
@ -589,7 +589,7 @@ static void LoadWallClockGraphics(void)
|
||||
|
||||
static void WallClockInit(void)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
EnableInterrupts(INTR_FLAG_VBLANK);
|
||||
SetVBlankCallback(WallClockVblankCallback);
|
||||
SetMainCallback2(WallClockMainCallback);
|
||||
@ -782,7 +782,7 @@ static void Task_SetClock4(u8 taskId)
|
||||
static void Task_SetClock5(u8 taskId)
|
||||
{
|
||||
RtcInitLocalTimeOffset(gTasks[taskId].tHours, gTasks[taskId].tMinutes);
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
gTasks[taskId].func = Task_SetClock6;
|
||||
}
|
||||
|
||||
@ -814,7 +814,7 @@ static void Task_ViewClock2(u8 taskId)
|
||||
|
||||
static void Task_ViewClock3(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
gTasks[taskId].func = Task_ViewClock4;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user