BACKENDS: Remove unneeded use of Graphics::createPixelFormat
This commit is contained in:
parent
0a29fced6e
commit
453cc63c02
6 changed files with 4 additions and 25 deletions
|
@ -22,7 +22,6 @@
|
|||
|
||||
#include "backends/base-backend.h"
|
||||
#include <graphics/surface.h>
|
||||
#include <graphics/colormasks.h>
|
||||
#include <graphics/palette.h>
|
||||
#include <ronin/soundcommon.h>
|
||||
#include "backends/timer/default/default-timer.h"
|
||||
|
@ -160,7 +159,7 @@ public:
|
|||
void clearOverlay();
|
||||
void grabOverlay(void *buf, int pitch);
|
||||
void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h);
|
||||
virtual Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<4444>(); }
|
||||
virtual Graphics::PixelFormat getOverlayFormat() const { return Graphics::PixelFormat(2, 4, 4, 4, 4, 8, 4, 0, 12); }
|
||||
|
||||
// Mutex handling
|
||||
MutexRef createMutex();
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "backends/saves/default/default-saves.h"
|
||||
#include "audio/mixer_intern.h"
|
||||
#include "graphics/surface.h"
|
||||
#include "graphics/colormasks.h"
|
||||
#include "graphics/palette.h"
|
||||
|
||||
class OSystem_DS : public EventsBaseBackend, public PaletteManager {
|
||||
|
@ -108,7 +107,7 @@ public:
|
|||
virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h);
|
||||
virtual int16 getOverlayHeight();
|
||||
virtual int16 getOverlayWidth();
|
||||
virtual Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<1555>(); }
|
||||
virtual Graphics::PixelFormat getOverlayFormat() const { return Graphics::PixelFormat(2, 5, 5, 5, 1, 0, 5, 10, 15); }
|
||||
|
||||
virtual bool showMouse(bool visible);
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "base/main.h"
|
||||
|
||||
#include "graphics/surface.h"
|
||||
#include "graphics/colormasks.h"
|
||||
#include "graphics/palette.h"
|
||||
#include "graphics/pixelformat.h"
|
||||
|
||||
|
@ -174,7 +173,7 @@ public:
|
|||
virtual int16 getOverlayHeight();
|
||||
virtual int16 getOverlayWidth();
|
||||
virtual Graphics::PixelFormat getOverlayFormat() const {
|
||||
return Graphics::createPixelFormat<555>();
|
||||
return Graphics::PixelFormat(2, 5, 5, 5, 0, 11, 6, 1, 0);
|
||||
}
|
||||
|
||||
virtual bool showMouse(bool visible);
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "DmaPipe.h"
|
||||
#include "GsDefs.h"
|
||||
#include "graphics/surface.h"
|
||||
#include "graphics/colormasks.h"
|
||||
#include "backends/platform/ps2/ps2debug.h"
|
||||
|
||||
extern void *_gp;
|
||||
|
@ -668,7 +667,6 @@ void Gs2dScreen::hideOverlay(void) {
|
|||
|
||||
Graphics::PixelFormat Gs2dScreen::getOverlayFormat(void) {
|
||||
return _overlayFormat;
|
||||
// return Graphics::createPixelFormat<1555>();
|
||||
}
|
||||
|
||||
int16 Gs2dScreen::getOverlayWidth(void) {
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include "common/scummsys.h"
|
||||
#include "graphics/surface.h"
|
||||
#include "graphics/colormasks.h"
|
||||
#include "graphics/palette.h"
|
||||
#include "audio/mixer_intern.h"
|
||||
#include "backends/base-backend.h"
|
||||
|
@ -110,7 +109,7 @@ public:
|
|||
void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h);
|
||||
int16 getOverlayHeight();
|
||||
int16 getOverlayWidth();
|
||||
Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<4444>(); }
|
||||
Graphics::PixelFormat getOverlayFormat() const { return Graphics::PixelFormat(2, 4, 4, 4, 4, 0, 4, 8, 12); }
|
||||
|
||||
// Mouse related
|
||||
bool showMouse(bool visible);
|
||||
|
|
|
@ -116,18 +116,10 @@ struct ColorMasks<555> {
|
|||
kGreenBits = 5,
|
||||
kBlueBits = 5,
|
||||
|
||||
#ifdef __N64__
|
||||
/* Nintendo 64 uses a BGR555 color format for 16bit display */
|
||||
kAlphaShift = 0,
|
||||
kRedShift = kBlueBits+kGreenBits+1,
|
||||
kGreenShift = kBlueBits + 1,
|
||||
kBlueShift = 1,
|
||||
#else /* RGB555 */
|
||||
kAlphaShift = 0,
|
||||
kRedShift = kGreenBits+kBlueBits,
|
||||
kGreenShift = kBlueBits,
|
||||
kBlueShift = 0,
|
||||
#endif
|
||||
|
||||
kAlphaMask = ((1 << kAlphaBits) - 1) << kAlphaShift,
|
||||
kRedMask = ((1 << kRedBits) - 1) << kRedShift,
|
||||
|
@ -206,17 +198,10 @@ struct ColorMasks<4444> {
|
|||
kGreenBits = 4,
|
||||
kBlueBits = 4,
|
||||
|
||||
#ifdef __PSP__ //PSP uses ABGR
|
||||
kAlphaShift = kRedBits+kGreenBits+kBlueBits,
|
||||
kRedShift = 0,
|
||||
kGreenShift = kRedBits,
|
||||
kBlueShift = kRedBits+kGreenBits,
|
||||
#else //ARGB
|
||||
kAlphaShift = kRedBits+kGreenBits+kBlueBits,
|
||||
kRedShift = kGreenBits+kBlueBits,
|
||||
kGreenShift = kBlueBits,
|
||||
kBlueShift = 0,
|
||||
#endif
|
||||
|
||||
kAlphaMask = ((1 << kAlphaBits) - 1) << kAlphaShift,
|
||||
kRedMask = ((1 << kRedBits) - 1) << kRedShift,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue