'$DYNAMIC 'current lib-timing.qlb 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 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 DECLARE SUB setwait (a(), BYVAL t) DIM newpal(767), fadepal(1536), tmp(8000), txt(1024), buf(32000), letter$(255) 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() letters = 202 OPEN "hiscores.dat" FOR BINARY AS #1 FOR i = 1 TO letters letter$(p) = STRING$(1, " ") GET #1, i, a a = a AND 255 letter$(i) = CHR$(a) NEXT i textcolor 15, 0 FOR j = 0 TO 7 FOR i = 1 TO 26 p = j * 26 + i printstr letter$(p), i * 12 - 6, j * 10 + 100, 2 NEXT i: NEXT j x = 1: y = 0 a$ = "" dpage = 1: vpage = 0 WHILE a$ <> CHR$(27) copypage 2, dpage p = y * 26 + x textcolor 15, 0 printstr "|", x * 12 - 6, y * 10 + 94, dpage printstr letter$(p), x * 12 - 6, y * 10 + 100, dpage a$ = INKEY$ IF a$ = CHR$(0) + CHR$(75) AND x > 1 THEN x = x - 1 IF a$ = CHR$(0) + CHR$(77) AND x < 26 AND p < letters THEN x = x + 1 IF a$ = CHR$(0) + CHR$(72) AND y > 0 THEN y = y - 1 IF a$ = CHR$(0) + CHR$(80) AND y < 7 AND p <= letters - 26 THEN y = y + 1 IF a$ = CHR$(13) THEN GOSUB getit IF a$ = " " THEN GOSUB readit SWAP vpage, dpage setvispage vpage WEND FOR i = 1 TO letters PUT #1, i, letter$(i) NEXT i FOR i = 0 TO 9 name$ = STRING$(25, " ") GET #1, letters + i * 29 + 1, name$ GOSUB getname PUT #1, letters + i * 29 + 1, name$ s& = i * 300 + 300 PUT #1, letters + i * 29 + 26, s& NEXT i CLOSE #1 SYSTEM readit: c$ = "" b$ = "" textcolor 11, 240 WHILE c$ <> CHR$(13) printstr "? " + b$ + " ", 30, 20, vpage c$ = INPUT$(1) IF c$ <> CHR$(8) THEN b$ = b$ + c$ IF c$ = CHR$(8) AND LEN(b$) > 0 THEN b$ = LEFT$(b$, LEN(b$) - 1) WEND a = VAL(b$) IF a < 1 THEN a = 1 ELSE IF a > 255 THEN a = 255 letter$(p) = CHR$(a) textcolor 15, 240 printstr letter$(p), x * 12 - 6, y * 10 + 100, 2 RETURN getit: c$ = INPUT$(1) letter$(p) = c$ textcolor 15, 240 printstr letter$(p), x * 12 - 6, y * 10 + 100, 2 RETURN getname: a$ = "" WHILE a$ <> CHR$(13) copypage 2, dpage p = y * 26 + x textcolor 15, 0 printstr name$, 20, 20, dpage printstr "|", x * 12 - 6, y * 10 + 94, dpage printstr letter$(p), x * 12 - 6, y * 10 + 100, dpage a$ = INKEY$ IF a$ = CHR$(0) + CHR$(75) AND x > 1 THEN x = x - 1 IF a$ = CHR$(0) + CHR$(77) AND x < 26 AND p < letters THEN x = x + 1 IF a$ = CHR$(0) + CHR$(72) AND y > 0 THEN y = y - 1 IF a$ = CHR$(0) + CHR$(80) AND y < 7 AND p <= letters - 26 THEN y = y + 1 IF a$ = CHR$(8) AND LEN(name$) > 0 THEN name$ = LEFT$(name$, LEN(name$) - 1) IF a$ = " " AND LEN(name$) < 25 THEN name$ = name$ + letter$(p) SWAP vpage, dpage setvispage vpage WEND RETURN