aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur
diff options
context:
space:
mode:
authorPaul Gilbert2013-12-30 10:25:46 +1100
committerPaul Gilbert2013-12-30 10:25:46 +1100
commit485c19b569bce6b69dd8b90c5304dca334f9ddc5 (patch)
treee49eb7a3046b11c7300c453de05b8ebf035dced4 /engines/voyeur
parentf1686fcf16de1ed3303369f6f3b4c29daeb25d44 (diff)
downloadscummvm-rg350-485c19b569bce6b69dd8b90c5304dca334f9ddc5.tar.gz
scummvm-rg350-485c19b569bce6b69dd8b90c5304dca334f9ddc5.tar.bz2
scummvm-rg350-485c19b569bce6b69dd8b90c5304dca334f9ddc5.zip
VOYEUR: Clean up playAVideoDuration
Diffstat (limited to 'engines/voyeur')
-rw-r--r--engines/voyeur/events.cpp3
-rw-r--r--engines/voyeur/events.h3
-rw-r--r--engines/voyeur/files.cpp30
-rw-r--r--engines/voyeur/files.h24
-rw-r--r--engines/voyeur/voyeur.cpp2
-rw-r--r--engines/voyeur/voyeur_game.cpp2
6 files changed, 29 insertions, 35 deletions
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp
index 890eaeaf23..61c37a6db9 100644
--- a/engines/voyeur/events.cpp
+++ b/engines/voyeur/events.cpp
@@ -74,6 +74,9 @@ EventsManager::EventsManager(): _intPtr(_gameData),
_priorFrameTime = g_system->getMillis();
_joe = 0;
Common::fill(&_keyState[0], &_keyState[256], false);
+ Common::fill(&_cycleTime[0], &_cycleTime[4], 0);
+ Common::fill(&_cycleNext[0], &_cycleNext[4], 0);
+ _cyclePtr = NULL;
_leftClick = _rightClick = false;
_mouseClicked = _mouseUnk = false;
diff --git a/engines/voyeur/events.h b/engines/voyeur/events.h
index 487d59e94d..99f583a2d0 100644
--- a/engines/voyeur/events.h
+++ b/engines/voyeur/events.h
@@ -162,6 +162,9 @@ private:
int _mouseButton;
Common::List<IntNode *> _intNodes;
Common::Point _mousePos;
+ int _cycleTime[4];
+ int _cycleNext[4];
+ VInitCycleResource *_cyclePtr;
void mainVoyeurIntFunc();
private:
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp
index 9d86c66c2e..d02c5ce577 100644
--- a/engines/voyeur/files.cpp
+++ b/engines/voyeur/files.cpp
@@ -549,7 +549,7 @@ void BVoyBoltFile::vInitCMap() {
void BVoyBoltFile::vInitCycl() {
initDefault();
_state._vm->_eventsManager.vStopCycle();
- _state._curMemberPtr->_vInitCyclResource = new VInitCyclResource(
+ _state._curMemberPtr->_vInitCycleResource = new VInitCycleResource(
_state, _state._curMemberPtr->_data);
}
@@ -647,11 +647,10 @@ BoltEntry::BoltEntry(Common::SeekableReadStream *f): _file(f) {
_fontResource = nullptr;
_fontInfoResource = nullptr;
_cMapResource = nullptr;
- _vInitCyclResource = nullptr;
+ _vInitCycleResource = nullptr;
_ptrResource = nullptr;
_controlResource = nullptr;
- _vInitCyclResource = nullptr;
- _cycleResource = nullptr;
+ _vInitCycleResource = nullptr;
_threadResource = nullptr;
byte buffer[16];
@@ -673,8 +672,7 @@ BoltEntry::~BoltEntry() {
delete _fontResource;
delete _fontInfoResource;
delete _cMapResource;
- delete _vInitCyclResource;
- delete _cycleResource;
+ delete _vInitCycleResource;
delete _ptrResource;
delete _controlResource;
}
@@ -690,7 +688,7 @@ void BoltEntry::load() {
bool BoltEntry::hasResource() const {
return _rectResource || _picResource || _viewPortResource || _viewPortListResource
|| _fontResource || _fontInfoResource || _cMapResource
- || _vInitCyclResource || _cycleResource
+ || _vInitCycleResource
|| _ptrResource || _controlResource || _threadResource;
}
@@ -1410,12 +1408,20 @@ void CMapResource::startFade() {
/*------------------------------------------------------------------------*/
-VInitCyclResource::VInitCyclResource(BoltFilesState &state, const byte *src) {
+VInitCycleResource::VInitCycleResource(BoltFilesState &state, const byte *src) {
for (int i = 0; i < 4; ++i) {
state._curLibPtr->resolveIt(READ_LE_UINT32(src + 8 + i * 4), &_ptr[i]);
}
}
+void VInitCycleResource::vStartCycle() {
+ error("TODO");
+}
+
+void VInitCycleResource::vStopCycle() {
+ error("TODO: vStopCycle");
+}
+
/*------------------------------------------------------------------------*/
PtrResource::PtrResource(BoltFilesState &state, const byte *src) {
@@ -1454,12 +1460,4 @@ ControlResource::ControlResource(BoltFilesState &state, const byte *src) {
/*------------------------------------------------------------------------*/
-void CycleResource::vStartCycle() {
- error("TODO: vStartCycle");
-}
-
-void CycleResource::vStopCycle() {
- error("TODO: vStopCycle");
-}
-
} // End of namespace Voyeur
diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h
index 832e157b7b..47a6df5c8f 100644
--- a/engines/voyeur/files.h
+++ b/engines/voyeur/files.h
@@ -41,10 +41,9 @@ class ViewPortResource;
class ViewPortListResource;
class FontResource;
class CMapResource;
-class VInitCyclResource;
+class VInitCycleResource;
class PtrResource;
class ControlResource;
-class CycleResource;
class ThreadResource;
#define DECOMPRESS_SIZE 0x7000
@@ -205,8 +204,7 @@ public:
FontResource *_fontResource;
FontInfoResource *_fontInfoResource;
CMapResource *_cMapResource;
- VInitCyclResource *_vInitCyclResource;
- CycleResource *_cycleResource; // TODO: Dup with VInit?
+ VInitCycleResource *_vInitCycleResource;
// stampblt.blt resource types
PtrResource *_ptrResource;
@@ -405,12 +403,15 @@ public:
void startFade();
};
-class VInitCyclResource {
+class VInitCycleResource {
public:
byte *_ptr[4];
public:
- VInitCyclResource(BoltFilesState &state, const byte *src);
- virtual ~VInitCyclResource() {}
+ VInitCycleResource(BoltFilesState &state, const byte *src);
+ virtual ~VInitCycleResource() {}
+
+ void vStartCycle();
+ void vStopCycle();
};
/* stampblt.blt resources */
@@ -433,15 +434,6 @@ public:
virtual ~ControlResource() {}
};
-class CycleResource {
-public:
- CycleResource(BoltFilesState &state, const byte *src) {}
- virtual ~CycleResource() {}
-
- void vStartCycle();
- void vStopCycle();
-};
-
class ThreadResource {
public:
static int _stampFlags;
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index edb7f4a8d5..4a51d89e1f 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -540,7 +540,6 @@ void VoyeurEngine::playAVideo(int videoId) {
}
void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
- byte *dataP = NULL;
int totalFrames = duration * 10;
if (videoId == -1)
@@ -550,7 +549,6 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
if (videoId == 42) {
_eventsManager._videoDead = 0;
pic = _bVoy->boltEntry(0xE00 + _eventsManager._videoDead)._picResource;
- warning("%xh", pic);
}
::Video::RL2Decoder decoder;
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index ba5123e121..89e48afb74 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -578,7 +578,7 @@ void VoyeurEngine::doTapePlaying() {
_graphicsManager.sDrawPic(pic, *_graphicsManager._vPort, Common::Point(57, 30));
flipPageAndWaitForFade();
- CycleResource *cycle = _bVoy->boltEntry(0xA05)._cycleResource;
+ VInitCycleResource *cycle = _bVoy->boltEntry(0xA05)._vInitCycleResource;
cycle->vStartCycle();
_soundManager.startVOCPlay("vcr.voc");