aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-02-03 23:44:50 -0500
committerPaul Gilbert2014-02-03 23:44:50 -0500
commitd5231aa862538bba94e456fd70fbdeb6a4b0f9ca (patch)
tree77edb9df6b795b76f633d6c427a554ec77b09ced
parent90b7d10a77cfd0ed43dd792d82d148211c9371c1 (diff)
downloadscummvm-rg350-d5231aa862538bba94e456fd70fbdeb6a4b0f9ca.tar.gz
scummvm-rg350-d5231aa862538bba94e456fd70fbdeb6a4b0f9ca.tar.bz2
scummvm-rg350-d5231aa862538bba94e456fd70fbdeb6a4b0f9ca.zip
VOYEUR: Moved RL2Decoder into Voyeur namespace, and merged with VoyeurRL2Decoder
-rw-r--r--engines/voyeur/animation.cpp12
-rw-r--r--engines/voyeur/animation.h15
-rw-r--r--engines/voyeur/voyeur.cpp8
-rw-r--r--engines/voyeur/voyeur_game.cpp4
4 files changed, 11 insertions, 28 deletions
diff --git a/engines/voyeur/animation.cpp b/engines/voyeur/animation.cpp
index 855536bea1..57a64945db 100644
--- a/engines/voyeur/animation.cpp
+++ b/engines/voyeur/animation.cpp
@@ -29,7 +29,7 @@
#include "audio/decoders/raw.h"
#include "graphics/surface.h"
-namespace Video {
+namespace Voyeur {
// Number of audio frames to keep audio track topped up when playing back video
#define SOUND_FRAMES_READAHEAD 3
@@ -467,13 +467,7 @@ Audio::AudioStream *RL2Decoder::RL2AudioTrack::getAudioStream() const {
return _audStream;
}
-} // End of namespace Video
-
-/*------------------------------------------------------------------------*/
-
-namespace Voyeur {
-
-void VoyeurRL2Decoder::play(VoyeurEngine *vm, int resourceOffset,
+void RL2Decoder::play(VoyeurEngine *vm, int resourceOffset,
byte *frames, byte *imgPos) {
vm->flipPageAndWait();
int paletteStart = getPaletteStart();
@@ -513,4 +507,4 @@ void VoyeurRL2Decoder::play(VoyeurEngine *vm, int resourceOffset,
}
}
-} // End of namespace Video
+} // End of namespace Voyeur
diff --git a/engines/voyeur/animation.h b/engines/voyeur/animation.h
index bfa9c8c8ae..30d60827a2 100644
--- a/engines/voyeur/animation.h
+++ b/engines/voyeur/animation.h
@@ -37,17 +37,13 @@ namespace Voyeur {
class VoyeurEngine;
-}
-
-namespace Video {
-
/**
* Decoder for RL2 videos.
*
* Video decoder used in engines:
* - voyeur
*/
-class RL2Decoder : public VideoDecoder {
+class RL2Decoder : public Video::VideoDecoder {
private:
class RL2FileHeader {
public:
@@ -180,14 +176,7 @@ public:
int getPaletteStart() const { return _paletteStart; }
int getPaletteCount() const { return _header._colorCount; }
const RL2FileHeader &getHeader() { return _header; }
-};
-
-} // End of namespace Video
-namespace Voyeur {
-
-class VoyeurRL2Decoder: public Video::RL2Decoder {
-public:
/**
* Play back a given Voyeur RL2 video
* @param vm Engine reference
@@ -198,6 +187,6 @@ public:
void play(VoyeurEngine *vm, int resourceOffset = 0, byte *frames = NULL, byte *imgPos = NULL);
};
-}
+} // End of namespace Voyeur
#endif /* VOYEUR_ANIMATION_H */
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 150d567638..177ee552f0 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -470,7 +470,7 @@ void VoyeurEngine::doOpening() {
(*_graphicsManager._vPort)->setupViewPort();
flipPageAndWait();
- ::Video::RL2Decoder decoder;
+ RL2Decoder decoder;
decoder.loadFile("a2300100.rl2");
decoder.start();
@@ -486,7 +486,7 @@ void VoyeurEngine::doOpening() {
Common::copy((const byte *)frame->getPixels(), (const byte *)frame->getPixels() + 320 * 200,
(byte *)_graphicsManager._screenSurface.getPixels());
- if (decoder.getCurFrame() >= READ_LE_UINT32(frameTable + frameIndex * 4)) {
+ if (decoder.getCurFrame() >= (int32)READ_LE_UINT32(frameTable + frameIndex * 4)) {
if (creditShow) {
// Show a credit
textPic = _bVoy->boltEntry(frameIndex / 2 + 0x202)._picResource;
@@ -524,7 +524,7 @@ void VoyeurEngine::doOpening() {
}
void VoyeurEngine::playRL2Video(const Common::String &filename) {
- ::Video::RL2Decoder decoder;
+ RL2Decoder decoder;
decoder.loadFile(filename);
decoder.start();
@@ -562,7 +562,7 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
pic = _bVoy->boltEntry(0xE00 + _eventsManager._videoDead)._picResource;
}
- ::Video::RL2Decoder decoder;
+ RL2Decoder decoder;
decoder.loadVideo(videoId);
decoder.start();
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index 3e3239749d..cfd0b6083a 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -233,7 +233,7 @@ void VoyeurEngine::doTailTitle() {
_graphicsManager.screenReset();
if (_bVoy->getBoltGroup(0x600)) {
- VoyeurRL2Decoder decoder;
+ RL2Decoder decoder;
decoder.loadFile("a1100200.rl2");
decoder.start();
decoder.play(this);
@@ -743,7 +743,7 @@ void VoyeurEngine::doGossip() {
return;
// Load the gossip animation
- VoyeurRL2Decoder decoder;
+ RL2Decoder decoder;
decoder.loadFile("a2050100.rl2", false);
decoder.start();