2023-08-29 09:33:20 -07:00
|
|
|
_LoadHUD::
|
|
|
|
jumptable .Jumptable, wWhichHUD
|
|
|
|
|
|
|
|
.Jumptable:
|
|
|
|
; entries correspond to HUD_* constants (see constants/gfx_constants.asm)
|
|
|
|
table_width 2, _LoadHUD.Jumptable
|
|
|
|
dw .None
|
|
|
|
dw _LoadOverworldHUDTilemapAndAttrmap
|
|
|
|
assert_table_length NUM_HUD_TYPES + 1
|
|
|
|
|
|
|
|
.None:
|
|
|
|
ret
|
|
|
|
|
|
|
|
_LoadOverworldHUDTilemapAndAttrmap:
|
|
|
|
call _LoadOverworldHUDAttrmap
|
|
|
|
; fallthrough
|
|
|
|
|
|
|
|
_LoadOverworldHUDTilemap:
|
|
|
|
; overworld HUD reads SCREEN_WIDTH tiles from wOverworldHUDTiles
|
|
|
|
ld hl, wOverworldHUDTiles
|
|
|
|
decoord 0, 0, wTilemap
|
|
|
|
ld bc, wOverworldHUDTilesEnd - wOverworldHUDTiles ; SCREEN_WIDTH
|
|
|
|
jp CopyBytes
|
|
|
|
|
|
|
|
_LoadOverworldHUDAttrmap:
|
|
|
|
hlcoord 0, 0, wAttrmap
|
|
|
|
ld bc, SCREEN_WIDTH
|
|
|
|
ld a, PAL_BG_TEXT | PRIORITY
|
|
|
|
jp ByteFill
|
2023-08-30 10:23:51 -07:00
|
|
|
|
|
|
|
_ConstructOverworldHUDTilemap::
|
|
|
|
ld hl, .Tilemap
|
|
|
|
ld de, wOverworldHUDTiles
|
|
|
|
ld bc, .TilemapEnd - .Tilemap ; SCREEN_WIDTH
|
|
|
|
call CopyBytes
|
|
|
|
ret
|
|
|
|
|
|
|
|
.Tilemap:
|
|
|
|
db "▶- ▶- ▶ ▶ "
|
|
|
|
.TilemapEnd:
|
|
|
|
assert .TilemapEnd - .Tilemap == wOverworldHUDTilesEnd - wOverworldHUDTiles
|