diff options
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/myst_stacks/channelwood.cpp | 8 | ||||
-rw-r--r-- | engines/mohawk/myst_stacks/dni.cpp | 14 | ||||
-rw-r--r-- | engines/mohawk/myst_stacks/myst.cpp | 46 | ||||
-rw-r--r-- | engines/mohawk/myst_stacks/stoneship.cpp | 22 | ||||
-rw-r--r-- | engines/mohawk/riven_external.cpp | 18 | ||||
-rw-r--r-- | engines/mohawk/video.cpp | 10 | ||||
-rw-r--r-- | engines/mohawk/video.h | 6 |
7 files changed, 62 insertions, 62 deletions
diff --git a/engines/mohawk/myst_stacks/channelwood.cpp b/engines/mohawk/myst_stacks/channelwood.cpp index b5379c2adf..6e367d0167 100644 --- a/engines/mohawk/myst_stacks/channelwood.cpp +++ b/engines/mohawk/myst_stacks/channelwood.cpp @@ -293,9 +293,9 @@ void MystScriptParser_Channelwood::o_bridgeToggle(uint16 op, uint16 var, uint16 // Toggle bridge state if (_state.waterPumpBridgeState) - _vm->_video->setVideoBounds(bridge, Video::VideoTimestamp(3050, 600), Video::VideoTimestamp(6100, 600)); + _vm->_video->setVideoBounds(bridge, Audio::Timestamp(0, 3050, 600), Audio::Timestamp(0, 6100, 600)); else - _vm->_video->setVideoBounds(bridge, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(3050, 600)); + _vm->_video->setVideoBounds(bridge, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 3050, 600)); _vm->_video->waitUntilMovieEnds(bridge); } @@ -311,9 +311,9 @@ void MystScriptParser_Channelwood::o_pipeExtend(uint16 op, uint16 var, uint16 ar // Toggle pipe state if (_state.pipeState) - _vm->_video->setVideoBounds(pipe, Video::VideoTimestamp(3040, 600), Video::VideoTimestamp(6080, 600)); + _vm->_video->setVideoBounds(pipe, Audio::Timestamp(0, 3040, 600), Audio::Timestamp(0, 6080, 600)); else - _vm->_video->setVideoBounds(pipe, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(3040, 600)); + _vm->_video->setVideoBounds(pipe, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 3040, 600)); _vm->_video->waitUntilMovieEnds(pipe); _vm->_sound->resumeBackgroundMyst(); diff --git a/engines/mohawk/myst_stacks/dni.cpp b/engines/mohawk/myst_stacks/dni.cpp index 8c98df6d9b..47382b7b81 100644 --- a/engines/mohawk/myst_stacks/dni.cpp +++ b/engines/mohawk/myst_stacks/dni.cpp @@ -103,13 +103,13 @@ void MystScriptParser_Dni::o_handPage(uint16 op, uint16 var, uint16 argc, uint16 VideoHandle atrus = _vm->_video->findVideoHandle(_video); // Good ending and Atrus asked to give page - if (_globals.ending == 1 && _vm->_video->getElapsedTime(atrus) > Video::VideoTimestamp(6801, 600).getUnitsInScale(1000)) { + if (_globals.ending == 1 && _vm->_video->getElapsedTime(atrus) > (uint)Audio::Timestamp(0, 6801, 600).msecs()) { _globals.ending = 2; _globals.heldPage = 0; _vm->_cursor->setCursor(kDefaultMystCursor); // Play movie end (atrus leaving) - _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(14813, 600), Video::VideoTimestamp(0xFFFFFFFF)); + _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 14813, 600), Audio::Timestamp(0xFFFFFFFF)); _vm->_video->setVideoLooping(atrus, false); _atrusLeft = true; @@ -122,7 +122,7 @@ void MystScriptParser_Dni::atrusLeft_run() { if (_vm->_system->getMillis() > _atrusLeftTime + 63333) { _video = _vm->wrapMovieFilename("atrus2", kDniStack); VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77); - _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(98000, 600)); + _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 98000, 600)); _waitForLoop = true; _loopStart = 73095; @@ -140,7 +140,7 @@ void MystScriptParser_Dni::atrusLeft_run() { void MystScriptParser_Dni::loopVideo_run() { if (!_vm->_video->isVideoPlaying()) { VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77); - _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(_loopStart, 600), Video::VideoTimestamp(_loopEnd, 600)); + _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, _loopStart, 600), Audio::Timestamp(0, _loopEnd, 600)); _vm->_video->setVideoLooping(atrus, true); _waitForLoop = false; @@ -156,13 +156,13 @@ void MystScriptParser_Dni::atrus_run() { if (!_vm->_video->isVideoPlaying()) { _video = _vm->wrapMovieFilename("atr1page", kDniStack); VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77, true); - _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(7388, 600), Video::VideoTimestamp(14700, 600)); + _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 7388, 600), Audio::Timestamp(0, 14700, 600)); } } else if (_globals.ending != 3 && _globals.ending != 4) { if (_globals.heldPage == 13) { _video = _vm->wrapMovieFilename("atr1page", kDniStack); VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77); - _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(14700, 600)); + _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 14700, 600)); _waitForLoop = true; _loopStart = 7388; @@ -174,7 +174,7 @@ void MystScriptParser_Dni::atrus_run() { } else { _video = _vm->wrapMovieFilename("atr1nopg", kDniStack); VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77); - _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(46175, 600)); + _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 46175, 600)); _waitForLoop = true; _loopStart = 30656; diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp index 063a37ccf4..02f899e419 100644 --- a/engines/mohawk/myst_stacks/myst.cpp +++ b/engines/mohawk/myst_stacks/myst.cpp @@ -1133,7 +1133,7 @@ void MystScriptParser_Myst::o_clockWheelsExecute(uint16 op, uint16 var, uint16 a // Gears rise up VideoHandle gears = _vm->_video->playMovie(_vm->wrapMovieFilename("gears", kMystStack), 305, 33); - _vm->_video->setVideoBounds(gears, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(650, 600)); + _vm->_video->setVideoBounds(gears, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 650, 600)); _vm->_video->waitUntilMovieEnds(gears); @@ -1145,7 +1145,7 @@ void MystScriptParser_Myst::o_clockWheelsExecute(uint16 op, uint16 var, uint16 a // Gears sink down VideoHandle gears = _vm->_video->playMovie(_vm->wrapMovieFilename("gears", kMystStack), 305, 33); - _vm->_video->setVideoBounds(gears, Video::VideoTimestamp(700, 600), Video::VideoTimestamp(1300, 600)); + _vm->_video->setVideoBounds(gears, Audio::Timestamp(0, 700, 600), Audio::Timestamp(0, 1300, 600)); _vm->_video->waitUntilMovieEnds(gears); _state.clockTowerBridgeOpen = 0; @@ -1189,14 +1189,14 @@ void MystScriptParser_Myst::o_imagerPlayButton(uint16 op, uint16 var, uint16 arg // Mountains disappearing Common::String file = _vm->wrapMovieFilename("vltmntn", kMystStack); VideoHandle mountain = _vm->_video->playMovie(file, 159, 96, false); - _vm->_video->setVideoBounds(mountain, Video::VideoTimestamp(11180, 600), Video::VideoTimestamp(16800, 600)); + _vm->_video->setVideoBounds(mountain, Audio::Timestamp(0, 11180, 600), Audio::Timestamp(0, 16800, 600)); _state.imagerActive = 0; } else { // Mountains appearing Common::String file = _vm->wrapMovieFilename("vltmntn", kMystStack); VideoHandle mountain = _vm->_video->playMovie(file, 159, 96, false); - _vm->_video->setVideoBounds(mountain, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(11180, 600)); + _vm->_video->setVideoBounds(mountain, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 11180, 600)); _state.imagerActive = 1; } @@ -1209,19 +1209,19 @@ void MystScriptParser_Myst::o_imagerPlayButton(uint16 op, uint16 var, uint16 arg // Water disappearing VideoHandle water = _imagerMovie->playMovie(); - _vm->_video->setVideoBounds(water, Video::VideoTimestamp(4204, 600), Video::VideoTimestamp(6040, 600)); + _vm->_video->setVideoBounds(water, Audio::Timestamp(0, 4204, 600), Audio::Timestamp(0, 6040, 600)); _vm->_video->setVideoLooping(water, false); _state.imagerActive = 0; } else { // Water appearing VideoHandle water = _imagerMovie->playMovie(); - _vm->_video->setVideoBounds(water, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(1814, 600)); + _vm->_video->setVideoBounds(water, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 1814, 600)); _vm->_video->waitUntilMovieEnds(water); // Water looping water = _imagerMovie->playMovie(); - _vm->_video->setVideoBounds(water, Video::VideoTimestamp(1814, 600), Video::VideoTimestamp(4204, 600)); + _vm->_video->setVideoBounds(water, Audio::Timestamp(0, 1814, 600), Audio::Timestamp(0, 4204, 600)); _vm->_video->setVideoLooping(water, true); _state.imagerActive = 1; @@ -2192,12 +2192,12 @@ void MystScriptParser_Myst::rocketCheckSolution() { // Book appearing Common::String movieFile = _vm->wrapMovieFilename("selenbok", kMystStack); _rocketLinkBook = _vm->_video->playMovie(movieFile, 224, 41); - _vm->_video->setVideoBounds(_rocketLinkBook, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(660, 600)); + _vm->_video->setVideoBounds(_rocketLinkBook, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 660, 600)); _vm->_video->waitUntilMovieEnds(_rocketLinkBook); // Book looping closed _rocketLinkBook = _vm->_video->playMovie(movieFile, 224, 41, true); - _vm->_video->setVideoBounds(_rocketLinkBook, Video::VideoTimestamp(660, 600), Video::VideoTimestamp(3500, 600)); + _vm->_video->setVideoBounds(_rocketLinkBook, Audio::Timestamp(0, 660, 600), Audio::Timestamp(0, 3500, 600)); _tempVar = 1; } @@ -2312,7 +2312,7 @@ void MystScriptParser_Myst::o_rocketOpenBook(uint16 op, uint16 var, uint16 argc, debugC(kDebugScript, "Opcode %d: Rocket open link book", op); // Flyby movie - _vm->_video->setVideoBounds(_rocketLinkBook, Video::VideoTimestamp(3500, 600), Video::VideoTimestamp(13100, 600)); + _vm->_video->setVideoBounds(_rocketLinkBook, Audio::Timestamp(0, 3500, 600), Audio::Timestamp(0, 13100, 600)); // Set linkable _tempVar = 2; @@ -2836,16 +2836,16 @@ void MystScriptParser_Myst::clockGearForwardOneStep(uint16 gear) { uint16 gearPosition = _clockGearsPositions[gear] - 1; _clockGearsVideos[gear] = _vm->_video->playMovie(_vm->wrapMovieFilename(videos[gear], kMystStack), x[gear], y[gear]); _vm->_video->setVideoBounds(_clockGearsVideos[gear], - Video::VideoTimestamp(startTime[gearPosition], 600), - Video::VideoTimestamp(endTime[gearPosition], 600)); + Audio::Timestamp(0, startTime[gearPosition], 600), + Audio::Timestamp(0, endTime[gearPosition], 600)); } void MystScriptParser_Myst::clockWeightDownOneStep() { // Set video bounds _clockWeightVideo = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0); _vm->_video->setVideoBounds(_clockWeightVideo, - Video::VideoTimestamp(_clockWeightPosition, 600), - Video::VideoTimestamp(_clockWeightPosition + 246, 600)); + Audio::Timestamp(0, _clockWeightPosition, 600), + Audio::Timestamp(0, _clockWeightPosition + 246, 600)); // Increment value by one step _clockWeightPosition += 246; @@ -2897,8 +2897,8 @@ void MystScriptParser_Myst::clockGearsCheckSolution() { _vm->_sound->replaceSoundMyst(9113); _clockWeightVideo = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0); _vm->_video->setVideoBounds(_clockWeightVideo, - Video::VideoTimestamp(_clockWeightPosition, 600), - Video::VideoTimestamp(2214, 600)); + Audio::Timestamp(0, _clockWeightPosition, 600), + Audio::Timestamp(0, 2214, 600)); _vm->_video->waitUntilMovieEnds(_clockWeightVideo); _clockWeightPosition = 2214; @@ -2976,8 +2976,8 @@ void MystScriptParser_Myst::clockResetWeight() { if (!(_vm->getFeatures() & GF_ME)) { _clockWeightVideo = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0); _vm->_video->setVideoBounds(_clockWeightVideo, - Video::VideoTimestamp(2214 * 2 - _clockWeightPosition, 600), - Video::VideoTimestamp(2214 * 2, 600)); + Audio::Timestamp(0, 2214 * 2 - _clockWeightPosition, 600), + Audio::Timestamp(0, 2214 * 2, 600)); } else { //FIXME: Needs QT backwards playing warning("Weight going back up not implemented"); @@ -2998,8 +2998,8 @@ void MystScriptParser_Myst::clockResetGear(uint16 gear) { if (gearPosition != 2) { _clockGearsVideos[gear] = _vm->_video->playMovie(_vm->wrapMovieFilename(videos[gear], kMystStack), x[gear], y[gear]); _vm->_video->setVideoBounds(_clockGearsVideos[gear], - Video::VideoTimestamp(time[gearPosition], 600), - Video::VideoTimestamp(time[2], 600)); + Audio::Timestamp(0, time[gearPosition], 600), + Audio::Timestamp(0, time[2], 600)); } // Reset gear position @@ -3220,7 +3220,7 @@ void MystScriptParser_Myst::imager_run() { if (_state.imagerActive && _state.imagerSelection == 67) { VideoHandle water = _imagerMovie->playMovie(); - _vm->_video->setVideoBounds(water, Video::VideoTimestamp(1814, 600), Video::VideoTimestamp(4204, 600)); + _vm->_video->setVideoBounds(water, Audio::Timestamp(0, 1814, 600), Audio::Timestamp(0, 4204, 600)); _vm->_video->setVideoLooping(water, true); } } @@ -3562,12 +3562,12 @@ void MystScriptParser_Myst::greenBook_run() { _vm->_video->playMovie(file, 314, 76); } else { VideoHandle book = _vm->_video->playMovie(file, 314, 76, true); - _vm->_video->setVideoBounds(book, Video::VideoTimestamp(loopStart, 600), Video::VideoTimestamp(loopEnd, 600)); + _vm->_video->setVideoBounds(book, Audio::Timestamp(0, loopStart, 600), Audio::Timestamp(0, loopEnd, 600)); _tempVar = 0; } } else if (_tempVar == 2 && !_vm->_video->isVideoPlaying()) { VideoHandle book = _vm->_video->playMovie(file, 314, 76); - _vm->_video->setVideoBounds(book, Video::VideoTimestamp(loopStart, 600), Video::VideoTimestamp(loopEnd, 600)); + _vm->_video->setVideoBounds(book, Audio::Timestamp(0, loopStart, 600), Audio::Timestamp(0, loopEnd, 600)); _vm->_video->setVideoLooping(book, true); _tempVar = 0; } diff --git a/engines/mohawk/myst_stacks/stoneship.cpp b/engines/mohawk/myst_stacks/stoneship.cpp index 8b19618ec1..7a0e437f2c 100644 --- a/engines/mohawk/myst_stacks/stoneship.cpp +++ b/engines/mohawk/myst_stacks/stoneship.cpp @@ -412,7 +412,7 @@ void MystScriptParser_Stoneship::o_cabinBookMovie(uint16 op, uint16 var, uint16 uint16 endTime = argv[1]; VideoHandle book = _vm->_video->playMovie(_vm->wrapMovieFilename("bkroom", kStoneshipStack), 159, 99); - _vm->_video->setVideoBounds(book, Video::VideoTimestamp(startTime, 600), Video::VideoTimestamp(endTime, 600)); + _vm->_video->setVideoBounds(book, Audio::Timestamp(0, startTime, 600), Audio::Timestamp(0, endTime, 600)); _vm->_video->waitUntilMovieEnds(book); } @@ -558,9 +558,9 @@ void MystScriptParser_Stoneship::o_hologramPlayback(uint16 op, uint16 var, uint1 if (_hologramTurnedOn) { if (_hologramDisplayPos) endPoint = _hologramDisplayPos; - _vm->_video->setVideoBounds(displayMovie, Video::VideoTimestamp(startPoint, 600), Video::VideoTimestamp(endPoint, 600)); + _vm->_video->setVideoBounds(displayMovie, Audio::Timestamp(0, startPoint, 600), Audio::Timestamp(0, endPoint, 600)); } else { - _vm->_video->setVideoBounds(displayMovie, Video::VideoTimestamp(startPoint, 600), Video::VideoTimestamp(endPoint, 600)); + _vm->_video->setVideoBounds(displayMovie, Audio::Timestamp(0, startPoint, 600), Audio::Timestamp(0, endPoint, 600)); } _vm->_video->delayUntilMovieEnds(displayMovie); @@ -585,7 +585,7 @@ void MystScriptParser_Stoneship::o_hologramSelectionMove(uint16 op, uint16 var, uint16 selectionPos = position * 1500 / 243; VideoHandle handleMovie = _hologramSelection->playMovie(); - _vm->_video->setVideoBounds(handleMovie, Video::VideoTimestamp(selectionPos, 600), Video::VideoTimestamp(selectionPos, 600)); + _vm->_video->setVideoBounds(handleMovie, Audio::Timestamp(0, selectionPos, 600), Audio::Timestamp(0, selectionPos, 600)); _hologramDisplayPos = position * 1450 / 243 + 350; @@ -593,7 +593,7 @@ void MystScriptParser_Stoneship::o_hologramSelectionMove(uint16 op, uint16 var, if (_hologramTurnedOn) { _hologramDisplay->setBlocking(false); VideoHandle displayMovie = _hologramDisplay->playMovie(); - _vm->_video->setVideoBounds(displayMovie, Video::VideoTimestamp(_hologramDisplayPos, 600), Video::VideoTimestamp(_hologramDisplayPos, 600)); + _vm->_video->setVideoBounds(displayMovie, Audio::Timestamp(0, _hologramDisplayPos, 600), Audio::Timestamp(0, _hologramDisplayPos, 600)); } } } @@ -635,19 +635,19 @@ void MystScriptParser_Stoneship::o_chestValveVideos(uint16 op, uint16 var, uint1 if (_state.chestValveState) { // Valve closing VideoHandle valve = _vm->_video->playMovie(movie, 97, 267); - _vm->_video->setVideoBounds(valve, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(350, 600)); + _vm->_video->setVideoBounds(valve, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 350, 600)); _vm->_video->waitUntilMovieEnds(valve); } else if (_state.chestWaterState) { // Valve opening, spilling water VideoHandle valve = _vm->_video->playMovie(movie, 97, 267); - _vm->_video->setVideoBounds(valve, Video::VideoTimestamp(350, 600), Video::VideoTimestamp(650, 600)); + _vm->_video->setVideoBounds(valve, Audio::Timestamp(0, 350, 600), Audio::Timestamp(0, 650, 600)); _vm->_video->waitUntilMovieEnds(valve); _vm->_sound->playSound(3132); for (uint i = 0; i < 25; i++) { valve = _vm->_video->playMovie(movie, 97, 267); - _vm->_video->setVideoBounds(valve, Video::VideoTimestamp(650, 600), Video::VideoTimestamp(750, 600)); + _vm->_video->setVideoBounds(valve, Audio::Timestamp(0, 650, 600), Audio::Timestamp(0, 750, 600)); _vm->_video->waitUntilMovieEnds(valve); } @@ -656,7 +656,7 @@ void MystScriptParser_Stoneship::o_chestValveVideos(uint16 op, uint16 var, uint1 // Valve opening // TODO: Play backwards VideoHandle valve = _vm->_video->playMovie(movie, 97, 267); - _vm->_video->setVideoBounds(valve, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(350, 600)); + _vm->_video->setVideoBounds(valve, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 350, 600)); _vm->_video->waitUntilMovieEnds(valve); } } @@ -678,13 +678,13 @@ void MystScriptParser_Stoneship::o_trapLockOpen(uint16 op, uint16 var, uint16 ar Common::String movie = _vm->wrapMovieFilename("openloc", kStoneshipStack); VideoHandle lock = _vm->_video->playMovie(movie, 187, 71); - _vm->_video->setVideoBounds(lock, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(750, 600)); + _vm->_video->setVideoBounds(lock, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 750, 600)); _vm->_video->waitUntilMovieEnds(lock); _vm->_sound->playSound(2143); lock = _vm->_video->playMovie(movie, 187, 71); - _vm->_video->setVideoBounds(lock, Video::VideoTimestamp(750, 600), Video::VideoTimestamp(10000, 600)); + _vm->_video->setVideoBounds(lock, Audio::Timestamp(0, 750, 600), Audio::Timestamp(0, 10000, 600)); _vm->_video->waitUntilMovieEnds(lock); if (_state.pumpState != 4) diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp index 98abfaae8e..a82af4614b 100644 --- a/engines/mohawk/riven_external.cpp +++ b/engines/mohawk/riven_external.cpp @@ -1066,7 +1066,7 @@ void RivenExternal::lowerPins() { // Play the video of the pins going down VideoHandle handle = _vm->_video->playMovieRiven(*upMovie); assert(handle != NULL_VID_HANDLE); - _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(startTime, 600), Video::VideoTimestamp(startTime + 550, 600)); + _vm->_video->setVideoBounds(handle, Audio::Timestamp(0, startTime, 600), Audio::Timestamp(0, startTime + 550, 600)); _vm->_video->waitUntilMovieEnds(handle); *upMovie = 0; @@ -1098,7 +1098,7 @@ void RivenExternal::xgrotatepins(uint16 argc, uint16 *argv) { // Play the video of the pins rotating VideoHandle handle = _vm->_video->playMovieRiven(*_vm->getVar("gupmoov")); assert(handle != NULL_VID_HANDLE); - _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(startTime, 600), Video::VideoTimestamp(startTime + 1215, 600)); + _vm->_video->setVideoBounds(handle, Audio::Timestamp(0, startTime, 600), Audio::Timestamp(0, startTime + 1215, 600)); _vm->_video->waitUntilMovieEnds(handle); } @@ -1183,7 +1183,7 @@ void RivenExternal::xgpincontrols(uint16 argc, uint16 *argv) { VideoHandle handle = _vm->_video->playMovieRiven(pinMovieCodes[imagePos - 1]); assert(handle != NULL_VID_HANDLE); uint32 startTime = 9630 - pinPos * 600; - _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(startTime, 600), Video::VideoTimestamp(startTime + 550, 600)); + _vm->_video->setVideoBounds(handle, Audio::Timestamp(0, startTime, 600), Audio::Timestamp(0, startTime + 550, 600)); _vm->_video->waitUntilMovieEnds(handle); // Update the relevant variables @@ -1259,7 +1259,7 @@ void RivenExternal::xgrviewer(uint16 argc, uint16 *argv) { // Now play the movie VideoHandle handle = _vm->_video->playMovieRiven(1); assert(handle != NULL_VID_HANDLE); - _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(s_viewerTimeIntervals[*curPos], 600), Video::VideoTimestamp(s_viewerTimeIntervals[newPos], 600)); + _vm->_video->setVideoBounds(handle, Audio::Timestamp(0, s_viewerTimeIntervals[*curPos], 600), Audio::Timestamp(0, s_viewerTimeIntervals[newPos], 600)); _vm->_video->waitUntilMovieEnds(handle); // Set the new position and let the card's scripts take over again @@ -1328,7 +1328,7 @@ void RivenExternal::xglviewer(uint16 argc, uint16 *argv) { // Now play the movie VideoHandle handle = _vm->_video->playMovieRiven(1); assert(handle != NULL_VID_HANDLE); - _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(s_viewerTimeIntervals[*curPos], 600), Video::VideoTimestamp(s_viewerTimeIntervals[newPos], 600)); + _vm->_video->setVideoBounds(handle, Audio::Timestamp(0, s_viewerTimeIntervals[*curPos], 600), Audio::Timestamp(0, s_viewerTimeIntervals[newPos], 600)); _vm->_video->waitUntilMovieEnds(handle); // Set the new position to the variable @@ -1778,9 +1778,9 @@ void RivenExternal::xschool280_playwhark(uint16 argc, uint16 *argv) { // (11560/600)s is the length of each of the two movies. We divide it into 19 parts // (one for each of the possible positions the villager can have). VideoHandle handle = _vm->_video->playMovieRiven(doomMLST); - Video::VideoTimestamp startTime = Video::VideoTimestamp((11560 / 19) * (*posVar), 600); + Audio::Timestamp startTime = Audio::Timestamp(0, (11560 / 19) * (*posVar), 600); *posVar += number; // Adjust to the end - Video::VideoTimestamp endTime = Video::VideoTimestamp((11560 / 19) * (*posVar), 600); + Audio::Timestamp endTime = Audio::Timestamp(0, (11560 / 19) * (*posVar), 600); _vm->_video->setVideoBounds(handle, startTime, endTime); _vm->_video->waitUntilMovieEnds(handle); @@ -2182,7 +2182,7 @@ void RivenExternal::xtexterior300_telescopedown(uint16 argc, uint16 *argv) { static const uint32 timeIntervals[] = { 4320, 3440, 2560, 1760, 880, 0 }; uint16 movieCode = (*telescopeCover) ? 1 : 2; VideoHandle handle = _vm->_video->playMovieRiven(movieCode); - _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(timeIntervals[*telescopePos], 600), Video::VideoTimestamp(timeIntervals[*telescopePos - 1], 600)); + _vm->_video->setVideoBounds(handle, Audio::Timestamp(0, timeIntervals[*telescopePos], 600), Audio::Timestamp(0, timeIntervals[*telescopePos - 1], 600)); _vm->_sound->playSound(14); // Play the moving sound _vm->_video->waitUntilMovieEnds(handle); @@ -2214,7 +2214,7 @@ void RivenExternal::xtexterior300_telescopeup(uint16 argc, uint16 *argv) { static const uint32 timeIntervals[] = { 0, 800, 1680, 2560, 3440, 4320 }; uint16 movieCode = (*_vm->getVar("ttelecover")) ? 4 : 5; VideoHandle handle = _vm->_video->playMovieRiven(movieCode); - _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(timeIntervals[*telescopePos - 1], 600), Video::VideoTimestamp(timeIntervals[*telescopePos], 600)); + _vm->_video->setVideoBounds(handle, Audio::Timestamp(0, timeIntervals[*telescopePos - 1], 600), Audio::Timestamp(0, timeIntervals[*telescopePos], 600)); _vm->_sound->playSound(14); // Play the moving sound _vm->_video->waitUntilMovieEnds(handle); diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index dba4482b2b..ccb86cc54f 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -38,14 +38,14 @@ void VideoEntry::clear() { y = 0; loop = false; enabled = false; - start = Video::VideoTimestamp(0); - end = Video::VideoTimestamp(0xFFFFFFFF); // Largest possible, there is an endOfVideo() check anyway + start = Audio::Timestamp(0, 1); + end = Audio::Timestamp(0xFFFFFFFF, 1); // Largest possible, there is an endOfVideo() check anyway filename.clear(); id = -1; } bool VideoEntry::endOfVideo() { - return !video || video->endOfVideo() || video->getElapsedTime() >= end.getUnitsInScale(1000); + return !video || video->endOfVideo() || video->getElapsedTime() >= (uint)end.msecs(); } VideoManager::VideoManager(MohawkEngine* vm) : _vm(vm) { @@ -503,14 +503,14 @@ bool VideoManager::isVideoPlaying() { return false; } -void VideoManager::setVideoBounds(VideoHandle handle, Video::VideoTimestamp start, Video::VideoTimestamp end) { +void VideoManager::setVideoBounds(VideoHandle handle, Audio::Timestamp start, Audio::Timestamp end) { assert(handle != NULL_VID_HANDLE); _videoStreams[handle].start = start; _videoStreams[handle].end = end; _videoStreams[handle]->seekToTime(start); } -void VideoManager::seekToTime(VideoHandle handle, Video::VideoTimestamp time) { +void VideoManager::seekToTime(VideoHandle handle, Audio::Timestamp time) { assert(handle != NULL_VID_HANDLE); _videoStreams[handle]->seekToTime(time); } diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index efc3bfa0f6..c1765ffc9d 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -53,7 +53,7 @@ struct VideoEntry { uint16 y; bool loop; bool enabled; - Video::VideoTimestamp start, end; + Audio::Timestamp start, end; // Identification Common::String filename; // External video files @@ -105,8 +105,8 @@ public: uint32 getFrameCount(VideoHandle handle); uint32 getElapsedTime(VideoHandle handle); bool endOfVideo(VideoHandle handle); - void setVideoBounds(VideoHandle handle, Video::VideoTimestamp start, Video::VideoTimestamp end); - void seekToTime(VideoHandle handle, Video::VideoTimestamp time); + void setVideoBounds(VideoHandle handle, Audio::Timestamp start, Audio::Timestamp end); + void seekToTime(VideoHandle handle, Audio::Timestamp time); void seekToFrame(VideoHandle handle, uint32 frame); void setVideoLooping(VideoHandle handle, bool loop); void waitUntilMovieEnds(VideoHandle videoHandle); |