mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 13:53:52 +01:00
Merge branch 'master' of https://github.com/pret/pokeemerald into fix-eventobj
This commit is contained in:
commit
956090b05f
@ -1,36 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
|
||||
.align 2
|
||||
gUnknown_082F7BA4_UnrefDupe:: @ 82F444C struct BgTemplate(???)
|
||||
.4byte 0x000001e0
|
||||
.4byte 0x000012c9
|
||||
.4byte 0x000012ea
|
||||
.4byte 0x000021ff
|
||||
.4byte 0x000000ff
|
||||
.4byte 0x00000000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F7BBC_UnrefDupe:: @ 82F4464
|
||||
window_template 0x00, 0x01, 0x01, 0x1c, 0x02, 0x0d, 0x0013
|
||||
window_template 0x00, 0x01, 0x05, 0x1c, 0x0e, 0x0d, 0x004b
|
||||
|
||||
.align 2
|
||||
gUnknown_082F7BCC_UnrefDupe:: @ 82F4474
|
||||
window_template 0x00, 0x01, 0x05, 0x1c, 0x07, 0x0d, 0x004b
|
||||
|
||||
.align 2
|
||||
gUnknown_082F7BD4_UnrefDupe:: @ 82F447C
|
||||
window_template 0x00, 0x01, 0x08, 0x13, 0x03, 0x0d, 0x0013
|
||||
window_template 0x00, 0x16, 0x07, 0x06, 0x04, 0x0d, 0x004c
|
||||
|
||||
.align 2
|
||||
gUnknown_082F7BE4_UnrefDupe:: @ 82F448C
|
||||
window_template 0x00, 0x04, 0x06, 0x16, 0x05, 0x0d, 0x0013
|
||||
|
||||
.align 2
|
||||
gUnknown_082F7BEC_UnrefDupe:: @ 82F4494
|
||||
window_template 0x00, 0x05, 0x08, 0x13, 0x03, 0x0d, 0x0013
|
@ -1,88 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
gUnknown_0858D6B0:: @ 858D6B0
|
||||
.incbin "graphics/unknown/unknown_58D6B0.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0858D6D0:: @ 858D6D0
|
||||
.incbin "graphics/unknown/unknown_58D6D0.4bpp"
|
||||
|
||||
.align 2
|
||||
gMiscBlank_Pal:: @ 858D7D0
|
||||
.incbin "graphics/interface/blank.gbapal"
|
||||
|
||||
.align 2
|
||||
gOamData_858D7F0:: @ 858D7F0
|
||||
.2byte 0x4000
|
||||
.2byte 0xC000
|
||||
.2byte 0x2C00
|
||||
|
||||
.align 2
|
||||
gSpriteTemplate_858D7F8:: @ 858D7F8
|
||||
spr_template 0x0bc1, 0x0bc1, gOamData_858D7F0, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
.align 2
|
||||
gUnknown_0858D810:: @ 858D810
|
||||
obj_tiles gMiscBlank_Gfx, 0x0400, 0x0bc1
|
||||
obj_tiles gMiscBlank_Gfx, 0x0400, 0x0bc2
|
||||
obj_tiles gMiscBlank_Gfx, 0x0400, 0x0bc3
|
||||
obj_tiles gMiscBlank_Gfx, 0x0400, 0x0bc4
|
||||
obj_tiles gMiscBlank_Gfx, 0x0400, 0x0bc5
|
||||
obj_tiles gMiscBlank_Gfx, 0x0400, 0x0bc6
|
||||
obj_tiles gMiscBlank_Gfx, 0x0400, 0x0bc7
|
||||
obj_tiles gMiscBlank_Gfx, 0x0400, 0x0bc8
|
||||
|
||||
.align 2
|
||||
gUnknown_0858D850:: @ 858D850
|
||||
obj_pal gMiscBlank_Pal, 0x0bc1
|
||||
|
||||
.align 2
|
||||
gOamData_858D858:: @ 858D858
|
||||
.2byte 0x0000
|
||||
.2byte 0x0000
|
||||
.2byte 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteTemplate_858D860:: @ 858D860
|
||||
spr_template 0x0bc9, 0x0bc9, gOamData_858D858, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80F7768
|
||||
|
||||
.align 2
|
||||
gUnknown_0858D878:: @ 858D878
|
||||
obj_tiles gContestConfetti_Gfx, 0x0220, 0x0bc9
|
||||
|
||||
.align 2
|
||||
gUnknown_0858D880:: @ 858D880
|
||||
obj_pal gContestConfetti_Pal, 0x0bc9
|
||||
|
||||
.align 2
|
||||
gUnknown_0858D888:: @ 858D888
|
||||
.4byte 0x000001e0, 0x00003181, 0x000031c2, 0x000031a3
|
||||
|
||||
.align 2
|
||||
gUnknown_0858D898:: @ 858D898
|
||||
window_template 0x01, 0x07, 0x04, 0x0c, 0x02, 0x0f, 0x0302
|
||||
window_template 0x01, 0x07, 0x07, 0x0c, 0x02, 0x0f, 0x031a
|
||||
window_template 0x01, 0x07, 0x0a, 0x0c, 0x02, 0x0f, 0x0332
|
||||
window_template 0x01, 0x07, 0x0d, 0x0c, 0x02, 0x0f, 0x034a
|
||||
null_window_template
|
||||
|
||||
.align 2
|
||||
gUnknown_0858D8C0:: @ 858D8C0
|
||||
.byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gSpriteTemplate_858D8C8:: @ 858D8C8
|
||||
spr_template 0x56ce, 0x0000, gUnknown_0858D8C0, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
.align 2
|
||||
gUnknown_0858D8E0:: @ 858D8E0
|
||||
obj_tiles gMiscBlank_Gfx, 0x0200, 0x56ce
|
||||
|
||||
.align 2
|
||||
sContestLinkTextColors:: @ 858D8E8
|
||||
.byte 0x01, 0x0f, 0x0e, 0x00 @ TEXT_COLOR_WHITE, TEXT_DYNAMIC_COLOR_6, TEXT_DYNAMIC_COLOR_5
|
||||
|
@ -44,7 +44,7 @@ MauvilleCity_GameCorner_EventScript_ChooseCoinsDefault500:: @ 820FC0C
|
||||
|
||||
MauvilleCity_GameCorner_EventScript_Buy50Coins:: @ 820FC33
|
||||
checkcoins VAR_TEMP_1
|
||||
compare VAR_TEMP_1, MAX_COINS + 1 - 50
|
||||
compare VAR_TEMP_1, (MAX_COINS + 1 - 50)
|
||||
goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins
|
||||
checkmoney COINS_PRICE_50, 0
|
||||
compare VAR_RESULT, FALSE
|
||||
@ -62,7 +62,7 @@ MauvilleCity_GameCorner_EventScript_Buy50Coins:: @ 820FC33
|
||||
|
||||
MauvilleCity_GameCorner_EventScript_Buy500Coins:: @ 820FC75
|
||||
checkcoins VAR_TEMP_1
|
||||
compare VAR_TEMP_1, MAX_COINS + 1 - 500
|
||||
compare VAR_TEMP_1, (MAX_COINS + 1 - 500)
|
||||
goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins
|
||||
checkmoney COINS_PRICE_500, 0
|
||||
compare VAR_RESULT, FALSE
|
||||
|
@ -1,43 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
RotatingTilePuzzle_Movement_ShiftRight:: @ 8612698
|
||||
store_lock_anim
|
||||
walk_right
|
||||
free_unlock_anim
|
||||
step_end
|
||||
|
||||
RotatingTilePuzzle_Movement_ShiftDown:: @ 861269C
|
||||
store_lock_anim
|
||||
walk_down
|
||||
free_unlock_anim
|
||||
step_end
|
||||
|
||||
RotatingTilePuzzle_Movement_ShiftLeft:: @ 86126A0
|
||||
store_lock_anim
|
||||
walk_left
|
||||
free_unlock_anim
|
||||
step_end
|
||||
|
||||
RotatingTilePuzzle_Movement_ShiftUp:: @ 86126A4
|
||||
store_lock_anim
|
||||
walk_up
|
||||
free_unlock_anim
|
||||
step_end
|
||||
|
||||
RotatingTilePuzzle_Movement_FaceRight:: @ 86126A8
|
||||
face_right
|
||||
step_end
|
||||
|
||||
RotatingTilePuzzle_Movement_FaceDown:: @ 86126AA
|
||||
face_down
|
||||
step_end
|
||||
|
||||
RotatingTilePuzzle_Movement_FaceLeft:: @ 86126AC
|
||||
face_left
|
||||
step_end
|
||||
|
||||
RotatingTilePuzzle_Movement_FaceUp:: @ 86126AE
|
||||
face_up
|
||||
step_end
|
@ -1,841 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
|
||||
gUnknown_085A7A3C:: @ 85A7A3C
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7A44:: @ 85A7A44
|
||||
.2byte 0x8000
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7A4C:: @ 85A7A4C
|
||||
.2byte 0
|
||||
.2byte 0x4000
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7A54:: @ 85A7A54
|
||||
.2byte 0x8000
|
||||
.2byte 0x8000
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7A5C:: @ 85A7A5C
|
||||
.2byte 0
|
||||
.2byte 0x8000
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7A64:: @ 85A7A64
|
||||
.2byte 0x8000
|
||||
.2byte 0xC000
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7A6C:: @ 85A7A6C
|
||||
.2byte 0x4000
|
||||
.2byte 0xC000
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7A74:: @ 85A7A74
|
||||
.2byte 0
|
||||
.2byte 0xC000
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7A7C:: @ 85A7A7C
|
||||
.4byte gSlotMachineReelTimeNumber0
|
||||
.2byte 0x80
|
||||
.2byte 0
|
||||
.4byte gSlotMachineReelTimeNumber1
|
||||
.2byte 0x80
|
||||
.2byte 0
|
||||
.4byte gSlotMachineReelTimeNumber2
|
||||
.2byte 0x80
|
||||
.2byte 0
|
||||
.4byte gSlotMachineReelTimeNumber3
|
||||
.2byte 0x80
|
||||
.2byte 0
|
||||
.4byte gSlotMachineReelTimeNumber4
|
||||
.2byte 0x80
|
||||
.2byte 0
|
||||
.4byte gSlotMachineReelTimeNumber5
|
||||
.2byte 0x80
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7AAC:: @ 85A7AAC
|
||||
.4byte gSlotMachineReelTimeShadow
|
||||
.2byte 0x200
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7AB4:: @ 85A7AB4
|
||||
.4byte gUnknown_08DD1A18
|
||||
.2byte 0x40
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7ABC:: @ 85A7ABC
|
||||
.4byte gSlotMachineReelTimeLargeBolt0
|
||||
.2byte 0x100
|
||||
.2byte 0
|
||||
.4byte gSlotMachineReelTimeLargeBolt1
|
||||
.2byte 0x100
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7ACC:: @ 85A7ACC
|
||||
.4byte gSlotMachineReelTimePikaAura
|
||||
.2byte 0x400
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7AD4:: @ 85A7CD4
|
||||
.4byte gSlotMachineReelTimeExplosion0
|
||||
.2byte 0x200
|
||||
.2byte 0
|
||||
.4byte gSlotMachineReelTimeExplosion1
|
||||
.2byte 0x200
|
||||
.2byte 0
|
||||
|
||||
gUnknown_085A7AE4:: @ 85A7AE4
|
||||
.4byte gSlotMachineReelTimeDuck
|
||||
.4byte 32
|
||||
|
||||
gUnknown_085A7AEC:: @ 85A7AEC
|
||||
.4byte gSlotMachineReelTimeSmoke
|
||||
.4byte 0x80
|
||||
|
||||
gUnknown_085A7AF4:: @ 85A7AF4
|
||||
.4byte gSlotMachineReelTimeBolt
|
||||
.4byte 32
|
||||
|
||||
gUnknown_085A7AFC:: @ 85A7AFC
|
||||
obj_image_anim_frame 0, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7B04:: @ 85A7B04
|
||||
obj_image_anim_frame 0, 1
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_085A7B0C:: @ 85A7B0C
|
||||
obj_image_anim_frame 0, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7B14:: @ 85A7B14
|
||||
obj_image_anim_frame 1, 16
|
||||
obj_image_anim_frame 0, 16
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_085A7B20:: @ 85A7B20
|
||||
obj_image_anim_frame 1, 8
|
||||
obj_image_anim_frame 0, 8
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_085A7B2C:: @ 85A7B2C
|
||||
obj_image_anim_frame 1, 4
|
||||
obj_image_anim_frame 0, 4
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_085A7B38:: @ 85A7B38
|
||||
obj_image_anim_frame 2, 32
|
||||
obj_image_anim_frame 3, 32
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_085A7B44:: @ 85A7B44
|
||||
obj_image_anim_frame 4, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7B4C:: @ 85A7B4C
|
||||
obj_image_anim_frame 0, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7B54:: @ 85A7B54
|
||||
obj_image_anim_frame 1, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7B5C:: @ 85A7B5C
|
||||
obj_image_anim_frame 2, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7B64:: @ 85A7B64
|
||||
obj_image_anim_frame 3, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7B6C:: @ 85A7B6C
|
||||
obj_image_anim_frame 4, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7B74:: @ 85A7B74
|
||||
obj_image_anim_frame 5, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7B7C:: @ 85A7B7C
|
||||
obj_image_anim_frame 0, 4
|
||||
obj_image_anim_frame 1, 4
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_085A7B88:: @ 85A7B88
|
||||
obj_image_anim_frame 0, 16
|
||||
obj_image_anim_frame 1, 16
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_085A7B94:: @ 85A7B94
|
||||
obj_image_anim_frame 0, 30
|
||||
obj_image_anim_frame 1, 30
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_085A7BA0:: @ 85A7BA0
|
||||
obj_image_anim_frame 1, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7BA8:: @ 85A7BA8
|
||||
obj_image_anim_frame 0, 30
|
||||
obj_image_anim_frame 1, 30
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_085A7BB4:: @ 85A7BB4
|
||||
obj_image_anim_frame 0, 16
|
||||
obj_image_anim_frame 1, 16
|
||||
obj_image_anim_frame 0, 16
|
||||
obj_image_anim_frame 1, 80
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_085A7BC8:: @ 85A7BC8
|
||||
obj_image_anim_frame 0, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7BD0:: @ 85A7BD0
|
||||
obj_image_anim_frame 0, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7BD8:: @ 85A7BD8
|
||||
obj_image_anim_frame 1, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7BE0:: @ 85A7BE0
|
||||
obj_image_anim_frame 2, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7BE8:: @ 85A7BE8
|
||||
obj_image_anim_frame 3, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7BF0:: @ 85A7BF0
|
||||
obj_image_anim_frame 4, 1
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_085A7BF8:: @ 85A7BF8
|
||||
.4byte gUnknown_085A7AFC
|
||||
|
||||
gUnknown_085A7BFC:: @ 85A7BFC
|
||||
.4byte gUnknown_085A7B04
|
||||
|
||||
gUnknown_085A7C00:: @ 85A7C00
|
||||
.4byte gUnknown_085A7B0C
|
||||
.4byte gUnknown_085A7B14
|
||||
.4byte gUnknown_085A7B20
|
||||
.4byte gUnknown_085A7B2C
|
||||
.4byte gUnknown_085A7B38
|
||||
.4byte gUnknown_085A7B44
|
||||
|
||||
gUnknown_085A7C18:: @ 85A7C18
|
||||
.4byte gUnknown_085A7B4C
|
||||
.4byte gUnknown_085A7B54
|
||||
.4byte gUnknown_085A7B5C
|
||||
.4byte gUnknown_085A7B64
|
||||
.4byte gUnknown_085A7B6C
|
||||
.4byte gUnknown_085A7B74
|
||||
|
||||
gUnknown_085A7C30:: @ 85A7C30
|
||||
.4byte gUnknown_085A7B7C
|
||||
|
||||
gUnknown_085A7C34:: @ 85A7C34
|
||||
.4byte gUnknown_085A7B88
|
||||
|
||||
gUnknown_085A7C38:: @ 85A7C38
|
||||
.4byte gUnknown_085A7B94
|
||||
.4byte gUnknown_085A7BA0
|
||||
|
||||
gUnknown_085A7C40:: @ 85A7C40
|
||||
.4byte gUnknown_085A7BA8
|
||||
|
||||
gUnknown_085A7C44:: @ 85A7C44
|
||||
.4byte gUnknown_085A7BB4
|
||||
.4byte gUnknown_085A7BC8
|
||||
|
||||
gUnknown_085A7C4C:: @ 85A7C4C
|
||||
.4byte gUnknown_085A7BD0
|
||||
.4byte gUnknown_085A7BD8
|
||||
.4byte gUnknown_085A7BE0
|
||||
.4byte gUnknown_085A7BE8
|
||||
.4byte gUnknown_085A7BF0
|
||||
|
||||
gUnknown_085A7C60:: @ 85A7C60
|
||||
obj_rot_scal_anim_frame 16, 16, 0, 0
|
||||
obj_rot_scal_anim_loop 0
|
||||
obj_rot_scal_anim_frame 1, 1, 0, 1
|
||||
obj_rot_scal_anim_loop 0xFF
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_085A7C88:: @ 85A7C88
|
||||
.4byte gUnknown_085A7C60
|
||||
|
||||
gUnknown_085A7C8C:: @ 85A7C8C
|
||||
obj_rot_scal_anim_frame 0, 0, 8, 32
|
||||
obj_rot_scal_anim_frame 0, 0, 6, 32
|
||||
obj_rot_scal_anim_frame 0, 0, 4, 16
|
||||
obj_rot_scal_anim_frame 0, 0, 12, 2
|
||||
obj_rot_scal_anim_frame 0, 0, -12, 4
|
||||
obj_rot_scal_anim_frame 0, 0, 12, 2
|
||||
obj_rot_scal_anim_frame 0, 0, 12, 2
|
||||
obj_rot_scal_anim_frame 0, 0, -12, 4
|
||||
obj_rot_scal_anim_frame 0, 0, 12, 2
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_085A7CDC:: @ 85A7CDC
|
||||
.4byte gUnknown_085A7C8C
|
||||
|
||||
gSpriteTemplate_83ED414:: @ 85A7CE0
|
||||
spr_template 0, 0, gUnknown_085A7A5C, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, sub_8104F18
|
||||
|
||||
gSpriteTemplate_83ED42C:: @ 85A7CF8
|
||||
spr_template 7, 4, gUnknown_085A7A44, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, sub_810506C
|
||||
|
||||
gSpriteTemplate_83ED444:: @ 85A7D10
|
||||
spr_template 17, 0, gUnknown_085A7A74, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gSpriteTemplate_83ED45C:: @ 85A7D28
|
||||
spr_template 0xFFFF, 1, gUnknown_085A7A74, gUnknown_085A7C00, NULL, gDummySpriteAffineAnimTable, sub_8105170
|
||||
|
||||
gSpriteTemplate_83ED474:: @ 85A7D40
|
||||
spr_template 0xFFFF, 2, gUnknown_085A7A44, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gSpriteTemplate_83ED48C:: @ 85A7D58
|
||||
spr_template 0xFFFF, 3, gUnknown_085A7A44, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gSpriteTemplate_83ED4A4:: @ 85A7D70
|
||||
spr_template 0xFFFF, 3, gUnknown_085A7A44, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gSpriteTemplate_83ED4BC:: @ 85A7D88
|
||||
spr_template 0xFFFF, 4, gUnknown_085A7A4C, gUnknown_085A7C18, gUnknown_085A7A7C, gDummySpriteAffineAnimTable, sub_810535C
|
||||
|
||||
gSpriteTemplate_83ED4D4:: @ 85A7DA0
|
||||
spr_template 0xFFFF, 4, gUnknown_085A7A4C, gUnknown_085A7BF8, gUnknown_085A7AAC, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gSpriteTemplate_83ED4EC:: @ 85A7DB8
|
||||
spr_template 0xFFFF, 4, gUnknown_085A7A4C, gUnknown_085A7BF8, gUnknown_085A7AB4, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gSpriteTemplate_83ED504:: @ 85A7DD0
|
||||
spr_template 0xFFFF, 4, gUnknown_085A7A54, gUnknown_085A7C30, gUnknown_085A7ABC, gDummySpriteAffineAnimTable, sub_810562C
|
||||
|
||||
gSpriteTemplate_83ED51C:: @ 85A7DE8
|
||||
spr_template 0xFFFF, 7, gUnknown_085A7A64, gUnknown_085A7BF8, gUnknown_085A7ACC, gDummySpriteAffineAnimTable, sub_8105784
|
||||
|
||||
gSpriteTemplate_83ED534:: @ 85A7E00
|
||||
spr_template 0xFFFF, 5, gUnknown_085A7A5C, gUnknown_085A7C34, gUnknown_085A7AD4, gDummySpriteAffineAnimTable, sub_8105894
|
||||
|
||||
gSpriteTemplate_83ED54C:: @ 85A7E18
|
||||
spr_template 0xFFFF, 4, gUnknown_085A7A3C, gUnknown_085A7BFC, gUnknown_085A7AE4, gDummySpriteAffineAnimTable, sub_810594C
|
||||
|
||||
gSpriteTemplate_83ED564:: @ 85A7E30
|
||||
spr_template 0xFFFF, 4, gUnknown_085A7A4C, gUnknown_085A7BF8, gUnknown_085A7AEC, gUnknown_085A7C88, sub_8105A38
|
||||
|
||||
gUnknown_085A7E48:: @ 85A7E48
|
||||
spr_template 0xFFFF, 6, gUnknown_085A7A3C, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7E60:: @ 85A7E60
|
||||
spr_template 0xFFFF, 6, gUnknown_085A7A3C, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7E78:: @ 85A7E78
|
||||
spr_template 0xFFFF, 6, gUnknown_085A7A3C, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7E90:: @ 85A7E90
|
||||
spr_template 18, 6, gUnknown_085A7A3C, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7EA8:: @ 85A7EA8
|
||||
spr_template 0xFFFF, 6, gUnknown_085A7A6C, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7EC0:: @ 85A7EC0
|
||||
spr_template 0xFFFF, 6, gUnknown_085A7A6C, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7ED8:: @ 85A7ED8
|
||||
spr_template 19, 6, gUnknown_085A7A3C, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7EF0:: @ 85A7EF0
|
||||
spr_template 20, 6, gUnknown_085A7A3C, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7F08:: @ 85A7F08
|
||||
spr_template 21, 6, gUnknown_085A7A3C, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7F20:: @ 85A7F20
|
||||
spr_template 0xFFFF, 6, gUnknown_085A7A5C, gUnknown_085A7C38, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7F38:: @ 85A7F38
|
||||
spr_template 0xFFFF, 6, gUnknown_085A7A3C, gUnknown_085A7BF8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7F50:: @ 85A7F50
|
||||
spr_template 0xFFFF, 6, gUnknown_085A7A4C, gUnknown_085A7C4C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7F68:: @ 85A7F68
|
||||
spr_template 0xFFFF, 6, gUnknown_085A7A3C, gUnknown_085A7C44, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_085A7F80:: @ 85A7F80
|
||||
spr_template 0xFFFF, 6, gUnknown_085A7A3C, gUnknown_085A7C40, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gSpriteTemplate_83ED6CC:: @ 85A7F98
|
||||
spr_template 0xFFFF, 4, gUnknown_085A7A3C, gUnknown_085A7BF8, gUnknown_085A7AF4, gUnknown_085A7CDC, sub_8105B70
|
||||
|
||||
gUnknown_085A7FB0:: @ 85A7FB0
|
||||
subsprite -64, -64, 3, 0, 64x64
|
||||
subsprite 0, -64, 3, 0, 64x64
|
||||
subsprite -64, 0, 3, 0, 64x64
|
||||
subsprite 0, 0, 3, 0, 64x64
|
||||
|
||||
gSubspriteTables_83ED704:: @ 85A7FC0
|
||||
.4byte 4, gUnknown_085A7FB0
|
||||
|
||||
gUnknown_085A7FC8:: @ 85A7FC8
|
||||
subsprite -32, -12, 1, 0, 32x8
|
||||
subsprite 0, -12, 1, 4, 32x8
|
||||
subsprite -32, -4, 1, 8, 32x8
|
||||
subsprite 0, -4, 1, 12, 32x8
|
||||
subsprite -32, 4, 1, 16, 32x8
|
||||
subsprite 0, 4, 1, 20, 32x8
|
||||
|
||||
gSubspriteTables_83ED73C:: @ 85A7FE0
|
||||
.4byte 6, gUnknown_085A7FC8
|
||||
|
||||
gUnknown_085A7FE8:: @ 85A7FE8
|
||||
subsprite -32, -20, 1, 0, 64x32
|
||||
subsprite -32, 12, 1, 32, 32x8
|
||||
subsprite 0, 12, 1, 36, 32x8
|
||||
|
||||
gSubspriteTables_83ED75C:: @ 85A7FF4
|
||||
.4byte 3, gUnknown_085A7FE8
|
||||
|
||||
gUnknown_085A7FFC:: @ 85A7FFC
|
||||
subsprite -32, -24, 1, 0, 64x32
|
||||
subsprite -32, 8, 1, 32, 32x8
|
||||
subsprite 0, 8, 1, 36, 32x8
|
||||
subsprite -32, 16, 1, 40, 32x8
|
||||
subsprite 0, 16, 1, 44, 32x8
|
||||
|
||||
gSubspriteTables_83ED78C:: @ 85A8010
|
||||
.4byte 5, gUnknown_085A7FFC
|
||||
|
||||
gUnknown_085A8018:: @ 85A8018
|
||||
subsprite -32, -8, 1, 0, 32x8
|
||||
subsprite 0, -8, 1, 4, 32x8
|
||||
subsprite -32, 0, 1, 8, 32x8
|
||||
subsprite 0, 0, 1, 12, 32x8
|
||||
|
||||
gSubspriteTables_83ED7B4:: @ 85A8028
|
||||
.4byte 4, gUnknown_085A8018
|
||||
|
||||
gUnknown_085A8030:: @ 85A8030
|
||||
subsprite -8, -12, 1, 0, 16x8
|
||||
subsprite -8, -4, 1, 0, 16x8
|
||||
subsprite -8, 4, 1, 0, 16x8
|
||||
|
||||
gSubspriteTables_83ED7D4:: @ 85A803C
|
||||
.4byte 3, gUnknown_085A8030
|
||||
|
||||
gUnknown_085A8044:: @ 85A8044
|
||||
subsprite -32, -24, 3, 0, 64x32
|
||||
subsprite -32, 8, 3, 32, 32x8
|
||||
subsprite 0, 8, 3, 36, 32x8
|
||||
subsprite -32, 16, 3, 40, 32x8
|
||||
subsprite 0, 16, 3, 44, 32x8
|
||||
|
||||
gUnknown_085A8058:: @ 85A8058
|
||||
.4byte 5, gUnknown_085A8044
|
||||
|
||||
gUnknown_085A8060:: @ 85A8060
|
||||
subsprite -32, -8, 3, 0, 32x8
|
||||
subsprite 0, -8, 3, 4, 32x8
|
||||
subsprite -32, 0, 3, 8, 32x8
|
||||
subsprite 0, 0, 3, 12, 32x8
|
||||
|
||||
gUnknown_085A8070:: @ 85A8070
|
||||
.4byte 4, gUnknown_085A8060
|
||||
|
||||
gUnknown_085A8078:: @ 85A8078
|
||||
subsprite -32, -8, 3, 0, 32x8
|
||||
subsprite 0, -8, 3, 4, 32x8
|
||||
subsprite -32, 0, 3, 8, 32x8
|
||||
subsprite 0, 0, 3, 12, 32x8
|
||||
|
||||
gUnknown_085A8088:: @ 85A8088
|
||||
.4byte 4, gUnknown_085A8078
|
||||
|
||||
gUnknown_085A8090:: @ 85A8090
|
||||
subsprite -32, -8, 3, 0, 32x8
|
||||
subsprite 0, -8, 3, 4, 32x8
|
||||
subsprite -32, 0, 3, 8, 32x8
|
||||
subsprite 0, 0, 3, 12, 32x8
|
||||
|
||||
gUnknown_085A80A0:: @ 85A80A0
|
||||
.4byte 4, gUnknown_085A8090
|
||||
|
||||
gUnknown_085A80A8:: @ 85A80A8
|
||||
subsprite -32, -12, 3, 0, 32x8
|
||||
subsprite 0, -12, 3, 4, 32x8
|
||||
subsprite -32, -4, 3, 8, 32x8
|
||||
subsprite 0, -4, 3, 12, 32x8
|
||||
subsprite -32, 4, 3, 16, 32x8
|
||||
subsprite 0, 4, 3, 20, 32x8
|
||||
|
||||
gUnknown_085A80C0:: @ 85A80C0
|
||||
.4byte 6, gUnknown_085A80A8
|
||||
|
||||
gUnknown_085A80C8:: @ 85A80C8
|
||||
subsprite -16, -16, 3, 0, 32x32
|
||||
|
||||
gUnknown_085A80CC:: @ 85A80CC
|
||||
subsprite -8, -8, 3, 16, 16x16
|
||||
|
||||
gUnknown_085A80D0:: @ 85A80D0
|
||||
.4byte 1, gUnknown_085A80C8
|
||||
|
||||
gUnknown_085A80D8:: @ 85A80D8
|
||||
.4byte 1, gUnknown_085A80CC
|
||||
|
||||
gUnknown_085A80E0:: @ 85A80E0
|
||||
subsprite -24, -24, 3, 0, 32x8
|
||||
subsprite 8, -24, 3, 4, 16x8
|
||||
subsprite -24, -16, 3, 6, 32x8
|
||||
subsprite 8, -16, 3, 10, 16x8
|
||||
subsprite -24, -8, 3, 12, 32x8
|
||||
subsprite 8, -8, 3, 16, 16x8
|
||||
subsprite -24, 0, 3, 18, 32x8
|
||||
subsprite 8, 0, 3, 22, 16x8
|
||||
subsprite -24, 8, 3, 24, 32x8
|
||||
subsprite 8, 8, 3, 28, 16x8
|
||||
subsprite -24, 16, 3, 30, 32x8
|
||||
subsprite 8, 16, 3, 34, 16x8
|
||||
|
||||
gUnknown_085A8110:: @ 85A8110
|
||||
.4byte 12, gUnknown_085A80E0
|
||||
|
||||
gUnknown_085A8118:: @ 85A8118
|
||||
subsprite -16, -12, 3, 0, 32x16
|
||||
subsprite -16, 4, 3, 8, 16x8
|
||||
subsprite 0, 4, 3, 10, 16x8
|
||||
|
||||
gUnknown_085A8124:: @ 85A8124
|
||||
.4byte 3, gUnknown_085A8118
|
||||
|
||||
gUnknown_085A812C:: @ 85A812C
|
||||
subsprite -8, -8, 3, 0, 16x8
|
||||
subsprite -8, 0, 3, 8, 16x8
|
||||
|
||||
gUnknown_085A8134:: @ 85A8134
|
||||
.4byte 2, gUnknown_085A812C
|
||||
|
||||
gUnknown_085A813C:: @ 85A813C
|
||||
subsprite -8, -8, 3, 2, 16x8
|
||||
subsprite -8, 0, 3, 10, 16x8
|
||||
|
||||
gUnknown_085A8144:: @ 85A8144
|
||||
.4byte 2, gUnknown_085A813C
|
||||
|
||||
gUnknown_085A814C:: @ 85A814C
|
||||
subsprite -8, -8, 3, 4, 16x8
|
||||
subsprite -8, 0, 3, 12, 16x8
|
||||
|
||||
gUnknown_085A8154:: @ 85A8154
|
||||
.4byte 2, gUnknown_085A814C
|
||||
|
||||
gUnknown_085A815C:: @ 85A815C
|
||||
subsprite -8, -8, 3, 6, 16x8
|
||||
subsprite -8, 0, 3, 14, 16x8
|
||||
|
||||
gUnknown_085A8164:: @ 85A8164
|
||||
.4byte 2, gUnknown_085A815C
|
||||
|
||||
gUnknown_085A816C:: @ 85A816C
|
||||
subsprite -8, -8, 3, 0, 16x8
|
||||
subsprite -8, 0, 3, 8, 16x8
|
||||
|
||||
gUnknown_085A8174:: @ 85A8174
|
||||
.4byte 2, gUnknown_085A816C
|
||||
|
||||
gUnknown_085A817C:: @ 85A817C
|
||||
subsprite -4, -8, 3, 2, 8x8
|
||||
subsprite -4, 0, 3, 10, 8x8
|
||||
|
||||
gUnknown_085A8184:: @ 85A8184
|
||||
.4byte 2, gUnknown_085A817C
|
||||
|
||||
gUnknown_085A818C:: @ 85A818C
|
||||
subsprite -8, -8, 3, 3, 16x8
|
||||
subsprite -8, 0, 3, 11, 16x8
|
||||
|
||||
gUnknown_085A8194:: @ 85A8194
|
||||
.4byte 2, gUnknown_085A818C
|
||||
|
||||
gUnknown_085A819C:: @ 85A819C
|
||||
subsprite -4, -8, 3, 5, 8x8
|
||||
subsprite -4, 0, 3, 13, 8x8
|
||||
|
||||
gUnknown_085A81A4:: @ 85A81A4
|
||||
.4byte 2, gUnknown_085A819C
|
||||
|
||||
gUnknown_085A81AC:: @ 85A81AC
|
||||
subsprite -8, -8, 3, 6, 16x8
|
||||
subsprite -8, 0, 3, 14, 16x8
|
||||
|
||||
gUnknown_085A81B4:: @ 85A81B4
|
||||
.4byte 2, gUnknown_085A81AC
|
||||
|
||||
gUnknown_085A81BC:: @ 85A81BC
|
||||
subsprite -12, -12, 3, 0, 16x8
|
||||
subsprite 4, -12, 3, 2, 8x8
|
||||
subsprite -12, -4, 3, 8, 16x8
|
||||
subsprite 4, -4, 3, 10, 8x8
|
||||
subsprite -12, 4, 3, 16, 16x8
|
||||
subsprite 4, 4, 3, 18, 8x8
|
||||
|
||||
gUnknown_085A81D4:: @ 85A81D4
|
||||
.4byte 6, gUnknown_085A81BC
|
||||
|
||||
gUnknown_085A81DC:: @ 85A81DC
|
||||
subsprite -8, -12, 3, 3, 16x8
|
||||
subsprite -8, -4, 3, 11, 16x8
|
||||
subsprite -8, 4, 3, 19, 16x8
|
||||
|
||||
gUnknown_085A81E8:: @ 85A81E8
|
||||
.4byte 3, gUnknown_085A81DC
|
||||
|
||||
gUnknown_085A81F0:: @ 85A81F0
|
||||
subsprite -12, -12, 3, 5, 16x8
|
||||
subsprite 4, -12, 3, 7, 8x8
|
||||
subsprite -12, -4, 3, 13, 16x8
|
||||
subsprite 4, -4, 3, 15, 8x8
|
||||
subsprite -12, 4, 3, 21, 16x8
|
||||
subsprite 4, 4, 3, 0x17, 8x8
|
||||
|
||||
gUnknown_085A8208:: @ 85A8208
|
||||
.4byte 6, gUnknown_085A81F0
|
||||
|
||||
gUnknown_085A8210:: @ 85A8210
|
||||
subsprite -12, -12, 3, 0, 16x8
|
||||
subsprite 4, -12, 3, 2, 8x8
|
||||
subsprite -12, -4, 3, 8, 16x8
|
||||
subsprite 4, -4, 3, 10, 8x8
|
||||
subsprite -12, 4, 3, 16, 16x8
|
||||
subsprite 4, 4, 3, 18, 8x8
|
||||
|
||||
gUnknown_085A8228:: @ 85A8228
|
||||
.4byte 6, gUnknown_085A8210
|
||||
|
||||
gUnknown_085A822C:: @ 85A822C
|
||||
subsprite -8, -12, 3, 3, 16x8
|
||||
subsprite -8, -4, 3, 11, 16x8
|
||||
subsprite -8, 4, 3, 19, 16x8
|
||||
|
||||
gUnknown_085A823C:: @ 85A823C
|
||||
.4byte 3, gUnknown_085A822C
|
||||
|
||||
gUnknown_085A8244:: @ 85A8244
|
||||
subsprite -12, -12, 3, 5, 16x8
|
||||
subsprite 4, -12, 3, 7, 8x8
|
||||
subsprite -12, -4, 3, 13, 16x8
|
||||
subsprite 4, -4, 3, 15, 8x8
|
||||
subsprite -12, 4, 3, 21, 16x8
|
||||
subsprite 4, 4, 3, 23, 8x8
|
||||
|
||||
gUnknown_085A825C:: @ 85A825C
|
||||
.4byte 6, gUnknown_085A8244
|
||||
|
||||
gUnknown_083EDB5C:: @ 85A8264
|
||||
.4byte gUnknown_085A7E48
|
||||
.4byte gUnknown_085A7E60
|
||||
.4byte gUnknown_085A7E78
|
||||
.4byte gUnknown_085A7EA8
|
||||
.4byte gUnknown_085A7EC0
|
||||
.4byte gUnknown_085A7F20
|
||||
.4byte gUnknown_085A7F38
|
||||
.4byte gUnknown_085A7F50
|
||||
.4byte gUnknown_085A7F68
|
||||
.4byte gUnknown_085A7F80
|
||||
.4byte gUnknown_085A7E90
|
||||
.4byte gUnknown_085A7E90
|
||||
.4byte gUnknown_085A7E90
|
||||
.4byte gUnknown_085A7E90
|
||||
.4byte gUnknown_085A7ED8
|
||||
.4byte gUnknown_085A7ED8
|
||||
.4byte gUnknown_085A7ED8
|
||||
.4byte gUnknown_085A7ED8
|
||||
.4byte gUnknown_085A7ED8
|
||||
.4byte gUnknown_085A7EF0
|
||||
.4byte gUnknown_085A7EF0
|
||||
.4byte gUnknown_085A7EF0
|
||||
.4byte gUnknown_085A7F08
|
||||
.4byte gUnknown_085A7F08
|
||||
.4byte gUnknown_085A7F08
|
||||
.4byte gDummySpriteTemplate
|
||||
|
||||
gUnknown_083EDBC4:: @ 85A82CC
|
||||
.4byte gUnknown_085A8058
|
||||
.4byte gUnknown_085A8070
|
||||
.4byte gUnknown_085A8088
|
||||
.4byte gUnknown_085A80C0
|
||||
.4byte NULL
|
||||
.4byte NULL
|
||||
.4byte gUnknown_085A80D0
|
||||
.4byte NULL
|
||||
.4byte gUnknown_085A8110
|
||||
.4byte gUnknown_085A8124
|
||||
.4byte gUnknown_085A8134
|
||||
.4byte gUnknown_085A8144
|
||||
.4byte gUnknown_085A8154
|
||||
.4byte gUnknown_085A8164
|
||||
.4byte gUnknown_085A8174
|
||||
.4byte gUnknown_085A8184
|
||||
.4byte gUnknown_085A8194
|
||||
.4byte gUnknown_085A81A4
|
||||
.4byte gUnknown_085A81B4
|
||||
.4byte gUnknown_085A81D4
|
||||
.4byte gUnknown_085A81E8
|
||||
.4byte gUnknown_085A8208
|
||||
.4byte gUnknown_085A8228
|
||||
.4byte gUnknown_085A823C
|
||||
.4byte gUnknown_085A825C
|
||||
.4byte NULL
|
||||
|
||||
.align 2
|
||||
gSlotMachineSpriteSheets:: @ 85A8334
|
||||
obj_tiles gSlotMachineReelSymbol1Tiles, 0x0200, 0x0000
|
||||
obj_tiles gSlotMachineReelSymbol2Tiles, 0x0200, 0x0001
|
||||
obj_tiles gSlotMachineReelSymbol3Tiles, 0x0200, 0x0002
|
||||
obj_tiles gSlotMachineReelSymbol4Tiles, 0x0200, 0x0003
|
||||
obj_tiles gSlotMachineReelSymbol5Tiles, 0x0200, 0x0004
|
||||
obj_tiles gSlotMachineReelSymbol6Tiles, 0x0200, 0x0005
|
||||
obj_tiles gSlotMachineReelSymbol7Tiles, 0x0200, 0x0006
|
||||
obj_tiles gSlotMachineNumber0Tiles, 0x0040, 0x0007
|
||||
obj_tiles gSlotMachineNumber1Tiles, 0x0040, 0x0008
|
||||
obj_tiles gSlotMachineNumber2Tiles, 0x0040, 0x0009
|
||||
obj_tiles gSlotMachineNumber3Tiles, 0x0040, 0x000A
|
||||
obj_tiles gSlotMachineNumber4Tiles, 0x0040, 0x000B
|
||||
obj_tiles gSlotMachineNumber5Tiles, 0x0040, 0x000C
|
||||
obj_tiles gSlotMachineNumber6Tiles, 0x0040, 0x000D
|
||||
obj_tiles gSlotMachineNumber7Tiles, 0x0040, 0x000E
|
||||
obj_tiles gSlotMachineNumber8Tiles, 0x0040, 0x000F
|
||||
obj_tiles gSlotMachineNumber9Tiles, 0x0040, 0x0010
|
||||
|
||||
.align 2
|
||||
.byte 0, 0, 0, 0, 0, 2, 0x12, 0, 0, 0, 0, 0, 0, 2, 0x13, 0, 0, 0, 0, 0, 0, 3, 0x14, 0, 0, 0, 0, 0, 0, 3, 0x15, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
|
||||
gUnknown_083EDCDC:: @ 85A83E4
|
||||
.4byte gUnknown_08DD19F8
|
||||
@ might be a palette idk
|
||||
.byte 0x7B, 0x6F, 0x68, 0x69, 0xAB, 0x36, 0xFF, 0x7F, 0x50, 0x57, 0xC0, 0x7E, 0xBA, 2, 0xBA, 2, 0xFD, 1, 0xFD, 1
|
||||
|
||||
gUnknown_085A83FC:: @ 85A83FC
|
||||
.byte 0x91, 0x7F
|
||||
|
||||
gUnknown_085A83FE:: @ 85A83FE
|
||||
.byte 0xBF, 0x43
|
||||
|
||||
gUnknown_085A8400:: @ 85A8400
|
||||
.byte 0xBF, 0x43
|
||||
|
||||
gUnknown_085A8402:: @ 85A8402
|
||||
.byte 0xBF, 0x4A
|
||||
|
||||
gUnknown_085A8404:: @ 85A8404
|
||||
.byte 0xBF, 0x4A, 0, 0
|
||||
|
||||
gUnknown_083EDD08:: @ 85A8408
|
||||
.4byte gUnknown_085A83FC
|
||||
.4byte gUnknown_085A83FE
|
||||
.4byte gUnknown_085A8400
|
||||
.4byte gUnknown_085A8402
|
||||
.4byte gUnknown_085A8404
|
||||
|
||||
gUnknown_083EDD1C:: @ 85A841C
|
||||
.4byte gSlotMachineMenu_Pal + 0x94
|
||||
.4byte gSlotMachineMenu_Pal + 0x96
|
||||
.4byte gSlotMachineMenu_Pal + 0x98
|
||||
.4byte gSlotMachineMenu_Pal + 0x9A
|
||||
.4byte gSlotMachineMenu_Pal + 0x9C
|
||||
|
||||
gUnknown_083EDD30:: @ 85A8430
|
||||
.byte 0x4A, 0x4B, 0x4C, 0x4E, 0x4D
|
||||
|
||||
gBettingTilesId:: @ 85A8435
|
||||
.byte 0, 0
|
||||
.byte 1, 2
|
||||
.byte 3, 4
|
||||
|
||||
gNumberBettingTiles:: @ 85A843B
|
||||
.byte 1, 2, 2
|
||||
|
||||
gUnknown_085A843E:: @ 85A843E
|
||||
.incbin "graphics/slot_machine/85A843E.gbapal"
|
||||
|
||||
gUnknown_085A845E:: @ 85A845E
|
||||
.incbin "graphics/slot_machine/85A845E.gbapal"
|
||||
|
||||
gUnknown_085A847E:: @ 85A847E
|
||||
.incbin "graphics/slot_machine/85A847E.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_083EDDA0:: @ 85A84A0
|
||||
.4byte gUnknown_085A843E
|
||||
.4byte gUnknown_085A845E
|
||||
.4byte gUnknown_085A847E
|
||||
|
||||
gUnknown_083EDDAC:: @ 85A84AC
|
||||
.4byte gSlotMachineMenu_Pal + 0x20
|
||||
|
||||
gUnknown_085A84B0:: @ 85A84B0
|
||||
.incbin "graphics/slot_machine/85A84B0.gbapal"
|
||||
|
||||
gUnknown_085A84D0:: @ 85A84D0
|
||||
.incbin "graphics/slot_machine/85A84D0.gbapal"
|
||||
|
||||
gUnknown_085A84F0:: @ 85A84F0
|
||||
.incbin "graphics/slot_machine/85A84F0.gbapal"
|
||||
|
||||
gUnknown_083EDE10:: @ 85A8510
|
||||
.4byte gUnknown_085A84B0
|
||||
.4byte gUnknown_085A84D0
|
||||
.4byte gUnknown_085A84F0
|
||||
.4byte gUnknown_08DCF230
|
||||
|
||||
gUnknown_083EDE20:: @ 85A8520
|
||||
.4byte gUnknown_08DCF230
|
||||
|
||||
gPalette_83EDE24:: @ 85A8524
|
||||
.incbin "graphics/slot_machine/85A8524.bin"
|
||||
|
||||
.align 2
|
||||
gSlotMachineSpritePalettes:: @ 85A8544
|
||||
obj_pal gUnknown_08DCF170, 0
|
||||
obj_pal gUnknown_08DCF190, 1
|
||||
obj_pal gUnknown_08DCF1B0, 2
|
||||
obj_pal gSlotMachineReelTime_Pal, 3
|
||||
obj_pal gUnknown_08DCF1F0, 4
|
||||
obj_pal gUnknown_08DCF210, 5
|
||||
obj_pal gUnknown_08DCF230, 6
|
||||
obj_pal gUnknown_08DCF1F0, 7
|
||||
null_obj_pal
|
||||
|
||||
gReelTimeGfx:: @ 85A858C
|
||||
.incbin "graphics/slot_machine/reel_time_gfx.4bpp.lz"
|
||||
|
||||
gReelTimeWindowTilemap:: @ 85A96E0
|
||||
@if anyone knows what this tilemap is please do share
|
||||
.incbin "graphics/slot_machine/85A96E0.bin"
|
||||
|
||||
gUnknown_085A9898:: @ 85A9898
|
||||
.4byte NULL
|
12
gflib/text.h
12
gflib/text.h
@ -91,6 +91,18 @@
|
||||
#define CHAR_NEWLINE 0xFE
|
||||
#define EOS 0xFF // end of string
|
||||
|
||||
// Special F9 chars
|
||||
#define CHAR_UP_ARROW_2 0x00
|
||||
#define CHAR_DOWN_ARROW_2 0x01
|
||||
#define CHAR_LEFT_ARROW_2 0x02
|
||||
#define CHAR_RIGHT_ARROW_2 0x03
|
||||
#define CHAR_PLUS_2 0x04
|
||||
#define CHAR_LV_2 0x05
|
||||
#define CHAR_PP 0x06
|
||||
#define CHAR_ID 0x07
|
||||
#define CHAR_NO 0x08
|
||||
#define CHAR_UNDERSCORE 0x09
|
||||
|
||||
#define EXT_CTRL_CODE_COLOR 0x1
|
||||
#define EXT_CTRL_CODE_HIGHLIGHT 0x2
|
||||
#define EXT_CTRL_CODE_SHADOW 0x3
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@ -1353,22 +1353,24 @@
|
||||
|
||||
#define SYSTEM_FLAGS (TRAINER_FLAGS_END + 1) // 0x860
|
||||
|
||||
#define FLAG_SYS_POKEMON_GET (SYSTEM_FLAGS + 0) // FLAG_0x860
|
||||
#define FLAG_SYS_POKEDEX_GET (SYSTEM_FLAGS + 1)
|
||||
#define FLAG_SYS_POKENAV_GET (SYSTEM_FLAGS + 2)
|
||||
#define FLAG_SYS_GAME_CLEAR (SYSTEM_FLAGS + 4)
|
||||
#define FLAG_SYS_CHAT_USED (SYSTEM_FLAGS + 5)
|
||||
#define FLAG_SYS_HIPSTER_MEET (SYSTEM_FLAGS + 6)
|
||||
#define FLAG_SYS_POKEMON_GET (SYSTEM_FLAGS + 0x0) // FLAG_0x860
|
||||
#define FLAG_SYS_POKEDEX_GET (SYSTEM_FLAGS + 0x1)
|
||||
#define FLAG_SYS_POKENAV_GET (SYSTEM_FLAGS + 0x2)
|
||||
#define FLAG_UNUSED_0x863 (SYSTEM_FLAGS + 0x3)
|
||||
#define FLAG_SYS_GAME_CLEAR (SYSTEM_FLAGS + 0x4)
|
||||
#define FLAG_SYS_CHAT_USED (SYSTEM_FLAGS + 0x5)
|
||||
#define FLAG_SYS_HIPSTER_MEET (SYSTEM_FLAGS + 0x6)
|
||||
|
||||
// Badges
|
||||
#define FLAG_BADGE01_GET (SYSTEM_FLAGS + 7)
|
||||
#define FLAG_BADGE02_GET (SYSTEM_FLAGS + 8)
|
||||
#define FLAG_BADGE03_GET (SYSTEM_FLAGS + 9)
|
||||
#define FLAG_BADGE01_GET (SYSTEM_FLAGS + 0x7)
|
||||
#define FLAG_BADGE02_GET (SYSTEM_FLAGS + 0x8)
|
||||
#define FLAG_BADGE03_GET (SYSTEM_FLAGS + 0x9)
|
||||
#define FLAG_BADGE04_GET (SYSTEM_FLAGS + 0xA)
|
||||
#define FLAG_BADGE05_GET (SYSTEM_FLAGS + 0xB)
|
||||
#define FLAG_BADGE06_GET (SYSTEM_FLAGS + 0xC)
|
||||
#define FLAG_BADGE07_GET (SYSTEM_FLAGS + 0xD)
|
||||
#define FLAG_BADGE08_GET (SYSTEM_FLAGS + 0xE)
|
||||
#define NUM_BADGES (1 + FLAG_BADGE08_GET - FLAG_BADGE01_GET)
|
||||
|
||||
// Towns and Cities
|
||||
#define FLAG_VISITED_LITTLEROOT_TOWN (SYSTEM_FLAGS + 0xF)
|
||||
|
@ -478,13 +478,13 @@
|
||||
#define FIRST_ROUTE_114_MAN_BERRY ITEM_RAZZ_BERRY
|
||||
#define LAST_ROUTE_114_MAN_BERRY ITEM_PINAP_BERRY
|
||||
|
||||
#define NUM_BERRY_MASTER_BERRIES LAST_BERRY_MASTER_BERRY - FIRST_BERRY_MASTER_BERRY + 1
|
||||
#define NUM_BERRY_MASTER_BERRIES_SKIPPED FIRST_BERRY_MASTER_BERRY - FIRST_BERRY_INDEX
|
||||
#define NUM_BERRY_MASTER_WIFE_BERRIES LAST_BERRY_MASTER_WIFE_BERRY - FIRST_BERRY_MASTER_WIFE_BERRY + 1
|
||||
#define NUM_KIRI_BERRIES LAST_KIRI_BERRY - FIRST_KIRI_BERRY + 1
|
||||
#define NUM_KIRI_BERRIES_SKIPPED FIRST_KIRI_BERRY - FIRST_BERRY_INDEX
|
||||
#define NUM_ROUTE_114_MAN_BERRIES LAST_ROUTE_114_MAN_BERRY - FIRST_ROUTE_114_MAN_BERRY + 1
|
||||
#define NUM_ROUTE_114_MAN_BERRIES_SKIPPED FIRST_ROUTE_114_MAN_BERRY - FIRST_BERRY_INDEX
|
||||
#define NUM_BERRY_MASTER_BERRIES (LAST_BERRY_MASTER_BERRY - FIRST_BERRY_MASTER_BERRY + 1)
|
||||
#define NUM_BERRY_MASTER_BERRIES_SKIPPED (FIRST_BERRY_MASTER_BERRY - FIRST_BERRY_INDEX)
|
||||
#define NUM_BERRY_MASTER_WIFE_BERRIES (LAST_BERRY_MASTER_WIFE_BERRY - FIRST_BERRY_MASTER_WIFE_BERRY + 1)
|
||||
#define NUM_KIRI_BERRIES (LAST_KIRI_BERRY - FIRST_KIRI_BERRY + 1)
|
||||
#define NUM_KIRI_BERRIES_SKIPPED (FIRST_KIRI_BERRY - FIRST_BERRY_INDEX)
|
||||
#define NUM_ROUTE_114_MAN_BERRIES (LAST_ROUTE_114_MAN_BERRY - FIRST_ROUTE_114_MAN_BERRY + 1)
|
||||
#define NUM_ROUTE_114_MAN_BERRIES_SKIPPED (FIRST_ROUTE_114_MAN_BERRY - FIRST_BERRY_INDEX)
|
||||
|
||||
#define ITEM_TO_BERRY(itemId)(((itemId - FIRST_BERRY_INDEX) + 1))
|
||||
|
||||
|
@ -203,15 +203,16 @@
|
||||
#define MON_FEMALE 0xFE
|
||||
#define MON_GENDERLESS 0xFF
|
||||
|
||||
#define FRIENDSHIP_EVENT_GROW_LEVEL 0
|
||||
#define FRIENDSHIP_EVENT_VITAMIN 1 // unused
|
||||
#define FRIENDSHIP_EVENT_BATTLE_ITEM 2 // unused
|
||||
#define FRIENDSHIP_EVENT_LEAGUE_BATTLE 3
|
||||
#define FRIENDSHIP_EVENT_LEARN_TMHM 4
|
||||
#define FRIENDSHIP_EVENT_WALKING 5
|
||||
#define FRIENDSHIP_EVENT_FAINT_SMALL 6
|
||||
#define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 7
|
||||
#define FRIENDSHIP_EVENT_FAINT_LARGE 8
|
||||
// Constants for AdjustFriendship
|
||||
#define FRIENDSHIP_EVENT_GROW_LEVEL 0
|
||||
#define FRIENDSHIP_EVENT_VITAMIN 1 // unused, handled by PokemonUseItemEffects
|
||||
#define FRIENDSHIP_EVENT_BATTLE_ITEM 2 // unused, handled by PokemonUseItemEffects
|
||||
#define FRIENDSHIP_EVENT_LEAGUE_BATTLE 3
|
||||
#define FRIENDSHIP_EVENT_LEARN_TMHM 4
|
||||
#define FRIENDSHIP_EVENT_WALKING 5
|
||||
#define FRIENDSHIP_EVENT_FAINT_SMALL 6
|
||||
#define FRIENDSHIP_EVENT_FAINT_FIELD_PSN 7
|
||||
#define FRIENDSHIP_EVENT_FAINT_LARGE 8 // If opponent was >= 30 levels higher. See AdjustFriendshipOnBattleFaint
|
||||
|
||||
#define MAX_FRIENDSHIP 0xFF
|
||||
|
||||
@ -278,4 +279,7 @@
|
||||
|
||||
#define EVOS_PER_MON 5
|
||||
|
||||
#define NUM_MALE_LINK_FACILITY_CLASSES 8
|
||||
#define NUM_FEMALE_LINK_FACILITY_CLASSES 8
|
||||
|
||||
#endif // GUARD_CONSTANTS_POKEMON_H
|
||||
|
@ -63,6 +63,6 @@ bool32 sub_808D1B4(void);
|
||||
bool32 sub_808D1E8(void);
|
||||
void SetPlayerInvisibility(bool8 invisible);
|
||||
u8 player_get_pos_including_state_based_drift(s16 *x, s16 *y);
|
||||
void StartFishing(u8 taskId);
|
||||
void StartFishing(u8 rod);
|
||||
|
||||
#endif // GUARD_FIELD_PLAYER_AVATAR_H
|
||||
|
@ -4819,7 +4819,54 @@ extern const u32 sBlenderCenterGfx[];
|
||||
extern const u32 gUnknown_08D91DB8[];
|
||||
extern const u32 gUnknown_08D927EC[];
|
||||
|
||||
// Slot Machine
|
||||
extern const u32 gSlotMachineReelTime_Gfx[];
|
||||
extern const u8 gSlotMachineReelTimeNumber0[];
|
||||
extern const u8 gSlotMachineReelTimeNumber1[];
|
||||
extern const u8 gSlotMachineReelTimeNumber2[];
|
||||
extern const u8 gSlotMachineReelTimeNumber3[];
|
||||
extern const u8 gSlotMachineReelTimeNumber4[];
|
||||
extern const u8 gSlotMachineReelTimeNumber5[];
|
||||
extern const u8 gSlotMachineReelTimeShadow[];
|
||||
extern const u8 gUnknown_08DD1A18[];
|
||||
extern const u8 gSlotMachineReelTimeLargeBolt0[];
|
||||
extern const u8 gSlotMachineReelTimeLargeBolt1[];
|
||||
extern const u8 gSlotMachineReelTimePikaAura[];
|
||||
extern const u8 gSlotMachineReelTimeExplosion0[];
|
||||
extern const u8 gSlotMachineReelTimeExplosion1[];
|
||||
extern const u8 gSlotMachineReelTimeDuck[];
|
||||
extern const u8 gSlotMachineReelTimeSmoke[];
|
||||
extern const u8 gSlotMachineReelTimeBolt[];
|
||||
extern const u8 gSlotMachineReelSymbol1Tiles[];
|
||||
extern const u8 gSlotMachineReelSymbol2Tiles[];
|
||||
extern const u8 gSlotMachineReelSymbol3Tiles[];
|
||||
extern const u8 gSlotMachineReelSymbol4Tiles[];
|
||||
extern const u8 gSlotMachineReelSymbol5Tiles[];
|
||||
extern const u8 gSlotMachineReelSymbol6Tiles[];
|
||||
extern const u8 gSlotMachineReelSymbol7Tiles[];
|
||||
extern const u8 gSlotMachineNumber0Tiles[];
|
||||
extern const u8 gSlotMachineNumber1Tiles[];
|
||||
extern const u8 gSlotMachineNumber2Tiles[];
|
||||
extern const u8 gSlotMachineNumber3Tiles[];
|
||||
extern const u8 gSlotMachineNumber4Tiles[];
|
||||
extern const u8 gSlotMachineNumber5Tiles[];
|
||||
extern const u8 gSlotMachineNumber6Tiles[];
|
||||
extern const u8 gSlotMachineNumber7Tiles[];
|
||||
extern const u8 gSlotMachineNumber8Tiles[];
|
||||
extern const u8 gSlotMachineNumber9Tiles[];
|
||||
extern const u8 gUnknown_08DD19F8[];
|
||||
extern const u32 gSlotMachineMenu_Gfx[];
|
||||
extern const u16 gSlotMachineMenu_Tilemap[];
|
||||
extern const u16 gUnknown_08DCEC70[];
|
||||
extern const u16 gSlotMachineMenu_Pal[];
|
||||
extern const u16 gUnknown_08DCF230[];
|
||||
extern const u16 gUnknown_08DCF170[];
|
||||
extern const u16 gUnknown_08DCF1B0[];
|
||||
extern const u16 gSlotMachineReelTime_Pal[];
|
||||
extern const u16 gUnknown_08DCF1F0[];
|
||||
extern const u16 gUnknown_08DCF210[];
|
||||
extern const u16 gUnknown_08DCF230[];
|
||||
extern const u16 gUnknown_08DCF190[];
|
||||
|
||||
extern const u32 gUnknown_08D8D410[];
|
||||
extern const u32 gUnknown_08D8D58C[];
|
||||
@ -4877,7 +4924,6 @@ extern const u32 gRouletteNumbersTiles[];
|
||||
extern const u32 gRouletteMultiplierTiles[];
|
||||
|
||||
// Contest Link
|
||||
extern const u32 gUnknown_0858D6B0[];
|
||||
extern const u32 gUnknown_08C19588[];
|
||||
extern const u32 gUnknown_08C19EEC[];
|
||||
extern const u32 gUnknown_08C1A000[];
|
||||
@ -4896,18 +4942,18 @@ extern const u16 gUnknown_08DC64FC[];
|
||||
extern const u16 gUnknown_08DC6510[];
|
||||
|
||||
// Trainer Card.
|
||||
extern const u16 gEmeraldTrainerCard0Star_Pal[];
|
||||
extern const u32 gEmeraldTrainerCard_Gfx[];
|
||||
extern const u16 gFireRedTrainerCard0Star_Pal[];
|
||||
extern const u32 gFireRedTrainerCard_Gfx[];
|
||||
extern const u32 gUnknown_08DD2AE0[];
|
||||
extern const u32 gUnknown_08DD21B0[];
|
||||
extern const u32 gUnknown_08DD2D30[];
|
||||
extern const u32 gUnknown_08DD2010[];
|
||||
extern const u32 gUnknown_08DD2B78[];
|
||||
extern const u32 gUnknown_08DD228C[];
|
||||
extern const u32 gUnknown_08DD2E5C[];
|
||||
extern const u32 gUnknown_08DD1F78[];
|
||||
extern const u16 gHoennTrainerCard0Star_Pal[];
|
||||
extern const u32 gHoennTrainerCard_Gfx[];
|
||||
extern const u16 gKantoTrainerCard0Star_Pal[];
|
||||
extern const u32 gKantoTrainerCard_Gfx[];
|
||||
extern const u32 gKantoTrainerCardBg_Tilemap[];
|
||||
extern const u32 gHoennTrainerCardBack_Tilemap[];
|
||||
extern const u32 gKantoTrainerCardBack_Tilemap[];
|
||||
extern const u32 gHoennTrainerCardFront_Tilemap[];
|
||||
extern const u32 gKantoTrainerCardFront_Tilemap[];
|
||||
extern const u32 gHoennTrainerCardFrontLink_Tilemap[];
|
||||
extern const u32 gKantoTrainerCardFrontLink_Tilemap[];
|
||||
extern const u32 gHoennTrainerCardBg_Tilemap[];
|
||||
|
||||
// Frontier Pass
|
||||
extern const u32 gUnknown_08DE08C8[];
|
||||
|
@ -8,6 +8,15 @@
|
||||
#define MENU_NOTHING_CHOSEN -2
|
||||
#define MENU_B_PRESSED -1
|
||||
|
||||
enum
|
||||
{
|
||||
SAVE_MENU_NAME,
|
||||
SAVE_MENU_CAUGHT,
|
||||
SAVE_MENU_PLAY_TIME,
|
||||
SAVE_MENU_LOCATION,
|
||||
SAVE_MENU_BADGES,
|
||||
};
|
||||
|
||||
struct MenuAction
|
||||
{
|
||||
const u8 *text;
|
||||
@ -23,7 +32,7 @@ void FreeAllOverworldWindowBuffers(void);
|
||||
void InitStandardTextBoxWindows(void);
|
||||
void sub_8197200(void);
|
||||
u16 RunTextPrintersAndIsPrinter0Active(void);
|
||||
void sub_81973A4(void);
|
||||
void LoadMessageBoxAndBorderGfx(void);
|
||||
void DrawDialogueFrame(u8 windowId, bool8 copyToVram);
|
||||
void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram);
|
||||
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
|
||||
@ -80,7 +89,7 @@ void sub_819786C(u8 windowId, bool8 copyToVram);
|
||||
void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress);
|
||||
void RemoveStartMenuWindow(void);
|
||||
void DisplayYesNoMenuWithDefault(u8 initialCursorPos);
|
||||
void sub_819A344(u8 a0, u8 *dest, u8 color);
|
||||
void BufferSaveMenuText(u8 textId, u8 *dest, u8 color);
|
||||
void RemoveMapNamePopUpWindow(void);
|
||||
u8 GetMapNamePopUpWindowId(void);
|
||||
u8 AddMapNamePopUpWindow(void);
|
||||
|
@ -413,7 +413,6 @@ void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality);
|
||||
const u8 *GetTrainerClassNameFromId(u16 trainerId);
|
||||
const u8 *GetTrainerNameFromId(u16 trainerId);
|
||||
bool8 HasTwoFramesAnimation(u16 species);
|
||||
bool8 sub_806F104(void);
|
||||
struct Unknown_806F160_Struct *sub_806F2AC(u8 id, u8 arg1);
|
||||
void sub_806F47C(u8 id);
|
||||
u8 *sub_806F4F8(u8 id, u8 arg1);
|
||||
|
@ -85,6 +85,39 @@ enum
|
||||
POKENAV_MENU_E,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
POKENAV_MENU_TYPE_DEFAULT,
|
||||
POKENAV_MENU_TYPE_UNLOCK_MC,
|
||||
POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS,
|
||||
POKENAV_MENU_TYPE_CONDITION,
|
||||
POKENAV_MENU_TYPE_CONDITION_SEARCH,
|
||||
POKENAV_MENU_TYPE_COUNT
|
||||
};
|
||||
|
||||
// Global IDs for menu selections
|
||||
// As opposed to the cursor position, which is only relative to the number of options for the current menu
|
||||
enum
|
||||
{
|
||||
POKENAV_MENUITEM_MAP,
|
||||
POKENAV_MENUITEM_CONDITION,
|
||||
POKENAV_MENUITEM_MATCH_CALL,
|
||||
POKENAV_MENUITEM_RIBBONS,
|
||||
POKENAV_MENUITEM_SWITCH_OFF,
|
||||
POKENAV_MENUITEM_CONDITION_PARTY,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH,
|
||||
POKENAV_MENUITEM_CONDITION_CANCEL,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_COOL,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_BEAUTY,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_CUTE,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_SMART,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_TOUGH,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_CANCEL,
|
||||
};
|
||||
|
||||
// Max menu options (condition search uses 6)
|
||||
#define MAX_POKENAV_MENUITEMS 6
|
||||
|
||||
enum
|
||||
{
|
||||
HELPBAR_NONE,
|
||||
@ -150,6 +183,23 @@ enum
|
||||
[CHECK_PAGE_INTRO_1] = gText_MatchCall##name##_Intro1, \
|
||||
[CHECK_PAGE_INTRO_2] = gText_MatchCall##name##_Intro2}
|
||||
|
||||
|
||||
// Pokenav Function IDs
|
||||
// Indices into the LoopedTask tables for each of the main Pokenav features
|
||||
|
||||
enum
|
||||
{
|
||||
POKENAV_MENU_FUNC_NONE,
|
||||
POKENAV_MENU_FUNC_MOVE_CURSOR,
|
||||
POKENAV_MENU_FUNC_OPEN_CONDITION,
|
||||
POKENAV_MENU_FUNC_RETURN_TO_MAIN,
|
||||
POKENAV_MENU_FUNC_OPEN_CONDITION_SEARCH,
|
||||
POKENAV_MENU_FUNC_RETURN_TO_CONDITION,
|
||||
POKENAV_MENU_FUNC_NO_RIBBON_WINNERS,
|
||||
POKENAV_MENU_FUNC_RESHOW_DESCRIPTION,
|
||||
POKENAV_MENU_FUNC_OPEN_FEATURE,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
POKENAV_MC_FUNC_NONE,
|
||||
@ -171,8 +221,8 @@ enum
|
||||
};
|
||||
|
||||
// pokenav.c
|
||||
void sub_81C7694(u32);
|
||||
u32 sub_81C76AC(void);
|
||||
void SetSelectedConditionSearch(u32);
|
||||
u32 GetSelectedConditionSearch(void);
|
||||
|
||||
void CB2_InitPokeNav(void);
|
||||
u32 CreateLoopedTask(LoopedTask loopedTask, u32 priority);
|
||||
@ -247,7 +297,7 @@ bool32 WaitForPokenavShutdownFade(void);
|
||||
void sub_81C7834(void *func1, void *func2);
|
||||
void ShutdownPokenav(void);
|
||||
|
||||
// pokenav_unk_1.c
|
||||
// pokenav_menu_handler_1.c
|
||||
bool32 PokenavCallback_Init_0(void);
|
||||
bool32 PokenavCallback_Init_4(void);
|
||||
bool32 PokenavCallback_Init_5(void);
|
||||
@ -255,20 +305,20 @@ bool32 PokenavCallback_Init_2(void);
|
||||
bool32 PokenavCallback_Init_3(void);
|
||||
u32 sub_81C941C(void);
|
||||
void sub_81C9430(void);
|
||||
int sub_81C9894(void);
|
||||
int sub_81C98A4(void);
|
||||
int sub_81C98B4(void);
|
||||
int GetPokenavMenuType(void);
|
||||
int GetPokenavCursorPos(void);
|
||||
int GetCurrentMenuItemId(void);
|
||||
u16 GetHelpBarTextId(void);
|
||||
|
||||
// pokenav_unk_2.c
|
||||
// pokenav_menu_handler_2.c
|
||||
bool32 sub_81C9924(void);
|
||||
bool32 sub_81C9940(void);
|
||||
void sub_81C9990(s32 ltIdx);
|
||||
void CreateMenuHandlerLoopedTask(s32 ltIdx);
|
||||
bool32 sub_81C99C0(void);
|
||||
void sub_81C99D4(void);
|
||||
void sub_81CAADC(void);
|
||||
|
||||
// pokenav_unk_3.c
|
||||
// pokenav_match_call_1.c
|
||||
bool32 PokenavCallback_Init_11(void);
|
||||
u32 sub_81CAB24(void);
|
||||
void sub_81CAB38(void);
|
||||
@ -290,13 +340,13 @@ int GetIndexDeltaOfNextCheckPageDown(int index);
|
||||
int GetIndexDeltaOfNextCheckPageUp(int index);
|
||||
bool32 IsRematchEntryRegistered(int index);
|
||||
|
||||
// pokenav_unk_4.c
|
||||
// pokenav_match_call_2.c
|
||||
bool32 sub_81CB260(void);
|
||||
void sub_81CB29C(s32 index);
|
||||
void CreateMatchCallLoopedTask(s32 index);
|
||||
u32 sub_81CB2CC(void);
|
||||
void sub_81CB2E0(void);
|
||||
|
||||
// pokenav_unk_5.c
|
||||
// pokenav_region_map.c
|
||||
u32 PokenavCallback_Init_6(void);
|
||||
void sub_81CC524(void);
|
||||
u32 sub_81CC554(void);
|
||||
@ -305,7 +355,7 @@ void sub_81CC62C(s32);
|
||||
u32 sub_81CC65C(void);
|
||||
void sub_81CC670(void);
|
||||
|
||||
// pokenav_unk_6.c
|
||||
// pokenav_conditions_1.c
|
||||
u32 PokenavCallback_Init_7(void);
|
||||
u32 PokenavCallback_Init_9(void);
|
||||
u32 sub_81CD070(void);
|
||||
@ -324,14 +374,14 @@ u16 sub_81CDD48(void);
|
||||
void *sub_81CDCB4(u8 id);
|
||||
void *sub_81CDCD4(u8 id);
|
||||
|
||||
// pokenav_unk_7.c
|
||||
// pokenav_conditions_2.c
|
||||
bool32 sub_81CDDD4(void);
|
||||
void sub_81CDE2C(s32);
|
||||
u32 sub_81CDE64(void);
|
||||
void sub_81CECA0(void);
|
||||
u8 sub_81CEF14(void);
|
||||
|
||||
// pokenav_unk_8.c
|
||||
// pokenav_conditions_3.c
|
||||
u32 PokenavCallback_Init_8(void);
|
||||
u32 PokenavCallback_Init_10(void);
|
||||
u32 sub_81CEFDC(void);
|
||||
@ -342,7 +392,7 @@ void sub_81CF3A0(s32);
|
||||
u32 sub_81CF3D0(void);
|
||||
void sub_81CF3F8(void);
|
||||
|
||||
// pokenav_unk_9.c
|
||||
// pokenav_ribbons_1.c
|
||||
u32 PokenavCallback_Init_12(void);
|
||||
u32 PokenavCallback_Init_14(void);
|
||||
u32 sub_81CFA34(void);
|
||||
@ -353,7 +403,7 @@ void sub_81CFE40(s32);
|
||||
u32 sub_81CFE70(void);
|
||||
void sub_81CFE98(void);
|
||||
|
||||
// pokenav_unk_10.c
|
||||
// pokenav_ribbons_2.c
|
||||
u32 PokenavCallback_Init_13(void);
|
||||
u32 sub_81D04A0(void);
|
||||
void sub_81D04B8(void);
|
||||
|
@ -2514,11 +2514,11 @@ extern const u8 gText_WinsLosses[];
|
||||
extern const u8 gText_PokemonTrades[];
|
||||
extern const u8 gText_BerryCrush[];
|
||||
extern const u8 gText_UnionTradesAndBattles[];
|
||||
extern const u8 gText_Var1DarkGreyShadowLightGrey[];
|
||||
extern const u8 gText_NumPokeblocks[];
|
||||
extern const u8 gText_PokeblocksWithFriends[];
|
||||
extern const u8 gText_WonContestsWFriends[];
|
||||
extern const u8 gText_WSlashStraightSlash[];
|
||||
extern const u8 gText_Var1DarkLightGreyBP[];
|
||||
extern const u8 gText_WinsStraight[];
|
||||
extern const u8 gText_NumBP[];
|
||||
extern const u8 gText_BattleTower[];
|
||||
extern const u8 gText_BattlePtsWon[];
|
||||
|
||||
@ -2914,8 +2914,11 @@ extern const u8 gText_NumberRegistered[];
|
||||
extern const u8 gText_NumberOfBattles[];
|
||||
extern const u8 gText_Unknown[];
|
||||
extern const u8 gText_TrainerCloseBy[];
|
||||
extern const u8 gText_Call[];
|
||||
extern const u8 gText_Check[];
|
||||
extern const u8 gText_Cancel6[];
|
||||
|
||||
// pokenav_unk_2
|
||||
// Pokenav Menu Handler
|
||||
extern const u8 gText_CheckMapOfHoenn[];
|
||||
extern const u8 gText_CheckPokemonInDetail[];
|
||||
extern const u8 gText_CallRegisteredTrainer[];
|
||||
@ -2932,15 +2935,8 @@ extern const u8 gText_FindToughPokemon[];
|
||||
extern const u8 gText_ReturnToConditionMenu[];
|
||||
extern const u8 gText_NoRibbonWinners[];
|
||||
|
||||
// pokenav_unk_4
|
||||
extern const u8 gText_Call[];
|
||||
extern const u8 gText_Check[];
|
||||
extern const u8 gText_Cancel6[];
|
||||
|
||||
// pokenav_unk_8
|
||||
// Pokenav Ribbons
|
||||
extern const u8 gText_NumberF700[];
|
||||
|
||||
// pokenav_unk_10
|
||||
extern const u8 gText_RibbonsF700[];
|
||||
|
||||
// use_pokeblock
|
||||
|
@ -1,6 +1,24 @@
|
||||
#ifndef GUARD_TRAINER_CARD_H
|
||||
#define GUARD_TRAINER_CARD_H
|
||||
|
||||
#define TRAINER_CARD_PROFILE_LENGTH 4
|
||||
#define TRAINER_CARD_STICKER_TYPES 3
|
||||
|
||||
enum
|
||||
{
|
||||
CARD_TYPE_FRLG,
|
||||
CARD_TYPE_RS,
|
||||
CARD_TYPE_EMERALD,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
MON_ICON_TINT_NORMAL,
|
||||
MON_ICON_TINT_BLACK,
|
||||
MON_ICON_TINT_PINK,
|
||||
MON_ICON_TINT_SEPIA,
|
||||
};
|
||||
|
||||
struct TrainerCard
|
||||
{
|
||||
/*0x00*/ u8 gender;
|
||||
@ -23,19 +41,19 @@ struct TrainerCard
|
||||
/*0x1E*/ u16 pokeblocksWithFriends;
|
||||
/*0x20*/ u16 pokemonTrades;
|
||||
/*0x24*/ u32 money;
|
||||
/*0x28*/ u16 var_28[4];
|
||||
/*0x28*/ u16 easyChatProfile[TRAINER_CARD_PROFILE_LENGTH];
|
||||
/*0x30*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x38*/ u8 version;
|
||||
/*0x3A*/ u16 var_3A;
|
||||
/*0x3A*/ bool16 hasAllFrontierSymbols;
|
||||
/*0x3C*/ u32 berryCrushPoints;
|
||||
/*0x40*/ u32 unionRoomNum;
|
||||
/*0x44*/ u8 filler44[0x8];
|
||||
/*0x4C*/ u8 var_4C;
|
||||
/*0x4D*/ u8 var_4D;
|
||||
/*0x4E*/ u8 var_4E;
|
||||
/*0x4F*/ u8 var_4F;
|
||||
/*0x50*/ u8 var_50[0x4];
|
||||
/*0x54*/ u16 monSpecies[PARTY_SIZE];
|
||||
/*0x44*/ u8 filler[8];
|
||||
/*0x4C*/ bool8 shouldDrawStickers; // FRLG only
|
||||
/*0x4D*/ u8 unused;
|
||||
/*0x4E*/ u8 monIconTint; // FRLG only
|
||||
/*0x4F*/ u8 facilityClass;
|
||||
/*0x50*/ u8 stickers[TRAINER_CARD_STICKER_TYPES]; // FRLG only
|
||||
/*0x54*/ u16 monSpecies[PARTY_SIZE]; // FRLG only
|
||||
/*0x60*/ bool16 hasAllSymbols;
|
||||
/*0x62*/ u16 frontierBP;
|
||||
};
|
||||
|
@ -7,7 +7,7 @@ u16 CreateMonPicSprite_HandleDeoxys(u16 species, u32 otId, u32 personality, bool
|
||||
u16 FreeAndDestroyMonPicSprite(u16 spriteId);
|
||||
u16 CreateTrainerPicSprite(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 FreeAndDestroyTrainerPicSprite(u16 spriteId);
|
||||
u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId);
|
||||
u16 CreateTrainerCardTrainerPicSprite(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId);
|
||||
u16 PlayerGenderToFrontTrainerPicId_Debug(u8 gender, bool8 getClass);
|
||||
|
||||
#endif // GUARD_TRAINER_POKEMON_SPRITES_H
|
||||
|
@ -297,7 +297,7 @@ SECTIONS {
|
||||
src/battle_tent.o(.text);
|
||||
src/unk_text_util_2.o(.text);
|
||||
src/multiboot.o(.text);
|
||||
src/unk_81BAD84.o(.text);
|
||||
src/berry_fix_graphics.o(.text);
|
||||
src/battle_controller_player_partner.o(.text);
|
||||
src/mirage_tower.o(.text);
|
||||
src/berry_fix_program.o(.text);
|
||||
@ -307,16 +307,16 @@ SECTIONS {
|
||||
src/pokenav.o(.text);
|
||||
src/pokenav_main_menu.o(.text);
|
||||
src/pokenav_match_call_ui.o(.text);
|
||||
src/pokenav_unk_1.o(.text);
|
||||
src/pokenav_unk_2.o(.text);
|
||||
src/pokenav_unk_3.o(.text);
|
||||
src/pokenav_unk_4.o(.text);
|
||||
src/pokenav_unk_5.o(.text);
|
||||
src/pokenav_unk_6.o(.text);
|
||||
src/pokenav_unk_7.o(.text);
|
||||
src/pokenav_unk_8.o(.text);
|
||||
src/pokenav_unk_9.o(.text);
|
||||
src/pokenav_unk_10.o(.text);
|
||||
src/pokenav_menu_handler_1.o(.text);
|
||||
src/pokenav_menu_handler_2.o(.text);
|
||||
src/pokenav_match_call_1.o(.text);
|
||||
src/pokenav_match_call_2.o(.text);
|
||||
src/pokenav_region_map.o(.text);
|
||||
src/pokenav_conditions_1.o(.text);
|
||||
src/pokenav_conditions_2.o(.text);
|
||||
src/pokenav_conditions_3.o(.text);
|
||||
src/pokenav_ribbons_1.o(.text);
|
||||
src/pokenav_ribbons_2.o(.text);
|
||||
src/pokenav_match_call_data.o(.text);
|
||||
src/menu_specialized.o(.text);
|
||||
src/ereader_helpers.o(.text);
|
||||
@ -455,7 +455,7 @@ SECTIONS {
|
||||
src/union_room_chat.o(.rodata);
|
||||
src/berry_crush.o(.rodata);
|
||||
data/berry_crush.o(.rodata);
|
||||
data/berry_powder.o(.rodata);
|
||||
src/berry_powder.o(.rodata);
|
||||
src/dodrio_berry_picking.o(.rodata);
|
||||
src/pokemon_jump.o(.rodata);
|
||||
src/rtc.o(.rodata);
|
||||
@ -539,7 +539,6 @@ SECTIONS {
|
||||
src/secret_base.o(.rodata);
|
||||
src/tv.o(.rodata);
|
||||
src/contest_link_80F57C4.o(.rodata);
|
||||
data/contest_link_80F57C4.o(.rodata);
|
||||
src/script_pokemon_util_80F87D8.o(.rodata);
|
||||
src/pokemon_size_record.o(.rodata)
|
||||
src/fldeff_misc.o(.rodata);
|
||||
@ -578,7 +577,6 @@ SECTIONS {
|
||||
data/image_processing_effects.o(.rodata);
|
||||
src/decoration.o(.rodata);
|
||||
src/slot_machine.o(.rodata);
|
||||
data/slot_machine.o(.rodata);
|
||||
src/contest_painting.o(.rodata);
|
||||
src/battle_ai_script_commands.o(.rodata);
|
||||
src/trader.o(.rodata);
|
||||
@ -644,7 +642,6 @@ SECTIONS {
|
||||
src/battle_factory.o(.rodata);
|
||||
src/battle_pike.o(.rodata);
|
||||
src/rotating_tile_puzzle.o(.rodata);
|
||||
data/rotating_tile_puzzle.o(.rodata);
|
||||
src/battle_pyramid.o(.rodata);
|
||||
src/item_menu.o(.rodata);
|
||||
src/list_menu.o(.rodata);
|
||||
@ -654,7 +651,7 @@ SECTIONS {
|
||||
src/battle_tent.o(.rodata);
|
||||
src/unk_text_util_2.o(.rodata);
|
||||
src/multiboot.o(.rodata);
|
||||
src/unk_81BAD84.o(.rodata);
|
||||
src/berry_fix_graphics.o(.rodata);
|
||||
src/battle_controller_player_partner.o(.rodata);
|
||||
src/mirage_tower.o(.rodata);
|
||||
src/berry_fix_program.o(.rodata);
|
||||
@ -664,15 +661,15 @@ SECTIONS {
|
||||
src/pokenav.o(.rodata);
|
||||
src/pokenav_main_menu.o(.rodata);
|
||||
src/pokenav_match_call_ui.o(.rodata);
|
||||
src/pokenav_unk_1.o(.rodata);
|
||||
src/pokenav_unk_2.o(.rodata);
|
||||
src/pokenav_unk_3.o(.rodata);
|
||||
src/pokenav_unk_4.o(.rodata);
|
||||
src/pokenav_unk_5.o(.rodata);
|
||||
src/pokenav_unk_7.o(.rodata);
|
||||
src/pokenav_unk_8.o(.rodata);
|
||||
src/pokenav_unk_9.o(.rodata);
|
||||
src/pokenav_unk_10.o(.rodata);
|
||||
src/pokenav_menu_handler_1.o(.rodata);
|
||||
src/pokenav_menu_handler_2.o(.rodata);
|
||||
src/pokenav_match_call_1.o(.rodata);
|
||||
src/pokenav_match_call_2.o(.rodata);
|
||||
src/pokenav_region_map.o(.rodata);
|
||||
src/pokenav_conditions_2.o(.rodata);
|
||||
src/pokenav_conditions_3.o(.rodata);
|
||||
src/pokenav_ribbons_1.o(.rodata);
|
||||
src/pokenav_ribbons_2.o(.rodata);
|
||||
src/pokenav_match_call_data.o(.rodata);
|
||||
src/menu_specialized.o(.rodata);
|
||||
src/ereader_helpers.o(.rodata);
|
||||
|
@ -718,7 +718,7 @@ static void CB2_InitBattleInternal(void)
|
||||
gSaveBlock2Ptr->frontier.disableRecordBattle = FALSE;
|
||||
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
AdjustFriendship(&gPlayerParty[i], 3);
|
||||
AdjustFriendship(&gPlayerParty[i], FRIENDSHIP_EVENT_LEAGUE_BATTLE);
|
||||
|
||||
gBattleCommunication[MULTIUSE_STATE] = 0;
|
||||
}
|
||||
|
@ -3434,7 +3434,7 @@ static void Cmd_getexp(void)
|
||||
gLeveledUpInBattle |= gBitTable[gBattleStruct->expGetterMonId];
|
||||
gBattlescriptCurrInstr = BattleScript_LevelUp;
|
||||
gBattleMoveDamage = (gBattleBufferB[gActiveBattler][2] | (gBattleBufferB[gActiveBattler][3] << 8));
|
||||
AdjustFriendship(&gPlayerParty[gBattleStruct->expGetterMonId], 0);
|
||||
AdjustFriendship(&gPlayerParty[gBattleStruct->expGetterMonId], FRIENDSHIP_EVENT_GROW_LEVEL);
|
||||
|
||||
// update battle mon structure after level up
|
||||
if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId && gBattleMons[0].hp)
|
||||
@ -6351,7 +6351,7 @@ static void PutLevelAndGenderOnLvlUpBox(void)
|
||||
txtPtr = gStringVar4;
|
||||
gStringVar4[0] = CHAR_SPECIAL_F9;
|
||||
txtPtr++;
|
||||
txtPtr[0] = 5;
|
||||
txtPtr[0] = CHAR_LV_2;
|
||||
txtPtr++;
|
||||
|
||||
var = (u32)(txtPtr);
|
||||
|
@ -321,7 +321,7 @@ const struct RematchTrainer gRematchTable[REMATCH_TABLE_ENTRIES] =
|
||||
[REMATCH_WALLACE] = REMATCH(TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, EVER_GRANDE_CITY),
|
||||
};
|
||||
|
||||
static const u16 sBadgeFlags[8] =
|
||||
static const u16 sBadgeFlags[NUM_BADGES] =
|
||||
{
|
||||
FLAG_BADGE01_GET, FLAG_BADGE02_GET, FLAG_BADGE03_GET, FLAG_BADGE04_GET,
|
||||
FLAG_BADGE05_GET, FLAG_BADGE06_GET, FLAG_BADGE07_GET, FLAG_BADGE08_GET,
|
||||
|
@ -92,13 +92,13 @@ void AdjustFriendshipOnBattleFaint(u8 battlerId)
|
||||
if (gBattleMons[opposingBattlerId].level > gBattleMons[battlerId].level)
|
||||
{
|
||||
if (gBattleMons[opposingBattlerId].level - gBattleMons[battlerId].level > 29)
|
||||
AdjustFriendship(&gPlayerParty[gBattlerPartyIndexes[battlerId]], 8);
|
||||
AdjustFriendship(&gPlayerParty[gBattlerPartyIndexes[battlerId]], FRIENDSHIP_EVENT_FAINT_LARGE);
|
||||
else
|
||||
AdjustFriendship(&gPlayerParty[gBattlerPartyIndexes[battlerId]], 6);
|
||||
AdjustFriendship(&gPlayerParty[gBattlerPartyIndexes[battlerId]], FRIENDSHIP_EVENT_FAINT_SMALL);
|
||||
}
|
||||
else
|
||||
{
|
||||
AdjustFriendship(&gPlayerParty[gBattlerPartyIndexes[battlerId]], 6);
|
||||
AdjustFriendship(&gPlayerParty[gBattlerPartyIndexes[battlerId]], FRIENDSHIP_EVENT_FAINT_SMALL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
#include "global.h"
|
||||
#include "graphics.h"
|
||||
|
||||
const struct {
|
||||
// Duplicate of sBerryFixGraphics in berry_fix_program.c
|
||||
static const struct {
|
||||
const u32 *gfx;
|
||||
const u32 *tileMap;
|
||||
const u32 *tilemap;
|
||||
const u16 *pltt;
|
||||
} gUnknown_08617128[] = {
|
||||
} sBerryFixGraphics[] = {
|
||||
{
|
||||
gBerryFixGameboy_Gfx,
|
||||
gBerryFixGameboy_Tilemap,
|
||||
@ -33,15 +34,16 @@ const struct {
|
||||
}
|
||||
};
|
||||
|
||||
void sub_81BAD84(u32 idx)
|
||||
// Unused. See berry_fix_program.c
|
||||
static void LoadBerryFixGraphics(u32 idx)
|
||||
{
|
||||
REG_DISPCNT = 0x0000;
|
||||
REG_BG0HOFS = 0x0000;
|
||||
REG_BG0VOFS = 0x0000;
|
||||
REG_BLDCNT = 0x0000;
|
||||
LZ77UnCompVram(gUnknown_08617128[idx].gfx, (void *)BG_CHAR_ADDR(0));
|
||||
LZ77UnCompVram(gUnknown_08617128[idx].tileMap, (void *)BG_SCREEN_ADDR(31));
|
||||
CpuCopy16(gUnknown_08617128[idx].pltt, (void *)PLTT, 0x200);
|
||||
REG_DISPCNT = 0;
|
||||
REG_BG0HOFS = 0;
|
||||
REG_BG0VOFS = 0;
|
||||
REG_BLDCNT = 0;
|
||||
LZ77UnCompVram(sBerryFixGraphics[idx].gfx, (void *)BG_CHAR_ADDR(0));
|
||||
LZ77UnCompVram(sBerryFixGraphics[idx].tilemap, (void *)BG_SCREEN_ADDR(31));
|
||||
CpuCopy16(sBerryFixGraphics[idx].pltt, (void *)PLTT, 0x200);
|
||||
REG_BG0CNT = 0x1f00;
|
||||
REG_DISPCNT = DISPCNT_BG0_ON;
|
||||
}
|
@ -47,20 +47,65 @@ static const u8 sText_TransmittingPleaseWait[] = _("Transmitting. Please wait.\n
|
||||
static const u8 sText_PleaseFollowInstructionsOnScreen[] = _("Please follow the instructions on your\nPOKéMON Ruby/Sapphire screen.");
|
||||
static const u8 sText_TransmissionFailureTryAgain[] = _("Transmission failure.\n{COLOR RED}{SHADOW LIGHT_RED}Please try again.");
|
||||
|
||||
static const struct BgTemplate gUnknown_08618108[] = {
|
||||
static const struct BgTemplate sBerryFixBgTemplates[] = {
|
||||
{
|
||||
0, 0, 30, 0, 0, 0
|
||||
}, {
|
||||
1, 1, 31, 0, 0, 1
|
||||
.bg = 0,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 30,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 0,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 1,
|
||||
.charBaseIndex = 1,
|
||||
.mapBaseIndex = 31,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 1,
|
||||
.baseTile = 0
|
||||
}
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_08618110[] = {
|
||||
{0, 2, 4, 26, 2, 15, 0x001},
|
||||
{0, 1, 11, 28, 8, 15, 0x035},
|
||||
{0, 0, 8, 30, 2, 15, 0x115},
|
||||
{0, 8, 0, 14, 2, 15, 0x151},
|
||||
{-1}
|
||||
static const struct WindowTemplate sBerryFixWindowTemplates[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 4,
|
||||
.width = 26,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 1
|
||||
},
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 11,
|
||||
.width = 28,
|
||||
.height = 8,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 53
|
||||
},
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0,
|
||||
.tilemapTop = 8,
|
||||
.width = 30,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 277
|
||||
},
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 8,
|
||||
.tilemapTop = 0,
|
||||
.width = 14,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 337
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const u16 sUnknown_08618138[] = {
|
||||
@ -82,7 +127,12 @@ static const u8 *const sBerryProgramTexts[] = {
|
||||
sText_BerryProgramWillBeUpdatedPressA
|
||||
};
|
||||
|
||||
static const void *const gUnknown_08618178[][3] = {
|
||||
|
||||
static const struct {
|
||||
const u32 *gfx;
|
||||
const u32 *tilemap;
|
||||
const u16 *pltt;
|
||||
} sBerryFixGraphics[] = {
|
||||
{
|
||||
gBerryFixGameboy_Gfx,
|
||||
gBerryFixGameboy_Tilemap,
|
||||
@ -117,8 +167,8 @@ extern const u8 gMultiBootProgram_BerryGlitchFix_End[];
|
||||
|
||||
void CB2_InitBerryFixProgram(void)
|
||||
{
|
||||
DisableInterrupts(0xFFFF);
|
||||
EnableInterrupts(0x0001);
|
||||
DisableInterrupts(0xFFFF); // all
|
||||
EnableInterrupts(INTR_FLAG_VBLANK);
|
||||
m4aSoundVSyncOff();
|
||||
SetVBlankCallback(NULL);
|
||||
ResetSpriteData();
|
||||
@ -216,12 +266,12 @@ static void berry_fix_gpu_set(void)
|
||||
DmaFill32(3, 0, PLTT, PLTT_SIZE);
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
|
||||
InitBgsFromTemplates(0, gUnknown_08618108, ARRAY_COUNT(gUnknown_08618108));
|
||||
InitBgsFromTemplates(0, sBerryFixBgTemplates, ARRAY_COUNT(sBerryFixBgTemplates));
|
||||
ChangeBgX(0, 0, 0);
|
||||
ChangeBgY(0, 0, 0);
|
||||
ChangeBgX(1, 0, 0);
|
||||
ChangeBgY(1, 0, 0);
|
||||
InitWindows(gUnknown_08618110);
|
||||
InitWindows(sBerryFixWindowTemplates);
|
||||
DeactivateAllTextPrinters();
|
||||
|
||||
DmaCopy32(3, sUnknown_08618138, BG_PLTT + 0x1E0, 0x20);
|
||||
@ -293,9 +343,9 @@ static void berry_fix_text_print(int scene)
|
||||
break;
|
||||
}
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
LZ77UnCompVram(gUnknown_08618178[scene][0], (void *)BG_CHAR_ADDR(1));
|
||||
LZ77UnCompVram(gUnknown_08618178[scene][1], (void *)BG_SCREEN_ADDR(31));
|
||||
CpuCopy32(gUnknown_08618178[scene][2], (void *)BG_PLTT, 0x100);
|
||||
LZ77UnCompVram(sBerryFixGraphics[scene].gfx, (void *)BG_CHAR_ADDR(1));
|
||||
LZ77UnCompVram(sBerryFixGraphics[scene].tilemap, (void *)BG_SCREEN_ADDR(31));
|
||||
CpuCopy32(sBerryFixGraphics[scene].pltt, (void *)BG_PLTT, 0x100);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
}
|
||||
|
@ -14,6 +14,118 @@
|
||||
|
||||
static EWRAM_DATA u8 sBerryPowderVendorWindowId = 0;
|
||||
|
||||
// Unused
|
||||
static const struct BgTemplate sBerryPowderBgTemplates[] =
|
||||
{
|
||||
{
|
||||
.bg = 0,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 30,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 0,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 1,
|
||||
.charBaseIndex = 2,
|
||||
.mapBaseIndex = 12,
|
||||
.screenSize = 1,
|
||||
.paletteMode = 0,
|
||||
.priority = 1,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 2,
|
||||
.charBaseIndex = 2,
|
||||
.mapBaseIndex = 14,
|
||||
.screenSize = 1,
|
||||
.paletteMode = 0,
|
||||
.priority = 1,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 3,
|
||||
.charBaseIndex = 3,
|
||||
.mapBaseIndex = 31,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 2,
|
||||
.baseTile = 0
|
||||
},
|
||||
};
|
||||
|
||||
// ? Part of the BG templates?
|
||||
static const u32 sUnknown[] = {0xFF, 0x00};
|
||||
|
||||
// Unused
|
||||
static const struct WindowTemplate sBerryPowderWindowTemplates[] =
|
||||
{
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 1,
|
||||
.width = 28,
|
||||
.height = 2,
|
||||
.paletteNum = 13,
|
||||
.baseBlock = 19
|
||||
},
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 5,
|
||||
.width = 28,
|
||||
.height = 14,
|
||||
.paletteNum = 13,
|
||||
.baseBlock = 75
|
||||
},
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 5,
|
||||
.width = 28,
|
||||
.height = 7,
|
||||
.paletteNum = 13,
|
||||
.baseBlock = 75
|
||||
},
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 8,
|
||||
.width = 19,
|
||||
.height = 3,
|
||||
.paletteNum = 13,
|
||||
.baseBlock = 19
|
||||
},
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 22,
|
||||
.tilemapTop = 7,
|
||||
.width = 6,
|
||||
.height = 4,
|
||||
.paletteNum = 13,
|
||||
.baseBlock = 76
|
||||
},
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 4,
|
||||
.tilemapTop = 6,
|
||||
.width = 22,
|
||||
.height = 5,
|
||||
.paletteNum = 13,
|
||||
.baseBlock = 19
|
||||
},
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 5,
|
||||
.tilemapTop = 8,
|
||||
.width = 19,
|
||||
.height = 3,
|
||||
.paletteNum = 13,
|
||||
.baseBlock = 19
|
||||
},
|
||||
};
|
||||
|
||||
static u32 DecryptBerryPowder(u32 *powder)
|
||||
{
|
||||
return *powder ^ gSaveBlock2Ptr->encryptionKey;
|
||||
|
@ -1190,16 +1190,16 @@ void Script_ShowLinkTrainerCard(void)
|
||||
// color into gStringVar2.
|
||||
bool32 GetLinkTrainerCardColor(u8 linkPlayerIndex)
|
||||
{
|
||||
u32 trainerCardColorIndex;
|
||||
u32 numStars;
|
||||
|
||||
gSpecialVar_0x8006 = linkPlayerIndex;
|
||||
StringCopy(gStringVar1, gLinkPlayers[linkPlayerIndex].name);
|
||||
|
||||
trainerCardColorIndex = GetTrainerCardStars(linkPlayerIndex);
|
||||
if (trainerCardColorIndex == 0)
|
||||
numStars = GetTrainerCardStars(linkPlayerIndex);
|
||||
if (numStars == 0)
|
||||
return FALSE;
|
||||
|
||||
StringCopy(gStringVar2, gTrainerCardColorNames[trainerCardColorIndex - 1]);
|
||||
StringCopy(gStringVar2, gTrainerCardColorNames[numStars - 1]);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -83,19 +83,6 @@ struct ContestLink80F57C4
|
||||
|
||||
EWRAM_DATA struct ContestLink80F57C4 *gUnknown_0203A034 = NULL;
|
||||
|
||||
extern const struct BgTemplate gUnknown_0858D888[4];
|
||||
extern const struct WindowTemplate gUnknown_0858D898[];
|
||||
extern const struct CompressedSpriteSheet gUnknown_0858D878[];
|
||||
extern const struct CompressedSpritePalette gUnknown_0858D880[];
|
||||
extern const struct SpriteSheet gUnknown_0858D8E0;
|
||||
extern const struct SpriteTemplate gSpriteTemplate_858D8C8;
|
||||
extern const u8 sContestLinkTextColors[];
|
||||
extern const u8 gUnknown_0858D6D0[];
|
||||
extern const struct SpriteTemplate gSpriteTemplate_858D7F8;
|
||||
extern const struct SpriteSheet gUnknown_0858D810[];
|
||||
extern const struct SpritePalette gUnknown_0858D850;
|
||||
extern const struct SpriteTemplate gSpriteTemplate_858D860;
|
||||
|
||||
static void sub_80F6A9C(void);
|
||||
static void sub_80F71C8(void);
|
||||
u8 sub_80F7310(u8, u8);
|
||||
@ -152,6 +139,219 @@ static void sub_80F85BC(u8);
|
||||
static void sub_80F86B8(u8);
|
||||
static void sub_80F878C(u8);
|
||||
static void sub_80F87B4(u8);
|
||||
static void sub_80F7768(struct Sprite *sprite);
|
||||
|
||||
static const u16 sUnknown_0858D6B0[] = INCBIN_U16("graphics/unknown/unknown_58D6B0.gbapal");
|
||||
static const u8 sUnknown_0858D6D0[] = INCBIN_U8("graphics/unknown/unknown_58D6D0.4bpp");
|
||||
static const u16 sMiscBlank_Pal[] = INCBIN_U16("graphics/interface/blank.gbapal");
|
||||
|
||||
static const struct OamData sOamData_858D7F0 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.mosaic = 0,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(64x32),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(64x32),
|
||||
.tileNum = 0,
|
||||
.priority = 3,
|
||||
.paletteNum = 2,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_858D7F8 =
|
||||
{
|
||||
.tileTag = 3009,
|
||||
.paletteTag = 3009,
|
||||
.oam = &sOamData_858D7F0,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const struct SpriteSheet sUnknown_0858D810[] =
|
||||
{
|
||||
{ .data = gMiscBlank_Gfx, .size = 0x400, .tag = 3009 },
|
||||
{ .data = gMiscBlank_Gfx, .size = 0x400, .tag = 3010 },
|
||||
{ .data = gMiscBlank_Gfx, .size = 0x400, .tag = 3011 },
|
||||
{ .data = gMiscBlank_Gfx, .size = 0x400, .tag = 3012 },
|
||||
{ .data = gMiscBlank_Gfx, .size = 0x400, .tag = 3013 },
|
||||
{ .data = gMiscBlank_Gfx, .size = 0x400, .tag = 3014 },
|
||||
{ .data = gMiscBlank_Gfx, .size = 0x400, .tag = 3015 },
|
||||
{ .data = gMiscBlank_Gfx, .size = 0x400, .tag = 3016 },
|
||||
};
|
||||
|
||||
static const struct SpritePalette sUnknown_0858D850 =
|
||||
{
|
||||
.data = sMiscBlank_Pal,
|
||||
.tag = 3009,
|
||||
};
|
||||
|
||||
static const struct OamData sOamData_858D858 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.mosaic = 0,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(8x8),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(8x8),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_858D860 =
|
||||
{
|
||||
.tileTag = 3017,
|
||||
.paletteTag = 3017,
|
||||
.oam = &sOamData_858D858,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_80F7768
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet sUnknown_0858D878 =
|
||||
{
|
||||
.data = gContestConfetti_Gfx,
|
||||
.size = 0x220,
|
||||
.tag = 3017
|
||||
};
|
||||
|
||||
|
||||
static const struct CompressedSpritePalette sUnknown_0858D880 =
|
||||
{
|
||||
.data = gContestConfetti_Pal,
|
||||
.tag = 3017
|
||||
};
|
||||
|
||||
static const struct BgTemplate sUnknown_0858D888[] =
|
||||
{
|
||||
{
|
||||
.bg = 0,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 30,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 0,
|
||||
.baseTile = 0,
|
||||
},
|
||||
{
|
||||
.bg = 1,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 24,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 3,
|
||||
.baseTile = 0,
|
||||
},
|
||||
{
|
||||
.bg = 2,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 28,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 3,
|
||||
.baseTile = 0,
|
||||
},
|
||||
{
|
||||
.bg = 3,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 26,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 3,
|
||||
.baseTile = 0,
|
||||
}
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sUnknown_0858D898[] =
|
||||
{
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 7,
|
||||
.tilemapTop = 4,
|
||||
.width = 12,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 770
|
||||
},
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 7,
|
||||
.tilemapTop = 7,
|
||||
.width = 12,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 794
|
||||
},
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 7,
|
||||
.tilemapTop = 10,
|
||||
.width = 12,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 818
|
||||
},
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 7,
|
||||
.tilemapTop = 13,
|
||||
.width = 12,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 842
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE,
|
||||
};
|
||||
|
||||
static const struct OamData sUnknown_0858D8C0 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.mosaic = 0,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(16x16),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(16x16),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_858D8C8 =
|
||||
{
|
||||
.tileTag = 22222,
|
||||
.paletteTag = 0,
|
||||
.oam = &sUnknown_0858D8C0,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const struct SpriteSheet sUnknown_0858D8E0 =
|
||||
{
|
||||
.data = gMiscBlank_Gfx,
|
||||
.size = 0x200,
|
||||
.tag = 22222
|
||||
};
|
||||
|
||||
static const u8 sContestLinkTextColors[4] = {TEXT_COLOR_WHITE, TEXT_DYNAMIC_COLOR_6, TEXT_DYNAMIC_COLOR_5};
|
||||
|
||||
|
||||
void sub_80F57C4(void)
|
||||
{
|
||||
@ -159,11 +359,11 @@ void sub_80F57C4(void)
|
||||
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP);
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, gUnknown_0858D888, ARRAY_COUNT(gUnknown_0858D888));
|
||||
InitBgsFromTemplates(0, sUnknown_0858D888, ARRAY_COUNT(sUnknown_0858D888));
|
||||
for (i = 0; i < 4; i++)
|
||||
SetBgTilemapBuffer(i, gUnknown_0203A034->unkC[i]);
|
||||
|
||||
InitWindows(gUnknown_0858D898);
|
||||
InitWindows(sUnknown_0858D898);
|
||||
DeactivateAllTextPrinters();
|
||||
SetGpuReg(REG_OFFSET_MOSAIC, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR);
|
||||
@ -210,7 +410,7 @@ void sub_80F591C(void)
|
||||
CopyToBgTilemapBuffer(0, gUnknown_08C19EEC, 0, 0);
|
||||
sub_80F71C8();
|
||||
LoadCompressedPalette(gUnknown_08C1A2B4, 0, 0x200);
|
||||
LoadPalette(gUnknown_0858D6B0, 0xF0, 0x20);
|
||||
LoadPalette(sUnknown_0858D6B0, 0xF0, 0x20);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
@ -669,8 +869,8 @@ static void sub_80F6404(u8 taskId)
|
||||
gSprites[spriteId].oam.priority = 0;
|
||||
gSprites[spriteId].callback = sub_80F75A8;
|
||||
gUnknown_0203A034->unk0->spriteId = spriteId;
|
||||
LoadCompressedSpriteSheet(gUnknown_0858D878);
|
||||
LoadCompressedSpritePalette(gUnknown_0858D880);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0858D878);
|
||||
LoadCompressedSpritePalette(&sUnknown_0858D880);
|
||||
CreateTask(sub_80F7670, 10);
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
@ -900,9 +1100,9 @@ static void sub_80F6AE8(void)
|
||||
LoadWirelessStatusIndicatorSpriteGfx();
|
||||
CreateWirelessStatusIndicatorSprite(8, 8);
|
||||
gSprites[gWirelessStatusIndicatorSpriteId].subpriority = 1;
|
||||
sheet = LoadSpriteSheet(&gUnknown_0858D8E0);
|
||||
sheet = LoadSpriteSheet(&sUnknown_0858D8E0);
|
||||
RequestDma3Fill(0xFFFFFFFF, (void *)BG_CHAR_ADDR(4) + sheet * 0x20, 0x80, 1);
|
||||
spriteId = CreateSprite(&gSpriteTemplate_858D8C8, 8, 8, 0);
|
||||
spriteId = CreateSprite(&sSpriteTemplate_858D8C8, 8, 8, 0);
|
||||
gSprites[spriteId].oam.objMode = ST_OAM_OBJ_WINDOW;
|
||||
}
|
||||
}
|
||||
@ -937,7 +1137,7 @@ s32 sub_80F6B78(const u8 *text, u8 spriteId)
|
||||
|
||||
AddTextPrinterParameterized3(windowId, 1, (strWidth * 8 - origWidth) / 2, 1, sContestLinkTextColors, -1, text);
|
||||
windowTilesPtr = (u8 *)(GetWindowAttribute(windowId, WINDOW_TILE_DATA));
|
||||
src = (u8 *)(gUnknown_0858D6D0);
|
||||
src = (u8 *)(sUnknown_0858D6D0);
|
||||
|
||||
sprite = &gSprites[spriteId];
|
||||
spriteTilePtrs[0] = (u8 *)(sprite->oam.tileNum * 32 + VRAM + 0x10000);
|
||||
@ -1043,7 +1243,7 @@ _080F6BD0:\n\
|
||||
movs r1, 0x7\n\
|
||||
bl GetWindowAttribute\n\
|
||||
mov r9, r0\n\
|
||||
ldr r2, =gUnknown_0858D6D0\n\
|
||||
ldr r2, =sUnknown_0858D6D0\n\
|
||||
mov r8, r2\n\
|
||||
lsls r1, r7, 4\n\
|
||||
adds r1, r7\n\
|
||||
@ -1257,11 +1457,11 @@ static void sub_80F6DC0(void)
|
||||
struct SpriteTemplate template;
|
||||
u8 spriteIds[8];
|
||||
|
||||
template = gSpriteTemplate_858D7F8;
|
||||
for (i = 0; i < 8; i++)
|
||||
LoadSpriteSheet(&gUnknown_0858D810[i]);
|
||||
template = sSpriteTemplate_858D7F8;
|
||||
for (i = 0; i < (int)ARRAY_COUNT(sUnknown_0858D810); i++)
|
||||
LoadSpriteSheet(&sUnknown_0858D810[i]);
|
||||
|
||||
LoadSpritePalette(&gUnknown_0858D850);
|
||||
LoadSpritePalette(&sUnknown_0858D850);
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
spriteIds[i] = CreateSprite(&template, 272, 144, 10);
|
||||
@ -1629,7 +1829,7 @@ static void sub_80F7670(u8 taskId)
|
||||
gTasks[taskId].data[0] = 0;
|
||||
if (gUnknown_0203A034->unk0->unk7 < 40)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&gSpriteTemplate_858D860, (Random() % 240) - 20, 44, 5);
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_858D860, (Random() % 240) - 20, 44, 5);
|
||||
gSprites[spriteId].data[0] = Random() % 512;
|
||||
gSprites[spriteId].data[1] = (Random() % 24) + 16;
|
||||
gSprites[spriteId].data[2] = (Random() % 256) + 48;
|
||||
@ -1642,7 +1842,7 @@ static void sub_80F7670(u8 taskId)
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
|
||||
void sub_80F7768(struct Sprite *sprite)
|
||||
static void sub_80F7768(struct Sprite *sprite)
|
||||
{
|
||||
s16 delta;
|
||||
|
||||
|
@ -58,3 +58,6 @@ const u8 gSlotMachineReelTimeExplosion1[] = INCBIN_U8("graphics/slot_machine/ree
|
||||
|
||||
const u8 gSlotMachineReelTimeShadow[] = INCBIN_U8("graphics/slot_machine/shadow.4bpp");
|
||||
const u8 gSlotMachineReelTimePikaAura[] = INCBIN_U8("graphics/slot_machine/pika_aura.4bpp");
|
||||
|
||||
const u8 gUnknown_08DD19F8[] = INCBIN_U8("graphics/unknown/unknown_DD19F8.bin");
|
||||
const u8 gUnknown_08DD1A18[] = INCBIN_U8("graphics/unknown/unknown_DD1A18.4bpp");
|
||||
|
@ -27,7 +27,7 @@ static void sub_8098154(u8 taskId)
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -48,7 +48,7 @@ static void FaintFromFieldPoison(u8 partyIdx)
|
||||
struct Pokemon *pokemon = gPlayerParty + partyIdx;
|
||||
u32 status = STATUS1_NONE;
|
||||
|
||||
AdjustFriendship(pokemon, 0x07);
|
||||
AdjustFriendship(pokemon, FRIENDSHIP_EVENT_FAINT_FIELD_PSN);
|
||||
SetMonData(pokemon, MON_DATA_STATUS, &status);
|
||||
GetMonData(pokemon, MON_DATA_NICKNAME, gStringVar1);
|
||||
StringGetEnd10(gStringVar1);
|
||||
|
@ -1418,27 +1418,21 @@ const u16 gUsePokeblockNatureWin_Pal[] = INCBIN_U16("graphics/pokeblock/use_scre
|
||||
|
||||
#include "data/graphics/slot_machine.h"
|
||||
|
||||
const u16 gUnknown_08DD19F8[] = INCBIN_U16("graphics/unknown/unknown_DD19F8.bin");
|
||||
|
||||
const u8 gUnknown_08DD1A18[] = INCBIN_U8("graphics/unknown/unknown_DD1A18.4bpp");
|
||||
|
||||
// trainer card
|
||||
|
||||
const u16 gEmeraldTrainerCard0Star_Pal[] = INCBIN_U16("graphics/trainer_card/0star.gbapal");
|
||||
const u32 gEmeraldTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card.4bpp.lz");
|
||||
const u16 gHoennTrainerCard0Star_Pal[] = INCBIN_U16("graphics/trainer_card/0star.gbapal");
|
||||
const u32 gHoennTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card.4bpp.lz");
|
||||
const u32 gHoennTrainerCardBg_Tilemap[] = INCBIN_U32("graphics/trainer_card/bg.bin.lz");
|
||||
const u32 gHoennTrainerCardFront_Tilemap[] = INCBIN_U32("graphics/trainer_card/front.bin.lz");
|
||||
const u32 gHoennTrainerCardBack_Tilemap[] = INCBIN_U32("graphics/trainer_card/back.bin.lz");
|
||||
const u32 gHoennTrainerCardFrontLink_Tilemap[] = INCBIN_U32("graphics/trainer_card/front_link.bin.lz");
|
||||
|
||||
const u32 gUnknown_08DD1F78[] = INCBIN_U32("graphics/unknown/unknown_DD1F78.bin.lz");
|
||||
const u32 gUnknown_08DD2010[] = INCBIN_U32("graphics/unknown/unknown_DD2010.bin.lz");
|
||||
const u32 gUnknown_08DD21B0[] = INCBIN_U32("graphics/unknown/unknown_DD21B0.bin.lz");
|
||||
const u32 gUnknown_08DD228C[] = INCBIN_U32("graphics/unknown/unknown_DD228C.bin.lz");
|
||||
|
||||
const u16 gFireRedTrainerCard0Star_Pal[] = INCBIN_U16("graphics/trainer_card/0star_fr.gbapal");
|
||||
const u32 gFireRedTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card_fr.4bpp.lz");
|
||||
|
||||
const u32 gUnknown_08DD2AE0[] = INCBIN_U32("graphics/unknown/unknown_DD2AE0.bin.lz");
|
||||
const u32 gUnknown_08DD2B78[] = INCBIN_U32("graphics/unknown/unknown_DD2B78.bin.lz");
|
||||
const u32 gUnknown_08DD2D30[] = INCBIN_U32("graphics/unknown/unknown_DD2D30.bin.lz");
|
||||
const u32 gUnknown_08DD2E5C[] = INCBIN_U32("graphics/unknown/unknown_DD2E5C.bin.lz");
|
||||
const u16 gKantoTrainerCard0Star_Pal[] = INCBIN_U16("graphics/trainer_card/0star_fr.gbapal");
|
||||
const u32 gKantoTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card_fr.4bpp.lz");
|
||||
const u32 gKantoTrainerCardBg_Tilemap[] = INCBIN_U32("graphics/trainer_card/bg_fr.bin.lz");
|
||||
const u32 gKantoTrainerCardFront_Tilemap[] = INCBIN_U32("graphics/trainer_card/front_fr.bin.lz");
|
||||
const u32 gKantoTrainerCardBack_Tilemap[] = INCBIN_U32("graphics/trainer_card/back_fr.bin.lz");
|
||||
const u32 gKantoTrainerCardFrontLink_Tilemap[] = INCBIN_U32("graphics/trainer_card/front_link_fr.bin.lz");
|
||||
|
||||
// pokemon storage system
|
||||
|
||||
|
@ -432,8 +432,8 @@ struct ListBuffer2 {
|
||||
};
|
||||
|
||||
struct TempWallyStruct {
|
||||
struct ItemSlot bagPocket_Items[30];
|
||||
struct ItemSlot bagPocket_PokeBalls[16];
|
||||
struct ItemSlot bagPocket_Items[BAG_ITEMS_COUNT];
|
||||
struct ItemSlot bagPocket_PokeBalls[BAG_POKEBALLS_COUNT];
|
||||
u16 cursorPosition[POCKETS_COUNT];
|
||||
u16 scrollPosition[POCKETS_COUNT];
|
||||
u8 filler[0x2];
|
||||
@ -445,7 +445,7 @@ EWRAM_DATA struct BagStruct gBagPositionStruct = {0};
|
||||
static EWRAM_DATA struct ListBuffer1 *sListBuffer1 = 0;
|
||||
static EWRAM_DATA struct ListBuffer2 *sListBuffer2 = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_ItemId = 0;
|
||||
static EWRAM_DATA struct TempWallyStruct *gUnknown_0203CE80 = 0;
|
||||
static EWRAM_DATA struct TempWallyStruct *sTempWallyBag = 0;
|
||||
|
||||
extern u8 *const gPocketNamesStringsTable[];
|
||||
extern u8* gReturnToXStringsTable[];
|
||||
@ -2130,17 +2130,17 @@ void PrepareBagForWallyTutorial(void)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
gUnknown_0203CE80 = AllocZeroed(sizeof(struct TempWallyStruct));
|
||||
memcpy(gUnknown_0203CE80->bagPocket_Items, gSaveBlock1Ptr->bagPocket_Items, sizeof(gSaveBlock1Ptr->bagPocket_Items));
|
||||
memcpy(gUnknown_0203CE80->bagPocket_PokeBalls, gSaveBlock1Ptr->bagPocket_PokeBalls, sizeof(gSaveBlock1Ptr->bagPocket_PokeBalls));
|
||||
gUnknown_0203CE80->pocket = gBagPositionStruct.pocket;
|
||||
sTempWallyBag = AllocZeroed(sizeof(struct TempWallyStruct));
|
||||
memcpy(sTempWallyBag->bagPocket_Items, gSaveBlock1Ptr->bagPocket_Items, sizeof(gSaveBlock1Ptr->bagPocket_Items));
|
||||
memcpy(sTempWallyBag->bagPocket_PokeBalls, gSaveBlock1Ptr->bagPocket_PokeBalls, sizeof(gSaveBlock1Ptr->bagPocket_PokeBalls));
|
||||
sTempWallyBag->pocket = gBagPositionStruct.pocket;
|
||||
for (i = 0; i <= 4; i++)
|
||||
{
|
||||
gUnknown_0203CE80->cursorPosition[i] = gBagPositionStruct.cursorPosition[i];
|
||||
gUnknown_0203CE80->scrollPosition[i] = gBagPositionStruct.scrollPosition[i];
|
||||
sTempWallyBag->cursorPosition[i] = gBagPositionStruct.cursorPosition[i];
|
||||
sTempWallyBag->scrollPosition[i] = gBagPositionStruct.scrollPosition[i];
|
||||
}
|
||||
ClearItemSlots(gSaveBlock1Ptr->bagPocket_Items, 30);
|
||||
ClearItemSlots(gSaveBlock1Ptr->bagPocket_PokeBalls, 16);
|
||||
ClearItemSlots(gSaveBlock1Ptr->bagPocket_Items, BAG_ITEMS_COUNT);
|
||||
ClearItemSlots(gSaveBlock1Ptr->bagPocket_PokeBalls, BAG_POKEBALLS_COUNT);
|
||||
ResetBagScrollPositions();
|
||||
}
|
||||
|
||||
@ -2148,15 +2148,15 @@ void RestoreBagAfterWallyTutorial(void)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
memcpy(gSaveBlock1Ptr->bagPocket_Items, gUnknown_0203CE80->bagPocket_Items, sizeof(gUnknown_0203CE80->bagPocket_Items));
|
||||
memcpy(gSaveBlock1Ptr->bagPocket_PokeBalls, gUnknown_0203CE80->bagPocket_PokeBalls, sizeof(gUnknown_0203CE80->bagPocket_PokeBalls));
|
||||
gBagPositionStruct.pocket = gUnknown_0203CE80->pocket;
|
||||
memcpy(gSaveBlock1Ptr->bagPocket_Items, sTempWallyBag->bagPocket_Items, sizeof(sTempWallyBag->bagPocket_Items));
|
||||
memcpy(gSaveBlock1Ptr->bagPocket_PokeBalls, sTempWallyBag->bagPocket_PokeBalls, sizeof(sTempWallyBag->bagPocket_PokeBalls));
|
||||
gBagPositionStruct.pocket = sTempWallyBag->pocket;
|
||||
for (i = 0; i <= 4; i++)
|
||||
{
|
||||
gBagPositionStruct.cursorPosition[i] = gUnknown_0203CE80->cursorPosition[i];
|
||||
gBagPositionStruct.scrollPosition[i] = gUnknown_0203CE80->scrollPosition[i];
|
||||
gBagPositionStruct.cursorPosition[i] = sTempWallyBag->cursorPosition[i];
|
||||
gBagPositionStruct.scrollPosition[i] = sTempWallyBag->scrollPosition[i];
|
||||
}
|
||||
Free(gUnknown_0203CE80);
|
||||
Free(sTempWallyBag);
|
||||
}
|
||||
|
||||
void DoWallyTutorialBagMenu(void)
|
||||
|
@ -2188,7 +2188,7 @@ static void MainMenu_FormatSavegameBadges(void)
|
||||
u8 badgeCount = 0;
|
||||
u32 i;
|
||||
|
||||
for (i = FLAG_BADGE01_GET; i <= FLAG_BADGE08_GET; i++)
|
||||
for (i = FLAG_BADGE01_GET; i < FLAG_BADGE01_GET + NUM_BADGES; i++)
|
||||
{
|
||||
if (FlagGet(i))
|
||||
badgeCount++;
|
||||
|
@ -1287,7 +1287,7 @@ static bool32 sub_81963F0(u8 taskId)
|
||||
ChangeBgY(0, 0, 0);
|
||||
if (!gMatchCallState.triggeredFromScript)
|
||||
{
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
playerObjectId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0);
|
||||
ObjectEventClearHeldMovementIfFinished(&gObjectEvents[playerObjectId]);
|
||||
ScriptMovement_UnfreezeObjectEvents();
|
||||
@ -1746,7 +1746,7 @@ static void PopulateBattleFrontierStreak(int matchCallId, u8 *destStr)
|
||||
ConvertIntToDecimalStringN(destStr, gBattleFrontierStreakInfo.streak, STR_CONV_MODE_LEFT_ALIGN, i);
|
||||
}
|
||||
|
||||
static const u16 sBadgeFlags[] =
|
||||
static const u16 sBadgeFlags[NUM_BADGES] =
|
||||
{
|
||||
FLAG_BADGE01_GET,
|
||||
FLAG_BADGE02_GET,
|
||||
@ -1762,7 +1762,7 @@ static int GetNumOwnedBadges(void)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
for (i = 0; i < NUM_BADGES; i++)
|
||||
{
|
||||
if (!FlagGet(sBadgeFlags[i]))
|
||||
break;
|
||||
|
22
src/menu.c
22
src/menu.c
@ -159,7 +159,7 @@ void sub_8197200(void)
|
||||
ChangeBgX(0, 0, 0);
|
||||
ChangeBgY(0, 0, 0);
|
||||
DeactivateAllTextPrinters();
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
}
|
||||
|
||||
u16 RunTextPrintersAndIsPrinter0Active(void)
|
||||
@ -209,7 +209,7 @@ void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonP
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, speed, NULL, 2, 1, 3);
|
||||
}
|
||||
|
||||
void sub_81973A4(void)
|
||||
void LoadMessageBoxAndBorderGfx(void)
|
||||
{
|
||||
LoadMessageBoxGfx(0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10);
|
||||
LoadUserWindowBorderGfx(0, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM * 0x10);
|
||||
@ -458,7 +458,7 @@ u16 sub_81978D0(u8 colorNum)
|
||||
|
||||
void DisplayItemMessageOnField(u8 taskId, const u8 *string, TaskFunc callback)
|
||||
{
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DisplayMessageAndContinueTask(taskId, 0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM, 1, GetPlayerTextSpeedDelay(), string, callback);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
@ -2133,7 +2133,7 @@ void blit_move_info_icon(u8 windowId, u8 iconId, u16 x, u16 y)
|
||||
BlitBitmapRectToWindow(windowId, gFireRedMenuElements_Gfx + gMoveMenuInfoIcons[iconId].offset * 32, 0, 0, 128, 128, x, y, gMoveMenuInfoIcons[iconId].width, gMoveMenuInfoIcons[iconId].height);
|
||||
}
|
||||
|
||||
void sub_819A344(u8 a0, u8 *dest, u8 color)
|
||||
void BufferSaveMenuText(u8 textId, u8 *dest, u8 color)
|
||||
{
|
||||
s32 curFlag;
|
||||
s32 flagCount;
|
||||
@ -2147,28 +2147,28 @@ void sub_819A344(u8 a0, u8 *dest, u8 color)
|
||||
*(string++) = EXT_CTRL_CODE_SHADOW;
|
||||
*(string++) = color + 1;
|
||||
|
||||
switch (a0)
|
||||
switch (textId)
|
||||
{
|
||||
case 0:
|
||||
case SAVE_MENU_NAME:
|
||||
StringCopy(string, gSaveBlock2Ptr->playerName);
|
||||
break;
|
||||
case 1:
|
||||
case SAVE_MENU_CAUGHT:
|
||||
if (IsNationalPokedexEnabled())
|
||||
string = ConvertIntToDecimalStringN(string, GetNationalPokedexCount(FLAG_GET_CAUGHT), STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
else
|
||||
string = ConvertIntToDecimalStringN(string, GetHoennPokedexCount(FLAG_GET_CAUGHT), STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
*string = EOS;
|
||||
break;
|
||||
case 2:
|
||||
case SAVE_MENU_PLAY_TIME:
|
||||
string = ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->playTimeHours, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
*(string++) = CHAR_COLON;
|
||||
ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
break;
|
||||
case 3:
|
||||
case SAVE_MENU_LOCATION:
|
||||
GetMapNameGeneric(string, gMapHeader.regionMapSectionId);
|
||||
break;
|
||||
case 4:
|
||||
for (curFlag = FLAG_BADGE01_GET, flagCount = 0, endOfString = string + 1; curFlag <= FLAG_BADGE08_GET; curFlag++)
|
||||
case SAVE_MENU_BADGES:
|
||||
for (curFlag = FLAG_BADGE01_GET, flagCount = 0, endOfString = string + 1; curFlag < FLAG_BADGE01_GET + NUM_BADGES; curFlag++)
|
||||
{
|
||||
if (FlagGet(curFlag))
|
||||
flagCount++;
|
||||
|
@ -955,7 +955,7 @@ static u8 *sub_81D2CD0(u8 *dst, u16 boxId, u16 monId)
|
||||
*(str++) = 9;
|
||||
*(str++) = CHAR_SLASH;
|
||||
*(str++) = CHAR_SPECIAL_F9;
|
||||
*(str++) = 5;
|
||||
*(str++) = CHAR_LV_2;
|
||||
str = ConvertIntToDecimalStringN(str, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
*(str++) = CHAR_SPACE;
|
||||
*str = EOS;
|
||||
|
@ -4701,7 +4701,7 @@ static void Task_LearnedMove(u8 taskId)
|
||||
|
||||
if (move[1] == 0)
|
||||
{
|
||||
AdjustFriendship(mon, 4);
|
||||
AdjustFriendship(mon, FRIENDSHIP_EVENT_LEARN_TMHM);
|
||||
if (item < ITEM_HM01_CUT)
|
||||
RemoveBagItem(item, 1);
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ void sub_816B31C(void)
|
||||
|
||||
void Mailbox_DoRedrawMailboxMenuAfterReturn(void)
|
||||
{
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 1);
|
||||
InitItemStorageMenu(CreateTask(ItemStorage_HandleReturnToProcessInput, 0), 1);
|
||||
FadeInFromBlack();
|
||||
@ -739,7 +739,7 @@ static void pal_fill_for_maplights_or_black(void)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
taskId = CreateTask(Mailbox_HandleReturnToProcessInput, 0);
|
||||
if (sub_81D1C44(playerPCItemPageInfo.count) == TRUE)
|
||||
Mailbox_DrawMailboxMenu(taskId);
|
||||
@ -847,7 +847,7 @@ static void Mailbox_UpdateMailListAfterDeposit(void)
|
||||
&& playerPCItemPageInfo.itemsAbove != 0)
|
||||
playerPCItemPageInfo.itemsAbove--;
|
||||
ItemStorage_SetItemAndMailCount(taskId);
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
if (sub_81D1C44(playerPCItemPageInfo.count) == TRUE)
|
||||
Mailbox_DrawMailboxMenu(taskId);
|
||||
else
|
||||
|
105
src/pokemon.c
105
src/pokemon.c
@ -61,6 +61,7 @@ static void DecryptBoxMon(struct BoxPokemon *boxMon);
|
||||
static void sub_806E6CC(u8 taskId);
|
||||
static bool8 ShouldGetStatBadgeBoost(u16 flagId, u8 battlerId);
|
||||
static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move);
|
||||
static bool8 ShouldSkipFriendshipChange(void);
|
||||
|
||||
// EWRAM vars
|
||||
EWRAM_DATA static u8 sLearningMoveTableID = 0;
|
||||
@ -73,7 +74,21 @@ EWRAM_DATA struct Unknown_806F160_Struct *gUnknown_020249B4[2] = {NULL};
|
||||
|
||||
// const rom data
|
||||
#include "data/battle_moves.h"
|
||||
static const u8 sUnreferencedData[] = {0x34, 0x00, 0x10, 0x00, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00};
|
||||
|
||||
// Used in an unreferenced function in RS.
|
||||
// Unreferenced here and in FRLG.
|
||||
struct CombinedMove
|
||||
{
|
||||
u16 move1;
|
||||
u16 move2;
|
||||
u16 newMove;
|
||||
};
|
||||
|
||||
static const struct CombinedMove sCombinedMoves[2] =
|
||||
{
|
||||
{MOVE_EMBER, MOVE_GUST, MOVE_HEAT_WAVE},
|
||||
{0xFFFF, 0xFFFF, 0xFFFF}
|
||||
};
|
||||
|
||||
#define SPECIES_TO_HOENN(name) [SPECIES_##name - 1] = HOENN_DEX_##name
|
||||
#define SPECIES_TO_NATIONAL(name) [SPECIES_##name - 1] = NATIONAL_DEX_##name
|
||||
@ -1872,22 +1887,34 @@ const u8 gStatStageRatios[][2] =
|
||||
|
||||
static const u16 sDeoxysBaseStats[] =
|
||||
{
|
||||
50, // Hp
|
||||
95, // Attack
|
||||
90, // Defense
|
||||
180, // Speed
|
||||
95, // Sp.Attack
|
||||
90, // Sp.Defense
|
||||
[STAT_HP] = 50,
|
||||
[STAT_ATK] = 95,
|
||||
[STAT_DEF] = 90,
|
||||
[STAT_SPEED] = 180,
|
||||
[STAT_SPATK] = 95,
|
||||
[STAT_SPDEF] = 90,
|
||||
};
|
||||
|
||||
const u16 gLinkPlayerFacilityClasses[] =
|
||||
const u16 gLinkPlayerFacilityClasses[NUM_MALE_LINK_FACILITY_CLASSES + NUM_FEMALE_LINK_FACILITY_CLASSES] =
|
||||
{
|
||||
FACILITY_CLASS_COOLTRAINER_M, FACILITY_CLASS_BLACK_BELT, FACILITY_CLASS_CAMPER,
|
||||
FACILITY_CLASS_YOUNGSTER, FACILITY_CLASS_PSYCHIC_M, FACILITY_CLASS_BUG_CATCHER,
|
||||
FACILITY_CLASS_PKMN_BREEDER_M, FACILITY_CLASS_GUITARIST,
|
||||
FACILITY_CLASS_COOLTRAINER_F, FACILITY_CLASS_HEX_MANIAC, FACILITY_CLASS_PICNICKER,
|
||||
FACILITY_CLASS_LASS, FACILITY_CLASS_PSYCHIC_F, FACILITY_CLASS_BATTLE_GIRL,
|
||||
FACILITY_CLASS_PKMN_BREEDER_F, FACILITY_CLASS_BEAUTY
|
||||
// Male classes
|
||||
FACILITY_CLASS_COOLTRAINER_M,
|
||||
FACILITY_CLASS_BLACK_BELT,
|
||||
FACILITY_CLASS_CAMPER,
|
||||
FACILITY_CLASS_YOUNGSTER,
|
||||
FACILITY_CLASS_PSYCHIC_M,
|
||||
FACILITY_CLASS_BUG_CATCHER,
|
||||
FACILITY_CLASS_PKMN_BREEDER_M,
|
||||
FACILITY_CLASS_GUITARIST,
|
||||
// Female Classes
|
||||
FACILITY_CLASS_COOLTRAINER_F,
|
||||
FACILITY_CLASS_HEX_MANIAC,
|
||||
FACILITY_CLASS_PICNICKER,
|
||||
FACILITY_CLASS_LASS,
|
||||
FACILITY_CLASS_PSYCHIC_F,
|
||||
FACILITY_CLASS_BATTLE_GIRL,
|
||||
FACILITY_CLASS_PKMN_BREEDER_F,
|
||||
FACILITY_CLASS_BEAUTY
|
||||
};
|
||||
|
||||
static const u8 sHoldEffectToType[][2] =
|
||||
@ -2049,17 +2076,19 @@ static const u8 sStatsToRaise[] =
|
||||
STAT_ATK, STAT_ATK, STAT_SPEED, STAT_DEF, STAT_SPATK, STAT_ACC
|
||||
};
|
||||
|
||||
static const s8 gUnknown_08329ECE[][3] =
|
||||
// 3 modifiers each for how much to change friendship for different ranges
|
||||
// 0-99, 100-199, 200+
|
||||
static const s8 sFriendshipEventModifiers[][3] =
|
||||
{
|
||||
{ 5, 3, 2},
|
||||
{ 5, 3, 2},
|
||||
{ 1, 1, 0},
|
||||
{ 3, 2, 1},
|
||||
{ 1, 1, 0},
|
||||
{ 1, 1, 1},
|
||||
{-1, -1, -1},
|
||||
{-5, -5, -10},
|
||||
{-5, -5, -10},
|
||||
[FRIENDSHIP_EVENT_GROW_LEVEL] = { 5, 3, 2},
|
||||
[FRIENDSHIP_EVENT_VITAMIN] = { 5, 3, 2},
|
||||
[FRIENDSHIP_EVENT_BATTLE_ITEM] = { 1, 1, 0},
|
||||
[FRIENDSHIP_EVENT_LEAGUE_BATTLE] = { 3, 2, 1},
|
||||
[FRIENDSHIP_EVENT_LEARN_TMHM] = { 1, 1, 0},
|
||||
[FRIENDSHIP_EVENT_WALKING] = { 1, 1, 1},
|
||||
[FRIENDSHIP_EVENT_FAINT_SMALL] = {-1, -1, -1},
|
||||
[FRIENDSHIP_EVENT_FAINT_FIELD_PSN] = {-5, -5, -10},
|
||||
[FRIENDSHIP_EVENT_FAINT_LARGE] = {-5, -5, -10},
|
||||
};
|
||||
|
||||
static const u16 sHMMoves[] =
|
||||
@ -5069,7 +5098,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 100 && (retVal == 0 || var_28 != 0) && !sub_806F104() && var_34 == 0)
|
||||
if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 100 && (retVal == 0 || var_28 != 0) && !ShouldSkipFriendshipChange() && var_34 == 0)
|
||||
{
|
||||
var_34 = itemEffect[var_3C];
|
||||
friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL);
|
||||
@ -5095,7 +5124,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
break;
|
||||
case 6:
|
||||
if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 100 && GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 200
|
||||
&& (retVal == 0 || var_28 != 0) && !sub_806F104() && var_34 == 0)
|
||||
&& (retVal == 0 || var_28 != 0) && !ShouldSkipFriendshipChange() && var_34 == 0)
|
||||
{
|
||||
var_34 = itemEffect[var_3C];
|
||||
friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL);
|
||||
@ -5120,7 +5149,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
var_3C++;
|
||||
break;
|
||||
case 7:
|
||||
if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 200 && (retVal == 0 || var_28 != 0) && !sub_806F104() && var_34 == 0)
|
||||
if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 200 && (retVal == 0 || var_28 != 0) && !ShouldSkipFriendshipChange() && var_34 == 0)
|
||||
{
|
||||
var_34 = itemEffect[var_3C];
|
||||
friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL);
|
||||
@ -5738,12 +5767,18 @@ u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex)
|
||||
return n;
|
||||
}
|
||||
|
||||
#define IS_LEAGUE_BATTLE \
|
||||
((gBattleTypeFlags & BATTLE_TYPE_TRAINER) \
|
||||
&& (gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_ELITE_FOUR \
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_LEADER \
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_CHAMPION)) \
|
||||
|
||||
void AdjustFriendship(struct Pokemon *mon, u8 event)
|
||||
{
|
||||
u16 species, heldItem;
|
||||
u8 holdEffect;
|
||||
|
||||
if (sub_806F104())
|
||||
if (ShouldSkipFriendshipChange())
|
||||
return;
|
||||
|
||||
species = GetMonData(mon, MON_DATA_SPECIES2, 0);
|
||||
@ -5765,18 +5800,16 @@ void AdjustFriendship(struct Pokemon *mon, u8 event)
|
||||
{
|
||||
u8 friendshipLevel = 0;
|
||||
s16 friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, 0);
|
||||
|
||||
if (friendship > 99)
|
||||
friendshipLevel++;
|
||||
if (friendship > 199)
|
||||
friendshipLevel++;
|
||||
if ((event != 5 || !(Random() & 1))
|
||||
&& (event != 3
|
||||
|| ((gBattleTypeFlags & BATTLE_TYPE_TRAINER)
|
||||
&& (gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_ELITE_FOUR
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_LEADER
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_CHAMPION))))
|
||||
|
||||
if ((event != FRIENDSHIP_EVENT_WALKING || !(Random() & 1))
|
||||
&& (event != FRIENDSHIP_EVENT_LEAGUE_BATTLE || IS_LEAGUE_BATTLE))
|
||||
{
|
||||
s8 mod = gUnknown_08329ECE[event][friendshipLevel];
|
||||
s8 mod = sFriendshipEventModifiers[event][friendshipLevel];
|
||||
if (mod > 0 && holdEffect == HOLD_EFFECT_HAPPINESS_UP)
|
||||
mod = (150 * mod) / 100;
|
||||
friendship += mod;
|
||||
@ -6768,7 +6801,7 @@ bool8 HasTwoFramesAnimation(u16 species)
|
||||
&& species != SPECIES_UNOWN);
|
||||
}
|
||||
|
||||
bool8 sub_806F104(void)
|
||||
static bool8 ShouldSkipFriendshipChange(void)
|
||||
{
|
||||
if (gMain.inBattle && gBattleTypeFlags & (BATTLE_TYPE_FRONTIER))
|
||||
return TRUE;
|
||||
|
@ -1735,7 +1735,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
CreatePCMenu(task->data[1], &task->data[15]);
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 0);
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, TEXT_SPEED_FF, NULL, 2, 1, 3);
|
||||
@ -6898,7 +6898,7 @@ static void SetCursorMonData(void *pokemon, u8 mode)
|
||||
*(txtPtr++) = 3;
|
||||
*(txtPtr++) = 0;
|
||||
*(txtPtr++) = CHAR_SPECIAL_F9;
|
||||
*(txtPtr++) = 5;
|
||||
*(txtPtr++) = CHAR_LV_2;
|
||||
|
||||
txtPtr = ConvertIntToDecimalStringN(txtPtr, sPSSData->cursorMonLevel, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
txtPtr[0] = CHAR_SPACE;
|
||||
|
@ -21,7 +21,7 @@ struct PokenavResources
|
||||
u32 (*currentMenuCb1)(void);
|
||||
u32 currentMenuIndex;
|
||||
u16 mode;
|
||||
u16 fieldA;
|
||||
u16 conditionSearchId;
|
||||
bool32 hasAnyRibbons;
|
||||
void *field10[SUBSTRUCT_COUNT];
|
||||
};
|
||||
@ -57,7 +57,7 @@ const struct UnknownPokenavCallbackStruct PokenavMenuCallbacks[15] =
|
||||
.unk0 = PokenavCallback_Init_0,
|
||||
.unk4 = sub_81C941C,
|
||||
.unk8 = sub_81C9924,
|
||||
.unkC = sub_81C9990,
|
||||
.unkC = CreateMenuHandlerLoopedTask,
|
||||
.unk10 = sub_81C99C0,
|
||||
.unk14 = sub_81C9430,
|
||||
.unk18 = sub_81C99D4,
|
||||
@ -66,7 +66,7 @@ const struct UnknownPokenavCallbackStruct PokenavMenuCallbacks[15] =
|
||||
.unk0 = PokenavCallback_Init_0,
|
||||
.unk4 = sub_81C941C,
|
||||
.unk8 = sub_81C9940,
|
||||
.unkC = sub_81C9990,
|
||||
.unkC = CreateMenuHandlerLoopedTask,
|
||||
.unk10 = sub_81C99C0,
|
||||
.unk14 = sub_81C9430,
|
||||
.unk18 = sub_81C99D4,
|
||||
@ -75,7 +75,7 @@ const struct UnknownPokenavCallbackStruct PokenavMenuCallbacks[15] =
|
||||
.unk0 = PokenavCallback_Init_2,
|
||||
.unk4 = sub_81C941C,
|
||||
.unk8 = sub_81C9940,
|
||||
.unkC = sub_81C9990,
|
||||
.unkC = CreateMenuHandlerLoopedTask,
|
||||
.unk10 = sub_81C99C0,
|
||||
.unk14 = sub_81C9430,
|
||||
.unk18 = sub_81C99D4,
|
||||
@ -84,7 +84,7 @@ const struct UnknownPokenavCallbackStruct PokenavMenuCallbacks[15] =
|
||||
.unk0 = PokenavCallback_Init_3,
|
||||
.unk4 = sub_81C941C,
|
||||
.unk8 = sub_81C9940,
|
||||
.unkC = sub_81C9990,
|
||||
.unkC = CreateMenuHandlerLoopedTask,
|
||||
.unk10 = sub_81C99C0,
|
||||
.unk14 = sub_81C9430,
|
||||
.unk18 = sub_81C99D4,
|
||||
@ -93,7 +93,7 @@ const struct UnknownPokenavCallbackStruct PokenavMenuCallbacks[15] =
|
||||
.unk0 = PokenavCallback_Init_4,
|
||||
.unk4 = sub_81C941C,
|
||||
.unk8 = sub_81C9940,
|
||||
.unkC = sub_81C9990,
|
||||
.unkC = CreateMenuHandlerLoopedTask,
|
||||
.unk10 = sub_81C99C0,
|
||||
.unk14 = sub_81C9430,
|
||||
.unk18 = sub_81C99D4,
|
||||
@ -102,7 +102,7 @@ const struct UnknownPokenavCallbackStruct PokenavMenuCallbacks[15] =
|
||||
.unk0 = PokenavCallback_Init_5,
|
||||
.unk4 = sub_81C941C,
|
||||
.unk8 = sub_81C9940,
|
||||
.unkC = sub_81C9990,
|
||||
.unkC = CreateMenuHandlerLoopedTask,
|
||||
.unk10 = sub_81C99C0,
|
||||
.unk14 = sub_81C9430,
|
||||
.unk18 = sub_81C99D4,
|
||||
@ -156,7 +156,7 @@ const struct UnknownPokenavCallbackStruct PokenavMenuCallbacks[15] =
|
||||
.unk0 = PokenavCallback_Init_11,
|
||||
.unk4 = sub_81CAB24,
|
||||
.unk8 = sub_81CB260,
|
||||
.unkC = sub_81CB29C,
|
||||
.unkC = CreateMatchCallLoopedTask,
|
||||
.unk10 = sub_81CB2CC,
|
||||
.unk14 = sub_81CAB38,
|
||||
.unk18 = sub_81CB2E0,
|
||||
@ -554,18 +554,18 @@ void SetPokenavMode(u16 mode)
|
||||
gPokenavResources->mode = mode;
|
||||
}
|
||||
|
||||
void sub_81C7694(u32 a0)
|
||||
void SetSelectedConditionSearch(u32 cursorPos)
|
||||
{
|
||||
u32 value = a0;
|
||||
u32 searchId = cursorPos;
|
||||
|
||||
if (value > 4)
|
||||
value = 0;
|
||||
gPokenavResources->fieldA = value;
|
||||
if (searchId > POKENAV_MENUITEM_CONDITION_SEARCH_TOUGH - POKENAV_MENUITEM_CONDITION_SEARCH_COOL)
|
||||
searchId = 0;
|
||||
gPokenavResources->conditionSearchId = searchId;
|
||||
}
|
||||
|
||||
u32 sub_81C76AC(void)
|
||||
u32 GetSelectedConditionSearch(void)
|
||||
{
|
||||
return gPokenavResources->fieldA;
|
||||
return gPokenavResources->conditionSearchId;
|
||||
}
|
||||
|
||||
bool32 CanViewRibbonsMenu(void)
|
||||
|
@ -147,9 +147,9 @@ u32 sub_81CD110(struct PokenavSub11 *structPtr)
|
||||
u32 sub_81CD19C(struct PokenavSub11 *structPtr)
|
||||
{
|
||||
if (structPtr->unk6300 == 0)
|
||||
return 100002;
|
||||
return POKENAV_MENU_2;
|
||||
else
|
||||
return 100010;
|
||||
return POKENAV_MENU_A;
|
||||
}
|
||||
|
||||
void sub_81CD1C0(void)
|
||||
@ -402,7 +402,7 @@ u8 *sub_81CD624(u8 *str, u16 id, bool8 arg3)
|
||||
*(str_++) = 9;
|
||||
*(str_++) = CHAR_SLASH;
|
||||
*(str_++) = CHAR_SPECIAL_F9;
|
||||
*(str_++) = 5;
|
||||
*(str_++) = CHAR_LV_2;
|
||||
txtPtr = str_;
|
||||
str_ = ConvertIntToDecimalStringN(str_, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
lvlDigits = str_ - txtPtr;
|
@ -113,9 +113,9 @@ static const struct WindowTemplate gUnknown_086235B4 =
|
||||
.baseBlock = 20
|
||||
};
|
||||
|
||||
static const u8 gUnknown_086235BC[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 gUnknown_086235C8[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 gUnknown_086235D4[] = _("{UNK_SPACER}");
|
||||
static const u8 sText_MaleSymbol[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 sText_FemaleSymbol[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 sText_NoGenderSymbol[] = _("{UNK_SPACER}");
|
||||
|
||||
bool32 PokenavCallback_Init_8(void)
|
||||
{
|
||||
@ -130,7 +130,7 @@ bool32 PokenavCallback_Init_8(void)
|
||||
structPtr->unk0 = sub_81CF010;
|
||||
structPtr->loopedTaskId = CreateLoopedTask(sub_81CF11C, 1);
|
||||
structPtr->unk18 = 0;
|
||||
structPtr->unk14 = gUnknown_086233A0[sub_81C76AC()];
|
||||
structPtr->unk14 = gUnknown_086233A0[GetSelectedConditionSearch()];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ bool32 PokenavCallback_Init_10(void)
|
||||
structPtr->unkPtr = GetSubstructPtr(18);
|
||||
structPtr->unk0 = sub_81CF030;
|
||||
structPtr->unk18 = 1;
|
||||
structPtr->unk14 = gUnknown_086233A0[sub_81C76AC()];
|
||||
structPtr->unk14 = gUnknown_086233A0[GetSelectedConditionSearch()];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -443,7 +443,7 @@ static u32 sub_81CF418(s32 state)
|
||||
HideBg(3);
|
||||
if (!unk->unkC)
|
||||
{
|
||||
u8 r4 = sub_81C76AC() + 8;
|
||||
u8 r4 = GetSelectedConditionSearch() + POKENAV_MENUITEM_CONDITION_SEARCH_COOL;
|
||||
LoadLeftHeaderGfxForIndex(r4);
|
||||
sub_81C7FA0(r4, 1, 0);
|
||||
sub_81C7FA0(1, 1, 0);
|
||||
@ -673,13 +673,16 @@ static void sub_81CF8E4(struct PokenavMonList * item, u8 * dest)
|
||||
u8 level;
|
||||
u8 * s;
|
||||
const u8 * genderStr;
|
||||
if (item->boxId == 14)
|
||||
|
||||
// Mon is in party
|
||||
if (item->boxId == TOTAL_BOXES_COUNT)
|
||||
{
|
||||
struct Pokemon * mon = &gPlayerParty[item->monId];
|
||||
gender = GetMonGender(mon);
|
||||
level = GetLevelFromMonExp(mon);
|
||||
GetMonData(mon, MON_DATA_NICKNAME, gStringVar3);
|
||||
}
|
||||
// Mon is in PC
|
||||
else
|
||||
{
|
||||
struct BoxPokemon * mon = GetBoxedMonPtr(item->boxId, item->monId);
|
||||
@ -687,24 +690,25 @@ static void sub_81CF8E4(struct PokenavMonList * item, u8 * dest)
|
||||
level = GetLevelFromBoxMonExp(mon);
|
||||
GetBoxMonData(mon, MON_DATA_NICKNAME, gStringVar3);
|
||||
}
|
||||
|
||||
StringGetEnd10(gStringVar3);
|
||||
dest = sub_81DB494(dest, 1, gStringVar3, 60);
|
||||
switch (gender)
|
||||
{
|
||||
default:
|
||||
genderStr = gUnknown_086235D4;
|
||||
genderStr = sText_NoGenderSymbol;
|
||||
break;
|
||||
case MON_MALE:
|
||||
genderStr = gUnknown_086235BC;
|
||||
genderStr = sText_MaleSymbol;
|
||||
break;
|
||||
case MON_FEMALE:
|
||||
genderStr = gUnknown_086235C8;
|
||||
genderStr = sText_FemaleSymbol;
|
||||
break;
|
||||
}
|
||||
s = StringCopy(gStringVar1, genderStr);
|
||||
*s++ = CHAR_SLASH;
|
||||
*s++ = CHAR_SPECIAL_F9;
|
||||
*s++ = 5; // LV
|
||||
*s++ = CHAR_LV_2;
|
||||
ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
sub_81DB494(dest, 1, gStringVar1, 40);
|
||||
}
|
@ -286,7 +286,7 @@ bool32 sub_81CB260(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_81CB29C(s32 index)
|
||||
void CreateMatchCallLoopedTask(s32 index)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
state->unk4 = CreateLoopedTask(sMatchCallLoopTaskFuncs[index], 1);
|
513
src/pokenav_menu_handler_1.c
Normal file
513
src/pokenav_menu_handler_1.c
Normal file
@ -0,0 +1,513 @@
|
||||
#include "global.h"
|
||||
#include "pokenav.h"
|
||||
#include "event_data.h"
|
||||
#include "main.h"
|
||||
#include "sound.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
struct Pokenav1Struct
|
||||
{
|
||||
u16 menuType;
|
||||
s16 cursorPos;
|
||||
u16 currMenuItem;
|
||||
u16 helpBarIndex;
|
||||
u32 unk8;
|
||||
u32 (*callback)(struct Pokenav1Struct*);
|
||||
};
|
||||
|
||||
static bool32 UpdateMenuCursorPos(struct Pokenav1Struct *state);
|
||||
static void ReturnToConditionMenu(struct Pokenav1Struct *state);
|
||||
static void ReturnToMainMenu(struct Pokenav1Struct *state);
|
||||
static u32 sub_81C97BC(struct Pokenav1Struct *state);
|
||||
static void sub_81C97B0(struct Pokenav1Struct *state, u32 a1);
|
||||
static u32 CB2_ReturnToConditionMenu(struct Pokenav1Struct *state);
|
||||
static u32 CB2_ReturnToMainMenu(struct Pokenav1Struct *state);
|
||||
static u32 HandleConditionSearchMenuInput(struct Pokenav1Struct *state);
|
||||
static u32 HandleConditionMenuInput(struct Pokenav1Struct *state);
|
||||
static u32 HandleCantOpenRibbonsInput(struct Pokenav1Struct *state);
|
||||
static u32 HandleMainMenuInputEndTutorial(struct Pokenav1Struct *state);
|
||||
static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state);
|
||||
static u32 HandleMainMenuInput(struct Pokenav1Struct *state);
|
||||
static u32 (*GetMainMenuInputHandler(void))(struct Pokenav1Struct*);
|
||||
static void SetMenuInputHandler(struct Pokenav1Struct *state);
|
||||
|
||||
// Number of entries - 1 for that menu type
|
||||
static const u8 sLastCursorPositions[] =
|
||||
{
|
||||
[POKENAV_MENU_TYPE_DEFAULT] = 2,
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC] = 3,
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] = 4,
|
||||
[POKENAV_MENU_TYPE_CONDITION] = 2,
|
||||
[POKENAV_MENU_TYPE_CONDITION_SEARCH] = 5
|
||||
};
|
||||
|
||||
static const u8 sMenuItems[][6] =
|
||||
{
|
||||
[POKENAV_MENU_TYPE_DEFAULT] =
|
||||
{
|
||||
POKENAV_MENUITEM_MAP,
|
||||
POKENAV_MENUITEM_CONDITION,
|
||||
[2 ... 5] = POKENAV_MENUITEM_SWITCH_OFF
|
||||
},
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC] =
|
||||
{
|
||||
POKENAV_MENUITEM_MAP,
|
||||
POKENAV_MENUITEM_CONDITION,
|
||||
POKENAV_MENUITEM_MATCH_CALL,
|
||||
[3 ... 5] = POKENAV_MENUITEM_SWITCH_OFF
|
||||
},
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] =
|
||||
{
|
||||
POKENAV_MENUITEM_MAP,
|
||||
POKENAV_MENUITEM_CONDITION,
|
||||
POKENAV_MENUITEM_MATCH_CALL,
|
||||
POKENAV_MENUITEM_RIBBONS,
|
||||
[4 ... 5] = POKENAV_MENUITEM_SWITCH_OFF
|
||||
},
|
||||
[POKENAV_MENU_TYPE_CONDITION] =
|
||||
{
|
||||
POKENAV_MENUITEM_CONDITION_PARTY,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH,
|
||||
POKENAV_MENUITEM_CONDITION_CANCEL,
|
||||
[3 ... 5] = POKENAV_MENUITEM_SWITCH_OFF
|
||||
},
|
||||
[POKENAV_MENU_TYPE_CONDITION_SEARCH] =
|
||||
{
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_COOL,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_BEAUTY,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_CUTE,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_SMART,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_TOUGH,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_CANCEL
|
||||
},
|
||||
};
|
||||
|
||||
static u8 GetPokenavMainMenuType(void)
|
||||
{
|
||||
u8 menuType = POKENAV_MENU_TYPE_DEFAULT;
|
||||
|
||||
if (FlagGet(FLAG_ADDED_MATCH_CALL_TO_POKENAV))
|
||||
{
|
||||
menuType = POKENAV_MENU_TYPE_UNLOCK_MC;
|
||||
|
||||
if (FlagGet(FLAG_SYS_RIBBON_GET))
|
||||
menuType = POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS;
|
||||
}
|
||||
|
||||
return menuType;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_0(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
state->menuType = GetPokenavMainMenuType();
|
||||
state->cursorPos = 0;
|
||||
state->currMenuItem = POKENAV_MENUITEM_MAP;
|
||||
state->helpBarIndex = HELPBAR_NONE;
|
||||
SetMenuInputHandler(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_4(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
state->menuType = GetPokenavMainMenuType();
|
||||
state->cursorPos = 2;
|
||||
state->currMenuItem = POKENAV_MENUITEM_MATCH_CALL;
|
||||
state->helpBarIndex = HELPBAR_NONE;
|
||||
SetMenuInputHandler(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_5(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
state->menuType = GetPokenavMainMenuType();
|
||||
state->cursorPos = 3;
|
||||
state->currMenuItem = POKENAV_MENUITEM_RIBBONS;
|
||||
SetMenuInputHandler(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_2(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
state->menuType = POKENAV_MENU_TYPE_CONDITION;
|
||||
state->cursorPos = 0;
|
||||
state->currMenuItem = POKENAV_MENUITEM_CONDITION_PARTY;
|
||||
state->helpBarIndex = HELPBAR_NONE;
|
||||
SetMenuInputHandler(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_3(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
state->menuType = POKENAV_MENU_TYPE_CONDITION_SEARCH;
|
||||
state->cursorPos = GetSelectedConditionSearch();
|
||||
state->currMenuItem = state->cursorPos + POKENAV_MENUITEM_CONDITION_SEARCH_COOL;
|
||||
state->helpBarIndex = HELPBAR_NONE;
|
||||
SetMenuInputHandler(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void SetMenuInputHandler(struct Pokenav1Struct *state)
|
||||
{
|
||||
switch (state->menuType)
|
||||
{
|
||||
case POKENAV_MENU_TYPE_DEFAULT:
|
||||
SetPokenavMode(POKENAV_MODE_NORMAL);
|
||||
// fallthrough
|
||||
case POKENAV_MENU_TYPE_UNLOCK_MC:
|
||||
case POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS:
|
||||
state->callback = GetMainMenuInputHandler();
|
||||
break;
|
||||
case POKENAV_MENU_TYPE_CONDITION:
|
||||
state->callback = HandleConditionMenuInput;
|
||||
break;
|
||||
case POKENAV_MENU_TYPE_CONDITION_SEARCH:
|
||||
state->callback = HandleConditionSearchMenuInput;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static u32 (*GetMainMenuInputHandler(void))(struct Pokenav1Struct*)
|
||||
{
|
||||
switch (GetPokenavMode())
|
||||
{
|
||||
default:
|
||||
case POKENAV_MODE_NORMAL:
|
||||
return HandleMainMenuInput;
|
||||
case POKENAV_MODE_FORCE_CALL_READY:
|
||||
return HandleMainMenuInputTutorial;
|
||||
case POKENAV_MODE_FORCE_CALL_EXIT:
|
||||
return HandleMainMenuInputEndTutorial;
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_81C941C(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
return state->callback(state);
|
||||
}
|
||||
|
||||
void sub_81C9430(void)
|
||||
{
|
||||
FreePokenavSubstruct(1);
|
||||
}
|
||||
|
||||
static u32 HandleMainMenuInput(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
switch (sMenuItems[state->menuType][state->cursorPos])
|
||||
{
|
||||
case POKENAV_MENUITEM_MAP:
|
||||
state->helpBarIndex = gSaveBlock2Ptr->regionMapZoom ? HELPBAR_MAP_ZOOMED_IN : HELPBAR_MAP_ZOOMED_OUT;
|
||||
sub_81C97B0(state, POKENAV_MENU_6);
|
||||
return POKENAV_MENU_FUNC_OPEN_FEATURE;
|
||||
case POKENAV_MENUITEM_CONDITION:
|
||||
state->menuType = POKENAV_MENU_TYPE_CONDITION;
|
||||
state->cursorPos = 0;
|
||||
state->currMenuItem = sMenuItems[POKENAV_MENU_TYPE_CONDITION][0];
|
||||
state->callback = HandleConditionMenuInput;
|
||||
return POKENAV_MENU_FUNC_OPEN_CONDITION;
|
||||
case POKENAV_MENUITEM_MATCH_CALL:
|
||||
state->helpBarIndex = HELPBAR_MC_TRAINER_LIST;
|
||||
sub_81C97B0(state, POKENAV_MENU_B);
|
||||
return POKENAV_MENU_FUNC_OPEN_FEATURE;
|
||||
case POKENAV_MENUITEM_RIBBONS:
|
||||
if (CanViewRibbonsMenu())
|
||||
{
|
||||
state->helpBarIndex = HELPBAR_RIBBONS_MON_LIST;
|
||||
sub_81C97B0(state, POKENAV_MENU_C);
|
||||
return POKENAV_MENU_FUNC_OPEN_FEATURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
state->callback = HandleCantOpenRibbonsInput;
|
||||
return POKENAV_MENU_FUNC_NO_RIBBON_WINNERS;
|
||||
}
|
||||
case POKENAV_MENUITEM_SWITCH_OFF:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
return -1;
|
||||
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
|
||||
// Force the player to select Match Call during the call Mr. Stone pokenav tutorial
|
||||
static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
if (sMenuItems[state->menuType][state->cursorPos] == POKENAV_MENUITEM_MATCH_CALL)
|
||||
{
|
||||
state->helpBarIndex = HELPBAR_MC_TRAINER_LIST;
|
||||
sub_81C97B0(state, POKENAV_MENU_B);
|
||||
return POKENAV_MENU_FUNC_OPEN_FEATURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySE(SE_HAZURE);
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
PlaySE(SE_HAZURE);
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
|
||||
// After calling Mr. Stone during the pokenav tutorial, force player to exit or use Match Call again
|
||||
static u32 HandleMainMenuInputEndTutorial(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
u32 menuItem = sMenuItems[state->menuType][state->cursorPos];
|
||||
if (menuItem != POKENAV_MENUITEM_MATCH_CALL && menuItem != POKENAV_MENUITEM_SWITCH_OFF)
|
||||
{
|
||||
PlaySE(SE_HAZURE);
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
else if (menuItem == POKENAV_MENUITEM_MATCH_CALL)
|
||||
{
|
||||
state->helpBarIndex = HELPBAR_MC_TRAINER_LIST;
|
||||
sub_81C97B0(state, POKENAV_MENU_B);
|
||||
return POKENAV_MENU_FUNC_OPEN_FEATURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
|
||||
// Handles input after selecting Ribbons when there are no ribbon winners left
|
||||
// Selecting it again just reprints the Ribbon description to replace the "No Ribbon winners" message
|
||||
static u32 HandleCantOpenRibbonsInput(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (UpdateMenuCursorPos(state))
|
||||
{
|
||||
state->callback = GetMainMenuInputHandler();
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
{
|
||||
state->callback = GetMainMenuInputHandler();
|
||||
return POKENAV_MENU_FUNC_RESHOW_DESCRIPTION;
|
||||
}
|
||||
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
|
||||
static u32 HandleConditionMenuInput(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
switch (sMenuItems[state->menuType][state->cursorPos])
|
||||
{
|
||||
case POKENAV_MENUITEM_CONDITION_SEARCH:
|
||||
state->menuType = POKENAV_MENU_TYPE_CONDITION_SEARCH;
|
||||
state->cursorPos = 0;
|
||||
state->currMenuItem = sMenuItems[POKENAV_MENU_TYPE_CONDITION_SEARCH][0];
|
||||
state->callback = HandleConditionSearchMenuInput;
|
||||
return POKENAV_MENU_FUNC_OPEN_CONDITION_SEARCH;
|
||||
case POKENAV_MENUITEM_CONDITION_PARTY:
|
||||
state->helpBarIndex = 0;
|
||||
sub_81C97B0(state, POKENAV_MENU_7);
|
||||
return POKENAV_MENU_FUNC_OPEN_FEATURE;
|
||||
case POKENAV_MENUITEM_CONDITION_CANCEL:
|
||||
PlaySE(SE_SELECT);
|
||||
ReturnToMainMenu(state);
|
||||
return POKENAV_MENU_FUNC_RETURN_TO_MAIN;
|
||||
}
|
||||
}
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
if (state->cursorPos != sLastCursorPositions[state->menuType])
|
||||
{
|
||||
state->cursorPos = sLastCursorPositions[state->menuType];
|
||||
state->callback = CB2_ReturnToMainMenu;
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
ReturnToMainMenu(state);
|
||||
return POKENAV_MENU_FUNC_RETURN_TO_MAIN;
|
||||
}
|
||||
}
|
||||
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
|
||||
static u32 HandleConditionSearchMenuInput(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
u8 menuItem = sMenuItems[state->menuType][state->cursorPos];
|
||||
if (menuItem != POKENAV_MENUITEM_CONDITION_SEARCH_CANCEL)
|
||||
{
|
||||
SetSelectedConditionSearch(menuItem - POKENAV_MENUITEM_CONDITION_SEARCH_COOL);
|
||||
sub_81C97B0(state, POKENAV_MENU_8);
|
||||
state->helpBarIndex = HELPBAR_CONDITION_MON_LIST;
|
||||
return POKENAV_MENU_FUNC_OPEN_FEATURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
ReturnToConditionMenu(state);
|
||||
return POKENAV_MENU_FUNC_RETURN_TO_CONDITION;
|
||||
}
|
||||
}
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
if (state->cursorPos != sLastCursorPositions[state->menuType])
|
||||
{
|
||||
state->cursorPos = sLastCursorPositions[state->menuType];
|
||||
state->callback = CB2_ReturnToConditionMenu;
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
ReturnToConditionMenu(state);
|
||||
return POKENAV_MENU_FUNC_RETURN_TO_CONDITION;
|
||||
}
|
||||
}
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
|
||||
static u32 CB2_ReturnToMainMenu(struct Pokenav1Struct *state)
|
||||
{
|
||||
ReturnToMainMenu(state);
|
||||
return POKENAV_MENU_FUNC_RETURN_TO_MAIN;
|
||||
}
|
||||
|
||||
static u32 CB2_ReturnToConditionMenu(struct Pokenav1Struct *state)
|
||||
{
|
||||
ReturnToConditionMenu(state);
|
||||
return POKENAV_MENU_FUNC_RETURN_TO_CONDITION;
|
||||
}
|
||||
|
||||
static void sub_81C97B0(struct Pokenav1Struct *state, u32 a1)
|
||||
{
|
||||
state->unk8 = a1;
|
||||
state->callback = sub_81C97BC;
|
||||
}
|
||||
|
||||
static u32 sub_81C97BC(struct Pokenav1Struct *state)
|
||||
{
|
||||
return state->unk8;
|
||||
}
|
||||
|
||||
static void ReturnToMainMenu(struct Pokenav1Struct *state)
|
||||
{
|
||||
state->menuType = GetPokenavMainMenuType();
|
||||
state->cursorPos = 1;
|
||||
state->currMenuItem = sMenuItems[state->menuType][state->cursorPos];
|
||||
state->callback = HandleMainMenuInput;
|
||||
}
|
||||
|
||||
static void ReturnToConditionMenu(struct Pokenav1Struct *state)
|
||||
{
|
||||
state->menuType = POKENAV_MENU_TYPE_CONDITION;
|
||||
state->cursorPos = 1;
|
||||
state->currMenuItem = sMenuItems[POKENAV_MENU_TYPE_CONDITION][1];
|
||||
state->callback = HandleConditionMenuInput;
|
||||
}
|
||||
|
||||
static bool32 UpdateMenuCursorPos(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
if (--state->cursorPos < 0)
|
||||
state->cursorPos = sLastCursorPositions[state->menuType];
|
||||
|
||||
state->currMenuItem = sMenuItems[state->menuType][state->cursorPos];
|
||||
return TRUE;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN)
|
||||
{
|
||||
state->cursorPos++;
|
||||
if (state->cursorPos > sLastCursorPositions[state->menuType])
|
||||
state->cursorPos = 0;
|
||||
|
||||
state->currMenuItem = sMenuItems[state->menuType][state->cursorPos];
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
int GetPokenavMenuType(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
return state->menuType;
|
||||
}
|
||||
|
||||
// Position of cursor relative to number of current menu options
|
||||
int GetPokenavCursorPos(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
return state->cursorPos;
|
||||
}
|
||||
|
||||
// ID of menu item the cursor is currently on
|
||||
int GetCurrentMenuItemId(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
return state->currMenuItem;
|
||||
}
|
||||
|
||||
u16 GetHelpBarTextId(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
return state->helpBarIndex;
|
||||
}
|
@ -23,31 +23,31 @@ struct Pokenav2Struct
|
||||
{
|
||||
bool32 (*callback)(void);
|
||||
u32 loopedTaskId;
|
||||
u16 optionDescriptionWindowId;
|
||||
u16 optionDescWindowId;
|
||||
u8 bg3ScrollTaskId;
|
||||
u8 cursorPos;
|
||||
bool8 otherIconsInMotion;
|
||||
u8 field_00d;
|
||||
bool32 iconVisible[6];
|
||||
bool32 iconVisible[MAX_POKENAV_MENUITEMS];
|
||||
struct Sprite * field_028;
|
||||
struct Sprite * iconSprites[6][4];
|
||||
struct Sprite * iconSprites[MAX_POKENAV_MENUITEMS][4];
|
||||
u16 bg1TilemapBuffer[0x400];
|
||||
};
|
||||
|
||||
static struct Pokenav2Struct * sub_81C9958(void);
|
||||
static bool32 sub_81C99FC(void);
|
||||
static u32 sub_81C9A10(s32 state);
|
||||
static u32 sub_81C9C6C(s32 state);
|
||||
static u32 sub_81C9CA8(s32 state);
|
||||
static u32 sub_81C9D44(s32 state);
|
||||
static u32 sub_81C9DD8(s32 state);
|
||||
static u32 sub_81C9E58(s32 state);
|
||||
static u32 sub_81C9EC8(s32 state);
|
||||
static u32 sub_81C9EF8(s32 state);
|
||||
static u32 sub_81C9F28(s32 state);
|
||||
static u32 LoopedTask_MoveMenuCursor(s32 state);
|
||||
static u32 LoopedTask_OpenConditionMenu(s32 state);
|
||||
static u32 LoopedTask_ReturnToMainMenu(s32 state);
|
||||
static u32 LoopedTask_OpenConditionSearchMenu(s32 state);
|
||||
static u32 LoopedTask_ReturnToConditionMenu(s32 state);
|
||||
static u32 LoopedTask_SelectRibbonsNoWinners(s32 state);
|
||||
static u32 LoopedTask_ReShowDescription(s32 state);
|
||||
static u32 LoopedTask_OpenPokenavFeature(s32 state);
|
||||
static void sub_81C9FC4(void);
|
||||
static void sub_81C9FEC(void);
|
||||
static void sub_81CA02C(void);
|
||||
static void CreateMenuOptionSprites(void);
|
||||
static void sub_81CA094(void);
|
||||
static void sub_81CA0C8(void);
|
||||
static void sub_81CA0EC(const u16 *const * a0, s32 a1, s32 a2);
|
||||
@ -56,7 +56,7 @@ static void sub_81CA278(void);
|
||||
static void sub_81CA35C(struct Sprite ** sprites, s32 a1, s32 a2, s32 a3);
|
||||
static void sub_81CA3B4(struct Sprite ** sprites);
|
||||
static void sub_81CA2DC(void);
|
||||
static bool32 sub_81CA324(void);
|
||||
static bool32 AreMenuOptionSpritesMoving(void);
|
||||
static void sub_81CA448(struct Sprite ** sprites, bool32 a1);
|
||||
static void sub_81CA474(struct Sprite * sprite);
|
||||
static void sub_81CA4AC(struct Sprite * sprite);
|
||||
@ -64,9 +64,9 @@ static void sub_81CA580(u8 taskId);
|
||||
static void sub_81CA640(void);
|
||||
static void sub_81CA6AC(struct Sprite * sprite);
|
||||
static void sub_81CA698(void);
|
||||
static void sub_81CA6E0(void);
|
||||
static void sub_81CA714(void);
|
||||
static void sub_81CA770(void);
|
||||
static void AddOptionDescriptionWindow(void);
|
||||
static void PrintCurrentOptionDescription(void);
|
||||
static void PrintNoRibbonWinners(void);
|
||||
static bool32 sub_81CA7C4(void);
|
||||
static void sub_81CA7D4(void);
|
||||
static void sub_81CA7F4(void);
|
||||
@ -120,16 +120,16 @@ static const struct BgTemplate gUnknown_08620194[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static const LoopedTask gUnknown_086201A0[] = {
|
||||
NULL,
|
||||
sub_81C9C6C,
|
||||
sub_81C9CA8,
|
||||
sub_81C9D44,
|
||||
sub_81C9DD8,
|
||||
sub_81C9E58,
|
||||
sub_81C9EC8,
|
||||
sub_81C9EF8,
|
||||
sub_81C9F28
|
||||
static const LoopedTask sMenuHandlerLoopTaskFuncs[] = {
|
||||
[POKENAV_MENU_FUNC_NONE] = NULL,
|
||||
[POKENAV_MENU_FUNC_MOVE_CURSOR] = LoopedTask_MoveMenuCursor,
|
||||
[POKENAV_MENU_FUNC_OPEN_CONDITION] = LoopedTask_OpenConditionMenu,
|
||||
[POKENAV_MENU_FUNC_RETURN_TO_MAIN] = LoopedTask_ReturnToMainMenu,
|
||||
[POKENAV_MENU_FUNC_OPEN_CONDITION_SEARCH] = LoopedTask_OpenConditionSearchMenu,
|
||||
[POKENAV_MENU_FUNC_RETURN_TO_CONDITION] = LoopedTask_ReturnToConditionMenu,
|
||||
[POKENAV_MENU_FUNC_NO_RIBBON_WINNERS] = LoopedTask_SelectRibbonsNoWinners,
|
||||
[POKENAV_MENU_FUNC_RESHOW_DESCRIPTION] = LoopedTask_ReShowDescription,
|
||||
[POKENAV_MENU_FUNC_OPEN_FEATURE] = LoopedTask_OpenPokenavFeature
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet gUnknown_086201C4[] =
|
||||
@ -175,39 +175,45 @@ struct UnkStruct_08620240
|
||||
{
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
const u16 *unk4[6];
|
||||
const u16 *unk4[MAX_POKENAV_MENUITEMS];
|
||||
};
|
||||
|
||||
static const struct UnkStruct_08620240 gUnknown_08620240[5] =
|
||||
// TODO
|
||||
static const struct UnkStruct_08620240 gUnknown_08620240[POKENAV_MENU_TYPE_COUNT] =
|
||||
{
|
||||
[POKENAV_MENU_TYPE_DEFAULT] =
|
||||
{
|
||||
0x2A,
|
||||
0x14,
|
||||
{gUnknown_0862020C, gUnknown_08620210, gUnknown_0862021C}
|
||||
0x14,
|
||||
{gUnknown_0862020C, gUnknown_08620210, gUnknown_0862021C}
|
||||
},
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC] =
|
||||
{
|
||||
0x2A,
|
||||
0x14,
|
||||
{gUnknown_0862020C, gUnknown_08620210, gUnknown_08620214, gUnknown_0862021C}
|
||||
0x14,
|
||||
{gUnknown_0862020C, gUnknown_08620210, gUnknown_08620214, gUnknown_0862021C}
|
||||
},
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] =
|
||||
{
|
||||
0x2A,
|
||||
0x14,
|
||||
{gUnknown_0862020C, gUnknown_08620210, gUnknown_08620214, gUnknown_08620218, gUnknown_0862021C}
|
||||
0x14,
|
||||
{gUnknown_0862020C, gUnknown_08620210, gUnknown_08620214, gUnknown_08620218, gUnknown_0862021C}
|
||||
},
|
||||
[POKENAV_MENU_TYPE_CONDITION] =
|
||||
{
|
||||
0x38,
|
||||
0x14,
|
||||
{gUnknown_08620220, gUnknown_08620224, gUnknown_0862023C}
|
||||
0x14,
|
||||
{gUnknown_08620220, gUnknown_08620224, gUnknown_0862023C}
|
||||
},
|
||||
[POKENAV_MENU_TYPE_CONDITION_SEARCH] =
|
||||
{
|
||||
0x28,
|
||||
0x10,
|
||||
{gUnknown_08620228, gUnknown_0862022C, gUnknown_08620230, gUnknown_08620234, gUnknown_08620238, gUnknown_0862023C}
|
||||
0x10,
|
||||
{gUnknown_08620228, gUnknown_0862022C, gUnknown_08620230, gUnknown_08620234, gUnknown_08620238, gUnknown_0862023C}
|
||||
},
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_086202CC =
|
||||
static const struct WindowTemplate sOptionDescWindowTemplate =
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 3,
|
||||
@ -218,28 +224,28 @@ static const struct WindowTemplate gUnknown_086202CC =
|
||||
.baseBlock = 8
|
||||
};
|
||||
|
||||
static const u8 *const gUnknown_086202D4[] =
|
||||
static const u8 *const sPageDescriptions[] =
|
||||
{
|
||||
gText_CheckMapOfHoenn,
|
||||
gText_CheckPokemonInDetail,
|
||||
gText_CallRegisteredTrainer,
|
||||
gText_CheckObtainedRibbons,
|
||||
gText_PutAwayPokenav,
|
||||
gText_CheckPartyPokemonInDetail,
|
||||
gText_CheckAllPokemonInDetail,
|
||||
gText_ReturnToPokenavMenu,
|
||||
gText_FindCoolPokemon,
|
||||
gText_FindBeautifulPokemon,
|
||||
gText_FindCutePokemon,
|
||||
gText_FindSmartPokemon,
|
||||
gText_FindToughPokemon,
|
||||
gText_ReturnToConditionMenu
|
||||
[POKENAV_MENUITEM_MAP] = gText_CheckMapOfHoenn,
|
||||
[POKENAV_MENUITEM_CONDITION] = gText_CheckPokemonInDetail,
|
||||
[POKENAV_MENUITEM_MATCH_CALL] = gText_CallRegisteredTrainer,
|
||||
[POKENAV_MENUITEM_RIBBONS] = gText_CheckObtainedRibbons,
|
||||
[POKENAV_MENUITEM_SWITCH_OFF] = gText_PutAwayPokenav,
|
||||
[POKENAV_MENUITEM_CONDITION_PARTY] = gText_CheckPartyPokemonInDetail,
|
||||
[POKENAV_MENUITEM_CONDITION_SEARCH] = gText_CheckAllPokemonInDetail,
|
||||
[POKENAV_MENUITEM_CONDITION_CANCEL] = gText_ReturnToPokenavMenu,
|
||||
[POKENAV_MENUITEM_CONDITION_SEARCH_COOL] = gText_FindCoolPokemon,
|
||||
[POKENAV_MENUITEM_CONDITION_SEARCH_BEAUTY] = gText_FindBeautifulPokemon,
|
||||
[POKENAV_MENUITEM_CONDITION_SEARCH_CUTE] = gText_FindCutePokemon,
|
||||
[POKENAV_MENUITEM_CONDITION_SEARCH_SMART] = gText_FindSmartPokemon,
|
||||
[POKENAV_MENUITEM_CONDITION_SEARCH_TOUGH] = gText_FindToughPokemon,
|
||||
[POKENAV_MENUITEM_CONDITION_SEARCH_CANCEL] = gText_ReturnToConditionMenu
|
||||
};
|
||||
|
||||
static const u8 sOptionDescTextColors[] = {TEXT_COLOR_GREEN, TEXT_COLOR_BLUE, TEXT_COLOR_LIGHT_GREEN};
|
||||
static const u8 sOptionDescTextColors[] = {TEXT_COLOR_GREEN, TEXT_COLOR_BLUE, TEXT_COLOR_LIGHT_GREEN};
|
||||
static const u8 sOptionDescTextColors2[] = {TEXT_COLOR_GREEN, TEXT_COLOR_BLUE, TEXT_COLOR_LIGHT_GREEN};
|
||||
|
||||
static const struct OamData gUnknown_08620314 =
|
||||
static const struct OamData sOamData_MenuOption =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
@ -266,20 +272,20 @@ static const union AffineAnimCmd gUnknown_0862032C[] =
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd *const gUnknown_08620344[] =
|
||||
static const union AffineAnimCmd *const sSpriteAnims_MenuOption[] =
|
||||
{
|
||||
gUnknown_0862031C,
|
||||
gUnknown_0862032C
|
||||
gUnknown_0862032C
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_0862034C =
|
||||
static const struct SpriteTemplate sMenuOptionSpriteTemplate =
|
||||
{
|
||||
.tileTag = 3,
|
||||
.paletteTag = 4,
|
||||
.oam = &gUnknown_08620314,
|
||||
.oam = &sOamData_MenuOption,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_08620344,
|
||||
.affineAnims = sSpriteAnims_MenuOption,
|
||||
.callback = SpriteCallbackDummy,
|
||||
};
|
||||
|
||||
@ -368,11 +374,11 @@ static struct Pokenav2Struct * sub_81C9958(void)
|
||||
}
|
||||
|
||||
|
||||
void sub_81C9990(s32 ltIdx)
|
||||
void CreateMenuHandlerLoopedTask(s32 ltIdx)
|
||||
{
|
||||
struct Pokenav2Struct * unk = GetSubstructPtr(2);
|
||||
|
||||
unk->loopedTaskId = CreateLoopedTask(gUnknown_086201A0[ltIdx], 1);
|
||||
unk->loopedTaskId = CreateLoopedTask(sMenuHandlerLoopTaskFuncs[ltIdx], 1);
|
||||
unk->callback = sub_81C99FC;
|
||||
}
|
||||
|
||||
@ -388,7 +394,7 @@ void sub_81C99D4(void)
|
||||
struct Pokenav2Struct * unk = GetSubstructPtr(2);
|
||||
|
||||
sub_81CA7F4();
|
||||
RemoveWindow(unk->optionDescriptionWindowId);
|
||||
RemoveWindow(unk->optionDescWindowId);
|
||||
sub_81C9FEC();
|
||||
sub_81CA994();
|
||||
FreePokenavSubstruct(2);
|
||||
@ -434,21 +440,21 @@ static u32 sub_81C9A10(s32 state)
|
||||
decompress_and_copy_tile_data_to_vram(3, gUnknown_0861FC98, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(3, gUnknown_0861FCAC, 0, 0, 1);
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_0861FC78, 0x30, 0x20);
|
||||
if (sub_81C9894() == 3 || sub_81C9894() == 4)
|
||||
if (GetPokenavMenuType() == POKENAV_MENU_TYPE_CONDITION || GetPokenavMenuType() == POKENAV_MENU_TYPE_CONDITION_SEARCH)
|
||||
sub_81CA850();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
return LT_PAUSE;
|
||||
sub_81CA6E0();
|
||||
AddOptionDescriptionWindow();
|
||||
sub_81CA7D4();
|
||||
return LT_INC_AND_CONTINUE;
|
||||
case 4:
|
||||
sub_81C9FC4();
|
||||
return LT_INC_AND_CONTINUE;
|
||||
case 5:
|
||||
sub_81CA714();
|
||||
sub_81CA02C();
|
||||
PrintCurrentOptionDescription();
|
||||
CreateMenuOptionSprites();
|
||||
sub_81CA640();
|
||||
sub_81CA0C8();
|
||||
return LT_INC_AND_PAUSE;
|
||||
@ -467,12 +473,12 @@ static u32 sub_81C9A10(s32 state)
|
||||
PlaySE(SE_PN_ON);
|
||||
sub_81C7AC0(3);
|
||||
}
|
||||
switch (sub_81C9894())
|
||||
switch (GetPokenavMenuType())
|
||||
{
|
||||
case 4:
|
||||
case POKENAV_MENU_TYPE_CONDITION_SEARCH:
|
||||
LoadLeftHeaderGfxForIndex(7);
|
||||
// fallthrough
|
||||
case 3:
|
||||
case POKENAV_MENU_TYPE_CONDITION:
|
||||
LoadLeftHeaderGfxForIndex(1);
|
||||
break;
|
||||
default:
|
||||
@ -483,12 +489,12 @@ static u32 sub_81C9A10(s32 state)
|
||||
case 8:
|
||||
if (IsPaletteFadeActive())
|
||||
return LT_PAUSE;
|
||||
switch (sub_81C9894())
|
||||
switch (GetPokenavMenuType())
|
||||
{
|
||||
case 4:
|
||||
case POKENAV_MENU_TYPE_CONDITION_SEARCH:
|
||||
sub_81C7FA0(7, FALSE, FALSE);
|
||||
// fallthrough
|
||||
case 3:
|
||||
case POKENAV_MENU_TYPE_CONDITION:
|
||||
sub_81C7FA0(1, FALSE, FALSE);
|
||||
break;
|
||||
default:
|
||||
@ -499,7 +505,7 @@ static u32 sub_81C9A10(s32 state)
|
||||
sub_81CA92C();
|
||||
return LT_INC_AND_CONTINUE;
|
||||
case 9:
|
||||
if (sub_81CA324())
|
||||
if (AreMenuOptionSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
if (sub_81C8010())
|
||||
return LT_PAUSE;
|
||||
@ -508,18 +514,18 @@ static u32 sub_81C9A10(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81C9C6C(s32 state)
|
||||
static u32 LoopedTask_MoveMenuCursor(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
sub_81CAA3C();
|
||||
sub_81CA278();
|
||||
sub_81CA714();
|
||||
PrintCurrentOptionDescription();
|
||||
PlaySE(SE_SELECT);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81CA324())
|
||||
if (AreMenuOptionSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
if (sub_81CA7C4())
|
||||
return LT_PAUSE;
|
||||
@ -528,7 +534,7 @@ static u32 sub_81C9C6C(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81C9CA8(s32 state)
|
||||
static u32 LoopedTask_OpenConditionMenu(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
@ -539,7 +545,7 @@ static u32 sub_81C9CA8(s32 state)
|
||||
PlaySE(SE_SELECT);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81CA324())
|
||||
if (AreMenuOptionSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
if (sub_81C8010())
|
||||
return LT_PAUSE;
|
||||
@ -550,10 +556,10 @@ static u32 sub_81C9CA8(s32 state)
|
||||
sub_81CA20C();
|
||||
sub_81C7FA0(1, FALSE, FALSE);
|
||||
sub_81CA818();
|
||||
sub_81CA714();
|
||||
PrintCurrentOptionDescription();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (sub_81CA324())
|
||||
if (AreMenuOptionSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
if (sub_81C8010())
|
||||
return LT_PAUSE;
|
||||
@ -567,7 +573,7 @@ static u32 sub_81C9CA8(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81C9D44(s32 state)
|
||||
static u32 LoopedTask_ReturnToMainMenu(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
@ -577,7 +583,7 @@ static u32 sub_81C9D44(s32 state)
|
||||
sub_81C7FC4(1, 0);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81CA324())
|
||||
if (AreMenuOptionSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
if (sub_81C8010())
|
||||
return LT_PAUSE;
|
||||
@ -588,10 +594,10 @@ static u32 sub_81C9D44(s32 state)
|
||||
sub_81CA20C();
|
||||
sub_81C7FA0(0, FALSE, FALSE);
|
||||
sub_81CA864();
|
||||
sub_81CA714();
|
||||
PrintCurrentOptionDescription();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (sub_81CA324())
|
||||
if (AreMenuOptionSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
if (sub_81C8010())
|
||||
return LT_PAUSE;
|
||||
@ -605,7 +611,7 @@ static u32 sub_81C9D44(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81C9DD8(s32 state)
|
||||
static u32 LoopedTask_OpenConditionSearchMenu(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
@ -615,7 +621,7 @@ static u32 sub_81C9DD8(s32 state)
|
||||
PlaySE(SE_SELECT);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81CA324())
|
||||
if (AreMenuOptionSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
LoadLeftHeaderGfxForIndex(7);
|
||||
sub_81CA0C8();
|
||||
@ -623,10 +629,10 @@ static u32 sub_81C9DD8(s32 state)
|
||||
case 2:
|
||||
sub_81CA20C();
|
||||
sub_81C7FA0(7, FALSE, FALSE);
|
||||
sub_81CA714();
|
||||
PrintCurrentOptionDescription();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (sub_81CA324())
|
||||
if (AreMenuOptionSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
if (sub_81C8010())
|
||||
return LT_PAUSE;
|
||||
@ -638,7 +644,7 @@ static u32 sub_81C9DD8(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81C9E58(s32 state)
|
||||
static u32 LoopedTask_ReturnToConditionMenu(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
@ -648,7 +654,7 @@ static u32 sub_81C9E58(s32 state)
|
||||
sub_81C7FC4(7, 0);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81CA324())
|
||||
if (AreMenuOptionSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
if (sub_81C8010())
|
||||
return LT_PAUSE;
|
||||
@ -656,10 +662,10 @@ static u32 sub_81C9E58(s32 state)
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 2:
|
||||
sub_81CA20C();
|
||||
sub_81CA714();
|
||||
PrintCurrentOptionDescription();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (sub_81CA324())
|
||||
if (AreMenuOptionSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
if (sub_81CA89C())
|
||||
return LT_PAUSE;
|
||||
@ -669,13 +675,13 @@ static u32 sub_81C9E58(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81C9EC8(s32 state)
|
||||
static u32 LoopedTask_SelectRibbonsNoWinners(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
PlaySE(SE_HAZURE);
|
||||
sub_81CA770();
|
||||
PrintNoRibbonWinners();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
@ -685,13 +691,14 @@ static u32 sub_81C9EC8(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81C9EF8(s32 state)
|
||||
// For redisplaying the Ribbons description to replace the No Ribbon Winners message
|
||||
static u32 LoopedTask_ReShowDescription(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
PlaySE(SE_SELECT);
|
||||
sub_81CA714();
|
||||
PrintCurrentOptionDescription();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
@ -701,7 +708,8 @@ static u32 sub_81C9EF8(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81C9F28(s32 state)
|
||||
// For selecting a feature option from a menu, e.g. the Map, Match Call, Beauty search, etc.
|
||||
static u32 LoopedTask_OpenPokenavFeature(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
@ -714,12 +722,12 @@ static u32 sub_81C9F28(s32 state)
|
||||
sub_81C7880();
|
||||
sub_81CA9C8();
|
||||
sub_81CA2DC();
|
||||
switch (sub_81C9894())
|
||||
switch (GetPokenavMenuType())
|
||||
{
|
||||
case 4:
|
||||
case POKENAV_MENU_TYPE_CONDITION_SEARCH:
|
||||
sub_81C7FC4(7, FALSE);
|
||||
// fallthrough
|
||||
case 3:
|
||||
case POKENAV_MENU_TYPE_CONDITION:
|
||||
sub_81C7FC4(1, FALSE);
|
||||
break;
|
||||
default:
|
||||
@ -729,7 +737,7 @@ static u32 sub_81C9F28(s32 state)
|
||||
PlaySE(SE_SELECT);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 2:
|
||||
if (sub_81CA324())
|
||||
if (AreMenuOptionSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
if (sub_81C8010())
|
||||
return LT_PAUSE;
|
||||
@ -766,16 +774,17 @@ static void sub_81C9FEC(void)
|
||||
sub_81CA698();
|
||||
}
|
||||
|
||||
static void sub_81CA02C(void)
|
||||
static void CreateMenuOptionSprites(void)
|
||||
{
|
||||
s32 i, j;
|
||||
struct Pokenav2Struct * unk = GetSubstructPtr(2);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < MAX_POKENAV_MENUITEMS; i++)
|
||||
{
|
||||
// Each menu option is 4 subsprites
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&gUnknown_0862034C, 0x8c, 20 * i + 40, 3);
|
||||
u8 spriteId = CreateSprite(&sMenuOptionSpriteTemplate, 0x8c, 20 * i + 40, 3);
|
||||
unk->iconSprites[i][j] = &gSprites[spriteId];
|
||||
gSprites[spriteId].pos2.x = 32 * j;
|
||||
}
|
||||
@ -787,7 +796,7 @@ static void sub_81CA094(void)
|
||||
s32 i, j;
|
||||
struct Pokenav2Struct * unk = GetSubstructPtr(2);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < MAX_POKENAV_MENUITEMS; i++)
|
||||
{
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
@ -799,8 +808,8 @@ static void sub_81CA094(void)
|
||||
|
||||
static void sub_81CA0C8(void)
|
||||
{
|
||||
s32 r0 = sub_81C9894();
|
||||
sub_81CA0EC(gUnknown_08620240[r0].unk4, gUnknown_08620240[r0].unk0, gUnknown_08620240[r0].unk2);
|
||||
s32 menuType = GetPokenavMenuType();
|
||||
sub_81CA0EC(gUnknown_08620240[menuType].unk4, gUnknown_08620240[menuType].unk0, gUnknown_08620240[menuType].unk2);
|
||||
}
|
||||
|
||||
static void sub_81CA0EC(const u16 *const *a0, s32 a1, s32 a2)
|
||||
@ -809,7 +818,7 @@ static void sub_81CA0EC(const u16 *const *a0, s32 a1, s32 a2)
|
||||
struct Pokenav2Struct * unk = GetSubstructPtr(2);
|
||||
s32 sp04 = GetSpriteTileStartByTag(3);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < MAX_POKENAV_MENUITEMS; i++)
|
||||
{
|
||||
if (*a0 != NULL)
|
||||
{
|
||||
@ -841,11 +850,11 @@ static void sub_81CA20C(void)
|
||||
{
|
||||
s32 i;
|
||||
struct Pokenav2Struct * unk = GetSubstructPtr(2);
|
||||
s32 r8 = sub_81C98A4();
|
||||
s32 r8 = GetPokenavCursorPos();
|
||||
s32 r7 = 0;
|
||||
s32 r2;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < MAX_POKENAV_MENUITEMS; i++)
|
||||
{
|
||||
if (unk->iconVisible[i])
|
||||
{
|
||||
@ -868,10 +877,10 @@ static void sub_81CA278(void)
|
||||
{
|
||||
s32 i;
|
||||
struct Pokenav2Struct * unk = GetSubstructPtr(2);
|
||||
s32 r3 = sub_81C98A4();
|
||||
s32 r3 = GetPokenavCursorPos();
|
||||
s32 r5;
|
||||
|
||||
for (i = 0, r5 = 0; i < 6; i++)
|
||||
for (i = 0, r5 = 0; i < MAX_POKENAV_MENUITEMS; i++)
|
||||
{
|
||||
if (unk->iconVisible[i])
|
||||
{
|
||||
@ -894,7 +903,7 @@ static void sub_81CA2DC(void)
|
||||
s32 i;
|
||||
struct Pokenav2Struct * unk = GetSubstructPtr(2);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < MAX_POKENAV_MENUITEMS; i++)
|
||||
{
|
||||
if (unk->iconVisible[i])
|
||||
{
|
||||
@ -906,12 +915,12 @@ static void sub_81CA2DC(void)
|
||||
}
|
||||
}
|
||||
|
||||
static bool32 sub_81CA324(void)
|
||||
static bool32 AreMenuOptionSpritesMoving(void)
|
||||
{
|
||||
s32 i;
|
||||
struct Pokenav2Struct * unk = GetSubstructPtr(2);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < MAX_POKENAV_MENUITEMS; i++)
|
||||
{
|
||||
if (unk->iconSprites[i][0]->callback != SpriteCallbackDummy)
|
||||
return TRUE;
|
||||
@ -1112,34 +1121,35 @@ static void sub_81CA6AC(struct Sprite * sprite)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_81CA6E0(void)
|
||||
static void AddOptionDescriptionWindow(void)
|
||||
{
|
||||
struct Pokenav2Struct * ptr = GetSubstructPtr(2);
|
||||
|
||||
ptr->optionDescriptionWindowId = AddWindow(&gUnknown_086202CC);
|
||||
PutWindowTilemap(ptr->optionDescriptionWindowId);
|
||||
FillWindowPixelBuffer(ptr->optionDescriptionWindowId, PIXEL_FILL(6));
|
||||
CopyWindowToVram(ptr->optionDescriptionWindowId, 3);
|
||||
ptr->optionDescWindowId = AddWindow(&sOptionDescWindowTemplate);
|
||||
PutWindowTilemap(ptr->optionDescWindowId);
|
||||
FillWindowPixelBuffer(ptr->optionDescWindowId, PIXEL_FILL(6));
|
||||
CopyWindowToVram(ptr->optionDescWindowId, 3);
|
||||
}
|
||||
|
||||
static void sub_81CA714(void)
|
||||
static void PrintCurrentOptionDescription(void)
|
||||
{
|
||||
struct Pokenav2Struct * ptr = GetSubstructPtr(2);
|
||||
int i = sub_81C98B4();
|
||||
const u8 * s = gUnknown_086202D4[i];
|
||||
int menuItem = GetCurrentMenuItemId();
|
||||
const u8 * s = sPageDescriptions[menuItem];
|
||||
u32 width = GetStringWidth(1, s, -1);
|
||||
FillWindowPixelBuffer(ptr->optionDescriptionWindowId, PIXEL_FILL(6));
|
||||
AddTextPrinterParameterized3(ptr->optionDescriptionWindowId, 1, (192 - width) / 2, 1, sOptionDescTextColors, 0, s);
|
||||
FillWindowPixelBuffer(ptr->optionDescWindowId, PIXEL_FILL(6));
|
||||
AddTextPrinterParameterized3(ptr->optionDescWindowId, 1, (192 - width) / 2, 1, sOptionDescTextColors, 0, s);
|
||||
}
|
||||
|
||||
|
||||
static void sub_81CA770(void)
|
||||
// Printed when Ribbons is selected if no PC/party mons have ribbons
|
||||
// Can occur by obtaining a mon with a ribbon and then releasing all ribbon winners
|
||||
static void PrintNoRibbonWinners(void)
|
||||
{
|
||||
struct Pokenav2Struct * ptr = GetSubstructPtr(2);
|
||||
const u8 * s = gText_NoRibbonWinners;
|
||||
u32 width = GetStringWidth(1, s, -1);
|
||||
FillWindowPixelBuffer(ptr->optionDescriptionWindowId, PIXEL_FILL(6));
|
||||
AddTextPrinterParameterized3(ptr->optionDescriptionWindowId, 1, (192 - width) / 2, 1, sOptionDescTextColors2, 0, s);
|
||||
FillWindowPixelBuffer(ptr->optionDescWindowId, PIXEL_FILL(6));
|
||||
AddTextPrinterParameterized3(ptr->optionDescWindowId, 1, (192 - width) / 2, 1, sOptionDescTextColors2, 0, s);
|
||||
}
|
||||
|
||||
static bool32 sub_81CA7C4(void)
|
||||
@ -1259,9 +1269,9 @@ static void sub_81CA9EC(u8 taskId)
|
||||
|
||||
static void sub_81CAA3C(void)
|
||||
{
|
||||
int i = sub_81C9894();
|
||||
int j = sub_81C98A4();
|
||||
int r4 = gUnknown_08620240[i].unk2 * j + gUnknown_08620240[i].unk0 - 8;
|
||||
int menuType = GetPokenavMenuType();
|
||||
int cursorPos = GetPokenavCursorPos();
|
||||
int r4 = gUnknown_08620240[menuType].unk2 * cursorPos + gUnknown_08620240[menuType].unk0 - 8;
|
||||
CpuFill16(0, gScanlineEffectRegBuffers[0], 0x140);
|
||||
CpuFill16(0, gScanlineEffectRegBuffers[1], 0x140);
|
||||
CpuFill16(RGB(16, 23, 28), &gScanlineEffectRegBuffers[0][r4], 0x20);
|
@ -50,7 +50,7 @@ static void sub_81D02B0(s32 windowId, s32 val1, s32 val2);
|
||||
static void sub_81D024C(struct PokenavSub10 *ptr);
|
||||
static void sub_81D0288(struct PokenavSub10 *ptr);
|
||||
static void sub_81D0304(void);
|
||||
static void sub_81D035C(struct PokenavMonList *, u8 *);
|
||||
static void BufferRibbonMonInfoText(struct PokenavMonList *, u8 *);
|
||||
|
||||
static const LoopedTask gUnknown_086235D8[] =
|
||||
{
|
||||
@ -107,9 +107,9 @@ static const struct WindowTemplate gUnknown_086237D4 =
|
||||
.baseBlock = 20
|
||||
};
|
||||
|
||||
static const u8 gUnknown_086237DC[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 gUnknown_086237E8[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 gUnknown_086237F4[] = _("{UNK_SPACER}");
|
||||
static const u8 sText_MaleSymbol[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 sText_FemaleSymbol[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 sText_NoGenderSymbol[] = _("{UNK_SPACER}");
|
||||
|
||||
bool32 PokenavCallback_Init_12(void)
|
||||
{
|
||||
@ -188,12 +188,12 @@ static u32 sub_81CFA88(struct PokenavSub9 *structPtr)
|
||||
|
||||
static u32 sub_81CFB08(struct PokenavSub9 *structPtr)
|
||||
{
|
||||
return 100005;
|
||||
return POKENAV_MENU_5;
|
||||
}
|
||||
|
||||
static u32 sub_81CFB10(struct PokenavSub9 *structPtr)
|
||||
{
|
||||
return 100013;
|
||||
return POKENAV_MENU_D;
|
||||
}
|
||||
|
||||
static u32 sub_81CFB18(void)
|
||||
@ -660,7 +660,7 @@ static void sub_81D02B0(s32 windowId, s32 val1, s32 val2)
|
||||
*ptr++ = CHAR_SLASH;
|
||||
ConvertIntToDecimalStringN(ptr, val2, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
x = GetStringCenterAlignXOffset(1, strbuf, 56);
|
||||
AddTextPrinterParameterized(windowId, 1, strbuf,x, 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, strbuf, x, 1, 0xFF, NULL);
|
||||
}
|
||||
|
||||
static void sub_81D0304(void)
|
||||
@ -676,18 +676,21 @@ static void sub_81D0304(void)
|
||||
template.unkC = 8;
|
||||
template.unkD = 2;
|
||||
template.unkE = 1;
|
||||
template.listFunc.unk10_1 = sub_81D035C;
|
||||
template.listFunc.unk10_1 = BufferRibbonMonInfoText;
|
||||
template.unk14 = NULL;
|
||||
sub_81C81D4(&gUnknown_086237B0[1], &template, 0);
|
||||
}
|
||||
|
||||
static void sub_81D035C(struct PokenavMonList * item0, u8 * dest)
|
||||
// Buffers the "Nickname gender/level" text for the ribbon mon list
|
||||
static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest)
|
||||
{
|
||||
u8 gender;
|
||||
u8 level;
|
||||
u8 * s;
|
||||
const u8 * genderStr;
|
||||
struct PokenavMonList * item = item0;
|
||||
|
||||
// Mon is in party
|
||||
if (item->boxId == TOTAL_BOXES_COUNT)
|
||||
{
|
||||
struct Pokemon * mon = &gPlayerParty[item->monId];
|
||||
@ -695,6 +698,7 @@ static void sub_81D035C(struct PokenavMonList * item0, u8 * dest)
|
||||
level = GetLevelFromMonExp(mon);
|
||||
GetMonData(mon, MON_DATA_NICKNAME, gStringVar3);
|
||||
}
|
||||
// Mon is in PC
|
||||
else
|
||||
{
|
||||
struct BoxPokemon * mon = GetBoxedMonPtr(item->boxId, item->monId);
|
||||
@ -702,24 +706,26 @@ static void sub_81D035C(struct PokenavMonList * item0, u8 * dest)
|
||||
level = GetLevelFromBoxMonExp(mon);
|
||||
GetBoxMonData(mon, MON_DATA_NICKNAME, gStringVar3);
|
||||
}
|
||||
|
||||
StringGetEnd10(gStringVar3);
|
||||
dest = sub_81DB494(dest, 1, gStringVar3, 60);
|
||||
switch (gender)
|
||||
{
|
||||
default:
|
||||
genderStr = gUnknown_086237F4;
|
||||
genderStr = sText_NoGenderSymbol;
|
||||
break;
|
||||
case MON_MALE:
|
||||
genderStr = gUnknown_086237DC;
|
||||
genderStr = sText_MaleSymbol;
|
||||
break;
|
||||
case MON_FEMALE:
|
||||
genderStr = gUnknown_086237E8;
|
||||
genderStr = sText_FemaleSymbol;
|
||||
break;
|
||||
}
|
||||
|
||||
s = StringCopy(gStringVar1, genderStr);
|
||||
*s++ = CHAR_SLASH;
|
||||
*s++ = CHAR_SPECIAL_F9;
|
||||
*s++ = 5; // LV
|
||||
*s++ = CHAR_LV_2;
|
||||
ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
dest = sub_81DB494(dest, 1, gStringVar1, 54);
|
||||
ConvertIntToDecimalStringN(dest, item->data, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
@ -122,8 +122,8 @@ static const u16 gUnknown_08624038[] = INCBIN_U16("graphics/pokenav/ribbons_icon
|
||||
static const u16 gUnknown_08624058[] = INCBIN_U16("graphics/pokenav/ribbons_icon4.gbapal");
|
||||
static const u16 gUnknown_08624078[] = INCBIN_U16("graphics/pokenav/ribbons_icon5.gbapal");
|
||||
static const u16 gUnknown_08624098[] = INCBIN_U16("graphics/pokenav/8624098.gbapal");
|
||||
static const u32 gUnknown_086240B8[] = INCBIN_U32("graphics/pokenav/ribbons_icon.4bpp.lz");
|
||||
static const u32 gUnknown_08624280[] = INCBIN_U32("graphics/pokenav/ribbons_icon_big.4bpp.lz");
|
||||
static const u32 sRibbonIconsSmall_Gfx[] = INCBIN_U32("graphics/pokenav/ribbons_icon.4bpp.lz");
|
||||
static const u32 sRibbonIconsBig_Gfx[] = INCBIN_U32("graphics/pokenav/ribbons_icon_big.4bpp.lz");
|
||||
|
||||
static const struct BgTemplate gUnknown_08624B98[] =
|
||||
{
|
||||
@ -235,7 +235,7 @@ u32 sub_81D0548(struct PokenavSub13 *structPtr)
|
||||
|
||||
u32 sub_81D05D4(struct PokenavSub13 *structPtr)
|
||||
{
|
||||
return 100014;
|
||||
return POKENAV_MENU_E;
|
||||
}
|
||||
|
||||
bool32 sub_81D05DC(struct PokenavSub13 *structPtr)
|
||||
@ -527,7 +527,7 @@ u32 sub_81D0A6C(s32 state)
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
{
|
||||
sub_8199DF0(1, 0, 0, 1);
|
||||
decompress_and_copy_tile_data_to_vram(1, gUnknown_086240B8, 0, 1, 0);
|
||||
decompress_and_copy_tile_data_to_vram(1, sRibbonIconsSmall_Gfx, 0, 1, 0);
|
||||
SetBgTilemapBuffer(1, structPtr->tilemapBuffers[1]);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 20);
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_08623FF8, 0x20, 0xA0);
|
||||
@ -837,7 +837,7 @@ void sub_81D0FF0(struct PokenavSub14 *structPtr)
|
||||
txtPtr = StringCopy(gStringVar1, genderTxt);
|
||||
*(txtPtr++) = CHAR_SLASH;
|
||||
*(txtPtr++) = CHAR_SPECIAL_F9;
|
||||
*(txtPtr++) = 5;
|
||||
*(txtPtr++) = CHAR_LV_2;
|
||||
ConvertIntToDecimalStringN(txtPtr, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar1, 60, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(windowId, 2);
|
||||
@ -1041,7 +1041,7 @@ void sub_81D13BC(u16 *dst, u32 id)
|
||||
|
||||
static const struct CompressedSpriteSheet gUnknown_08624C78 =
|
||||
{
|
||||
gUnknown_08624280, 0x1800, 9
|
||||
sRibbonIconsBig_Gfx, 0x1800, 9
|
||||
};
|
||||
|
||||
static const struct SpritePalette gUnknown_08624C80[] =
|
@ -1,466 +0,0 @@
|
||||
#include "global.h"
|
||||
#include "pokenav.h"
|
||||
#include "event_data.h"
|
||||
#include "main.h"
|
||||
#include "sound.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
struct Pokenav1Struct
|
||||
{
|
||||
u16 menuType;
|
||||
s16 cursorPos;
|
||||
u16 descriptionId;
|
||||
u16 helpBarIndex;
|
||||
u32 unk8;
|
||||
u32 (*callback)(struct Pokenav1Struct*);
|
||||
};
|
||||
|
||||
static bool32 sub_81C9814(struct Pokenav1Struct *a0);
|
||||
static void sub_81C97F8(struct Pokenav1Struct *a0);
|
||||
static void sub_81C97C0(struct Pokenav1Struct *a0);
|
||||
static u32 sub_81C97BC(struct Pokenav1Struct *a0);
|
||||
static void sub_81C97B0(struct Pokenav1Struct *a0, u32 a1);
|
||||
static u32 sub_81C97A4(struct Pokenav1Struct *a0);
|
||||
static u32 sub_81C9798(struct Pokenav1Struct *a0);
|
||||
static u32 sub_81C96FC(struct Pokenav1Struct *a0);
|
||||
static u32 sub_81C963C(struct Pokenav1Struct *a0);
|
||||
static u32 sub_81C9600(struct Pokenav1Struct *a0);
|
||||
static u32 sub_81C9588(struct Pokenav1Struct *a0);
|
||||
static u32 sub_81C9520(struct Pokenav1Struct *a0);
|
||||
static u32 sub_81C943C(struct Pokenav1Struct *a0);
|
||||
static u32 (*sub_81C93EC(void))(struct Pokenav1Struct*);
|
||||
static void sub_81C939C(struct Pokenav1Struct *state);
|
||||
|
||||
static const u8 sLastCursorPositions[] = {2, 3, 4, 2, 5};
|
||||
|
||||
static const u8 sDescriptionIds[][6] =
|
||||
{
|
||||
{ 0, 1, 4, 4, 4, 4 },
|
||||
{ 0, 1, 2, 4, 4, 4 },
|
||||
{ 0, 1, 2, 3, 4, 4 },
|
||||
{ 5, 6, 7, 4, 4, 4 },
|
||||
{ 8, 9, 10, 11, 12, 13 },
|
||||
};
|
||||
|
||||
static u8 GetPokenavMainMenuType(void)
|
||||
{
|
||||
u8 retVal = 0;
|
||||
if (FlagGet(FLAG_ADDED_MATCH_CALL_TO_POKENAV))
|
||||
{
|
||||
retVal = 1;
|
||||
if (FlagGet(FLAG_SYS_RIBBON_GET))
|
||||
retVal = 2;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_0(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
state->menuType = GetPokenavMainMenuType();
|
||||
state->cursorPos = 0;
|
||||
state->descriptionId = 0;
|
||||
state->helpBarIndex = HELPBAR_NONE;
|
||||
sub_81C939C(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_4(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
state->menuType = GetPokenavMainMenuType();
|
||||
state->cursorPos = 2;
|
||||
state->descriptionId = 2;
|
||||
state->helpBarIndex = HELPBAR_NONE;
|
||||
sub_81C939C(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_5(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
state->menuType = GetPokenavMainMenuType();
|
||||
state->cursorPos = 3;
|
||||
state->descriptionId = 3;
|
||||
sub_81C939C(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_2(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
state->menuType = 3;
|
||||
state->cursorPos = 0;
|
||||
state->descriptionId = 5;
|
||||
state->helpBarIndex = HELPBAR_NONE;
|
||||
sub_81C939C(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_3(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
state->menuType = 4;
|
||||
state->cursorPos = sub_81C76AC();
|
||||
state->descriptionId = state->cursorPos + 8;
|
||||
state->helpBarIndex = HELPBAR_NONE;
|
||||
sub_81C939C(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void sub_81C939C(struct Pokenav1Struct *state)
|
||||
{
|
||||
switch (state->menuType)
|
||||
{
|
||||
case 0:
|
||||
SetPokenavMode(POKENAV_MODE_NORMAL);
|
||||
// fallthrough
|
||||
case 1:
|
||||
case 2:
|
||||
state->callback = sub_81C93EC();
|
||||
break;
|
||||
case 3:
|
||||
state->callback = sub_81C963C;
|
||||
break;
|
||||
case 4:
|
||||
state->callback = sub_81C96FC;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static u32 (*sub_81C93EC(void))(struct Pokenav1Struct*)
|
||||
{
|
||||
switch (GetPokenavMode())
|
||||
{
|
||||
default:
|
||||
case POKENAV_MODE_NORMAL:
|
||||
return sub_81C943C;
|
||||
case POKENAV_MODE_FORCE_CALL_READY:
|
||||
return sub_81C9520;
|
||||
case POKENAV_MODE_FORCE_CALL_EXIT:
|
||||
return sub_81C9588;
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_81C941C(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
return state->callback(state);
|
||||
}
|
||||
|
||||
void sub_81C9430(void)
|
||||
{
|
||||
FreePokenavSubstruct(1);
|
||||
}
|
||||
|
||||
static u32 sub_81C943C(struct Pokenav1Struct *a0)
|
||||
{
|
||||
if (sub_81C9814(a0))
|
||||
return 1;
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
switch (sDescriptionIds[a0->menuType][a0->cursorPos])
|
||||
{
|
||||
case 0:
|
||||
a0->helpBarIndex = gSaveBlock2Ptr->regionMapZoom ? HELPBAR_MAP_ZOOMED_IN : HELPBAR_MAP_ZOOMED_OUT;
|
||||
sub_81C97B0(a0, POKENAV_MENU_6);
|
||||
return 8;
|
||||
case 1:
|
||||
a0->menuType = 3;
|
||||
a0->cursorPos = 0;
|
||||
a0->descriptionId = sDescriptionIds[3][0];
|
||||
a0->callback = sub_81C963C;
|
||||
return 2;
|
||||
case 2:
|
||||
a0->helpBarIndex = HELPBAR_MC_TRAINER_LIST;
|
||||
sub_81C97B0(a0, POKENAV_MENU_B);
|
||||
return 8;
|
||||
case 3:
|
||||
if (CanViewRibbonsMenu())
|
||||
{
|
||||
a0->helpBarIndex = HELPBAR_RIBBONS_MON_LIST;
|
||||
sub_81C97B0(a0, POKENAV_MENU_C);
|
||||
return 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
a0->callback = sub_81C9600;
|
||||
return 6;
|
||||
}
|
||||
case 4:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 sub_81C9520(struct Pokenav1Struct *a0)
|
||||
{
|
||||
if (sub_81C9814(a0))
|
||||
return 1;
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
if (sDescriptionIds[a0->menuType][a0->cursorPos] == 2)
|
||||
{
|
||||
a0->helpBarIndex = HELPBAR_MC_TRAINER_LIST;
|
||||
sub_81C97B0(a0, POKENAV_MENU_B);
|
||||
return 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySE(SE_HAZURE);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
PlaySE(SE_HAZURE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 sub_81C9588(struct Pokenav1Struct *a0)
|
||||
{
|
||||
if (sub_81C9814(a0))
|
||||
return 1;
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
u32 v0 = sDescriptionIds[a0->menuType][a0->cursorPos];
|
||||
if (v0 != 2 && v0 != 4)
|
||||
{
|
||||
PlaySE(SE_HAZURE);
|
||||
return 0;
|
||||
}
|
||||
else if (v0 == 2)
|
||||
{
|
||||
a0->helpBarIndex = HELPBAR_MC_TRAINER_LIST;
|
||||
sub_81C97B0(a0, POKENAV_MENU_B);
|
||||
return 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 sub_81C9600(struct Pokenav1Struct *a0)
|
||||
{
|
||||
if (sub_81C9814(a0))
|
||||
{
|
||||
a0->callback = sub_81C93EC();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
{
|
||||
a0->callback = sub_81C93EC();
|
||||
return 7;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 sub_81C963C(struct Pokenav1Struct *a0)
|
||||
{
|
||||
u32 v0 = sub_81C9814(a0);
|
||||
if (v0)
|
||||
return 1;
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
switch (sDescriptionIds[a0->menuType][a0->cursorPos])
|
||||
{
|
||||
case 6:
|
||||
a0->menuType = 4;
|
||||
a0->cursorPos = v0;
|
||||
a0->descriptionId = sDescriptionIds[4][0];
|
||||
a0->callback = sub_81C96FC;
|
||||
return 4;
|
||||
case 5:
|
||||
a0->helpBarIndex = v0;
|
||||
sub_81C97B0(a0, POKENAV_MENU_7);
|
||||
return 8;
|
||||
case 7:
|
||||
PlaySE(SE_SELECT);
|
||||
sub_81C97C0(a0);
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
if (a0->cursorPos != sLastCursorPositions[a0->menuType])
|
||||
{
|
||||
a0->cursorPos = sLastCursorPositions[a0->menuType];
|
||||
a0->callback = sub_81C9798;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sub_81C97C0(a0);
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 sub_81C96FC(struct Pokenav1Struct *a0)
|
||||
{
|
||||
if (sub_81C9814(a0))
|
||||
return 1;
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
u8 v0 = sDescriptionIds[a0->menuType][a0->cursorPos];
|
||||
if (v0 != 13)
|
||||
{
|
||||
sub_81C7694(v0 - 8);
|
||||
sub_81C97B0(a0, POKENAV_MENU_8);
|
||||
a0->helpBarIndex = HELPBAR_CONDITION_MON_LIST;
|
||||
return 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sub_81C97F8(a0);
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
if (a0->cursorPos != sLastCursorPositions[a0->menuType])
|
||||
{
|
||||
a0->cursorPos = sLastCursorPositions[a0->menuType];
|
||||
a0->callback = sub_81C97A4;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sub_81C97F8(a0);
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 sub_81C9798(struct Pokenav1Struct *a0)
|
||||
{
|
||||
sub_81C97C0(a0);
|
||||
return 3;
|
||||
}
|
||||
|
||||
static u32 sub_81C97A4(struct Pokenav1Struct *a0)
|
||||
{
|
||||
sub_81C97F8(a0);
|
||||
return 5;
|
||||
}
|
||||
|
||||
static void sub_81C97B0(struct Pokenav1Struct *a0, u32 a1)
|
||||
{
|
||||
a0->unk8 = a1;
|
||||
a0->callback = sub_81C97BC;
|
||||
}
|
||||
|
||||
static u32 sub_81C97BC(struct Pokenav1Struct *a0)
|
||||
{
|
||||
return a0->unk8;
|
||||
}
|
||||
|
||||
static void sub_81C97C0(struct Pokenav1Struct *a0)
|
||||
{
|
||||
a0->menuType = GetPokenavMainMenuType();
|
||||
a0->cursorPos = 1;
|
||||
a0->descriptionId = sDescriptionIds[a0->menuType][a0->cursorPos];
|
||||
a0->callback = sub_81C943C;
|
||||
}
|
||||
|
||||
static void sub_81C97F8(struct Pokenav1Struct *a0)
|
||||
{
|
||||
a0->menuType = 3;
|
||||
a0->cursorPos = 1;
|
||||
a0->descriptionId = sDescriptionIds[3][1];
|
||||
a0->callback = sub_81C963C;
|
||||
}
|
||||
|
||||
static bool32 sub_81C9814(struct Pokenav1Struct *a0)
|
||||
{
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
if (--a0->cursorPos < 0)
|
||||
a0->cursorPos = sLastCursorPositions[a0->menuType];
|
||||
|
||||
a0->descriptionId = sDescriptionIds[a0->menuType][a0->cursorPos];
|
||||
return TRUE;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN)
|
||||
{
|
||||
a0->cursorPos++;
|
||||
if (a0->cursorPos > sLastCursorPositions[a0->menuType])
|
||||
a0->cursorPos = 0;
|
||||
|
||||
a0->descriptionId = sDescriptionIds[a0->menuType][a0->cursorPos];
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
int sub_81C9894(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
return state->menuType;
|
||||
}
|
||||
|
||||
int sub_81C98A4(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
return state->cursorPos;
|
||||
}
|
||||
|
||||
int sub_81C98B4(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
return state->descriptionId;
|
||||
}
|
||||
|
||||
u16 GetHelpBarTextId(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
return state->helpBarIndex;
|
||||
}
|
@ -475,7 +475,7 @@ static void sub_809F048(void)
|
||||
ShowBg(0);
|
||||
InitWindows(sUnknown_08510408);
|
||||
DeactivateAllTextPrinters();
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
}
|
||||
|
||||
static void CB2_ResetRtcScreen(void)
|
||||
|
@ -8,15 +8,6 @@
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
|
||||
extern const u8 RotatingTilePuzzle_Movement_ShiftRight[];
|
||||
extern const u8 RotatingTilePuzzle_Movement_ShiftDown[];
|
||||
extern const u8 RotatingTilePuzzle_Movement_ShiftLeft[];
|
||||
extern const u8 RotatingTilePuzzle_Movement_ShiftUp[];
|
||||
extern const u8 RotatingTilePuzzle_Movement_FaceRight[];
|
||||
extern const u8 RotatingTilePuzzle_Movement_FaceDown[];
|
||||
extern const u8 RotatingTilePuzzle_Movement_FaceLeft[];
|
||||
extern const u8 RotatingTilePuzzle_Movement_FaceUp[];
|
||||
|
||||
#define ROTATE_COUNTERCLOCKWISE 0
|
||||
#define ROTATE_CLOCKWISE 1
|
||||
#define ROTATE_NONE 2
|
||||
@ -34,6 +25,62 @@ struct RotatingTilePuzzle
|
||||
bool8 isTrickHouse;
|
||||
};
|
||||
|
||||
static const u8 sMovement_ShiftRight[] =
|
||||
{
|
||||
MOVEMENT_ACTION_STORE_AND_LOCK_ANIM,
|
||||
MOVEMENT_ACTION_WALK_NORMAL_RIGHT,
|
||||
MOVEMENT_ACTION_FREE_AND_UNLOCK_ANIM,
|
||||
MOVEMENT_ACTION_STEP_END
|
||||
};
|
||||
|
||||
static const u8 sMovement_ShiftDown[] =
|
||||
{
|
||||
MOVEMENT_ACTION_STORE_AND_LOCK_ANIM,
|
||||
MOVEMENT_ACTION_WALK_NORMAL_DOWN,
|
||||
MOVEMENT_ACTION_FREE_AND_UNLOCK_ANIM,
|
||||
MOVEMENT_ACTION_STEP_END
|
||||
};
|
||||
|
||||
static const u8 sMovement_ShiftLeft[] =
|
||||
{
|
||||
MOVEMENT_ACTION_STORE_AND_LOCK_ANIM,
|
||||
MOVEMENT_ACTION_WALK_NORMAL_LEFT,
|
||||
MOVEMENT_ACTION_FREE_AND_UNLOCK_ANIM,
|
||||
MOVEMENT_ACTION_STEP_END
|
||||
};
|
||||
|
||||
static const u8 sMovement_ShiftUp[] =
|
||||
{
|
||||
MOVEMENT_ACTION_STORE_AND_LOCK_ANIM,
|
||||
MOVEMENT_ACTION_WALK_NORMAL_UP,
|
||||
MOVEMENT_ACTION_FREE_AND_UNLOCK_ANIM,
|
||||
MOVEMENT_ACTION_STEP_END
|
||||
};
|
||||
|
||||
static const u8 sMovement_FaceRight[] =
|
||||
{
|
||||
MOVEMENT_ACTION_FACE_RIGHT,
|
||||
MOVEMENT_ACTION_STEP_END
|
||||
};
|
||||
|
||||
static const u8 sMovement_FaceDown[] =
|
||||
{
|
||||
MOVEMENT_ACTION_FACE_DOWN,
|
||||
MOVEMENT_ACTION_STEP_END
|
||||
};
|
||||
|
||||
static const u8 sMovement_FaceLeft[] =
|
||||
{
|
||||
MOVEMENT_ACTION_FACE_LEFT,
|
||||
MOVEMENT_ACTION_STEP_END
|
||||
};
|
||||
|
||||
static const u8 sMovement_FaceUp[] =
|
||||
{
|
||||
MOVEMENT_ACTION_FACE_UP,
|
||||
MOVEMENT_ACTION_STEP_END
|
||||
};
|
||||
|
||||
// This file's functions.
|
||||
static void SaveRotatingTileObject(u8 eventTemplateId, u8 arg1);
|
||||
static void TurnUnsavedRotatingTileObject(u8 eventTemplateId, u8 arg1);
|
||||
@ -106,19 +153,19 @@ u16 MoveRotatingTileObjects(u8 puzzleNumber)
|
||||
switch (puzzleTileNum)
|
||||
{
|
||||
case 0: // Right Arrow
|
||||
movementScript = RotatingTilePuzzle_Movement_ShiftRight;
|
||||
movementScript = sMovement_ShiftRight;
|
||||
x = 1;
|
||||
break;
|
||||
case 1: // Down Arrow
|
||||
movementScript = RotatingTilePuzzle_Movement_ShiftDown;
|
||||
movementScript = sMovement_ShiftDown;
|
||||
y = 1;
|
||||
break;
|
||||
case 2: // Left Arrow
|
||||
movementScript = RotatingTilePuzzle_Movement_ShiftLeft;
|
||||
movementScript = sMovement_ShiftLeft;
|
||||
x = -1;
|
||||
break;
|
||||
case 3: // Up Arrow
|
||||
movementScript = RotatingTilePuzzle_Movement_ShiftUp;
|
||||
movementScript = sMovement_ShiftUp;
|
||||
y = -1;
|
||||
break;
|
||||
default:
|
||||
@ -204,19 +251,19 @@ void TurnRotatingTileObjects(void)
|
||||
switch (direction)
|
||||
{
|
||||
case DIR_EAST:
|
||||
movementScript = RotatingTilePuzzle_Movement_FaceUp;
|
||||
movementScript = sMovement_FaceUp;
|
||||
objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||
break;
|
||||
case DIR_SOUTH:
|
||||
movementScript = RotatingTilePuzzle_Movement_FaceRight;
|
||||
movementScript = sMovement_FaceRight;
|
||||
objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||
break;
|
||||
case DIR_WEST:
|
||||
movementScript = RotatingTilePuzzle_Movement_FaceDown;
|
||||
movementScript = sMovement_FaceDown;
|
||||
objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||
break;
|
||||
case DIR_NORTH:
|
||||
movementScript = RotatingTilePuzzle_Movement_FaceLeft;
|
||||
movementScript = sMovement_FaceLeft;
|
||||
objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||
break;
|
||||
default:
|
||||
@ -233,19 +280,19 @@ void TurnRotatingTileObjects(void)
|
||||
switch (direction)
|
||||
{
|
||||
case DIR_EAST:
|
||||
movementScript = RotatingTilePuzzle_Movement_FaceDown;
|
||||
movementScript = sMovement_FaceDown;
|
||||
objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||
break;
|
||||
case DIR_SOUTH:
|
||||
movementScript = RotatingTilePuzzle_Movement_FaceLeft;
|
||||
movementScript = sMovement_FaceLeft;
|
||||
objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||
break;
|
||||
case DIR_WEST:
|
||||
movementScript = RotatingTilePuzzle_Movement_FaceUp;
|
||||
movementScript = sMovement_FaceUp;
|
||||
objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||
break;
|
||||
case DIR_NORTH:
|
||||
movementScript = RotatingTilePuzzle_Movement_FaceRight;
|
||||
movementScript = sMovement_FaceRight;
|
||||
objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||
break;
|
||||
default:
|
||||
|
@ -1304,7 +1304,7 @@ bool8 ScrCmd_cmdDB(struct ScriptContext *ctx)
|
||||
|
||||
if (msg == NULL)
|
||||
msg = (const u8 *)ctx->data[0];
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 1);
|
||||
AddTextPrinterParameterized(0, 1, msg, 0, 1, 0, 0);
|
||||
return FALSE;
|
||||
|
2373
src/slot_machine.c
2373
src/slot_machine.c
File diff suppressed because it is too large
Load Diff
@ -450,7 +450,7 @@ static bool32 InitStartMenuStep(void)
|
||||
sInitStartMenuData[0]++;
|
||||
break;
|
||||
case 2:
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawStdWindowFrame(sub_81979C4(sNumStartMenuActions), FALSE);
|
||||
sInitStartMenuData[1] = 0;
|
||||
sInitStartMenuData[0]++;
|
||||
@ -1314,37 +1314,37 @@ static void ShowSaveInfoWindow(void)
|
||||
|
||||
// Print region name
|
||||
yOffset = 1;
|
||||
sub_819A344(3, gStringVar4, TEXT_COLOR_GREEN);
|
||||
BufferSaveMenuText(SAVE_MENU_LOCATION, gStringVar4, TEXT_COLOR_GREEN);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, 0, yOffset, 0xFF, NULL);
|
||||
|
||||
// Print player name
|
||||
yOffset = 0x11;
|
||||
yOffset += 16;
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingPlayer, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(0, gStringVar4, color);
|
||||
BufferSaveMenuText(SAVE_MENU_NAME, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
PrintPlayerNameOnWindow(sSaveInfoWindowId, gStringVar4, xOffset, yOffset);
|
||||
|
||||
// Print badge count
|
||||
yOffset = 0x21;
|
||||
yOffset += 16;
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingBadges, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(4, gStringVar4, color);
|
||||
BufferSaveMenuText(SAVE_MENU_BADGES, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
|
||||
if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE)
|
||||
{
|
||||
// Print pokedex count
|
||||
yOffset = 0x31;
|
||||
yOffset += 16;
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingPokedex, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(1, gStringVar4, color);
|
||||
BufferSaveMenuText(SAVE_MENU_CAUGHT, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
}
|
||||
|
||||
// Print play time
|
||||
yOffset += 0x10;
|
||||
yOffset += 16;
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingTime, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(2, gStringVar4, color);
|
||||
BufferSaveMenuText(SAVE_MENU_PLAY_TIME, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
|
||||
|
@ -1206,12 +1206,12 @@ const u8 gText_UnionTradesAndBattles[] = _("UNION TRADES & BATTLES");
|
||||
const u8 gText_BerryCrush[] = _("BERRY CRUSH");
|
||||
const u8 gText_WaitingTrainerFinishReading[] = _("Waiting for the other TRAINER to\nfinish reading your TRAINER CARD.");
|
||||
const u8 gText_PokeblocksWithFriends[] = _("{POKEBLOCK}S W/FRIENDS");
|
||||
const u8 gText_Var1DarkGreyShadowLightGrey[] = _("{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}");
|
||||
const u8 gText_NumPokeblocks[] = _("{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}");
|
||||
const u8 gText_WonContestsWFriends[] = _("WON CONTESTS W/FRIENDS");
|
||||
const u8 gText_BattlePtsWon[] = _("BATTLE POINTS WON");
|
||||
const u8 gText_Var1DarkLightGreyBP[] = _("{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}BP");
|
||||
const u8 gText_NumBP[] = _("{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}BP");
|
||||
const u8 gText_BattleTower[] = _("BATTLE TOWER");
|
||||
const u8 gText_WSlashStraightSlash[] = _("W/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY} STRAIGHT/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_2}");
|
||||
const u8 gText_WinsStraight[] = _("W/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY} STRAIGHT/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_2}");
|
||||
const u8 gText_BattleTower2[] = _("BATTLE TOWER");
|
||||
const u8 gText_BattleDome[] = _("BATTLE DOME");
|
||||
const u8 gText_BattlePalace[] = _("BATTLE PALACE");
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -331,7 +331,7 @@ static u16 sub_818D65C(u16 species, u32 otId, u32 personality, bool8 isFrontPic,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u16 sub_818D6CC(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId, bool8 isTrainer)
|
||||
static u16 CreateTrainerCardSprite(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId, bool8 isTrainer)
|
||||
{
|
||||
u8 *framePics;
|
||||
|
||||
@ -366,9 +366,10 @@ u16 sub_818D834(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 pal
|
||||
return sub_818D65C(species, otId, personality, isFrontPic, paletteSlot, windowId, FALSE);
|
||||
}
|
||||
|
||||
u16 sub_818D864(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId)
|
||||
// Unused, FRLG only
|
||||
u16 CreateTrainerCardMonIconSprite(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId)
|
||||
{
|
||||
return sub_818D6CC(species, otId, personality, isFrontPic, destX, destY, paletteSlot, windowId, FALSE);
|
||||
return CreateTrainerCardSprite(species, otId, personality, isFrontPic, destX, destY, paletteSlot, windowId, FALSE);
|
||||
}
|
||||
|
||||
u16 CreateTrainerPicSprite(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag)
|
||||
@ -386,9 +387,9 @@ u16 sub_818D904(u16 species, bool8 isFrontPic, u8 paletteSlot, u8 windowId)
|
||||
return sub_818D65C(species, 0, 0, isFrontPic, paletteSlot, windowId, TRUE);
|
||||
}
|
||||
|
||||
u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId)
|
||||
u16 CreateTrainerCardTrainerPicSprite(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId)
|
||||
{
|
||||
return sub_818D6CC(species, 0, 0, isFrontPic, destX, destY, paletteSlot, windowId, TRUE);
|
||||
return CreateTrainerCardSprite(species, 0, 0, isFrontPic, destX, destY, paletteSlot, windowId, TRUE);
|
||||
}
|
||||
|
||||
u16 PlayerGenderToFrontTrainerPicId_Debug(u8 gender, bool8 getClass)
|
||||
|
2
src/tv.c
2
src/tv.c
@ -1943,7 +1943,7 @@ void sub_80EDB44(void)
|
||||
show = &gSaveBlock1Ptr->tvShows[sCurTVShowSlot];
|
||||
show->rivalTrainer.kind = TVSHOW_TODAYS_RIVAL_TRAINER;
|
||||
show->rivalTrainer.active = FALSE;
|
||||
for (i = FLAG_BADGE01_GET, nBadges = 0; i < FLAG_BADGE01_GET + 8; i ++)
|
||||
for (i = FLAG_BADGE01_GET, nBadges = 0; i < FLAG_BADGE01_GET + NUM_BADGES; i ++)
|
||||
{
|
||||
if (FlagGet(i))
|
||||
{
|
||||
|
@ -3376,7 +3376,7 @@ u8 sub_8016FF0(struct UnkStruct_Main4 * a0, u32 a1)
|
||||
|
||||
bool32 sub_8017020(const u8 *src)
|
||||
{
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 1);
|
||||
StringExpandPlaceholders(gStringVar4, src);
|
||||
AddTextPrinterWithCustomSpeedForMessage(FALSE, 1);
|
||||
@ -3400,7 +3400,7 @@ bool8 PrintOnTextbox(u8 *textState, const u8 *str)
|
||||
switch (*textState)
|
||||
{
|
||||
case 0:
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 1);
|
||||
StringExpandPlaceholders(gStringVar4, str);
|
||||
AddTextPrinterForMessage_2(TRUE);
|
||||
@ -4316,9 +4316,9 @@ void sub_8018220(u8 *unused, struct UnkStruct_URoom *arg1, bool8 arg2)
|
||||
ConvertIntToDecimalStringN(arg1->field_C0[2], trainerCard->pokemonTrades, STR_CONV_MODE_LEFT_ALIGN, 5);
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(3, arg1->field_C0[2]);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < TRAINER_CARD_PROFILE_LENGTH; i++)
|
||||
{
|
||||
CopyEasyChatWord(arg1->field_C0[i + 3], trainerCard->var_28[i]);
|
||||
CopyEasyChatWord(arg1->field_C0[i + 3], trainerCard->easyChatProfile[i]);
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(i + 4, arg1->field_C0[i + 3]);
|
||||
}
|
||||
|
||||
|
@ -47,9 +47,9 @@
|
||||
.include "src/multiboot.o"
|
||||
.include "src/mirage_tower.o"
|
||||
.include "src/berry_fix_program.o"
|
||||
.include "src/pokenav_unk_7.o"
|
||||
.include "src/pokenav_unk_10.o"
|
||||
.include "src/ereader_helpers.o"
|
||||
.include "src/pokenav_conditions_2.o"
|
||||
.include "src/pokenav_ribbons_2.o"
|
||||
.include "src/ereader_helpers.o"
|
||||
.include "src/faraway_island.o"
|
||||
.include "src/m4a_1.o"
|
||||
.include "src/agb_flash.o"
|
||||
|
Loading…
x
Reference in New Issue
Block a user