2005-07-24 14:12:37 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2008-05-06 15:11:33 +00:00
|
|
|
/** @file null_v.cpp The videio driver that doesn't blit. */
|
|
|
|
|
2005-07-25 07:16:10 +00:00
|
|
|
#include "../stdafx.h"
|
2007-12-23 10:56:02 +00:00
|
|
|
#include "../gfx_func.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;
|
|
|
|
|
2009-01-10 00:31:47 +00:00
|
|
|
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);
|
2008-06-16 19:38:41 +00:00
|
|
|
_screen.width = _screen.pitch = _cur_resolution.width;
|
|
|
|
_screen.height = _cur_resolution.height;
|
2008-04-18 23:32:10 +00:00
|
|
|
ScreenSizeChanged();
|
|
|
|
|
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; }
|
|
|
|
|
2008-01-01 14:20:48 +00:00
|
|
|
bool VideoDriver_Null::ToggleFullscreen(bool fs) { return false; }
|