aboutsummaryrefslogtreecommitdiff
path: root/engines/access/amazon
diff options
context:
space:
mode:
authorStrangerke2014-11-12 08:37:37 +0100
committerPaul Gilbert2014-12-12 22:31:19 -0500
commitc3660acf63e684bdb90efd4cb7fb1fedd3ed1ea0 (patch)
tree7bd618ef6dbbd82279972523efc8f02fcc72a84f /engines/access/amazon
parentb874ddd31573ee491fd0780e81810913c7a9ff2c (diff)
downloadscummvm-rg350-c3660acf63e684bdb90efd4cb7fb1fedd3ed1ea0.tar.gz
scummvm-rg350-c3660acf63e684bdb90efd4cb7fb1fedd3ed1ea0.tar.bz2
scummvm-rg350-c3660acf63e684bdb90efd4cb7fb1fedd3ed1ea0.zip
ACCESS: Implement plotPit()
Diffstat (limited to 'engines/access/amazon')
-rw-r--r--engines/access/amazon/amazon_scripts.cpp41
-rw-r--r--engines/access/amazon/amazon_scripts.h3
2 files changed, 40 insertions, 4 deletions
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp
index 8553babccf..d0b4d7ae2a 100644
--- a/engines/access/amazon/amazon_scripts.cpp
+++ b/engines/access/amazon/amazon_scripts.cpp
@@ -768,8 +768,43 @@ void AmazonScripts::setInactive() {
mWhile(_game->_rawInactiveY);
}
-void AmazonScripts::PLOTPIT(int idx, const int *buf) {
- warning("TODO: PLOTPIT");
+void AmazonScripts::plotTorchSpear(int indx, const int *buf) {
+ int idx = indx;
+
+ ImageEntry ie;
+ ie._flags = 8;
+ ie._spritesPtr = _pObject[62];
+ ie._frameNumber = buf[(idx / 2)];
+ ie._position = Common::Point(_game->_pitPos.x + buf[(idx / 2) + 1], _game->_pitPos.y + buf[(idx / 2) + 2]);
+ ie._offsetY = 255;
+ _vm->_images.addToList(ie);
+}
+
+void AmazonScripts::plotPit(int indx, const int *buf) {
+ int idx = indx;
+ ImageEntry ie;
+ ie._flags = 8;
+ ie._spritesPtr = _pObject[62];
+ ie._frameNumber = buf[(idx / 2)];
+ ie._position = Common::Point(_game->_pitPos.x, _game->_pitPos.y);
+ ie._offsetY = _game->_pitPos.y;
+ _vm->_images.addToList(ie);
+
+ _vm->_player->_rawPlayer = _game->_pitPos;
+ if (_vm->_inventory->_inv[76]._value == 1) {
+ idx = _game->_torchCel;
+ buf = Amazon::TORCH;
+ _vm->_timers[14]._flag = 1;
+ idx += 6;
+ if (buf[idx / 2] == -1)
+ idx = 0;
+ _game->_torchCel = idx;
+ plotTorchSpear(idx, buf);
+ } else if (!_game->_stabFl && (_vm->_inventory->_inv[78]._value == 1)) {
+ idx = 0;
+ buf = Amazon::SPEAR;
+ plotTorchSpear(idx, buf);
+ }
}
int AmazonScripts::antHandleRight(int indx, const int *buf) {
@@ -958,7 +993,7 @@ void AmazonScripts::ANT() {
}
}
}
- PLOTPIT(idx, buf);
+ plotPit(idx, buf);
}
if (!_game->_antDieFl) {
diff --git a/engines/access/amazon/amazon_scripts.h b/engines/access/amazon/amazon_scripts.h
index fc6fb0a7e3..7e42c0ca36 100644
--- a/engines/access/amazon/amazon_scripts.h
+++ b/engines/access/amazon/amazon_scripts.h
@@ -75,7 +75,8 @@ protected:
void guardSee();
void setGuardFrame();
void guard();
- void PLOTPIT(int idx, const int *buf);
+ void plotTorchSpear(int indx, const int *buf);
+ void plotPit(int indx, const int *buf);
int antHandleRight(int indx, const int *buf);
int antHandleLeft(int indx, const int *buf);
int antHandleStab(int indx, const int *buf);