summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-07-13 13:03:20 +0000
committerpeter1138 <peter1138@openttd.org>2007-07-13 13:03:20 +0000
commit3f4a0eb80611c2a8e0788178d3a97d79bbd11d27 (patch)
tree79b9e0b34f3c0bb1ec1d5d434d7fd54442b5b7bc /src/video
parent9b105c28bde041a76511a82d00d5a617a9cb31c6 (diff)
downloadopenttd-3f4a0eb80611c2a8e0788178d3a97d79bbd11d27.tar.xz
(svn r10542) -Codechange: use class member instead of global variable for null ticks value
Diffstat (limited to 'src/video')
-rw-r--r--src/video/null_v.cpp5
-rw-r--r--src/video/null_v.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/video/null_v.cpp b/src/video/null_v.cpp
index 6a0abc6b1..81eed708c 100644
--- a/src/video/null_v.cpp
+++ b/src/video/null_v.cpp
@@ -10,11 +10,10 @@
#include "null_v.h"
static FVideoDriver_Null iFVideoDriver_Null;
-static uint _null_ticks = 0;
const char *VideoDriver_Null::Start(const char* const *parm)
{
- _null_ticks = GetDriverParamInt(parm, "ticks", 1000);
+ this->ticks = GetDriverParamInt(parm, "ticks", 1000);
_screen.width = _screen.pitch = _cur_resolution[0];
_screen.height = _cur_resolution[1];
/* Do not render, nor blit */
@@ -31,7 +30,7 @@ void VideoDriver_Null::MainLoop()
{
uint i;
- for (i = 0; i < _null_ticks; i++) {
+ for (i = 0; i < this->ticks; i++) {
GameLoop();
_screen.dst_ptr = NULL;
UpdateWindows();
diff --git a/src/video/null_v.h b/src/video/null_v.h
index b5b21bbbb..d2e8b4b18 100644
--- a/src/video/null_v.h
+++ b/src/video/null_v.h
@@ -6,6 +6,9 @@
#include "video_driver.hpp"
class VideoDriver_Null: public VideoDriver {
+private:
+ uint ticks;
+
public:
/* virtual */ const char *Start(const char * const *param);