aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur
diff options
context:
space:
mode:
authorStrangerke2014-02-11 08:00:15 +0100
committerStrangerke2014-02-11 08:00:15 +0100
commit1ed4ed47afdfeae436391b36a6cb2a3e192f06ae (patch)
tree2a7e83a399e9d7b8187e4060962999d318139829 /engines/voyeur
parente688cb501534e98a024edc136ca5b833e173944d (diff)
downloadscummvm-rg350-1ed4ed47afdfeae436391b36a6cb2a3e192f06ae.tar.gz
scummvm-rg350-1ed4ed47afdfeae436391b36a6cb2a3e192f06ae.tar.bz2
scummvm-rg350-1ed4ed47afdfeae436391b36a6cb2a3e192f06ae.zip
VOYEUR: Rename some fields related to fading
Diffstat (limited to 'engines/voyeur')
-rw-r--r--engines/voyeur/data.cpp12
-rw-r--r--engines/voyeur/data.h10
-rw-r--r--engines/voyeur/events.cpp42
-rw-r--r--engines/voyeur/files_threads.cpp30
-rw-r--r--engines/voyeur/graphics.cpp24
-rw-r--r--engines/voyeur/voyeur_game.cpp2
6 files changed, 60 insertions, 60 deletions
diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp
index 98a7a0731f..ae9474a9bf 100644
--- a/engines/voyeur/data.cpp
+++ b/engines/voyeur/data.cpp
@@ -43,7 +43,7 @@ SVoy::SVoy() {
Common::fill((byte *)this, (byte *)this + sizeof(SVoy), 0);
_eventFlags = EVTFLAG_TIME_DISABLED;
- _field4376 = _field4378 = 127;
+ _fadingAmount1 = _fadingAmount2 = 127;
_murderThreshold = 9999;
_aptLoadMode = -1;
_eventFlags |= EVTFLAG_100;
@@ -105,11 +105,11 @@ void SVoy::synchronize(Common::Serializer &s) {
for (int idx = 0; idx < _eventCount; ++idx)
_events[idx].synchronize(s);
- s.syncAsSint16LE(_field4376);
- s.syncAsSint16LE(_field4378);
- s.syncAsSint16LE(_field437A);
- s.syncAsSint16LE(_field437C);
- s.syncAsSint16LE(_field437E);
+ s.syncAsSint16LE(_fadingAmount1);
+ s.syncAsSint16LE(_fadingAmount2);
+ s.syncAsSint16LE(_fadingStep1);
+ s.syncAsSint16LE(_fadingStep2);
+ s.syncAsSint16LE(_fadingType);
s.syncAsSint16LE(_victimNumber);
s.syncAsSint16LE(_incriminatedVictimNumber);
s.syncAsSint16LE(_videoEventId);
diff --git a/engines/voyeur/data.h b/engines/voyeur/data.h
index 0b32d9abee..899b10c53d 100644
--- a/engines/voyeur/data.h
+++ b/engines/voyeur/data.h
@@ -136,11 +136,11 @@ public:
bool _victimMurdered;
int _murderThreshold;
- int _field4376;
- int _field4378;
- int _field437A;
- int _field437C;
- int _field437E;
+ int _fadingAmount1;
+ int _fadingAmount2;
+ int _fadingStep1;
+ int _fadingStep2;
+ int _fadingType;
int _victimNumber;
int _incriminatedVictimNumber;
int _videoEventId;
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp
index 4e6986b803..4a6beb9430 100644
--- a/engines/voyeur/events.cpp
+++ b/engines/voyeur/events.cpp
@@ -505,30 +505,30 @@ void EventsManager::vDoCycleInt() {
void EventsManager::fadeIntFunc() {
- switch (_vm->_voy._field437E) {
+ switch (_vm->_voy._fadingType) {
case 1:
- if (_vm->_voy._field4376 < 63)
- _vm->_voy._field4376 += _vm->_voy._field437A;
- if (_vm->_voy._field4378 < 63)
- _vm->_voy._field4378 += _vm->_voy._field437C;
- if (_vm->_voy._field4376 > 63)
- _vm->_voy._field4376 = 63;
- if (_vm->_voy._field4378 > 63)
- _vm->_voy._field4378 = 63;
- if ((_vm->_voy._field4376 == 63) && (_vm->_voy._field4378 == 63))
- _vm->_voy._field437E = 0;
+ if (_vm->_voy._fadingAmount1 < 63)
+ _vm->_voy._fadingAmount1 += _vm->_voy._fadingStep1;
+ if (_vm->_voy._fadingAmount2 < 63)
+ _vm->_voy._fadingAmount2 += _vm->_voy._fadingStep2;
+ if (_vm->_voy._fadingAmount1 > 63)
+ _vm->_voy._fadingAmount1 = 63;
+ if (_vm->_voy._fadingAmount2 > 63)
+ _vm->_voy._fadingAmount2 = 63;
+ if ((_vm->_voy._fadingAmount1 == 63) && (_vm->_voy._fadingAmount2 == 63))
+ _vm->_voy._fadingType = 0;
break;
case 2:
- if (_vm->_voy._field4376 > 0)
- _vm->_voy._field4376 -= _vm->_voy._field437A;
- if (_vm->_voy._field4378 > 0)
- _vm->_voy._field4378 -= _vm->_voy._field437C;
- if (_vm->_voy._field4376 < 0)
- _vm->_voy._field4376 = 0;
- if (_vm->_voy._field4378 < 0)
- _vm->_voy._field4378 = 0;
- if ((_vm->_voy._field4376 == 0) && (_vm->_voy._field4378 == 0))
- _vm->_voy._field437E = 0;
+ if (_vm->_voy._fadingAmount1 > 0)
+ _vm->_voy._fadingAmount1 -= _vm->_voy._fadingStep1;
+ if (_vm->_voy._fadingAmount2 > 0)
+ _vm->_voy._fadingAmount2 -= _vm->_voy._fadingStep2;
+ if (_vm->_voy._fadingAmount1 < 0)
+ _vm->_voy._fadingAmount1 = 0;
+ if (_vm->_voy._fadingAmount2 < 0)
+ _vm->_voy._fadingAmount2 = 0;
+ if ((_vm->_voy._fadingAmount1 == 0) && (_vm->_voy._fadingAmount2 == 0))
+ _vm->_voy._fadingType = 0;
break;
default:
break;
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index a5e27eb32d..2241431ac4 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -1112,7 +1112,7 @@ void ThreadResource::doRoom() {
SVoy &voy = vm._voy;
vm.makeViewFinderP();
- voy._field437E = 0;
+ voy._fadingType = 0;
if (!vm._bVoy->getBoltGroup(vm._playStampGroupId, true))
return;
@@ -1122,9 +1122,9 @@ void ThreadResource::doRoom() {
(*vm._graphicsManager._vPort)->setupViewPort(vm._graphicsManager._backgroundPage);
vm._graphicsManager._backColors->startFade();
- voy._field437A = 2;
- voy._field437C = 0;
- voy._field437E = 1;
+ voy._fadingStep1 = 2;
+ voy._fadingStep2 = 0;
+ voy._fadingType = 1;
Common::Array<RectEntry> &hotspots = vm._bVoy->boltEntry(vm._playStampGroupId + 4)._rectResource->_entries;
int hotspotId = -1;
@@ -1138,7 +1138,7 @@ void ThreadResource::doRoom() {
vm._eventsManager.getMouseInfo();
vm._eventsManager.setMousePos(Common::Point(192, 120));
- voy._field437E = 0;
+ voy._fadingType = 0;
vm._currentVocId = 146;
voy._musicStartTime = voy._RTVNum;
@@ -1253,17 +1253,17 @@ void ThreadResource::doRoom() {
vm._eventsManager.delay(1);
vm._eventsManager.hideCursor();
- while (!vm.shouldQuit() && voy._field4378 > 0) {
- if (voy._field4376 < 63) {
- voy._field4376 += 4;
- if (voy._field4376 > 63)
- voy._field4376 = 63;
+ while (!vm.shouldQuit() && voy._fadingAmount2 > 0) {
+ if (voy._fadingAmount1 < 63) {
+ voy._fadingAmount1 += 4;
+ if (voy._fadingAmount1 > 63)
+ voy._fadingAmount1 = 63;
}
- if (voy._field4378 > 0) {
- voy._field4378 -= 8;
- if (voy._field4378 < 0)
- voy._field4378 = 0;
+ if (voy._fadingAmount2 > 0) {
+ voy._fadingAmount2 -= 8;
+ if (voy._fadingAmount2 < 0)
+ voy._fadingAmount2 = 0;
}
vm._eventsManager.delay(1);
@@ -1280,7 +1280,7 @@ void ThreadResource::doRoom() {
voy._eventFlags = EVTFLAG_TIME_DISABLED;
vm._eventsManager.incrementTime(1);
voy._viewBounds = nullptr;
- voy._field437E = 0;
+ voy._fadingType = 0;
vm.makeViewFinderP();
if (voy._boltGroupId2 != -1) {
diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp
index 3dee779580..0deeaa1e45 100644
--- a/engines/voyeur/graphics.cpp
+++ b/engines/voyeur/graphics.cpp
@@ -1020,45 +1020,45 @@ void GraphicsManager::screenReset() {
void GraphicsManager::fadeDownICF1(int steps) {
if (steps > 0) {
- int stepAmount = _vm->_voy._field4378 / steps;
+ int stepAmount = _vm->_voy._fadingAmount2 / steps;
for (int idx = 0; idx < steps; ++idx) {
- _vm->_voy._field4378 -= stepAmount;
+ _vm->_voy._fadingAmount2 -= stepAmount;
_vm->_eventsManager.delay(1);
}
}
- _vm->_voy._field4378 = 0;
+ _vm->_voy._fadingAmount2 = 0;
}
void GraphicsManager::fadeUpICF1(int steps) {
if (steps > 0) {
- int stepAmount = (63 - _vm->_voy._field4378) / steps;
+ int stepAmount = (63 - _vm->_voy._fadingAmount2) / steps;
for (int idx = 0; idx < steps; ++idx) {
- _vm->_voy._field4378 += stepAmount;
+ _vm->_voy._fadingAmount2 += stepAmount;
_vm->_eventsManager.delay(1);
}
}
- _vm->_voy._field4378 = 63;
+ _vm->_voy._fadingAmount2 = 63;
}
void GraphicsManager::fadeDownICF(int steps) {
if (steps > 0) {
_vm->_eventsManager.hideCursor();
- int stepAmount1 = _vm->_voy._field4376 / steps;
- int stepAmount2 = _vm->_voy._field4378 / steps;
+ int stepAmount1 = _vm->_voy._fadingAmount1 / steps;
+ int stepAmount2 = _vm->_voy._fadingAmount2 / steps;
for (int idx = 0; idx < steps; ++idx) {
- _vm->_voy._field4376 -= stepAmount1;
- _vm->_voy._field4378 -= stepAmount2;
+ _vm->_voy._fadingAmount1 -= stepAmount1;
+ _vm->_voy._fadingAmount2 -= stepAmount2;
_vm->_eventsManager.delay(1);
}
}
- _vm->_voy._field4376 = 0;
- _vm->_voy._field4378 = 0;
+ _vm->_voy._fadingAmount1 = 0;
+ _vm->_voy._fadingAmount2 = 0;
}
void GraphicsManager::drawDot() {
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index 29d1957517..7bb10c2f36 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -654,7 +654,7 @@ void VoyeurEngine::reviewTape() {
} while (!shouldQuit() && (!_eventsManager._mouseClicked || foundIndex == -1));
newY = _eventsManager.getMousePos().y;
- _voy._field437E = 0;
+ _voy._fadingType = 0;
_voy._viewBounds = nullptr;
(*_graphicsManager._vPort)->setupViewPort(NULL);