mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 12:22:51 +00:00
MADS: Further fixes for palette cycling during animations
This commit is contained in:
parent
bf7eef466d
commit
fc2a579f2e
@ -810,6 +810,7 @@ AnimationView::AnimationView(MADSEngine *vm) : MenuView(vm) {
|
||||
_manualStartFrame = _manualEndFrame = 0;
|
||||
_manualFrame2 = 0;
|
||||
_animFrameNumber = 0;
|
||||
_nextCyclingActive = false;
|
||||
_sceneInfo = SceneInfo::init(_vm);
|
||||
|
||||
load();
|
||||
@ -864,6 +865,8 @@ void AnimationView::doFrame() {
|
||||
scene._frameStartTime = 0;
|
||||
loadNextResource();
|
||||
}
|
||||
} else if (_currentAnimation->getCurrentFrame() == 1) {
|
||||
scene._cyclingActive = _nextCyclingActive;
|
||||
}
|
||||
|
||||
if (_currentAnimation) {
|
||||
@ -923,11 +926,12 @@ void AnimationView::loadNextResource() {
|
||||
&palette._cyclingPalette[0]);
|
||||
|
||||
_vm->_game->_fx = (ScreenTransition)resEntry._fx;
|
||||
_nextCyclingActive = paletteCycles.size() > 0;
|
||||
if (!_vm->_game->_fx) {
|
||||
palette.setFullPalette(palette._mainPalette);
|
||||
}
|
||||
|
||||
scene.initPaletteAnimation(paletteCycles, (paletteCycles.size() > 0) && !_vm->_game->_fx);
|
||||
scene.initPaletteAnimation(paletteCycles, _nextCyclingActive && !_vm->_game->_fx);
|
||||
}
|
||||
|
||||
void AnimationView::scriptDone() {
|
||||
@ -965,8 +969,12 @@ void AnimationView::processLines() {
|
||||
resName += c;
|
||||
}
|
||||
|
||||
// Add resource into list along with any set state information
|
||||
_resources.push_back(ResourceEntry(resName, _sfx, _soundFlag,
|
||||
_bgLoadFlag, _showWhiteBars));
|
||||
|
||||
// Fx resets between resource entries
|
||||
_sfx = 0;
|
||||
}
|
||||
|
||||
// Skip any spaces
|
||||
|
@ -282,6 +282,7 @@ private:
|
||||
int _manualStartFrame, _manualEndFrame;
|
||||
int _manualFrame2;
|
||||
int _animFrameNumber;
|
||||
bool _nextCyclingActive;
|
||||
private:
|
||||
void checkResource(const Common::String &resourceName);
|
||||
|
||||
|
@ -299,6 +299,7 @@ void SceneInfo::loadPalette(int sceneId, int artFileNum, const Common::String &r
|
||||
delete stream;
|
||||
|
||||
// Copy out the palette animation data
|
||||
_paletteCycles.clear();
|
||||
for (uint i = 0; i < artHeader._paletteCycles.size(); ++i)
|
||||
_paletteCycles.push_back(artHeader._paletteCycles[i]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user