aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2009-01-22 04:35:10 +0000
committerMax Horn2009-01-22 04:35:10 +0000
commitabc06ca18e69c336d701707933b4dc490dd86e94 (patch)
treea6dc57ffd954e3e85f7be813fe25d8341180c2ea /engines
parenta2c671da977acda9f9503413fb38490dcceda76d (diff)
downloadscummvm-rg350-abc06ca18e69c336d701707933b4dc490dd86e94.tar.gz
scummvm-rg350-abc06ca18e69c336d701707933b4dc490dd86e94.tar.bz2
scummvm-rg350-abc06ca18e69c336d701707933b4dc490dd86e94.zip
Moved Graphics::PixelFormat into its own header file; turned RGBToColor etc. into methods, and added an operator==
svn-id: r35993
Diffstat (limited to 'engines')
-rw-r--r--engines/sword1/animation.cpp2
-rw-r--r--engines/sword2/animation.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index e08aeb6fa3..8219dbce12 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -544,7 +544,7 @@ bool MoviePlayerMPEG::initOverlays(uint32 id) {
_introPal = (OverlayColor *)malloc(256 * sizeof(OverlayColor));
Graphics::PixelFormat format = _system->getOverlayFormat();
for (uint16 cnt = 0; cnt < 256; cnt++)
- _introPal[cnt] = Graphics::RGBToColor(pal[cnt * 3 + 0], pal[cnt * 3 + 1], pal[cnt * 3 + 2], format);
+ _introPal[cnt] = format.RGBToColor(pal[cnt * 3 + 0], pal[cnt * 3 + 1], pal[cnt * 3 + 2]);
}
return true;
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index c195ba5b50..9375896f81 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -670,8 +670,8 @@ void AnimationState::drawTextObject(SpriteInfo *s, byte *src) {
OverlayColor *dst = _overlay + textY * moviePitch + textX;
Graphics::PixelFormat format = _sys->getOverlayFormat();
- OverlayColor pen = Graphics::RGBToColor(255, 255, 255, format);
- OverlayColor border = Graphics::RGBToColor(0, 0, 0, format);
+ OverlayColor pen = format.RGBToColor(255, 255, 255);
+ OverlayColor border = format.RGBToColor(0, 0, 0);
// TODO: Use the AdvMame scalers for the text? Pre-scale it?
@@ -719,7 +719,7 @@ void AnimationState::clearFrame() {
memset(_vm->_screen->getScreen(), 0, _movieWidth * _movieHeight);
#else
Graphics::PixelFormat format = _sys->getOverlayFormat();
- OverlayColor black = Graphics::RGBToColor(0, 0, 0, format);
+ OverlayColor black = format.RGBToColor(0, 0, 0);
for (int i = 0; i < _movieScale * _movieWidth * _movieScale * _movieHeight; i++)
_overlay[i] = black;