X-Git-Url: http://git.shiar.nl/wormy.git/blobdiff_plain/c6abf522cd97c69c3426beb92769ce358063148f..8dcbed707c51a18497a464a3a383b82263c76f71:/wormlvl.z80 diff --git a/wormlvl.z80 b/wormlvl.z80 index 00c4268..fd1c51a 100644 --- a/wormlvl.z80 +++ b/wormlvl.z80 @@ -1,30 +1,46 @@ -.org $EA00-16 +#include "asm86.h" +#include "ti86asm.inc" -.dw single,peaworm,deathmatch,foodmatch -.dw linkmatch,hunting,race,ctf + .org $EA00-20 -;----------------------------- -;---------- levels ----------- -;----------------------------- + .db 'T',0 ;worm header (Test version) + .dw hiscore-single ;leveldata size -NUM_LEVELS = 10 -single: -peaworm: +levelsdata: + + .dw single ;points to singleplayer levels + .dw 0 ;...peaworm level (0 = no levels/empty level) + .dw deathmatch ;...deathmatch + .dw foodmatch ;...foodmatch + .dw linkmatch ;...linkmatch + .dw hunting ;...hunting + .dw race ;...race + .dw ctf ;...capture the flag - .db 5,4,15,0 ;peas,speed,begin_size,balls - .db 0,2,63 ;start d, y, x - .db 128,57 ;field width (128-255), height (57-255) - .db 0,0 ;no additional lines, boxes - .db 8,4,15,0 +single: + + .db 5,4,15 ;peas in level, delay (0=fastest), pea-growth + .db 15,5 ;begin_size, sprite size (0=use default sprite) + .db %01110000 ;sprite + .db %10001000 + .db %10001000 + .db %10001000 + .db %01110000 + .db 0 ;balls (0 or 1) + .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 8,4,15,15,0,0 .db $40,14,2 .db 128,57 - .db 1 - .db 28,28,100,28 ;line coords: x1,y1,x2,y2 + .db 1 ;one line: + .db 28,28,100,28 ;line coords: x1,y1,x2,y2 .db 0 - .db 9,4,15,0 + .db 9,4,15,15,0,0 .db $40,8,2 .db 128,57 .db 2 @@ -32,7 +48,16 @@ peaworm: .db 28,41,100,41 .db 0 - .db 9,3,15,0 + .db 4,3,15,10,0,1 ;...bouncing ball + .dw $20F ;ball begin position + .db 0,2,63 + .db 128,57 + .db 2 + .db 28,14,100,41 + .db 28,41,100,14 + .db 0 + + .db 9,3,15,15,0,0 .db $40,8,2 .db 128,80 .db 2 @@ -40,7 +65,7 @@ peaworm: .db 20,40,108,40 .db 0 - .db 10,3,15,0 + .db 10,3,15,15,0,0 .db 2,8,$40 .db 128,90 .db 3 @@ -49,15 +74,7 @@ peaworm: .db 18,45,110,45 .db 0 - .db 4,3,10,1 \ .dw $20F - .db 0,2,63 - .db 128,57 - .db 2 - .db 28,14,100,41 - .db 28,41,100,14 - .db 0 - - .db 7,3,15,0 + .db 7,3,15,15,0,0 .db 64,4,0 .db 128,86 .db 6 @@ -69,7 +86,7 @@ peaworm: .db 110,20,110,64 .db 0 - .db 9,3,15,0 + .db 9,3,15,15,0,0 .db $40,4,10 .db 128,82 .db 3 @@ -78,7 +95,7 @@ peaworm: .db 0,60,74,60 .db 0 - .db 12,3,15,0 + .db 12,3,15,15,0,0 .db $40,4,0 .db 128,90 .db 6 @@ -90,7 +107,7 @@ peaworm: .db 74,72,110,72 .db 0 - .db 8,2,15,0 + .db 8,2,15,15,0,0 .db $C0,72,48 .db 128,128 .db 13 @@ -109,35 +126,53 @@ peaworm: .db 91,106,115,106 .db 0 + .db 255 ;end marker + +;Code to run when all levels are done: +;Worm waits a second, then screen is cleared and this code will be run. +;End with (stats-screen will then be displayed.) +;If you don't want an ending, simply put . + + ld hl,endtext + call _puts ;display text + jp _getkey ;wait for a key + ;jp ? = call ? + ret +endtext: + .db " Congratulations!!",0 + + deathmatch: - .db 8,5,31,0 - .db $40,28,2,$C0,28,125, $00,2,63,$80,54,63 + .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 0 - .db 4 ;4 boxes - .db 4,19,16,14 ;xsize,ysize,xpos,ypos - .db 4,19,80,14 - .db 4,19,16,34 - .db 4,19,80,34 + .db 4 ;4 boxes: + .db 16,12,48,12 ;x1,y1,x2,ysize(y2-y1) + .db 80,12,112,12 ;... + .db 16,34,48,12 + .db 80,34,112,12 + foodmatch: ctf: - .db 8,5,15,0 + .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 + linkmatch: - .db 8,0,15,0 + .db 8,0,15,15,0,0 .db $40,30,2,$C0,30,125, $00,2,64,$80,54,64 .db 228,157 .db 0,0 + hunting: - .db 8,7,17,0 -#ifdef 0 -huntersize = 31 -#endif + .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 @@ -147,13 +182,19 @@ huntersize = 31 .db 4,19,16,34 .db 4,19,80,34 + race: - .db 8,2,10,0 + .db 8,2,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 + +hiscore: + .dw 0 ;singleplayer hiscore will be saved here + + .end .end \ No newline at end of file