aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx
diff options
context:
space:
mode:
authorMax Horn2010-10-13 10:51:20 +0000
committerMax Horn2010-10-13 10:51:20 +0000
commit85fa23afbe08d6296d716321d95214042d70f9ac (patch)
treef14d491c57cab5078a74c0561fbd38af1914103a /engines/sword25/gfx
parentb3c352d1fee37831408c43155cca91f3d8e42764 (diff)
downloadscummvm-rg350-85fa23afbe08d6296d716321d95214042d70f9ac.tar.gz
scummvm-rg350-85fa23afbe08d6296d716321d95214042d70f9ac.tar.bz2
scummvm-rg350-85fa23afbe08d6296d716321d95214042d70f9ac.zip
SWORD25: Get rid of kernel/bs_stdint.h
svn-id: r53405
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r--engines/sword25/gfx/framecounter.cpp4
-rw-r--r--engines/sword25/gfx/framecounter.h12
-rw-r--r--engines/sword25/gfx/graphicengine.h1
-rw-r--r--engines/sword25/gfx/image/imageloader.h1
-rw-r--r--engines/sword25/gfx/image/vectorimage.cpp1
5 files changed, 11 insertions, 8 deletions
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<int>((1000000 * (uint64_t)m_FPSCount) / (Timer - m_LastUpdateTime));
+ m_FPS = static_cast<int>((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"