aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/graphics.cpp
diff options
context:
space:
mode:
authorMax Horn2009-12-07 18:20:20 +0000
committerMax Horn2009-12-07 18:20:20 +0000
commit6d1e4dd0344f9baef12709e2c90ac98e17392786 (patch)
tree188b4cb994765e805e76f5550f97d99f6ba3b4e2 /engines/m4/graphics.cpp
parentbabb38230e4cd69aaf79d0ade25a1cf37f6815bb (diff)
downloadscummvm-rg350-6d1e4dd0344f9baef12709e2c90ac98e17392786.tar.gz
scummvm-rg350-6d1e4dd0344f9baef12709e2c90ac98e17392786.tar.bz2
scummvm-rg350-6d1e4dd0344f9baef12709e2c90ac98e17392786.zip
M4: Rename M4Surface::getData() to getBasePtr() for consistency
svn-id: r46279
Diffstat (limited to 'engines/m4/graphics.cpp')
-rw-r--r--engines/m4/graphics.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp
index 06bb358179..b3c1a8cf04 100644
--- a/engines/m4/graphics.cpp
+++ b/engines/m4/graphics.cpp
@@ -216,7 +216,7 @@ void M4Surface::drawSprite(int x, int y, SpriteInfo &info, const Common::Rect &c
return;
int heightAmt = scaledHeight;
- byte *src = info.sprite->getData();
+ byte *src = info.sprite->getBasePtr();
byte *dst = getBasePtr(x - info.hotX - clipX, y - info.hotY - clipY);
int status = kStatusSkip;
@@ -309,19 +309,11 @@ void M4Surface::drawSprite(int x, int y, SpriteInfo &info, const Common::Rect &c
// Surface methods
-byte *M4Surface::getData() {
- return (byte *)pixels;
-}
-
-byte *M4Surface::getBasePtr(int x, int y) {
- return (byte *)Graphics::Surface::getBasePtr(x, y);
-}
-
void M4Surface::freeData() {
}
void M4Surface::clear() {
- Common::set_to((byte *) pixels, (byte *) pixels + w * h, _vm->_palette->BLACK);
+ Common::set_to((byte *)pixels, (byte *)pixels + w * h, _vm->_palette->BLACK);
}
void M4Surface::frameRect(const Common::Rect &r, uint8 color) {
@@ -357,7 +349,7 @@ void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int dest
// Copy the specified area
- byte *data = src->getData();
+ byte *data = src->getBasePtr();
byte *srcPtr = data + (src->width() * copyRect.top + copyRect.left);
byte *destPtr = (byte *)pixels + (destY * width()) + destX;
@@ -855,7 +847,7 @@ void Palette::fadeToGreen(int numSteps, uint delayAmount) {
// Remap all pixels into the #32-63 range
- tempP = _vm->_scene->getData();
+ tempP = _vm->_scene->getBasePtr();
for (int pixelCtr = 0; pixelCtr < _vm->_scene->width() * _vm->_scene->height();
++pixelCtr, ++tempP) {
// If pixel is in #32-63 range already, remap to higher palette entries