2005-07-24 14:12:37 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2005-07-25 07:16:10 +00:00
|
|
|
#include "../stdafx.h"
|
|
|
|
#include "../openttd.h"
|
2007-12-23 10:56:02 +00:00
|
|
|
#include "../gfx_func.h"
|
2005-07-25 07:16:10 +00:00
|
|
|
#include "../variables.h"
|
2007-06-12 20:24:12 +00:00
|
|
|
#include "../debug.h"
|
2007-06-17 20:30:28 +00:00
|
|
|
#include "../blitter/factory.hpp"
|
2005-07-25 07:16:10 +00:00
|
|
|
#include "null_v.h"
|
2005-07-23 15:16:57 +00:00
|
|
|
|
2007-07-05 12:23:54 +00:00
|
|
|
static FVideoDriver_Null iFVideoDriver_Null;
|
|
|
|
|
|
|
|
const char *VideoDriver_Null::Start(const char* const *parm)
|
2005-07-23 15:16:57 +00:00
|
|
|
{
|
2007-07-13 13:03:20 +00:00
|
|
|
this->ticks = GetDriverParamInt(parm, "ticks", 1000);
|
2005-07-23 15:16:57 +00:00
|
|
|
_screen.width = _screen.pitch = _cur_resolution[0];
|
|
|
|
_screen.height = _cur_resolution[1];
|
2007-06-12 20:24:12 +00:00
|
|
|
/* Do not render, nor blit */
|
|
|
|
DEBUG(misc, 1, "Forcing blitter 'null'...");
|
|
|
|
BlitterFactoryBase::SelectBlitter("null");
|
2005-07-23 15:16:57 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2007-07-05 12:23:54 +00:00
|
|
|
void VideoDriver_Null::Stop() { }
|
2005-07-23 15:16:57 +00:00
|
|
|
|
2007-07-05 12:23:54 +00:00
|
|
|
void VideoDriver_Null::MakeDirty(int left, int top, int width, int height) {}
|
2005-07-23 15:16:57 +00:00
|
|
|
|
2007-07-05 12:23:54 +00:00
|
|
|
void VideoDriver_Null::MainLoop()
|
2005-07-23 15:16:57 +00:00
|
|
|
{
|
|
|
|
uint i;
|
|
|
|
|
2007-07-13 13:03:20 +00:00
|
|
|
for (i = 0; i < this->ticks; i++) {
|
2005-07-23 15:16:57 +00:00
|
|
|
GameLoop();
|
2007-06-12 20:24:12 +00:00
|
|
|
_screen.dst_ptr = NULL;
|
2005-07-23 15:16:57 +00:00
|
|
|
UpdateWindows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-07-05 12:23:54 +00:00
|
|
|
bool VideoDriver_Null::ChangeResolution(int w, int h) { return false; }
|
|
|
|
|
|
|
|
void VideoDriver_Null::ToggleFullscreen(bool fs) {}
|