aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2013-12-11 21:51:33 -0500
committerPaul Gilbert2013-12-11 21:51:33 -0500
commitd5762b5332d0031cd3e4327fb868d8358dcaf7c2 (patch)
tree68c4262e7dceb1c475f306e5237c654e59607f2c
parent7f5a5606a53ac4e17f4465b0e127dc2a44531cbe (diff)
downloadscummvm-rg350-d5762b5332d0031cd3e4327fb868d8358dcaf7c2.tar.gz
scummvm-rg350-d5762b5332d0031cd3e4327fb868d8358dcaf7c2.tar.bz2
scummvm-rg350-d5762b5332d0031cd3e4327fb868d8358dcaf7c2.zip
VOYEUR: Removed use of GET_WORD macro in parsePlayCommands
-rw-r--r--engines/voyeur/files_threads.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index a65710245e..dc9d014992 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -257,8 +257,6 @@ bool ThreadResource::chooseSTAMPButton(int idx) {
return false;
}
-#define GET_WORD READ_LE_UINT16(dataP); dataP += 2; {}
-
void ThreadResource::parsePlayCommands() {
Common::fill(&_vm->_voy._arr1[0][0], &_vm->_voy._arr1[8][20], 0);
Common::fill(&_vm->_voy._arr2[0][0], &_vm->_voy._arr2[8][20], 0);
@@ -274,7 +272,8 @@ void ThreadResource::parsePlayCommands() {
CMapResource *pal;
for (int parseIndex = 0; parseIndex < _parseCount; ++parseIndex) {
- uint16 id = GET_WORD;
+ uint16 id = READ_LE_UINT16(dataP);
+ dataP += 2;
switch (id) {
case 1:
@@ -283,11 +282,12 @@ void ThreadResource::parsePlayCommands() {
break;
case 2:
- v2 = GET_WORD;
+ v2 = READ_LE_UINT16(dataP);
+
if (v2 == 0 || READ_LE_UINT16(_vm->_controlPtr->_ptr + 4) == 0) {
- _vm->_eventsManager._videoComputerBut4 = READ_LE_UINT16(dataP);
- _vm->_voy._field468 = READ_LE_UINT16(dataP + 2);
- _vm->_voy._field46A = READ_LE_UINT16(dataP + 4);
+ _vm->_eventsManager._videoComputerBut4 = READ_LE_UINT16(dataP + 2);
+ _vm->_voy._field468 = READ_LE_UINT16(dataP + 4);
+ _vm->_voy._field46A = READ_LE_UINT16(dataP + 6);
if (_vm->_voy._RTVNum < _vm->_voy._field468 ||
(_vm->_voy._field468 + _vm->_voy._field46A) < _vm->_voy._RTVNum) {
@@ -337,15 +337,16 @@ void ThreadResource::parsePlayCommands() {
}
}
- dataP += 6;
+ dataP += 8;
break;
case 3:
- v2 = GET_WORD;
+ v2 = READ_LE_UINT16(dataP);
+
if (v2 == 0 || READ_LE_UINT16(_vm->_controlPtr->_ptr + 4) == 0) {
- _vm->_eventsManager._videoComputerBut4 = READ_LE_UINT16(dataP);
- _vm->_voy._field468 = READ_LE_UINT16(dataP + 2);
- _vm->_voy._field46A = READ_LE_UINT16(dataP + 4);
+ _vm->_eventsManager._videoComputerBut4 = READ_LE_UINT16(dataP + 2);
+ _vm->_voy._field468 = READ_LE_UINT16(dataP + 4);
+ _vm->_voy._field46A = READ_LE_UINT16(dataP + 6);
if (_vm->_voy._RTVNum < _vm->_voy._field468 ||
(_vm->_voy._field468 + _vm->_voy._field46A) < _vm->_voy._RTVNum) {
@@ -384,7 +385,7 @@ void ThreadResource::parsePlayCommands() {
}
}
- dataP += 6;
+ dataP += 8;
break;
case 4:
@@ -393,7 +394,8 @@ void ThreadResource::parsePlayCommands() {
dataP += 2;
if (id == 22) {
- int resolveIndex = GET_WORD;
+ int resolveIndex = READ_LE_UINT16(dataP);
+ dataP += 2;
_vm->_playStamp1 = _vm->_resolvePtr[resolveIndex];
}
@@ -483,8 +485,9 @@ void ThreadResource::parsePlayCommands() {
case 6:
_vm->_voy._field470 = 6;
- v2 = GET_WORD;
+ v2 = READ_LE_UINT16(dataP);
_vm->_playStamp1 = _vm->_resolvePtr[v2];
+ dataP += 2;
break;
case 7:
@@ -703,8 +706,6 @@ void ThreadResource::parsePlayCommands() {
}
}
-#undef GET_WORD
-
int ThreadResource::doApt() {
warning("TODO: doApt");
return 0;