Code formatting
svn-id: r41420
This commit is contained in:
parent
8a8366aab5
commit
b4c44a018b
1 changed files with 48 additions and 51 deletions
|
@ -375,13 +375,11 @@ int OSystem_SDL::getGraphicsMode() const {
|
|||
return _videoMode.mode;
|
||||
}
|
||||
#ifdef ENABLE_16BIT
|
||||
Graphics::ColorFormat OSystem_SDL::findCompatibleFormat(Common::List<Graphics::ColorFormat> formatList)
|
||||
{
|
||||
Graphics::ColorFormat OSystem_SDL::findCompatibleFormat(Common::List<Graphics::ColorFormat> formatList) {
|
||||
bool typeAccepted = false;
|
||||
Graphics::ColorFormat format;
|
||||
|
||||
while (!formatList.empty() && !typeAccepted)
|
||||
{
|
||||
while (!formatList.empty() && !typeAccepted) {
|
||||
typeAccepted = false;
|
||||
format = formatList.front();
|
||||
|
||||
|
@ -391,8 +389,7 @@ Graphics::ColorFormat OSystem_SDL::findCompatibleFormat(Common::List<Graphics::C
|
|||
return format;
|
||||
|
||||
formatList.pop_front();
|
||||
switch (format & Graphics::kFormatTypeMask)
|
||||
{
|
||||
switch (format & Graphics::kFormatTypeMask) {
|
||||
case Graphics::kFormat8Bit:
|
||||
if (format == Graphics::kFormat8Bit)
|
||||
return format;
|
||||
|
@ -456,11 +453,11 @@ Graphics::PixelFormat OSystem_SDL::getPixelFormat(Graphics::ColorFormat format)
|
|||
result.rLoss = result.gLoss = result.bLoss = result.aLoss = 8;
|
||||
return result;
|
||||
}
|
||||
switch (format & Graphics::kFormatOrderMask)
|
||||
{
|
||||
switch (format & Graphics::kFormatOrderMask) {
|
||||
default:
|
||||
case Graphics::kFormatRGBA:
|
||||
result.aShift = 0;
|
||||
// fall through
|
||||
case Graphics::kFormatRGB:
|
||||
result.bShift = result.aBits();
|
||||
result.gShift = result.bShift + result.bBits();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue