49 lines
844 B
NASM
Raw Normal View History

2018-06-24 16:09:41 +02:00
Pokepic::
ld hl, PokepicMenuHeader
call CopyMenuHeader
2016-01-29 00:57:06 -05:00
call MenuBox
call UpdateSprites
call ApplyTilemap
ld b, SCGB_POKEPIC
call GetSGBLayout
xor a
ldh [hBGMapMode], a
2018-01-23 17:39:09 -05:00
ld a, [wCurPartySpecies]
ld [wCurSpecies], a
2016-01-29 00:57:06 -05:00
call GetBaseData
2017-12-28 13:32:33 +01:00
ld de, vTiles1
predef GetMonFrontpic
2016-01-29 00:57:06 -05:00
ld a, [wMenuBorderTopCoord]
inc a
ld b, a
ld a, [wMenuBorderLeftCoord]
inc a
ld c, a
call Coord2Tile
ld a, $80
ldh [hGraphicStartTile], a
2016-01-29 00:57:06 -05:00
lb bc, 7, 7
predef PlaceGraphic
2016-01-29 00:57:06 -05:00
call WaitBGMap
ret
2018-06-24 16:09:41 +02:00
ClosePokepic::
ld hl, PokepicMenuHeader
call CopyMenuHeader
2016-01-29 00:57:06 -05:00
call ClearMenuBoxInterior
call WaitBGMap
call GetMemSGBLayout
xor a
ldh [hBGMapMode], a
2016-01-29 00:57:06 -05:00
call OverworldTextModeSwitch
call ApplyTilemap
call UpdateSprites
call LoadStandardFont
ret
PokepicMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 6, 4, 14, 13
2016-01-29 00:57:06 -05:00
dw NULL
db 1 ; default option