mirror of
https://github.com/dpethes/rerogue.git
synced 2025-06-07 18:58:32 +02:00
terrain viewer: plug some more memleaks
This commit is contained in:
parent
5c623d9bbf
commit
d42f895773
@ -175,10 +175,10 @@ begin
|
||||
//init uv coords. block_texcoords is quite pessimistic
|
||||
SetLength(block_texcoords, VerticesPerBlock * terrain.TileHeight * terrain.TileWidth);
|
||||
for blk := 0 to Length(block_texcoords) div VerticesPerBlock - 1 do
|
||||
for y := 0 to 4 do
|
||||
for x := 0 to 4 do begin
|
||||
block_texcoords[blk*25 + y * 5 + x].init(x/4, 1 - y/4); //u, v
|
||||
end;
|
||||
for y := 0 to 4 do
|
||||
for x := 0 to 4 do begin
|
||||
block_texcoords[blk*VerticesPerBlock + y * 5 + x].init(x/4, 1 - y/4); //u, v
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TTerrainMesh.Destroy;
|
||||
@ -191,7 +191,9 @@ begin
|
||||
freemem(render_batches[i].normals);
|
||||
freemem(render_batches[i].face_indices);
|
||||
end;
|
||||
block_texcoords := nil;
|
||||
render_batches := nil;
|
||||
blocks := nil;
|
||||
terrain.Free;
|
||||
end;
|
||||
|
||||
|
@ -130,6 +130,7 @@
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<UseHeaptrc Value="True"/>
|
||||
<TrashVariables Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
|
Loading…
x
Reference in New Issue
Block a user