mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
VOYEUR: Implemented sWaitFlip
This commit is contained in:
parent
a6c852c99d
commit
8b6d3169cc
@ -49,4 +49,26 @@ void EventsManager::vStopCycle() {
|
||||
_cycleStatus &= 2;
|
||||
}
|
||||
|
||||
void EventsManager::sWaitFlip() {
|
||||
// TODO: See if this needs a proper wait loop with event polling
|
||||
//while (_intPtr._field39) ;
|
||||
|
||||
Common::Array<ViewPortResource *> &viewPorts = *_vm->_graphicsManager._viewPortListPtr;
|
||||
for (uint idx = 0; idx < viewPorts.size(); ++idx) {
|
||||
ViewPortResource &viewPort = *viewPorts[idx];
|
||||
|
||||
if (_vm->_graphicsManager._saveBack && (viewPort._flags & 0x40)) {
|
||||
Common::Rect *clipPtr = _vm->_graphicsManager._clipPtr;
|
||||
_vm->_graphicsManager._clipPtr = &viewPort._clipRect;
|
||||
|
||||
if (viewPort._restoreFn)
|
||||
(_vm->_graphicsManager.*viewPort._restoreFn)(&viewPort);
|
||||
|
||||
_vm->_graphicsManager._clipPtr = clipPtr;
|
||||
viewPort._field40[viewPort._pageIndex] = 0;
|
||||
viewPort._flags &= 0xFFBF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Voyeur
|
||||
|
@ -36,6 +36,7 @@ private:
|
||||
|
||||
static void mainVoyeurIntFunc();
|
||||
public:
|
||||
IntData _intPtr;
|
||||
IntNode _fadeIntNode;
|
||||
IntNode _cycleIntNode;
|
||||
IntNode _evintnode;
|
||||
@ -48,6 +49,7 @@ public:
|
||||
void resetMouse();
|
||||
void startMainClockInt();
|
||||
void vStopCycle();
|
||||
void sWaitFlip();
|
||||
};
|
||||
|
||||
} // End of namespace Voyeur
|
||||
|
@ -618,7 +618,9 @@ ViewPortResource::ViewPortResource(BoltFilesState &state, const byte *src):
|
||||
state._curLibPtr->resolveIt(READ_LE_UINT32(src + 0x38), &_field38);
|
||||
state._curLibPtr->resolveIt(READ_LE_UINT32(src + 0x3C), &_field3C);
|
||||
|
||||
_field42 = (int16)READ_LE_UINT16(src + 0x42);
|
||||
for (int i = 0; i < 3; ++i)
|
||||
_field40[i] = (int16)READ_LE_UINT16(src + 0x40 + 2 * i);
|
||||
|
||||
xs = READ_LE_UINT16(src + 0x46);
|
||||
ys = READ_LE_UINT16(src + 0x48);
|
||||
_clipRect = Common::Rect(xs, ys, xs + READ_LE_UINT16(src + 0x4A),
|
||||
|
@ -235,7 +235,7 @@ public:
|
||||
byte *_field34;
|
||||
byte *_field38;
|
||||
byte *_field3C;
|
||||
int16 _field42;
|
||||
int16 _field40[3];
|
||||
Common::Rect _clipRect;
|
||||
byte *_field7A;
|
||||
GraphicMethodPtr _fn1;
|
||||
|
@ -24,6 +24,10 @@
|
||||
|
||||
namespace Voyeur {
|
||||
|
||||
IntData::IntData() {
|
||||
_field9 = false;
|
||||
}
|
||||
|
||||
void IntData::audioInit() {
|
||||
|
||||
}
|
||||
|
@ -111,9 +111,12 @@ public:
|
||||
|
||||
class IntData {
|
||||
public:
|
||||
bool _field9;
|
||||
byte *_colors;
|
||||
Common::List<IntNode *> _intNodes;
|
||||
public:
|
||||
IntData();
|
||||
|
||||
void audioInit();
|
||||
void addIntNode(IntNode *node);
|
||||
|
||||
|
@ -53,7 +53,7 @@ void GraphicsManager::addFadeInt() {
|
||||
node._curTime = 0;
|
||||
node._timeReset = 1;
|
||||
|
||||
_vm->_intPtr.addIntNode(&node);
|
||||
_vm->_eventsManager._intPtr.addIntNode(&node);
|
||||
}
|
||||
|
||||
void GraphicsManager::vInitColor() {
|
||||
@ -63,15 +63,15 @@ void GraphicsManager::vInitColor() {
|
||||
}
|
||||
|
||||
void GraphicsManager::fadeIntFunc() {
|
||||
|
||||
// TODO: more
|
||||
}
|
||||
|
||||
void GraphicsManager::vDoFadeInt() {
|
||||
|
||||
// TODO: more
|
||||
}
|
||||
|
||||
void GraphicsManager::vDoCycleInt() {
|
||||
|
||||
// TODO: more
|
||||
}
|
||||
|
||||
void GraphicsManager::setupMCGASaveRect(ViewPortResource *viewPort) {
|
||||
@ -87,7 +87,7 @@ void GraphicsManager::setupMCGASaveRect(ViewPortResource *viewPort) {
|
||||
_clipPtr = clipRect;
|
||||
}
|
||||
|
||||
viewPort->_field42 = -1;
|
||||
viewPort->_field40[1] = -1;
|
||||
}
|
||||
|
||||
void GraphicsManager::addRectOptSaveRect(ViewPortResource *viewPort, int y, Common::Rect *bounds) {
|
||||
@ -99,7 +99,7 @@ void GraphicsManager::restoreMCGASaveRect(ViewPortResource *viewPort) {
|
||||
}
|
||||
|
||||
void GraphicsManager::addRectNoSaveBack(ViewPortResource *viewPort, int y, Common::Rect *bounds) {
|
||||
|
||||
// TODO: more
|
||||
}
|
||||
|
||||
void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay,
|
||||
@ -313,8 +313,4 @@ void GraphicsManager::flipPage() {
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsManager::sWaitFlip() {
|
||||
|
||||
}
|
||||
|
||||
} // End of namespace Voyeur
|
||||
|
@ -87,7 +87,6 @@ public:
|
||||
void sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay, const Common::Point &offset, void *v3);
|
||||
void sDisplayPic(PictureResource *pic);
|
||||
void flipPage();
|
||||
void sWaitFlip();
|
||||
};
|
||||
|
||||
} // End of namespace Voyeur
|
||||
|
@ -131,7 +131,7 @@ void VoyeurEngine::initBolt() {
|
||||
}
|
||||
|
||||
void VoyeurEngine::vInitInterrupts() {
|
||||
_intPtr._colors = &_graphicsManager._VGAColors[0];
|
||||
_eventsManager._intPtr._colors = &_graphicsManager._VGAColors[0];
|
||||
}
|
||||
|
||||
void VoyeurEngine::initInput() {
|
||||
@ -147,7 +147,7 @@ void VoyeurEngine::doHeadTitle() {
|
||||
(*_graphicsManager._vPort)->_flags |= 8;
|
||||
|
||||
_graphicsManager.flipPage();
|
||||
_graphicsManager.sWaitFlip();
|
||||
_eventsManager.sWaitFlip();
|
||||
|
||||
// TODO:
|
||||
}
|
||||
|
@ -79,7 +79,6 @@ protected:
|
||||
virtual Common::Error run();
|
||||
virtual bool hasFeature(EngineFeature f) const;
|
||||
public:
|
||||
IntData _intPtr;
|
||||
EventsManager _eventsManager;
|
||||
FilesManager _filesManager;
|
||||
GraphicsManager _graphicsManager;
|
||||
|
Loading…
x
Reference in New Issue
Block a user