aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Montoir2003-12-03 13:00:56 +0000
committerGregory Montoir2003-12-03 13:00:56 +0000
commit894360920bc5596570eedc039de0116513d26225 (patch)
tree8ac7a202c264ad7b86adb606dec3fcc8c9a65e41
parent07ba3cfabcb1f1496845b0b962d6b016c2dab179 (diff)
downloadscummvm-rg350-894360920bc5596570eedc039de0116513d26225.tar.gz
scummvm-rg350-894360920bc5596570eedc039de0116513d26225.tar.bz2
scummvm-rg350-894360920bc5596570eedc039de0116513d26225.zip
fix klunk scene glitches
svn-id: r11486
-rw-r--r--queen/cutaway.cpp3
-rw-r--r--queen/graphics.cpp17
-rw-r--r--queen/graphics.h1
-rw-r--r--queen/logic.cpp12
-rw-r--r--queen/logic.h1
-rw-r--r--queen/talk.cpp2
6 files changed, 14 insertions, 22 deletions
diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp
index 0ec053239f..32a9472a83 100644
--- a/queen/cutaway.cpp
+++ b/queen/cutaway.cpp
@@ -1444,8 +1444,7 @@ void Cutaway::run(char *nextFilename) {
if (object->image == -3 || object->image == -4) {
k++;
if (object->name > 0) {
- BobSlot *bs = _graphics->bob(k);
- bs->animReset();
+ _logic->animReset(k);
}
}
}
diff --git a/queen/graphics.cpp b/queen/graphics.cpp
index 20eb456d64..55ea7b4ec8 100644
--- a/queen/graphics.cpp
+++ b/queen/graphics.cpp
@@ -185,23 +185,6 @@ void BobSlot::animNormal(uint16 firstFrame, uint16 lastFrame, uint16 spd, bool r
}
-void BobSlot::animReset() {
-
- if(active) {
- const AnimFrame *af = anim.string.buffer;
- if (af != NULL) {
- animating = true;
- anim.string.curPos = af;
- frameNum = af->frame;
- anim.speed = af->speed / 4;
- }
- else {
- animating = false;
- }
- }
-}
-
-
void BobSlot::clear() {
active = false;
diff --git a/queen/graphics.h b/queen/graphics.h
index 082661f7b2..b565848054 100644
--- a/queen/graphics.h
+++ b/queen/graphics.h
@@ -89,7 +89,6 @@ struct BobSlot {
void animString(const AnimFrame *animBuf);
void animNormal(uint16 firstFrame, uint16 lastFrame, uint16 speed, bool rebound, bool xflip);
- void animReset();
void clear();
};
diff --git a/queen/logic.cpp b/queen/logic.cpp
index 4e38be0348..541e6b75ac 100644
--- a/queen/logic.cpp
+++ b/queen/logic.cpp
@@ -1505,6 +1505,14 @@ void Logic::animErase(uint16 bobNum) {
}
+void Logic::animReset(uint16 bobNum) {
+
+ if (_newAnim[bobNum][0].frame != 0) {
+ _graphics->bob(bobNum)->animString(_newAnim[bobNum]);
+ }
+}
+
+
void Logic::animSetup(const GraphicData *gd, uint16 firstImage, uint16 bobNum, bool visible) {
int16 tempFrames[20];
@@ -1898,7 +1906,9 @@ void Logic::dialogue(const char *dlgFile, int personInRoom, char *cutaway) {
}
_display->fullscreen(true);
Talk::talk(dlgFile, personInRoom, cutaway, _graphics, _input, this, _resource, _sound);
- _display->fullscreen(false);
+ if (!cutaway[0]) {
+ _display->fullscreen(false);
+ }
}
diff --git a/queen/logic.h b/queen/logic.h
index bd184f0915..af9519e24c 100644
--- a/queen/logic.h
+++ b/queen/logic.h
@@ -230,6 +230,7 @@ public:
uint16 animCreate(uint16 curImage, const Person *person); // CREATE_ANIM
void animErase(uint16 bobNum);
+ void animReset(uint16 bobNum);
void animSetup(const GraphicData *gd, uint16 firstImage, uint16 bobNum, bool visible); // FIND_GRAPHIC_ANIMS
void joeSetupFromBanks(const char *animBank, const char *standBank);
diff --git a/queen/talk.cpp b/queen/talk.cpp
index f28626a5a7..a641f193ba 100644
--- a/queen/talk.cpp
+++ b/queen/talk.cpp
@@ -354,7 +354,7 @@ void Talk::talk(const char *filename, int personInRoom, char *cutawayFilename) {
pbs->y = person.actor->y;
// Better kick start the persons anim sequence
- pbs->animReset();
+ _logic->animReset(person.actor->bobNum);
}
_talkHead = false;