'$DYNAMIC DEFINT A-Z DECLARE SUB setmodex () DECLARE SUB copypage (BYVAL page1, BYVAL page2) DECLARE SUB setvispage (BYVAL page) DECLARE SUB drawsprite (pic(), pal(), BYVAL po, BYVAL x, BYVAL y, BYVAL page) DECLARE SUB loadsprite (pic(), BYVAL x, BYVAL y, BYVAL w, BYVAL h, BYVAL page) DECLARE SUB fadeto (palbuff(), BYVAL red, BYVAL green, BYVAL blue) DECLARE SUB fadetopal (pal(), palbuff()) DECLARE SUB setpal (pal()) DECLARE SUB clearpage (BYVAL page) DECLARE SUB setdiskpages (buf(), BYVAL h, BYVAL l) DECLARE SUB loadpage (fil$, BYVAL i, BYVAL p) DECLARE SUB storepage (fil$, BYVAL i, BYVAL p) DECLARE SUB setfont (f()) DECLARE SUB printstr (s$, BYVAL x, BYVAL y, BYVAL p) DECLARE SUB textcolor (BYVAL f, BYVAL b) DECLARE SUB setitup (fil$, buff(), BYVAL p) DECLARE SUB resetdsp DECLARE SUB playsnd (BYVAL n, BYVAL f) DECLARE SUB closefile DIM pic(1000), ln$(100), lpal(100), bobpal(300), newpal(767), fadepal(1536), tmp(8000), voic(32000), txt(1024) page2edit = 6 setmodex DEF SEG = VARSEG(newpal(0)) BLOAD "palette.sto", VARPTR(newpal(0)) setpal newpal() DEF SEG = VARSEG(txt(0)) BLOAD "bobtext.fnt", VARPTR(txt(0)) setfont txt() setdiskpages tmp(), 200, 0 loadpage "bobgraph.scr" + CHR$(0), 0, 3 loadpage "bobgraph.scr" + CHR$(0), page2edit, 2 DEF SEG = VARSEG(bobpal(0)): BLOAD "bobgraph.pal", VARPTR(bobpal(0)) DEF SEG = VARSEG(lpal(0)): BLOAD "letter.pal", VARPTR(lpal(0)) letter = 38 FOR i = 1 TO letter READ ln$(i): ln$(i) = "letter." + ln$(i) NEXT i vlad = 0: vpal = 0: lttr = 0: pal = 0: pic = 0: x = 140: y = 80 lpal = 0: lpic = 1 vpage = 0: dpage = 1 a$ = "" WHILE a$ <> CHR$(27) copypage 2, dpage a$ = INKEY$ IF a$ = CHR$(0) + CHR$(75) THEN x = x - 1 IF a$ = CHR$(0) + CHR$(77) THEN x = x + 1 IF a$ = CHR$(0) + CHR$(72) THEN y = y - 1 IF a$ = CHR$(0) + CHR$(80) THEN y = y + 1 IF a$ = "4" THEN x = x - 16 IF a$ = "6" THEN x = x + 16 IF a$ = "8" THEN y = y - 16 IF a$ = "2" THEN y = y + 16 IF a$ = CHR$(13) THEN IF lttr = 0 THEN lttr = 1: GOSUB loadlttr ELSE lttr = 0 IF lttr = 0 THEN IF a$ = "," THEN IF pic > 0 THEN pic = pic - 1 IF a$ = "." THEN IF pic < 199 THEN pic = pic + 1 IF a$ = "/" THEN IF pal > 0 THEN pal = pal - 16 IF a$ = "'" THEN IF pal < 224 THEN pal = pal + 16 IF a$ = "v" THEN IF vlad = 0 THEN vlad = 160: vpal = 240 ELSE vlad = 0: vpal = 0 IF a$ = "p" THEN vpal = vpal XOR 240 loadsprite pic(), vlad, pic, 16, 17, 3 drawsprite pic(), bobpal(), pal + vpal, x, y, dpage IF a$ = " " THEN drawsprite pic(), bobpal(), pal + vpal, x, y, 2 ELSE IF a$ = "," THEN IF lpic > 1 THEN lpic = lpic - 1: GOSUB loadlttr IF a$ = "." THEN IF lpic < letter THEN lpic = lpic + 1: GOSUB loadlttr IF a$ = "/" THEN IF lpal > 0 THEN lpal = lpal - 16 ELSE lpal = 80 IF a$ = "'" THEN IF lpal < 80 THEN lpal = lpal + 16 ELSE lpal = 0 drawsprite pic(), lpal(), lpal, x, y, dpage IF a$ = " " THEN drawsprite pic(), lpal(), lpal, x, y, 2 END IF SWAP vpage, dpage setvispage vpage WEND storepage "bobgraph.scr" + CHR$(0), page2edit, 2 SYSTEM loadlttr: DEF SEG = VARSEG(pic(0)) BLOAD ln$(lpic), VARPTR(pic(0)) RETURN DATA b,o,v,bl,ba,bd,the,h,a,m,s,t,e,r,i,p,l,sun,mun,cas,drt,tre,bo1,bo2,bo3,bo4,bo5,bo6,bo7,bo8,dis,spm,chk,spk,cs1,cs2,cs3,cs4