tron@2186: /* $Id$ */ tron@2186: tron@2189: #include "../stdafx.h" tron@2189: #include "../openttd.h" tron@2189: #include "../gfx.h" tron@2189: #include "../variables.h" tron@2189: #include "../window.h" tron@2189: #include "null_v.h" tron@2174: tron@2174: static void* _null_video_mem = NULL; tron@2174: tron@2174: static const char* NullVideoStart(const char* const* parm) tron@2174: { tron@2174: _screen.width = _screen.pitch = _cur_resolution[0]; tron@2174: _screen.height = _cur_resolution[1]; tron@2174: _null_video_mem = malloc(_cur_resolution[0] * _cur_resolution[1]); tron@2174: return NULL; tron@2174: } tron@2174: tron@2174: static void NullVideoStop(void) { free(_null_video_mem); } tron@2174: tron@2174: static void NullVideoMakeDirty(int left, int top, int width, int height) {} tron@2174: tron@2228: static void NullVideoMainLoop(void) tron@2174: { tron@2174: uint i; tron@2174: tron@2174: for (i = 0; i < 1000; i++) { tron@2174: GameLoop(); rubidium@5587: _screen.dst_ptr = (Pixel*)_null_video_mem; tron@2174: UpdateWindows(); tron@2174: } tron@2174: } tron@2174: tron@2174: static bool NullVideoChangeRes(int w, int h) { return false; } tron@2174: static void NullVideoFullScreen(bool fs) {} tron@2174: tron@2174: const HalVideoDriver _null_video_driver = { tron@2174: NullVideoStart, tron@2174: NullVideoStop, tron@2174: NullVideoMakeDirty, tron@2174: NullVideoMainLoop, tron@2174: NullVideoChangeRes, tron@2174: NullVideoFullScreen, tron@2174: };