1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
LoadBillboardPicture: ; 0xf178
; Loads a billboard picture's tiles into VRAM
; input: a = billboard picture id
push hl
ld c, a
ld b, $0
sla c
add c ; a has been multplied by 3 becuase entires in BillboardPicturePointers are 3 bytes long
ld c, a
ld hl, BillboardPicturePointers
add hl, bc
ld a, [hli]
ld c, a
ld a, [hli]
ld b, a
ld a, [hl]
ld h, b
ld l, c
ld de, vTilesSH tile $10 ; destination address to copy the tiles
ld bc, $180 ; billboard pictures are $180 bytes
call LoadVRAMData ; loads the tiles into VRAM
pop hl
ret
LoadBillboardOffPicture: ; 0xf196
; Loads the dimly-lit "off" version of a billboard picture into VRAM
; Input: a = billboard picture id
push hl
ld c, a
ld b, $0
sla c
add c
ld c, a
ld hl, BillboardPicturePointers
add hl, bc
ld a, [hli]
ld c, a
ld a, [hli]
ld b, a
ld a, [hl]
ld h, b
ld l, c
ld bc, $0180 ; get the address of the "off" version of the picture
add hl, bc
ld de, vTilesSH tile $10
ld bc, $0180
call LoadVRAMData
pop hl
ret
INCLUDE "data/billboard/billboard_pic_pointers.asm"
LoadGreyBillboardPaletteData: ; 0xf269
ld a, [hGameBoyColorFlag]
and a
jr z, .loadPaletteMap
ld a, BANK(StageRedFieldBottomBGPalette5) ; also used in blue stage
ld hl, StageRedFieldBottomBGPalette5
ld de, $0030
ld bc, $0008
call Func_7dc
.loadPaletteMap
ld a, BANK(GreyBillboardPaletteMap)
ld de, GreyBillboardPaletteMap
hlCoord 7, 4, vBGMap
call LoadBillboardPaletteMap
ret
GreyBillboardPaletteMap:
db $06, $06, $06, $06, $06, $06
db $06, $06, $06, $06, $06, $06
db $06, $06, $06, $06, $06, $06
db $06, $06, $06, $06, $06, $06
|