summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 92cb2a1)
raw | patch | inline | side by side (parent: 92cb2a1)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 16 Feb 2023 18:17:57 +0000 (21:17 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 09:14:23 +0000 (12:14 +0300) |
src/game/renders/opengl/r_map.pas | patch | blob | history |
index 26a15dc4881d3e97f1a621ae2dbd4a518794cd05..c008f432def97874c3cce8089a30e1ce109847d5 100644 (file)
r_Common_FreeAndNil(Items[i].tex);
end;
+ procedure r_Map_FreeTextures;
+ var i: Integer;
+ begin
+ plist.Clear;
+ r_Common_FreeAndNil(SkyTexture);
+ if RenTextures <> nil then
+ for i := 0 to High(RenTextures) do
+ r_Common_FreeAndNil(RenTextures[i].tex);
+ SetLength(RenTextures, 0);
+ end;
+
procedure r_Map_LoadTextures;
const DefaultAnimInfo: TAnimInfo = (loop: true; delay: 1; frames: 1; back: false);
var i, n: Integer; txt: TAnimTextInfo;
begin
+ r_Map_FreeTextures;
if Textures <> nil then
begin
n := Length(Textures);
plist.Clear;
end;
- procedure r_Map_FreeTextures;
- var i: Integer;
- begin
- plist.Clear;
- r_Common_FreeAndNil(SkyTexture);
- if RenTextures <> nil then
- for i := 0 to High(RenTextures) do
- r_Common_FreeAndNil(RenTextures[i].tex);
- SetLength(RenTextures, 0);
- end;
-
procedure r_Map_DrawPanel (p: TPanel);
var Texture: Integer; t: TGLMultiTexture; tex: TGLTexture; count, frame: LongInt; a: TAnimInfo;
begin