aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-09-11 23:59:17 +0200
committerStrangerke2014-09-11 23:59:17 +0200
commit6f03127512a31db27a43e6ca899a909b618fff7f (patch)
tree5266a95f5b230b295f1b0bbda9c2daa5ccc23385 /engines
parent984858b6382de2e2788fca1469fb380b036989ba (diff)
downloadscummvm-rg350-6f03127512a31db27a43e6ca899a909b618fff7f.tar.gz
scummvm-rg350-6f03127512a31db27a43e6ca899a909b618fff7f.tar.bz2
scummvm-rg350-6f03127512a31db27a43e6ca899a909b618fff7f.zip
ACCESS: Implement setInactive and mWhile
Diffstat (limited to 'engines')
-rw-r--r--engines/access/amazon/amazon_game.cpp2
-rw-r--r--engines/access/amazon/amazon_game.h7
-rw-r--r--engines/access/amazon/amazon_scripts.cpp43
-rw-r--r--engines/access/amazon/amazon_scripts.h3
4 files changed, 51 insertions, 4 deletions
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
index 0725863444..66b77d66d2 100644
--- a/engines/access/amazon/amazon_game.cpp
+++ b/engines/access/amazon/amazon_game.cpp
@@ -37,7 +37,9 @@ AmazonEngine::AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc)
_riverFlag(_flags[185]), _aniOutFlag(_flags[195]), _badEnd(_flags[218]),
_noHints(_flags[219]), _aniFlag(_flags[229]), _allenFlag(_flags[237]),
_noSound(_flags[239]) {
+
_skipStart = false;
+ _charSegSwitch = false;
_canoeLane = 0;
_canoeYPos = 0;
diff --git a/engines/access/amazon/amazon_game.h b/engines/access/amazon/amazon_game.h
index 3929eb1485..d0f1b2d043 100644
--- a/engines/access/amazon/amazon_game.h
+++ b/engines/access/amazon/amazon_game.h
@@ -65,8 +65,6 @@ private:
int _topList;
int _botList;
int _riverIndex;
- int _rawInactiveX;
- int _rawInactiveY;
int _inactiveYOff;
int _esTabTable[100];
@@ -114,6 +112,11 @@ protected:
*/
virtual void synchronize(Common::Serializer &s);
public:
+ bool _charSegSwitch;
+
+ int _rawInactiveX;
+ int _rawInactiveY;
+
// Fields that are mapped to flags
int &_guardLocation;
int &_guardFind;
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp
index 104473ac7d..24cd8b9ab4 100644
--- a/engines/access/amazon/amazon_scripts.cpp
+++ b/engines/access/amazon/amazon_scripts.cpp
@@ -34,6 +34,45 @@ AmazonScripts::AmazonScripts(AccessEngine *vm) : Scripts(vm) {
_game = (AmazonEngine *)_vm;
}
+void AmazonScripts::mWhile(int param1) {
+ switch(param1) {
+ case 1:
+ warning("TODO MWHILE1");
+ break;
+ case 2:
+ warning("TODO FLY");
+ break;
+ case 3:
+ warning("TODO FALL");
+ break;
+ case 4:
+ warning("TODO JWALK");
+ break;
+ case 5:
+ warning("TODO DOOPEN");
+ break;
+ case 6:
+ warning("TODO DOWNRIVER");
+ break;
+ case 7:
+ warning("MWHILE2");
+ break;
+ case 8:
+ warning("JWALK2");
+ break;
+ default:
+ break;
+ }
+}
+
+void AmazonScripts::setInactive() {
+ _game->_rawInactiveX = _vm->_player->_rawPlayer.x;
+ _game->_rawInactiveY = _vm->_player->_rawPlayer.y;
+ _game->_charSegSwitch = false;
+
+ mWhile(_game->_rawInactiveY);
+}
+
void AmazonScripts::executeSpecial(int commandIndex, int param1, int param2) {
switch (commandIndex) {
case 1:
@@ -46,10 +85,10 @@ void AmazonScripts::executeSpecial(int commandIndex, int param1, int param2) {
warning("TODO DOCAST");
break;
case 4:
- warning("TODO SETINACTIVE");
+ setInactive();
break;
case 6:
- warning("TODO MWHILE");
+ mWhile(param1);
break;
case 9:
warning("TODO GUARD");
diff --git a/engines/access/amazon/amazon_scripts.h b/engines/access/amazon/amazon_scripts.h
index 978ef0105c..45caa5fa6b 100644
--- a/engines/access/amazon/amazon_scripts.h
+++ b/engines/access/amazon/amazon_scripts.h
@@ -39,6 +39,9 @@ protected:
virtual void executeSpecial(int commandIndex, int param1, int param2);
virtual void executeCommand(int commandIndex);
+ void mWhile(int param1);
+ void setInactive();
+
void cmdHelp();
void CMDCYCLEBACK();
void CMDCHAPTER();