Graphics Drawing Functions


Certain Hook Scripts are responsible for drawing information on the display. The first among these is the Hook that is responsible for drawing the 'CHARACTER/VIEW' screen. This document is an attempt to describe the available graphics functions. If you examine the Special Ability named “Global_Display”, you will find a Script named “CharacterViewScreen”. Studying this script will probably help you understand what I try to say in the following document.


Very few numbers appear in these graphics scripts. Almost all the functions require their (usually singular) parameter to be a previously defined value. The function “$GrSet” is used to define locations on the screen, spacing between text fields, etc. Each defined value has an arbitrary name and two integer values which are commonly x- and y-values. We will call these names and their values “vname”. For example (notice the third example particularly):


$GrSet( “TopLeft”, 18,18); // the uppermost/leftmost text location

$GrSet( “This is the way we wash our clothes”, 430, 00); // My income

$GrSet( “Toast”, “TopLeft”, 220); // Result will be (18,220).


There are several pre-defined variables:

Many of the functions affect one or more of these. When Text is printed, it is generally printed at the “Cursor” location. Several functions change the “Anchor” and simultaneously set the “Cursor” to the “Anchor”. Here is a list of functions, their effect on the screen, and their effects on the 'hidden' variables:


Function

Effect

Anchor effect

Cursor effect

$GrSet(name, integer, integer)

Sets the named variable to the value of the two integers. Either or both integers can be replaced with a vname. The appropriate value of vname will be used.



$GrPrint(text)

Display text


Advanced to right

$GrPrtLF(text)

Display text

Add “Linefeed” value

Set to new Anchor

$GrMoveTo(vname)


Set to value

Set to new Anchor

$GrMove(vname)


Add Value

Set to new Anchor

$GrColor(color_name)

Changes color of subsequent text

See possible colors below.



$GrMark(vname)

Sets vname to the current value of “Cursor”



$GrTab(vname)



vname + anchor


These are the allowed Color values: “WHITE”, “GREEN”, “RED”, and “YELLOW”.