aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/draw-manager.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp
index 896f9a16f9..4845be664a 100644
--- a/engines/hdb/draw-manager.cpp
+++ b/engines/hdb/draw-manager.cpp
@@ -168,7 +168,7 @@ void DrawMan::setSky(int skyIndex) {
setup3DStarsLeft();
return;
} else if (skyIndex == _tileSkyStars) {
- warning("STUB: DRAWMAN::setSky: getPicture( CLOUDY_SKIES )");
+ _skyClouds = getPicture("cloudy_skies");
return;
}
}
@@ -214,6 +214,30 @@ void DrawMan::draw3DStarsLeft() {
}
}
+void DrawMan::drawSky() {
+ int tile = _skyTiles[_currentSky - 1];
+
+ if (tile == _tileSkyStars) {
+ draw3DStars();
+ }
+ else if (tile == _tileSkyStarsLeft) {
+ draw3DStarsLeft();
+ }
+ else if (tile == _tileSkyClouds) {
+ static int offset = 0, wait = 0;
+ for (int j = -64; j < kScreenHeight; j += 64) {
+ for (int i = -64; i < kScreenWidth; i += 64) {
+ _skyClouds->draw(i + offset, j + offset);
+ }
+ }
+ wait--;
+ if (wait < 1) {
+ offset = (offset + 1) & 63;
+ wait = 5;
+ }
+ }
+}
+
Picture::~Picture() {
_surface.free();
}