aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/gob/demos/demoplayer.cpp4
-rw-r--r--engines/gob/module.mk2
-rw-r--r--engines/gob/videoplayer.cpp40
-rw-r--r--engines/gob/videoplayer.h21
-rw-r--r--graphics/module.mk4
-rw-r--r--graphics/video/coktelvideo.cpp (renamed from engines/gob/coktelvideo.cpp)10
-rw-r--r--graphics/video/coktelvideo.h (renamed from engines/gob/coktelvideo.h)10
-rw-r--r--graphics/video/indeo3.cpp (renamed from engines/gob/indeo3.cpp)10
-rw-r--r--graphics/video/indeo3.h (renamed from engines/gob/indeo3.h)10
-rw-r--r--graphics/video/indeo3data.h (renamed from engines/gob/indeo3data.h)4
10 files changed, 58 insertions, 57 deletions
diff --git a/engines/gob/demos/demoplayer.cpp b/engines/gob/demos/demoplayer.cpp
index e130f875b4..f05e1e4aac 100644
--- a/engines/gob/demos/demoplayer.cpp
+++ b/engines/gob/demos/demoplayer.cpp
@@ -94,7 +94,7 @@ void DemoPlayer::playVideo(const char *fileName) {
if (_vm->_vidPlayer->primaryOpen(file)) {
bool videoSupportsDouble =
- ((_vm->_vidPlayer->getFeatures() & CoktelVideo::kFeaturesSupportsDouble) != 0);
+ ((_vm->_vidPlayer->getFeatures() & Graphics::CoktelVideo::kFeaturesSupportsDouble) != 0);
if (_doubleMode) {
if (videoSupportsDouble) {
@@ -130,7 +130,7 @@ void DemoPlayer::playVideoDoubled() {
if (_vm->_vidPlayer->primaryPlay(i, i))
break;
- CoktelVideo::State state = _vm->_vidPlayer->getState();
+ Graphics::CoktelVideo::State state = _vm->_vidPlayer->getState();
int16 w = state.right - state.left + 1;
int16 h = state.bottom - state.top + 1;
diff --git a/engines/gob/module.mk b/engines/gob/module.mk
index f1c8169b3c..3cc16fa5fd 100644
--- a/engines/gob/module.mk
+++ b/engines/gob/module.mk
@@ -21,8 +21,6 @@ MODULE_OBJS := \
goblin_v2.o \
goblin_v3.o \
goblin_v4.o \
- indeo3.o \
- coktelvideo.o \
videoplayer.o \
init.o \
init_v1.o \
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 9b3724428a..c392e25db1 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -60,11 +60,11 @@ bool VideoPlayer::Video::open(const char *fileName, Type which) {
_stream = _vm->_dataIO->openAsStream(handle, true);
if (which == kVideoTypeIMD) {
- _video = new Imd();
+ _video = new Graphics::Imd();
} else if (which == kVideoTypeVMD) {
- _video = new Vmd(_vm->_video->_palLUT);
+ _video = new Graphics::Vmd(_vm->_video->_palLUT);
} else if (which == kVideoTypeRMD) {
- _video = new Vmd(_vm->_video->_palLUT);
+ _video = new Graphics::Vmd(_vm->_video->_palLUT);
} else {
warning("Couldn't open video \"%s\": Invalid video Type", fileName);
close();
@@ -93,7 +93,7 @@ void VideoPlayer::Video::close() {
_video = 0;
_stream = 0;
_fileName = 0;
- memset(&_state, 0, sizeof(CoktelVideo::State));
+ memset(&_state, 0, sizeof(Graphics::CoktelVideo::State));
_defaultX = _defaultY = 0;
}
@@ -105,11 +105,11 @@ const char *VideoPlayer::Video::getFileName() const {
return _fileName ? _fileName : "";
}
-CoktelVideo *VideoPlayer::Video::getVideo() {
+Graphics::CoktelVideo *VideoPlayer::Video::getVideo() {
return _video;
}
-const CoktelVideo *VideoPlayer::Video::getVideo() const {
+const Graphics::CoktelVideo *VideoPlayer::Video::getVideo() const {
return _video;
}
@@ -117,7 +117,7 @@ uint32 VideoPlayer::Video::getFeatures() const {
return _video->getFeatures();
}
-CoktelVideo::State VideoPlayer::Video::getState() const {
+Graphics::CoktelVideo::State VideoPlayer::Video::getState() const {
return _state;
}
@@ -143,7 +143,7 @@ Common::MemoryReadStream *VideoPlayer::Video::getExtraData(const char *fileName)
return _video->getExtraData(fileName);
}
-CoktelVideo::State VideoPlayer::Video::nextFrame() {
+Graphics::CoktelVideo::State VideoPlayer::Video::nextFrame() {
if (_video)
_state = _video->nextFrame();
@@ -296,7 +296,7 @@ bool VideoPlayer::primaryPlay(int16 startFrame, int16 lastFrame, int16 breakKey,
if (!_primaryVideo->isOpen())
return false;
- CoktelVideo &video = *(_primaryVideo->getVideo());
+ Graphics::CoktelVideo &video = *(_primaryVideo->getVideo());
breakKey = 27;
if (startFrame < 0)
@@ -310,7 +310,7 @@ bool VideoPlayer::primaryPlay(int16 startFrame, int16 lastFrame, int16 breakKey,
palCmd &= 0x3F;
if (video.getCurrentFrame() != startFrame) {
- if (!forceSeek && (video.getFeatures() & CoktelVideo::kFeaturesSound))
+ if (!forceSeek && (video.getFeatures() & Graphics::CoktelVideo::kFeaturesSound))
startFrame = video.getCurrentFrame();
else
video.seekFrame(startFrame);
@@ -415,7 +415,7 @@ void VideoPlayer::slotPlay(int slot, int16 frame) {
if ((slot < 0) || (((uint) slot) >= _videoSlots.size()) || !_videoSlots[slot])
return;
- CoktelVideo &video = *(_videoSlots[slot]->getVideo());
+ Graphics::CoktelVideo &video = *(_videoSlots[slot]->getVideo());
if (frame < 0)
frame = video.getCurrentFrame();
@@ -462,9 +462,9 @@ void VideoPlayer::slotWaitEndFrame(int slot, bool onlySound) {
if ((slot < 0) || (((uint) slot) >= _videoSlots.size()) || !_videoSlots[slot])
return;
- CoktelVideo &video = *(_videoSlots[slot]->getVideo());
+ Graphics::CoktelVideo &video = *(_videoSlots[slot]->getVideo());
- if (!onlySound || (video.getFeatures() & CoktelVideo::kFeaturesSound))
+ if (!onlySound || (video.getFeatures() & Graphics::CoktelVideo::kFeaturesSound))
video.waitEndFrame();
}
@@ -583,9 +583,9 @@ uint32 VideoPlayer::getFeatures(int slot) const {
return 0;
}
-CoktelVideo::State VideoPlayer::getState(int slot) const {
+Graphics::CoktelVideo::State VideoPlayer::getState(int slot) const {
const Video *video = getVideoBySlot(slot);
- CoktelVideo::State state;
+ Graphics::CoktelVideo::State state;
if (video)
state = video->getState();
@@ -632,7 +632,7 @@ bool VideoPlayer::doPlay(int16 frame, int16 breakKey,
if (_needBlit)
_vm->_draw->forceBlit();
- CoktelVideo::State state = _primaryVideo->nextFrame();
+ Graphics::CoktelVideo::State state = _primaryVideo->nextFrame();
WRITE_VAR(11, frame);
if (_needBlit)
@@ -647,7 +647,7 @@ bool VideoPlayer::doPlay(int16 frame, int16 breakKey,
_vm->_video->dirtyRectsAll();
}
- if ((state.flags & CoktelVideo::kStatePalette) && (palCmd > 1)) {
+ if ((state.flags & Graphics::CoktelVideo::kStatePalette) && (palCmd > 1)) {
copyPalette(*(_primaryVideo->getVideo()), palStart, palEnd);
if (!_backSurf)
@@ -693,8 +693,8 @@ bool VideoPlayer::doPlay(int16 frame, int16 breakKey,
return false;
}
-void VideoPlayer::copyPalette(CoktelVideo &video, int16 palStart, int16 palEnd) {
- if (!(video.getFeatures() & CoktelVideo::kFeaturesPalette))
+void VideoPlayer::copyPalette(Graphics::CoktelVideo &video, int16 palStart, int16 palEnd) {
+ if (!(video.getFeatures() & Graphics::CoktelVideo::kFeaturesPalette))
return;
if (palStart < 0)
@@ -737,7 +737,7 @@ void VideoPlayer::writeVideoInfo(const char *videoFile, int16 varX, int16 varY,
}
}
-void VideoPlayer::evalBgShading(CoktelVideo &video) {
+void VideoPlayer::evalBgShading(Graphics::CoktelVideo &video) {
if (video.isSoundPlaying())
_vm->_sound->bgShade();
else
diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h
index 07837eb6c2..ba4b3bb989 100644
--- a/engines/gob/videoplayer.h
+++ b/engines/gob/videoplayer.h
@@ -28,7 +28,8 @@
#include "common/array.h"
-#include "gob/coktelvideo.h"
+#include "graphics/video/coktelvideo.h"
+
#include "gob/dataio.h"
namespace Gob {
@@ -85,7 +86,7 @@ public:
int16 getDefaultX(int slot = -1) const;
int16 getDefaultY(int slot = -1) const;
- CoktelVideo::State getState(int slot = -1) const;
+ Graphics::CoktelVideo::State getState(int slot = -1) const;
uint32 getFeatures(int slot = -1) const;
bool hasExtraData(const char *fileName, int slot = -1) const;
@@ -108,10 +109,10 @@ private:
bool isOpen() const;
const char *getFileName() const;
- CoktelVideo *getVideo();
- const CoktelVideo *getVideo() const;
+ Graphics::CoktelVideo *getVideo();
+ const Graphics::CoktelVideo *getVideo() const;
- CoktelVideo::State getState() const;
+ Graphics::CoktelVideo::State getState() const;
uint32 getFeatures() const;
int16 getDefaultX() const;
@@ -120,15 +121,15 @@ private:
bool hasExtraData(const char *fileName) const;
Common::MemoryReadStream *getExtraData(const char *fileName);
- CoktelVideo::State nextFrame();
+ Graphics::CoktelVideo::State nextFrame();
private:
GobEngine *_vm;
char *_fileName;
DataStream *_stream;
- CoktelVideo *_video;
- CoktelVideo::State _state;
+ Graphics::CoktelVideo *_video;
+ Graphics::CoktelVideo::State _state;
int16 _defaultX, _defaultY;
};
@@ -149,11 +150,11 @@ private:
int getNextFreeSlot();
- void copyPalette(CoktelVideo &video, int16 palStart = -1, int16 palEnd = -1);
+ void copyPalette(Graphics::CoktelVideo &video, int16 palStart = -1, int16 palEnd = -1);
bool doPlay(int16 frame, int16 breakKey,
uint16 palCmd, int16 palStart, int16 palEnd,
int16 palFrame, int16 endFrame);
- void evalBgShading(CoktelVideo &video);
+ void evalBgShading(Graphics::CoktelVideo &video);
};
} // End of namespace Gob
diff --git a/graphics/module.mk b/graphics/module.mk
index 75aea2b7da..edbceb0633 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -22,7 +22,9 @@ MODULE_OBJS := \
video/flic_player.o \
video/mpeg_player.o \
video/smk_player.o \
- video/video_player.o
+ video/video_player.o \
+ video/indeo3.o \
+ video/coktelvideo.o
ifndef DISABLE_SCALERS
MODULE_OBJS += \
diff --git a/engines/gob/coktelvideo.cpp b/graphics/video/coktelvideo.cpp
index 55b5e61c31..19a0bfe5af 100644
--- a/engines/gob/coktelvideo.cpp
+++ b/graphics/video/coktelvideo.cpp
@@ -25,12 +25,12 @@
#include "common/endian.h"
#include "common/system.h"
-#include "graphics/dither.h"
-#include "gob/coktelvideo.h"
-#include "gob/indeo3.h"
+#include "graphics/dither.h"
+#include "graphics/video/coktelvideo.h"
+#include "graphics/video/indeo3.h"
-namespace Gob {
+namespace Graphics {
Imd::Imd() {
clear(false);
@@ -1834,4 +1834,4 @@ Common::MemoryReadStream *Vmd::getExtraData(const char *fileName) {
return stream;
}
-} // End of namespace Gob
+} // End of namespace Graphics
diff --git a/engines/gob/coktelvideo.h b/graphics/video/coktelvideo.h
index c2590dc503..58b56e18ec 100644
--- a/engines/gob/coktelvideo.h
+++ b/graphics/video/coktelvideo.h
@@ -23,8 +23,8 @@
*
*/
-#ifndef GOB_COKTELVIDEO_H
-#define GOB_COKTELVIDEO_H
+#ifndef GRAPHICS_VIDEO_COKTELVIDEO_H
+#define GRAPHICS_VIDEO_COKTELVIDEO_H
#include "common/stream.h"
#include "common/array.h"
@@ -32,7 +32,7 @@
#include "sound/mixer.h"
#include "sound/audiostream.h"
-namespace Gob {
+namespace Graphics {
class Indeo3;
@@ -412,6 +412,6 @@ protected:
void deADPCM(byte *soundBuf, byte *dataBuf, int16 &init, uint32 n);
};
-} // End of namespace Gob
+} // End of namespace Graphics
-#endif // GOB_COKTELVIDEO_H
+#endif // GRAPHICS_VIDEO_COKTELVIDEO_H
diff --git a/engines/gob/indeo3.cpp b/graphics/video/indeo3.cpp
index e7cd4aa594..0e0bd757a2 100644
--- a/engines/gob/indeo3.cpp
+++ b/graphics/video/indeo3.cpp
@@ -33,12 +33,12 @@
#include "common/endian.h"
#include "common/frac.h"
#include "common/file.h"
-#include "graphics/dither.h"
-#include "gob/indeo3.h"
-#include "gob/indeo3data.h"
+#include "graphics/dither.h"
+#include "graphics/video/indeo3.h"
+#include "graphics/video/indeo3data.h"
-namespace Gob {
+namespace Graphics {
Indeo3::Indeo3(int16 width, int16 height, Graphics::PaletteLUT *palLUT) {
assert((width > 0) && (height > 0));
@@ -1148,4 +1148,4 @@ void Indeo3::decodeChunk(byte *cur, byte *ref, int width, int height,
}
}
-} // End of namespace Gob
+} // End of namespace Graphics
diff --git a/engines/gob/indeo3.h b/graphics/video/indeo3.h
index 339581e2ea..c417a543ec 100644
--- a/engines/gob/indeo3.h
+++ b/graphics/video/indeo3.h
@@ -30,8 +30,8 @@
* written, produced, and directed by Alan Smithee
*/
-#ifndef GOB_INDEO3_H
-#define GOB_INDEO3_H
+#ifndef GRAPHICS_VIDEO_INDEO3_H
+#define GRAPHICS_VIDEO_INDEO3_H
#include "common/stream.h"
@@ -40,7 +40,7 @@ namespace Graphics {
class SierraLight;
}
-namespace Gob {
+namespace Graphics {
class Indeo3 {
public:
@@ -115,6 +115,6 @@ private:
void blitLineDither(BlitState &s);
};
-} // End of namespace Gob
+} // End of namespace Graphics
-#endif // GOB_INDEO3_H
+#endif // GRAPHICS_VIDEO_INDEO3_H
diff --git a/engines/gob/indeo3data.h b/graphics/video/indeo3data.h
index 655ae79335..d941813194 100644
--- a/engines/gob/indeo3data.h
+++ b/graphics/video/indeo3data.h
@@ -30,7 +30,7 @@
* written, produced, and directed by Alan Smithee
*/
-namespace Gob {
+namespace Graphics {
const int Indeo3::_corrector_type_0[24] = {
195, 159, 133, 115, 101, 93, 87, 77,
@@ -2355,4 +2355,4 @@ const uint32 Indeo3::correctionhighorder[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
};
-} // End of namespace Gob
+} // End of namespace Graphics