Skip to content

Commit

Permalink
XEEN: Fix frame calculations for low part of _indoorList
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jan 16, 2015
1 parent d6497f7 commit 0ceefed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions engines/xeen/interface_map.cpp
Expand Up @@ -1066,12 +1066,12 @@ void InterfaceMap::drawIndoors() {
drawStruct._sprites = &map._surfaceSprites[map._currentSurfaceId];

surfaceId = map.mazeData()._surfaceTypes[map._currentSurfaceId];
if (surfaceId == 5 || surfaceId == 12) {
drawStruct._flags = _flipWtr;
if (surfaceId == 0 || surfaceId == 5 || surfaceId == 12) {
drawStruct._flags = _flipWtr ? 1 : 0;
drawStruct._frame = DRAW_FRAMES[cellIndex][_flipWtr ? 1 : 0];
} else {
drawStruct._frame = DRAW_FRAMES[cellIndex][_flipWall ? 1 : 0];
drawStruct._flags = _flipWall ? 0 : SPRFLAG_HORIZ_FLIPPED;
drawStruct._flags = _flipWall ? SPRFLAG_HORIZ_FLIPPED : 0;
}
}

Expand Down
14 changes: 8 additions & 6 deletions engines/xeen/resources.cpp
Expand Up @@ -433,15 +433,17 @@ const byte WALL_NUMBERS[4][96] = {
};

const int DRAW_NUMBERS[25] = {
36, 37, 38, 43, 42, 41, 39, 20, 22, 24, 33, 31, 29, 26, 10, 11,
18, 16, 13, 5, 9, 6, 0, 4, 1
36, 37, 38, 43, 42, 41,
39, 20, 22, 24, 33, 31,
29, 26, 10, 11, 18, 16,
13, 5, 9, 6, 0, 4, 1
};

const int DRAW_FRAMES[25][2] = {
{ 18, 24 }, { 19, 23 }, { 20, 22 }, { 10, 24 }, { 19, 23 }, { 20, 22 },
{ 21, 21 }, { 11, 17 }, { 12, 16 }, { 13, 15 }, { 11, 17 }, { 12, 16 },
{ 13, 15 }, { 14, 14 }, { 6, 10 }, { 7, 9 }, { 6, 10 }, { 7, 9 },
{ 8, 8 }, { 3, 5 }, { 3, 5 }, { 4, 4 }, { 0, 2 }, { 0, 2 },
{ 18, 24 }, { 19, 23 }, { 20, 22 }, { 24, 18 }, { 23, 19 }, { 22, 20 },
{ 21, 21 }, { 11, 17 }, { 12, 16 }, { 13, 15 }, { 17, 11 }, { 16, 12 },
{ 15, 13 }, { 14, 14 }, { 6, 10 }, { 7, 9 }, { 10, 6 }, { 9, 7 },
{ 8, 8 }, { 3, 5 }, { 5, 3 }, { 4, 4 }, { 0, 2 }, { 2, 0 },
{ 1, 1 }
};

Expand Down

0 comments on commit 0ceefed

Please sign in to comment.