-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpanel.asm
112 lines (87 loc) · 1.53 KB
/
panel.asm
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
draw_panel
ld ix, panel_item
call draw_item
ld ix, chicken_item
call draw_item
SELECT_BANK sprite_bank_config
call show_lives
SELECT_BANK item_bank_config
ret
show_lives
ld hl, 246
ld de, (scr_addr_table)
add hl, de
ld a, (hl)
inc hl
ld h, (hl)
ld l, a
ld bc, 0x0032 ; col
add hl, bc
ld b, 3
lives_loop
push hl
push bc
ld de, (selected_sprite_frame)
call draw_player_entry2
pop bc
pop hl
ld de, player_width - 1
add hl, de
djnz lives_loop
ret
remove_life
ld hl, 246
ld de, (scr_addr_table)
add hl, de
ld a, (hl)
inc hl
ld h, (hl)
ld l, a
ex de, hl
ld a, (num_lives)
ld l, a
ld h, 0
add hl, hl
ld bc, life_table
add hl, bc
ld a, (hl)
inc hl
ld h, (hl)
ld l, a
add hl, de
ld a, (actual_player_height)
ld b, a
clear_life_loop
push hl
push hl
ld (hl), 0
inc hl
ld (hl), 0
inc hl
ld (hl), 0
inc hl
ld (hl), 0
pop hl
ld a, h
xor 0x40
ld h, a
ld (hl), 0
inc hl
ld (hl), 0
inc hl
ld (hl), 0
inc hl
ld (hl), 0
pop hl
GET_NEXT_SCR_LINE
djnz clear_life_loop
ret
life_table
defw 50, 54, 58
chicken_item
; item x y rot
defb 0x13, 0x00, 0x00, 0xca, 0x78, 0x00
carcass_item
defb 0x14, 0x00, 0x00, 0xe8, 0x70, 0x00
panel_item
defb 0x04, 0x00, 0x00, 0xc2, 192, 0x00 ; y is bottom row of item...