mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 14:18:37 +00:00
MADS: Fix for scene loading in teleporter scenes
This commit is contained in:
parent
ff5b97e75a
commit
36a1b66c71
@ -205,17 +205,6 @@ MSprite *SpriteAsset::getFrame(int frameIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SpriteAsset::drawScaled(int frameNumber, MSurface &depthSurface, MSurface &destSurface,
|
||||
int scale, int depth, const Common::Point &pos) {
|
||||
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: map depthDraw to frame draw methods");
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
SpriteSetCharInfo::SpriteSetCharInfo(Common::SeekableReadStream *s) {
|
||||
|
@ -105,11 +105,6 @@ public:
|
||||
byte *getPalette() { return _palette; }
|
||||
int getColorCount() { return _colorCount; }
|
||||
bool isBackground() const { return _isBackground; }
|
||||
|
||||
void drawScaled(int frameNumber, MSurface &depthSurface, MSurface &destSurface,
|
||||
int scale, int depth, const Common::Point &pos);
|
||||
void depthDraw(MSurface *surface, MSurface *depthSurface, int frameNumber,
|
||||
const Common::Point &pt, int depth);
|
||||
};
|
||||
|
||||
} // End of namespace MADS
|
||||
|
@ -226,17 +226,15 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
|
||||
Common::Array<SpriteAsset *> spriteSets;
|
||||
Common::Array<int> usageList;
|
||||
|
||||
if (flags & 1) {
|
||||
for (uint i = 0; i < setNames.size(); ++i) {
|
||||
Common::String setResName;
|
||||
if (sceneFlag || resName.hasPrefix("*"))
|
||||
setResName += "*";
|
||||
setResName += setNames[i];
|
||||
for (uint i = 0; i < setNames.size(); ++i) {
|
||||
Common::String setResName;
|
||||
if (sceneFlag || resName.hasPrefix("*"))
|
||||
setResName += "*";
|
||||
setResName += setNames[i];
|
||||
|
||||
SpriteAsset *sprites = new SpriteAsset(_vm, setResName, flags);
|
||||
spriteSets.push_back(sprites);
|
||||
usageList.push_back(sprites->_usageIndex);
|
||||
}
|
||||
SpriteAsset *sprites = new SpriteAsset(_vm, setResName, flags);
|
||||
spriteSets.push_back(sprites);
|
||||
usageList.push_back(sprites->_usageIndex);
|
||||
}
|
||||
|
||||
_vm->_palette->_paletteUsage.updateUsage(usageList, _usageIndex);
|
||||
@ -246,8 +244,9 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
|
||||
SpriteAsset *asset = spriteSets[si._spriteSetIndex];
|
||||
assert(asset && _depthStyle != 2);
|
||||
|
||||
asset->drawScaled(asset->getCount(), depthSurface, bgSurface,
|
||||
si._scale, si._depth, si._position);
|
||||
MSprite *spr = asset->getFrame(asset->getCount() - 1);
|
||||
bgSurface.copyFrom(spr, si._position, si._depth, &depthSurface, si._scale,
|
||||
spr->getTransparencyIndex());
|
||||
}
|
||||
|
||||
// Free the sprite sets
|
||||
|
@ -258,8 +258,8 @@ void SpriteSlots::drawBackground() {
|
||||
if (spriteSlot._depth <= 1) {
|
||||
frame->copyTo(&scene._backgroundSurface, frame->getTransparencyIndex());
|
||||
} else if (scene._depthStyle == 0) {
|
||||
asset->depthDraw(&scene._backgroundSurface, &scene._depthSurface, spriteSlot._frameNumber,
|
||||
pt, spriteSlot._depth);
|
||||
scene._backgroundSurface.copyFrom(frame, pt, spriteSlot._depth, &scene._backgroundSurface,
|
||||
100, frame->getTransparencyIndex());
|
||||
} else {
|
||||
error("Unsupported depth style");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user