tips:revmedia:subs24

VIDEO.RW

Published ByDateVersionKnowledge LevelKeywords
Revelation Technologies14 NOV 19892.XEXPERTVIDEO.RW,

VIDEO.RW reads, writes, or clears the specified display area.

lcol

An integer indicating the starting column of the display area

top.row

An integer indicating the top row of the display area.

rcol

An integer indicating the ending column of the display area

bot.row

An integer indicating the bottom row of the display area

operator

One of the following operators specifying the function VIDEO.RW is to perform:

OperatorFunction
RSave (read) the specified area of the display
WRestore (write) the specified area of the display
CClear the specified area of the display

image

A variable whose value is determined by the operator specified:

OperatorValue
RA variable used by VIDEO.RW to save the display image described by the coordinates specified in the argument list. Multiple full-screen save operations should be avoided to conserve memory. Each screen saved requires approximately 4K.
WThe display image saved in the preceding read operation. The display image is written to the coordinates specified in the argument list.
CA two-byte sequence specifying the background character and foreground<$Ivideo attribute> video attribute. The background character defaults to space, and the foreground attribute to Normal. For a standard monochrome display, image may be null (see Appendix 3, Video Attributes).

If a read or write operation is specified, VIDEO.RW passes the display image in the image parameter of the argument list.

*Initialization for each example 
DECLARE SUBROUTINE VIDEO.RW,MSG 
 
*Save full screen image, clear using default attributes, display *message, and restore 
VIDEO.RW(0,0,@CRTWIDE-1,@CRTMAXHIGH- 1,'R',IMAGE) 
VIDEO.RW(0,0,@CRTWIDE-1,@CRTMAXHIGH-1,'C','') 
MSG('Saved the status line as well','','','') 
VIDEO.RW(0,0,@CRTWIDE-1,@CRTMAXHIGH-1,'W',IMAGE) 
 
*Save half screen image, clear, display message, and restore 
VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'R',IMAGE) 
VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'C','') 
MSG('Cleared fully half','','','') 
VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'W',IMAGE) 
 
*Save partial screen image, clear, display message, and restore 
VIDEO.RW(20,10,60,20,'R',IMAGE) 
VIDEO.RW(20,10,60,20,'C','') 
MAP = '' 
TYPE = 1 
COL = 3 
ROW = 4 
MAP<TYPE> = 'A' 
MAP<COL> = 24 
MAP<ROW> = 16 
MSG('Window',MAP,'','') 
VIDEO.RW(20,10,60,20,'W',IMAGE) 

*For color displays only: Save partial screen image, clear color *display and set background attributes, display message, and  
*restore (see Appendix 3, Video Attributes). 
BACK.CHAR = '*'          ;* background fill character 
BACKGROUND = 5           ;* background video attribute 
FOREGROUND = 14          ;* foreground video attribute 
COLOR = (BACKGROUND * 16) + FOREGROUND ;* color formula 
COLOR = CHAR(COLOR) 
ATTRIBUTES = BACK.CHAR:COLOR<E> 
 
VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'R',IMAGE) 
VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'C',ATTRIBUTES) 
MSG('Clear half with a background color change','','','') 
VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'W',IMAGE) 
 
*For color displays only: the same example as above, but using *the current video settings in the system variable @ENVIRON.SET. 
$INSERT UTILITY.PROGS,ENVIRON.CONSTANTS 
*Background fill character 
BACK.CHAR = @ENVIRON.SET<E.BACK.CHAR>
*Background video attribute 
BACKGROUND = @ENVIRON.SET<E.BG.BACK.CHAR>[4,1]   
*Foreground video attribute 
FOREGROUND = @ENVIRON.SET<E.BG.FORE.COLOR>[4,1]   
COLOR = (BACKGROUND * 16) + FOREGROUND ;* color formula 
COLOR = CHAR(COLOR) 
ATTRIBUTES = BACK.CHAR:COLOR<E> 
 
VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'R',IMAGE) 
VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'C',ATTRIBUTES) 
MSG('Clear half with a background color change','','','') 
VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'W',IMAGE)
  • tips/revmedia/subs24.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1