home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
dirs
/
cross_464.lzh
/
Cross
/
txt
/
CPCPrint.mod
< prev
next >
Wrap
Text File
|
1991-03-09
|
1KB
|
84 lines
IMPLEMENTATION MODULE CPCPrint;
FROM ASCII IMPORT nul;
FROM CPCGads IMPORT ForceShowCommands;
FROM CPCGlobal IMPORT screen,window,rastport,yoff,topaz;
FROM Graphics IMPORT SetAPen,SetFont,TextFontPtr,ClearScreen;
FROM IntuiIO IMPORT ScreenRastPort;
IMPORT IntuiIO;
FROM Intuition IMPORT ScreenPtr,ShowTitle;
FROM Strings IMPORT Length;
FROM SYSTEM IMPORT ADR,CAST;
CONST
xsize=8;
ysize=8;
spcs=" ";
VAR initialized: BOOLEAN;
cursorx,cursory: INTEGER;
PROCEDURE Print(a: ARRAY OF CHAR; n: INTEGER);
BEGIN
SetFont(rastport,topaz);
IntuiIO.Print(window,a,cursorx*xsize,cursory*ysize+yoff);
cursory:=cursory+n;
IF n=0 THEN
cursorx:=cursorx+Length(a);
ELSE
cursorx:=0;
END;
END Print;
PROCEDURE PrintAtC(cx,cy: INTEGER; c: CHAR);
VAR
a: ARRAY[0..1] OF CHAR;
BEGIN
cursorx:=cx;
cursory:=cy;
a[0]:=c;
a[1]:=nul;
Print(a,0);
END PrintAtC;
PROCEDURE PrintAtS(cx,cy: INTEGER; a: ARRAY OF CHAR);
BEGIN
cursorx:=cx;
cursory:=cy;
Print(a,0);
END PrintAtS;
PROCEDURE ClrLine(l: INTEGER);
BEGIN
PrintAtS(0,l,spcs);
cursorx:=0;
END ClrLine;
PROCEDURE Cls;
BEGIN
ClearScreen(ScreenRastPort(screen));
cursorx:=0;
cursory:=0;
ShowTitle(CAST(ScreenPtr,screen),TRUE);
ForceShowCommands;
END Cls;
END CPCPrint.