src/video/dedicated_v.h
author peter1138
Tue, 22 Jan 2008 07:27:06 +0000
changeset 8374 7a1b6c89cb89
parent 8217 fbcb18467e34
child 9111 48ce04029fe4
permissions -rw-r--r--
(svn r11940) -Codechange: Store short filename once per open file instead of once per sprite cache entry. Not all file types need this, but most of the time no sprite cache entry needed it either.
2186
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2178
diff changeset
     1
/* $Id$ */
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2178
diff changeset
     2
2178
9166a59d1c01 (svn r2692) Forgot to add a file
tron
parents:
diff changeset
     3
#ifndef VIDEO_DEDICATED_H
9166a59d1c01 (svn r2692) Forgot to add a file
tron
parents:
diff changeset
     4
#define VIDEO_DEDICATED_H
9166a59d1c01 (svn r2692) Forgot to add a file
tron
parents:
diff changeset
     5
7170
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
     6
#include "video_driver.hpp"
2178
9166a59d1c01 (svn r2692) Forgot to add a file
tron
parents:
diff changeset
     7
7170
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
     8
class VideoDriver_Dedicated: public VideoDriver {
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
     9
public:
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    10
	/* virtual */ const char *Start(const char * const *param);
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    11
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    12
	/* virtual */ void Stop();
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    13
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    14
	/* virtual */ void MakeDirty(int left, int top, int width, int height);
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    15
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    16
	/* virtual */ void MainLoop();
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    17
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    18
	/* virtual */ bool ChangeResolution(int w, int h);
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    19
8171
3fb9d1f8ac3b (svn r11734) -Change: Allow ToggleFullScreen to return the result of the operation' attempt. Previously, only visual clues were available.
belugas
parents: 7193
diff changeset
    20
	/* virtual */ bool ToggleFullscreen(bool fullscreen);
7170
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    21
};
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    22
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    23
class FVideoDriver_Dedicated: public VideoDriverFactory<FVideoDriver_Dedicated> {
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    24
public:
8217
fbcb18467e34 (svn r11780) -Codechange: When compiling a dedicated server build, select the dedicated video driver by default.
peter1138
parents: 8171
diff changeset
    25
#ifdef DEDICATED
fbcb18467e34 (svn r11780) -Codechange: When compiling a dedicated server build, select the dedicated video driver by default.
peter1138
parents: 8171
diff changeset
    26
	/* Automatically select this dedicated driver when making a dedicated
fbcb18467e34 (svn r11780) -Codechange: When compiling a dedicated server build, select the dedicated video driver by default.
peter1138
parents: 8171
diff changeset
    27
	 * server build. */
fbcb18467e34 (svn r11780) -Codechange: When compiling a dedicated server build, select the dedicated video driver by default.
peter1138
parents: 8171
diff changeset
    28
	static const int priority = 10;
fbcb18467e34 (svn r11780) -Codechange: When compiling a dedicated server build, select the dedicated video driver by default.
peter1138
parents: 8171
diff changeset
    29
#else
7193
d46cbf314baf (svn r10471) -Codechange: implement driver probing priority so that 'preferred' drivers are loaded first
peter1138
parents: 7170
diff changeset
    30
	static const int priority = 0;
8217
fbcb18467e34 (svn r11780) -Codechange: When compiling a dedicated server build, select the dedicated video driver by default.
peter1138
parents: 8171
diff changeset
    31
#endif
7170
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    32
	/* virtual */ const char *GetName() { return "dedicated"; }
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    33
	/* virtual */ const char *GetDescription() { return "Dedicated Video Driver"; }
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    34
	/* virtual */ Driver *CreateInstance() { return new VideoDriver_Dedicated(); }
923946ec324f (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents: 5988
diff changeset
    35
};
2178
9166a59d1c01 (svn r2692) Forgot to add a file
tron
parents:
diff changeset
    36
5988
1aabf94612c6 (svn r8691) -Cleanup: Some proper #endif comments for sound/music/video files, and a little elimination of magic numbers in Win32SoundStart
Darkvater
parents: 5475
diff changeset
    37
#endif /* VIDEO_DEDICATED_H */