Add: INR currency (#8136)
[openttd-github.git] / src / video / null_v.cpp
blob3e98ea92582842d6df5e5b4a53024a825ce62858
1 /*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
8 /** @file null_v.cpp The videio driver that doesn't blit. */
10 #include "../stdafx.h"
11 #include "../gfx_func.h"
12 #include "../blitter/factory.hpp"
13 #include "null_v.h"
15 #include "../safeguards.h"
17 /** Factory for the null video driver. */
18 static FVideoDriver_Null iFVideoDriver_Null;
20 const char *VideoDriver_Null::Start(const char * const *parm)
22 #ifdef _MSC_VER
23 /* Disable the MSVC assertion message box. */
24 _set_error_mode(_OUT_TO_STDERR);
25 #endif
27 this->ticks = GetDriverParamInt(parm, "ticks", 1000);
28 _screen.width = _screen.pitch = _cur_resolution.width;
29 _screen.height = _cur_resolution.height;
30 _screen.dst_ptr = nullptr;
31 ScreenSizeChanged();
33 /* Do not render, nor blit */
34 DEBUG(misc, 1, "Forcing blitter 'null'...");
35 BlitterFactory::SelectBlitter("null");
36 return nullptr;
39 void VideoDriver_Null::Stop() { }
41 void VideoDriver_Null::MakeDirty(int left, int top, int width, int height) {}
43 void VideoDriver_Null::MainLoop()
45 uint i;
47 for (i = 0; i < this->ticks; i++) {
48 GameLoop();
49 UpdateWindows();
53 bool VideoDriver_Null::ChangeResolution(int w, int h) { return false; }
55 bool VideoDriver_Null::ToggleFullscreen(bool fs) { return false; }