VOYEUR: Added a state field for current game area

This commit is contained in:
Paul Gilbert 2014-01-05 16:47:03 -05:00
parent 9c2b761b31
commit c884d5bf14
5 changed files with 11 additions and 4 deletions

View File

@ -286,8 +286,8 @@ void BoltFile::freeBoltGroup(uint16 id, bool freeEntries) {
}
void BoltFile::freeBoltMember(uint32 id) {
// TODO: Determine whether this is needed
warning("TODO: BoltFile::freeBoltMember");
// TODO: Determine whether this is needed, given all group entries are automatically loaded
// warning("TODO: BoltFile::freeBoltMember");
}
BoltEntry &BoltFile::getBoltEntryFromLong(uint32 id) {

View File

@ -1061,6 +1061,7 @@ int ThreadResource::doApt() {
Common::Point pt;
PictureResource *pic;
do {
_vm->_voyeurArea = AREA_APARTMENT;
_vm->_eventsManager.getMouseInfo();
if (!_vm->_soundManager.getVOCStatus()) {
// Previous sound ended, so start up a new one
@ -1173,6 +1174,7 @@ void ThreadResource::doRoom() {
bool breakFlag = false;
while (!vm.shouldQuit() && !breakFlag) {
_vm->_voyeurArea = AREA_ROOM;
vm._graphicsManager.setColor(128, 0, 255, 0);
vm._eventsManager._intPtr.field38 = 1;
vm._eventsManager._intPtr._hasPalette = true;
@ -1402,6 +1404,7 @@ int ThreadResource::doInterface() {
MANSION_VIEW_X + MANSION_VIEW_WIDTH, MANSION_VIEW_Y + MANSION_VIEW_HEIGHT);
do {
_vm->_voyeurArea = AREA_INTERFACE;
_vm->doTimeBar(true);
_vm->_eventsManager.getMouseInfo();

View File

@ -53,7 +53,7 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc)
_flashTimeFlag = false;
_timeBarVal = -1;
_checkPhoneVal = 0;
_mansionScrollCountdown = 0;
_voyeurArea = AREA_NONE;
initialiseManagers();
}

View File

@ -69,6 +69,7 @@ enum VoyeurDebugChannels {
kDebugScripts = 1 << 1
};
enum VoyeurArea { AREA_NONE, AREA_APARTMENT, AREA_INTERFACE, AREA_ROOM, AREA_EVIDENCE };
struct VoyeurGameDescription;
@ -171,7 +172,7 @@ public:
int _timeBarVal;
int _checkPhoneVal;
Common::Point _mansionViewPos;
int _mansionScrollCountdown;
VoyeurArea _voyeurArea;
public:
VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc);
virtual ~VoyeurEngine();

View File

@ -47,6 +47,7 @@ void VoyeurEngine::playStamp() {
int buttonId;
bool breakFlag = false;
while (!breakFlag && !shouldQuit()) {
_voyeurArea = AREA_NONE;
_eventsManager.getMouseInfo();
_playStampGroupId = _currentVocId = -1;
_videoId = -1;
@ -1334,6 +1335,8 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) {
int evidIdx = evidId;
while (!shouldQuit() && !_eventsManager._rightClick) {
_voyeurArea = AREA_EVIDENCE;
if (_currentVocId != -1 && !_soundManager.getVOCStatus()) {
if (_voy._vocSecondsOffset > 60)
_voy._vocSecondsOffset = 0;