; Title : Worm
-; Version : 89%
+; Version : 90%
; Release Date : april 2000???
; Filename : worm.86p (4kb)
; Author(s) : Shiar
;----------- TO-DO -----------
;-----------------------------
-; 89% = DONE
+; 90% = DONE
; 3% * linkplay
-; 1% * titlescreen
; 2% * make linkplay available for all gametypes (not just deathmatch)
; * game types:
; 1% * ctf: take enemy flag (right-bottom) and return to your flag (left-top)
;-----------------------------
;-----------------------------
+#define buffer ;use display buffer (otherwise write directly to screen)
+
#define cal call
#define psh push
#define dnz djnz
_mm_ldir = $52ED ;24bit ldir
_RAM_PAGE_1 = $47E3 ;set $8000+ to page 1
_RAM_PAGE_7 = $47F3
-_PTEMP_END = $D29A
+_PTEMP_END = $D29A ;end of VAT
_load_ram_ahl = $462F ;ahl->page+hl
_writeb_inc_ahl = $5567 ;ld (ahl),c
;--- 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)
+worm2p = $A800 ;-ABFF (400) %10101O00
+worm1 = $AC00 ;-AC1D (31d)
+worm2 = $AC1F ;-AC3B (1F)
+worm3 = $AC3E ;-AC59 (1F)
+worm4 = $AC5D ;-AC77 (1F)
+balls = $AC7C ;-ACFF (3x43d)
SinCosTable = $AD00 ;-AE00 (4x40)
;free $AE01 ;-AFFF (1FF)
-worm2p = $B000 ;-B3FF (400) %10110O00
-DispBuffer = $B400 ;-B790 (10x57d)
- ;free $B791 ;-B7FF (6F)
+worm1p = $B000 ;-B7FF (800) %1011O000
worm3p = $B800 ;-BBFF (400) %10111O00
- ;free $BC00 ;-BFFF (400)
+ ;free $BF91 ;-BFFF (6F)
;program $D748 ;-E7FF (106D+4A)
;free $E800 ;-EFFF (800)
worm4p = $F000 ;-F3FF (400) %11110O00
leveldata = $F400 ;-FA70 (<=671)
+peaspos = $AE01
+
;--- temporary
-templevels = $B400 ;(3*levelstr_on_calc)
+templevels = $BC00 ;(3*strings) @init
+namelength = $BC00 ;(1) @menu
+#ifdef buffer
+DispBuffer = $BC00 ;(10x57d) @game
+#else
+DispBuffer = $FC70
+#endif
;-----------------------------
;------- program start -------
.org _asm_exec_ram
-WormVersion = 089
+WormVersion = 090
start:
nop
.dw WormIcon
WormMsg:
- .db "WORM by SHIAR -- pre-beta 89%",0
+ .db "WORM by SHIAR -- pre-beta 90%",0
WormIcon:
.db 9,2
.db %10010110,%01101111
.db %11000011,%10000000
levelhead = 'w'
-levelhead2 = 89 ;worm levels header = "89"
+levelhead2 = 90 ;worm levels header = "90"
Start:
ld (SpSave),sp
cal _runindicoff
cal _flushallmenus
- cal _clrLCD
cal _RAM_PAGE_7
ld hl,$BFFF ;VAT start
or a
sbc hl,bc
pop hl
- jp z,levelloaded ;no ext files
+ jp z,_clrWindow ;no ext files: exit
dispnextlevel:
cal _RAM_PAGE_1
psh hl
cal _clrWindow
- ld a,4
+ ld a,2
ld (_curRow),a
+ ld hl,txtLevsel
+ cal _puts ;"< Select levels: >"
+ ld hl,$0004
+ ld (_curRow),hl
pop hl
ld a,(hl)
cp 255
ld (curlevel),a
DisplayMenu:
cal _clrWindow
- ld hl,txtWelcome
- cal _puts
+ ld de,$FC42 ;(10,2)
+ ld hl,wtPicture
+ ld a,16 ;height
+disptitleloop:
+ ld bc,8 ;width
+ ldir
+ ex de,hl
+ ld bc,8 ;next line
+ add hl,bc
+ ex de,hl
+ dec a
+ jr nz,disptitleloop
+
+ ld hl,txtMenu
+ ld de,$0D5A
+ ld (_penCol),de
+ cal _vputs ;by Shiar
ld de,$0207
ld (_curRow),de
cal _puts ;---
jr nz,waitnokeypressed
ret
-namelength:
- .db 0
chartable:
- .db 0,".<>!",0,0,0,0
+ .db 0,".<>!",0,0,0,0 ;down,L,R,up
.db 0,"xtoje0",0 ;enter..clear
.db " wsnid9",0 ;(-)..custom
.db "zvrmhc8",0 ;dot..del
ld (worm2+score+1),hl
ld (worm3+score+1),hl
ld (worm4+score+1),hl
- ld hl,worm1set+4
- ld de,worm1+lives
-;&&&>*
- cal _MOV5B ;9xld(de),(hl)
- cal _mov9b
- ld hl,worm2set+4
- ld de,worm2+lives
- cal _MOV5B
- cal _mov9b
- ld hl,worm3set+4
- ld de,worm3+lives
- cal _MOV5B
- cal _mov9b
- ld hl,worm4set+4
- ld de,worm4+lives
- cal _MOV5B
- cal _mov9b
+ ld hl,worm1set
+ ld de,worm1+head
+ ld a,4 ;4x (all worms)
+createwormsloop:
+ ld bc,19
+ ldir ;copy 19 bytes
+ ex de,hl
+ ld bc,head
+ add hl,bc
+ ex de,hl ;de=wormX+head
+ dec a ;loop
+ jr nz,createwormsloop
ld a,(Gametype)
cp 1 ;=peaworm
jr nz,worminitdone
- ld (worm1+lives),a ;&&&<*
+ ld (worm1+lives),a
worminitdone:
- pop hl
+ pop hl ;begin of current level
StartLevel:
ld de,Left
ldir
toobad_noballs:
-#ifdef 0
- ld a,(gameCar)
- and _datahunt
- jr z,nohunter
- ld a,huntersize
- ld (worm2+grow),a
-nohunter:
-#endif
-
ex de,hl
ld (thislevel),de
- psh de
- ld hl,worm1set
- ld de,worm1+head
- cal _MOV4B
- ld hl,worm2set
- ld de,worm2+head
- cal _MOV4B
- ld hl,worm3set
- ld de,worm3+head
- cal _MOV4B
- ld hl,worm4set
- ld de,worm4+head
- cal _MOV4B
- pop de
ld hl,worm1
ld a,(gameCar)
jr nz,Delay
NoDelay:
- cal handlethoseneatlittleballs
+ ld a,0
+nrballs =$-1
+ or a
+ cal nz,handlethoseneatlittleballs
ld ix,worm1
ld a,(nrworms)
jp _clrWindow
loadhiscoreposinahl:
+ ld a,(Level)
+ ld b,a
ld a,(Gametype)
or a
externalhiscoresavepos:
ld hl,0
hiscrposhl =$-2
ret z ;(Gametype)=0
+addlevelposition:
cal _AHL_PLUS_2_PG3
+ dnz addlevelposition
ret
;-----------------------------
respawncheck:
cp respawndelay-1
jr nz,unnamedlabel
+ cal saverespawncounter
removeworm:
ld h,(ix+tail+1)
ld l,(ix+tail)
inc hl
ld b,(hl)
inc hl
- res resbit,h
+ cal resbit
psh hl
cal res4pixels
pop hl
;de=ix+head
ld (ix+tail+1),d
- ld (ix+tail),e
+ ld (ix+tail),e ;head=tail/size=0
+ ret
unnamedlabel:
cp 1
cp l ;changed?
ret z
saverespawncounter:
- ld (ix+delay),h
+ ld (ix+delay),a
ret
;------- handle worm ---------
ld e,(ix+pos2)
ld d,(ix+pos2+1)
+ psh hl
+ ld hl,previouspos
+ ld (hl),c
+ inc hl
+ ld (hl),b
+ inc hl
+ inc hl
+ ld (hl),e
+ inc hl
+ ld (hl),d
+ pop hl
+
;-------- move worm ----------
Wormmove:
Hitworm:
ld a,(gameCar)
ld h,a
- and _datafood
- jp z,WormDead
+ and _datadie
+ cal z,checkhitotherworm
+ ld a,h
+ and _datamultpeas ;&&bit
+ jr nz,multiple_peas
ld a,h
- and _datahunt
- cal nz,checkhitotherworm
+ and _datafood
+ jp z,WormDead ;no food
ld hl,0
PeaY =$-2
ld de,10
cal IncScore
pop af
- jr nz,still_alive_not_dead
+ jp nz,still_alive_not_dead
ld a,(gameCar)
and _datafoodl
- jr z,still_alive_not_dead
+ jp z,still_alive_not_dead
ld a,(Gametype)
or a
jp nz,Exit ;stack restored
cal _HLTIMES10
ex de,hl
cal IncScore ;score+(40*level)
+ cal removeworm
pop hl ; << call
pop hl ; << call
pop hl ; << levelp new
jp StartLevel
+multiple_peas:
+ ld hl,(peaspos)
+ ld a,(sprsize)
+ inc a
+ ld d,a
+ ld a,b
+ sub h
+ inc a
+ cp d ;=(sprsize)+1
+ jp nc,peaaction
+ ld a,c
+ sub l
+ inc a
+ cp d
+ ret c
+peaaction:
+ ret
+
;-----------------------------
-checkhitotherworm:
- .db $dd,$7d ;ld a,lx
- cp worm2&255
- ret nz
-ThisIsJustASillyUselessLabel:
- ld hl,(worm1+tail)
- ld de,(worm1+head)
nextotherwormbit:
ld a,c
sub (hl)
sub (hl)
inc a
cp 4
- jr c,otherwormHIT ;yes
+ ret c ;nz ;yes
nothit1:
inc hl
- res resbit,h
+ cal resbit
+ChkWorm:
cal _cphlde
jr nz,nextotherwormbit
- ret
+ ret ;z
checkhitlapline:
ld a,63
ld (ix+reserv),a
ret
-otherwormHIT:
- psh ix
- ld de,10
- cal IncScore
+checkhitotherworm:
+ .db $dd,$7d ;ld a,lx
+ cp worm2&255
+ psh ix
+ jr nz,chkworm2 ; ret nz
ld ix,worm1
- cal WormDead
- pop ix
- pop bc
+ jr chkworm
+chkworm2:
+ ld ix,worm2
+
+chkworm:
+ ld h,(ix+tail+1)
+ ld l,(ix+tail)
+ ld e,(ix+head)
+ ld d,(ix+head+1)
+ cal ChkWorm
+ pop ix
+ ret z ;not hit
+ pop bc ;call
+previouspos =$+1
+ ld bc,0
+ ld de,0
+ ld (ix+pos),c
+ ld (ix+pos+1),b
+ ld (ix+pos2),e
+ ld (ix+pos2+1),d
+ ret
still_alive_not_dead:
;-------- draw worm ----------
Drawworm:
- ld a,(gameCar)
- and _datahunt
- cal nz,HuntingTimeScore
-
ld c,(ix+pos)
ld b,(ix+pos+1)
- ld a,(gameCar)
- and _datalaps
- cal nz,checkhitlapline
+ ld a,(Gametype)
+ cp gamerace
+ cal z,checkhitlapline
ld l,(ix+head)
ld h,(ix+head+1)
inc hl
ld (hl),b
inc hl
- res resbit,h
+ cal resbit
ld (ix+head),l
ld (ix+head+1),h
inc hl
ld b,(hl)
inc hl
- res resbit,h
+ cal resbit
ld (ix+tail),l
ld (ix+tail+1),h
;-----------------------------
handlethoseneatlittleballs:
- ld a,0
-nrballs =$-1
- or a
- ret z
-
ld hl,balls
- ld b,a
+ ld b,a ;a=(nrballs)
handleballs
psh bc
psh hl
;----------- procs -----------
;-----------------------------
+resbit:
+ ld a,h
+ and (ix+storepos)
+ ld h,a
+ ret
+
randompos:
ld b,a
Random: ;(2..b+2)
pop hl
ret
-HuntingTimeScore:
- .db $dd,$7d ;ld a,lx
- cp worm2&255
- ret z ;=worm#2
- dec (ix+reserv)
- ret nz
- ld hl,10
-
IncScore:
ld h,(ix+score+1)
ld l,(ix+score)
jr nc,NotMinXScroll
xor a
NotMinXScroll:
- cp 128
+ cp 128
FieldWidth = $-1
- jr c,NotMaxXScroll
- ld a,(FieldWidth)
+ jr c,NotMaxXScroll
+ ld a,(FieldWidth)
NotMaxXScroll:
psh af ; >> 3
and %11111000
inc c
CopyScreen:
add hl,bc
- ld b,57
+ ld b,57
CopyScreenLoop:
psh bc ; >> 4
ld bc,16
AfterShiftDelay:
halt
AfterShift:
+#ifdef buffer
ld hl,DispBuffer
ld de,$fc00+$70
ld bc,1024-$70
ldir
+#endif
pop de ; << 1
pop bc ; << 0k
ret
;---------- data -------------
;-----------------------------
-txtWelcome: .db "Welcome to Worm!! ",
- .db "by Shiar",0
+wtPicture:
+.db %00011110,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000
+.db %00111110,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000
+.db %01110000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000
+.db %01100000,%01111100,%00000001,%11111111,%00000000,%11110000,%01111001,%11100000
+.db %11100000,%11111110,%00000011,%11111111,%10000011,%11111000,%11111111,%11110000
+.db %11000001,%11000111,%00000111,%00000001,%11000111,%10011001,%11001111,%00111000
+.db %11000001,%10000011,%00000110,%00000000,%11100110,%00000001,%10011111,%10011000
+.db %11000001,%10000011,%00000110,%11000000,%01101110,%00000011,%10111001,%11011100
+.db %11000001,%11000111,%00000110,%11000000,%01101100,%00000011,%00110000,%11001100
+.db %11000000,%11000110,%00000110,%11000000,%01101100,%00000011,%00110000,%11001100
+.db %11100000,%11101110,%00001110,%11000000,%01101100,%00000011,%00111001,%11001100
+.db %01100000,%01111100,%00001100,%11000000,%01101100,%00000011,%00011111,%10001100
+.db %01110000,%00111000,%00011100,%11100000,%11101110,%00000011,%00001111,%00001100
+.db %00111000,%11111110,%00111000,%01110001,%11000110,%00000011,%10000000,%00011100
+.db %00011111,%11101111,%11110000,%00111111,%10000111,%00000001,%10000000,%00011000
+.db %00001111,%10000011,%11100000,%00011111,%00000011,%00000001,%10000000,%00011000
+
+txtMenu: .db "by Shiar",0
.db "Have fun!",0 ;4th menu item
- .db "Level 00",0 ;3rd
- .db "Worms: 0",0 ;2nd
+ .db "Level 00",0 ;3rd
+ .db "Worms: 0",0 ;2nd
txtGame: .db "Singleplayer",0 ;0 (1st)
-txtGame2: .db "Peaworm ",0 ;1
+txtGame2: .db "Peaworm ",0 ;1 (next 1st)
.db "Deathmatch",0 ;2
.db "Foodmatch ",0 ;3
- .db "LinkMatch",0 ;4 (>options)
- .db "Hunting ",0 ;5
- .db "Race ",0 ;6
- .db "CTF ",0 ;7
- .db "Domination",0 ;(>=8)
+ .db "LinkMatch",0 ;4
+ .db "Race ",0 ;5
+ .db "CTF ",0 ;6
+ .db "Domination",0 ;7
+txtLevsel: .db $CF," Select levels: ",5,0
txtName: .db "Enter name player ",0
txtWaiting: .db "Waiting...",0
txtReceive: .db "Receiving..." ;,0
gamesdata:
-_datalink = %00000001
-_datalivel = %00000010 ;ix+lives=0 limit
+_datalink = %00000001 ;linkplay
+_datalivel = %00000010 ;lives=0 limit
_datafoodl = %00000100 ;left=0 limit
_datanextl = %00001000 ;next level if left=0
_datasingl = %00001000 ;singleplayer=1
_datafood = %00010000 ;food present
-_datahunt = %00100000
-_datalaps = %01000000 ;give lap score
+_________ = %00100000 ;
+_datadie = %01000000 ;worm dies on impact
_datascore = %10000000 ;score>=100 limit
+_datamultpeas = 0
+
+gamesingle = 0
+datasingle: .db %01011110
+gamepeas = 1
+datapeas: .db %01011010
+gamedeathm = 2
+datadeathm: .db %01000010
+gamefoodm = 3
+datafoodm: .db %11010000
+gamelinkm = 4
+datalinkm: .db %01000011
+gamerace = 5
+datarace: .db %10000000
+gamectf = 6
+datactf: .db %01000000
+gamedomin = 7
+datadomin: .db %01000000 ;==(8 modes)
-datasingle: .db %00011110
-datapeas: .db %00011010
-datadeathm: .db %00000010
-datafoodm: .db %10010000
-datalinkm: .db %00000011
-datahuntin: .db %10100000
-datarace: .db %11000000
-datactf: .db %00000000 ;==(8 modes)
-;datadomin: .db %00000000
datalevels: .dw LevelDef, LevelDef
.dw LevelDefM,LevelDefM
.dw LevelDefM,LevelDefM
nrlevels: .db 2,2,2,2,2,2,2,2
worm1set: .dw worm1p,worm1p
- .db 3,0,%01111110,%10,%100 ;< >
+ .db %11110111,3,0,%01111110,%10,%100 ;< >
worm1name: .db "worm #01",0
worm2set: .dw worm2p,worm2p
- .db 3,0,%00111111,%10000,%1000 ;f1 f2
+ .db %11111011,3,0,%00111111,%10000,%1000 ;f1 f2
worm2name: .db "worm #02",0
worm3set: .dw worm3p,worm3p
- .db 3,0,%01011111,%10,%100 ;sto ,
+ .db %11111011,3,0,%01011111,%10,%100 ;sto ,
worm3name: .db "worm #03",0
worm4set: .dw worm4p,worm4p
- .db 3,0,%01111101,%10,%1 ;enter +
+ .db %11111011,3,0,%01111101,%10,%1 ;enter +
worm4name: .db "worm #04",0
hipeaworm: .dw 0
died = 8 ;game
score = 9 ;game
delay = 11 ;game
-
-head = 12 ;level
-tail = 14 ;level
-lives = 16 ;game
-reserv = 17 ;loop
+ ;19B @game
+head = 12 ;4B (head=tail)
+tail = 14 ;also@next level
+storepos = 16
+lives = 17
+reserv = 18 ;loop
;race:lap
;hunt:time
-input = 18 ;&
-left = 19 ;&
-right = 20 ;&
-name = 21 ;game
-wormsize = 30
-
-respawndelay = 80
-maxnamelength = 9
+input = 19
+left = 20
+right = 21
+name = 22
+wormsize = 31
+
+respawndelay = 30
+maxnamelength = 8+1
;-----------------------------
;----------- end -------------
+;128x57 FIELD:
+; +-----------------+
+;(0,0)> |####(BORDER)#####|
+; |#*(2,2) #|
+; |# #|
+; |#(63,28)*(64,28)#|
+; |# #|
+; |# (125,54)*#|
+; |#################| <(127,56)
+; +-----------------+
+;Drawable screen is (2,2)-(125,54); center is (63.5,28)
+
+
#include "asm86.h"
#include "ti86asm.inc"
- .org $F3E3-16 ;$E9E3-[name size]
- .db 'w',89 ;wormLevel header (version .89)
- .db 16,"Worm LevelPack I" ;level name
- .dw hiscore-single ;leveldata size
+;---------- HEADER ----------
+
+ .org $F3E3-16 ;$F3E3-[name size]
+ ;^^ <-MUST EQUAL NAME SIZE BELOW!!! If not, Worm will crash!
+
+ .db 'w',90 ;wormLevel header (version .90)
+ .db 16,"Worm LevelPack I" ;name size (UPDATE .ORG!!!); level name
+ .dw hiscore-single ;leveldata size
levelsdata:
- .dw single ;points to singleplayer levels
- .dw 0 ;...peaworm level (0 = no levels/empty level)
+ .dw single ;points to singleplayer levels below
+ .dw peaworm ;...peaworm level
.dw deathmatch ;...deathmatch
.dw foodmatch ;...foodmatch
.dw linkmatch ;...linkmatch
- .dw hunting ;...hunting
.dw race ;...race
.dw ctf ;...capture the flag
+ .dw domination ;...domination
- .db 2,2,3,2 ;max. choosable level+1 for each gametype
- .db 2,2,2,2 ;so: 2 = level 1 only; 4 = level 1 to 3 available
+;note: use <.dw 0> if no levels present (empty level will be used).
-single:
+ .db 2,3,3,2 ;max. choosable level+1 for each gametype
+ .db 2,2,2,2 ;so: 2 = level 1 only; 4 = level 1 to 3 available
- .db 5,4,15 ;peas in level, delay (0=fastest), pea-growth
- .db 15,5 ;begin_size, sprite size (0=use default sprite)
+;again .db 0 indicates no levels present.
+
+
+;---------- LEVELS ----------
+
+;LEVEL-FORMAT:
+;------------
+; .db 5 ;nr. of peas in level
+; .db 4 ;delay (0=fastest, 4=normal)
+; .db 15 ;growth per pea
+; .db 15 ;begin size
+; .db 4 ;sprite size (1-8; 0=use default sprite)
+; .db %01100000 ;the sprite
+; .db %11110000
+; .db %11110000
+; .db %01100000
+; .db 2 ;bouncing balls (0-40)
+; .db 2 ;BALL #1: begin y-position
+; .db 4 ; begin-x
+; .db %00 ; direction (%00=right+down, %11=left+up)
+; .db 2,7,%00 ;BALL #2: y,x,direction
+; .db 0 ;your start direction (0=down,$40=right,$80=up,$C0=left)
+; .db 2 ;your y-position (2=at top)
+; .db 63 ;your x-position (63=center)
+; ;IN MULTIPLAYER LEVELS also set positions for worm 2-4:
+;(.db $C0,28,125 ) ;player 2 moves left
+;(.db $00, 2, 63 ) ;player 3 moves down
+;(.db $80,54, 63 ) ;player 4 moves up
+;
+; .db 128,57 ;field size: width (128-255), height (57-255)
+; ; screen will SCROLL if size is more than 128,57
+; .db 2 ;number of lines:
+; .db 28,14,100,41 ;LINE #1 coordinates: (x1,y1)-(x2,y2)
+; .db 28,41,100,14 ;LINE #2: the same
+; .db 1 ;number of boxes:
+; .db 16,12,48,12 ;BOX #1: x1,y1,x2,ysize(y2-y1)
+;------------ ;THAT'S ALL; repeat for all levels
+
+
+single: ;singleplayer levels start here
+
+ .db 5,4,15 ;peas/delay/growth
+ .db 15,5 ;size/spritesize
.db %01110000 ;sprite
.db %10001000
.db %10001000
.db %10001000
.db %01110000
- .db 0 ;balls (see below)
- .db 0,2,63 ;your start d (0=down,$80=up), y, x
- .db 128,57 ;field width (128-255), height (57-255)
- .db 0,0 ;no additional lines, boxes
+ .db 0 ;balls
+ .db 0,2,63 ;d/y/x
+ .db 128,57 ;field size
+ .db 0,0 ;no lines/boxes
- .db 8,4,15,15,0,0
+ .db 8,4,15,15,0
+ .db 0 ;no sprite
.db $40,14,2
.db 128,57
- .db 1 ;one line:
- .db 28,28,100,28 ;line coords: x1,y1,x2,y2
+ .db 1
+ .db 28,28,100,28
.db 0
.db 9,4,15,15,0,0
.db 0
.db 4,3,15,10,0,1
- .db 2,4,0 ;1 bouncing ball, begin y, x, direction (%11=left+up)
+ .db 2,4,0 ;ball
.db 0,2,124
.db 128,57
- .db 2
+ .db 2 ;lines
.db 28,14,100,41
.db 28,41,100,14
.db 0
.db 10,3,15,15,0,0
.db 2,8,$40
.db 128,90
- .db 3
+ .db 3 ;lines
.db 18,20,18,70
.db 110,20,110,70
.db 18,45,110,45
.db 9,3,15,15,0,0
.db $40,4,10
.db 128,82
- .db 3
+ .db 3 ;lines
.db 0,20,74,20
.db 54,40,128,40
.db 0,60,74,60
.db 8,2,15,15,0,0
.db $C0,67,48
.db 128,128
- .db 13
+ .db 13 ;lines
.db 34,56,56,34
.db 34,72,56,94
.db 72,34,94,56
.db 91,106,115,106
.db 0
- .db 255 ;end marker
+ .db 255 ;end marker: no more levels
;Code to run when all levels are done:
;Worm waits a second, then screen is cleared and this code will be run.
.db " Congratulations!!",0
+peaworm:
+ .db 5,4,15
+ .db 15,5
+ .db %01110000
+ .db %10001000
+ .db %10001000
+ .db %10001000
+ .db %01110000
+ .db 0
+ .db 0,2,63
+ .db 128,57
+ .db 0,0
+
+ .db 5,4,15,15,0,0
+ .db 0,2,63
+ .db 128,57
+ .db 0,0
+
+
deathmatch:
.db 8,5,15,31,0,0
.db $40,28,2 ;begin stats for each player
- .db $C0,28,125 ;player 2 moves left
- .db $00,2,63 ;player 3 moves down
- .db $80,54,63 ;player 4 moves up
- .db 128,57
+ .db $C0,28,125
+ .db $00,2,63
+ .db $80,54,63
+ .db 128,57 ;field size
.db 0
- .db 4 ;4 boxes:
- .db 16,12,48,12 ;x1,y1,x2,ysize(y2-y1)
- .db 80,12,112,12 ;...
+ .db 4 ;4 boxes
+ .db 16,12,48,12
+ .db 80,12,112,12
.db 16,34,48,12
.db 80,34,112,12
foodmatch:
ctf:
+domination:
.db 8,5,18,15,0,0
.db $40,30,2,$C0,30,125, $00,2,64,$80,54,64
.db 128,57
.db 0,0
-hunting:
- .db 8,7,15,17,0,0
- .db $40,28,2,$C0,28,125, $00,2,63,$80,54,63
- .db 128,57
- .db 0
- .db 4
- .db 4,19,16,14
- .db 4,19,80,14
- .db 4,19,16,34
- .db 4,19,80,34
-
-
race:
- .db 8,2,15,10,0,0
+ .db 8,4,15,10,0,0
.db $40,3,2,$40,6,2, $40,9,2,$40,12,2
.db 128,57
.db 0
- .db 1
- .db 8,29,32,20
+ .db 2
+ .db 22,21,104,15
+ .db 52,10,74,37
hiscore:
.dw 0 ;singleplayer hiscore will be saved here
- .dw 0 ;same for peaworm hiscore
+ .dw 1,2 ;peaworm hiscore for each peaworm-level
.end