Unit items

Description

Items and objects in the game world

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Record Item  

Functions and Procedures

procedure initialiseItems;
procedure drawItemsOnMap(id: byte);
function containsItem(x, y: smallint): boolean;
function getItemName(x, y: smallint): shortstring;
function getItemDescription(x, y: smallint): shortstring;
function getItemID(x, y: smallint): smallint;
function getItemGlyph(x, y: smallint): shortstring;
function getItemColour(x, y: smallint): shortstring;
function getItemType(x, y: smallint): tItem;
function isItemThrowable(x, y: smallint): boolean;
function getThrowDamage(x, y: smallint): smallint;
procedure checkForTraps;
function countNonEmptyItems: byte;
procedure redrawItems;

Types

tItem = (...);
TitemList = array of Item;
tMaterial = (...);

Variables

indexID: smallint;
itemList: TitemList;

Description

Functions and Procedures

procedure initialiseItems;

Generate list of items on the map

procedure drawItemsOnMap(id: byte);

Update the map display to show all items

function containsItem(x, y: smallint): boolean;

Is there an item at coordinates

function getItemName(x, y: smallint): shortstring;

Get name of item at coordinates

function getItemDescription(x, y: smallint): shortstring;

Get description of item at coordinates

function getItemID(x, y: smallint): smallint;

Get item ID at coordinates

function getItemGlyph(x, y: smallint): shortstring;

Get the item glyph at coordinates

function getItemColour(x, y: smallint): shortstring;

Get the glyph colour at coordinates

function getItemType(x, y: smallint): tItem;

Get item type

function isItemThrowable(x, y: smallint): boolean;

Is item on floor throwable

function getThrowDamage(x, y: smallint): smallint;

Get the Throw Damage at coordinates

procedure checkForTraps;

Check to see if a trap has been triggered

function countNonEmptyItems: byte;

Count non-empty items in array

procedure redrawItems;

Redraw all items

Types

tItem = (...);
 
Values
  • itmDrink
  • itmWeapon
  • itmArmour
  • itmQuest
  • itmProjectile
  • itmEmptySlot
  • itmProjectileWeapon
  • itmAmmo
  • itmLightSource
  • itmTrap
  • itmTreasure
TitemList = array of Item;
 
tMaterial = (...);
 
Values
  • matSteel
  • matIron
  • matWood
  • matLeather
  • matWool
  • matPaper
  • matFlammable
  • matStone
  • matGlass
  • matEmpty
  • matBone
  • matGold

Variables

indexID: smallint;
 
itemList: TitemList;
 

Generated by PasDoc 0.16.0.