'$DYNAMIC DIM rt1%(700), rt2%(700), rt3%(700) DIM blkdis%(3610), blkcon%(50), crbuf%(1000) DIM p%(26300), gbuf%(32100), mapbuf%(10000), blkbuf%(26300) DIM ex#(100), ey#(100), xmom#(100), ymom#(100), dt1#(100), dt2#(100), dt3#(100), ty%(100), grnd%(100), blk%(100), hp#(100) DIM pefx#(10), pefy#(10), pefc%(10), pefxd#(10), pefyd#(10), pefdt#(10) SCREEN 13 DEF SEG = VARSEG(blkdis%(0)) BLOAD "blkdis.dat", 0 DEF SEG = VARSEG(p%(0)) BLOAD "game1.chr", 0 DEF SEG = VARSEG(blkbuf%(0)) BLOAD "game1.pic", 0 DEF SEG = VARSEG(mapbuf%(0)) BLOAD "game1.lvl", 0 GOSUB setg RESTORE blkset1 FOR a% = 0 TO 39 READ blkcon%(a%) NEXT f$ = "game1.pll": GOSUB lpal GOSUB setsegs maxmpx% = 150 maxmpy% = 20 ex#(0) = 16 maxspd% = 5 nchar% = 40 ty%(0) = 2 FOR a% = 6 TO 100 ty%(a%) = 3 ex#(a%) = a% * 3 ey#(a%) = 350 NEXT main: DO WHILE TIMER < t1# + .02: WEND t1# = TIMER GOSUB dataupd GOSUB grphupd LOOP dataupd: FOR a% = 0 TO nchar% IF ex#(a%) >= mpx% - 40 AND ex#(a%) <= mpx% + 344 AND ey#(a%) >= mpy% - 40 AND ey#(a%) <= mpy% + 200 THEN ON ty%(a%) GOSUB smoke, null, slime, blood, wormhd, wormbod END IF NEXT GOSUB youup RETURN null: RETURN wormhd: IF ex#(0) < ex#(a%) THEN ex#(a%) = ex#(a%) - 2 - RND IF ex#(0) > ex#(a%) THEN ex#(a%) = ex#(a%) + 2 + RND GOSUB ground2 IF grnd%(a%) = 0 THEN ey#(a%) = ey#(a%) + 5 IF grnd%(a%) = 1 THEN ymom#(a%) = -10 - RND * 5 IF ymom#(a%) < 0 THEN ymom#(a%) = ymom#(a%) + 1 IF ymom#(a%) > 0 THEN ymom#(a%) = ymom#(a%) - 1 ey#(a%) = ey#(a%) + ymom#(a%) IF xmom#(a%) < 0 THEN blk%(a%) = 36 ELSE blk%(a%) = 37 RETURN wormbod: IF ABS(ex#(a%) - ex#(a% - 1)) + ABS(ey#(a%) - ey#(a% - 1)) > 15 THEN ex#(a%) = ex#(a%) + (ex#(a% - 1) - ex#(a%)) / 4 ey#(a%) = ey#(a%) + (ey#(a% - 1) - ey#(a%)) / 4 END IF GOSUB ground2 IF grnd%(a%) = 0 THEN ey#(a%) = ey#(a%) + 1 blk%(a%) = 38 GOSUB stomp IF n% = 1 THEN ty%(a%) = 1: dt1#(a%) = 0: jmp# = 10 RETURN smoke: dt1#(a%) = dt1#(a%) + .5 blk%(a%) = dt1#(a%) 'THIS FILE WAS CORRUPTED...