pokecrystal/engine/battle/menu.asm

101 lines
2.0 KiB
NASM
Raw Normal View History

2018-06-24 14:09:41 +00:00
LoadBattleMenu:
ld hl, BattleMenuHeader
call LoadMenuHeader
ld a, [wBattleMenuCursorPosition]
ld [wMenuCursorPosition], a
2015-12-15 23:59:49 +00:00
call InterpretBattleMenu
ld a, [wMenuCursorPosition]
ld [wBattleMenuCursorPosition], a
2015-12-13 22:11:58 +00:00
call ExitMenu
ret
SafariBattleMenu: ; unreferenced
2020-10-05 15:24:47 +00:00
ld hl, SafariBattleMenuHeader
call LoadMenuHeader
2020-10-05 15:24:47 +00:00
jr CommonBattleMenu
2015-12-13 22:11:58 +00:00
2018-06-24 14:09:41 +00:00
ContestBattleMenu:
2020-10-05 15:24:47 +00:00
ld hl, ContestBattleMenuHeader
call LoadMenuHeader
; fallthrough
2020-10-05 15:24:47 +00:00
CommonBattleMenu:
ld a, [wBattleMenuCursorPosition]
ld [wMenuCursorPosition], a
2015-12-15 23:59:49 +00:00
call _2DMenu
ld a, [wMenuCursorPosition]
ld [wBattleMenuCursorPosition], a
2015-12-13 22:11:58 +00:00
call ExitMenu
ret
2018-06-24 14:09:41 +00:00
BattleMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 8, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
2020-10-05 15:24:47 +00:00
dw .MenuData
2015-12-13 22:11:58 +00:00
db 1 ; default option
2020-10-05 15:24:47 +00:00
.MenuData:
db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags
2015-12-13 22:11:58 +00:00
dn 2, 2 ; rows, columns
db 6 ; spacing
2020-10-05 15:24:47 +00:00
dba .Text
dbw BANK(@), NULL
2015-12-13 22:11:58 +00:00
2020-10-05 15:24:47 +00:00
.Text:
2015-12-13 22:11:58 +00:00
db "FIGHT@"
db "<PKMN>@"
db "PACK@"
db "RUN@"
2020-10-05 15:24:47 +00:00
SafariBattleMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
2020-10-05 15:24:47 +00:00
dw .MenuData
2015-12-13 22:11:58 +00:00
db 1 ; default option
2020-10-05 15:24:47 +00:00
.MenuData:
db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags
2015-12-13 22:11:58 +00:00
dn 2, 2 ; rows, columns
db 11 ; spacing
2020-10-05 15:24:47 +00:00
dba .Text
dba .PrintSafariBallsRemaining
2015-12-13 22:11:58 +00:00
2020-10-05 15:24:47 +00:00
.Text:
db "サファりボール×  @" ; "SAFARI BALL× @"
2015-12-13 22:11:58 +00:00
db "エサをなげる@" ; "THROW BAIT"
db "いしをなげる@" ; "THROW ROCK"
db "にげる@" ; "RUN"
2020-10-05 15:24:47 +00:00
.PrintSafariBallsRemaining:
2015-12-13 22:11:58 +00:00
hlcoord 17, 13
ld de, wSafariBallsRemaining
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum
ret
2020-10-05 15:24:47 +00:00
ContestBattleMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 2, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
2020-10-05 15:24:47 +00:00
dw .MenuData
2015-12-13 22:11:58 +00:00
db 1 ; default option
2020-10-05 15:24:47 +00:00
.MenuData:
db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags
2015-12-13 22:11:58 +00:00
dn 2, 2 ; rows, columns
db 12 ; spacing
2020-10-05 15:24:47 +00:00
dba .Text
dba .PrintParkBallsRemaining
2015-12-13 22:11:58 +00:00
2020-10-05 15:24:47 +00:00
.Text:
2015-12-13 22:11:58 +00:00
db "FIGHT@"
db "<PKMN>@"
2015-12-13 22:11:58 +00:00
db "PARKBALL× @"
db "RUN@"
2020-10-05 15:24:47 +00:00
.PrintParkBallsRemaining:
2015-12-13 22:11:58 +00:00
hlcoord 13, 16
ld de, wParkBallsRemaining
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum
ret