Commit e1de9213 authored by Gerhard Stein's avatar Gerhard Stein

More cleanups

parent 4d9ad757
......@@ -557,7 +557,7 @@ bool CEGAGraphicsGalaxy::readfonts()
maxwidth = FontHead->Width[j];
}
Font.CreateSurface(Palette, g_pVideoDriver->getScrollSurface()->flags, 8, maxwidth*16, FontHead->Height * 16);
Font.CreateSurface(Palette, g_pVideoDriver->getScrollSurface()->flags, maxwidth*16, FontHead->Height * 16);
SDL_Surface* sfc = Font.getSDLSurface();
......
......@@ -205,7 +205,7 @@ void CPlayGameVorticon::showKeensLeft()
SDL_Rect rect;
rect.x = (KEENSLEFT_X+1)*8; rect.y = (boxY+2)*8;
rect.w = (KEENSLEFT_W+1)*8; rect.h = (boxH)*8;
SDL_Surface *boxsurface = SDL_CreateRGBSurface( SDL_SWSURFACE, rect.w, rect.h, 32, 0, 0, 0, 0 );
SDL_Surface *boxsurface = SDL_CreateRGBSurface( SDL_SWSURFACE, rect.w, rect.h, RES_BPP, 0, 0, 0, 0 );
rect.x = 8; rect.y = 16;
rect.w = (KEENSLEFT_W-1)*8; rect.h = (boxH-3)*8;
......
......@@ -15,6 +15,7 @@
#define CEXEFILE_H_
#include "fileio/crc.h"
#include "TypeDefinitions.h"
#include <vector>
#include <string>
......
......@@ -37,10 +37,10 @@ mFontSurface(NULL)
bool CFont::CreateSurface(SDL_Color *Palette, Uint32 Flags,
Uint8 bpp, Uint16 width, Uint16 height)
Uint16 width, Uint16 height)
{
mFontSurface = SDL_CreateRGBSurface(Flags, width,
height, bpp, 0, 0, 0, 0);
height, 8, 0, 0, 0, 0);
SDL_SetColors(mFontSurface, Palette, 0, 255);
SDL_SetColorKey(mFontSurface, SDL_SRCCOLORKEY, COLORKEY);
......
......@@ -24,7 +24,7 @@ class CFont
public:
CFont();
bool CreateSurface(SDL_Color *Palette, Uint32 Flags, Uint8 bpp=8, Uint16 width = 128, Uint16 height = 128);
bool CreateSurface(SDL_Color *Palette, Uint32 Flags, Uint16 width = 128, Uint16 height = 128);
SDL_Surface *getSDLSurface() { return mFontSurface; }
bool loadAlternateFont();
......
......@@ -41,7 +41,7 @@ void CVidConfig::reset()
m_DisplayRect.w=320;
m_DisplayRect.h=200;
#if defined(ANDROID)
//m_Resolution.depth=16;
//m_Resolution.=16;
#endif
Fullscreen=false;
#endif
......
......@@ -13,6 +13,8 @@
#include <SDL.h>
const unsigned short RES_BPP = 32;
#ifdef USE_OPENGL
#include <SDL_opengl.h>
#endif
......
......@@ -78,7 +78,7 @@ SDL_Surface *CG_CreateRGBSurface( const SDL_Rect rect )
SDL_Surface *sfc = SDL_CreateRGBSurface( SDL_SWSURFACE, // TODO: Must be changed in future for better hardware support
rect.w,
rect.h,
32, // TODO: Must be changed in future for better 16 bpp support
RES_BPP, // TODO: Must be changed in future for better 16 bpp support
mask.r,
mask.g,
mask.b,
......
......@@ -85,7 +85,7 @@ bool COpenGL::createSurfaces()
const CRect<Uint16> gamerect = m_VidConfig.m_GameRect;
ScrollSurface = createSurface( "ScrollSurface", true,
512, 512,
32,
RES_BPP,
m_Mode, screen->format );
g_pLogFile->textOut("Blitsurface = creatergbsurface<br>");
......@@ -93,7 +93,7 @@ bool COpenGL::createSurfaces()
BlitSurface = createSurface( "BlitSurface", true,
getPowerOfTwo(gamerect.w),
getPowerOfTwo(gamerect.h),
32,
RES_BPP,
m_Mode, screen->format );
g_pLogFile->textOut("FilteredSurface = creatergbsurface<br>");
......@@ -101,7 +101,7 @@ bool COpenGL::createSurfaces()
FilteredSurface = createSurface( "FilteredSurface", true,
BlitSurface->w*m_VidConfig.m_ScaleXFilter,
BlitSurface->h*m_VidConfig.m_ScaleXFilter,
32,
RES_BPP,
m_Mode, screen->format );
m_dst_slice = FilteredSurface->w*screen->format->BytesPerPixel;
......@@ -111,7 +111,7 @@ bool COpenGL::createSurfaces()
FXSurface = createSurface( "FXSurface", true,
getPowerOfTwo(gamerect.w),
getPowerOfTwo(gamerect.h),
32,
RES_BPP,
m_Mode, screen->format );
}
else
......@@ -119,7 +119,7 @@ bool COpenGL::createSurfaces()
FXSurface = createSurface( "FXSurface", false,
gamerect.w,
gamerect.h,
32,
RES_BPP,
m_Mode, screen->format );
//Set surface alpha
......
......@@ -46,7 +46,7 @@ bool CSDLVideo::createSurfaces()
ScrollSurface = createSurface( "ScrollSurface", false,//true,
512,
512,
32,
RES_BPP,
m_Mode, screen->format );
g_pLogFile->textOut("Blitsurface created!\n");
......@@ -54,7 +54,7 @@ bool CSDLVideo::createSurfaces()
BlitSurface = createSurface( "BlitSurface", true,
gamerect.w,
gamerect.h,
32,
RES_BPP,
m_Mode, screen->format );
g_pLogFile->textOut("FilteredSurface created!\n");
......@@ -62,7 +62,7 @@ bool CSDLVideo::createSurfaces()
FilteredSurface = createSurface( "FilteredSurface", true,
BlitSurface->w*m_VidConfig.m_ScaleXFilter,
BlitSurface->h*m_VidConfig.m_ScaleXFilter,
32,
RES_BPP,
m_Mode, screen->format );
m_dst_slice = FilteredSurface->w*screen->format->BytesPerPixel;
......@@ -71,7 +71,7 @@ bool CSDLVideo::createSurfaces()
FXSurface = createSurface( "FXSurface", false,
BlitSurface->w,
BlitSurface->h,
32,
RES_BPP,
m_Mode, screen->format );
//Set surface alpha
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment