null_v.cpp
Go to the documentation of this file.00001
00002
00005 #include "../stdafx.h"
00006 #include "../gfx_func.h"
00007 #include "../blitter/factory.hpp"
00008 #include "null_v.h"
00009
00010 static FVideoDriver_Null iFVideoDriver_Null;
00011
00012 const char *VideoDriver_Null::Start(const char * const *parm)
00013 {
00014 this->ticks = GetDriverParamInt(parm, "ticks", 1000);
00015 _screen.width = _screen.pitch = _cur_resolution.width;
00016 _screen.height = _cur_resolution.height;
00017 ScreenSizeChanged();
00018
00019
00020 DEBUG(misc, 1, "Forcing blitter 'null'...");
00021 BlitterFactoryBase::SelectBlitter("null");
00022 return NULL;
00023 }
00024
00025 void VideoDriver_Null::Stop() { }
00026
00027 void VideoDriver_Null::MakeDirty(int left, int top, int width, int height) {}
00028
00029 void VideoDriver_Null::MainLoop()
00030 {
00031 uint i;
00032
00033 for (i = 0; i < this->ticks; i++) {
00034 GameLoop();
00035 _screen.dst_ptr = NULL;
00036 UpdateWindows();
00037 }
00038 }
00039
00040 bool VideoDriver_Null::ChangeResolution(int w, int h) { return false; }
00041
00042 bool VideoDriver_Null::ToggleFullscreen(bool fs) { return false; }