LOL: fixed regression

svn-id: r46366
This commit is contained in:
Florian Kagerer 2009-12-13 20:37:26 +00:00
parent adba314fc6
commit 42c306208b
4 changed files with 9 additions and 5 deletions

View File

@ -65,7 +65,7 @@ TimAnimator::~TimAnimator() {
}
void TimAnimator::init(int animIndex, Movie *wsa, int x, int y, int wsaCopyParams, int frameDelay) {
TimAnimator::Animation *anim = &_animations[animIndex];
Animation *anim = &_animations[animIndex];
anim->wsa = wsa;
anim->x = x;
anim->y = y;
@ -76,7 +76,7 @@ void TimAnimator::init(int animIndex, Movie *wsa, int x, int y, int wsaCopyParam
}
void TimAnimator::reset(int animIndex, bool clearStruct) {
TimAnimator::Animation *anim = &_animations[animIndex];
Animation *anim = &_animations[animIndex];
if (!anim)
return;
anim->field_D = 0;
@ -98,7 +98,7 @@ void TimAnimator::reset(int animIndex, bool clearStruct) {
}
void TimAnimator::displayFrame(int animIndex, int page, int frame, int flags) {
TimAnimator::Animation *anim = &_animations[animIndex];
Animation *anim = &_animations[animIndex];
if ((anim->wsaCopyParams & 0x4000) != 0)
page = 2;
// WORKAROUND for some bugged scripts that will try to display frames of non-existent animations

View File

@ -1794,7 +1794,7 @@ void LoLEngine::createTransparencyTables() {
}
void LoLEngine::updateSequenceBackgroundAnimations() {
if (_updateFlags & 8)
if (_updateFlags & 8 || !_animator)
return;
for (int i = 0; i < 6; i++)

View File

@ -1881,7 +1881,7 @@ void LoLEngine::drawVcnBlocks() {
horizontalFlip = true;
}
shift = _vcnShift? _vcnShift[remainder] : _blockBrightness;
shift = _vcnShift ? _vcnShift[remainder] : _blockBrightness;
src = &_vcnBlocks[remainder << 5];
if (horizontalFlip) {

View File

@ -255,6 +255,7 @@ void LoLEngine::showIntro() {
delete _tim;
_tim = 0;
_animator = 0;
_screen->fadePalette(_screen->getPalette(1), 30, 0);
}
@ -379,6 +380,7 @@ int LoLEngine::chooseCharacter() {
delete _tim;
_tim = 0;
_animator = 0;
return _charSelection;
}
@ -1144,6 +1146,8 @@ void LoLEngine::showOutro(int character, bool maxDifficulty) {
_tim->clearLangData();
delete _tim;
_tim = timBackUp;
_animator = 0;
setupEpilogueData(false);
}