Unit ui

Classes, Interfaces, Objects and Records
Types
Constants

Description

User Interface - Unit responsible for displaying messages and screens

Uses

Overview

Functions and Procedures

procedure TextOut(X, Y: word; textcol: shortstring; const S: string);
procedure screenBlank;
procedure setupScreen(yn: byte);
procedure shutdownScreen;
procedure displayStatusEffect(onoff: byte; effectType: shortstring);
procedure redrawStatusEffects;
procedure displayMessage(message: shortstring);
procedure bufferMessage(message: shortstring);
procedure writeBufferedMessages;
procedure restoreMessages;
procedure updateLevel;
procedure updateXP;
procedure updateHealth;
procedure updateMagick;
procedure updateAttack;
procedure updateDefence;
procedure updateDexterity;
procedure updateWeapon;
procedure updateArmour;
procedure exitPrompt;
procedure clearStatusBar;
procedure exitMessage;
procedure displayDialog(title, message: shortstring);
procedure welcome;
function centreX(textstring: shortstring): byte;
procedure clearPopup;

Variables

bewilderedStatusSet: boolean;
buffer: shortstring;
displayCol: smallint;
displayRow: smallint;
equippedArmour: shortstring;
equippedWeapon: shortstring;
frozenStatusSet: boolean;
messageArray: array[1..7] of shortstring = (' ', ' ', ' ', ' ', ' ', ' ', ' ');
poisonStatusSet: boolean;
vid: TVideoMode;
x: smallint;
y: smallint;

Description

Functions and Procedures

procedure TextOut(X, Y: word; textcol: shortstring; const S: string);

Write to the screen

procedure screenBlank;

Blank the screen

procedure setupScreen(yn: byte);

Initialise the video unit

procedure shutdownScreen;

Shutdown the video unit

procedure displayStatusEffect(onoff: byte; effectType: shortstring);

Display status effects

procedure redrawStatusEffects;

Redraw status effects when reloading screen

procedure displayMessage(message: shortstring);

Write text to the message log

procedure bufferMessage(message: shortstring);

Store all messages from players turn

procedure writeBufferedMessages;

Write buffered message to the message log

procedure restoreMessages;

Restore message window after showing a menu

procedure updateLevel;

Update Level number

procedure updateXP;

Update Experience points display

procedure updateHealth;

Update player health display

procedure updateMagick;

Update player magick display

procedure updateAttack;

Update player attack value

procedure updateDefence;

Update player defence value

procedure updateDexterity;

Update player dexterity value

procedure updateWeapon;

Display equipped weapon

procedure updateArmour;

Display equipped armour

procedure exitPrompt;

Display Quit Game confirmation

procedure clearStatusBar;

Clears the status bar message

procedure exitMessage;

Clear screen and write exit message

procedure displayDialog(title, message: shortstring);

Dialog box

procedure welcome;

Display welcome message

function centreX(textstring: shortstring): byte;

Get X coordinate to centre a string

procedure clearPopup;

Redraw map after a pop-up closes

Variables

bewilderedStatusSet: boolean;

Status effects

buffer: shortstring;
 
displayCol: smallint;
 
displayRow: smallint;
 
equippedArmour: shortstring;
 
equippedWeapon: shortstring;
 
frozenStatusSet: boolean;

Status effects

messageArray: array[1..7] of shortstring = (' ', ' ', ' ', ' ', ' ', ' ', ' ');
 
poisonStatusSet: boolean;

Status effects

vid: TVideoMode;

CRT unit is just to clear the screen on exit

x: smallint;
 
y: smallint;
 

Generated by PasDoc 0.16.0.