From 7435facee44cb0569b91e84da62187de507657d3 Mon Sep 17 00:00:00 2001 From: tobigun Date: Sat, 19 Jul 2008 13:02:15 +0000 Subject: PTexture added git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1212 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UTexture.pas | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Game/Code') diff --git a/Game/Code/Classes/UTexture.pas b/Game/Code/Classes/UTexture.pas index 3028fb71..0025a28c 100644 --- a/Game/Code/Classes/UTexture.pas +++ b/Game/Code/Classes/UTexture.pas @@ -1,6 +1,4 @@ unit UTexture; -// added for easier debug disabling -{$undef blindydebug} interface @@ -24,11 +22,12 @@ uses SDL_Image; type + PTexture = ^TTexture; TTexture = record TexNum: GLuint; X: real; Y: real; - Z: real; // new + Z: real; W: real; H: real; ScaleW: real; // for dynamic scalling while leaving width constant @@ -38,14 +37,14 @@ type ColR: real; ColG: real; ColB: real; - TexW: real; // used? - TexH: real; // used? + TexW: real; // percentage of width to use [0..1] + TexH: real; // percentage of height to use [0..1] TexX1: real; TexY1: real; TexX2: real; TexY2: real; Alpha: real; - Name: string; // 0.5.0: experimental for handling cache images. maybe it's useful for dynamic skins + Name: string; // experimental for handling cache images. maybe it's useful for dynamic skins end; type @@ -54,6 +53,7 @@ type TEXTURE_TYPE_TRANSPARENT, // Alpha is used TEXTURE_TYPE_COLORIZED // Alpha is used; Hue of the HSV color-model will be replaced by a new value ); + const TextureTypeStr: array[TTextureType] of string = ( 'Plain', @@ -65,14 +65,15 @@ function TextureTypeToStr(TexType: TTextureType): string; function ParseTextureType(const TypeStr: string; Default: TTextureType): TTextureType; type + PTextureEntry = ^TTextureEntry; TTextureEntry = record Name: string; Typ: TTextureType; Color: Cardinal; // we use normal TTexture, it's easier to implement and if needed - we copy ready data - Texture: TTexture; - TextureCache: TTexture; + Texture: TTexture; // Full-size texture + TextureCache: TTexture; // Thumbnail texture end; TTextureDatabase = record -- cgit v1.2.3