• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision50634c9b24b53797489d064f9e4b39011a47ee02 (tree)
Time2012-11-18 23:38:25
Authorshom5xg <shom@.(no...>
Commitershom5xg

Log Message

FPSカウンタ
--フォント描画は請け負わないように変更

Change Summary

Incremental Difference

--- a/core/src/core/debug/fps_counter/fps_counter.cpp
+++ b/core/src/core/debug/fps_counter/fps_counter.cpp
@@ -13,21 +13,19 @@
1313
1414 #ifdef _DEBUG
1515
16-#include "core/font/font.h"
17-
18-#include "core/app.h" //g_kFps
16+#include "core/font/Font_Def.h"
1917
2018
2119 ///-- グローバル変数,実体定義
2220
2321 namespace
2422 {
25- u32 s_uTimeBefore = timeGetTime();
26- u32 s_uCounter = 0;
23+ u32 s_uTimeBefore = timeGetTime();
24+ u32 s_uCounter = 0;
2725
2826 u32 s_uFps = 0;
2927
30- font_def::font_context_t s_FontCntext;
28+ font_def::FontContext_t s_FontCntext;
3129 }
3230
3331 ///--
@@ -38,9 +36,10 @@ namespace
3836 */
3937 void fps_counter::fps_counter_init()
4038 {
41- s_FontCntext.v2_pos = mm::get_v( 10.f, 10.f );
42- s_FontCntext.v2_size = mm::get_v2_all( 20.f );
43- s_FontCntext.color = COLOR_WHITE;
39+ s_FontCntext.uPosX = 10;
40+ s_FontCntext.uPosY = 10;
41+ s_FontCntext.v2Size = mm::get_v2_all( 20.f );
42+ s_FontCntext.uColor = COLOR_WHITE;
4443 }
4544
4645 /**
@@ -78,17 +77,9 @@ void fps_counter::fps_counter_update()
7877 /**
7978 * FPSテキスト描画
8079 */
81-void fps_counter::fps_counter_draw()
80+u32 fps_counter::fps_counter_get()
8281 {
83-#if 0
84- if( s_uFps < app::g_kFps )
85- {
86- char szMsg[256];
87- sprintf_s( szMsg, 256, "FPS:%d", s_uFps );
88-
89- in_pFont->Draw( szMsg, s_FontCntext );
90- }
91-#endif
82+ return s_uFps;
9283 }
9384
9485 #endif
--- a/core/src/core/debug/fps_counter/fps_counter.h
+++ b/core/src/core/debug/fps_counter/fps_counter.h
@@ -15,7 +15,7 @@ namespace fps_counter
1515 {
1616 extern void fps_counter_init();
1717 extern void fps_counter_update();
18- extern void fps_counter_draw();
18+ extern u32 fps_counter_get();
1919 }
2020
2121 #endif