Skip to content

Commit

Permalink
ACCESS: Implement plotPit()
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke authored and dreammaster committed Dec 13, 2014
1 parent b874ddd commit c3660ac
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
41 changes: 38 additions & 3 deletions engines/access/amazon/amazon_scripts.cpp
Expand Up @@ -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) {
Expand Down Expand Up @@ -958,7 +993,7 @@ void AmazonScripts::ANT() {
}
}
}
PLOTPIT(idx, buf);
plotPit(idx, buf);
}

if (!_game->_antDieFl) {
Expand Down
3 changes: 2 additions & 1 deletion engines/access/amazon/amazon_scripts.h
Expand Up @@ -75,7 +75,8 @@ class AmazonScripts: public Scripts {
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);
Expand Down

0 comments on commit c3660ac

Please sign in to comment.