mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
VOYEUR: Clean up playAVideoDuration
This commit is contained in:
parent
f1686fcf16
commit
485c19b569
@ -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;
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user