-
Notifications
You must be signed in to change notification settings - Fork 1
/
whimsy.asm
76 lines (63 loc) · 883 Bytes
/
whimsy.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
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;
.module WHIMSY
updatecloud:
ld a,(frames)
and 127
ret nz
ld a,(cldfrm)
inc a
and 63
ld (cldfrm),a
ld hl,clouds
call adda2hl
ld de,dfile+1+CLDSTART1
ld bc,CLDLEN1
ldir
inc hl
inc hl
inc hl
inc hl
inc de
inc de
inc de
inc de
ld bc,CLDLEN2
ldir
ret
lorryfill:
ld a,(fuelchar) ; show fuel pumping into lorry
xor FUEL1 ^ FUEL2
ld (fuelchar),a
ld (dfile+FUELLING_OFFS),a
ret
showwinch:
ld a,(winchframe)
and 3
rlca
ld hl,winchanim
call adda2hl
ld b,(hl)
inc hl
ld c,(hl)
ld hl,dfile+WINCH_OFFS
ld (hl),b
inc hl
ld (hl),c
ret
invertscreen:
ld hl,dfile
ld bc,33*24
_inverter:
ld a,(hl)
cp $76
jr z,_noinvert
xor $80
ld (hl),a
_noinvert:
inc hl
dec bc
ld a,b
or c
jr nz,_inverter
ret