aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-08 15:10:30 +0200
committerEugene Sandulenko2019-09-03 17:17:14 +0200
commita7d78a1b00ddb11c9f3e5ecc03afa22e899da98e (patch)
treea71f26349f5f9ce599675574800de60fc84ec727 /engines
parent168ca5fc0d831ef8fbba8e697e5b4b3f5cdc204b (diff)
downloadscummvm-rg350-a7d78a1b00ddb11c9f3e5ecc03afa22e899da98e.tar.gz
scummvm-rg350-a7d78a1b00ddb11c9f3e5ecc03afa22e899da98e.tar.bz2
scummvm-rg350-a7d78a1b00ddb11c9f3e5ecc03afa22e899da98e.zip
HDB: Fix Sky handling
Now sky appears on Map 29
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/gfx.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index a093389fa2..3303a5bed1 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -70,7 +70,7 @@ bool Gfx::init() {
_tLookupArray[index].skyIndex = 0;
_tLookupArray[index].animIndex = index;
// Check if the loaded Tile is a Sky Tile
- if (((Common::String)tileData[index]).contains("sky") && (skyIndex < kMaxSkies)) {
+ if (strstr(tileData[index], "sky") && (skyIndex < kMaxSkies)) {
_tLookupArray[index].skyIndex = skyIndex + 1;
_skyTiles[skyIndex] = index;
skyIndex++;
@@ -103,14 +103,15 @@ bool Gfx::init() {
// Init Sky Data
_currentSky = 0;
- _tileSkyStars = getTileIndex("t32_sky_stars");
- _tileSkyStarsLeft = getTileIndex("t32_sky_stars_left_slow");
- _tileSkyClouds = getTileIndex("t32_sky_clouds"); // Not completely sure about this filename.
+ _tileSkyStars = getTileIndex(TILE_SKY_STARS);
+ _tileSkyStarsLeft = getTileIndex(TILE_SKY_STARS_LEFT_SLOW);
+ _tileSkyClouds = getTileIndex(TILE_SKY_CLOUDS); // Not completely sure about this filename.
_skyClouds = NULL;
/*
TODO: Setup Gamma Table
*/
+ warning("STUB: Gfx::init() gamma missing");
// Load Mouse Pointer and Display Cursor
_mousePointer[0] = loadPic(PIC_MOUSE_CURSOR1);
@@ -459,11 +460,11 @@ void Gfx::setSky(int skyIndex) {
if (tileIndex == _tileSkyStars) {
setup3DStars();
return;
- } else if (skyIndex == _tileSkyStarsLeft) {
+ } else if (tileIndex == _tileSkyStarsLeft) {
setup3DStarsLeft();
return;
- } else if (skyIndex == _tileSkyStars) {
- _skyClouds = getPicture("cloudy_skies");
+ } else if (tileIndex == _tileSkyClouds) {
+ _skyClouds = getPicture(CLOUDY_SKIES);
return;
}
}
@@ -514,11 +515,9 @@ void Gfx::drawSky() {
if (tile == _tileSkyStars) {
draw3DStars();
- }
- else if (tile == _tileSkyStarsLeft) {
+ } else if (tile == _tileSkyStarsLeft) {
draw3DStarsLeft();
- }
- else if (tile == _tileSkyClouds) {
+ } 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) {