aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorSven Hesse2011-09-04 14:25:55 +0200
committerSven Hesse2011-09-14 18:54:28 +0200
commit00a5ccfce09d02e55515ef9e0e25a7e7b1f74c39 (patch)
treec0a982934af8ec34de461dad0fbe91253e667529 /engines/gob
parent358f55db402d1c8acd72c65f76b37a310575809d (diff)
downloadscummvm-rg350-00a5ccfce09d02e55515ef9e0e25a7e7b1f74c39.tar.gz
scummvm-rg350-00a5ccfce09d02e55515ef9e0e25a7e7b1f74c39.tar.bz2
scummvm-rg350-00a5ccfce09d02e55515ef9e0e25a7e7b1f74c39.zip
GOB: Add stubby "Diving" white pearl drawing
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/minigames/geisha/diving.cpp15
-rw-r--r--engines/gob/minigames/geisha/diving.h2
2 files changed, 15 insertions, 2 deletions
diff --git a/engines/gob/minigames/geisha/diving.cpp b/engines/gob/minigames/geisha/diving.cpp
index d2f51e645c..c3a8a30328 100644
--- a/engines/gob/minigames/geisha/diving.cpp
+++ b/engines/gob/minigames/geisha/diving.cpp
@@ -38,7 +38,7 @@ namespace Geisha {
Diving::Diving(GobEngine *vm) : _vm(vm), _background(0),
_objects(0), _gui(0), _oko(0), _lungs(0), _heart(0),
- _blackPearl(0), _blackPearlCount(0) {
+ _blackPearl(0), _whitePearlCount(0), _blackPearlCount(0) {
_blackPearl = new Surface(11, 8, 1);
}
@@ -93,7 +93,7 @@ bool Diving::play(uint16 playerCount, bool hasPearlLocation) {
_vm->_util->waitEndFrame();
_vm->_util->processInput();
- if (_blackPearlCount >= 2)
+ if ((_whitePearlCount >= 20) || (_blackPearlCount >= 2))
break;
}
@@ -181,6 +181,17 @@ void Diving::foundBlackPearl() {
}
}
+void Diving::foundWhitePearl() {
+ _whitePearlCount++;
+
+ int16 x = 54 + (_whitePearlCount - 1) * 8;
+ if (_whitePearlCount > 10)
+ x += 48;
+
+ _background->drawLayer(*_vm->_draw->_backSurface, 0, 2, x, 177, 0);
+ _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, x, 177, x + 3, 180);
+}
+
} // End of namespace Geisha
} // End of namespace Gob
diff --git a/engines/gob/minigames/geisha/diving.h b/engines/gob/minigames/geisha/diving.h
index 96a8a74903..9975b0f53f 100644
--- a/engines/gob/minigames/geisha/diving.h
+++ b/engines/gob/minigames/geisha/diving.h
@@ -57,6 +57,7 @@ private:
Surface *_blackPearl;
+ uint8 _whitePearlCount;
uint8 _blackPearlCount;
void init();
@@ -65,6 +66,7 @@ private:
void initScreen();
void foundBlackPearl();
+ void foundWhitePearl();
};
} // End of namespace Geisha