aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Montoir2004-01-10 12:56:07 +0000
committerGregory Montoir2004-01-10 12:56:07 +0000
commit9439e09e45d9e14b9d5bc297a7c618ee3f948f9e (patch)
treec5abae4c86c6e173b2dd81ce50c6ceb37f2fd7bb
parentc4528ac022d13fde66a4d494110da4e97d2660c0 (diff)
downloadscummvm-rg350-9439e09e45d9e14b9d5bc297a7c618ee3f948f9e.tar.gz
scummvm-rg350-9439e09e45d9e14b9d5bc297a7c618ee3f948f9e.tar.bz2
scummvm-rg350-9439e09e45d9e14b9d5bc297a7c618ee3f948f9e.zip
this should fix :
- minor sound glitch in room 50 (temple zombies) - panel undisplayed at the end of cutaway c62c - wrong dirty blocks in room 76 - Cutaway::_cutAnim is now a 21x30 elements array. This is needed for cutaway c69g, where we setup frames for bob num 20 (the original game uses the same value) - Credits::_list is now a 18 elements array (that's what credits2.crd need) svn-id: r12294
-rw-r--r--queen/command.cpp4
-rw-r--r--queen/credits.cpp2
-rw-r--r--queen/credits.h2
-rw-r--r--queen/cutaway.cpp17
-rw-r--r--queen/cutaway.h2
-rw-r--r--queen/display.cpp4
6 files changed, 18 insertions, 13 deletions
diff --git a/queen/command.cpp b/queen/command.cpp
index 76b27a0793..7e177a33ac 100644
--- a/queen/command.cpp
+++ b/queen/command.cpp
@@ -407,7 +407,9 @@ int16 Command::executeCommand(uint16 comId, int16 condResult) {
}
// don't play music on an OPEN/CLOSE command - in case the command fails
- if (_state.selAction != VERB_OPEN && _state.selAction != VERB_CLOSE) {
+ if (_state.selAction != VERB_NONE &&
+ _state.selAction != VERB_OPEN &&
+ _state.selAction != VERB_CLOSE) {
// only play song if it's a PLAY BEFORE type
if (com->song > 0) {
_vm->sound()->playSong(com->song);
diff --git a/queen/credits.cpp b/queen/credits.cpp
index dcb78fb90a..6d81839dd9 100644
--- a/queen/credits.cpp
+++ b/queen/credits.cpp
@@ -128,10 +128,10 @@ void Credits::update() {
}
else {
+ assert(_count < ARRAYSIZE(_list));
_list[_count].text = line;
_list[_count].color = _color;
_list[_count].fontSize = _fontSize;
-
switch (_justify) {
case 0:
_list[_count].x = (_zone % 3) * (320 / 3) + 8;
diff --git a/queen/credits.h b/queen/credits.h
index 4eccf5bfa3..4cfddb398f 100644
--- a/queen/credits.h
+++ b/queen/credits.h
@@ -53,7 +53,7 @@ private:
char *text;
};
- Line _list[15];
+ Line _list[18];
bool _running;
int _count;
diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp
index 1b3d498f86..2d8fc97b05 100644
--- a/queen/cutaway.cpp
+++ b/queen/cutaway.cpp
@@ -390,12 +390,14 @@ void Cutaway::changeRooms(CutawayObject &object) {
_vm->logic()->oldRoom(_initialRoom);
- // FIXME: this cutaway is played at the end of the command 0x178. This command
- // setups some persons and associates bob slots to them. They should be hidden
- // as their y coordinate is > 150, but they aren't ! A (temporary) workaround
- // is to display the room with the panel area enabled.
+ // FIXME - the first cutaway is played at the end of the command 0x178. This
+ // command setups some persons and associates bob slots to them. They should be
+ // hidden as their y coordinate is > 150, but they aren't ! A (temporary)
+ // workaround is to display the room with the panel area enabled. Same problem
+ // for cutaway c62c.
int16 comPanel = _comPanel;
- if (strcmp(_basename, "c41f") == 0 && _temporaryRoom == 106 && object.room == 41) {
+ if ((strcmp(_basename, "c41f") == 0 && _temporaryRoom == 106 && object.room == 41) ||
+ (strcmp(_basename, "c62c") == 0 && _temporaryRoom == 105 && object.room == 41)) {
comPanel = 1;
}
@@ -820,7 +822,7 @@ void Cutaway::handlePersonRecord(
if (0 != strcmp(sentence, "*")) {
if (sentence[0] == '#') {
- debug(0, "Starting credits");
+ debug(0, "Starting credits '%s'", sentence + 1);
_vm->logic()->startCredits(sentence + 1);
}
else {
@@ -1286,7 +1288,8 @@ int Cutaway::makeComplexAnimation(int16 currentImage, Cutaway::CutawayAnim *objA
int frameIndex[256];
int i;
int bobNum = objAnim[0].object;
-
+ assert(bobNum < 21);
+
memset(frameIndex, 0, sizeof(frameIndex));
debug(6, "[Cutaway::makeComplexAnimation] currentImage = %i", currentImage);
diff --git a/queen/cutaway.h b/queen/cutaway.h
index 005d43094f..92cd9483ae 100644
--- a/queen/cutaway.h
+++ b/queen/cutaway.h
@@ -194,7 +194,7 @@ class Cutaway {
int16 _currentImage;
- AnimFrame _cutAnim[17][30];
+ AnimFrame _cutAnim[21][30];
Cutaway(const char *filename,
QueenEngine *vm);
diff --git a/queen/display.cpp b/queen/display.cpp
index 2d310c4a61..0be40792fc 100644
--- a/queen/display.cpp
+++ b/queen/display.cpp
@@ -570,9 +570,9 @@ void Display::screenMode(int comPanel, bool inCutaway) {
}
if (comPanel == 2 && inCutaway) {
- _fullscreen = (_bdHeight == GAME_SCREEN_HEIGHT);
+ fullscreen((_bdHeight == GAME_SCREEN_HEIGHT));
} else if (comPanel == 1) {
- _fullscreen = false;
+ fullscreen(false);
}
}