MADS: Fix drawing background sprites

This commit is contained in:
Paul Gilbert 2014-04-16 09:24:10 -04:00
parent 9f67216b11
commit c2bf78848d
3 changed files with 4 additions and 8 deletions

View File

@ -203,16 +203,12 @@ MSprite *SpriteAsset::getFrame(int frameIndex) {
void SpriteAsset::drawScaled(int frameNumber, MSurface &depthSurface, MSurface &destSurface,
int scale, int depth, const Common::Point &pos) {
warning("TODO: SpriteAsset::drawScaled");
}
void SpriteAsset::draw(MSurface *surface, int frameNumber, const Common::Point &pt) {
error("TODO: draw");
error("TODO: SpriteAsset::drawScaled - map to frame methods");
}
void SpriteAsset::depthDraw(MSurface *surface, MSurface *depthSurface, int frameNumber,
const Common::Point &pt, int depth) {
error("TODO: depthDraw");
error("TODO: map depthDraw to frame draw methods");
}
/*------------------------------------------------------------------------*/

View File

@ -108,7 +108,6 @@ public:
void drawScaled(int frameNumber, MSurface &depthSurface, MSurface &destSurface,
int scale, int depth, const Common::Point &pos);
void draw(MSurface *surface, int frameNumber, const Common::Point &pt);
void depthDraw(MSurface *surface, MSurface *depthSurface, int frameNumber,
const Common::Point &pt, int depth);
};

View File

@ -254,8 +254,9 @@ void SpriteSlots::drawBackground() {
pt.y -= frame->h / 2;
}
if (spriteSlot._depth <= 1) {
asset->draw(&scene._backgroundSurface, spriteSlot._frameNumber, pt);
frame->copyTo(&scene._backgroundSurface, frame->getTransparencyIndex());
} else if (scene._depthStyle == 0) {
asset->depthDraw(&scene._backgroundSurface, &scene._depthSurface, spriteSlot._frameNumber,
pt, spriteSlot._depth);