;------- data storage -------
;-----------------------------
-leveldata = $EA00 ;size< $400
-ScrBuffer = $8100 ;size=$2000 (32x256)
- ;->mod$800
-templevels = $BC00 ;size= 3*$10
-DispBuffer = $BC00 ;size= $390 (16x57)
-SinCosTable = $B500 ;size= $100 (4x64)
-
-worm1 = $B400
-worm2 = $B41E
-worm3 = $B43C
-worm4 = $B45A
-ball1 = $B478
-
-resbit = 2 ;and%11111011
-worm1p = $B000 ;%10110000 -$B3FF
-worm2p = $B800 ;%10111000 -$BBFF
-worm3p = $F000 ;%11110000 -$F3FF
-worm4p = $A800 ;$E800=%11101000 ;$D748+$1000+
-
-WormVersion = 088
+;--- permanent
+
+resbit = 2 ;and%111110**
+
+ScrBuffer = $8820 ;-A7FF (20*FF=1FE0)
+worm1p = $A800 ;-ABFF (400) %10101O00
+worm1 = $AC00 ;-AC1D (30d)
+worm2 = $AC1E ;-AC3B (1E)
+worm3 = $AC3C ;-AC59 (1E)
+worm4 = $AC5A ;-AC77 (1E)
+balls = $AC78 ;-ACFF (3x45d)
+SinCosTable = $AD00 ;-AE00 (4x40)
+ ;free $AE01 ;-AFFF (1FF)
+worm2p = $B000 ;-B3FF (400) %10110O00
+DispBuffer = $B400 ;-B790 (10x57d)
+ ;free $B791 ;-B7FF (6F)
+worm3p = $B800 ;-BBFF (400) %10111O00
+ ;free $BC00 ;-BFFF (400)
+
+ ;program $D748 ;-E7FF (106D+4A)
+ ;free $E800 ;-EFFF (800)
+worm4p = $F000 ;-F3FF (400) %11110O00
+leveldata = $F400 ;-FA70 (<=671)
+
+;--- temporary
+
+templevels = $B400 ;(3*levelstr_on_calc)
;-----------------------------
;------- program start -------
.org _asm_exec_ram
+WormVersion = 089
+
start:
nop
jp Start
.db %11101111,%00001111
.db %11000011,%10000000
-levelhead = '8'
-levelhead2 = '9' ;worm levels header = "89"
+levelhead = 'w'
+levelhead2 = 89 ;worm levels header = "89"
Start:
ld (SpSave),sp
ld hl,$BFFF ;VAT start
ld bc,templevels
searchloop:
- ld de,(_PTEMP_END+1)
+ ld de,(_PTEMP_END+1) ;VAT end
or a ;nc
sbc hl,de ;hl<de?
jr c,searchcomplete
cp $0C ;string
jr z,stringfound
searchnext:
+ cal _RAM_PAGE_7
pop hl
dec hl ;5x
dec hl
ld a,l
ld (bc),a
inc bc
- cal _RAM_PAGE_7
jr searchnext
loadgametype:
changeworms:
cal _clrWindow
+ ld hl,txtName
+ cal _puts ;"Enter name player "
ld a,(Gametype)
cp 2
ld a,1
jr c,wormnrname
ld a,(nrworms)
wormnrname:
+ add a,'0'
+ cal _putc
+ sub '0'
add a,a ;2x
ld e,a
add a,a ;4x
jp DisplayMenu
entername:
+ ld h,1
+ ld l,h
+ ld (_curRow),hl
ld (namelength),a
enternameloop:
ld a,'_'
namelength:
.db 0
chartable:
- .db 0,"!<>^",0,0,0,0
+ .db 0,".<>!",0,0,0,0
.db 0,"xtoje0",0 ;enter..clear
.db " wsnid9",0 ;(-)..custom
.db "zvrmhc8",0 ;dot..del
- .db "yuqlgb7*" ;0..xvar
+ .db "yuqlgb7#" ;0..xvar
.db 0,"-pkfa6'" ;on..alpha
- .db "54321.",0,0 ;F5..more
+ .db "54321*",0,0 ;F5..more
;--proc
add a,c
ld c,a
ld b,0
- ld de,ball1
+ ld de,balls
ldir
toobad_noballs:
WormDead:
ld a,2
ld (flashtime),a
- ld a,respawndelay
- ld (ix+delay),a
+ ld (ix+delay),respawndelay
thislevel =$+1
ld de,0
ld hl,0
hiscrposhl =$-2
ret z ;(Gametype)=0
- cal _INC_PTR_AHL
+ cal _AHL_PLUS_2_PG3
ret
;-----------------------------
or a
ret z
- ld hl,ball1
+ ld hl,balls
ld b,a
handleballs
psh bc
;---------- data -------------
;-----------------------------
-TrigPrecalc:
-.db 0, 3, 6, 9, 12, 15, 18, 21
-.db 24, 27, 30, 33, 36, 39, 42, 45
-.db 48, 51, 54, 57, 59, 62, 65, 67
-.db 70, 73, 75, 78, 80, 82, 85, 87
-.db 89, 91, 94, 96, 98,100,102,103
-.db 105,107,108,110,112,113,114,116
-.db 117,118,119,120,121,122,123,123
-.db 124,125,125,126,126,126,126,126
-.db 127
-
txtWelcome: .db "Welcome to Worm!! ",
.db "by Shiar",0
.db "Have fun!",0 ;4th menu item
.db "Race ",0 ;6
.db "CTF ",0 ;7
.db "Domination",0 ;(>=8)
+txtName: .db "Enter name player ",0
txtWaiting: .db "Waiting...",0
-txtReceive: .db "Receiving...",0
+txtReceive: .db "Receiving..." ;,0
+
+TrigPrecalc:
+.db 0, 3, 6, 9, 12, 15, 18, 21
+.db 24, 27, 30, 33, 36, 39, 42, 45
+.db 48, 51, 54, 57, 59, 62, 65, 67
+.db 70, 73, 75, 78, 80, 82, 85, 87
+.db 89, 91, 94, 96, 98,100,102,103
+.db 105,107,108,110,112,113,114,116
+.db 117,118,119,120,121,122,123,123
+.db 124,125,125,126,126,126,126,126
+.db 127
txtLevel: .db "Level ",0
txtWorms: .db "Worms: 0",0 ;follows txtLevel
.dw LevelDefM,LevelDefM
.dw LevelDefM,LevelDefM
.dw LevelDefM,LevelDefM
-nrlevels: .db 1,1,1,1,1,1,1,1
+nrlevels: .db 2,2,2,2,2,2,2,2
worm1set: .dw worm1p,worm1p
.db 3,0,%01111110,%10,%100 ;< >
-worm1name: .db "Left ",0
+worm1name: .db "worm #01",0
worm2set: .dw worm2p,worm2p
.db 3,0,%00111111,%10000,%1000 ;f1 f2
-worm2name: .db "Right ",0
+worm2name: .db "worm #02",0
worm3set: .dw worm3p,worm3p
.db 3,0,%01011111,%10,%100 ;sto ,
-worm3name: .db "Top ",0
+worm3name: .db "worm #03",0
worm4set: .dw worm4p,worm4p
.db 3,0,%01111101,%10,%1 ;enter +
-worm4name: .db "Bottom ",0
+worm4name: .db "worm #04",0
hipeaworm: .dw 0
end:
name = 21 ;game
wormsize = 30
-respawndelay = 40
+respawndelay = 80
maxnamelength = 9
;-----------------------------