src/video/null_v.cpp
author truebrain
Fri, 18 Jul 2008 10:15:16 +0000
branchnoai
changeset 11168 3842648184cd
parent 11044 097ea3e7ec56
permissions -rw-r--r--
(svn r13726) [NoAI] -Add: AIVehicle::ReverseVehicle (Yexo)
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
10455
22c441f5adf9 (svn r12997) [NoAI] -Sync: with trunk r12895:12996.
rubidium
parents: 10249
diff changeset
     3
/** @file null_v.cpp The videio driver that doesn't blit. */
22c441f5adf9 (svn r12997) [NoAI] -Sync: with trunk r12895:12996.
rubidium
parents: 10249
diff changeset
     4
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
     5
#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
     6
#include "../openttd.h"
9723
eee46cb39750 (svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents: 9686
diff changeset
     7
#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
     8
#include "../variables.h"
9628
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
     9
#include "../debug.h"
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    10
#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
    11
#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
    12
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    13
static FVideoDriver_Null iFVideoDriver_Null;
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    14
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    15
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
    16
{
9686
d3c195c226f9 (svn r10636) [NoAI] -Sync with trunk r10532:10635.
rubidium
parents: 9644
diff changeset
    17
	this->ticks = GetDriverParamInt(parm, "ticks", 1000);
11044
097ea3e7ec56 (svn r13600) [NoAI] -Sync: with trunk r13508:13599.
rubidium
parents: 10455
diff changeset
    18
	_screen.width  = _screen.pitch = _cur_resolution.width;
097ea3e7ec56 (svn r13600) [NoAI] -Sync: with trunk r13508:13599.
rubidium
parents: 10455
diff changeset
    19
	_screen.height = _cur_resolution.height;
10249
58810805030e (svn r12781) [NoAI] -Sync: with trunk r12711:12780.
rubidium
parents: 9723
diff changeset
    20
	ScreenSizeChanged();
58810805030e (svn r12781) [NoAI] -Sync: with trunk r12711:12780.
rubidium
parents: 9723
diff changeset
    21
9628
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    22
	/* Do not render, nor blit */
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    23
	DEBUG(misc, 1, "Forcing blitter 'null'...");
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    24
	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
    25
	return NULL;
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    26
}
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::Stop() { }
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::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
    31
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    32
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
    33
{
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    34
	uint i;
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    35
9686
d3c195c226f9 (svn r10636) [NoAI] -Sync with trunk r10532:10635.
rubidium
parents: 9644
diff changeset
    36
	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
    37
		GameLoop();
9628
b5c2449616b5 (svn r10195) [NoAI] -Sync: with trunk r10119:10194.
rubidium
parents: 9624
diff changeset
    38
		_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
    39
		UpdateWindows();
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    40
	}
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    41
}
008122046f7f (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff changeset
    42
9631
8a2d1c2ceb88 (svn r10461) [NoAI] -Sync with trunk r10349:r10460.
rubidium
parents: 9628
diff changeset
    43
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
    44
9723
eee46cb39750 (svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents: 9686
diff changeset
    45
bool VideoDriver_Null::ToggleFullscreen(bool fs) { return false; }