diff options
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/interface.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/interface.h | 3 | ||||
-rw-r--r-- | engines/xeen/interface_map.cpp | 139 | ||||
-rw-r--r-- | engines/xeen/map.cpp | 7 | ||||
-rw-r--r-- | engines/xeen/screen.cpp | 3 |
5 files changed, 77 insertions, 77 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index deb8761b06..4550dac6d8 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -542,7 +542,7 @@ void Interface::draw3d(bool updateFlag) { Map &map = *_vm->_map; Screen &screen = *_vm->_screen; - if (!screen._windows[11]._enabled) + if (screen._windows[11]._enabled) return; _flipUIFrame = (_flipUIFrame + 1) % 4; diff --git a/engines/xeen/interface.h b/engines/xeen/interface.h index 4667592b20..df06f5d86b 100644 --- a/engines/xeen/interface.h +++ b/engines/xeen/interface.h @@ -101,9 +101,6 @@ private: void updateAutoMap(); public: - OutdoorDrawList _outdoorList; - IndoorDrawList _indoorList; -public: Interface(XeenEngine *vm); void setup(); diff --git a/engines/xeen/interface_map.cpp b/engines/xeen/interface_map.cpp index af52178ba1..cc99b3ee86 100644 --- a/engines/xeen/interface_map.cpp +++ b/engines/xeen/interface_map.cpp @@ -56,31 +56,31 @@ OutdoorDrawList::OutdoorDrawList() : _skySprite(_data[1]), _groundSprite(_data[2 _data[25] = DrawStruct(0, 8, 109); _data[26] = DrawStruct(0, 201, 109); _data[27] = DrawStruct(0, 8, 109); - _data[28] = DrawStruct(1, 65472, 61, 14, SPRFLAG_2000); - _data[29] = DrawStruct(1, 65496, 61, 14, 0); - _data[30] = DrawStruct(1, 65520, 61, 14, 0); + _data[28] = DrawStruct(1, -64, 61, 14, SPRFLAG_2000); + _data[29] = DrawStruct(1, -40, 61, 14, 0); + _data[30] = DrawStruct(1, -16, 61, 14, 0); _data[31] = DrawStruct(1, 8, 61, 14, 0); _data[32] = DrawStruct(1, 128, 61, 14, SPRFLAG_HORIZ_FLIPPED | SPRFLAG_2000); _data[33] = DrawStruct(1, 104, 61, 14, SPRFLAG_HORIZ_FLIPPED); _data[34] = DrawStruct(1, 80, 61, 14, SPRFLAG_HORIZ_FLIPPED); _data[35] = DrawStruct(1, 56, 61, 14, SPRFLAG_HORIZ_FLIPPED); _data[36] = DrawStruct(1, 32, 61, 14, 0); - _data[37] = DrawStruct(0, 65527, 61, 14, 0); - _data[38] = DrawStruct(0, 65478, 61, 14, 0); + _data[37] = DrawStruct(0, -9, 61, 14, 0); + _data[38] = DrawStruct(0, -58, 61, 14, 0); _data[39] = DrawStruct(0, 40, 61, 14, 0); - _data[40] = DrawStruct(0, 65454, 61, 14, 0); + _data[40] = DrawStruct(0, -82, 61, 14, 0); _data[41] = DrawStruct(0, 64, 61, 14, 0); - _data[42] = DrawStruct(0, 65495, 61, 14, 0); - _data[43] = DrawStruct(0, 65510, 61, 14, 0); - _data[44] = DrawStruct(0, 65502, 61, 14, 0); - _data[45] = DrawStruct(0, 65520, 61, 14, 0); + _data[42] = DrawStruct(0, -41, 61, 14, 0); + _data[43] = DrawStruct(0, -26, 61, 14, 0); + _data[44] = DrawStruct(0, -34, 61, 14, 0); + _data[45] = DrawStruct(0, -16, 61, 14, 0); _data[46] = DrawStruct(0, 23, 61, 14, 0); _data[47] = DrawStruct(0, 16, 61, 14, 0); - _data[48] = DrawStruct(0, 65478, 61, 14, 0); + _data[48] = DrawStruct(0, -58, 61, 14, 0); _data[49] = DrawStruct(0, 40, 61, 14, 0); - _data[50] = DrawStruct(0, 65519, 61, 14, 0); - _data[51] = DrawStruct(0, 65535, 58, 14, 0); - _data[52] = DrawStruct(0, 65527, 58, 14, 0); + _data[50] = DrawStruct(0, -17, 61, 14, 0); + _data[51] = DrawStruct(0, -1, 58, 14, 0); + _data[52] = DrawStruct(0, -9, 58, 14, 0); _data[53] = DrawStruct(0, 72, 58, 12, 0); _data[54] = DrawStruct(0, 72, 58, 12, SPRFLAG_HORIZ_FLIPPED); _data[55] = DrawStruct(0, 69, 63, 12, 0); @@ -89,21 +89,21 @@ OutdoorDrawList::OutdoorDrawList() : _skySprite(_data[1]), _groundSprite(_data[2 _data[58] = DrawStruct(0, 71, 53, 12, SPRFLAG_HORIZ_FLIPPED); _data[59] = DrawStruct(0, 80, 57, 12, 0); _data[60] = DrawStruct(0, 64, 57, 12, SPRFLAG_HORIZ_FLIPPED); - _data[61] = DrawStruct(2, 65525, 54, 8, 0); - _data[62] = DrawStruct(1, 65515, 54, 11, 0); + _data[61] = DrawStruct(2, -11, 54, 8, 0); + _data[62] = DrawStruct(1, -21, 54, 11, 0); _data[63] = DrawStruct(2, 165, 54, 8, SPRFLAG_HORIZ_FLIPPED); _data[64] = DrawStruct(1, 86, 54, 11, SPRFLAG_HORIZ_FLIPPED); _data[65] = DrawStruct(1, 33, 54, 11, 0); - _data[66] = DrawStruct(0, 65528, 54, 12, 0); - _data[67] = DrawStruct(0, 65463, 54, 12, 0); + _data[66] = DrawStruct(0, -8, 54, 12, 0); + _data[67] = DrawStruct(0, -73, 54, 12, 0); _data[68] = DrawStruct(0, 57, 54, 12, 0); - _data[69] = DrawStruct(0, 65471, 54, 12, 0); - _data[70] = DrawStruct(0, 65455, 54, 12, 0); + _data[69] = DrawStruct(0, -65, 54, 12, 0); + _data[70] = DrawStruct(0, -81, 54, 12, 0); _data[71] = DrawStruct(0, 49, 54, 12, 0); _data[72] = DrawStruct(0, 65, 54, 12, 0); - _data[73] = DrawStruct(0, 65512, 54, 12, 0); + _data[73] = DrawStruct(0, -24, 54, 12, 0); _data[74] = DrawStruct(0, 9, 50, 12, 0); - _data[75] = DrawStruct(0, 65528, 50, 12, 0); + _data[75] = DrawStruct(0, -8, 50, 12, 0); _data[76] = DrawStruct(0, 72, 53, 8, 0); _data[77] = DrawStruct(0, 72, 53, 8, SPRFLAG_HORIZ_FLIPPED); _data[78] = DrawStruct(0, 77, 58, 8, 0); @@ -115,14 +115,14 @@ OutdoorDrawList::OutdoorDrawList() : _skySprite(_data[1]), _groundSprite(_data[2 _data[84] = DrawStruct(2, 8, 40); _data[85] = DrawStruct(2, 146, 40, 0, SPRFLAG_HORIZ_FLIPPED); _data[86] = DrawStruct(1, 32, 40, 6, 0); - _data[87] = DrawStruct(0, 65529, 30, 7, 0); - _data[88] = DrawStruct(0, 65424, 30, 7, SPRFLAG_2000); + _data[87] = DrawStruct(0, -7, 30, 7, 0); + _data[88] = DrawStruct(0, -112, 30, 7, SPRFLAG_2000); _data[89] = DrawStruct(0, 98, 30, 7, SPRFLAG_2000); - _data[90] = DrawStruct(0, 65424, 30, 8, SPRFLAG_2000); + _data[90] = DrawStruct(0, -112, 30, 8, SPRFLAG_2000); _data[91] = DrawStruct(0, 98, 30, 8, SPRFLAG_2000); - _data[92] = DrawStruct(0, 65498, 30, 8, 0); + _data[92] = DrawStruct(0, -38, 30, 8, 0); _data[93] = DrawStruct(0, 25, 30, 8, 0); - _data[94] = DrawStruct(0, 65529, 30, 8, 0); + _data[94] = DrawStruct(0, -7, 30, 8, 0); _data[95] = DrawStruct(0, 72, 48, 4, 0); _data[96] = DrawStruct(0, 72, 48, 4, SPRFLAG_HORIZ_FLIPPED); _data[97] = DrawStruct(0, 85, 53, 4, 0); @@ -134,22 +134,22 @@ OutdoorDrawList::OutdoorDrawList() : _skySprite(_data[1]), _groundSprite(_data[2 _data[103] = DrawStruct(0, 8, 24); _data[104] = DrawStruct(0, 169, 24, 0, SPRFLAG_HORIZ_FLIPPED); _data[105] = DrawStruct(1, 32, 24); - _data[106] = DrawStruct(0, 65513, 40, 0, SPRFLAG_2000); + _data[106] = DrawStruct(0, -23, 40, 0, SPRFLAG_2000); _data[107] = DrawStruct(0, 200, 40, 0, SPRFLAG_HORIZ_FLIPPED | SPRFLAG_2000); _data[108] = DrawStruct(0, 8, 47); _data[109] = DrawStruct(0, 169, 47, 0, SPRFLAG_HORIZ_FLIPPED); - _data[110] = DrawStruct(1, 65480, 65532, 32768, SPRFLAG_4000 | SPRFLAG_2000); - _data[111] = DrawStruct(0, 65531, 2, 0, SPRFLAG_4000 | SPRFLAG_2000); - _data[112] = DrawStruct(0, 65469, 2, 0, SPRFLAG_4000 | SPRFLAG_2000); + _data[110] = DrawStruct(1, -56, -4, 0x8000, SPRFLAG_4000 | SPRFLAG_2000); + _data[111] = DrawStruct(0, -5, 2, 0, SPRFLAG_4000 | SPRFLAG_2000); + _data[112] = DrawStruct(0, -67, 2, 0, SPRFLAG_4000 | SPRFLAG_2000); _data[113] = DrawStruct(0, 44, 73); _data[114] = DrawStruct(0, 44, 73); _data[115] = DrawStruct(0, 58, 14, 0, SPRFLAG_4000 | SPRFLAG_2000); _data[116] = DrawStruct(0, 169, 73); _data[117] = DrawStruct(0, 169, 73); - _data[118] = DrawStruct(0, 65531, 14, 0, SPRFLAG_4000 | SPRFLAG_2000); + _data[118] = DrawStruct(0, -5, 14, 0, SPRFLAG_4000 | SPRFLAG_2000); _data[119] = DrawStruct(0, 110, 73); _data[120] = DrawStruct(0, 110, 73); - _data[121] = DrawStruct(0, 65531, 14, 0, SPRFLAG_4000 | SPRFLAG_2000); + _data[121] = DrawStruct(0, -5, 14, 0, SPRFLAG_4000 | SPRFLAG_2000); _data[122] = DrawStruct(0, 110, 73); _data[123] = DrawStruct(0, 110, 73); _data[124] = DrawStruct(0, 72, 43); @@ -232,31 +232,31 @@ IndoorDrawList::IndoorDrawList() : _data[43] = DrawStruct(14, 152, 60); _data[44] = DrawStruct(8, 176, 60); _data[45] = DrawStruct(8, 200, 60); - _data[46] = DrawStruct(0, 65472, 61, 14, 0); - _data[47] = DrawStruct(0, 65496, 61, 14, 0); - _data[48] = DrawStruct(0, 65520, 61, 14, 0); + _data[46] = DrawStruct(0, -64, 61, 14, 0); + _data[47] = DrawStruct(0, -40, 61, 14, 0); + _data[48] = DrawStruct(0, -16, 61, 14, 0); _data[49] = DrawStruct(0, 8, 61, 14, 0); _data[50] = DrawStruct(0, 32, 61, 14, 0); _data[51] = DrawStruct(0, 56, 61, 14, 0); _data[52] = DrawStruct(0, 80, 61, 14, 0); _data[53] = DrawStruct(0, 104, 61, 14, 0); _data[54] = DrawStruct(0, 128, 61, 14, 0); - _data[55] = DrawStruct(0, 65527, 58, 14, 0); - _data[56] = DrawStruct(0, 65502, 58, 14, 0); + _data[55] = DrawStruct(0, -9, 58, 14, 0); + _data[56] = DrawStruct(0, -34, 58, 14, 0); _data[57] = DrawStruct(0, 16, 58, 14, 0); - _data[58] = DrawStruct(0, 65478, 58, 14, 0); + _data[58] = DrawStruct(0, -58, 58, 14, 0); _data[59] = DrawStruct(0, 40, 58, 14, 0); - _data[60] = DrawStruct(0, 65495, 58, 14, 0); - _data[61] = DrawStruct(0, 65510, 58, 14, 0); - _data[62] = DrawStruct(0, 65502, 58, 14, 0); - _data[63] = DrawStruct(0, 65520, 58, 14, 0); + _data[60] = DrawStruct(0, -41, 58, 14, 0); + _data[61] = DrawStruct(0, -26, 58, 14, 0); + _data[62] = DrawStruct(0, -34, 58, 14, 0); + _data[63] = DrawStruct(0, -16, 58, 14, 0); _data[64] = DrawStruct(0, 23, 58, 14, 0); _data[65] = DrawStruct(0, 16, 58, 14, 0); - _data[66] = DrawStruct(0, 65478, 58, 14, 0); + _data[66] = DrawStruct(0, -58, 58, 14, 0); _data[67] = DrawStruct(0, 40, 58, 14, 0); - _data[68] = DrawStruct(0, 65519, 58, 14, 0); - _data[69] = DrawStruct(0, 65535, 58, 14, 0); - _data[70] = DrawStruct(0, 65527, 58, 14, 0); + _data[68] = DrawStruct(0, -17, 58, 14, 0); + _data[69] = DrawStruct(0, -1, 58, 14, 0); + _data[70] = DrawStruct(0, -9, 58, 14, 0); _data[71] = DrawStruct(14, 8, 58); _data[72] = DrawStruct(12, 8, 55); _data[73] = DrawStruct(10, 32, 52); @@ -273,26 +273,26 @@ IndoorDrawList::IndoorDrawList() : _data[84] = DrawStruct(0, 71, 53, 12, SPRFLAG_HORIZ_FLIPPED); _data[85] = DrawStruct(0, 80, 57, 12, 0); _data[86] = DrawStruct(0, 64, 57, 12, SPRFLAG_HORIZ_FLIPPED); - _data[87] = DrawStruct(7, 65512, 52, 0, SPRFLAG_2000); + _data[87] = DrawStruct(7, -24, 52, 0, SPRFLAG_2000); _data[88] = DrawStruct(7, 32, 52); _data[89] = DrawStruct(7, 88, 52); _data[90] = DrawStruct(0, 144, 52); _data[91] = DrawStruct(0, 200, 52, 0, SPRFLAG_2000); - _data[92] = DrawStruct(0, 65457, 52, 11, SPRFLAG_2000); - _data[93] = DrawStruct(0, 65509, 52, 11, 0); + _data[92] = DrawStruct(0, -79, 52, 11, SPRFLAG_2000); + _data[93] = DrawStruct(0, -27, 52, 11, 0); _data[94] = DrawStruct(0, 32, 52, 11, 0); _data[95] = DrawStruct(0, 89, 52, 11, 0); _data[96] = DrawStruct(0, 145, 52, 11, SPRFLAG_2000); - _data[97] = DrawStruct(0, 65528, 50, 12, 0); - _data[98] = DrawStruct(0, 65471, 50, 12, 0); + _data[97] = DrawStruct(0, -8, 50, 12, 0); + _data[98] = DrawStruct(0, -65, 50, 12, 0); _data[99] = DrawStruct(0, 49, 50, 12, 0); - _data[100] = DrawStruct(0, 65471, 50, 12, 0); - _data[101] = DrawStruct(0, 65455, 50, 12, 0); + _data[100] = DrawStruct(0, -65, 50, 12, 0); + _data[101] = DrawStruct(0, -81, 50, 12, 0); _data[102] = DrawStruct(0, 49, 50, 12, 0); _data[103] = DrawStruct(0, 65, 50, 12, 0); - _data[104] = DrawStruct(0, 65512, 50, 12, 0); + _data[104] = DrawStruct(0, -24, 50, 12, 0); _data[105] = DrawStruct(0, 9, 50, 12, 0); - _data[106] = DrawStruct(0, 65528, 50, 12, 0); + _data[106] = DrawStruct(0, -8, 50, 12, 0); _data[107] = DrawStruct(7, 8, 48); _data[108] = DrawStruct(7, 64, 40); _data[109] = DrawStruct(6, 144, 40, 0, SPRFLAG_HORIZ_FLIPPED); @@ -305,20 +305,20 @@ IndoorDrawList::IndoorDrawList() : _data[116] = DrawStruct(0, 63, 47, 8, SPRFLAG_HORIZ_FLIPPED); _data[117] = DrawStruct(0, 94, 52, 8, 0); _data[118] = DrawStruct(0, 50, 52, 8, SPRFLAG_HORIZ_FLIPPED); - _data[119] = DrawStruct(6, 65496, 40, 0, SPRFLAG_2000); + _data[119] = DrawStruct(6, -40, 40, 0, SPRFLAG_2000); _data[120] = DrawStruct(6, 64, 40); _data[121] = DrawStruct(0, 168, 40, 0, SPRFLAG_2000); - _data[122] = DrawStruct(0, 65464, 40, 6, SPRFLAG_2000); + _data[122] = DrawStruct(0, -72, 40, 6, SPRFLAG_2000); _data[123] = DrawStruct(0, 32, 40, 6, 0); _data[124] = DrawStruct(0, 137, 40, 6, SPRFLAG_2000); - _data[125] = DrawStruct(0, 65529, 25, 7, 0); - _data[126] = DrawStruct(0, 65424, 25, 7, SPRFLAG_2000); + _data[125] = DrawStruct(0, -7, 25, 7, 0); + _data[126] = DrawStruct(0, -112, 25, 7, SPRFLAG_2000); _data[127] = DrawStruct(0, 98, 25, 7, SPRFLAG_2000); - _data[128] = DrawStruct(0, 65424, 29, 8, SPRFLAG_2000); + _data[128] = DrawStruct(0, -112, 29, 8, SPRFLAG_2000); _data[129] = DrawStruct(0, 98, 29, 8, SPRFLAG_2000); - _data[130] = DrawStruct(0, 65498, 29, 8, 0); + _data[130] = DrawStruct(0, -38, 29, 8, 0); _data[131] = DrawStruct(0, 25, 29, 8, 0); - _data[132] = DrawStruct(0, 65529, 29, 8, 0); + _data[132] = DrawStruct(0, -7, 29, 8, 0); _data[133] = DrawStruct(6, 32, 24); _data[134] = DrawStruct(0, 168, 24, 0, SPRFLAG_HORIZ_FLIPPED); _data[135] = DrawStruct(0, 72, 48, 4, 0); @@ -329,23 +329,23 @@ IndoorDrawList::IndoorDrawList() : _data[140] = DrawStruct(0, 55, 41, 4, SPRFLAG_HORIZ_FLIPPED); _data[141] = DrawStruct(0, 106, 47, 4, 0); _data[142] = DrawStruct(0, 38, 47, 4, SPRFLAG_HORIZ_FLIPPED); - _data[143] = DrawStruct(0, 65400, 24, 0, SPRFLAG_2000); + _data[143] = DrawStruct(0, -136, 24, 0, SPRFLAG_2000); _data[144] = DrawStruct(0, 8, 12); _data[145] = DrawStruct(0, 32, 24); _data[146] = DrawStruct(0, 200, 12, 0, SPRFLAG_HORIZ_FLIPPED); _data[147] = DrawStruct(0, 200, 24, 0, SPRFLAG_2000); _data[148] = DrawStruct(0, 32, 24); - _data[149] = DrawStruct(0, 65531, 2, 0, SPRFLAG_4000 | SPRFLAG_2000); - _data[150] = DrawStruct(0, 65469, 10, 0, SPRFLAG_4000 | SPRFLAG_2000); + _data[149] = DrawStruct(0, -5, 2, 0, SPRFLAG_4000 | SPRFLAG_2000); + _data[150] = DrawStruct(0, -67, 10, 0, SPRFLAG_4000 | SPRFLAG_2000); _data[151] = DrawStruct(0, 44, 73); _data[152] = DrawStruct(0, 44, 73); _data[153] = DrawStruct(0, 58, 14, 0, SPRFLAG_4000 | SPRFLAG_2000); _data[154] = DrawStruct(0, 169, 73); _data[155] = DrawStruct(0, 169, 73); - _data[156] = DrawStruct(0, 65531, 14, 0, SPRFLAG_4000 | SPRFLAG_2000); + _data[156] = DrawStruct(0, -5, 14, 0, SPRFLAG_4000 | SPRFLAG_2000); _data[157] = DrawStruct(0, 110, 73); _data[158] = DrawStruct(0, 110, 73); - _data[159] = DrawStruct(0, 65531, 14, 0, SPRFLAG_4000 | SPRFLAG_2000); + _data[159] = DrawStruct(0, -5, 14, 0, SPRFLAG_4000 | SPRFLAG_2000); _data[160] = DrawStruct(0, 110, 73); _data[161] = DrawStruct(0, 110, 73); _data[162] = DrawStruct(0, 72, 43); @@ -576,7 +576,8 @@ void InterfaceMap::drawIndoors() { map.getCell(DRAW_NUMBERS[cellIndex]); DrawStruct &drawStruct = _indoorList[3 + cellIndex]; - drawStruct._sprites = &map._surfaceSprites[map._currentSurfaceId]; + if (!map._surfaceSprites[map._currentSurfaceId].empty()) + drawStruct._sprites = &map._surfaceSprites[map._currentSurfaceId]; surfaceId = map.mazeData()._surfaceTypes[map._currentSurfaceId]; if (surfaceId == 5 || surfaceId == 12) { diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp index e410333d0d..507e4fc422 100644 --- a/engines/xeen/map.cpp +++ b/engines/xeen/map.cpp @@ -1157,9 +1157,10 @@ void Map::load(int mapId) { indoorList._fwl_1F._sprites = &_wallSprites._fwl1; indoorList._fwl_1F1R._sprites = &_wallSprites._fwl1; - indoorList._fwl_1F1L._sprites = &_wallSprites._fwl1; - - indoorList._horizon._sprites = &_groundSprites; + indoorList._fwl_1F1L._sprites = &_wallSprites._fwl1; + indoorList._horizon._sprites = &_wallSprites._fwl1; + + indoorList._ground._sprites = &_groundSprites; // Down show horizon for certain maps if (_vm->_files->_isDarkCc) { diff --git a/engines/xeen/screen.cpp b/engines/xeen/screen.cpp index 783f1ffbf4..7b6f972268 100644 --- a/engines/xeen/screen.cpp +++ b/engines/xeen/screen.cpp @@ -275,7 +275,8 @@ void Screen::update() { } void Screen::addDirtyRect(const Common::Rect &r) { - assert(r.isValidRect() && r.width() > 0 && r.height() > 0 + assert(r.isValidRect() && r.width() > 0 && r.height() > 0 + && r.left >= 0 && r.top >= 0 && r.right <= SCREEN_WIDTH && r.bottom <= SCREEN_HEIGHT); _dirtyRects.push_back(r); } |