From 85fa23afbe08d6296d716321d95214042d70f9ac Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 13 Oct 2010 10:51:20 +0000 Subject: SWORD25: Get rid of kernel/bs_stdint.h svn-id: r53405 --- engines/sword25/gfx/framecounter.cpp | 4 ++-- engines/sword25/gfx/framecounter.h | 12 +++++++++--- engines/sword25/gfx/graphicengine.h | 1 - engines/sword25/gfx/image/imageloader.h | 1 - engines/sword25/gfx/image/vectorimage.cpp | 1 - 5 files changed, 11 insertions(+), 8 deletions(-) (limited to 'engines/sword25/gfx') diff --git a/engines/sword25/gfx/framecounter.cpp b/engines/sword25/gfx/framecounter.cpp index 15bc7d00ea..e152e4429e 100644 --- a/engines/sword25/gfx/framecounter.cpp +++ b/engines/sword25/gfx/framecounter.cpp @@ -46,7 +46,7 @@ Framecounter::Framecounter(int UpdateFrequency) : void Framecounter::Update() { // Aktuellen Systemtimerstand auslesen - uint64_t Timer = g_system->getMillis() * 1000; + uint64 Timer = g_system->getMillis() * 1000; // Falls m_LastUpdateTime == -1 ist, wird der Frame-Counter zum ersten Mal aufgerufen und der aktuelle Systemtimer als erster // Messzeitpunkt genommen. @@ -58,7 +58,7 @@ void Framecounter::Update() { // Falls der Messzeitraum verstrichen ist, wird die durchschnittliche Framerate berechnet und ein neuer Messzeitraum begonnen. if (Timer - m_LastUpdateTime >= m_UpdateDelay) { - m_FPS = static_cast((1000000 * (uint64_t)m_FPSCount) / (Timer - m_LastUpdateTime)); + m_FPS = static_cast((1000000 * (uint64)m_FPSCount) / (Timer - m_LastUpdateTime)); m_LastUpdateTime = Timer; m_FPSCount = 0; } diff --git a/engines/sword25/gfx/framecounter.h b/engines/sword25/gfx/framecounter.h index 8a8402a3bb..dcfae8acbf 100644 --- a/engines/sword25/gfx/framecounter.h +++ b/engines/sword25/gfx/framecounter.h @@ -37,15 +37,21 @@ // Includes #include "sword25/kernel/common.h" -#include "sword25/kernel/bs_stdint.h" namespace Sword25 { + /** * A simple class that implements a frame counter */ class Framecounter { private: + + // TODO: This class should be rewritten based on Audio::Timestamp, + // which provides higher accuracy and avoids using 64 bit data types. + typedef unsigned long long uint64; + typedef signed long long int64; + enum { DEFAULT_UPDATE_FREQUENCY = 10 }; @@ -79,8 +85,8 @@ public: private: int m_FPS; int m_FPSCount; - int64_t m_LastUpdateTime; - uint64_t m_UpdateDelay; + int64 m_LastUpdateTime; + uint64 m_UpdateDelay; }; // Inlines diff --git a/engines/sword25/gfx/graphicengine.h b/engines/sword25/gfx/graphicengine.h index ecbfa377c8..d3443f42f2 100644 --- a/engines/sword25/gfx/graphicengine.h +++ b/engines/sword25/gfx/graphicengine.h @@ -49,7 +49,6 @@ #include "common/str.h" #include "graphics/surface.h" #include "sword25/kernel/common.h" -#include "sword25/kernel/bs_stdint.h" #include "sword25/kernel/resservice.h" #include "sword25/kernel/persistable.h" #include "sword25/gfx/framecounter.h" diff --git a/engines/sword25/gfx/image/imageloader.h b/engines/sword25/gfx/image/imageloader.h index aae48a083c..e895f339e6 100644 --- a/engines/sword25/gfx/image/imageloader.h +++ b/engines/sword25/gfx/image/imageloader.h @@ -43,7 +43,6 @@ #define SWORD25_IMAGELOADER_H // Includes -#include "sword25/kernel/bs_stdint.h" #include "sword25/kernel/common.h" #include "sword25/gfx/graphicengine.h" diff --git a/engines/sword25/gfx/image/vectorimage.cpp b/engines/sword25/gfx/image/vectorimage.cpp index c2a80cb5f2..5c15c4771a 100644 --- a/engines/sword25/gfx/image/vectorimage.cpp +++ b/engines/sword25/gfx/image/vectorimage.cpp @@ -36,7 +36,6 @@ // Includes // ----------------------------------------------------------------------------- -#include "sword25/kernel/bs_stdint.h" #include "sword25/gfx/image/art.h" #include "sword25/gfx/image/vectorimage.h" #include "sword25/gfx/image/renderedimage.h" -- cgit v1.2.3