diff options
Diffstat (limited to '')
-rw-r--r-- | src/base/UFont.pas | 2 | ||||
-rw-r--r-- | 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; |