Skip to content

Commit

Permalink
ACCESS: Implement loadNSound, add a warning about another special opc…
Browse files Browse the repository at this point in the history
…ode used by the demo
  • Loading branch information
Strangerke authored and dreammaster committed Dec 13, 2014
1 parent 771bcc8 commit 580fec4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion engines/access/amazon/amazon_scripts.cpp
Expand Up @@ -246,6 +246,11 @@ void AmazonScripts::loadBackground(int param1, int param2) {
_vm->_screen->forceFadeIn();
}

void AmazonScripts::loadNSound(int param1, int param2) {
Resource *sound = _vm->_files->loadFile(param1, param2);
_vm->_sound->_soundTable.push_back(SoundEntry(sound, 1));
}

void AmazonScripts::setInactive() {
_game->_rawInactiveX = _vm->_player->_rawPlayer.x;
_game->_rawInactiveY = _vm->_player->_rawPlayer.y;
Expand Down Expand Up @@ -314,6 +319,9 @@ void AmazonScripts::plotInactive() {

void AmazonScripts::executeSpecial(int commandIndex, int param1, int param2) {
switch (commandIndex) {
case 0:
warning("TODO: DEMO - RESETAN");
break;
case 1:
_vm->establish(param1, param2);
break;
Expand All @@ -328,7 +336,7 @@ void AmazonScripts::executeSpecial(int commandIndex, int param1, int param2) {
break;
case 4:
if (_vm->isDemo())
warning("TODO: DEMO - LOADNSOUND");
loadNSound(param1, param2);
else
setInactive();
break;
Expand Down
1 change: 1 addition & 0 deletions engines/access/amazon/amazon_scripts.h
Expand Up @@ -45,6 +45,7 @@ class AmazonScripts: public Scripts {
void mWhile(int param1);
void loadBackground(int param1, int param2);
void plotInactive();
void loadNSound(int param1, int param2);
void setInactive();
void boatWalls(int param1, int param2);

Expand Down

0 comments on commit 580fec4

Please sign in to comment.