diff options
author | Paul Gilbert | 2010-06-11 11:03:51 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-06-11 11:03:51 +0000 |
commit | ef34896dce9188591e8ddd6e8eed543febd70b87 (patch) | |
tree | d7bef4830e4ec397795a69ed63461c2cfabc4a59 /engines/m4/mads_anim.cpp | |
parent | 580c9032f02123ba1f46a49c098dbf34f0b2f3c1 (diff) | |
download | scummvm-rg350-ef34896dce9188591e8ddd6e8eed543febd70b87.tar.gz scummvm-rg350-ef34896dce9188591e8ddd6e8eed543febd70b87.tar.bz2 scummvm-rg350-ef34896dce9188591e8ddd6e8eed543febd70b87.zip |
Clarified various incorrectly named parameters, and fixed code for loading the correct art file backgrounds when running animation sequences
svn-id: r49595
Diffstat (limited to 'engines/m4/mads_anim.cpp')
-rw-r--r-- | engines/m4/mads_anim.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp index eac6d1b4aa..c618ae57cc 100644 --- a/engines/m4/mads_anim.cpp +++ b/engines/m4/mads_anim.cpp @@ -458,6 +458,8 @@ AnimviewView::AnimviewView(MadsM4Engine *vm): _previousUpdate = 0; _transition = kTransitionNone; _activeAnimation = NULL; + _bgLoadFlag = true; + reset(); // Set up system palette colors @@ -572,12 +574,12 @@ void AnimviewView::readNextCommand() { if (strchr(_currentLine, '.') == NULL) strcat(_currentLine, ".aa"); - _activeAnimation = new MadsAnimation(_vm, this); - _activeAnimation->load(_currentLine, 0); + uint16 flags = 0; + if (_bgLoadFlag) + flags |= 0x100; - _backgroundSurface.loadBackground(_activeAnimation->roomNumber()); - _codeSurface.setSize(_backgroundSurface.width(), _backgroundSurface.height()); - _codeSurface.fillRect(_codeSurface.bounds(), 0xff); + _activeAnimation = new MadsAnimation(_vm, this); + _activeAnimation->initialise(_currentLine, flags, &_backgroundSurface, &_codeSurface); _spriteSlots.fullRefresh(); /* @@ -675,7 +677,10 @@ void AnimviewView::processCommand() { str_upper(commandStr); char *param = commandStr; - if (!strncmp(commandStr, "X", 1)) { + if (!strncmp(commandStr, "B", 1)) { + // Toggle background load flag + _bgLoadFlag = !_bgLoadFlag; + } else if (!strncmp(commandStr, "X", 1)) { //printf("X "); } else if (!strncmp(commandStr, "W", 1)) { //printf("W "); |