src/video/null_v.cpp
author rubidium
Fri, 18 Apr 2008 23:33:51 +0000
branchnoai
changeset 10249 58810805030e
parent 9723 eee46cb39750
child 10455 22c441f5adf9
permissions -rw-r--r--
(svn r12781) [NoAI] -Sync: with trunk r12711:12780.
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"
9723
eee46cb39750 (svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents: 9686
diff changeset
     5
#include "../gfx_func.h"
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
     6
#include "../variables.h"
9628
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
     7
#include "../debug.h"
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
     8
#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
     9
#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
    10
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    11
static FVideoDriver_Null iFVideoDriver_Null;
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    12
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    13
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
    14
{
9686
d3c195c226f9 (svn r10636) [NoAI] -Sync with trunk r10532:10635.
rubidium
parents: 9644
diff changeset
    15
	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
    16
	_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
    17
	_screen.height = _cur_resolution[1];
10249
58810805030e (svn r12781) [NoAI] -Sync: with trunk r12711:12780.
rubidium
parents: 9723
diff changeset
    18
	ScreenSizeChanged();
58810805030e (svn r12781) [NoAI] -Sync: with trunk r12711:12780.
rubidium
parents: 9723
diff changeset
    19
9628
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    20
	/* Do not render, nor blit */
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    21
	DEBUG(misc, 1, "Forcing blitter 'null'...");
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    22
	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
    23
	return NULL;
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    24
}
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    25
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    26
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
    27
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    28
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
    29
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    30
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
    31
{
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    32
	uint i;
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    33
9686
d3c195c226f9 (svn r10636) [NoAI] -Sync with trunk r10532:10635.
rubidium
parents: 9644
diff changeset
    34
	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
    35
		GameLoop();
9628
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    36
		_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
    37
		UpdateWindows();
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
}
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    40
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    41
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
    42
9723
eee46cb39750 (svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents: 9686
diff changeset
    43
bool VideoDriver_Null::ToggleFullscreen(bool fs) { return false; }