home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
dos
/
prg
/
bas
/
hanlin3
/
pbc30a
/
clrarea.bas
< prev
next >
Wrap
BASIC Source File
|
1994-03-13
|
1KB
|
38 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone Copyright (c) 1990-1994 Thomas G. Hanlin III |
' | |
' +----------------------------------------------------------------------+
DECLARE FUNCTION Rand% (BYVAL Range%)
DECLARE SUB CalcSize (BYVAL TopRow%, BYVAL LeftCol%, BYVAL BottomRow%, BYVAL RightCol%, Elements%)
DECLARE SUB DelayV (BYVAL MilliSeconds%)
DECLARE SUB GetVidMode (BIOSMode%, ScreenWidth%, ActivePage%)
DECLARE SUB XQPrint (St$, BYVAL Row%, BYVAL Column%, BYVAL Attr%, BYVAL Page%, BYVAL Fast%)
TYPE Posn
Row AS INTEGER
Col AS INTEGER
END TYPE
SUB ClearArea (TopRow%, LeftCol%, BottomRow%, RightCol%, Attr%, Fast%)
GetVidMode BIOSMode%, ScrWidth%, Page%
CalcSize TopRow%, LeftCol%, BottomRow%, RightCol%, ArraySize%
DIM Place(1 TO ArraySize%) AS Posn
tmp% = 1
FOR TRow% = TopRow% TO BottomRow%
FOR TCol% = LeftCol% TO RightCol%
Place(tmp%).Row = TRow%
Place(tmp%).Col = TCol%
tmp% = tmp% + 1
NEXT
NEXT
FOR tmp% = 1 TO ArraySize%
SWAP Place(tmp%), Place(Rand%(ArraySize%) + 1)
NEXT
FOR tmp% = 1 TO ArraySize%
XQPrint " ", Place(tmp%).Row, Place(tmp%).Col, Attr%, Page%, Fast%
DelayV 1
NEXT
END SUB