mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
(svn r10542) -Codechange: use class member instead of global variable for null ticks value
This commit is contained in:
parent
5ed3482aac
commit
243c59be6f
@ -10,11 +10,10 @@
|
|||||||
#include "null_v.h"
|
#include "null_v.h"
|
||||||
|
|
||||||
static FVideoDriver_Null iFVideoDriver_Null;
|
static FVideoDriver_Null iFVideoDriver_Null;
|
||||||
static uint _null_ticks = 0;
|
|
||||||
|
|
||||||
const char *VideoDriver_Null::Start(const char* const *parm)
|
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.width = _screen.pitch = _cur_resolution[0];
|
||||||
_screen.height = _cur_resolution[1];
|
_screen.height = _cur_resolution[1];
|
||||||
/* Do not render, nor blit */
|
/* Do not render, nor blit */
|
||||||
@ -31,7 +30,7 @@ void VideoDriver_Null::MainLoop()
|
|||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
|
|
||||||
for (i = 0; i < _null_ticks; i++) {
|
for (i = 0; i < this->ticks; i++) {
|
||||||
GameLoop();
|
GameLoop();
|
||||||
_screen.dst_ptr = NULL;
|
_screen.dst_ptr = NULL;
|
||||||
UpdateWindows();
|
UpdateWindows();
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
#include "video_driver.hpp"
|
#include "video_driver.hpp"
|
||||||
|
|
||||||
class VideoDriver_Null: public VideoDriver {
|
class VideoDriver_Null: public VideoDriver {
|
||||||
|
private:
|
||||||
|
uint ticks;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/* virtual */ const char *Start(const char * const *param);
|
/* virtual */ const char *Start(const char * const *param);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user