aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2004-02-09 18:57:05 +0000
committerEugene Sandulenko2004-02-09 18:57:05 +0000
commit6d356e340cf73279c7cb9d7df7a89431adb56c53 (patch)
treefd127c7717ee78d5d7e35bc1f7de21bbdade99d9
parentfbd9b36e03f9d101b566b09af7136d2e929bf73a (diff)
downloadscummvm-rg350-6d356e340cf73279c7cb9d7df7a89431adb56c53.tar.gz
scummvm-rg350-6d356e340cf73279c7cb9d7df7a89431adb56c53.tar.bz2
scummvm-rg350-6d356e340cf73279c7cb9d7df7a89431adb56c53.zip
o Fix bug #892909 (Unable to get Hover Lift at Gorge)
o Fix bug with transition from vista to ranch svn-id: r12799
-rw-r--r--scumm/insane/insane.cpp13
-rw-r--r--scumm/insane/insane.h4
-rw-r--r--scumm/insane/insane_scenes.cpp1
-rw-r--r--scumm/smush/smush_player.cpp8
-rw-r--r--scumm/smush/smush_player.h2
5 files changed, 19 insertions, 9 deletions
diff --git a/scumm/insane/insane.cpp b/scumm/insane/insane.cpp
index ea88496694..3d4022b1a1 100644
--- a/scumm/insane/insane.cpp
+++ b/scumm/insane/insane.cpp
@@ -597,7 +597,9 @@ void Insane::readFileToMem(const char *name, byte **buf) {
}
void Insane::startVideo(const char *filename, int num, int argC, int frameRate,
- int doMainLoop, byte *fluPtr, int32 numFrames) {
+ int doMainLoop, byte *fluPtr, int32 startFrame) {
+ int32 offset = 0;
+
_smush_curFrame = 0;
_smush_isSanFileSetup = 0;
_smush_setupsan4 = 0;
@@ -605,14 +607,13 @@ void Insane::startVideo(const char *filename, int num, int argC, int frameRate,
_smush_setupsan1 = 0;
_smush_setupsan17 = 0;
-
if (fluPtr) {
- smush_setupSanWithFlu(filename, 0, -1, -1, 0, fluPtr, numFrames);
+ offset = smush_setupSanWithFlu(filename, 0, -1, -1, 0, fluPtr, startFrame);
} else {
smush_setupSanFromStart(filename, 0, -1, -1, 0);
}
- _player->play(filename, _vm->getGameDataPath());
+ _player->play(filename, _vm->getGameDataPath(), offset, startFrame);
}
void Insane::smush_warpMouse(int x, int y, int buttons) {
@@ -1381,7 +1382,7 @@ void Insane::writeArray(int item, int value) {
_vm->writeArray(_numberArray, 0, item, value);
}
-void Insane::smush_setupSanWithFlu(const char *filename, int32 setupsan2, int32 step1,
+int32 Insane::smush_setupSanWithFlu(const char *filename, int32 setupsan2, int32 step1,
int32 step2, int32 setupsan1, byte *fluPtr,
int32 numFrames) {
byte *tmp = fluPtr;
@@ -1419,6 +1420,8 @@ void Insane::smush_setupSanWithFlu(const char *filename, int32 setupsan2, int32
_smush_curFrame = numFrames;
smush_setFrameSteps(step1, step2);
smush_warpMouse(160, 100, -1);
+
+ return offset;
}
void Insane::smush_setupSanFromStart(const char *filename, int32 setupsan2, int32 step1,
diff --git a/scumm/insane/insane.h b/scumm/insane/insane.h
index 24b39b6ecb..5a92e86735 100644
--- a/scumm/insane/insane.h
+++ b/scumm/insane/insane.h
@@ -271,7 +271,7 @@ class Insane {
void initvars(void);
void readFileToMem(const char *name, byte **buf);
void startVideo(const char *filename, int num, int argC, int frameRate,
- int doMainLoop, byte *fluPtr = 0, int32 numFrames = 0);
+ int doMainLoop, byte *fluPtr = 0, int32 startFrame = 0);
void smush_warpMouse(int x, int y, int buttons);
void putActors(void);
void readState(void);
@@ -418,7 +418,7 @@ class Insane {
void reinitActors(void);
const char *handleTrsTag(int32 trsId);
void ouchSoundBen(void);
- void smush_setupSanWithFlu(const char *filename, int32 setupsan2, int32 step1,
+ int32 smush_setupSanWithFlu(const char *filename, int32 setupsan2, int32 step1,
int32 step2, int32 setupsan1, byte *fluPtr, int32 numFrames);
void smush_setupSanFromStart(const char *filename, int32 setupsan2, int32 step1,
int32 step2, int32 setupsan1);
diff --git a/scumm/insane/insane_scenes.cpp b/scumm/insane/insane_scenes.cpp
index 9fb4e56513..32d55f7856 100644
--- a/scumm/insane/insane_scenes.cpp
+++ b/scumm/insane/insane_scenes.cpp
@@ -1184,6 +1184,7 @@ void Insane::postCase5(byte *renderBitmap, int32 codecparam, int32 setupsan12,
writeArray(1, _val57d);
smush_setToFinish();
} else {
+ writeArray(4, 1);
queueSceneSwitch(15, 0, "chasout.san", 64, 0, 0, 0);
}
}
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index 13c0c677f3..a0dd10433d 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -1012,7 +1012,7 @@ void SmushPlayer::seekSan(const char *file, const char *directory, int32 pos, in
_frame = contFrame;
}
-void SmushPlayer::play(const char *filename, const char *directory) {
+void SmushPlayer::play(const char *filename, const char *directory, int32 offset, int32 startFrame) {
// Verify the specified file exists
File f;
@@ -1032,6 +1032,12 @@ void SmushPlayer::play(const char *filename, const char *directory) {
setupAnim(filename, directory);
init();
+ if (offset) {
+ _base->seek(offset - 8, FileChunk::seek_start);
+ _frame = startFrame;
+ _middleAudio = true;
+ }
+
while (true) {
_vm->parseEvents();
_vm->processKbd(true);
diff --git a/scumm/smush/smush_player.h b/scumm/smush/smush_player.h
index b790f93ab1..5b0cd7e119 100644
--- a/scumm/smush/smush_player.h
+++ b/scumm/smush/smush_player.h
@@ -74,7 +74,7 @@ public:
SmushPlayer(ScummEngine_v6 *scumm, int speed);
~SmushPlayer();
- void play(const char *filename, const char *directory);
+ void play(const char *filename, const char *directory, int32 offset = 0, int32 startFrame = 0);
protected:
SmushFont *_sf[5];