mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 12:22:51 +00:00
WINTERMUTE: Change PixelFormat to ARGB (same as Sword25)
Mainly a workaround for the OpenGL-backend.
This commit is contained in:
parent
52aeaf4ece
commit
3abccb2e33
@ -261,7 +261,7 @@ BaseSurface *BaseFontTT::renderTextToTexture(const WideString &text, int width,
|
||||
// void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const;
|
||||
Graphics::Surface *surface = new Graphics::Surface();
|
||||
if (_deletableFont) { // We actually have a TTF
|
||||
surface->create((uint16)width, (uint16)(_lineHeight * lines.size()), Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));
|
||||
surface->create((uint16)width, (uint16)(_lineHeight * lines.size()), Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24));
|
||||
} else { // We are using a fallback, they can't do 32bpp
|
||||
surface->create((uint16)width, (uint16)(_lineHeight * lines.size()), Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0));
|
||||
}
|
||||
@ -274,7 +274,7 @@ BaseSurface *BaseFontTT::renderTextToTexture(const WideString &text, int width,
|
||||
}
|
||||
|
||||
BaseSurface *retSurface = _gameRef->_renderer->createSurface();
|
||||
Graphics::Surface *convertedSurface = surface->convertTo(Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8 , 0));
|
||||
Graphics::Surface *convertedSurface = surface->convertTo(Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24));
|
||||
retSurface->putSurface(*convertedSurface, true);
|
||||
convertedSurface->free();
|
||||
surface->free();
|
||||
|
@ -153,7 +153,7 @@ bool BaseRenderOSystem::initRenderer(int width, int height, bool windowed) {
|
||||
|
||||
_windowed = !ConfMan.getBool("fullscreen");
|
||||
|
||||
Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0);
|
||||
Graphics::PixelFormat format(4, 8, 8, 8, 8, 16, 8, 0, 24);
|
||||
g_system->beginGFXTransaction();
|
||||
g_system->initSize(_width, _height, &format);
|
||||
OSystem::TransactionError gfxError = g_system->endGFXTransaction();
|
||||
|
@ -47,25 +47,25 @@ void doBlit(byte *ino, byte* outo, uint32 width, uint32 height, uint32 pitch, in
|
||||
byte *in, *out;
|
||||
|
||||
#ifdef SCUMM_LITTLE_ENDIAN
|
||||
const int aIndex = 0;
|
||||
const int bIndex = 1;
|
||||
const int gIndex = 2;
|
||||
const int rIndex = 3;
|
||||
#else
|
||||
const int aIndex = 3;
|
||||
const int bIndex = 2;
|
||||
const int bIndex = 0;
|
||||
const int gIndex = 1;
|
||||
const int rIndex = 0;
|
||||
const int rIndex = 2;
|
||||
#else
|
||||
const int aIndex = 0;
|
||||
const int bIndex = 3;
|
||||
const int gIndex = 2;
|
||||
const int rIndex = 1;
|
||||
#endif
|
||||
|
||||
const int bShift = 8;//img->format.bShift;
|
||||
const int gShift = 16;//img->format.gShift;
|
||||
const int rShift = 24;//img->format.rShift;
|
||||
const int aShift = 0;//img->format.aShift;
|
||||
const int bShift = 0;//img->format.bShift;
|
||||
const int gShift = 8;//img->format.gShift;
|
||||
const int rShift = 16;//img->format.rShift;
|
||||
const int aShift = 24;//img->format.aShift;
|
||||
|
||||
const int bShiftTarget = 8;//target.format.bShift;
|
||||
const int gShiftTarget = 16;//target.format.gShift;
|
||||
const int rShiftTarget = 24;//target.format.rShift;
|
||||
const int bShiftTarget = 0;//target.format.bShift;
|
||||
const int gShiftTarget = 8;//target.format.gShift;
|
||||
const int rShiftTarget = 16;//target.format.rShift;
|
||||
|
||||
for (uint32 i = 0; i < height; i++) {
|
||||
out = outo;
|
||||
@ -226,25 +226,24 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
|
||||
byte *in, *out;
|
||||
|
||||
#ifdef SCUMM_LITTLE_ENDIAN
|
||||
const int aIndex = 0;
|
||||
const int bIndex = 1;
|
||||
const int gIndex = 2;
|
||||
const int rIndex = 3;
|
||||
#else
|
||||
const int aIndex = 3;
|
||||
const int bIndex = 2;
|
||||
const int bIndex = 0;
|
||||
const int gIndex = 1;
|
||||
const int rIndex = 0;
|
||||
const int rIndex = 2;
|
||||
#else
|
||||
const int aIndex = 0;
|
||||
const int bIndex = 3;
|
||||
const int gIndex = 2;
|
||||
const int rIndex = 1;
|
||||
#endif
|
||||
const int bShift = 0;//img->format.bShift;
|
||||
const int gShift = 8;//img->format.gShift;
|
||||
const int rShift = 16;//img->format.rShift;
|
||||
const int aShift = 24;//img->format.aShift;
|
||||
|
||||
const int bShift = 8;//img->format.bShift;
|
||||
const int gShift = 16;//img->format.gShift;
|
||||
const int rShift = 24;//img->format.rShift;
|
||||
const int aShift = 0;//img->format.aShift;
|
||||
|
||||
const int bShiftTarget = 8;//target.format.bShift;
|
||||
const int gShiftTarget = 16;//target.format.gShift;
|
||||
const int rShiftTarget = 24;//target.format.rShift;
|
||||
const int bShiftTarget = 0;//target.format.bShift;
|
||||
const int gShiftTarget = 8;//target.format.gShift;
|
||||
const int rShiftTarget = 16;//target.format.rShift;
|
||||
|
||||
if (ca == 255 && cb == 255 && cg == 255 && cr == 255) {
|
||||
doBlit(ino, outo, img->w, img->h, target.pitch, inStep, inoStep);
|
||||
|
@ -97,7 +97,7 @@ bool WinterMuteEngine::hasFeature(EngineFeature f) const {
|
||||
|
||||
Common::Error WinterMuteEngine::run() {
|
||||
// Initialize graphics using following:
|
||||
Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0);
|
||||
Graphics::PixelFormat format(4, 8, 8, 8, 8, 16, 8, 0, 24);
|
||||
initGraphics(800, 600, true, &format);
|
||||
if (g_system->getScreenFormat() != format) {
|
||||
error("Wintermute currently REQUIRES 32bpp");
|
||||
|
Loading…
x
Reference in New Issue
Block a user