CAST II Game Engine

   MAIN       FEATURES       SCREENSHOTS       FORUMS       MANUAL       DOWNLOADS       CONTACTS   
Units
Class Hierarchy
Classes, Interfaces and Objects
Types
Enumerations
Variables
Constants
Functions and Procedures
Identifiers

Unit Props

Description

Item properties support unit

(C) 2004 George "Mirage" Bakhtadze. www.casteng.com
The source code may be used under either MPL 1.1 or LGPL 2.1 license. See included license.txt file
Unit contains a generic properties support implementation

Classes, Interfaces and Objects

NameDescription
Class TBaseFileConfig 
Class TFileConfig 
Class TNiceFileConfig 
Class TPropertiesMain properties class

Functions and Procedures

Overview

procedure AddColor4sProperty(Properties: TProperties; const Name: string; const Color: TColor4s);
procedure AddColorProperty(Properties: TProperties; const Name: string; const Color: TColor);
procedure CopyProperty(const SrcProp: TProperty; var DestProp: TProperty);
function SetColor4sProperty(Properties: TProperties; const Name: string; var Res: TColor4s): Boolean;
function SetColorProperty(Properties: TProperties; const Name: string; var Res: TColor): Boolean;

Description

procedure AddColor4sProperty(Properties: TProperties; const Name: string; const Color: TColor4s);

Adds to Properties a TColor4s value as four floating-point components and one color property

procedure AddColorProperty(Properties: TProperties; const Name: string; const Color: TColor);

Adds to Properties a TColor value as four floating-point components and one color property

procedure CopyProperty(const SrcProp: TProperty; var DestProp: TProperty);

 

function SetColor4sProperty(Properties: TProperties; const Name: string; var Res: TColor4s): Boolean;

Sets a color property in Properties with the given in Res value.
Returns the resulting value in Res and True if new Res value differs from the initial one

function SetColorProperty(Properties: TProperties; const Name: string; var Res: TColor): Boolean;

Sets a color property in Properties with the given in Res value.
Returns the resulting value in Res and True if new Res value differs from the initial one

Types

Overview

PProperty = ^TProperty;
TPOptions = set of TPOption;
TProperty = packed record Name, Value, Enumeration, Description: string; ValueType: Integer; Options: TPOptions; end;
TPropertyDelegate = function(const Key: TProperty; var CustomData: Integer): Boolean of object;
TString = string;

Description

PProperty = ^TProperty;

 

TPOptions = set of TPOption;

Property options set

TProperty = packed record Name, Value, Enumeration, Description: string; ValueType: Integer; Options: TPOptions; end;

Property data structure.
Name - property name. Should be unique within TProperties.
Value - property value.
Enumeration - a set of string values, separated by StringDelimiter, determining possible values for Value.
Description - property description.
ValueType - property value type.
Options - property option set.

TPropertyDelegate = function(const Key: TProperty; var CustomData: Integer): Boolean of object;

A delegate used in ForEach method

TString = string;

 

Enumerations

TPOption
Possible property options
 poHiddenthe property is hidden in an editor
 poReadonlythe property is read-only
 poDerivativethe property is a derivative from other values so can not be changed directly
 poDecorforces the set to be 32-bit

Constants

Overview

bvOff = 0;
bvOn = 1;
OnOffEnum = 'Off' + StringDelimiter + 'On';
OnOffStr : array[False..True] of string[3] = ('Off', 'On');
PropertiesFileSignature : TFileSignature = 'PC00';
PropsCapacityStep = 32;
vtBinary = 9;
vtBoolean = 6;
vtColor = 5;
vtDouble = 10;
vtEnumerated = 7;
vtInt = 2;
vtNat = 1;
vtNone = 0;
vtObjectLink = 8;
vtSingle = 3;
vtString = 4;

Description

bvOff = 0;

Off, no, etc

bvOn = 1;

On, yes, etc

OnOffEnum = 'Off' + StringDelimiter + 'On';

Boolean values enumeration

OnOffStr : array[False..True] of string[3] = ('Off', 'On');

Boolean value strings

PropertiesFileSignature : TFileSignature = 'PC00';

File signature

PropsCapacityStep = 32;

Properties collection grow step

vtBinary = 9;

Bynary data. Enumeration used to specify data size.

vtBoolean = 6;

Boolean value

vtColor = 5;

Color value

vtDouble = 10;

Double-precision floating-point value

vtEnumerated = 7;

Enumerated value. Enumeration used to specify possible options.

vtInt = 2;

Integer value

vtNat = 1;

Unsigned integer (natural) value

vtNone = 0;

No value

vtObjectLink = 8;

A link to an object

vtSingle = 3;

Single-precision floating-point value

vtString = 4;

String value

Last modified: 26 Oct, 2008
Copyright (C) 2006-2008, casteng.com