pokecrystal-board/engine/events/pokepic.asm
2024-02-11 00:16:00 +01:00

49 lines
854 B
NASM

Pokepic::
ld hl, PokepicMenuHeader
call CopyMenuHeader
call MenuBox
call UpdateSprites
call ApplyTilemap
ld b, CGB_POKEPIC
call GetCGBLayout
xor a
ldh [hBGMapMode], a
ld a, [wCurPartySpecies]
ld [wCurSpecies], a
call GetBaseData
ld de, vTiles1
predef GetMonFrontpic
ld a, [wMenuBorderTopCoord]
inc a
ld b, a
ld a, [wMenuBorderLeftCoord]
inc a
ld c, a
call Coord2Tile
ld a, $80
ldh [hGraphicStartTile], a
lb bc, 7, 7
predef PlaceGraphic
call WaitBGMap
ret
ClosePokepic::
ld hl, PokepicMenuHeader
call CopyMenuHeader
call ClearMenuBoxInterior
call WaitBGMap
call GetMemCGBLayout
xor a
ldh [hBGMapMode], a
call LoadOverworldTilemapAndAttrmapPals
call ApplyTilemap
call UpdateSprites
call LoadStandardFont
ret
PokepicMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 6, 4, 14, 13
dw NULL
db 1 ; default option