aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-06-10 22:26:36 +0200
committerThierry Crozat2019-07-28 15:09:14 +0100
commit2810974533bb5c5ab90e29770716a87cff30871f (patch)
tree5f736145b07dd3a33580dcc1701b0ea58a518836
parent002134f3e148a19c5ba1fd8ca58a65d0ccbd4e9f (diff)
downloadscummvm-rg350-2810974533bb5c5ab90e29770716a87cff30871f.tar.gz
scummvm-rg350-2810974533bb5c5ab90e29770716a87cff30871f.tar.bz2
scummvm-rg350-2810974533bb5c5ab90e29770716a87cff30871f.zip
SUPERNOVA2: Fix a few bugs in pyramid
This fixes a few minor bugs (a few lines each): 1. Going close to equation rendered empty wall instead 2. Door in the Floordoor room newer showed up 3. Balls in CoffinRoom were inside each other, so one of them couldn't be clicked.
-rw-r--r--engines/supernova2/rooms.cpp16
-rw-r--r--engines/supernova2/rooms.h2
2 files changed, 10 insertions, 8 deletions
diff --git a/engines/supernova2/rooms.cpp b/engines/supernova2/rooms.cpp
index 1c12155945..9f72170fdd 100644
--- a/engines/supernova2/rooms.cpp
+++ b/engines/supernova2/rooms.cpp
@@ -2300,13 +2300,15 @@ PyrEntrance::PyrEntrance(Supernova2Engine *vm, GameManager *gm) {
}
void PyrEntrance::onEntrance() {
- if (_gm->_state._pyraS != 8 || _gm->_state._pyraZ != 5)
- _waitTime = 0;
+ if (_gm->_state._pyraS == 8 && _gm->_state._pyraZ == 5) {
+ _gm->setAnimationTimer(1);
+ _waitTime = g_system->getMillis() + 60000;
+ }
}
void PyrEntrance::animation() {
if (_gm->_state._pyraS == 8 && _gm->_state._pyraZ == 5) {
- if (_waitTime == 700) { // around 1 minute
+ if (g_system->getMillis() >= _waitTime) { // around 1 minute
_vm->renderMessage(kStringPyramid4);
_gm->waitOnInput(_gm->_messageDuration);
_vm->removeMessage();
@@ -2335,7 +2337,6 @@ void PyrEntrance::animation() {
_gm->_rooms[FLOORDOOR]->setSectionVisible(kMaxSection - 1, kShownTrue);
}
else {
- _waitTime++;
_gm->setAnimationTimer(1);
}
}
@@ -2387,6 +2388,7 @@ bool PyrEntrance::interact(Action verb, Object &obj1, Object &obj2) {
_gm->_state._pyraZ == roomTab[i]._z &&
_gm->_state._pyraDirection == roomTab[i]._r) {
_gm->changeRoom(roomTab[i]._exitRoom);
+ _gm->_newRoom = true;
return true;
}
}
@@ -2863,7 +2865,7 @@ Formula1F::Formula1F(Supernova2Engine *vm, GameManager *gm) {
_objectState[0] = Object(_id, kStringRight, kStringDefaultDescription, G_RIGHT, EXIT, 12, 12, 0, PYR_ENTRANCE, 14);
_objectState[1] = Object(_id, kStringLeft, kStringDefaultDescription, G_LEFT, EXIT, 11, 11, 0, PYR_ENTRANCE, 10);
- _objectState[2] = Object(_id, kStringInscription, kStringInscriptionDescription, DOOR, EXIT, 1, 1, 0, PYR_ENTRANCE, 2);
+ _objectState[2] = Object(_id, kStringInscription, kStringInscriptionDescription, CORRIDOR, EXIT, 1, 1, 0, PYR_ENTRANCE, 2);
}
void Formula1F::onEntrance() {
@@ -2926,7 +2928,7 @@ Formula2F::Formula2F(Supernova2Engine *vm, GameManager *gm) {
_objectState[0] = Object(_id, kStringRight, kStringDefaultDescription, G_RIGHT, EXIT, 12, 12, 0, PYR_ENTRANCE, 14);
_objectState[1] = Object(_id, kStringLeft, kStringDefaultDescription, G_LEFT, EXIT, 11, 11, 0, PYR_ENTRANCE, 10);
- _objectState[2] = Object(_id, kStringInscription, kStringInscriptionDescription, DOOR, EXIT, 2, 2, 0, PYR_ENTRANCE, 2);
+ _objectState[2] = Object(_id, kStringInscription, kStringInscriptionDescription, CORRIDOR, EXIT, 2, 2, 0, PYR_ENTRANCE, 2);
}
void Formula2F::onEntrance() {
@@ -3670,7 +3672,7 @@ CoffinRoom::CoffinRoom(Supernova2Engine *vm, GameManager *gm) {
_objectState[2] = Object(_id, kStringToothbrush, kStringToothbrushDescription1, NULLOBJECT, NULLTYPE, 1, 1, 0);
_objectState[3] = Object(_id, kStringToothpaste, kStringToothbrushDescription1, NULLOBJECT, NULLTYPE, 2, 2, 0);
_objectState[4] = Object(_id, kStringBall, kStringBallDescription, L_BALL, NULLTYPE, 3, 3, 0);
- _objectState[5] = Object(_id, kStringBall, kStringBallDescription, R_BALL, NULLTYPE, 3, 3, 0);
+ _objectState[5] = Object(_id, kStringBall, kStringBallDescription, R_BALL, NULLTYPE, 4, 4, 0);
}
void CoffinRoom::onEntrance() {
diff --git a/engines/supernova2/rooms.h b/engines/supernova2/rooms.h
index 29f00d3a0c..8194b02701 100644
--- a/engines/supernova2/rooms.h
+++ b/engines/supernova2/rooms.h
@@ -250,7 +250,7 @@ public:
virtual bool interact(Action verb, Object &obj1, Object &obj2);
private:
- int _waitTime;
+ uint32 _waitTime;
};
class Upstairs1 : public Room {