00001 /* $Id$ */ 00002 00003 /* 00004 * This file is part of OpenTTD. 00005 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. 00006 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00007 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. 00008 */ 00009 00012 #include "../stdafx.h" 00013 #include "../gfx_func.h" 00014 #include "../blitter/factory.hpp" 00015 #include "null_v.h" 00016 00018 static FVideoDriver_Null iFVideoDriver_Null; 00019 00020 const char *VideoDriver_Null::Start(const char * const *parm) 00021 { 00022 this->ticks = GetDriverParamInt(parm, "ticks", 1000); 00023 _screen.width = _screen.pitch = _cur_resolution.width; 00024 _screen.height = _cur_resolution.height; 00025 _screen.dst_ptr = NULL; 00026 ScreenSizeChanged(); 00027 00028 /* Do not render, nor blit */ 00029 DEBUG(misc, 1, "Forcing blitter 'null'..."); 00030 BlitterFactoryBase::SelectBlitter("null"); 00031 return NULL; 00032 } 00033 00034 void VideoDriver_Null::Stop() { } 00035 00036 void VideoDriver_Null::MakeDirty(int left, int top, int width, int height) {} 00037 00038 void VideoDriver_Null::MainLoop() 00039 { 00040 uint i; 00041 00042 for (i = 0; i < this->ticks; i++) { 00043 GameLoop(); 00044 UpdateWindows(); 00045 } 00046 } 00047 00048 bool VideoDriver_Null::ChangeResolution(int w, int h) { return false; } 00049 00050 bool VideoDriver_Null::ToggleFullscreen(bool fs) { return false; }