CAST II Game Engine |
||||||||
![]() |
MAIN | FEATURES | SCREENSHOTS | FORUMS | MANUAL | DOWNLOADS | CONTACTS | |
(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
| Name | Description |
|---|---|
Class TBaseFileConfig | |
Class TFileConfig | |
Class TNiceFileConfig | |
Class TProperties | Main properties class |
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; |
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
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; |
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; |
TPOption | ||
| Possible property options | ||
poHidden | the property is hidden in an editor | |
poReadonly | the property is read-only | |
poDerivative | the property is a derivative from other values so can not be changed directly | |
poDecor | forces the set to be 32-bit | |
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; |
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 |