aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-08-30 21:02:22 -0400
committerPaul Gilbert2014-08-30 21:02:22 -0400
commit2f5fb206d30a77b94aa81feb6b7292c0d3e5e481 (patch)
tree1470a0fab9b1b6000343ca7bf03231270fa531ce /engines
parent78bf011a8b5f9eb25c2b231752c30a3ca239cbc7 (diff)
downloadscummvm-rg350-2f5fb206d30a77b94aa81feb6b7292c0d3e5e481.tar.gz
scummvm-rg350-2f5fb206d30a77b94aa81feb6b7292c0d3e5e481.tar.bz2
scummvm-rg350-2f5fb206d30a77b94aa81feb6b7292c0d3e5e481.zip
ACCESS: Further cleanup of doEstablish parameters
Diffstat (limited to 'engines')
-rw-r--r--engines/access/access.cpp2
-rw-r--r--engines/access/amazon/amazon_game.cpp18
-rw-r--r--engines/access/amazon/amazon_game.h6
-rw-r--r--engines/access/char.cpp2
-rw-r--r--engines/access/room.cpp2
5 files changed, 15 insertions, 15 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 360d434670..29b7fd6e5c 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -240,7 +240,7 @@ void AccessEngine::speakText(ASurface *s, Common::Array<Common::String> msgArr)
while (true) {
_sound->_soundTable[0] = _sound->loadSound(_narateFile + 99, _sndSubFile);
_sound->_soundPriority[0] = 1;
- _sound->playSound(1);
+ _sound->playSound(0);
_scripts->cmdFreeSound();
_events->pollEvents();
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
index 14ee9bc947..d15587f32f 100644
--- a/engines/access/amazon/amazon_game.cpp
+++ b/engines/access/amazon/amazon_game.cpp
@@ -212,20 +212,20 @@ void AmazonEngine::setupGame() {
_player->_playerY = _player->_rawPlayer.y = TRAVEL_POS[_player->_roomNumber][1];
}
-void AmazonEngine::establish(int esatabIndex, int sub) {
+void AmazonEngine::establish(int screenId, int esatabIndex) {
_establishMode = 0;
_establishGroup = 0;
- doEstablish(esatabIndex, sub);
+ doEstablish(screenId, esatabIndex);
}
-void AmazonEngine::establishCenter(int esatabIndex, int sub) {
+void AmazonEngine::establishCenter(int screenId, int esatabIndex) {
_establishMode = 1;
- doEstablish(esatabIndex, sub);
+ doEstablish(screenId, esatabIndex);
}
const char *const _estTable[] = { "ETEXT0.DAT", "ETEXT1.DAT", "ETEXT2.DAT", "ETEXT3.DAT" };
-void AmazonEngine::loadEstablish(int sub) {
+void AmazonEngine::loadEstablish(int estabIndex) {
if (!_files->existFile("ETEXT.DAT")) {
int oldGroup = _establishGroup;
_establishGroup = 0;
@@ -233,7 +233,7 @@ void AmazonEngine::loadEstablish(int sub) {
_eseg = _files->loadFile(_estTable[oldGroup]);
_establishCtrlTblOfs = READ_LE_UINT16(_eseg->data());
- int ofs = _establishCtrlTblOfs + (sub * 2);
+ int ofs = _establishCtrlTblOfs + (estabIndex * 2);
int idx = READ_LE_UINT16(_eseg->data() + ofs);
_narateFile = READ_LE_UINT16(_eseg->data() + idx);
_txtPages = READ_LE_UINT16(_eseg->data() + idx + 2);
@@ -253,15 +253,15 @@ void AmazonEngine::loadEstablish(int sub) {
}
}
-void AmazonEngine::doEstablish(int estabIndex, int sub) {
+void AmazonEngine::doEstablish(int screenId, int estabIndex) {
_establishMode = 1;
_screen->forceFadeOut();
_screen->clearScreen();
_screen->setPanel(3);
- if (sub != -1) {
- _files->loadScreen(95, sub);
+ if (screenId != -1) {
+ _files->loadScreen(95, screenId);
_buffer2.copyBuffer(_screen);
}
diff --git a/engines/access/amazon/amazon_game.h b/engines/access/amazon/amazon_game.h
index 575b3d14b7..3929eb1485 100644
--- a/engines/access/amazon/amazon_game.h
+++ b/engines/access/amazon/amazon_game.h
@@ -99,9 +99,9 @@ private:
*/
void setupGame();
- void loadEstablish(int sub);
- void doEstablish(int estabIndex, int sub);
- void establishCenter(int esatabIndex, int sub);
+ void loadEstablish(int estabIndex);
+ void doEstablish(int screenId, int estabIndex);
+ void establishCenter(int screenId, int esatabIndex);
protected:
/**
diff --git a/engines/access/char.cpp b/engines/access/char.cpp
index aebf63a131..8ce43a5730 100644
--- a/engines/access/char.cpp
+++ b/engines/access/char.cpp
@@ -90,7 +90,7 @@ void CharManager::loadChar(int charId) {
_vm->_establishFlag = true;
if (!_vm->_establishTable[ce._estabIndex]) {
_vm->_establishTable[ce._estabIndex] = true;
- _vm->establish(ce._estabIndex, 0);
+ _vm->establish(0, ce._estabIndex);
}
}
diff --git a/engines/access/room.cpp b/engines/access/room.cpp
index 7df7ca9251..3696a4cadf 100644
--- a/engines/access/room.cpp
+++ b/engines/access/room.cpp
@@ -171,7 +171,7 @@ void Room::loadRoomData(const byte *roomData) {
_vm->_establishFlag = true;
if (_vm->_establishTable[roomInfo._estIndex] != 1) {
_vm->_establishTable[roomInfo._estIndex] = 1;
- _vm->establish(roomInfo._estIndex, 0);
+ _vm->establish(0, roomInfo._estIndex);
}
}