aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-11-22 00:42:04 +0100
committerPaul Gilbert2014-12-12 22:37:18 -0500
commite1e97ec9ff30435bee991133d8adc009d74979e5 (patch)
treebe6e02b6747062941762a2b1451d7bd871e08ca1 /engines
parent5de214dfc446a7905d48900f49e1da37871f209c (diff)
downloadscummvm-rg350-e1e97ec9ff30435bee991133d8adc009d74979e5.tar.gz
scummvm-rg350-e1e97ec9ff30435bee991133d8adc009d74979e5.tar.bz2
scummvm-rg350-e1e97ec9ff30435bee991133d8adc009d74979e5.zip
ACCESS: Start the implementation of RIVER (WIP)
Diffstat (limited to 'engines')
-rw-r--r--engines/access/amazon/amazon_game.h2
-rw-r--r--engines/access/amazon/amazon_scripts.cpp103
-rw-r--r--engines/access/amazon/amazon_scripts.h12
3 files changed, 114 insertions, 3 deletions
diff --git a/engines/access/amazon/amazon_game.h b/engines/access/amazon/amazon_game.h
index ba81a77658..f062a28dcd 100644
--- a/engines/access/amazon/amazon_game.h
+++ b/engines/access/amazon/amazon_game.h
@@ -59,7 +59,6 @@ private:
int _canoeYPos;
int _hitCount;
int _saveRiver;
- int _hitSafe;
int _topList;
int _botList;
int _riverIndex;
@@ -109,6 +108,7 @@ public:
bool _charSegSwitch;
bool _skipStart;
+ int _hitSafe;
int _rawInactiveX;
int _rawInactiveY;
int _inactiveYOff;
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp
index df6b24b3c2..a45e6f72bd 100644
--- a/engines/access/amazon/amazon_scripts.cpp
+++ b/engines/access/amazon/amazon_scripts.cpp
@@ -1585,6 +1585,107 @@ void AmazonScripts::plotInactive() {
}
+void AmazonScripts::initRiver() {
+ warning("TODO: initRiver()");
+}
+
+bool AmazonScripts::JUMPTEST() {
+ warning("TODO: JUMPTEST();");
+ return true;
+}
+
+void AmazonScripts::RIVERSOUND() {
+ warning("TODO: RIVERSOUND();");
+}
+
+void AmazonScripts::MOVECANOE() {
+ warning("TODO: MOVECANOE();");
+}
+
+void AmazonScripts::UPDATEOBSTACLES() {
+ warning("TODO: UPDATEOBSTACLES()");
+}
+
+void AmazonScripts::SETPHYSX() {
+ warning("TODO: SETPHYSX()");
+}
+
+void AmazonScripts::RIVERCOLLIDE() {
+ warning("TODO: RIVERCOLLIDE()");
+}
+
+void AmazonScripts::SCROLLRIVER1() {
+ warning("TODO: SCROLLRIVER1()");
+}
+
+void AmazonScripts::RIVER() {
+ static const int RIVERDEATH[5] = {22, 23, 24, 25, 26};
+
+ initRiver();
+ while (true) {
+ _vm->_events->_vbCount = 4;
+
+ int bx = _vm->_player->_scrollAmount - _screenVertX;
+ if (_vm->_screen->_scrollX == 0) {
+ _vm->_sound->midiRepeat();
+ if (JUMPTEST()) {
+ CHICKENOUTFLG = false;
+ return;
+ }
+ } else {
+ _vm->_screen->_scrollX -= _vm->_player->_scrollAmount;
+ }
+
+ if (CHICKENOUTFLG) {
+ CHICKENOUTFLG = false;
+ return;
+ }
+
+ _vm->_images.clear();
+ _vm->_animation->animate(0);
+
+ RIVERSOUND();
+ pan();
+ MOVECANOE();
+
+ if (_vm->_room->_function == 1) {
+ CHICKENOUTFLG = false;
+ return;
+ }
+
+ UPDATEOBSTACLES();
+ SETPHYSX();
+ RIVERCOLLIDE();
+ if (_game->_hitSafe != 0)
+ _game->_hitSafe -= 2;
+
+ if (_game->_hitSafe < 0) {
+ warning("TODO: cmdDead(RIVERDEATH[0]);");
+ return;
+ }
+
+ if (_game->_deathFlag) {
+ _game->_deathCount--;
+ if (_game->_deathCount == 0) {
+ warning("TODO: cmdDead(RIVERDEATH[_game->_deathType]);");
+ return;
+ }
+ }
+
+ if (_vm->_events->_mousePos.y >= 24 && _vm->_events->_mousePos.y <= 136) {
+ _vm->_events->hideCursor();
+ SCROLLRIVER1();
+ _vm->_events->pollEvents();
+ } else
+ SCROLLRIVER1();
+
+ while (!_vm->shouldQuit() && _vm->_events->_vbCount > 0) {
+ _vm->_events->pollEvents();
+ g_system->delayMillis(10);
+ }
+ }
+}
+
void AmazonScripts::executeSpecial(int commandIndex, int param1, int param2) {
switch (commandIndex) {
case 1:
@@ -1612,7 +1713,7 @@ void AmazonScripts::executeSpecial(int commandIndex, int param1, int param2) {
plotInactive();
break;
case 13:
- warning("TODO RIVER");
+ RIVER();
break;
case 14:
ANT();
diff --git a/engines/access/amazon/amazon_scripts.h b/engines/access/amazon/amazon_scripts.h
index 06fe56a2bb..5c3fc0fb8c 100644
--- a/engines/access/amazon/amazon_scripts.h
+++ b/engines/access/amazon/amazon_scripts.h
@@ -42,7 +42,8 @@ private:
int _yCam;
int _zCam;
int _pNumObj;
-
+ int _screenVertX;
+ bool CHICKENOUTFLG;
int _pImgNum[32];
SpriteResource *_pObject[32];
@@ -94,6 +95,15 @@ protected:
void ANT();
void doCast(int param1);
void loadBackground(int param1, int param2);
+ void initRiver();
+ bool JUMPTEST();
+ void RIVERSOUND();
+ void MOVECANOE();
+ void UPDATEOBSTACLES();
+ void SETPHYSX();
+ void RIVERCOLLIDE();
+ void SCROLLRIVER1();
+ void RIVER();
void plotInactive();
void setInactive();
void boatWalls(int param1, int param2);