2 ; by Matthew Shepcar 30.XII.98
3 ; modified by Jonah Cohen 19.XI .99
7 ; * picks not correctly removed
10 ; * ending (+stats after multiplayer)
20 _runIndicOff = _runindicoff
21 _flushAllMenus = _flushallmenus
40 ;-----------------------------
41 ;----- build trig tables -----
42 ;-----------------------------
67 ;-----------------------------
68 ;---------- menu -------------
69 ;-----------------------------
176 ;-----------------------------
177 ;--------- game over ---------
178 ;-----------------------------
204 push de ; >> levelp old
244 ;-------- draw level ---------
350 ;-----------------------------
352 push hl ; >> levelp new
364 call _vputs ;scoremsg
376 pop hl ; << levelp new
377 push hl ; >> levelp new
415 ;-----------------------------
416 ;----------- LOOP ------------
417 ;-----------------------------
440 ;-----------------------------
441 ;---------- keys -------------
442 ;-----------------------------
460 pop hl ; << levelp new
462 pop hl ; << levelp old
473 pop hl ; << levelp new
493 pop de ; << levelp old
507 ld de,HiScore-_asm_exec_ram+2
520 ;-----------------------------
521 ;----------- worm ------------
522 ;-----------------------------
565 ;------- handle worm ---------
587 ;-------- move worm ----------
618 pop hl ; << pos (old)
650 ;--------- worm hit ----------
684 pop de ; << levelp new
685 pop hl ; << levelp old
698 ;-------- draw worm ----------
744 ;-----------------------------
745 ;----------- procs -----------
746 ;-----------------------------
754 ld bc,1000h+(7921/256)
764 ld (Seed),hl ;seed=(seed*7921+1) MOD 65536
813 ;-------- pixelprocs ---------
828 CheckPixel: ;at bc in d
837 FindPixel: ;bc to ahl + de gone
842 add a,offsets_table & 255
844 ld d,offsets_table/256
866 ;-----------------------------
904 ;-----------------------------
907 .db 128,64,32,16,8,4,2,1
1023 ld (ShiftRightCounter),a
1025 ld (ShiftRightChunk),a
1039 ShiftRightCounter = $-1
1061 ld (ShiftLeftCounter),a
1063 ld (ShiftLeftChunk),a
1065 jr nc,ShiftLeftSameByte
1083 ShiftLeftCounter = $-1
1094 jr nz,ShiftRowsRight
1128 ;-----------------------------
1129 ;----------- link ------------
1130 ;-----------------------------
1257 ;-----------------------------
1258 ;---------- levels -----------
1259 ;-----------------------------
1264 .db $40,30,4,$C0,30,123
1273 .db 5,3 ;5 peas, speed 5
1274 .db 0,4,64,0,0,0 ;d,y,x
1275 .db 0,0 ;field width, height
1276 .db 0 ;no additional lines
1355 ;-----------------------------
1356 ;---------- data -------------
1357 ;-----------------------------
1360 .db 0, 3, 6, 9, 12, 15, 18, 21
1361 .db 24, 27, 30, 33, 36, 39, 42, 45
1362 .db 48, 51, 54, 57, 59, 62, 65, 67
1363 .db 70, 73, 75, 78, 80, 82, 85, 87
1364 .db 89, 91, 94, 96, 98,100,102,103
1365 .db 105,107,108,110,112,113,114,116
1366 .db 117,118,119,120,121,122,123,123
1367 .db 124,125,125,126,126,126,126,126
1372 txtWelcome .db "Welcome to PeaWorm!! ",
1373 .db "by Jonah and Shiar",0
1374 txtMenu .db "Start Game",0
1378 txtGame .db "Singleplayer",0
1379 txtGame2 .db "Deathmatch ",0
1382 WormMsg .db "Wonderworm!",0
1383 LevelMsg .db "Level ",0
1384 LivesMsg .db "Lives: ",0
1385 ScoreMsg .db "Score: ",0
1386 LeftMsg .db "Food: ",0
1390 worm1 .dw 0,0,0,0,0,0,0,0
1391 .db 0,%11111110,%10,%100
1392 worm2 .dw 0,0,0,0,0,0,0,0
1393 .db 0,0,%10000,%1000
1394 ; .db 0,%00111111,%10000,%1000
1416 ScrBuffer = $8200 ;32x256 bytes
1419 ;-----------------------------
1420 ;----------- end -------------
1421 ;-----------------------------