git.shiar.nl
/
wormy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
case-insensitive z80 label usage
[wormy.git]
/
wormy.z80
diff --git
a/wormy.z80
b/wormy.z80
index 754b085679741688d83b8774dc65634b44b90573..5bf22f79f92cf289ea5f6db04e10291ab8a664d7 100644
(file)
--- a/
wormy.z80
+++ b/
wormy.z80
@@
-237,15
+237,15
@@
pos2 = 4 ;level
grow = 6 ;level
died = 8 ;game:
score = 9
grow = 6 ;level
died = 8 ;game:
score = 9
-
delay
= 11
+
wdelay
= 11
lives = 12
head = 13
; �15B (wormNset)
tail = 15 ; |also@next level
storepos = 17 ; |
reserv = 18 ; |loop (race:lap|ctf:pea)
lives = 12
head = 13
; �15B (wormNset)
tail = 15 ; |also@next level
storepos = 17 ; |
reserv = 18 ; |loop (race:lap|ctf:pea)
-
left
= 19 ; |
-right = 20 ; |
+
wleft
= 19 ; |
+
w
right = 20 ; |
name = 21 ; |_
wormsize = 30 ;^mark^
name = 21 ; |_
wormsize = 30 ;^mark^
@@
-260,7
+260,7
@@
wormsize = 30 ;^mark^
start: ;turn back NOW!
nop ;and so it begins...
start: ;turn back NOW!
nop ;and so it begins...
- jp
S
tart
+ jp
codes
tart
#ifndef id2
ld bc,$5242
rst 10h
#ifndef id2
ld bc,$5242
rst 10h
@@
-324,7
+324,7
@@
yasdetect:
cal _AHL_PLUS_2_PG3 ;skip past length bytes
cal _Get_Word_ahl
ld hl,levelhead+(levelhead2*256)
cal _AHL_PLUS_2_PG3 ;skip past length bytes
cal _Get_Word_ahl
ld hl,levelhead+(levelhead2*256)
- cal
l
_cphlde
+ cal _cphlde
ret z
scf
ret
ret z
scf
ret
@@
-359,7
+359,7
@@
int_end:
;--- search levels -------------------------------------------------------------
;--- search levels -------------------------------------------------------------
-
S
tart:
+
codes
tart:
cal _runindicoff
cal _flushallmenus
cal _runindicoff
cal _flushallmenus
@@
-1020,7
+1020,7
@@
notselect
cp K_EXIT
jp z,ExitNoStats
cp K_MORE
cp K_EXIT
jp z,ExitNoStats
cp K_MORE
- jp z,
S
tart
+ jp z,
codes
tart
psh af
cal menupos
cal loadgamecar
psh af
cal menupos
cal loadgamecar
@@
-1543,7
+1543,7
@@
createwormsloop:
ld (hl),b ;+score+1=0
inc hl
ld c,2
ld (hl),b ;+score+1=0
inc hl
ld c,2
- ld (hl),c ;+delay=2
+ ld (hl),c ;+
w
delay=2
inc hl
ld (hl),3 ;+lives=x
wormbeglives =$-1
inc hl
ld (hl),3 ;+lives=x
wormbeglives =$-1
@@
-1593,11
+1593,11
@@
client:
; 2 = link = 0 + link (name1)
; 3 = worm #2 = #2 + local(name2)
; 4 = link = 0 + link (name2)
; 2 = link = 0 + link (name1)
; 3 = worm #2 = #2 + local(name2)
; 4 = link = 0 + link (name2)
- ld e,worm3+left&255
+ ld e,worm3+
w
left&255
cal moveworm2 ;3=2
ld l,worm1+name&255
cal sendworm
cal moveworm2 ;3=2
ld l,worm1+name&255
cal sendworm
- ld l,worm2+left&255
+ ld l,worm2+
w
left&255
cal linkworm ;worm2+4 over link
pop hl ;loadgamecar
pop de ;leveldata
cal linkworm ;worm2+4 over link
pop hl ;loadgamecar
pop de ;leveldata
@@
-1626,21
+1626,21
@@
linkerror:
;--- set/send worms ------------------------------------------------------------
moveworm2:
;--- set/send worms ------------------------------------------------------------
moveworm2:
- ld hl,worm2+left
-moveworm: ;hl=wormN+left
+ ld hl,worm2+
w
left
+moveworm: ;hl=wormN+
w
left
ld d,worm1/256
ld bc,11
ldir ;keys+name worm(de) = worm(hl)
ret
ld d,worm1/256
ld bc,11
ldir ;keys+name worm(de) = worm(hl)
ret
-linkworm: ;hl=wormN+left
- ld (hl),0 ;worm1|2+left
+linkworm: ;hl=wormN+
w
left
+ ld (hl),0 ;worm1|2+
w
left
inc hl
inc hl ;+name
ld b,9
cal recvstuff
ld bc,worm3-worm1-11 ;+2
add hl,bc ;b=0
inc hl
inc hl ;+name
ld b,9
cal recvstuff
ld bc,worm3-worm1-11 ;+2
add hl,bc ;b=0
- ld (hl),b ;worm3|4+left
+ ld (hl),b ;worm3|4+
w
left
inc hl
inc hl ;+name
ld b,9
inc hl
inc hl ;+name
ld b,9
@@
-1665,12
+1665,12
@@
host:
; 2 = worm #1 = #1 + local(name1)
; 3 = link = 0 + link (name2)
; 4 = worm #2 = #2 + local(name2)
; 2 = worm #1 = #1 + local(name1)
; 3 = link = 0 + link (name2)
; 4 = worm #2 = #2 + local(name2)
- ld e,worm4+left&255
+ ld e,worm4+
w
left&255
cal moveworm2 ;4=2
cal moveworm2 ;4=2
- ld e,worm2+left&255
- ld hl,worm1+left
+ ld e,worm2+
w
left&255
+ ld hl,worm1+
w
left
cal moveworm ;2=1
cal moveworm ;2=1
- ld l,worm1+left&255
+ ld l,worm1+
w
left&255
cal linkworm ;worm1+3 over link
ld l,worm2+name&255
cal sendworm
cal linkworm ;worm1+3 over link
ld l,worm2+name&255
cal sendworm
@@
-2021,7
+2021,7
@@
ReadyDelay:
GameLoop:
ld bc,(worm1+pos) ;camera worm #1
GameLoop:
ld bc,(worm1+pos) ;camera worm #1
- ld a,(worm1+left)
+ ld a,(worm1+
w
left)
or a ;if #1 not over link
jr nz,showfield
ld bc,(worm2+pos) ;otherwise view from #2
or a ;if #1 not over link
jr nz,showfield
ld bc,(worm2+pos) ;otherwise view from #2
@@
-2319,10
+2319,10
@@
displayWormStats:
psh bc
psh hl
psh bc
psh hl
- ld bc,left-died
- add hl,bc ;+left
+ ld bc,
w
left-died
+ add hl,bc ;+
w
left
xor a
xor a
- cp (hl) ;left=0 = link
+ cp (hl) ;
w
left=0 = link
jr nz,NoLinkIndic
ld a,9
ld (_curCol),a
jr nz,NoLinkIndic
ld a,9
ld (_curCol),a
@@
-2565,10
+2565,10
@@
respawndue:
ld a,h ;previous
cp l ;changed?
ret z
ld a,h ;previous
cp l ;changed?
ret z
- ld (ix+delay),a ;=0
+ ld (ix+
w
delay),a ;=0
ret
saverespawncounter:
ret
saverespawncounter:
- ld (ix+delay),a
+ ld (ix+
w
delay),a
jr inputcall
chkkey: ;key=a
jr inputcall
chkkey: ;key=a
@@
-2603,7
+2603,7
@@
inkeys: ;use jp not call!
turnright =$-1
ld l,a
notright:
turnright =$-1
ld l,a
notright:
- ld a,(ix+right)
+ ld a,(ix+
w
right)
cal chkkey
ret nc
ld a,l
cal chkkey
ret nc
ld a,l
@@
-2612,7
+2612,7
@@
turnleft =$-1
ld l,a
ret
inputcall:
ld l,a
ret
inputcall:
- ld a,(ix+left)
+ ld a,(ix+
w
left)
or a
jr z,inlink ;input by link
cal inkeys ;input by keys
or a
jr z,inlink ;input by link
cal inkeys ;input by keys
@@
-2640,7
+2640,7
@@
HandleWorm:
or a
ret nz ;live limit
alive:
or a
ret nz ;live limit
alive:
- ld a,(ix+delay)
+ ld a,(ix+
w
delay)
dec a
jp nz,respawncheck
dec a
jp nz,respawncheck
@@
-3039,7
+3039,7
@@
wormset2grow:
pop hl ;<<call hitworm
pop hl ;<<call HandleWorm
pop hl ;<<$some other call
pop hl ;<<call hitworm
pop hl ;<<call HandleWorm
pop hl ;<<$some other call
- ld (ix+delay),2
+ ld (ix+
w
delay),2
jp Nextlevel
chkpeahit: ;bc=ownpos;hl=peapos (destr:ad)
jp Nextlevel
chkpeahit: ;bc=ownpos;hl=peapos (destr:ad)
@@
-3133,7
+3133,6
@@
mmldir5:
wormdead:
pop hl ;<<call
wormdead:
pop hl ;<<call
-WormDead:
ld a,2
ld (flashtime),a
#ifdef w00t
ld a,2
ld (flashtime),a
#ifdef w00t
@@
-3142,7
+3141,7
@@
WormDead:
nop
.org $+1
#endif
nop
.org $+1
#endif
- ld (ix+delay),rspawndelay
+ ld (ix+
w
delay),rspawndelay
thislevel =$+1
ld hl,0
thislevel =$+1
ld hl,0
@@
-4158,7
+4157,7
@@
sendnewpeaoverlink:
ld a,(gamecar)
rra ;and _datalink
ret nc ;no link
ld a,(gamecar)
rra ;and _datalink
ret nc ;no link
- ld a,(worm1+left)
+ ld a,(worm1+
w
left)
or a
jr z,receivenewpeaoverlink
ld c,l ;send pea's pos
or a
jr z,receivenewpeaoverlink
ld c,l ;send pea's pos