SYSTEM: Unify OSystem::getSupportedFormats() signature
svn-id: r49838
This commit is contained in:
parent
96f1e29300
commit
703f0ca29c
11 changed files with 16 additions and 16 deletions
|
@ -86,7 +86,7 @@ class OSystem_Dreamcast : private DCHardware, public BaseBackend, public Filesys
|
||||||
Graphics::PixelFormat getScreenFormat() const;
|
Graphics::PixelFormat getScreenFormat() const;
|
||||||
|
|
||||||
// Returns a list of all pixel formats supported by the backend.
|
// Returns a list of all pixel formats supported by the backend.
|
||||||
Common::List<Graphics::PixelFormat> getSupportedFormats();
|
Common::List<Graphics::PixelFormat> getSupportedFormats() const;
|
||||||
|
|
||||||
// Set the size of the video bitmap.
|
// Set the size of the video bitmap.
|
||||||
// Typically, 320x200
|
// Typically, 320x200
|
||||||
|
|
|
@ -198,7 +198,7 @@ Graphics::PixelFormat OSystem_Dreamcast::getScreenFormat() const
|
||||||
return screenFormats[_screenFormat];
|
return screenFormats[_screenFormat];
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::List<Graphics::PixelFormat> OSystem_Dreamcast::getSupportedFormats()
|
Common::List<Graphics::PixelFormat> OSystem_Dreamcast::getSupportedFormats() const
|
||||||
{
|
{
|
||||||
Common::List<Graphics::PixelFormat> list;
|
Common::List<Graphics::PixelFormat> list;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
|
@ -379,7 +379,7 @@ inline bool DisplayManager::isTimeToUpdate() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::List<Graphics::PixelFormat> DisplayManager::getSupportedPixelFormats() {
|
Common::List<Graphics::PixelFormat> DisplayManager::getSupportedPixelFormats() const {
|
||||||
Common::List<Graphics::PixelFormat> list;
|
Common::List<Graphics::PixelFormat> list;
|
||||||
|
|
||||||
// In order of preference
|
// In order of preference
|
||||||
|
|
|
@ -83,12 +83,12 @@ public:
|
||||||
void setSizeAndPixelFormat(uint width, uint height, const Graphics::PixelFormat *format);
|
void setSizeAndPixelFormat(uint width, uint height, const Graphics::PixelFormat *format);
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
float getScaleX() { return _displayParams.scaleX; }
|
float getScaleX() const { return _displayParams.scaleX; }
|
||||||
float getScaleY() { return _displayParams.scaleY; }
|
float getScaleY() const { return _displayParams.scaleY; }
|
||||||
uint32 getOutputWidth() { return _displayParams.screenOutput.width; }
|
uint32 getOutputWidth() const { return _displayParams.screenOutput.width; }
|
||||||
uint32 getOutputHeight() { return _displayParams.screenOutput.height; }
|
uint32 getOutputHeight() const { return _displayParams.screenOutput.height; }
|
||||||
uint32 getOutputBitsPerPixel() { return _displayParams.outputBitsPerPixel; }
|
uint32 getOutputBitsPerPixel() const { return _displayParams.outputBitsPerPixel; }
|
||||||
Common::List<Graphics::PixelFormat> getSupportedPixelFormats();
|
Common::List<Graphics::PixelFormat> getSupportedPixelFormats() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct GlobalDisplayParams {
|
struct GlobalDisplayParams {
|
||||||
|
|
|
@ -148,7 +148,7 @@ Graphics::PixelFormat OSystem_PSP::getScreenFormat() const {
|
||||||
return _screen.getScummvmPixelFormat();
|
return _screen.getScummvmPixelFormat();
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::List<Graphics::PixelFormat> OSystem_PSP::getSupportedFormats() {
|
Common::List<Graphics::PixelFormat> OSystem_PSP::getSupportedFormats() const {
|
||||||
return _displayManager.getSupportedPixelFormats();
|
return _displayManager.getSupportedPixelFormats();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ public:
|
||||||
int getGraphicsMode() const;
|
int getGraphicsMode() const;
|
||||||
#ifdef USE_RGB_COLOR
|
#ifdef USE_RGB_COLOR
|
||||||
virtual Graphics::PixelFormat getScreenFormat() const;
|
virtual Graphics::PixelFormat getScreenFormat() const;
|
||||||
virtual Common::List<Graphics::PixelFormat> getSupportedFormats();
|
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Screen size
|
// Screen size
|
||||||
|
|
|
@ -243,7 +243,7 @@ const Graphics::PixelFormat BGRList[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: prioritize matching alpha masks
|
// TODO: prioritize matching alpha masks
|
||||||
Common::List<Graphics::PixelFormat> OSystem_SDL::getSupportedFormats() {
|
Common::List<Graphics::PixelFormat> OSystem_SDL::getSupportedFormats() const {
|
||||||
static Common::List<Graphics::PixelFormat> list;
|
static Common::List<Graphics::PixelFormat> list;
|
||||||
static bool inited = false;
|
static bool inited = false;
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ public:
|
||||||
virtual Graphics::PixelFormat getScreenFormat() const { return _screenFormat; }
|
virtual Graphics::PixelFormat getScreenFormat() const { return _screenFormat; }
|
||||||
|
|
||||||
// Highest supported
|
// Highest supported
|
||||||
virtual Common::List<Graphics::PixelFormat> getSupportedFormats();
|
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set the size and format of the video bitmap.
|
// Set the size and format of the video bitmap.
|
||||||
|
|
|
@ -156,7 +156,7 @@ public:
|
||||||
virtual bool setGraphicsMode(int mode);
|
virtual bool setGraphicsMode(int mode);
|
||||||
#ifdef USE_RGB_COLOR
|
#ifdef USE_RGB_COLOR
|
||||||
virtual Graphics::PixelFormat getScreenFormat() const;
|
virtual Graphics::PixelFormat getScreenFormat() const;
|
||||||
virtual Common::List<Graphics::PixelFormat> getSupportedFormats();
|
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
|
||||||
#endif
|
#endif
|
||||||
virtual int getGraphicsMode() const;
|
virtual int getGraphicsMode() const;
|
||||||
virtual void initSize(uint width, uint height,
|
virtual void initSize(uint width, uint height,
|
||||||
|
|
|
@ -209,7 +209,7 @@ Graphics::PixelFormat OSystem_Wii::getScreenFormat() const {
|
||||||
return _pfGame;
|
return _pfGame;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::List<Graphics::PixelFormat> OSystem_Wii::getSupportedFormats() {
|
Common::List<Graphics::PixelFormat> OSystem_Wii::getSupportedFormats() const {
|
||||||
Common::List<Graphics::PixelFormat> res;
|
Common::List<Graphics::PixelFormat> res;
|
||||||
res.push_back(_pfRGB565);
|
res.push_back(_pfRGB565);
|
||||||
res.push_back(Graphics::PixelFormat::createFormatCLUT8());
|
res.push_back(Graphics::PixelFormat::createFormatCLUT8());
|
||||||
|
|
|
@ -383,7 +383,7 @@ public:
|
||||||
* @note Backends supporting RGB color should accept game data in RGB color
|
* @note Backends supporting RGB color should accept game data in RGB color
|
||||||
* order, even if hardware uses BGR or some other color order.
|
* order, even if hardware uses BGR or some other color order.
|
||||||
*/
|
*/
|
||||||
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() = 0;
|
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const = 0;
|
||||||
#else
|
#else
|
||||||
inline Graphics::PixelFormat getScreenFormat() const {
|
inline Graphics::PixelFormat getScreenFormat() const {
|
||||||
return Graphics::PixelFormat::createFormatCLUT8();
|
return Graphics::PixelFormat::createFormatCLUT8();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue