summaryrefslogtreecommitdiff
path: root/src/game/world
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-03-10 01:35:50 +0100
committeraura <nw@moneybot.cc>2026-03-10 01:35:50 +0100
commit8329d42d3e592f4cd42cdfa586e2325ddc76c898 (patch)
treedec7e2a733bfc6b6384936c1f3ed067a42b59bb9 /src/game/world
parent8ae8c85e9d3806cdb726e07f37e1b49484c5c48e (diff)
perf profiler, simplify 2d render, string struct, many small things
Diffstat (limited to 'src/game/world')
-rw-r--r--src/game/world/bsp.cpp9
-rw-r--r--src/game/world/draw.cpp2
2 files changed, 10 insertions, 1 deletions
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 };