aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agos/animation.h4
-rw-r--r--engines/gob/videoplayer.cpp12
-rw-r--r--engines/gob/videoplayer.h4
-rw-r--r--engines/mohawk/myst_stacks/channelwood.cpp8
-rw-r--r--engines/mohawk/myst_stacks/dni.cpp14
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp46
-rw-r--r--engines/mohawk/riven_external.cpp18
-rw-r--r--engines/mohawk/video.cpp12
-rw-r--r--engines/mohawk/video.h10
-rw-r--r--engines/saga/introproc_saga2.cpp2
-rw-r--r--engines/sci/console.cpp10
-rw-r--r--engines/sci/engine/kvideo.cpp12
-rw-r--r--engines/sci/video/seq_decoder.h2
-rw-r--r--engines/scumm/he/animation_he.h2
-rw-r--r--engines/sword1/animation.cpp4
-rw-r--r--engines/sword1/animation.h6
-rw-r--r--engines/sword2/animation.cpp4
-rw-r--r--engines/sword2/animation.h6
-rw-r--r--engines/sword25/fmv/theora_decoder.h2
-rw-r--r--engines/toon/movie.cpp6
-rw-r--r--engines/toon/movie.h2
-rw-r--r--engines/tucker/tucker.h2
-rw-r--r--video/avi_decoder.cpp12
-rw-r--r--video/avi_decoder.h8
-rw-r--r--video/codecs/cdtoons.cpp4
-rw-r--r--video/codecs/cdtoons.h10
-rw-r--r--video/codecs/cinepak.cpp10
-rw-r--r--video/codecs/cinepak.h12
-rw-r--r--video/codecs/codec.h10
-rw-r--r--video/codecs/indeo3.cpp12
-rw-r--r--video/codecs/indeo3.h12
-rw-r--r--video/codecs/mjpeg.cpp10
-rw-r--r--video/codecs/mjpeg.h14
-rw-r--r--video/codecs/msrle.cpp12
-rw-r--r--video/codecs/msrle.h10
-rw-r--r--video/codecs/msvideo1.cpp6
-rw-r--r--video/codecs/msvideo1.h10
-rw-r--r--video/codecs/qdm2.cpp4
-rw-r--r--video/codecs/qdm2.h4
-rw-r--r--video/codecs/qdm2data.h4
-rw-r--r--video/codecs/qtrle.cpp12
-rw-r--r--video/codecs/qtrle.h12
-rw-r--r--video/codecs/rpza.cpp10
-rw-r--r--video/codecs/rpza.h12
-rw-r--r--video/codecs/smc.cpp4
-rw-r--r--video/codecs/smc.h10
-rw-r--r--video/codecs/truemotion1.cpp8
-rw-r--r--video/codecs/truemotion1.h10
-rw-r--r--video/codecs/truemotion1data.h4
-rw-r--r--video/coktel_decoder.cpp50
-rw-r--r--video/coktel_decoder.h38
-rw-r--r--video/dxa_decoder.cpp6
-rw-r--r--video/dxa_decoder.h8
-rw-r--r--video/flic_decoder.cpp6
-rw-r--r--video/flic_decoder.h10
-rw-r--r--video/mpeg_player.cpp4
-rw-r--r--video/mpeg_player.h4
-rw-r--r--video/qt_decoder.cpp20
-rw-r--r--video/qt_decoder.h12
-rw-r--r--video/smk_decoder.cpp6
-rw-r--r--video/smk_decoder.h10
-rw-r--r--video/video_decoder.cpp4
-rw-r--r--video/video_decoder.h8
63 files changed, 310 insertions, 310 deletions
diff --git a/engines/agos/animation.h b/engines/agos/animation.h
index 20cc85986e..a61255b558 100644
--- a/engines/agos/animation.h
+++ b/engines/agos/animation.h
@@ -77,7 +77,7 @@ protected:
uint32 _firstFrameOffset;
};
-class MoviePlayerDXA : public MoviePlayer, ::Graphics::DXADecoder {
+class MoviePlayerDXA : public MoviePlayer, Video::DXADecoder {
static const char *_sequenceList[90];
uint8 _sequenceNum;
public:
@@ -95,7 +95,7 @@ private:
void copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch);
};
-class MoviePlayerSMK : public MoviePlayer, ::Graphics::SmackerDecoder {
+class MoviePlayerSMK : public MoviePlayer, Video::SmackerDecoder {
public:
MoviePlayerSMK(AGOSEngine_Feeble *vm, const char *name);
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index b9eb42a2fe..3cd363e8fb 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -798,7 +798,7 @@ Common::String VideoPlayer::findFile(const Common::String &file, Properties &pro
return fileName;
}
-Graphics::CoktelDecoder *VideoPlayer::openVideo(const Common::String &file, Properties &properties) {
+::Video::CoktelDecoder *VideoPlayer::openVideo(const Common::String &file, Properties &properties) {
Common::String fileName = findFile(file, properties);
if (fileName.empty())
return 0;
@@ -807,15 +807,15 @@ Graphics::CoktelDecoder *VideoPlayer::openVideo(const Common::String &file, Prop
if (!stream)
return 0;
- Graphics::CoktelDecoder *video = 0;
+ ::Video::CoktelDecoder *video = 0;
if (properties.type == kVideoTypeIMD)
- video = new Graphics::IMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);
+ video = new ::Video::IMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);
else if (properties.type == kVideoTypePreIMD)
- video = new Graphics::PreIMDDecoder(properties.width, properties.height, _vm->_mixer, Audio::Mixer::kSFXSoundType);
+ video = new ::Video::PreIMDDecoder(properties.width, properties.height, _vm->_mixer, Audio::Mixer::kSFXSoundType);
else if (properties.type == kVideoTypeVMD)
- video = new Graphics::VMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);
+ video = new ::Video::VMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);
else if (properties.type == kVideoTypeRMD)
- video = new Graphics::VMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);
+ video = new ::Video::VMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);
else
warning("Couldn't open video \"%s\": Invalid video Type", fileName.c_str());
diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h
index fff2a951e4..2a1223b0b1 100644
--- a/engines/gob/videoplayer.h
+++ b/engines/gob/videoplayer.h
@@ -150,7 +150,7 @@ public:
private:
struct Video {
- Graphics::CoktelDecoder *decoder;
+ ::Video::CoktelDecoder *decoder;
Common::String fileName;
SurfacePtr surface;
@@ -186,7 +186,7 @@ private:
Common::String findFile(const Common::String &file, Properties &properties);
- Graphics::CoktelDecoder *openVideo(const Common::String &file, Properties &properties);
+ ::Video::CoktelDecoder *openVideo(const Common::String &file, Properties &properties);
bool playFrame(int slot, Properties &properties);
diff --git a/engines/mohawk/myst_stacks/channelwood.cpp b/engines/mohawk/myst_stacks/channelwood.cpp
index af2baa7a39..b5379c2adf 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, Graphics::VideoTimestamp(3050, 600), Graphics::VideoTimestamp(6100, 600));
+ _vm->_video->setVideoBounds(bridge, Video::VideoTimestamp(3050, 600), Video::VideoTimestamp(6100, 600));
else
- _vm->_video->setVideoBounds(bridge, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(3050, 600));
+ _vm->_video->setVideoBounds(bridge, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(3040, 600), Graphics::VideoTimestamp(6080, 600));
+ _vm->_video->setVideoBounds(pipe, Video::VideoTimestamp(3040, 600), Video::VideoTimestamp(6080, 600));
else
- _vm->_video->setVideoBounds(pipe, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(3040, 600));
+ _vm->_video->setVideoBounds(pipe, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(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 d79170c41b..8c98df6d9b 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) > Graphics::VideoTimestamp(6801, 600).getUnitsInScale(1000)) {
+ if (_globals.ending == 1 && _vm->_video->getElapsedTime(atrus) > Video::VideoTimestamp(6801, 600).getUnitsInScale(1000)) {
_globals.ending = 2;
_globals.heldPage = 0;
_vm->_cursor->setCursor(kDefaultMystCursor);
// Play movie end (atrus leaving)
- _vm->_video->setVideoBounds(atrus, Graphics::VideoTimestamp(14813, 600), Graphics::VideoTimestamp(0xFFFFFFFF));
+ _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(14813, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(98000, 600));
+ _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(_loopStart, 600), Graphics::VideoTimestamp(_loopEnd, 600));
+ _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(_loopStart, 600), Video::VideoTimestamp(_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, Graphics::VideoTimestamp(7388, 600), Graphics::VideoTimestamp(14700, 600));
+ _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(7388, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(14700, 600));
+ _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(46175, 600));
+ _vm->_video->setVideoBounds(atrus, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(46175, 600));
_waitForLoop = true;
_loopStart = 30656;
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index d63cf77987..063a37ccf4 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, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(650, 600));
+ _vm->_video->setVideoBounds(gears, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(700, 600), Graphics::VideoTimestamp(1300, 600));
+ _vm->_video->setVideoBounds(gears, Video::VideoTimestamp(700, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(11180, 600), Graphics::VideoTimestamp(16800, 600));
+ _vm->_video->setVideoBounds(mountain, Video::VideoTimestamp(11180, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(11180, 600));
+ _vm->_video->setVideoBounds(mountain, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(4204, 600), Graphics::VideoTimestamp(6040, 600));
+ _vm->_video->setVideoBounds(water, Video::VideoTimestamp(4204, 600), Video::VideoTimestamp(6040, 600));
_vm->_video->setVideoLooping(water, false);
_state.imagerActive = 0;
} else {
// Water appearing
VideoHandle water = _imagerMovie->playMovie();
- _vm->_video->setVideoBounds(water, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(1814, 600));
+ _vm->_video->setVideoBounds(water, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(1814, 600));
_vm->_video->waitUntilMovieEnds(water);
// Water looping
water = _imagerMovie->playMovie();
- _vm->_video->setVideoBounds(water, Graphics::VideoTimestamp(1814, 600), Graphics::VideoTimestamp(4204, 600));
+ _vm->_video->setVideoBounds(water, Video::VideoTimestamp(1814, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(660, 600));
+ _vm->_video->setVideoBounds(_rocketLinkBook, Video::VideoTimestamp(0, 600), Video::VideoTimestamp(660, 600));
_vm->_video->waitUntilMovieEnds(_rocketLinkBook);
// Book looping closed
_rocketLinkBook = _vm->_video->playMovie(movieFile, 224, 41, true);
- _vm->_video->setVideoBounds(_rocketLinkBook, Graphics::VideoTimestamp(660, 600), Graphics::VideoTimestamp(3500, 600));
+ _vm->_video->setVideoBounds(_rocketLinkBook, Video::VideoTimestamp(660, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(3500, 600), Graphics::VideoTimestamp(13100, 600));
+ _vm->_video->setVideoBounds(_rocketLinkBook, Video::VideoTimestamp(3500, 600), Video::VideoTimestamp(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],
- Graphics::VideoTimestamp(startTime[gearPosition], 600),
- Graphics::VideoTimestamp(endTime[gearPosition], 600));
+ Video::VideoTimestamp(startTime[gearPosition], 600),
+ Video::VideoTimestamp(endTime[gearPosition], 600));
}
void MystScriptParser_Myst::clockWeightDownOneStep() {
// Set video bounds
_clockWeightVideo = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0);
_vm->_video->setVideoBounds(_clockWeightVideo,
- Graphics::VideoTimestamp(_clockWeightPosition, 600),
- Graphics::VideoTimestamp(_clockWeightPosition + 246, 600));
+ Video::VideoTimestamp(_clockWeightPosition, 600),
+ Video::VideoTimestamp(_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,
- Graphics::VideoTimestamp(_clockWeightPosition, 600),
- Graphics::VideoTimestamp(2214, 600));
+ Video::VideoTimestamp(_clockWeightPosition, 600),
+ Video::VideoTimestamp(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,
- Graphics::VideoTimestamp(2214 * 2 - _clockWeightPosition, 600),
- Graphics::VideoTimestamp(2214 * 2, 600));
+ Video::VideoTimestamp(2214 * 2 - _clockWeightPosition, 600),
+ Video::VideoTimestamp(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],
- Graphics::VideoTimestamp(time[gearPosition], 600),
- Graphics::VideoTimestamp(time[2], 600));
+ Video::VideoTimestamp(time[gearPosition], 600),
+ Video::VideoTimestamp(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, Graphics::VideoTimestamp(1814, 600), Graphics::VideoTimestamp(4204, 600));
+ _vm->_video->setVideoBounds(water, Video::VideoTimestamp(1814, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(loopStart, 600), Graphics::VideoTimestamp(loopEnd, 600));
+ _vm->_video->setVideoBounds(book, Video::VideoTimestamp(loopStart, 600), Video::VideoTimestamp(loopEnd, 600));
_tempVar = 0;
}
} else if (_tempVar == 2 && !_vm->_video->isVideoPlaying()) {
VideoHandle book = _vm->_video->playMovie(file, 314, 76);
- _vm->_video->setVideoBounds(book, Graphics::VideoTimestamp(loopStart, 600), Graphics::VideoTimestamp(loopEnd, 600));
+ _vm->_video->setVideoBounds(book, Video::VideoTimestamp(loopStart, 600), Video::VideoTimestamp(loopEnd, 600));
_vm->_video->setVideoLooping(book, true);
_tempVar = 0;
}
diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp
index afdf2e4a82..c806c93130 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, Graphics::VideoTimestamp(startTime, 600), Graphics::VideoTimestamp(startTime + 550, 600));
+ _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(startTime, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(startTime, 600), Graphics::VideoTimestamp(startTime + 1215, 600));
+ _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(startTime, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(startTime, 600), Graphics::VideoTimestamp(startTime + 550, 600));
+ _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(startTime, 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(s_viewerTimeIntervals[*curPos], 600), Graphics::VideoTimestamp(s_viewerTimeIntervals[newPos], 600));
+ _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(s_viewerTimeIntervals[*curPos], 600), Video::VideoTimestamp(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, Graphics::VideoTimestamp(s_viewerTimeIntervals[*curPos], 600), Graphics::VideoTimestamp(s_viewerTimeIntervals[newPos], 600));
+ _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(s_viewerTimeIntervals[*curPos], 600), Video::VideoTimestamp(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);
- Graphics::VideoTimestamp startTime = Graphics::VideoTimestamp((11560 / 19) * (*posVar), 600);
+ Video::VideoTimestamp startTime = Video::VideoTimestamp((11560 / 19) * (*posVar), 600);
*posVar += number; // Adjust to the end
- Graphics::VideoTimestamp endTime = Graphics::VideoTimestamp((11560 / 19) * (*posVar), 600);
+ Video::VideoTimestamp endTime = Video::VideoTimestamp((11560 / 19) * (*posVar), 600);
_vm->_video->setVideoBounds(handle, startTime, endTime);
_vm->_video->waitUntilMovieEnds(handle);
@@ -2183,7 +2183,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, Graphics::VideoTimestamp(timeIntervals[*telescopePos], 600), Graphics::VideoTimestamp(timeIntervals[*telescopePos - 1], 600));
+ _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(timeIntervals[*telescopePos], 600), Video::VideoTimestamp(timeIntervals[*telescopePos - 1], 600));
_vm->_sound->playSound(14); // Play the moving sound
_vm->_video->waitUntilMovieEnds(handle);
@@ -2215,7 +2215,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, Graphics::VideoTimestamp(timeIntervals[*telescopePos - 1], 600), Graphics::VideoTimestamp(timeIntervals[*telescopePos], 600));
+ _vm->_video->setVideoBounds(handle, Video::VideoTimestamp(timeIntervals[*telescopePos - 1], 600), Video::VideoTimestamp(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 0a9705a4db..838d855d88 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -38,8 +38,8 @@ void VideoEntry::clear() {
y = 0;
loop = false;
enabled = false;
- start = Graphics::VideoTimestamp(0);
- end = Graphics::VideoTimestamp(0xFFFFFFFF); // Largest possible, there is an endOfVideo() check anyway
+ start = Video::VideoTimestamp(0);
+ end = Video::VideoTimestamp(0xFFFFFFFF); // Largest possible, there is an endOfVideo() check anyway
filename.clear();
id = 0;
}
@@ -384,7 +384,7 @@ VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool
return i;
// Otherwise, create a new entry
- Graphics::QuickTimeDecoder *decoder = new Graphics::QuickTimeDecoder();
+ Video::QuickTimeDecoder *decoder = new Video::QuickTimeDecoder();
decoder->setChunkBeginOffset(_vm->getResourceOffset(ID_TMOV, id));
decoder->load(_vm->getResource(ID_TMOV, id));
@@ -418,7 +418,7 @@ VideoHandle VideoManager::createVideoHandle(const Common::String &filename, uint
// Otherwise, create a new entry
VideoEntry entry;
entry.clear();
- entry.video = new Graphics::QuickTimeDecoder();
+ entry.video = new Video::QuickTimeDecoder();
entry.x = x;
entry.y = y;
entry.filename = filename;
@@ -505,14 +505,14 @@ bool VideoManager::isVideoPlaying() {
return false;
}
-void VideoManager::setVideoBounds(VideoHandle handle, Graphics::VideoTimestamp start, Graphics::VideoTimestamp end) {
+void VideoManager::setVideoBounds(VideoHandle handle, Video::VideoTimestamp start, Video::VideoTimestamp end) {
assert(handle != NULL_VID_HANDLE);
_videoStreams[handle].start = start;
_videoStreams[handle].end = end;
_videoStreams[handle]->seekToTime(start);
}
-void VideoManager::seekToTime(VideoHandle handle, Graphics::VideoTimestamp time) {
+void VideoManager::seekToTime(VideoHandle handle, Video::VideoTimestamp time) {
assert(handle != NULL_VID_HANDLE);
_videoStreams[handle]->seekToTime(time);
}
diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h
index 9661dbcd25..11d9ec3387 100644
--- a/engines/mohawk/video.h
+++ b/engines/mohawk/video.h
@@ -48,19 +48,19 @@ struct MLSTRecord {
struct VideoEntry {
// Playback variables
- Graphics::SeekableVideoDecoder *video;
+ Video::SeekableVideoDecoder *video;
uint16 x;
uint16 y;
bool loop;
bool enabled;
- Graphics::VideoTimestamp start, end;
+ Video::VideoTimestamp start, end;
// Identification
Common::String filename; // External video files
uint16 id; // Internal Mohawk files
// Helper functions
- Graphics::SeekableVideoDecoder *operator->() const { assert(video); return video; } // TODO: Remove this eventually
+ Video::SeekableVideoDecoder *operator->() const { assert(video); return video; } // TODO: Remove this eventually
void clear();
bool endOfVideo();
};
@@ -105,8 +105,8 @@ public:
uint32 getFrameCount(VideoHandle handle);
uint32 getElapsedTime(VideoHandle handle);
bool endOfVideo(VideoHandle handle);
- void setVideoBounds(VideoHandle handle, Graphics::VideoTimestamp start, Graphics::VideoTimestamp end);
- void seekToTime(VideoHandle handle, Graphics::VideoTimestamp time);
+ void setVideoBounds(VideoHandle handle, Video::VideoTimestamp start, Video::VideoTimestamp end);
+ void seekToTime(VideoHandle handle, Video::VideoTimestamp time);
void seekToFrame(VideoHandle handle, uint32 frame);
void setVideoLooping(VideoHandle handle, bool loop);
void waitUntilMovieEnds(VideoHandle videoHandle);
diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp
index c16c95a2a7..2752ddd933 100644
--- a/engines/saga/introproc_saga2.cpp
+++ b/engines/saga/introproc_saga2.cpp
@@ -92,7 +92,7 @@ int Scene::FTA2EndProc(FTA2Endings whichEnding) {
}
void Scene::playMovie(const char *filename) {
- Graphics::SmackerDecoder *smkDecoder = new Graphics::SmackerDecoder(_vm->_mixer);
+ Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(_vm->_mixer);
if (!smkDecoder->loadFile(filename))
return;
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 71697d6c0a..7d24b1f248 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -227,11 +227,11 @@ void Console::preEnter() {
_engine->pauseEngine(true);
}
-extern void playVideo(Graphics::VideoDecoder *videoDecoder, VideoState videoState);
+extern void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState);
void Console::postEnter() {
if (!_videoFile.empty()) {
- Graphics::VideoDecoder *videoDecoder = 0;
+ Video::VideoDecoder *videoDecoder = 0;
#ifdef ENABLE_SCI32
bool duckMode = false;
@@ -243,17 +243,17 @@ void Console::postEnter() {
videoDecoder = seqDecoder;
#ifdef ENABLE_SCI32
} else if (_videoFile.hasSuffix(".vmd")) {
- videoDecoder = new Graphics::VMDDecoder(g_system->getMixer());
+ videoDecoder = new Video::VMDDecoder(g_system->getMixer());
#endif
} else if (_videoFile.hasSuffix(".duk")) {
#ifdef ENABLE_SCI32
duckMode = true;
- videoDecoder = new Graphics::AviDecoder(g_system->getMixer());
+ videoDecoder = new Video::AviDecoder(g_system->getMixer());
#else
warning("Duck videos require SCI32 support compiled in");
#endif
} else if (_videoFile.hasSuffix(".avi")) {
- videoDecoder = new Graphics::AviDecoder(g_system->getMixer());
+ videoDecoder = new Video::AviDecoder(g_system->getMixer());
}
if (videoDecoder && videoDecoder->loadFile(_videoFile)) {
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index 86e2d333a3..ef47f9b9c6 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -39,7 +39,7 @@
namespace Sci {
-void playVideo(Graphics::VideoDecoder *videoDecoder, VideoState videoState) {
+void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) {
if (!videoDecoder)
return;
@@ -122,7 +122,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) {
uint16 screenWidth = g_system->getWidth();
uint16 screenHeight = g_system->getHeight();
- Graphics::VideoDecoder *videoDecoder = 0;
+ Video::VideoDecoder *videoDecoder = 0;
if (argv[0].segment != 0) {
Common::String filename = s->_segMan->getString(argv[0]);
@@ -139,7 +139,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
}
- videoDecoder = new Graphics::QuickTimeDecoder();
+ videoDecoder = new Video::QuickTimeDecoder();
if (!videoDecoder->loadFile(filename))
error("Could not open '%s'", filename.c_str());
} else {
@@ -173,7 +173,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) {
switch (argv[0].toUint16()) {
case 0: {
Common::String filename = s->_segMan->getString(argv[1]);
- videoDecoder = new Graphics::AviDecoder(g_system->getMixer());
+ videoDecoder = new Video::AviDecoder(g_system->getMixer());
if (!videoDecoder->loadFile(filename.c_str())) {
warning("Failed to open movie file %s", filename.c_str());
@@ -210,7 +210,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) {
reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) {
uint16 operation = argv[0].toUint16();
- Graphics::VideoDecoder *videoDecoder = 0;
+ Video::VideoDecoder *videoDecoder = 0;
bool reshowCursor = g_sci->_gfxCursor->isVisible();
Common::String warningMsg;
@@ -274,7 +274,7 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) {
break;
}
case 6: // Play
- videoDecoder = new Graphics::VMDDecoder(g_system->getMixer());
+ videoDecoder = new Video::VMDDecoder(g_system->getMixer());
if (!videoDecoder->loadFile(s->_videoState.fileName)) {
warning("Could not open VMD %s", s->_videoState.fileName.c_str());
diff --git a/engines/sci/video/seq_decoder.h b/engines/sci/video/seq_decoder.h
index a7f403c4d2..fb13d3a509 100644
--- a/engines/sci/video/seq_decoder.h
+++ b/engines/sci/video/seq_decoder.h
@@ -33,7 +33,7 @@ namespace Sci {
/**
* Implementation of the Sierra SEQ decoder, used in KQ6 DOS floppy/CD and GK1 DOS
*/
-class SeqDecoder : public Graphics::FixedRateVideoDecoder {
+class SeqDecoder : public Video::FixedRateVideoDecoder {
public:
SeqDecoder();
virtual ~SeqDecoder();
diff --git a/engines/scumm/he/animation_he.h b/engines/scumm/he/animation_he.h
index 756bc666d8..7914d09f40 100644
--- a/engines/scumm/he/animation_he.h
+++ b/engines/scumm/he/animation_he.h
@@ -34,7 +34,7 @@ namespace Scumm {
class ScummEngine_v90he;
-class MoviePlayer : public Graphics::SmackerDecoder {
+class MoviePlayer : public Video::SmackerDecoder {
ScummEngine_v90he *_vm;
Audio::Mixer *_mixer;
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index e0b601d547..20ce543a55 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -66,7 +66,7 @@ static const char *sequenceList[20] = {
// Basic movie player
///////////////////////////////////////////////////////////////////////////////
-MoviePlayer::MoviePlayer(SwordEngine *vm, Text *textMan, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Graphics::VideoDecoder *decoder, DecoderType decoderType)
+MoviePlayer::MoviePlayer(SwordEngine *vm, Text *textMan, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Video::VideoDecoder *decoder, DecoderType decoderType)
: _vm(vm), _textMan(textMan), _snd(snd), _bgSoundHandle(bgSoundHandle), _system(system) {
_bgSoundStream = NULL;
_decoderType = decoderType;
@@ -333,7 +333,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, Audio::M
snprintf(filename, sizeof(filename), "%s.smk", sequenceList[id]);
if (Common::File::exists(filename)) {
- Graphics::SmackerDecoder *smkDecoder = new Graphics::SmackerDecoder(snd);
+ Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(snd);
return new MoviePlayer(vm, textMan, snd, system, bgSoundHandle, smkDecoder, kVideoDecoderSMK);
}
diff --git a/engines/sword1/animation.h b/engines/sword1/animation.h
index 4ac3ddce63..566ca31c2f 100644
--- a/engines/sword1/animation.h
+++ b/engines/sword1/animation.h
@@ -59,7 +59,7 @@ public:
}
};
-class DXADecoderWithSound : public Graphics::DXADecoder {
+class DXADecoderWithSound : public Video::DXADecoder {
public:
DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle *bgSoundHandle);
~DXADecoderWithSound() {}
@@ -73,7 +73,7 @@ private:
class MoviePlayer {
public:
- MoviePlayer(SwordEngine *vm, Text *textMan, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Graphics::VideoDecoder *decoder, DecoderType decoderType);
+ MoviePlayer(SwordEngine *vm, Text *textMan, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Video::VideoDecoder *decoder, DecoderType decoderType);
virtual ~MoviePlayer();
bool load(uint32 id);
void play();
@@ -88,7 +88,7 @@ protected:
byte _white, _black;
DecoderType _decoderType;
- Graphics::VideoDecoder *_decoder;
+ Video::VideoDecoder *_decoder;
Audio::SoundHandle *_bgSoundHandle;
Audio::AudioStream *_bgSoundStream;
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index 50548486f0..dd06456656 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -46,7 +46,7 @@ namespace Sword2 {
// Basic movie player
///////////////////////////////////////////////////////////////////////////////
-MoviePlayer::MoviePlayer(Sword2Engine *vm, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Graphics::VideoDecoder *decoder, DecoderType decoderType)
+MoviePlayer::MoviePlayer(Sword2Engine *vm, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Video::VideoDecoder *decoder, DecoderType decoderType)
: _vm(vm), _snd(snd), _bgSoundHandle(bgSoundHandle), _system(system) {
_bgSoundStream = NULL;
_decoderType = decoderType;
@@ -360,7 +360,7 @@ MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, Audio::Mixer *s
snprintf(filename, sizeof(filename), "%s.smk", name);
if (Common::File::exists(filename)) {
- Graphics::SmackerDecoder *smkDecoder = new Graphics::SmackerDecoder(snd);
+ Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(snd);
return new MoviePlayer(vm, snd, system, bgSoundHandle, smkDecoder, kVideoDecoderSMK);
}
diff --git a/engines/sword2/animation.h b/engines/sword2/animation.h
index 64a712682d..b90726537c 100644
--- a/engines/sword2/animation.h
+++ b/engines/sword2/animation.h
@@ -58,7 +58,7 @@ struct MovieText {
}
};
-class DXADecoderWithSound : public Graphics::DXADecoder {
+class DXADecoderWithSound : public Video::DXADecoder {
public:
DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle *bgSoundHandle);
~DXADecoderWithSound() {}
@@ -71,7 +71,7 @@ private:
class MoviePlayer {
public:
- MoviePlayer(Sword2Engine *vm, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Graphics::VideoDecoder *decoder, DecoderType decoderType);
+ MoviePlayer(Sword2Engine *vm, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Video::VideoDecoder *decoder, DecoderType decoderType);
virtual ~MoviePlayer();
bool load(const char *name);
@@ -89,7 +89,7 @@ protected:
byte _white, _black;
DecoderType _decoderType;
- Graphics::VideoDecoder *_decoder;
+ Video::VideoDecoder *_decoder;
Audio::SoundHandle *_bgSoundHandle;
Audio::AudioStream *_bgSoundStream;
diff --git a/engines/sword25/fmv/theora_decoder.h b/engines/sword25/fmv/theora_decoder.h
index b06d0abef0..0faed4fdef 100644
--- a/engines/sword25/fmv/theora_decoder.h
+++ b/engines/sword25/fmv/theora_decoder.h
@@ -49,7 +49,7 @@ namespace Sword25 {
* Video decoder used in engines:
* - sword25
*/
-class TheoraDecoder : public Graphics::FixedRateVideoDecoder {
+class TheoraDecoder : public Video::FixedRateVideoDecoder {
public:
TheoraDecoder(Audio::Mixer *mixer = 0, Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType);
virtual ~TheoraDecoder();
diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp
index 160bf00e4d..272fadf75e 100644
--- a/engines/toon/movie.cpp
+++ b/engines/toon/movie.cpp
@@ -35,7 +35,7 @@ void ToonstruckSmackerDecoder::handleAudioTrack(byte track, uint32 chunkSize, ui
uint16 height = _fileStream->readUint16LE();
_lowRes = (height == getHeight() / 2);
} else
- Graphics::SmackerDecoder::handleAudioTrack(track, chunkSize, unpackedSize);
+ Video::SmackerDecoder::handleAudioTrack(track, chunkSize, unpackedSize);
}
bool ToonstruckSmackerDecoder::loadFile(const Common::String &filename, int forcedflags) {
@@ -43,7 +43,7 @@ bool ToonstruckSmackerDecoder::loadFile(const Common::String &filename, int forc
_lowRes = false;
- if (Graphics::SmackerDecoder::loadFile(filename)) {
+ if (Video::SmackerDecoder::loadFile(filename)) {
if (forcedflags & 0x10 || _surface->h == 200) {
if (_surface) {
_surface->free();
@@ -61,7 +61,7 @@ bool ToonstruckSmackerDecoder::loadFile(const Common::String &filename, int forc
return false;
}
-ToonstruckSmackerDecoder::ToonstruckSmackerDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : Graphics::SmackerDecoder(mixer, soundType) {
+ToonstruckSmackerDecoder::ToonstruckSmackerDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : Video::SmackerDecoder(mixer, soundType) {
_lowRes = false;
}
diff --git a/engines/toon/movie.h b/engines/toon/movie.h
index 8b34fe3039..229791e90c 100644
--- a/engines/toon/movie.h
+++ b/engines/toon/movie.h
@@ -31,7 +31,7 @@
namespace Toon {
-class ToonstruckSmackerDecoder : public Graphics::SmackerDecoder {
+class ToonstruckSmackerDecoder : public Video::SmackerDecoder {
public:
ToonstruckSmackerDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kSFXSoundType);
virtual ~ToonstruckSmackerDecoder() {}
diff --git a/engines/tucker/tucker.h b/engines/tucker/tucker.h
index 7feb58ddda..feb63c301b 100644
--- a/engines/tucker/tucker.h
+++ b/engines/tucker/tucker.h
@@ -976,7 +976,7 @@ private:
bool _changeToNextSequence;
const SequenceUpdateFunc *_updateFunc;
int _updateFuncIndex;
- ::Graphics::FlicDecoder _flicPlayer[2];
+ Video::FlicDecoder _flicPlayer[2];
uint8 _animationPalette[256 * 4];
int _soundSeqDataCount;
int _soundSeqDataIndex;
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 73edfca052..a49b54a7f9 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -44,7 +44,7 @@
#include "video/codecs/msrle.h"
#include "video/codecs/truemotion1.h"
-namespace Graphics {
+namespace Video {
/*
static byte char2num(char c) {
@@ -316,7 +316,7 @@ uint32 AviDecoder::getElapsedTime() const {
return VideoDecoder::getElapsedTime();
}
-const Surface *AviDecoder::decodeNextFrame() {
+const Graphics::Surface *AviDecoder::decodeNextFrame() {
uint32 nextTag = _fileStream->readUint32BE();
if (_fileStream->eos())
@@ -334,9 +334,9 @@ const Surface *AviDecoder::decodeNextFrame() {
error ("Expected 'rec ' LIST");
// Decode chunks in the list and see if we get a frame
- const Surface *frame = NULL;
+ const Graphics::Surface *frame = NULL;
while (_fileStream->pos() < startPos + (int32)listSize) {
- const Surface *temp = decodeNextFrame();
+ const Graphics::Surface *temp = decodeNextFrame();
if (temp)
frame = temp;
}
@@ -417,7 +417,7 @@ Codec *AviDecoder::createCodec() {
return NULL;
}
-PixelFormat AviDecoder::getPixelFormat() const {
+Graphics::PixelFormat AviDecoder::getPixelFormat() const {
assert(_videoCodec);
return _videoCodec->getPixelFormat();
}
@@ -456,4 +456,4 @@ void AviDecoder::queueAudioBuffer(uint32 chunkSize) {
}
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/avi_decoder.h b/video/avi_decoder.h
index a89b378c10..57a39ea941 100644
--- a/video/avi_decoder.h
+++ b/video/avi_decoder.h
@@ -31,7 +31,7 @@
#include "sound/audiostream.h"
#include "sound/mixer.h"
-namespace Graphics {
+namespace Video {
#define UNKNOWN_HEADER(a) error("Unknown header found -- \'%s\'", tag2str(a))
@@ -182,8 +182,8 @@ public:
uint16 getHeight() const { return _header.height; }
uint32 getFrameCount() const { return _header.totalFrames; }
uint32 getElapsedTime() const;
- const Surface *decodeNextFrame();
- PixelFormat getPixelFormat() const;
+ const Graphics::Surface *decodeNextFrame();
+ Graphics::PixelFormat getPixelFormat() const;
const byte *getPalette() { _dirtyPalette = false; return _palette; }
bool hasDirtyPalette() const { return _dirtyPalette; }
@@ -220,6 +220,6 @@ private:
void queueAudioBuffer(uint32 chunkSize);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/cdtoons.cpp b/video/codecs/cdtoons.cpp
index cd43f744e6..eaa8f53602 100644
--- a/video/codecs/cdtoons.cpp
+++ b/video/codecs/cdtoons.cpp
@@ -28,7 +28,7 @@
#include "common/system.h"
-namespace Graphics {
+namespace Video {
struct CDToonsAction {
uint16 blockId;
@@ -447,4 +447,4 @@ void CDToonsDecoder::setPalette(byte *data) {
_palette[0] = _palette[1] = _palette[2] = 0;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/cdtoons.h b/video/codecs/cdtoons.h
index bb6fefa5de..dafe5e56ef 100644
--- a/video/codecs/cdtoons.h
+++ b/video/codecs/cdtoons.h
@@ -30,7 +30,7 @@
#include "common/hashmap.h"
-namespace Graphics {
+namespace Video {
struct CDToonsBlock {
uint16 flags;
@@ -46,14 +46,14 @@ public:
CDToonsDecoder(uint16 width, uint16 height);
~CDToonsDecoder();
- Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
+ Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
bool containsPalette() const { return true; }
const byte *getPalette() { _dirtyPalette = false; return _palette; }
bool hasDirtyPalette() const { return _dirtyPalette; }
private:
- Surface *_surface;
+ Graphics::Surface *_surface;
byte _palette[256 * 3];
bool _dirtyPalette;
uint16 _currentPaletteId;
@@ -65,6 +65,6 @@ private:
void setPalette(byte *data);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/cinepak.cpp b/video/codecs/cinepak.cpp
index 27be2d05ff..2f5cb73561 100644
--- a/video/codecs/cinepak.cpp
+++ b/video/codecs/cinepak.cpp
@@ -29,7 +29,7 @@
// Code here partially based off of ffmpeg ;)
-namespace Graphics {
+namespace Video {
// Convert a color from YUV to RGB colorspace, Cinepak style.
inline static void CPYUV2RGB(byte y, byte u, byte v, byte &r, byte &g, byte &b) {
@@ -54,7 +54,7 @@ CinepakDecoder::CinepakDecoder(int bitsPerPixel) : Codec() {
_y = 0;
if (bitsPerPixel == 8)
- _pixelFormat = PixelFormat::createFormatCLUT8();
+ _pixelFormat = Graphics::PixelFormat::createFormatCLUT8();
else
_pixelFormat = g_system->getScreenFormat();
}
@@ -68,7 +68,7 @@ CinepakDecoder::~CinepakDecoder() {
delete[] _curFrame.strips;
}
-const Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream *stream) {
_curFrame.flags = stream->readByte();
_curFrame.length = (stream->readByte() << 16) + stream->readUint16BE();
_curFrame.width = stream->readUint16BE();
@@ -88,7 +88,7 @@ const Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream *stream) {
}
if (!_curFrame.surface) {
- _curFrame.surface = new Surface();
+ _curFrame.surface = new Graphics::Surface();
_curFrame.surface->create(_curFrame.width, _curFrame.height, _pixelFormat.bytesPerPixel);
}
@@ -289,4 +289,4 @@ void CinepakDecoder::decodeVectors(Common::SeekableReadStream *stream, uint16 st
}
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/cinepak.h b/video/codecs/cinepak.h
index c200c75e8c..8b4c0216a3 100644
--- a/video/codecs/cinepak.h
+++ b/video/codecs/cinepak.h
@@ -34,7 +34,7 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
struct CinepakCodebook {
byte y[4];
@@ -56,7 +56,7 @@ struct CinepakFrame {
uint16 stripCount;
CinepakStrip *strips;
- Surface *surface;
+ Graphics::Surface *surface;
};
class CinepakDecoder : public Codec {
@@ -64,18 +64,18 @@ public:
CinepakDecoder(int bitsPerPixel = 24);
~CinepakDecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return _pixelFormat; }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
private:
CinepakFrame _curFrame;
int32 _y;
- PixelFormat _pixelFormat;
+ Graphics::PixelFormat _pixelFormat;
void loadCodebook(Common::SeekableReadStream *stream, uint16 strip, byte codebookType, byte chunkID, uint32 chunkSize);
void decodeVectors(Common::SeekableReadStream *stream, uint16 strip, byte chunkID, uint32 chunkSize);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/codec.h b/video/codecs/codec.h
index 380f087d40..4a33d83138 100644
--- a/video/codecs/codec.h
+++ b/video/codecs/codec.h
@@ -29,25 +29,25 @@
#include "graphics/surface.h"
#include "graphics/pixelformat.h"
-namespace Common{
+namespace Common {
class SeekableReadStream;
}
-namespace Graphics {
+namespace Video {
class Codec {
public:
Codec() {}
virtual ~Codec() {}
- virtual const Surface *decodeImage(Common::SeekableReadStream *stream) = 0;
- virtual PixelFormat getPixelFormat() const = 0;
+ virtual const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream) = 0;
+ virtual Graphics::PixelFormat getPixelFormat() const = 0;
virtual bool containsPalette() const { return false; }
virtual const byte *getPalette() { return 0; }
virtual bool hasDirtyPalette() const { return false; }
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/indeo3.cpp b/video/codecs/indeo3.cpp
index 8fa4a2d530..cc87d26e2b 100644
--- a/video/codecs/indeo3.cpp
+++ b/video/codecs/indeo3.cpp
@@ -42,7 +42,7 @@
#include "video/codecs/indeo3.h"
-namespace Graphics {
+namespace Video {
Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height) : _ModPred(0), _corrector_type(0) {
_iv_frame[0].the_buf = 0;
@@ -50,7 +50,7 @@ Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height) : _ModPred(0), _correc
_pixelFormat = g_system->getScreenFormat();
- _surface = new Surface;
+ _surface = new Graphics::Surface;
_surface->create(width, height, _pixelFormat.bytesPerPixel);
buildModPred();
@@ -66,7 +66,7 @@ Indeo3Decoder::~Indeo3Decoder() {
delete[] _corrector_type;
}
-PixelFormat Indeo3Decoder::getPixelFormat() const {
+Graphics::PixelFormat Indeo3Decoder::getPixelFormat() const {
return _pixelFormat;
}
@@ -169,7 +169,7 @@ void Indeo3Decoder::allocFrames() {
}
}
-const Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *stream) {
// Not Indeo 3? Fail
if (!isIndeo3(*stream))
return 0;
@@ -318,7 +318,7 @@ const Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *stream) {
}
byte r = 0, g = 0, b = 0;
- YUV2RGB(cY, cU, cV, r, g, b);
+ Graphics::YUV2RGB(cY, cU, cV, r, g, b);
const uint32 color = _pixelFormat.RGBToColor(r, g, b);
@@ -3490,6 +3490,6 @@ const uint32 Indeo3Decoder::correctionhighorder[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif // USE_INDEO3
diff --git a/video/codecs/indeo3.h b/video/codecs/indeo3.h
index 1e5d45f742..a9ae480f17 100644
--- a/video/codecs/indeo3.h
+++ b/video/codecs/indeo3.h
@@ -39,22 +39,22 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class Indeo3Decoder : public Codec {
public:
Indeo3Decoder(uint16 width, uint16 height);
~Indeo3Decoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const;
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const;
static bool isIndeo3(Common::SeekableReadStream &stream);
private:
- Surface *_surface;
+ Graphics::Surface *_surface;
- PixelFormat _pixelFormat;
+ Graphics::PixelFormat _pixelFormat;
static const int _corrector_type_0[24];
static const int _corrector_type_2[8];
@@ -87,7 +87,7 @@ private:
const byte *buf2, int min_width_160);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif // VIDEO_CODECS_INDEO3_H
diff --git a/video/codecs/mjpeg.cpp b/video/codecs/mjpeg.cpp
index 5f41699e10..d6ec391a84 100644
--- a/video/codecs/mjpeg.cpp
+++ b/video/codecs/mjpeg.cpp
@@ -28,10 +28,10 @@
#include "video/codecs/mjpeg.h"
-namespace Graphics {
+namespace Video {
JPEGDecoder::JPEGDecoder() : Codec() {
- _jpeg = new JPEG();
+ _jpeg = new Graphics::JPEG();
_pixelFormat = g_system->getScreenFormat();
_surface = NULL;
}
@@ -45,14 +45,14 @@ JPEGDecoder::~JPEGDecoder() {
}
}
-const Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream* stream) {
+const Graphics::Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream* stream) {
if (!_jpeg->read(stream)) {
warning("Failed to decode JPEG frame");
return 0;
}
if (!_surface) {
- _surface = new Surface();
+ _surface = new Graphics::Surface();
_surface->create(_jpeg->getWidth(), _jpeg->getHeight(), _pixelFormat.bytesPerPixel);
}
@@ -67,4 +67,4 @@ const Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream* stream) {
return _surface;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/mjpeg.h b/video/codecs/mjpeg.h
index da3719ea84..c9f931f091 100644
--- a/video/codecs/mjpeg.h
+++ b/video/codecs/mjpeg.h
@@ -32,7 +32,7 @@
#include "graphics/jpeg.h"
#include "graphics/pixelformat.h"
-namespace Graphics {
+namespace Video {
// Motion JPEG Decoder
// Basically a wrapper around JPEG which converts to RGB and also functions
@@ -43,15 +43,15 @@ public:
JPEGDecoder();
~JPEGDecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return _pixelFormat; }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
private:
- PixelFormat _pixelFormat;
- JPEG *_jpeg;
- Surface *_surface;
+ Graphics::PixelFormat _pixelFormat;
+ Graphics::JPEG *_jpeg;
+ Graphics::Surface *_surface;
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/msrle.cpp b/video/codecs/msrle.cpp
index 556f0ee670..46158c49d7 100644
--- a/video/codecs/msrle.cpp
+++ b/video/codecs/msrle.cpp
@@ -28,7 +28,7 @@
#include "video/codecs/msrle.h"
#include "common/stream.h"
-namespace Graphics {
+namespace Video {
MSRLEDecoder::MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) {
_surface = new Graphics::Surface();
@@ -41,7 +41,7 @@ MSRLEDecoder::~MSRLEDecoder() {
delete _surface;
}
-const Surface *MSRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *MSRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {
if (_bitsPerPixel == 8) {
decode8(stream);
} else
@@ -75,7 +75,7 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) {
output = data + (y * width);
if (y < 0) {
- warning("Next line is beyond picture bounds");
+ warning("MS RLE Codec: Next line is beyond picture bounds");
return;
}
@@ -93,7 +93,7 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) {
x += count;
if (y < 0) {
- warning("Skip beyond picture bounds");
+ warning("MS RLE Codec: Skip beyond picture bounds");
return;
}
@@ -128,7 +128,7 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) {
}
- warning("No end-of-picture code");
+ warning("MS RLE Codec: No end-of-picture code");
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/msrle.h b/video/codecs/msrle.h
index e710c25ae8..130bb8c4ef 100644
--- a/video/codecs/msrle.h
+++ b/video/codecs/msrle.h
@@ -28,24 +28,24 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class MSRLEDecoder : public Codec {
public:
MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);
~MSRLEDecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
private:
byte _bitsPerPixel;
- Surface *_surface;
+ Graphics::Surface *_surface;
void decode8(Common::SeekableReadStream *stream);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/msvideo1.cpp b/video/codecs/msvideo1.cpp
index 94537e1f9f..2075d7f013 100644
--- a/video/codecs/msvideo1.cpp
+++ b/video/codecs/msvideo1.cpp
@@ -28,7 +28,7 @@
#include "video/codecs/msvideo1.h"
#include "common/stream.h"
-namespace Graphics {
+namespace Video {
#define CHECK_STREAM_PTR(n) \
if ((stream->pos() + n) > stream->size() ) { \
@@ -126,7 +126,7 @@ void MSVideo1Decoder::decode8(Common::SeekableReadStream *stream) {
}
}
-const Surface *MSVideo1Decoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *MSVideo1Decoder::decodeImage(Common::SeekableReadStream *stream) {
if (_bitsPerPixel == 8)
decode8(stream);
else {
@@ -137,4 +137,4 @@ const Surface *MSVideo1Decoder::decodeImage(Common::SeekableReadStream *stream)
return _surface;
}
-} // End of namespace JMP
+} // End of namespace Video
diff --git a/video/codecs/msvideo1.h b/video/codecs/msvideo1.h
index 8dadf311fe..c476538a8e 100644
--- a/video/codecs/msvideo1.h
+++ b/video/codecs/msvideo1.h
@@ -28,25 +28,25 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class MSVideo1Decoder : public Codec {
public:
MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel);
~MSVideo1Decoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
private:
byte _bitsPerPixel;
- Surface *_surface;
+ Graphics::Surface *_surface;
void decode8(Common::SeekableReadStream *stream);
//void decode16(Common::SeekableReadStream *stream);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/qdm2.cpp b/video/codecs/qdm2.cpp
index 6721788d8c..eac1954435 100644
--- a/video/codecs/qdm2.cpp
+++ b/video/codecs/qdm2.cpp
@@ -37,7 +37,7 @@
#include "common/stream.h"
#include "common/system.h"
-namespace Graphics {
+namespace Video {
enum {
SOFTCLIP_THRESHOLD = 27600,
@@ -3282,6 +3282,6 @@ Audio::AudioStream *makeQDM2Stream(Common::SeekableReadStream *stream, Common::S
return new QDM2Stream(stream, extraData);
}
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/qdm2.h b/video/codecs/qdm2.h
index 98e0fa54b6..a6acf3a83e 100644
--- a/video/codecs/qdm2.h
+++ b/video/codecs/qdm2.h
@@ -37,7 +37,7 @@ namespace Audio {
class AudioStream;
}
-namespace Graphics {
+namespace Video {
/**
* Create a new AudioStream from the QDM2 data in the given stream.
@@ -48,7 +48,7 @@ namespace Graphics {
*/
Audio::AudioStream *makeQDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadStream *extraData);
-} // End of namespace Graphics
+} // End of namespace Video
#endif // VIDEO_CODECS_QDM2_H
#endif // Mohawk/Plugins guard
diff --git a/video/codecs/qdm2data.h b/video/codecs/qdm2data.h
index 17d3948eb1..e1a690bd2b 100644
--- a/video/codecs/qdm2data.h
+++ b/video/codecs/qdm2data.h
@@ -28,7 +28,7 @@
#include "common/scummsys.h"
-namespace Graphics {
+namespace Video {
/// VLC TABLES
@@ -526,6 +526,6 @@ static const float type34_delta[10] = { // FIXME: covers 8 entries..
0.138071194291115f,0.333333343267441f,0.60947573184967f,1.0f,0.0f,
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/qtrle.cpp b/video/codecs/qtrle.cpp
index 1dcc94e417..26b2f02ce1 100644
--- a/video/codecs/qtrle.cpp
+++ b/video/codecs/qtrle.cpp
@@ -34,7 +34,7 @@
#include "graphics/colormasks.h"
#include "graphics/surface.h"
-namespace Graphics {
+namespace Video {
QTRLEDecoder::QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) : Codec() {
_bitsPerPixel = bitsPerPixel;
@@ -47,7 +47,7 @@ QTRLEDecoder::QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) : Cod
debug(2, "QTRLE corrected width: %d", width);
- _surface = new Surface();
+ _surface = new Graphics::Surface();
_surface->create(width, height, _bitsPerPixel <= 8 ? 1 : _pixelFormat.bytesPerPixel);
}
@@ -239,7 +239,7 @@ void QTRLEDecoder::decode16(Common::SeekableReadStream *stream, uint32 rowPtr, u
while (rleCode--) {
// Convert from RGB555 to the format specified by the Overlay
byte r = 0, g = 0, b = 0;
- colorToRGB<ColorMasks<555> >(rgb16, r, g, b);
+ Graphics::colorToRGB<Graphics::ColorMasks<555> >(rgb16, r, g, b);
rgb[pixelPtr++] = _pixelFormat.RGBToColor(r, g, b);
}
} else {
@@ -252,7 +252,7 @@ void QTRLEDecoder::decode16(Common::SeekableReadStream *stream, uint32 rowPtr, u
// Convert from RGB555 to the format specified by the Overlay
byte r = 0, g = 0, b = 0;
- colorToRGB<ColorMasks<555> >(rgb16, r, g, b);
+ Graphics::colorToRGB<Graphics::ColorMasks<555> >(rgb16, r, g, b);
rgb[pixelPtr++] = _pixelFormat.RGBToColor(r, g, b);
}
}
@@ -354,7 +354,7 @@ void QTRLEDecoder::decode32(Common::SeekableReadStream *stream, uint32 rowPtr, u
}
}
-const Surface *QTRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *QTRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {
uint16 start_line = 0;
uint16 height = _surface->h;
@@ -418,4 +418,4 @@ QTRLEDecoder::~QTRLEDecoder() {
delete _surface;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/qtrle.h b/video/codecs/qtrle.h
index d40404ecb7..20fe2c3242 100644
--- a/video/codecs/qtrle.h
+++ b/video/codecs/qtrle.h
@@ -29,21 +29,21 @@
#include "graphics/pixelformat.h"
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class QTRLEDecoder : public Codec {
public:
QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);
~QTRLEDecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return _pixelFormat; }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
private:
byte _bitsPerPixel;
- Surface *_surface;
- PixelFormat _pixelFormat;
+ Graphics::Surface *_surface;
+ Graphics::PixelFormat _pixelFormat;
void decode1(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);
void decode2_4(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange, byte bpp);
@@ -53,6 +53,6 @@ private:
void decode32(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/rpza.cpp b/video/codecs/rpza.cpp
index 95cffb4015..cc9739b673 100644
--- a/video/codecs/rpza.cpp
+++ b/video/codecs/rpza.cpp
@@ -31,7 +31,7 @@
#include "common/stream.h"
#include "graphics/colormasks.h"
-namespace Graphics {
+namespace Video {
RPZADecoder::RPZADecoder(uint16 width, uint16 height) : Codec() {
_pixelFormat = g_system->getScreenFormat();
@@ -43,7 +43,7 @@ RPZADecoder::RPZADecoder(uint16 width, uint16 height) : Codec() {
debug(2, "RPZA corrected width: %d", width);
- _surface = new Surface();
+ _surface = new Graphics::Surface();
_surface->create(width, height, _pixelFormat.bytesPerPixel);
}
@@ -66,7 +66,7 @@ RPZADecoder::~RPZADecoder() {
#define PUT_PIXEL(color) \
if ((int32)blockPtr < _surface->w * _surface->h) { \
byte r = 0, g = 0, b = 0; \
- colorToRGB<ColorMasks<555> >(color, r, g, b); \
+ Graphics::colorToRGB<Graphics::ColorMasks<555> >(color, r, g, b); \
if (_pixelFormat.bytesPerPixel == 2) \
*((uint16 *)_surface->pixels + blockPtr) = _pixelFormat.RGBToColor(r, g, b); \
else \
@@ -74,7 +74,7 @@ RPZADecoder::~RPZADecoder() {
} \
blockPtr++
-const Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *stream) {
uint16 colorA = 0, colorB = 0;
uint16 color4[4];
@@ -211,4 +211,4 @@ const Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *stream) {
return _surface;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/rpza.h b/video/codecs/rpza.h
index bc82465a1e..c6b1f43a9a 100644
--- a/video/codecs/rpza.h
+++ b/video/codecs/rpza.h
@@ -29,21 +29,21 @@
#include "graphics/pixelformat.h"
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class RPZADecoder : public Codec {
public:
RPZADecoder(uint16 width, uint16 height);
~RPZADecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return _pixelFormat; }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
private:
- Surface *_surface;
- PixelFormat _pixelFormat;
+ Graphics::Surface *_surface;
+ Graphics::PixelFormat _pixelFormat;
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/smc.cpp b/video/codecs/smc.cpp
index 017fe04ab6..d03c60490f 100644
--- a/video/codecs/smc.cpp
+++ b/video/codecs/smc.cpp
@@ -28,7 +28,7 @@
#include "video/codecs/smc.h"
#include "common/stream.h"
-namespace Graphics {
+namespace Video {
#define GET_BLOCK_COUNT() \
(opcode & 0x10) ? (1 + stream->readByte()) : 1 + (opcode & 0x0F);
@@ -388,4 +388,4 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str
return _surface;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/smc.h b/video/codecs/smc.h
index 35fd76f76b..b2bc612857 100644
--- a/video/codecs/smc.h
+++ b/video/codecs/smc.h
@@ -28,7 +28,7 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
enum {
CPAIR = 2,
@@ -42,11 +42,11 @@ public:
SMCDecoder(uint16 width, uint16 height);
~SMCDecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
private:
- Surface *_surface;
+ Graphics::Surface *_surface;
// SMC color tables
byte _colorPairs[COLORS_PER_TABLE * CPAIR];
@@ -54,6 +54,6 @@ private:
byte _colorOctets[COLORS_PER_TABLE * COCTET];
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/truemotion1.cpp b/video/codecs/truemotion1.cpp
index e9a790924e..a0456869ab 100644
--- a/video/codecs/truemotion1.cpp
+++ b/video/codecs/truemotion1.cpp
@@ -33,7 +33,7 @@
#include "video/codecs/truemotion1data.h"
#include "common/stream.h"
-namespace Graphics {
+namespace Video {
enum {
FLAG_SPRITE = (1 << 5),
@@ -88,7 +88,7 @@ struct {
};
TrueMotion1Decoder::TrueMotion1Decoder(uint16 width, uint16 height) {
- _surface = new Surface();
+ _surface = new Graphics::Surface();
_width = width;
_height = height;
@@ -396,7 +396,7 @@ void TrueMotion1Decoder::decode16() {
}
}
-const Surface *TrueMotion1Decoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *TrueMotion1Decoder::decodeImage(Common::SeekableReadStream *stream) {
decodeHeader(stream);
if (compressionTypes[_header.compression].algorithm == ALGO_NOP)
@@ -413,6 +413,6 @@ const Surface *TrueMotion1Decoder::decodeImage(Common::SeekableReadStream *strea
return _surface;
}
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/truemotion1.h b/video/codecs/truemotion1.h
index c80598afdc..4a51fcb33a 100644
--- a/video/codecs/truemotion1.h
+++ b/video/codecs/truemotion1.h
@@ -33,20 +33,20 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class TrueMotion1Decoder : public Codec {
public:
TrueMotion1Decoder(uint16 width, uint16 height);
~TrueMotion1Decoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
// Always return RGB565
- PixelFormat getPixelFormat() const { return Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0); }
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0); }
private:
- Surface *_surface;
+ Graphics::Surface *_surface;
int _mbChangeBitsRowSize;
byte *_buf, *_mbChangeBits, *_indexStream;
@@ -100,7 +100,7 @@ private:
void genVectorTable16(const byte *selVectorTable);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif // VIDEO_CODECS_TRUEMOTION1_H
#endif // SCI32/Plugins guard
diff --git a/video/codecs/truemotion1data.h b/video/codecs/truemotion1data.h
index 8199135a29..06d30c4436 100644
--- a/video/codecs/truemotion1data.h
+++ b/video/codecs/truemotion1data.h
@@ -31,7 +31,7 @@
#include "common/scummsys.h"
-namespace Graphics {
+namespace Video {
// Y delta tables, skinny and fat
static const int16 ydt1[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
@@ -827,6 +827,6 @@ static const byte pc_tbl4[] = {
static const byte * const tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 };
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp
index 1cb94498c3..26b12220f2 100644
--- a/video/coktel_decoder.cpp
+++ b/video/coktel_decoder.cpp
@@ -38,7 +38,7 @@
static const uint32 kVideoCodecIndeo3 = MKID_BE('iv32');
-namespace Graphics {
+namespace Video {
CoktelDecoder::State::State() : flags(0), speechId(0) {
}
@@ -107,7 +107,7 @@ void CoktelDecoder::setSurfaceMemory() {
_ownSurface = true;
}
-const Surface *CoktelDecoder::getSurface() const {
+const Graphics::Surface *CoktelDecoder::getSurface() const {
if (!isVideoLoaded())
return 0;
@@ -435,7 +435,7 @@ void CoktelDecoder::deRLE(byte *&destPtr, const byte *&srcPtr, int16 destLen, in
}
// A whole, completely filled block
-void CoktelDecoder::renderBlockWhole(Surface &dstSurf, const byte *src, Common::Rect &rect) {
+void CoktelDecoder::renderBlockWhole(Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect) {
Common::Rect srcRect = rect;
rect.clip(dstSurf.w, dstSurf.h);
@@ -450,7 +450,7 @@ void CoktelDecoder::renderBlockWhole(Surface &dstSurf, const byte *src, Common::
}
// A quarter-wide whole, completely filled block
-void CoktelDecoder::renderBlockWhole4X(Surface &dstSurf, const byte *src, Common::Rect &rect) {
+void CoktelDecoder::renderBlockWhole4X(Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect) {
Common::Rect srcRect = rect;
rect.clip(dstSurf.w, dstSurf.h);
@@ -475,7 +475,7 @@ void CoktelDecoder::renderBlockWhole4X(Surface &dstSurf, const byte *src, Common
}
// A half-high whole, completely filled block
-void CoktelDecoder::renderBlockWhole2Y(Surface &dstSurf, const byte *src, Common::Rect &rect) {
+void CoktelDecoder::renderBlockWhole2Y(Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect) {
Common::Rect srcRect = rect;
rect.clip(dstSurf.w, dstSurf.h);
@@ -497,7 +497,7 @@ void CoktelDecoder::renderBlockWhole2Y(Surface &dstSurf, const byte *src, Common
}
// A sparse block
-void CoktelDecoder::renderBlockSparse(Surface &dstSurf, const byte *src, Common::Rect &rect) {
+void CoktelDecoder::renderBlockSparse(Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect) {
Common::Rect srcRect = rect;
rect.clip(dstSurf.w, dstSurf.h);
@@ -532,7 +532,7 @@ void CoktelDecoder::renderBlockSparse(Surface &dstSurf, const byte *src, Common:
}
// A half-high sparse block
-void CoktelDecoder::renderBlockSparse2Y(Surface &dstSurf, const byte *src, Common::Rect &rect) {
+void CoktelDecoder::renderBlockSparse2Y(Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect) {
warning("renderBlockSparse2Y");
Common::Rect srcRect = rect;
@@ -569,7 +569,7 @@ void CoktelDecoder::renderBlockSparse2Y(Surface &dstSurf, const byte *src, Commo
}
}
-void CoktelDecoder::renderBlockRLE(Surface &dstSurf, const byte *src, Common::Rect &rect) {
+void CoktelDecoder::renderBlockRLE(Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect) {
Common::Rect srcRect = rect;
rect.clip(dstSurf.w, dstSurf.h);
@@ -697,7 +697,7 @@ bool PreIMDDecoder::isVideoLoaded() const {
return _stream != 0;
}
-const Surface *PreIMDDecoder::decodeNextFrame() {
+const Graphics::Surface *PreIMDDecoder::decodeNextFrame() {
if (!isVideoLoaded() || endOfVideo())
return 0;
@@ -809,8 +809,8 @@ void PreIMDDecoder::renderFrame() {
_dirtyRects.push_back(Common::Rect(_x, _y, _x + _width, _y + _height));
}
-PixelFormat PreIMDDecoder::getPixelFormat() const {
- return PixelFormat::createFormatCLUT8();
+Graphics::PixelFormat PreIMDDecoder::getPixelFormat() const {
+ return Graphics::PixelFormat::createFormatCLUT8();
}
@@ -1165,7 +1165,7 @@ bool IMDDecoder::isVideoLoaded() const {
return _stream != 0;
}
-const Surface *IMDDecoder::decodeNextFrame() {
+const Graphics::Surface *IMDDecoder::decodeNextFrame() {
if (!isVideoLoaded() || endOfVideo())
return 0;
@@ -1455,8 +1455,8 @@ void IMDDecoder::emptySoundSlice(bool hasNextCmd) {
_audioStream->queueBuffer(soundBuf, _soundSliceSize, DisposeAfterUse::YES, 0);
}
-PixelFormat IMDDecoder::getPixelFormat() const {
- return PixelFormat::createFormatCLUT8();
+Graphics::PixelFormat IMDDecoder::getPixelFormat() const {
+ return Graphics::PixelFormat::createFormatCLUT8();
}
@@ -2041,7 +2041,7 @@ bool VMDDecoder::isVideoLoaded() const {
return _stream != 0;
}
-const Surface *VMDDecoder::decodeNextFrame() {
+const Graphics::Surface *VMDDecoder::decodeNextFrame() {
if (!isVideoLoaded() || endOfVideo())
return 0;
@@ -2202,7 +2202,7 @@ bool VMDDecoder::renderFrame(Common::Rect &rect) {
return false;
Common::MemoryReadStream frameStream(_videoBuffer[0], _videoBufferLen[0]);
- const Surface *codecSurf = _codec->decodeImage(&frameStream);
+ const Graphics::Surface *codecSurf = _codec->decodeImage(&frameStream);
if (!codecSurf)
return false;
@@ -2239,8 +2239,8 @@ bool VMDDecoder::renderFrame(Common::Rect &rect) {
dataSize = _videoBufferLen[srcBuffer];
}
- Common::Rect *blockRect = &fakeRect;
- Surface *surface = &_surface;
+ Common::Rect *blockRect = &fakeRect;
+ Graphics::Surface *surface = &_surface;
if (_blitMode == 0) {
*blockRect = Common::Rect(blockRect->left + _x, blockRect->top + _y,
blockRect->right + _x, blockRect->bottom + _y);
@@ -2325,14 +2325,14 @@ bool VMDDecoder::getRenderRects(const Common::Rect &rect,
return true;
}
-void VMDDecoder::blit16(const Surface &srcSurf, Common::Rect &rect) {
+void VMDDecoder::blit16(const Graphics::Surface &srcSurf, Common::Rect &rect) {
rect = Common::Rect(rect.left / 2, rect.top, rect.right / 2, rect.bottom);
Common::Rect srcRect = rect;
rect.clip(_surface.w, _surface.h);
- PixelFormat pixelFormat = getPixelFormat();
+ Graphics::PixelFormat pixelFormat = getPixelFormat();
const byte *src = (byte *)srcSurf.pixels +
(srcRect.top * srcSurf.pitch) + srcRect.left * _bytesPerPixel;
@@ -2363,14 +2363,14 @@ void VMDDecoder::blit16(const Surface &srcSurf, Common::Rect &rect) {
}
}
-void VMDDecoder::blit24(const Surface &srcSurf, Common::Rect &rect) {
+void VMDDecoder::blit24(const Graphics::Surface &srcSurf, Common::Rect &rect) {
rect = Common::Rect(rect.left / 3, rect.top, rect.right / 3, rect.bottom);
Common::Rect srcRect = rect;
rect.clip(_surface.w, _surface.h);
- PixelFormat pixelFormat = getPixelFormat();
+ Graphics::PixelFormat pixelFormat = getPixelFormat();
const byte *src = (byte *)srcSurf.pixels +
(srcRect.top * srcSurf.pitch) + srcRect.left * _bytesPerPixel;
@@ -2642,7 +2642,7 @@ byte *VMDDecoder::deADPCM(const byte *data, uint32 &size, int32 init, int32 inde
return sound;
}
-PixelFormat VMDDecoder::getPixelFormat() const {
+Graphics::PixelFormat VMDDecoder::getPixelFormat() const {
if (_externalCodec) {
if (_codec)
return _codec->getPixelFormat();
@@ -2655,7 +2655,7 @@ PixelFormat VMDDecoder::getPixelFormat() const {
if (_blitMode > 0)
return g_system->getScreenFormat();
- return PixelFormat::createFormatCLUT8();
+ return Graphics::PixelFormat::createFormatCLUT8();
}
bool VMDDecoder::getPartCoords(int16 frame, PartType type, int16 &x, int16 &y, int16 &width, int16 &height) {
@@ -2752,6 +2752,6 @@ bool VMDDecoder::isPaletted() const {
return _isPaletted;
}
-} // End of namespace Graphics
+} // End of namespace Video
#endif // VIDEO_COKTELDECODER_H
diff --git a/video/coktel_decoder.h b/video/coktel_decoder.h
index 1b043d9dd2..0cbd00ea8c 100644
--- a/video/coktel_decoder.h
+++ b/video/coktel_decoder.h
@@ -45,7 +45,7 @@ namespace Audio {
class QueuingAudioStream;
}
-namespace Graphics {
+namespace Video {
class Codec;
@@ -78,7 +78,7 @@ public:
/** Reset the video memory. */
void setSurfaceMemory();
- const Surface *getSurface() const;
+ const Graphics::Surface *getSurface() const;
/** Draw the video starting at this position within the video memory. */
virtual void setXY(uint16 x, uint16 y);
@@ -180,7 +180,7 @@ protected:
bool _paletteDirty;
bool _ownSurface;
- Surface _surface;
+ Graphics::Surface _surface;
Common::List<Common::Rect> _dirtyRects;
@@ -206,12 +206,12 @@ protected:
void deRLE(byte *&destPtr, const byte *&srcPtr, int16 destLen, int16 srcLen);
// Block rendering
- void renderBlockWhole (Surface &dstSurf, const byte *src, Common::Rect &rect);
- void renderBlockWhole4X (Surface &dstSurf, const byte *src, Common::Rect &rect);
- void renderBlockWhole2Y (Surface &dstSurf, const byte *src, Common::Rect &rect);
- void renderBlockSparse (Surface &dstSurf, const byte *src, Common::Rect &rect);
- void renderBlockSparse2Y(Surface &dstSurf, const byte *src, Common::Rect &rect);
- void renderBlockRLE (Surface &dstSurf, const byte *src, Common::Rect &rect);
+ void renderBlockWhole (Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect);
+ void renderBlockWhole4X (Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect);
+ void renderBlockWhole2Y (Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect);
+ void renderBlockSparse (Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect);
+ void renderBlockSparse2Y(Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect);
+ void renderBlockRLE (Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect);
// Sound helper functions
inline void unsignedToSigned(byte *buffer, int length);
@@ -238,9 +238,9 @@ public:
bool isVideoLoaded() const;
- const Surface *decodeNextFrame();
+ const Graphics::Surface *decodeNextFrame();
- PixelFormat getPixelFormat() const;
+ Graphics::PixelFormat getPixelFormat() const;
private:
Common::SeekableReadStream *_stream;
@@ -271,9 +271,9 @@ public:
bool isVideoLoaded() const;
- const Surface *decodeNextFrame();
+ const Graphics::Surface *decodeNextFrame();
- PixelFormat getPixelFormat() const;
+ Graphics::PixelFormat getPixelFormat() const;
private:
enum Command {
@@ -375,9 +375,9 @@ public:
bool isVideoLoaded() const;
- const Surface *decodeNextFrame();
+ const Graphics::Surface *decodeNextFrame();
- PixelFormat getPixelFormat() const;
+ Graphics::PixelFormat getPixelFormat() const;
private:
enum PartType {
@@ -467,7 +467,7 @@ private:
byte *_videoBuffer[3]; ///< Video buffers.
uint32 _videoBufferLen[3]; ///< Size of the video buffers filled.
- Surface _8bppSurface[3]; ///< Fake 8bpp surfaces over the video buffers.
+ Graphics::Surface _8bppSurface[3]; ///< Fake 8bpp surfaces over the video buffers.
bool _externalCodec;
Codec *_codec;
@@ -490,8 +490,8 @@ private:
bool renderFrame(Common::Rect &rect);
bool getRenderRects(const Common::Rect &rect,
Common::Rect &realRect, Common::Rect &fakeRect);
- void blit16(const Surface &srcSurf, Common::Rect &rect);
- void blit24(const Surface &srcSurf, Common::Rect &rect);
+ void blit16(const Graphics::Surface &srcSurf, Common::Rect &rect);
+ void blit24(const Graphics::Surface &srcSurf, Common::Rect &rect);
// Sound
void emptySoundSlice (uint32 size);
@@ -513,7 +513,7 @@ private:
bool getPartCoords(int16 frame, PartType type, int16 &x, int16 &y, int16 &width, int16 &height);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif // VIDEO_COKTELDECODER_H
diff --git a/video/dxa_decoder.cpp b/video/dxa_decoder.cpp
index 7e468371d0..bf476def44 100644
--- a/video/dxa_decoder.cpp
+++ b/video/dxa_decoder.cpp
@@ -36,7 +36,7 @@
#include "common/zlib.h"
#endif
-namespace Graphics {
+namespace Video {
DXADecoder::DXADecoder() {
_fileStream = 0;
@@ -477,7 +477,7 @@ void DXADecoder::decode13(int size) {
#endif
}
-const Surface *DXADecoder::decodeNextFrame() {
+const Graphics::Surface *DXADecoder::decodeNextFrame() {
uint32 tag = _fileStream->readUint32BE();
if (tag == MKID_BE('CMAP')) {
_fileStream->read(_palette, 256 * 3);
@@ -559,4 +559,4 @@ const Surface *DXADecoder::decodeNextFrame() {
return _surface;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/dxa_decoder.h b/video/dxa_decoder.h
index e2fa97a7db..e480298a90 100644
--- a/video/dxa_decoder.h
+++ b/video/dxa_decoder.h
@@ -28,7 +28,7 @@
#include "video/video_decoder.h"
-namespace Graphics {
+namespace Video {
/**
* Decoder for DXA videos.
@@ -50,8 +50,8 @@ public:
uint16 getWidth() const { return _width; }
uint16 getHeight() const { return _height; }
uint32 getFrameCount() const { return _frameCount; }
- const Surface *decodeNextFrame();
- PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
+ const Graphics::Surface *decodeNextFrame();
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
const byte *getPalette() { _dirtyPalette = false; return _palette; }
bool hasDirtyPalette() const { return _dirtyPalette; }
@@ -96,6 +96,6 @@ private:
uint32 _frameCount;
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/flic_decoder.cpp b/video/flic_decoder.cpp
index 34b667234a..347eae4034 100644
--- a/video/flic_decoder.cpp
+++ b/video/flic_decoder.cpp
@@ -29,7 +29,7 @@
#include "common/endian.h"
#include "common/system.h"
-namespace Graphics {
+namespace Video {
FlicDecoder::FlicDecoder() {
_paletteChanged = false;
@@ -194,7 +194,7 @@ void FlicDecoder::decodeDeltaFLC(uint8 *data) {
#define PSTAMP 18
#define FRAME_TYPE 0xF1FA
-const Surface *FlicDecoder::decodeNextFrame() {
+const Graphics::Surface *FlicDecoder::decodeNextFrame() {
// Read chunk
uint32 frameSize = _fileStream->readUint32LE();
uint16 frameType = _fileStream->readUint16LE();
@@ -320,4 +320,4 @@ void FlicDecoder::copyDirtyRectsToBuffer(uint8 *dst, uint pitch) {
_dirtyRects.clear();
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/flic_decoder.h b/video/flic_decoder.h
index 37068c2fb3..7736cdf604 100644
--- a/video/flic_decoder.h
+++ b/video/flic_decoder.h
@@ -34,7 +34,7 @@ namespace Common {
class SeekableReadStream;
}
-namespace Graphics {
+namespace Video {
/**
* Decoder for FLIC videos.
@@ -59,13 +59,13 @@ public:
* @note the return surface should *not* be freed
* @note this may return 0, in which case the last frame should be kept on screen
*/
- const Surface *decodeNextFrame();
+ const Graphics::Surface *decodeNextFrame();
bool isVideoLoaded() const { return _fileStream != 0; }
uint16 getWidth() const { return _surface->w; }
uint16 getHeight() const { return _surface->h; }
uint32 getFrameCount() const { return _frameCount; }
- PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
const Common::List<Common::Rect> *getDirtyRects() const { return &_dirtyRects; }
void clearDirtyRects() { _dirtyRects.clear(); }
@@ -89,13 +89,13 @@ private:
void unpackPalette(uint8 *mem);
Common::SeekableReadStream *_fileStream;
- Surface *_surface;
+ Graphics::Surface *_surface;
uint32 _frameCount;
Common::Rational _frameRate;
Common::List<Common::Rect> _dirtyRects;
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/mpeg_player.cpp b/video/mpeg_player.cpp
index 74f097500d..f583853183 100644
--- a/video/mpeg_player.cpp
+++ b/video/mpeg_player.cpp
@@ -91,7 +91,7 @@
#include "common/system.h"
#include "common/util.h"
-namespace Graphics {
+namespace Video {
BaseAnimationState::BaseAnimationState(OSystem *sys, int width, int height)
: _movieWidth(width), _movieHeight(height), _frameWidth(width), _frameHeight(height), _sys(sys) {
@@ -622,4 +622,4 @@ void BaseAnimationState::updateScreen() {
_sys->updateScreen();
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/mpeg_player.h b/video/mpeg_player.h
index d6890f78b6..44baff9c2b 100644
--- a/video/mpeg_player.h
+++ b/video/mpeg_player.h
@@ -86,7 +86,7 @@ namespace Common {
class OSystem;
-namespace Graphics {
+namespace Video {
class BaseAnimationState {
protected:
@@ -167,6 +167,6 @@ protected:
#endif
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp
index 77752cc47f..49cab3527e 100644
--- a/video/qt_decoder.cpp
+++ b/video/qt_decoder.cpp
@@ -53,7 +53,7 @@
#include "video/codecs/smc.h"
#include "video/codecs/cdtoons.h"
-namespace Graphics {
+namespace Video {
////////////////////////////////////////////
// QuickTimeDecoder
@@ -135,11 +135,11 @@ uint32 QuickTimeDecoder::getFrameDuration() {
return 0;
}
-PixelFormat QuickTimeDecoder::getPixelFormat() const {
+Graphics::PixelFormat QuickTimeDecoder::getPixelFormat() const {
Codec *codec = findDefaultVideoCodec();
if (!codec)
- return PixelFormat::createFormatCLUT8();
+ return Graphics::PixelFormat::createFormatCLUT8();
return codec->getPixelFormat();
}
@@ -177,7 +177,7 @@ void QuickTimeDecoder::seekToFrame(uint32 frame) {
}
// Adjust the video starting point
- _startTime = g_system->getMillis() - Graphics::VideoTimestamp(_nextFrameStartTime, _streams[_videoStreamIndex]->time_scale).getUnitsInScale(1000);
+ _startTime = g_system->getMillis() - Video::VideoTimestamp(_nextFrameStartTime, _streams[_videoStreamIndex]->time_scale).getUnitsInScale(1000);
resetPauseStartTime();
// Adjust the audio starting point
@@ -196,7 +196,7 @@ void QuickTimeDecoder::seekToFrame(uint32 frame) {
for (int32 j = 0; j < _streams[_audioStreamIndex]->stts_data[i].count; j++) {
curTime += _streams[_audioStreamIndex]->stts_data[i].duration;
- if (curTime > Graphics::VideoTimestamp(_nextFrameStartTime, _streams[_videoStreamIndex]->time_scale).getUnitsInScale(_streams[_audioStreamIndex]->time_scale)) {
+ if (curTime > Video::VideoTimestamp(_nextFrameStartTime, _streams[_videoStreamIndex]->time_scale).getUnitsInScale(_streams[_audioStreamIndex]->time_scale)) {
done = true;
break;
}
@@ -326,7 +326,7 @@ Codec *QuickTimeDecoder::findDefaultVideoCodec() const {
return _streams[_videoStreamIndex]->stsdEntries[0].videoCodec;
}
-const Surface *QuickTimeDecoder::decodeNextFrame() {
+const Graphics::Surface *QuickTimeDecoder::decodeNextFrame() {
if (_videoStreamIndex < 0 || _curFrame >= (int32)getFrameCount() - 1)
return 0;
@@ -352,7 +352,7 @@ const Surface *QuickTimeDecoder::decodeNextFrame() {
if (!entry->videoCodec)
return 0;
- const Surface *frame = entry->videoCodec->decodeImage(frameData);
+ const Graphics::Surface *frame = entry->videoCodec->decodeImage(frameData);
delete frameData;
// Update the palette
@@ -375,7 +375,7 @@ const Surface *QuickTimeDecoder::decodeNextFrame() {
return scaleSurface(frame);
}
-const Surface *QuickTimeDecoder::scaleSurface(const Surface *frame) {
+const Graphics::Surface *QuickTimeDecoder::scaleSurface(const Graphics::Surface *frame) {
if (getScaleFactorX() == 1 && getScaleFactorY() == 1)
return frame;
@@ -527,7 +527,7 @@ void QuickTimeDecoder::init() {
if (getScaleFactorX() != 1 || getScaleFactorY() != 1) {
// We have to initialize the scaled surface
- _scaledSurface = new Surface();
+ _scaledSurface = new Graphics::Surface();
_scaledSurface->create(getWidth(), getHeight(), getPixelFormat().bytesPerPixel);
}
}
@@ -1485,4 +1485,4 @@ QuickTimeDecoder::MOVStreamContext::~MOVStreamContext() {
delete extradata;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/qt_decoder.h b/video/qt_decoder.h
index ed6634e38c..ef701b3756 100644
--- a/video/qt_decoder.h
+++ b/video/qt_decoder.h
@@ -49,7 +49,7 @@ namespace Common {
class MacResManager;
}
-namespace Graphics {
+namespace Video {
/**
* Decoder for QuickTime videos.
@@ -113,11 +113,11 @@ public:
void setChunkBeginOffset(uint32 offset) { _beginOffset = offset; }
bool isVideoLoaded() const { return _fd != 0; }
- const Surface *decodeNextFrame();
+ const Graphics::Surface *decodeNextFrame();
bool endOfVideo() const;
uint32 getElapsedTime() const;
uint32 getTimeToNextFrame() const;
- PixelFormat getPixelFormat() const;
+ Graphics::PixelFormat getPixelFormat() const;
// SeekableVideoDecoder API
void seekToFrame(uint32 frame);
@@ -247,8 +247,8 @@ private:
int8 _videoStreamIndex;
uint32 findKeyFrame(uint32 frame) const;
- Surface *_scaledSurface;
- const Surface *scaleSurface(const Surface *frame);
+ Graphics::Surface *_scaledSurface;
+ const Graphics::Surface *scaleSurface(const Graphics::Surface *frame);
Common::Rational getScaleFactorX() const;
Common::Rational getScaleFactorY() const;
@@ -273,6 +273,6 @@ private:
int readWAVE(MOVatom atom);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index 8052df61fc..454bc6dde5 100644
--- a/video/smk_decoder.cpp
+++ b/video/smk_decoder.cpp
@@ -39,7 +39,7 @@
#include "sound/mixer.h"
#include "sound/decoders/raw.h"
-namespace Graphics {
+namespace Video {
enum SmkBlockTypes {
SMK_BLOCK_MONO = 0,
@@ -519,7 +519,7 @@ void SmackerDecoder::close() {
reset();
}
-const Surface *SmackerDecoder::decodeNextFrame() {
+const Graphics::Surface *SmackerDecoder::decodeNextFrame() {
uint i;
uint32 chunkSize = 0;
uint32 dataSizeUnpacked = 0;
@@ -899,4 +899,4 @@ void SmackerDecoder::unpackPalette() {
free(chunk);
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/smk_decoder.h b/video/smk_decoder.h
index cb73810df9..3476dbe534 100644
--- a/video/smk_decoder.h
+++ b/video/smk_decoder.h
@@ -33,7 +33,7 @@ namespace Audio {
class QueuingAudioStream;
}
-namespace Graphics {
+namespace Video {
class BigHuffmanTree;
@@ -66,8 +66,8 @@ public:
uint16 getHeight() const { return _surface->h; }
uint32 getFrameCount() const { return _frameCount; }
uint32 getElapsedTime() const;
- const Surface *decodeNextFrame();
- PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
+ const Graphics::Surface *decodeNextFrame();
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
const byte *getPalette() { _dirtyPalette = false; return _palette; }
bool hasDirtyPalette() const { return _dirtyPalette; }
virtual void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize);
@@ -124,7 +124,7 @@ protected:
Common::Rational _frameRate;
uint32 _frameCount;
- Surface *_surface;
+ Graphics::Surface *_surface;
Audio::Mixer::SoundType _soundType;
Audio::Mixer *_mixer;
@@ -138,6 +138,6 @@ protected:
BigHuffmanTree *_TypeTree;
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index 94e31b6323..739f1d3b93 100644
--- a/video/video_decoder.cpp
+++ b/video/video_decoder.cpp
@@ -28,7 +28,7 @@
#include "common/file.h"
#include "common/system.h"
-namespace Graphics {
+namespace Video {
VideoDecoder::VideoDecoder() {
reset();
@@ -138,4 +138,4 @@ uint VideoTimestamp::getUnitsInScale(uint scale) const {
return (_scale == scale) ? _units : _units * scale / _scale;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/video_decoder.h b/video/video_decoder.h
index 5d07753809..aa88dda4a4 100644
--- a/video/video_decoder.h
+++ b/video/video_decoder.h
@@ -37,7 +37,7 @@ namespace Common {
class SeekableReadStream;
}
-namespace Graphics {
+namespace Video {
/**
* Implementation of a generic video decoder
@@ -109,12 +109,12 @@ public:
* @note the return surface should *not* be freed
* @note this may return 0, in which case the last frame should be kept on screen
*/
- virtual const Surface *decodeNextFrame() = 0;
+ virtual const Graphics::Surface *decodeNextFrame() = 0;
/**
* Get the pixel format of the video
*/
- virtual PixelFormat getPixelFormat() const = 0;
+ virtual Graphics::PixelFormat getPixelFormat() const = 0;
/**
* Get the palette for the video in RGB format (if 8bpp or less)
@@ -285,6 +285,6 @@ public:
virtual void rewind() { seekToTime(0); }
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif