From: Ketmar Dark Date: Sat, 19 Aug 2017 12:33:16 +0000 (+0300) Subject: profiler cosmetix X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=243b29c59bbb6ff7ddb1f5822dc3de1be593660a;p=d2df-sdl.git profiler cosmetix --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index a50ce72..369f5ac 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -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(); diff --git a/src/game/g_map.pas b/src/game/g_map.pas index 85d5510..23fd6cb 100644 --- a/src/game/g_map.pas +++ b/src/game/g_map.pas @@ -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;