Changeset - r7245:da3515406020
[Not reviewed]
master
0 2 0
peter1138 - 17 years ago 2007-07-13 13:03:20
peter1138@openttd.org
(svn r10542) -Codechange: use class member instead of global variable for null ticks value
2 files changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/video/null_v.cpp
Show inline comments
 
@@ -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();
src/video/null_v.h
Show inline comments
 
@@ -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);
 

	
0 comments (0 inline, 0 general)