jep-hack/engine/battle/menu.asm
Llinos Evans d3fbd1f846 Safari Game battle type & bug fix
This adds the restoration of the Safari Zone from Pokemon October. There isn't a proper place for this yet, but there will be soon!

It seems to have issues with tiles, which I am assuming to either be the tilemap clearing or something relating to Zeta's custom ball palettes, since I had to add the Safari Ball. Can you get to that, @ZetaNull?

2ff835730b

also fixed the unnumbered route errors.
2024-07-21 23:36:56 +01:00

101 lines
1.9 KiB
NASM
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

LoadBattleMenu:
ld hl, BattleMenuHeader
call LoadMenuHeader
ld a, [wBattleMenuCursorPosition]
ld [wMenuCursorPosition], a
call InterpretBattleMenu
ld a, [wMenuCursorPosition]
ld [wBattleMenuCursorPosition], a
call ExitMenu
ret
SafariBattleMenu:
ld hl, SafariBattleMenuDataHeader
call LoadMenuHeader
jr CommonBattleMenu
ContestBattleMenu:
ld hl, ContestBattleMenuHeader
call LoadMenuHeader
; fallthrough
CommonBattleMenu:
ld a, [wBattleMenuCursorPosition]
ld [wMenuCursorPosition], a
call _2DMenu
ld a, [wMenuCursorPosition]
ld [wBattleMenuCursorPosition], a
call ExitMenu
ret
BattleMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 8, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .MenuData
db 1 ; default option
.MenuData:
db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags
dn 2, 2 ; rows, columns
db 6 ; spacing
dba .Text
dbw BANK(@), NULL
.Text:
db "FIGHT@"
db "<PKMN>@"
db "PACK@"
db "RUN@"
SafariBattleMenuDataHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .MenuData
db 1 ; default option
.MenuData:
db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags
dn 2, 2 ; rows, columns
db 11 ; spacing
dba .Text
dba .PrintSafariBallsRemaining
.Text:
db "BALL×  @" ; "SAFARI BALL× @"
db "BAIT@" ; "THROW BAIT"
db "ROCK@" ; "THROW ROCK"
db "RUN@" ; "RUN"
.PrintSafariBallsRemaining:
hlcoord 7, 14
ld de, wSafariBallsRemaining
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum
ret
ContestBattleMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 2, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .MenuData
db 1 ; default option
.MenuData:
db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags
dn 2, 2 ; rows, columns
db 12 ; spacing
dba .Text
dba .PrintParkBallsRemaining
.Text:
db "FIGHT@"
db "<PKMN>@"
db "PARKBALL× @"
db "RUN@"
.PrintParkBallsRemaining:
hlcoord 13, 16
ld de, wParkBallsRemaining
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum
ret