src/video/null_v.cpp
author rubidium
Fri, 20 Jul 2007 15:48:17 +0000
branchnoai
changeset 9686 d3c195c226f9
parent 9644 5b69fadf16af
child 9723 eee46cb39750
permissions -rw-r--r--
(svn r10636) [NoAI] -Sync with trunk r10532:10635.
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2174
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2174
diff changeset
     2
2189
d240b9097139 (svn r2704) Remove . from include path again, too much trouble. Also add some #ifdefs and #includes for the Windows build
tron
parents: 2186
diff changeset
     3
#include "../stdafx.h"
d240b9097139 (svn r2704) Remove . from include path again, too much trouble. Also add some #ifdefs and #includes for the Windows build
tron
parents: 2186
diff changeset
     4
#include "../openttd.h"
d240b9097139 (svn r2704) Remove . from include path again, too much trouble. Also add some #ifdefs and #includes for the Windows build
tron
parents: 2186
diff changeset
     5
#include "../gfx.h"
d240b9097139 (svn r2704) Remove . from include path again, too much trouble. Also add some #ifdefs and #includes for the Windows build
tron
parents: 2186
diff changeset
     6
#include "../variables.h"
d240b9097139 (svn r2704) Remove . from include path again, too much trouble. Also add some #ifdefs and #includes for the Windows build
tron
parents: 2186
diff changeset
     7
#include "../window.h"
9628
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
     8
#include "../debug.h"
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
     9
#include "../blitter/factory.hpp"
2189
d240b9097139 (svn r2704) Remove . from include path again, too much trouble. Also add some #ifdefs and #includes for the Windows build
tron
parents: 2186
diff changeset
    10
#include "null_v.h"
2171
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    11
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    12
static FVideoDriver_Null iFVideoDriver_Null;
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    13
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    14
const char *VideoDriver_Null::Start(const char* const *parm)
2171
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    15
{
9686
d3c195c226f9 (svn r10636) [NoAI] -Sync with trunk r10532:10635.
rubidium
parents: 9644
diff changeset
    16
	this->ticks = GetDriverParamInt(parm, "ticks", 1000);
2171
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    17
	_screen.width = _screen.pitch = _cur_resolution[0];
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    18
	_screen.height = _cur_resolution[1];
9628
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    19
	/* Do not render, nor blit */
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    20
	DEBUG(misc, 1, "Forcing blitter 'null'...");
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    21
	BlitterFactoryBase::SelectBlitter("null");
2171
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    22
	return NULL;
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    23
}
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    24
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    25
void VideoDriver_Null::Stop() { }
2171
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    26
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    27
void VideoDriver_Null::MakeDirty(int left, int top, int width, int height) {}
2171
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    28
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    29
void VideoDriver_Null::MainLoop()
2171
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    30
{
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    31
	uint i;
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    32
9686
d3c195c226f9 (svn r10636) [NoAI] -Sync with trunk r10532:10635.
rubidium
parents: 9644
diff changeset
    33
	for (i = 0; i < this->ticks; i++) {
2171
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    34
		GameLoop();
9628
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    35
		_screen.dst_ptr = NULL;
2171
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    36
		UpdateWindows();
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    37
	}
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    38
}
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    39
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    40
bool VideoDriver_Null::ChangeResolution(int w, int h) { return false; }
2171
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    41
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    42
void VideoDriver_Null::ToggleFullscreen(bool fs) {}