mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
VOYEUR: Simplify the use of _vPort
This commit is contained in:
parent
ef69ac9f2f
commit
540566443f
@ -242,7 +242,7 @@ void SVoy::reviewAnEvidEvent(int eventIndex) {
|
||||
if (_vm->_bVoy->getBoltGroup(_vm->_playStampGroupId)) {
|
||||
_vm->_graphicsManager->_backColors = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 1)._cMapResource;
|
||||
_vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry(_vm->_playStampGroupId)._picResource;
|
||||
(*_vm->_graphicsManager->_vPort)->setupViewPort(_vm->_graphicsManager->_backgroundPage);
|
||||
_vm->_graphicsManager->_vPort->setupViewPort(_vm->_graphicsManager->_backgroundPage);
|
||||
_vm->_graphicsManager->_backColors->startFade();
|
||||
|
||||
_vm->doEvidDisplay(frameOff, e._dead);
|
||||
@ -264,7 +264,7 @@ void SVoy::reviewComputerEvent(int eventIndex) {
|
||||
if (_vm->_bVoy->getBoltGroup(_vm->_playStampGroupId)) {
|
||||
_vm->_graphicsManager->_backColors = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 1)._cMapResource;
|
||||
_vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry(_vm->_playStampGroupId)._picResource;
|
||||
(*_vm->_graphicsManager->_vPort)->setupViewPort(_vm->_graphicsManager->_backgroundPage);
|
||||
_vm->_graphicsManager->_vPort->setupViewPort(_vm->_graphicsManager->_backgroundPage);
|
||||
_vm->_graphicsManager->_backColors->startFade();
|
||||
_vm->flipPageAndWaitForFade();
|
||||
|
||||
|
@ -482,7 +482,7 @@ void BVoyBoltFile::initViewPortList() {
|
||||
_state, _state._curMemberPtr->_data);
|
||||
|
||||
_state._vm->_graphicsManager->_viewPortListPtr = res;
|
||||
_state._vm->_graphicsManager->_vPort = &res->_entries[0];
|
||||
_state._vm->_graphicsManager->_vPort = res->_entries[0];
|
||||
}
|
||||
|
||||
void BVoyBoltFile::initFontInfo() {
|
||||
@ -1351,21 +1351,21 @@ void ViewPortResource::fillPic(byte onOff) {
|
||||
|
||||
void ViewPortResource::drawIfaceTime() {
|
||||
// Hour display
|
||||
_state._vm->_graphicsManager->drawANumber(*_state._vm->_graphicsManager->_vPort,
|
||||
_state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort,
|
||||
(_state._vm->_gameHour / 10) == 0 ? 10 : _state._vm->_gameHour / 10,
|
||||
Common::Point(161, 25));
|
||||
_state._vm->_graphicsManager->drawANumber(*_state._vm->_graphicsManager->_vPort,
|
||||
_state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort,
|
||||
_state._vm->_gameHour % 10, Common::Point(172, 25));
|
||||
|
||||
// Minute display
|
||||
_state._vm->_graphicsManager->drawANumber(*_state._vm->_graphicsManager->_vPort,
|
||||
_state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort,
|
||||
_state._vm->_gameMinute / 10, Common::Point(190, 25));
|
||||
_state._vm->_graphicsManager->drawANumber(*_state._vm->_graphicsManager->_vPort,
|
||||
_state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort,
|
||||
_state._vm->_gameMinute % 10, Common::Point(201, 25));
|
||||
|
||||
// AM/PM indicator
|
||||
PictureResource *pic = _state._vm->_bVoy->boltEntry(_state._vm->_voy->_isAM ? 272 : 273)._picResource;
|
||||
_state._vm->_graphicsManager->sDrawPic(pic, *_state._vm->_graphicsManager->_vPort,
|
||||
_state._vm->_graphicsManager->sDrawPic(pic, _state._vm->_graphicsManager->_vPort,
|
||||
Common::Point(215, 27));
|
||||
}
|
||||
|
||||
|
@ -458,7 +458,7 @@ void ThreadResource::parsePlayCommands() {
|
||||
pic = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + i * 2)._picResource;
|
||||
pal = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + i * 2 + 1)._cMapResource;
|
||||
|
||||
(*_vm->_graphicsManager->_vPort)->setupViewPort(pic);
|
||||
_vm->_graphicsManager->_vPort->setupViewPort(pic);
|
||||
pal->startFade();
|
||||
|
||||
_vm->flipPageAndWaitForFade();
|
||||
@ -1038,7 +1038,7 @@ int ThreadResource::doApt() {
|
||||
// Draw the text description for the highlighted hotspot
|
||||
pic = _vm->_bVoy->boltEntry(_vm->_playStampGroupId +
|
||||
hotspotId + 6)._picResource;
|
||||
_vm->_graphicsManager->sDrawPic(pic, *_vm->_graphicsManager->_vPort,
|
||||
_vm->_graphicsManager->sDrawPic(pic, _vm->_graphicsManager->_vPort,
|
||||
Common::Point(106, 200));
|
||||
}
|
||||
|
||||
@ -1107,7 +1107,7 @@ void ThreadResource::doRoom() {
|
||||
|
||||
vm._graphicsManager->_backColors = vm._bVoy->boltEntry(vm._playStampGroupId + 1)._cMapResource;
|
||||
vm._graphicsManager->_backgroundPage = vm._bVoy->boltEntry(vm._playStampGroupId)._picResource;
|
||||
(*vm._graphicsManager->_vPort)->setupViewPort(vm._graphicsManager->_backgroundPage);
|
||||
vm._graphicsManager->_vPort->setupViewPort(vm._graphicsManager->_backgroundPage);
|
||||
vm._graphicsManager->_backColors->startFade();
|
||||
|
||||
voy._fadingStep1 = 2;
|
||||
@ -1232,7 +1232,7 @@ void ThreadResource::doRoom() {
|
||||
vm._graphicsManager->_backgroundPage = vm._bVoy->boltEntry(
|
||||
vm._playStampGroupId)._picResource;
|
||||
|
||||
(*vm._graphicsManager->_vPort)->setupViewPort();
|
||||
vm._graphicsManager->_vPort->setupViewPort();
|
||||
vm._graphicsManager->_backColors->startFade();
|
||||
_vm->flipPageAndWait();
|
||||
|
||||
@ -1414,20 +1414,20 @@ int ThreadResource::doInterface() {
|
||||
|
||||
// Regularly update the time display
|
||||
if (_vm->_voy->_RTANum & 2) {
|
||||
_vm->_graphicsManager->drawANumber(*_vm->_graphicsManager->_vPort,
|
||||
_vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort,
|
||||
_vm->_gameMinute / 10, Common::Point(190, 25));
|
||||
_vm->_graphicsManager->drawANumber(*_vm->_graphicsManager->_vPort,
|
||||
_vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort,
|
||||
_vm->_gameMinute % 10, Common::Point(201, 25));
|
||||
|
||||
if (_vm->_voy->_RTANum & 4) {
|
||||
int v = _vm->_gameHour / 10;
|
||||
_vm->_graphicsManager->drawANumber(*_vm->_graphicsManager->_vPort,
|
||||
_vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort,
|
||||
v == 0 ? 10 : v, Common::Point(161, 25));
|
||||
_vm->_graphicsManager->drawANumber(*_vm->_graphicsManager->_vPort,
|
||||
_vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort,
|
||||
_vm->_gameHour % 10, Common::Point(172, 25));
|
||||
|
||||
pic = _vm->_bVoy->boltEntry(_vm->_voy->_isAM ? 272 : 273)._picResource;
|
||||
_vm->_graphicsManager->sDrawPic(pic, *_vm->_graphicsManager->_vPort,
|
||||
_vm->_graphicsManager->sDrawPic(pic, _vm->_graphicsManager->_vPort,
|
||||
Common::Point(215, 27));
|
||||
}
|
||||
}
|
||||
@ -1595,13 +1595,13 @@ void ThreadResource::loadTheApt() {
|
||||
_vm->_voy->_aptLoadMode = -1;
|
||||
_vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry(
|
||||
_vm->_playStampGroupId + 5)._picResource;
|
||||
(*_vm->_graphicsManager->_vPort)->setupViewPort(
|
||||
_vm->_graphicsManager->_vPort->setupViewPort(
|
||||
_vm->_graphicsManager->_backgroundPage);
|
||||
} else {
|
||||
_vm->_bVoy->getBoltGroup(_vm->_playStampGroupId);
|
||||
_vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry(
|
||||
_vm->_playStampGroupId + 5)._picResource;
|
||||
(*_vm->_graphicsManager->_vPort)->setupViewPort(
|
||||
_vm->_graphicsManager->_vPort->setupViewPort(
|
||||
_vm->_graphicsManager->_backgroundPage);
|
||||
}
|
||||
|
||||
@ -1633,7 +1633,7 @@ void ThreadResource::freeTheApt() {
|
||||
_vm->_graphicsManager->resetPalette();
|
||||
}
|
||||
|
||||
(*_vm->_graphicsManager->_vPort)->setupViewPort(nullptr);
|
||||
_vm->_graphicsManager->_vPort->setupViewPort(nullptr);
|
||||
_vm->_bVoy->freeBoltGroup(_vm->_playStampGroupId);
|
||||
_vm->_playStampGroupId = -1;
|
||||
_vm->_voy->_viewBounds = nullptr;
|
||||
@ -1693,7 +1693,7 @@ void ThreadResource::doAptAnim(int mode) {
|
||||
|
||||
for (int idx = 0; (idx < 6) && !_vm->shouldQuit(); ++idx) {
|
||||
PictureResource *pic = _vm->_bVoy->boltEntry(id + idx + 1)._picResource;
|
||||
(*_vm->_graphicsManager->_vPort)->setupViewPort(pic);
|
||||
_vm->_graphicsManager->_vPort->setupViewPort(pic);
|
||||
pal->startFade();
|
||||
|
||||
_vm->flipPageAndWait();
|
||||
|
@ -991,8 +991,8 @@ void GraphicsManager::screenReset() {
|
||||
resetPalette();
|
||||
|
||||
_backgroundPage = NULL;
|
||||
(*_vPort)->setupViewPort(NULL);
|
||||
fillPic(*_vPort, 0);
|
||||
_vPort->setupViewPort(NULL);
|
||||
fillPic(_vPort, 0);
|
||||
|
||||
_vm->flipPageAndWait();
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
PictureResource *_backgroundPage;
|
||||
int _SVGAMode;
|
||||
ViewPortListResource *_viewPortListPtr;
|
||||
ViewPortResource **_vPort;
|
||||
ViewPortResource *_vPort;
|
||||
bool _saveBack;
|
||||
Common::Rect *_clipPtr;
|
||||
uint _planeSelect;
|
||||
|
@ -205,7 +205,7 @@ bool VoyeurEngine::doHeadTitle() {
|
||||
|
||||
void VoyeurEngine::showConversionScreen() {
|
||||
_graphicsManager->_backgroundPage = _bVoy->boltEntry(0x502)._picResource;
|
||||
(*_graphicsManager->_vPort)->setupViewPort();
|
||||
_graphicsManager->_vPort->setupViewPort();
|
||||
flipPageAndWait();
|
||||
|
||||
// Immediate palette load to show the initial screen
|
||||
@ -247,10 +247,10 @@ bool VoyeurEngine::doLock() {
|
||||
Common::Array<RectEntry> &hotspots = _bVoy->boltEntry(0x705)._rectResource->_entries;
|
||||
|
||||
assert(cursorPic);
|
||||
(*_graphicsManager->_vPort)->setupViewPort();
|
||||
_graphicsManager->_vPort->setupViewPort();
|
||||
|
||||
_graphicsManager->_backColors->startFade();
|
||||
(*_graphicsManager->_vPort)->_parent->_flags |= DISPFLAG_8;
|
||||
_graphicsManager->_vPort->_parent->_flags |= DISPFLAG_8;
|
||||
_graphicsManager->flipPage();
|
||||
_eventsManager->sWaitFlip();
|
||||
|
||||
@ -279,7 +279,7 @@ bool VoyeurEngine::doLock() {
|
||||
bool firstLoop = true;
|
||||
bool breakFlag = false;
|
||||
while (!breakFlag && !shouldQuit()) {
|
||||
(*_graphicsManager->_vPort)->setupViewPort();
|
||||
_graphicsManager->_vPort->setupViewPort();
|
||||
flipPageAndWait();
|
||||
|
||||
// Display the last play time
|
||||
@ -288,7 +288,7 @@ bool VoyeurEngine::doLock() {
|
||||
_graphicsManager->_fontPtr->_justifyWidth = 384;
|
||||
_graphicsManager->_fontPtr->_justifyHeight = 97;
|
||||
|
||||
(*_graphicsManager->_vPort)->drawText(displayString);
|
||||
_graphicsManager->_vPort->drawText(displayString);
|
||||
flipPageAndWait();
|
||||
|
||||
if (firstLoop) {
|
||||
@ -347,7 +347,7 @@ bool VoyeurEngine::doLock() {
|
||||
} else if (key == 11) {
|
||||
// New code
|
||||
if ((password.empty() && displayString.empty()) || (password != displayString)) {
|
||||
(*_graphicsManager->_vPort)->setupViewPort();
|
||||
_graphicsManager->_vPort->setupViewPort();
|
||||
password = displayString;
|
||||
displayString = "";
|
||||
continue;
|
||||
@ -364,7 +364,7 @@ bool VoyeurEngine::doLock() {
|
||||
_soundManager->playVOCMap(wrongVoc, wrongVocSize);
|
||||
}
|
||||
|
||||
_graphicsManager->fillPic(*_graphicsManager->_vPort, 0);
|
||||
_graphicsManager->fillPic(_graphicsManager->_vPort, 0);
|
||||
flipPageAndWait();
|
||||
_graphicsManager->resetPalette();
|
||||
|
||||
@ -386,7 +386,7 @@ void VoyeurEngine::showTitleScreen() {
|
||||
|
||||
_graphicsManager->_backgroundPage = _bVoy->getPictureResource(0x500);
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort();
|
||||
_graphicsManager->_vPort->setupViewPort();
|
||||
flipPageAndWait();
|
||||
|
||||
// Immediate palette load to show the initial screen
|
||||
@ -453,7 +453,7 @@ void VoyeurEngine::doOpening() {
|
||||
_graphicsManager->setColor(i, 8, 8, 8);
|
||||
|
||||
_eventsManager->_intPtr._hasPalette = true;
|
||||
(*_graphicsManager->_vPort)->setupViewPort();
|
||||
_graphicsManager->_vPort->setupViewPort();
|
||||
flipPageAndWait();
|
||||
|
||||
RL2Decoder decoder;
|
||||
@ -490,7 +490,7 @@ void VoyeurEngine::doOpening() {
|
||||
}
|
||||
|
||||
if (textPic) {
|
||||
_graphicsManager->sDrawPic(textPic, *_graphicsManager->_vPort, textPos);
|
||||
_graphicsManager->sDrawPic(textPic, _graphicsManager->_vPort, textPos);
|
||||
flipPageAndWait();
|
||||
}
|
||||
}
|
||||
@ -585,8 +585,8 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
|
||||
|
||||
if (_voy->_eventFlags & EVTFLAG_8) {
|
||||
assert(pic);
|
||||
byte *imgData = (*_graphicsManager->_vPort)->_currentPic->_imgData;
|
||||
(*_graphicsManager->_vPort)->_currentPic->_imgData = pic->_imgData;
|
||||
byte *imgData = _graphicsManager->_vPort->_currentPic->_imgData;
|
||||
_graphicsManager->_vPort->_currentPic->_imgData = pic->_imgData;
|
||||
pic->_imgData = imgData;
|
||||
_voy->_eventFlags &= ~EVTFLAG_8;
|
||||
}
|
||||
@ -599,7 +599,7 @@ void VoyeurEngine::playAudio(int audioId) {
|
||||
_graphicsManager->_backColors = _bVoy->boltEntry(0x7F01 +
|
||||
BLIND_TABLE[audioId] * 2)._cMapResource;
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort();
|
||||
_graphicsManager->_vPort->setupViewPort();
|
||||
_graphicsManager->_backColors->startFade();
|
||||
flipPageAndWaitForFade();
|
||||
|
||||
@ -619,7 +619,7 @@ void VoyeurEngine::playAudio(int audioId) {
|
||||
_soundManager->stopVOCPlay();
|
||||
|
||||
_bVoy->freeBoltGroup(0x7F00);
|
||||
(*_graphicsManager->_vPort)->setupViewPort(NULL);
|
||||
_graphicsManager->_vPort->setupViewPort(NULL);
|
||||
|
||||
_voy->_eventFlags &= ~EVTFLAG_RECORDING;
|
||||
_voy->_playStampMode = 129;
|
||||
@ -630,13 +630,13 @@ void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::St
|
||||
_graphicsManager->setColor(224, 220, 220, 220);
|
||||
_eventsManager->_intPtr._hasPalette = true;
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort(NULL);
|
||||
(*_graphicsManager->_vPort)->fillPic(0x80);
|
||||
_graphicsManager->_vPort->setupViewPort(NULL);
|
||||
_graphicsManager->_vPort->fillPic(0x80);
|
||||
_graphicsManager->flipPage();
|
||||
_eventsManager->sWaitFlip();
|
||||
|
||||
flipPageAndWait();
|
||||
(*_graphicsManager->_vPort)->fillPic(0x80);
|
||||
_graphicsManager->_vPort->fillPic(0x80);
|
||||
|
||||
FontInfoResource &fi = *_graphicsManager->_fontPtr;
|
||||
fi._curFont = _bVoy->boltEntry(257)._fontResource;
|
||||
@ -647,7 +647,7 @@ void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::St
|
||||
fi._justifyWidth = 384;
|
||||
fi._justifyHeight = 120;
|
||||
|
||||
(*_graphicsManager->_vPort)->drawText(time);
|
||||
_graphicsManager->_vPort->drawText(time);
|
||||
|
||||
if (!location.empty()) {
|
||||
fi._pos = Common::Point(0, 138);
|
||||
@ -655,7 +655,7 @@ void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::St
|
||||
fi._justifyWidth = 384;
|
||||
fi._justifyHeight = 140;
|
||||
|
||||
(*_graphicsManager->_vPort)->drawText(location);
|
||||
_graphicsManager->_vPort->drawText(location);
|
||||
}
|
||||
|
||||
flipPageAndWait();
|
||||
@ -666,7 +666,7 @@ void VoyeurEngine::saveLastInplay() {
|
||||
}
|
||||
|
||||
void VoyeurEngine::flipPageAndWait() {
|
||||
(*_graphicsManager->_vPort)->_flags |= DISPFLAG_8;
|
||||
_graphicsManager->_vPort->_flags |= DISPFLAG_8;
|
||||
_graphicsManager->flipPage();
|
||||
_eventsManager->sWaitFlip();
|
||||
}
|
||||
@ -688,7 +688,7 @@ void VoyeurEngine::showEndingNews() {
|
||||
PictureResource *pic = _bVoy->boltEntry(_playStampGroupId)._picResource;
|
||||
CMapResource *pal = _bVoy->boltEntry(_playStampGroupId + 1)._cMapResource;
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort(pic);
|
||||
_graphicsManager->_vPort->setupViewPort(pic);
|
||||
pal->startFade();
|
||||
flipPageAndWaitForFade();
|
||||
|
||||
@ -703,7 +703,7 @@ void VoyeurEngine::showEndingNews() {
|
||||
pal = _bVoy->boltEntry(_playStampGroupId + idx * 2 + 1)._cMapResource;
|
||||
}
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort(pic);
|
||||
_graphicsManager->_vPort->setupViewPort(pic);
|
||||
pal->startFade();
|
||||
flipPageAndWaitForFade();
|
||||
|
||||
|
@ -232,7 +232,7 @@ void VoyeurEngine::closeStamp() {
|
||||
}
|
||||
|
||||
void VoyeurEngine::doTailTitle() {
|
||||
(*_graphicsManager->_vPort)->setupViewPort(NULL);
|
||||
_graphicsManager->_vPort->setupViewPort(NULL);
|
||||
_graphicsManager->screenReset();
|
||||
|
||||
if (_bVoy->getBoltGroup(0x600)) {
|
||||
@ -250,7 +250,7 @@ void VoyeurEngine::doTailTitle() {
|
||||
PictureResource *pic = _bVoy->boltEntry(0x602)._picResource;
|
||||
CMapResource *pal = _bVoy->boltEntry(0x603)._cMapResource;
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort(pic);
|
||||
_graphicsManager->_vPort->setupViewPort(pic);
|
||||
pal->startFade();
|
||||
flipPageAndWaitForFade();
|
||||
_eventsManager->delayClick(300);
|
||||
@ -258,7 +258,7 @@ void VoyeurEngine::doTailTitle() {
|
||||
pic = _bVoy->boltEntry(0x604)._picResource;
|
||||
pal = _bVoy->boltEntry(0x605)._cMapResource;
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort(pic);
|
||||
_graphicsManager->_vPort->setupViewPort(pic);
|
||||
pal->startFade();
|
||||
flipPageAndWaitForFade();
|
||||
_eventsManager->delayClick(120);
|
||||
@ -283,7 +283,7 @@ void VoyeurEngine::doClosingCredits() {
|
||||
const char *msg = (const char *)_bVoy->memberAddr(0x404);
|
||||
const byte *creditList = (const byte *)_bVoy->memberAddr(0x405);
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort(NULL);
|
||||
_graphicsManager->_vPort->setupViewPort(NULL);
|
||||
_graphicsManager->setColor(1, 180, 180, 180);
|
||||
_graphicsManager->setColor(2, 200, 200, 200);
|
||||
_eventsManager->_intPtr._hasPalette = true;
|
||||
@ -302,7 +302,7 @@ void VoyeurEngine::doClosingCredits() {
|
||||
int flags = READ_LE_UINT16(entry + 4);
|
||||
|
||||
if (flags & 0x10)
|
||||
(*_graphicsManager->_vPort)->fillPic(0);
|
||||
_graphicsManager->_vPort->fillPic(0);
|
||||
|
||||
if (flags & 1) {
|
||||
fi._foreColor = 1;
|
||||
@ -312,7 +312,7 @@ void VoyeurEngine::doClosingCredits() {
|
||||
fi._justifyHeight = 240;
|
||||
fi._pos = Common::Point(0, READ_LE_UINT16(entry));
|
||||
|
||||
(*_graphicsManager->_vPort)->drawText(msg);
|
||||
_graphicsManager->_vPort->drawText(msg);
|
||||
msg += strlen(msg) + 1;
|
||||
}
|
||||
|
||||
@ -324,7 +324,7 @@ void VoyeurEngine::doClosingCredits() {
|
||||
fi._justifyHeight = 240;
|
||||
fi._pos = Common::Point(0, READ_LE_UINT16(entry));
|
||||
|
||||
(*_graphicsManager->_vPort)->drawText(msg);
|
||||
_graphicsManager->_vPort->drawText(msg);
|
||||
msg += strlen(msg) + 1;
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ void VoyeurEngine::doClosingCredits() {
|
||||
fi._justifyHeight = 240;
|
||||
fi._pos = Common::Point(38, READ_LE_UINT16(entry));
|
||||
|
||||
(*_graphicsManager->_vPort)->drawText(msg);
|
||||
_graphicsManager->_vPort->drawText(msg);
|
||||
msg += strlen(msg) + 1;
|
||||
|
||||
fi._foreColor = 2;
|
||||
@ -345,7 +345,7 @@ void VoyeurEngine::doClosingCredits() {
|
||||
fi._justifyHeight = 240;
|
||||
fi._pos = Common::Point(198, READ_LE_UINT16(entry));
|
||||
|
||||
(*_graphicsManager->_vPort)->drawText(msg);
|
||||
_graphicsManager->_vPort->drawText(msg);
|
||||
msg += strlen(msg) + 1;
|
||||
}
|
||||
|
||||
@ -357,7 +357,7 @@ void VoyeurEngine::doClosingCredits() {
|
||||
fi._justifyHeight = 240;
|
||||
fi._pos = Common::Point(0, READ_LE_UINT16(entry));
|
||||
|
||||
(*_graphicsManager->_vPort)->drawText(msg);
|
||||
_graphicsManager->_vPort->drawText(msg);
|
||||
msg += strlen(msg) + 1;
|
||||
|
||||
fi._foreColor = 2;
|
||||
@ -367,7 +367,7 @@ void VoyeurEngine::doClosingCredits() {
|
||||
fi._justifyHeight = 240;
|
||||
fi._pos = Common::Point(0, READ_LE_UINT16(entry) + 13);
|
||||
|
||||
(*_graphicsManager->_vPort)->drawText(msg);
|
||||
_graphicsManager->_vPort->drawText(msg);
|
||||
msg += strlen(msg) + 1;
|
||||
}
|
||||
|
||||
@ -390,8 +390,8 @@ void VoyeurEngine::doPiracy() {
|
||||
_graphicsManager->setColor(1, 0, 0, 0);
|
||||
_graphicsManager->setColor(2, 255, 255, 255);
|
||||
_eventsManager->_intPtr._hasPalette = true;
|
||||
(*_graphicsManager->_vPort)->setupViewPort(NULL);
|
||||
(*_graphicsManager->_vPort)->fillPic(1);
|
||||
_graphicsManager->_vPort->setupViewPort(NULL);
|
||||
_graphicsManager->_vPort->fillPic(1);
|
||||
|
||||
FontInfoResource &fi = *_graphicsManager->_fontPtr;
|
||||
fi._curFont = _bVoy->boltEntry(0x101)._fontResource;
|
||||
@ -407,7 +407,7 @@ void VoyeurEngine::doPiracy() {
|
||||
int yp, idx;
|
||||
for (idx = 0, yp = 33; idx < 10; ++idx) {
|
||||
fi._pos = Common::Point(0, yp);
|
||||
(*_graphicsManager->_vPort)->drawText(PIRACY_MESSAGE[idx]);
|
||||
_graphicsManager->_vPort->drawText(PIRACY_MESSAGE[idx]);
|
||||
|
||||
yp += fi._curFont->_fontHeight + 4;
|
||||
}
|
||||
@ -442,7 +442,7 @@ void VoyeurEngine::reviewTape() {
|
||||
|
||||
_graphicsManager->_backColors = _bVoy->boltEntry(0x902)._cMapResource;
|
||||
_graphicsManager->_backgroundPage = _bVoy->boltEntry(0x901)._picResource;
|
||||
(*_graphicsManager->_vPort)->setupViewPort(_graphicsManager->_backgroundPage);
|
||||
_graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage);
|
||||
_graphicsManager->_backColors->startFade();
|
||||
|
||||
flipPageAndWaitForFade();
|
||||
@ -504,15 +504,15 @@ void VoyeurEngine::reviewTape() {
|
||||
yp += 15;
|
||||
}
|
||||
|
||||
(*_graphicsManager->_vPort)->addSaveRect(
|
||||
(*_graphicsManager->_vPort)->_lastPage, tempRect);
|
||||
_graphicsManager->_vPort->addSaveRect(
|
||||
_graphicsManager->_vPort->_lastPage, tempRect);
|
||||
flipPageAndWait();
|
||||
|
||||
(*_graphicsManager->_vPort)->addSaveRect(
|
||||
(*_graphicsManager->_vPort)->_lastPage, tempRect);
|
||||
_graphicsManager->_vPort->addSaveRect(
|
||||
_graphicsManager->_vPort->_lastPage, tempRect);
|
||||
}
|
||||
|
||||
_graphicsManager->sDrawPic(cursor, *_graphicsManager->_vPort,
|
||||
_graphicsManager->sDrawPic(cursor, _graphicsManager->_vPort,
|
||||
_eventsManager->getMousePos());
|
||||
flipPageAndWait();
|
||||
|
||||
@ -566,12 +566,12 @@ void VoyeurEngine::reviewTape() {
|
||||
yp += 15;
|
||||
}
|
||||
|
||||
(*_graphicsManager->_vPort)->addSaveRect(
|
||||
(*_graphicsManager->_vPort)->_lastPage, tempRect);
|
||||
_graphicsManager->_vPort->addSaveRect(
|
||||
_graphicsManager->_vPort->_lastPage, tempRect);
|
||||
flipPageAndWait();
|
||||
|
||||
(*_graphicsManager->_vPort)->addSaveRect(
|
||||
(*_graphicsManager->_vPort)->_lastPage, tempRect);
|
||||
_graphicsManager->_vPort->addSaveRect(
|
||||
_graphicsManager->_vPort->_lastPage, tempRect);
|
||||
flipPageAndWait();
|
||||
|
||||
_eventsManager->getMouseInfo();
|
||||
@ -651,7 +651,7 @@ void VoyeurEngine::reviewTape() {
|
||||
newY = _eventsManager->getMousePos().y;
|
||||
_voy->_fadingType = 0;
|
||||
_voy->_viewBounds = nullptr;
|
||||
(*_graphicsManager->_vPort)->setupViewPort(NULL);
|
||||
_graphicsManager->_vPort->setupViewPort(NULL);
|
||||
|
||||
if (_currentVocId != -1) {
|
||||
_voy->_vocSecondsOffset = _voy->_RTVNum - _voy->_musicStartTime;
|
||||
@ -679,7 +679,7 @@ void VoyeurEngine::reviewTape() {
|
||||
_graphicsManager->_backColors = _bVoy->boltEntry(0x7F01 +
|
||||
BLIND_TABLE[_audioVideoId])._cMapResource;
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort(_graphicsManager->_backgroundPage);
|
||||
_graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage);
|
||||
_graphicsManager->_backColors->startFade();
|
||||
flipPageAndWaitForFade();
|
||||
|
||||
@ -728,7 +728,7 @@ void VoyeurEngine::reviewTape() {
|
||||
|
||||
_graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource;
|
||||
|
||||
(*_graphicsManager->_vPort)->fillPic(0);
|
||||
_graphicsManager->_vPort->fillPic(0);
|
||||
flipPageAndWait();
|
||||
_bVoy->freeBoltGroup(0x900);
|
||||
}
|
||||
@ -789,8 +789,8 @@ void VoyeurEngine::doTapePlaying() {
|
||||
PictureResource *pic = _bVoy->boltEntry(0xA02)._picResource;
|
||||
VInitCycleResource *cycle = _bVoy->boltEntry(0xA05)._vInitCycleResource;
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort(_graphicsManager->_backgroundPage);
|
||||
_graphicsManager->sDrawPic(pic, *_graphicsManager->_vPort, Common::Point(57, 30));
|
||||
_graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage);
|
||||
_graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(57, 30));
|
||||
_graphicsManager->_backColors->startFade();
|
||||
flipPageAndWaitForFade();
|
||||
|
||||
@ -933,7 +933,7 @@ int VoyeurEngine::getChooseButton() {
|
||||
+ 6)._rectResource->_entries;
|
||||
int selectedIndex = -1;
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort(_graphicsManager->_backgroundPage);
|
||||
_graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage);
|
||||
_graphicsManager->_backColors->_steps = 0;
|
||||
_graphicsManager->_backColors->startFade();
|
||||
flipPageAndWait();
|
||||
@ -956,7 +956,7 @@ int VoyeurEngine::getChooseButton() {
|
||||
selectedIndex = idx;
|
||||
if (selectedIndex != prevIndex) {
|
||||
PictureResource *btnPic = _bVoy->boltEntry(_playStampGroupId + 8 + idx)._picResource;
|
||||
_graphicsManager->sDrawPic(btnPic, *_graphicsManager->_vPort,
|
||||
_graphicsManager->sDrawPic(btnPic, _graphicsManager->_vPort,
|
||||
Common::Point(106, 200));
|
||||
|
||||
cursorPic = _bVoy->boltEntry(_playStampGroupId + 4)._picResource;
|
||||
@ -968,11 +968,11 @@ int VoyeurEngine::getChooseButton() {
|
||||
if (selectedIndex == -1) {
|
||||
cursorPic = _bVoy->boltEntry(_playStampGroupId + 2)._picResource;
|
||||
PictureResource *btnPic = _bVoy->boltEntry(_playStampGroupId + 12)._picResource;
|
||||
_graphicsManager->sDrawPic(btnPic, *_graphicsManager->_vPort,
|
||||
_graphicsManager->sDrawPic(btnPic, _graphicsManager->_vPort,
|
||||
Common::Point(106, 200));
|
||||
}
|
||||
|
||||
_graphicsManager->sDrawPic(cursorPic, *_graphicsManager->_vPort,
|
||||
_graphicsManager->sDrawPic(cursorPic, _graphicsManager->_vPort,
|
||||
Common::Point(pt.x + 13, pt.y - 12));
|
||||
|
||||
flipPageAndWait();
|
||||
@ -985,7 +985,7 @@ int VoyeurEngine::getChooseButton() {
|
||||
void VoyeurEngine::makeViewFinder() {
|
||||
_graphicsManager->_backgroundPage = _bVoy->boltEntry(0x103)._picResource;
|
||||
_graphicsManager->sDrawPic(_graphicsManager->_backgroundPage,
|
||||
*_graphicsManager->_vPort, Common::Point(0, 0));
|
||||
_graphicsManager->_vPort, Common::Point(0, 0));
|
||||
CMapResource *pal = _bVoy->boltEntry(0x104)._cMapResource;
|
||||
|
||||
int palOffset = 0;
|
||||
@ -1017,7 +1017,7 @@ void VoyeurEngine::makeViewFinder() {
|
||||
break;
|
||||
}
|
||||
|
||||
(*_graphicsManager->_vPort)->drawIfaceTime();
|
||||
_graphicsManager->_vPort->drawIfaceTime();
|
||||
doTimeBar();
|
||||
pal->startFade();
|
||||
|
||||
@ -1080,7 +1080,7 @@ void VoyeurEngine::initIFace() {
|
||||
|
||||
void VoyeurEngine::doScroll(const Common::Point &pt) {
|
||||
Common::Rect clipRect(72, 47, 72 + 240, 47 + 148);
|
||||
(*_graphicsManager->_vPort)->setupViewPort(NULL, &clipRect);
|
||||
_graphicsManager->_vPort->setupViewPort(NULL, &clipRect);
|
||||
|
||||
int base = 0;
|
||||
switch (_voy->_transitionId) {
|
||||
@ -1104,18 +1104,18 @@ void VoyeurEngine::doScroll(const Common::Point &pt) {
|
||||
|
||||
if (base) {
|
||||
PictureResource *pic = _bVoy->boltEntry(base + 3)._picResource;
|
||||
_graphicsManager->sDrawPic(pic, *_graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 104));
|
||||
_graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 104));
|
||||
pic = _bVoy->boltEntry(base + 4)._picResource;
|
||||
_graphicsManager->sDrawPic(pic, *_graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 44));
|
||||
_graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 44));
|
||||
pic = _bVoy->boltEntry(base + 5)._picResource;
|
||||
_graphicsManager->sDrawPic(pic, *_graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 16));
|
||||
_graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 16));
|
||||
pic = _bVoy->boltEntry(base + 6)._picResource;
|
||||
_graphicsManager->sDrawPic(pic, *_graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 76));
|
||||
_graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 76));
|
||||
pic = _bVoy->boltEntry(base + 7)._picResource;
|
||||
_graphicsManager->sDrawPic(pic, *_graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 136));
|
||||
_graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 136));
|
||||
}
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort(NULL);
|
||||
_graphicsManager->_vPort->setupViewPort(NULL);
|
||||
}
|
||||
|
||||
void VoyeurEngine::checkTransition() {
|
||||
@ -1182,7 +1182,7 @@ int VoyeurEngine::doComputerText(int maxLen) {
|
||||
font._justifyWidth = 384;
|
||||
font._justifyHeight = 100;
|
||||
font._pos = Common::Point(128, 100);
|
||||
(*_graphicsManager->_vPort)->drawText(END_OF_MESSAGE);
|
||||
_graphicsManager->_vPort->drawText(END_OF_MESSAGE);
|
||||
} else if (_voy->_RTVNum < _voy->_computerTimeMin && maxLen == 9999) {
|
||||
if (_currentVocId != -1)
|
||||
_soundManager->startVOCPlay(_currentVocId);
|
||||
@ -1190,7 +1190,7 @@ int VoyeurEngine::doComputerText(int maxLen) {
|
||||
font._justifyWidth = 384;
|
||||
font._justifyHeight = 100;
|
||||
font._pos = Common::Point(120, 100);
|
||||
(*_graphicsManager->_vPort)->drawText(START_OF_MESSAGE);
|
||||
_graphicsManager->_vPort->drawText(START_OF_MESSAGE);
|
||||
} else {
|
||||
char *msg = (char *)_bVoy->memberAddr(0x4900 + _voy->_computerTextId);
|
||||
font._pos = Common::Point(96, 60);
|
||||
@ -1210,12 +1210,12 @@ int VoyeurEngine::doComputerText(int maxLen) {
|
||||
_eventsManager->delay(90);
|
||||
_graphicsManager->_drawPtr->_pos = Common::Point(96, 54);
|
||||
_graphicsManager->_drawPtr->_penColor = 254;
|
||||
(*_graphicsManager->_vPort)->sFillBox(196, 124);
|
||||
_graphicsManager->_vPort->sFillBox(196, 124);
|
||||
_graphicsManager->_fontPtr->_justify = ALIGN_LEFT;
|
||||
_graphicsManager->_fontPtr->_justifyWidth = 384;
|
||||
_graphicsManager->_fontPtr->_justifyHeight = 100;
|
||||
_graphicsManager->_fontPtr->_pos = Common::Point(128, 100);
|
||||
(*_graphicsManager->_vPort)->drawText(END_OF_MESSAGE);
|
||||
_graphicsManager->_vPort->drawText(END_OF_MESSAGE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1227,7 +1227,7 @@ int VoyeurEngine::doComputerText(int maxLen) {
|
||||
_eventsManager->delay(90);
|
||||
_graphicsManager->_drawPtr->_pos = Common::Point(96, 54);
|
||||
_graphicsManager->_drawPtr->_penColor = 255;
|
||||
(*_graphicsManager->_vPort)->sFillBox(196, 124);
|
||||
_graphicsManager->_vPort->sFillBox(196, 124);
|
||||
yp = 60;
|
||||
}
|
||||
|
||||
@ -1238,7 +1238,7 @@ int VoyeurEngine::doComputerText(int maxLen) {
|
||||
_graphicsManager->_fontPtr->_justify = ALIGN_LEFT;
|
||||
_graphicsManager->_fontPtr->_justifyWidth = 0;
|
||||
_graphicsManager->_fontPtr->_justifyHeight = 0;
|
||||
(*_graphicsManager->_vPort)->drawText(Common::String(c));
|
||||
_graphicsManager->_vPort->drawText(Common::String(c));
|
||||
_eventsManager->delay(4);
|
||||
}
|
||||
|
||||
@ -1265,7 +1265,7 @@ void VoyeurEngine::getComputerBrush() {
|
||||
int xp = (384 - pic->_bounds.width()) / 2;
|
||||
int yp = (240 - pic->_bounds.height()) / 2 - 4;
|
||||
|
||||
(*_graphicsManager->_vPort)->drawPicPerm(pic, Common::Point(xp, yp));
|
||||
_graphicsManager->_vPort->drawPicPerm(pic, Common::Point(xp, yp));
|
||||
|
||||
CMapResource *pal = _bVoy->boltEntry(0x490F)._cMapResource;
|
||||
pal->startFade();
|
||||
@ -1285,14 +1285,14 @@ void VoyeurEngine::doTimeBar() {
|
||||
_graphicsManager->_drawPtr->_penColor = 134;
|
||||
_graphicsManager->_drawPtr->_pos = Common::Point(39, 92);
|
||||
|
||||
(*_graphicsManager->_vPort)->sFillBox(6, fullHeight - 92);
|
||||
_graphicsManager->_vPort->sFillBox(6, fullHeight - 92);
|
||||
if (height > 0) {
|
||||
_graphicsManager->setColor(215, 238, 238, 238);
|
||||
_eventsManager->_intPtr._hasPalette = true;
|
||||
|
||||
_graphicsManager->_drawPtr->_penColor = 215;
|
||||
_graphicsManager->_drawPtr->_pos = Common::Point(39, fullHeight);
|
||||
(*_graphicsManager->_vPort)->sFillBox(6, height);
|
||||
_graphicsManager->_vPort->sFillBox(6, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1345,7 +1345,7 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) {
|
||||
|
||||
_bVoy->getBoltGroup(_voy->_boltGroupId2);
|
||||
PictureResource *pic = _bVoy->boltEntry(_voy->_boltGroupId2 + evidId * 2)._picResource;
|
||||
_graphicsManager->sDrawPic(pic, *_graphicsManager->_vPort, Common::Point(
|
||||
_graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(
|
||||
(384 - pic->_bounds.width()) / 2, (240 - pic->_bounds.height()) / 2));
|
||||
_bVoy->freeBoltMember(_voy->_boltGroupId2 + evidId * 2);
|
||||
|
||||
@ -1396,7 +1396,7 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) {
|
||||
continue;
|
||||
|
||||
pic = _voy->_evPicPtrs[arrIndex];
|
||||
_graphicsManager->sDrawPic(pic, *_graphicsManager->_vPort,
|
||||
_graphicsManager->sDrawPic(pic, _graphicsManager->_vPort,
|
||||
Common::Point((384 - pic->_bounds.width()) / 2,
|
||||
(240 - pic->_bounds.height()) / 2));
|
||||
_voy->_evCmPtrs[arrIndex]->startFade();
|
||||
|
Loading…
x
Reference in New Issue
Block a user