From 8329d42d3e592f4cd42cdfa586e2325ddc76c898 Mon Sep 17 00:00:00 2001 From: aura Date: Tue, 10 Mar 2026 01:35:50 +0100 Subject: perf profiler, simplify 2d render, string struct, many small things --- src/game/world/bsp.cpp | 9 +++++++++ src/game/world/draw.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/game/world') diff --git a/src/game/world/bsp.cpp b/src/game/world/bsp.cpp index b55593f..c4928a3 100644 --- a/src/game/world/bsp.cpp +++ b/src/game/world/bsp.cpp @@ -853,6 +853,15 @@ BSP* bsp_build_map( WORLD_MAP* m ) { } void bsp_free( BSP* bsp ) { + for( auto& it : bsp->faces ) { + it.verts.clear(); + it.render_verts.clear(); + } + for( auto& it : bsp->leaves ) + it.edges.clear(); + for( auto& it : bsp->portals ) + it.w.points.clear(); + delete bsp; } diff --git a/src/game/world/draw.cpp b/src/game/world/draw.cpp index aad4d09..2856edd 100644 --- a/src/game/world/draw.cpp +++ b/src/game/world/draw.cpp @@ -153,7 +153,7 @@ void world_draw_sprites( } } -void world_draw( GAME_DATA* game, WORLD* world, VEC2 window, VEC2 winsize ) { +void world_draw( GAME_DATA* game, WORLD* world, VEC2 window, VEC2 winsize ) { _profiled PLAYER* pl = objl->pl; VEC2 start = { pl->pos.x, pl->pos.y }; -- cgit v1.2.3