From f0c6afbad0f3e7853b693c27f65fdf761ca1c9ab Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sat, 22 Nov 2014 22:04:21 +0000 Subject: Remove unused function LoadTexture() with parameter FromRegistry. Thanks to rudi_s. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3101 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UFont.pas | 2 +- src/base/UTexture.pas | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/base/UFont.pas b/src/base/UFont.pas index e680811b..0249b665 100644 --- a/src/base/UFont.pas +++ b/src/base/UFont.pas @@ -2835,7 +2835,7 @@ constructor TBitmapFont.Create(const Filename: IPath; Outline: integer; begin inherited Create(Filename); - fTex := Texture.LoadTexture(true, Filename, TEXTURE_TYPE_TRANSPARENT, 0); + fTex := Texture.LoadTexture(Filename, TEXTURE_TYPE_TRANSPARENT, 0); fTexSize := 1024; fOutline := Outline; fBaseline := Baseline; diff --git a/src/base/UTexture.pas b/src/base/UTexture.pas index c1334dd7..fb31a9b0 100644 --- a/src/base/UTexture.pas +++ b/src/base/UTexture.pas @@ -119,7 +119,6 @@ type procedure AddTexture(var Tex: TTexture; Typ: TTextureType; Color: cardinal; Cache: boolean = false); overload; function GetTexture(const Name: IPath; Typ: TTextureType; FromCache: boolean = false): TTexture; overload; function GetTexture(const Name: IPath; Typ: TTextureType; Col: LongWord; FromCache: boolean = false): TTexture; overload; - function LoadTexture(FromRegistry: boolean; const Identifier: IPath; Typ: TTextureType; Col: LongWord): TTexture; overload; function LoadTexture(const Identifier: IPath; Typ: TTextureType; Col: LongWord): TTexture; overload; function LoadTexture(const Identifier: IPath): TTexture; overload; function CreateTexture(Data: PChar; const Name: IPath; Width, Height: word; BitsPerPixel: byte): TTexture; @@ -236,12 +235,6 @@ begin TextureDatabase.AddTexture(Tex, Typ, Color, Cache); end; -function TTextureUnit.LoadTexture(FromRegistry: boolean; const Identifier: IPath; Typ: TTextureType; Col: LongWord): TTexture; -begin - // FIXME: what is the FromRegistry parameter supposed to do? - Result := LoadTexture(Identifier, Typ, Col); -end; - function TTextureUnit.LoadTexture(const Identifier: IPath): TTexture; begin Result := LoadTexture(Identifier, TEXTURE_TYPE_PLAIN, 0); @@ -382,7 +375,6 @@ begin if (FromCache) then begin - // use texture TextureIndex := TextureDatabase.FindTexture(Name, Typ, Col); if (TextureIndex > -1) then Result := TextureDatabase.Texture[TextureIndex].TextureCache; @@ -408,7 +400,7 @@ begin // load full texture if (TextureDatabase.Texture[TextureIndex].Texture.TexNum = 0) then - TextureDatabase.Texture[TextureIndex].Texture := LoadTexture(false, Name, Typ, Col); + TextureDatabase.Texture[TextureIndex].Texture := LoadTexture(Name, Typ, Col); // use texture Result := TextureDatabase.Texture[TextureIndex].Texture; -- cgit v1.2.3