aboutsummaryrefslogtreecommitdiff
path: root/engines/access/scripts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/access/scripts.cpp')
-rw-r--r--engines/access/scripts.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp
index 41dd5cc0d0..38313640f1 100644
--- a/engines/access/scripts.cpp
+++ b/engines/access/scripts.cpp
@@ -164,7 +164,7 @@ void Scripts::charLoop() {
_sequence = 2000;
searchForSequence();
_vm->_images.clear();
- _vm->_buffer2.blitFrom(_vm->_buffer1);
+ _vm->_buffer2.copyBlock(&_vm->_buffer1, Common::Rect(0, 0, _vm->_buffer2.w, _vm->_buffer2.h));
_vm->_newRects.clear();
executeScript();
@@ -536,6 +536,7 @@ void Scripts::cmdDispInv_v1() {
void Scripts::cmdDispInv_v2() {
_vm->_inventory->newDisplayInv();
+ _vm->_events->forceSetCursor(CURSOR_ARROW);
}
void Scripts::cmdSetAbout() {
@@ -689,19 +690,20 @@ void Scripts::cmdDoTravel() {
int idx = _vm->_travelBox->_tempListIdx[boxX];
if (Martian::_byte1EEB5[idx] != _vm->_byte26CB5) {
_vm->_bubbleBox->_bubbleTitle = "_travel";
- _vm->_bubbleBox->printString("YOU CAN'T GET THERE FROM HERE.");
+ _vm->_bubbleBox->printString(_vm->_res->CANT_GET_THERE);
continue;
}
if (_vm->_player->_roomNumber != idx) {
_vm->_player->_roomNumber = idx;
_vm->_room->_function = FN_CLEAR1;
- if (Martian::_travelPos[idx][0] == -1) {
+ if (_vm->_res->ROOMTBL[idx]._travelPos.x == -1) {
+ // For x == -1, the y value is a script Id, not a co-ordinate
_vm->_player->_roomNumber = idx;
_vm->_room->_conFlag = true;
- _vm->_scripts->converse1(Martian::_travelPos[idx][1]);
+ _vm->_scripts->converse1(_vm->_res->ROOMTBL[idx]._travelPos.y);
return;
}
- _vm->_player->_rawPlayer = Common::Point(Martian::_travelPos[idx][0], Martian::_travelPos[idx][1]);
+ _vm->_player->_rawPlayer = _vm->_res->ROOMTBL[idx]._travelPos;
cmdRetPos();
return;
}
@@ -769,6 +771,11 @@ void Scripts::cmdSpecial() {
if (_specialFunction == 1) {
_vm->_screen->restorePalette();
_vm->_room->_function = FN_RELOAD;
+
+ // WORKAROUND: This fixes scene establishment being re-shown
+ // when restoring savegames in rooms which have one
+ if (_vm->getGameID() == GType_Amazon && !_vm->isCD())
+ _vm->_establishTable[p2] = true;
}
}
@@ -998,10 +1005,7 @@ void Scripts::cmdFreeSound() {
} while (!_vm->shouldQuit() && sound.isSFXPlaying());
// Free the sounds
- while (sound._soundTable.size() > 0) {
- delete sound._soundTable[0]._res;
- sound._soundTable.remove_at(0);
- }
+ sound.freeSounds();
}
}
@@ -1033,7 +1037,7 @@ void Scripts::cmdPrintWatch() {
}
void Scripts::cmdDispAbout() {
- _vm->_travelBox->getList(Martian::_askTBL, _vm->_ask);
+ _vm->_travelBox->getList(Martian::ASK_TBL, _vm->_ask);
int btnSelected = 0;
int boxX = _vm->_aboutBox->doBox_v1(_vm->_startAboutItem, _vm->_startAboutBox, btnSelected);
_vm->_startAboutItem = _vm->_boxDataStart;