|
From: Johnny O. <js...@us...> - 2010-10-28 20:46:23
|
Module: performous
Branch: opengl2
Commit: 43abd6dfe20a8d9d45c09b4fe64ab335cd49729a
Author: Tapio Vierros <tap...@gm...>
Date: Sun Oct 24 12:50:45 2010 +0300
Fix a float error.
---
game/screenmanager.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/game/screenmanager.cc b/game/screenmanager.cc
index ccdf6d2..640a678 100644
--- a/game/screenmanager.cc
+++ b/game/screenmanager.cc
@@ -2,6 +2,7 @@
#include "fs.hh"
#include "configuration.hh"
#include "glutil.hh"
+#include "util.hh"
#include <boost/thread.hpp>
#include <boost/lexical_cast.hpp>
@@ -42,7 +43,7 @@ Screen* ScreenManager::getScreen(std::string const& name) {
void ScreenManager::loading(std::string const& message, float progress) {
// TODO: Create a better one, this is quite ugly
- flashMessage(message + " " + boost::lexical_cast<std::string>(progress*100) + "%", 0.0f, 1.0f, 1.0f);
+ flashMessage(message + " " + boost::lexical_cast<std::string>(int(round(progress*100))) + "%", 0.0f, 1.0f, 1.0f);
m_window.blank();
drawNotifications();
const int maxi = 20;
|