summaryrefslogtreecommitdiff
path: root/src/interface
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-24 13:58:39 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-24 13:58:39 (GMT)
commit603cf3149df2fc788303207162bf29e05bd29816 (patch)
tree1e2f9c7ddf3c01a67bc50426806e598a595a1e40 /src/interface
parente65e222f2ccbf60a4c224bbe29884ebb1001cfd7 (diff)
downloadpowder-603cf3149df2fc788303207162bf29e05bd29816.zip
powder-603cf3149df2fc788303207162bf29e05bd29816.tar.gz
HUD improvements
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/Engine.cpp2
-rw-r--r--src/interface/Engine.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp
index 5f237a9..07c4203 100644
--- a/src/interface/Engine.cpp
+++ b/src/interface/Engine.cpp
@@ -182,9 +182,11 @@ void Engine::Draw()
if(state_)
state_->DoDraw();
+#ifdef DEBUG
char fpsText[512];
sprintf(fpsText, "FPS: %.2f, Delta: %.3f", fps, dt);
ui::Engine::Ref().g->drawtext(10, 10, fpsText, 255, 255, 255, 255);
+#endif
g->Finalise();
FrameIndex++;
FrameIndex %= 7200;
diff --git a/src/interface/Engine.h b/src/interface/Engine.h
index 9acba62..824f968 100644
--- a/src/interface/Engine.h
+++ b/src/interface/Engine.h
@@ -41,6 +41,7 @@ namespace ui
void Draw();
void SetFps(float fps);
+ inline float GetFps() { return fps; };
inline int GetMouseX() { return mousex_; }
inline int GetMouseY() { return mousey_; }