diff options
author | Paul Gilbert | 2015-01-18 20:11:31 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-01-18 20:11:31 -0500 |
commit | e4c473630655bd9b68d925b338559706ea927497 (patch) | |
tree | d26291011ec9bdb5f8799f5192d4027b742bf57c /engines/xeen | |
parent | ecdf6412a6d74853ff20cbb7ea5abbdeaa789b63 (diff) | |
download | scummvm-rg350-e4c473630655bd9b68d925b338559706ea927497.tar.gz scummvm-rg350-e4c473630655bd9b68d925b338559706ea927497.tar.bz2 scummvm-rg350-e4c473630655bd9b68d925b338559706ea927497.zip |
XEEN: Renaming of flags and surface display
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/interface.cpp | 3 | ||||
-rw-r--r-- | engines/xeen/interface_map.cpp | 23 | ||||
-rw-r--r-- | engines/xeen/interface_map.h | 7 | ||||
-rw-r--r-- | engines/xeen/map.cpp | 5 | ||||
-rw-r--r-- | engines/xeen/map.h | 5 | ||||
-rw-r--r-- | engines/xeen/resources.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/resources.h | 2 |
7 files changed, 25 insertions, 22 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index 8d8b4ab5b9..a2c42a7b40 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -310,7 +310,6 @@ void Interface::setupBackground() { void Interface::assembleBorder() { Screen &screen = *_vm->_screen; - Window &gameWindow = screen._windows[28]; // Draw the outer frame _globalSprites.draw(screen._windows[0], 0, Common::Point(8, 8)); @@ -548,7 +547,7 @@ void Interface::draw3d(bool updateFlag) { _flipUIFrame = (_flipUIFrame + 1) % 4; if (_flipUIFrame == 0) - _flipWtr = !_flipWtr; + _flipWater = !_flipWater; if (_tillMove && (_vm->_mode == MODE_1 || _vm->_mode == MODE_2) && !_flag1 && _vm->_moveMonsters) { if (--_tillMove == 0) diff --git a/engines/xeen/interface_map.cpp b/engines/xeen/interface_map.cpp index d34373ea3d..ddc311bae0 100644 --- a/engines/xeen/interface_map.cpp +++ b/engines/xeen/interface_map.cpp @@ -181,6 +181,7 @@ IndoorDrawList::IndoorDrawList() : _fwl_3F2R(_data[ 91]), _fwl_3F1R(_data[ 90]), _fwl_3F( _data[ 89]), _fwl_3F1L(_data[ 88]), _fwl_3F2L(_data[ 87]), _fwl_1F( _data[147]), _fwl_1F1R(_data[145]), _fwl_1F1L(_data[143]), + _groundTiles(&_data[3]), _objects0(_data[149]), _objects1(_data[125]), _objects2(_data[126]), _objects3(_data[127]), _objects4(_data[97]), _objects5(_data[98]), _objects6(_data[99]), _objects7(_data[55]), _objects8(_data[56]), @@ -364,10 +365,10 @@ InterfaceMap::InterfaceMap(XeenEngine *vm): _vm(vm) { Common::fill(&_wp[0], &_wp[20], 0); Common::fill(&_wo[0], &_wo[308], 0); _overallFrame = 0; - _flipWtr = false; - _flipWall = false; - _flipSky = false; + _flipWater = false; _flipGround = false; + _flipSky = false; + _flipDefaultGround = false; _isShooting = false; _charsShooting = false; _objNumber = 0; @@ -1106,20 +1107,22 @@ void InterfaceMap::drawIndoors() { Map &map = *_vm->_map; int surfaceId; + // Draw any surface tiles on top of the default ground for (int cellIndex = 0; cellIndex < 25; ++cellIndex) { map.getCell(DRAW_NUMBERS[cellIndex]); - DrawStruct &drawStruct = _indoorList[3 + cellIndex]; + DrawStruct &drawStruct = _indoorList._groundTiles[cellIndex]; if (!map._surfaceSprites[map._currentSurfaceId].empty()) drawStruct._sprites = &map._surfaceSprites[map._currentSurfaceId]; surfaceId = map.mazeData()._surfaceTypes[map._currentSurfaceId]; - if (surfaceId == 0 || surfaceId == 5 || surfaceId == 12) { - drawStruct._flags = _flipWtr ? 1 : 0; - drawStruct._frame = DRAW_FRAMES[cellIndex][_flipWtr ? 1 : 0]; + if (surfaceId == SURFTYPE_WATER || surfaceId == SURFTYPE_LAVA || + surfaceId == SURFTYPE_SEWER) { + drawStruct._flags = _flipWater ? 1 : 0; + drawStruct._frame = DRAW_FRAMES[cellIndex][_flipWater ? 1 : 0]; } else { - drawStruct._frame = DRAW_FRAMES[cellIndex][_flipWall ? 1 : 0]; - drawStruct._flags = _flipWall ? SPRFLAG_HORIZ_FLIPPED : 0; + drawStruct._frame = DRAW_FRAMES[cellIndex][_flipGround ? 1 : 0]; + drawStruct._flags = _flipGround ? SPRFLAG_HORIZ_FLIPPED : 0; } } @@ -1932,7 +1935,7 @@ void InterfaceMap::drawIndoors() { } _indoorList._sky._flags = _flipSky ? SPRFLAG_HORIZ_FLIPPED : 0; - _indoorList._ground._flags = _flipGround ? SPRFLAG_HORIZ_FLIPPED : 0; + _indoorList._ground._flags = _flipDefaultGround ? SPRFLAG_HORIZ_FLIPPED : 0; _indoorList._horizon._frame = 7; // Finally draw the darn indoor scene diff --git a/engines/xeen/interface_map.h b/engines/xeen/interface_map.h index 2376f8f55b..fd807a03d2 100644 --- a/engines/xeen/interface_map.h +++ b/engines/xeen/interface_map.h @@ -53,6 +53,7 @@ public: DrawStruct &_sky; DrawStruct &_ground; DrawStruct &_horizon; + DrawStruct * const _groundTiles; DrawStruct &_swl_0F1R, &_swl_0F1L, &_swl_1F1R, &_swl_1F1L, &_swl_2F2R, &_swl_2F1R, &_swl_2F1L, &_swl_2F2L, &_swl_3F1R, &_swl_3F2R, &_swl_3F3R, &_swl_3F4R, @@ -92,10 +93,10 @@ protected: int8 _wp[20]; byte _wo[308]; int _overallFrame; - bool _flipWtr; - bool _flipWall; - bool _flipSky; + bool _flipWater; bool _flipGround; + bool _flipSky; + bool _flipDefaultGround; bool _isShooting; bool _charsShooting; int _objNumber; diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp index 0623772953..d39b8f5199 100644 --- a/engines/xeen/map.cpp +++ b/engines/xeen/map.cpp @@ -877,7 +877,6 @@ void Map::load(int mapId) { Screen &screen = *_vm->_screen; IndoorDrawList &indoorList = _vm->_interface->_indoorList; OutdoorDrawList &outdoorList = _vm->_interface->_outdoorList; - int sideNumber = 0; if (_vm->_falling) { Window &w = screen._windows[9]; @@ -1097,7 +1096,7 @@ void Map::load(int mapId) { _surfaceSprites[i].clear(); if (i != 0 && _mazeData[0]._wallTypes[i] != 0) - _surfaceSprites[i].load(OUTDOOR_SURFACES[_mazeData[0]._surfaceTypes[i]]); + _surfaceSprites[i].load(SURFACE_NAMES[_mazeData[0]._surfaceTypes[i]]); } } else { warning("TODO"); // Sound loading @@ -1114,7 +1113,7 @@ void Map::load(int mapId) { _surfaceSprites[i].clear(); if (_mazeData[0]._surfaceTypes[i] != 0 || i == 4) - _surfaceSprites[i].load(OUTDOOR_SURFACES[i]); + _surfaceSprites[i].load(SURFACE_NAMES[i]); } for (int i = 0; i < TOTAL_SURFACES; ++i) diff --git a/engines/xeen/map.h b/engines/xeen/map.h index 3ade915d4b..c97de72a23 100644 --- a/engines/xeen/map.h +++ b/engines/xeen/map.h @@ -159,9 +159,10 @@ enum MazeFlags { enum MazeFlags2 { FLAG_IS_OUTDOORS = 0x8000, FLAG_IS_DARK = 0x4000 }; enum SurfaceType { - SURFTYPE_DEFAULT = 0, SURFTYPE_DIRT = 1, SURFTYPE_GRASS = 2, + SURFTYPE_DEFAULT = 0, + SURFTYPE_WATER = 0, SURFTYPE_DIRT = 1, SURFTYPE_GRASS = 2, SURFTYPE_SNOW = 3, SURFTYPE_SWAMP = 4, SURFTYPE_LAVA = 5, - SURFTYPE_DESERT = 6, SURFTYPE_ROAD = 7, SURFTYPE_WATER = 8, + SURFTYPE_DESERT = 6, SURFTYPE_ROAD = 7, SURFTYPE_DWATER = 8, SURFTYPE_TFLR = 9, SURFTYPE_SKY = 10, SURFTYPE_CROAD = 11, SURFTYPE_SEWER = 12, SURFTYPE_CLOUD = 13, SURFTYPE_SCORCH = 14, SURFTYPE_SPACE = 15 diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp index 21a967dbf1..51f26fe668 100644 --- a/engines/xeen/resources.cpp +++ b/engines/xeen/resources.cpp @@ -76,7 +76,7 @@ const char *const SURFACE_TYPE_NAMES[15] = { "dedltree", "dedltree" }; -const char *const OUTDOOR_SURFACES[16] = { +const char *const SURFACE_NAMES[16] = { "water.srf", "dirt.srf", "grass.srf", "snow.srf", "swamp.srf", "lava.srf", "desert.srf", "road.srf", "dwater.srf", "tflr.srf", "sky.srf", "croad.srf", "sewer.srf", "cloud.srf", "scortch.srf", diff --git a/engines/xeen/resources.h b/engines/xeen/resources.h index 2160d55c53..0ef9211288 100644 --- a/engines/xeen/resources.h +++ b/engines/xeen/resources.h @@ -36,7 +36,7 @@ extern const char *const TERRAIN_TYPES[6]; extern const char *const SURFACE_TYPE_NAMES[15]; -extern const char *const OUTDOOR_SURFACES[16]; +extern const char *const SURFACE_NAMES[16]; extern const byte SYMBOLS[20][64]; |