src/video/null_v.cpp
changeset 7666 a5fccd76176a
parent 7433 8e410e7ec0d7
child 7739 3ce5bb98aa7d
equal deleted inserted replaced
7665:ded23f6bc34c 7666:a5fccd76176a
     7 #include "../window.h"
     7 #include "../window.h"
     8 #include "../debug.h"
     8 #include "../debug.h"
     9 #include "../blitter/factory.hpp"
     9 #include "../blitter/factory.hpp"
    10 #include "null_v.h"
    10 #include "null_v.h"
    11 
    11 
    12 static const char* NullVideoStart(const char* const* parm)
    12 static FVideoDriver_Null iFVideoDriver_Null;
       
    13 
       
    14 const char *VideoDriver_Null::Start(const char* const *parm)
    13 {
    15 {
    14 	_screen.width = _screen.pitch = _cur_resolution[0];
    16 	_screen.width = _screen.pitch = _cur_resolution[0];
    15 	_screen.height = _cur_resolution[1];
    17 	_screen.height = _cur_resolution[1];
    16 	/* Do not render, nor blit */
    18 	/* Do not render, nor blit */
    17 	DEBUG(misc, 1, "Forcing blitter 'null'...");
    19 	DEBUG(misc, 1, "Forcing blitter 'null'...");
    18 	BlitterFactoryBase::SelectBlitter("null");
    20 	BlitterFactoryBase::SelectBlitter("null");
    19 	return NULL;
    21 	return NULL;
    20 }
    22 }
    21 
    23 
    22 static void NullVideoStop() { }
    24 void VideoDriver_Null::Stop() { }
    23 
    25 
    24 static void NullVideoMakeDirty(int left, int top, int width, int height) {}
    26 void VideoDriver_Null::MakeDirty(int left, int top, int width, int height) {}
    25 
    27 
    26 static void NullVideoMainLoop()
    28 void VideoDriver_Null::MainLoop()
    27 {
    29 {
    28 	uint i;
    30 	uint i;
    29 
    31 
    30 	for (i = 0; i < 1000; i++) {
    32 	for (i = 0; i < 1000; i++) {
    31 		GameLoop();
    33 		GameLoop();
    32 		_screen.dst_ptr = NULL;
    34 		_screen.dst_ptr = NULL;
    33 		UpdateWindows();
    35 		UpdateWindows();
    34 	}
    36 	}
    35 }
    37 }
    36 
    38 
    37 static bool NullVideoChangeRes(int w, int h) { return false; }
    39 bool VideoDriver_Null::ChangeResolution(int w, int h) { return false; }
    38 static void NullVideoFullScreen(bool fs) {}
       
    39 
    40 
    40 const HalVideoDriver _null_video_driver = {
    41 void VideoDriver_Null::ToggleFullscreen(bool fs) {}
    41 	NullVideoStart,
       
    42 	NullVideoStop,
       
    43 	NullVideoMakeDirty,
       
    44 	NullVideoMainLoop,
       
    45 	NullVideoChangeRes,
       
    46 	NullVideoFullScreen,
       
    47 };