Draw fps.
@@ -32,7 +32,10 @@ | ||
32 | 32 | #include "util/mm/mm.h" |
33 | 33 | #include "util/util.h" |
34 | 34 | |
35 | +#include "core/debug/debug_dip/debug_dip.h" | |
36 | +using namespace debug_dip; | |
35 | 37 | |
38 | + | |
36 | 39 | ///-- グローバル変数定義 |
37 | 40 | |
38 | 41 | class crender; |
@@ -26,6 +26,7 @@ | ||
26 | 26 | #include "service/Service_GameCtrl.h" |
27 | 27 | #include "mode/mode_manager.h" |
28 | 28 | |
29 | +#include "core/debug/fps_counter/fps_counter.h" | |
29 | 30 | |
30 | 31 | /*************************************************************************** |
31 | 32 | game( namespace ) |
@@ -109,5 +110,20 @@ | ||
109 | 110 | g_p_service_input->DebugDraw(); |
110 | 111 | #endif |
111 | 112 | } |
113 | + | |
114 | +#ifdef _DEBUG | |
115 | + if( IsDip( eDEBUG_DIP_DRAW_FPS ) ) | |
116 | + { | |
117 | + cu32 uFps ( fps_counter::fps_counter_get() ); | |
118 | + | |
119 | + TCHAR sz_temp[256] = {0}; | |
120 | + wsprintf( sz_temp, _T( "FPS : %d" ), uFps ); | |
121 | + | |
122 | + font_def::FontContext_t context; | |
123 | + context.uPosX = 10; | |
124 | + context.uPosY = 10; | |
125 | + g_p_font_gdi->Draw( sz_temp, context ); | |
126 | + } | |
127 | +#endif | |
112 | 128 | } |
113 | 129 |