summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-01-02 22:41:58 +0000
committerrubidium <rubidium@openttd.org>2014-01-02 22:41:58 +0000
commit2618d960e30882c097ba8b68249bbae974700ac8 (patch)
tree3d5a349c6a13f6f843d5f6b56456faf91010af5b /src/video
parent456dba4889108027f8af9c94514978d06012b6e7 (diff)
downloadopenttd-2618d960e30882c097ba8b68249bbae974700ac8.tar.xz
(svn r26209) -Codechange: remove some template magic and simplify some code
Diffstat (limited to 'src/video')
-rw-r--r--src/video/allegro_v.cpp6
-rw-r--r--src/video/cocoa/cocoa_v.mm8
-rw-r--r--src/video/cocoa/event.mm2
-rw-r--r--src/video/dedicated_v.cpp4
-rw-r--r--src/video/null_v.cpp2
-rw-r--r--src/video/sdl_v.cpp6
-rw-r--r--src/video/win32_v.cpp14
7 files changed, 21 insertions, 21 deletions
diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp
index 963353f0d..f844c6d0d 100644
--- a/src/video/allegro_v.cpp
+++ b/src/video/allegro_v.cpp
@@ -92,7 +92,7 @@ static void InitPalette()
static void CheckPaletteAnim()
{
if (_cur_palette.count_dirty != 0) {
- Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
+ Blitter *blitter = BlitterFactory::GetCurrentBlitter();
switch (blitter->UsePaletteAnimation()) {
case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
@@ -191,7 +191,7 @@ static void GetAvailableVideoMode(uint *w, uint *h)
static bool CreateMainSurface(uint w, uint h)
{
- int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
+ int bpp = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
if (bpp == 0) usererror("Can't use a blitter that blits 0 bpp for normal visuals");
set_color_depth(bpp);
@@ -217,7 +217,7 @@ static bool CreateMainSurface(uint w, uint h)
_cursor.pos.x = mouse_x;
_cursor.pos.y = mouse_y;
- BlitterFactoryBase::GetCurrentBlitter()->PostResize();
+ BlitterFactory::GetCurrentBlitter()->PostResize();
InitPalette();
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm
index df2e7809c..4a95d1901 100644
--- a/src/video/cocoa/cocoa_v.mm
+++ b/src/video/cocoa/cocoa_v.mm
@@ -333,7 +333,7 @@ void QZ_GameSizeChanged()
_screen.dst_ptr = _cocoa_subdriver->GetPixelBuffer();
_fullscreen = _cocoa_subdriver->IsFullscreen();
- BlitterFactoryBase::GetCurrentBlitter()->PostResize();
+ BlitterFactory::GetCurrentBlitter()->PostResize();
GameSizeChanged();
}
@@ -461,7 +461,7 @@ const char *VideoDriver_Cocoa::Start(const char * const *parm)
int width = _cur_resolution.width;
int height = _cur_resolution.height;
- int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
+ int bpp = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
_cocoa_subdriver = QZ_CreateSubdriver(width, height, bpp, _fullscreen, true);
if (_cocoa_subdriver == NULL) {
@@ -514,7 +514,7 @@ bool VideoDriver_Cocoa::ChangeResolution(int w, int h)
{
assert(_cocoa_subdriver != NULL);
- bool ret = _cocoa_subdriver->ChangeResolution(w, h, BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth());
+ bool ret = _cocoa_subdriver->ChangeResolution(w, h, BlitterFactory::GetCurrentBlitter()->GetScreenDepth());
QZ_GameSizeChanged();
QZ_UpdateVideoModes();
@@ -539,7 +539,7 @@ bool VideoDriver_Cocoa::ToggleFullscreen(bool full_screen)
if (full_screen != oldfs) {
int width = _cocoa_subdriver->GetWidth();
int height = _cocoa_subdriver->GetHeight();
- int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
+ int bpp = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
delete _cocoa_subdriver;
_cocoa_subdriver = NULL;
diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm
index 4ebb899b5..b4f171a98 100644
--- a/src/video/cocoa/event.mm
+++ b/src/video/cocoa/event.mm
@@ -110,7 +110,7 @@ static void QZ_WarpCursor(int x, int y)
static void QZ_CheckPaletteAnim()
{
if (_cur_palette.count_dirty != 0) {
- Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
+ Blitter *blitter = BlitterFactory::GetCurrentBlitter();
switch (blitter->UsePaletteAnimation()) {
case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp
index 4dcfbbe05..8e5b9ea91 100644
--- a/src/video/dedicated_v.cpp
+++ b/src/video/dedicated_v.cpp
@@ -144,14 +144,14 @@ static FVideoDriver_Dedicated iFVideoDriver_Dedicated;
const char *VideoDriver_Dedicated::Start(const char * const *parm)
{
- int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
+ int bpp = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
_dedicated_video_mem = (bpp == 0) ? NULL : MallocT<byte>(_cur_resolution.width * _cur_resolution.height * (bpp / 8));
_screen.width = _screen.pitch = _cur_resolution.width;
_screen.height = _cur_resolution.height;
_screen.dst_ptr = _dedicated_video_mem;
ScreenSizeChanged();
- BlitterFactoryBase::GetCurrentBlitter()->PostResize();
+ BlitterFactory::GetCurrentBlitter()->PostResize();
#if defined(WINCE)
/* WinCE doesn't support console stuff */
diff --git a/src/video/null_v.cpp b/src/video/null_v.cpp
index 6fdb87648..f2f7fc5ed 100644
--- a/src/video/null_v.cpp
+++ b/src/video/null_v.cpp
@@ -32,7 +32,7 @@ const char *VideoDriver_Null::Start(const char * const *parm)
/* Do not render, nor blit */
DEBUG(misc, 1, "Forcing blitter 'null'...");
- BlitterFactoryBase::SelectBlitter("null");
+ BlitterFactory::SelectBlitter("null");
return NULL;
}
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp
index ba0b07640..462989f55 100644
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -123,7 +123,7 @@ static void InitPalette()
static void CheckPaletteAnim()
{
if (_cur_palette.count_dirty != 0) {
- Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
+ Blitter *blitter = BlitterFactory::GetCurrentBlitter();
switch (blitter->UsePaletteAnimation()) {
case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
@@ -270,7 +270,7 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h)
{
SDL_Surface *newscreen, *icon;
char caption[50];
- int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
+ int bpp = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
bool want_hwpalette;
GetAvailableVideoMode(&w, &h);
@@ -398,7 +398,7 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h)
* appropriate event to know this. */
if (_fullscreen) _cursor.in_window = true;
- Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
+ Blitter *blitter = BlitterFactory::GetCurrentBlitter();
blitter->PostResize();
InitPalette();
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 4ea774854..186ac1025 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -190,7 +190,7 @@ static void ClientSizeChanged(int w, int h)
_cur_palette.count_dirty = 256;
_local_palette = _cur_palette;
- BlitterFactoryBase::GetCurrentBlitter()->PostResize();
+ BlitterFactory::GetCurrentBlitter()->PostResize();
GameSizeChanged();
@@ -279,7 +279,7 @@ bool VideoDriver_Win32::MakeWindow(bool full_screen)
DEVMODE settings;
/* Make sure we are always at least the screen-depth of the blitter */
- if (_fullscreen_bpp < BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth()) _fullscreen_bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
+ if (_fullscreen_bpp < BlitterFactory::GetCurrentBlitter()->GetScreenDepth()) _fullscreen_bpp = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
memset(&settings, 0, sizeof(settings));
settings.dmSize = sizeof(settings);
@@ -360,7 +360,7 @@ bool VideoDriver_Win32::MakeWindow(bool full_screen)
}
}
- BlitterFactoryBase::GetCurrentBlitter()->PostResize();
+ BlitterFactory::GetCurrentBlitter()->PostResize();
GameSizeChanged(); // invalidate all windows, force redraw
return true; // the request succeeded
@@ -374,7 +374,7 @@ static void PaintWindow(HDC dc)
HPALETTE old_palette = SelectPalette(dc, _wnd.gdi_palette, FALSE);
if (_cur_palette.count_dirty != 0) {
- Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
+ Blitter *blitter = BlitterFactory::GetCurrentBlitter();
switch (blitter->UsePaletteAnimation()) {
case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
@@ -1060,7 +1060,7 @@ static bool AllocateDibSection(int w, int h, bool force)
{
BITMAPINFO *bi;
HDC dc;
- int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
+ int bpp = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
w = max(w, 64);
h = max(h, 64);
@@ -1080,7 +1080,7 @@ static bool AllocateDibSection(int w, int h, bool force)
bi->bmiHeader.biHeight = -(_wnd.height = h);
bi->bmiHeader.biPlanes = 1;
- bi->bmiHeader.biBitCount = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
+ bi->bmiHeader.biBitCount = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
bi->bmiHeader.biCompression = BI_RGB;
if (_wnd.dib_sect) DeleteObject(_wnd.dib_sect);
@@ -1121,7 +1121,7 @@ static void FindResolutions()
* Doesn't really matter since we don't pass a string anyways, but still
* a letdown */
for (i = 0; EnumDisplaySettingsA(NULL, i, &dm) != 0; i++) {
- if (dm.dmBitsPerPel == BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth() &&
+ if (dm.dmBitsPerPel == BlitterFactory::GetCurrentBlitter()->GetScreenDepth() &&
dm.dmPelsWidth >= 640 && dm.dmPelsHeight >= 480) {
uint j;