DEADSOFTWARE

profiler cosmetix
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Sat, 19 Aug 2017 12:33:16 +0000 (15:33 +0300)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Sat, 19 Aug 2017 13:28:00 +0000 (16:28 +0300)
src/game/g_game.pas
src/game/g_map.pas

index a50ce72609f18dfddfa5d3781b785dd0b16ad684..369f5ac58f4adb8068bed26d2afe20260d85981b 100644 (file)
@@ -2758,40 +2758,40 @@ type
   end;
 
 begin
-  profileFrameDraw.sectionBegin('map rendering');
+  profileFrameDraw.sectionBegin('total');
 
   // our accelerated renderer will collect all panels to gDrawPanelList
   // we can use panel tag to render level parts (see GridTagXXX in g_map.pas)
-  profileFrameDraw.sectionBegin('pancollect');
+  profileFrameDraw.sectionBegin('collect');
   if gdbg_map_use_accel_render then
   begin
     g_Map_CollectDrawPanels(sX, sY, sWidth, sHeight);
   end;
   profileFrameDraw.sectionEnd();
 
-  profileFrameDraw.sectionBegin('map background');
+  profileFrameDraw.sectionBegin('skyback');
   g_Map_DrawBack(backXOfs, backYOfs);
   profileFrameDraw.sectionEnd();
 
   if (setTransMatrix) then glTranslatef(transX, transY, 0);
 
-  drawPanelType('panel_back', PANEL_BACK);
-  drawPanelType('panel_step', PANEL_STEP);
+  drawPanelType('*back', PANEL_BACK);
+  drawPanelType('*step', PANEL_STEP);
   drawOther('items', @g_Items_Draw);
   drawOther('weapons', @g_Weapon_Draw);
   drawOther('shells', @g_Player_DrawShells);
   drawOther('drawall', @g_Player_DrawAll);
   drawOther('corpses', @g_Player_DrawCorpses);
-  drawPanelType('panel_wall', PANEL_WALL);
+  drawPanelType('*wall', PANEL_WALL);
   drawOther('monsters', @g_Monsters_Draw);
-  drawPanelType('panel_closedoor', PANEL_CLOSEDOOR);
+  drawPanelType('*door', PANEL_CLOSEDOOR);
   drawOther('gfx', @g_GFX_Draw);
   drawOther('flags', @g_Map_DrawFlags);
-  drawPanelType('panel_acid1', PANEL_ACID1);
-  drawPanelType('panel_acid2', PANEL_ACID2);
-  drawPanelType('panel_water', PANEL_WATER);
+  drawPanelType('*acid1', PANEL_ACID1);
+  drawPanelType('*acid2', PANEL_ACID2);
+  drawPanelType('*water', PANEL_WATER);
   drawOther('dynlights', @renderDynLightsInternal);
-  drawPanelType('panel_fore', PANEL_FORE);
+  drawPanelType('*fore', PANEL_FORE);
 
   if g_debug_HealthBar then
   begin
@@ -2838,7 +2838,7 @@ begin
     Exit;
   end;
 
-  if (profileFrameDraw = nil) then profileFrameDraw := TProfiler.Create('MAP RENDER', g_profile_history_size);
+  if (profileFrameDraw = nil) then profileFrameDraw := TProfiler.Create('RENDER', g_profile_history_size);
   profileFrameDraw.mainBegin(g_profile_frame_draw);
 
   gPlayerDrawn := p;
@@ -3266,7 +3266,7 @@ begin
                      Format('%d:%.2d:%.2d', [gTime div 1000 div 3600, (gTime div 1000 div 60) mod 60, gTime div 1000 mod 60]),
                      gStdFont);
 
-  drawProfilers();
+  if gGameOn then drawProfilers();
 end;
 
 procedure g_Game_Quit();
index 85d551047d36f4b5d0bb2980e4e18f91f5a7da72..23fd6cbd7a038b8237a4ce5a00e3bd23e14a887c 100644 (file)
@@ -267,14 +267,14 @@ var
 
 procedure g_Map_ProfilersBegin ();
 begin
-  if (profMapCollision = nil) then profMapCollision := TProfiler.Create('MAP COLLISION', g_profile_history_size);
+  if (profMapCollision = nil) then profMapCollision := TProfiler.Create('COLSOLID', g_profile_history_size);
   profMapCollision.mainBegin(g_profile_collision);
   // create sections
   if g_profile_collision then
   begin
-    profMapCollision.sectionBegin('wall coldet');
+    profMapCollision.sectionBegin('*solids');
     profMapCollision.sectionEnd();
-    profMapCollision.sectionBegin('liquid coldet');
+    profMapCollision.sectionBegin('liquids');
     profMapCollision.sectionEnd();
   end;
 end;
@@ -2193,7 +2193,7 @@ begin
 
   if (tagmask = 0) then begin result := false; exit; end; // just in case
 
-  if (profMapCollision <> nil) then profMapCollision.sectionBeginAccum('wall coldet');
+  if (profMapCollision <> nil) then profMapCollision.sectionBeginAccum('*solids');
   if gdbg_map_use_accel_coldet then
   begin
     if gdbg_map_use_tree_coldet then
@@ -2251,7 +2251,7 @@ var
 
 begin
   //TODO: detailed profile?
-  if (profMapCollision <> nil) then profMapCollision.sectionBeginAccum('liquid coldet');
+  if (profMapCollision <> nil) then profMapCollision.sectionBeginAccum('liquids');
   if gdbg_map_use_accel_coldet then
   begin
     texid := TEXTURE_NONE;