[Scummvm-git-logs] scummvm master -> 5d4bc20d6208d45c5a5d8e7629cce50e894c7b38
dreammaster
dreammaster at scummvm.org
Sun Feb 25 00:32:13 CET 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5d4bc20d62 XEEN: Fix resetting wall sprites between maps
Commit: 5d4bc20d6208d45c5a5d8e7629cce50e894c7b38
https://github.com/scummvm/scummvm/commit/5d4bc20d6208d45c5a5d8e7629cce50e894c7b38
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-02-24T18:32:07-05:00
Commit Message:
XEEN: Fix resetting wall sprites between maps
Changed paths:
engines/xeen/interface_scene.cpp
engines/xeen/sprites.cpp
diff --git a/engines/xeen/interface_scene.cpp b/engines/xeen/interface_scene.cpp
index 4225d87..b82cd7a 100644
--- a/engines/xeen/interface_scene.cpp
+++ b/engines/xeen/interface_scene.cpp
@@ -4427,31 +4427,31 @@ void InterfaceScene::drawOutdoors() {
map.getCell(TERRAIN_INDEXES1[idx]);
assert(map._currentWall != INVALID_CELL);
SpriteResource &spr = map._wallSprites._surfaces[map._currentWall];
- _outdoorList[28 + idx]._sprites = spr.size() == 0 ? (SpriteResource *)nullptr : &spr;
+ _outdoorList[28 + idx]._sprites = spr.empty() ? (SpriteResource *)nullptr : &spr;
}
for (int idx = 0; idx < 5; ++idx) {
map.getCell(TERRAIN_INDEXES2[idx]);
assert(map._currentWall != INVALID_CELL);
SpriteResource &spr = map._wallSprites._surfaces[map._currentWall];
- _outdoorList[61 + idx]._sprites = spr.size() == 0 ? (SpriteResource *)nullptr : &spr;
+ _outdoorList[61 + idx]._sprites = spr.empty() ? (SpriteResource *)nullptr : &spr;
}
for (int idx = 0; idx < 3; ++idx) {
map.getCell(TERRAIN_INDEXES3[idx]);
assert(map._currentWall != INVALID_CELL);
SpriteResource &spr = map._wallSprites._surfaces[map._currentWall];
- _outdoorList[84 + idx]._sprites = spr.size() == 0 ? (SpriteResource *)nullptr : &spr;
+ _outdoorList[84 + idx]._sprites = spr.empty() ? (SpriteResource *)nullptr : &spr;
}
for (int idx = 0; idx < 5; ++idx) {
map.getCell(TERRAIN_INDEXES4[idx]);
assert(map._currentWall != INVALID_CELL);
SpriteResource &spr = map._wallSprites._surfaces[map._currentWall];
- _outdoorList[103 + idx]._sprites = spr.size() == 0 ? (SpriteResource *)nullptr : &spr;
+ _outdoorList[103 + idx]._sprites = spr.empty() ? (SpriteResource *)nullptr : &spr;
}
map.getCell(1);
assert(map._currentWall != INVALID_CELL);
SpriteResource &surface = map._wallSprites._surfaces[map._currentWall];
- _outdoorList[108]._sprites = surface.size() == 0 ? (SpriteResource *)nullptr : &surface;
+ _outdoorList[108]._sprites = surface.empty() ? (SpriteResource *)nullptr : &surface;
_outdoorList[109]._sprites = _outdoorList[108]._sprites;
_outdoorList[110]._sprites = _outdoorList[108]._sprites;
_outdoorList._sky1._flags = _outdoorList._sky2._flags = _flipSky ? SPRFLAG_HORIZ_FLIPPED : 0;
diff --git a/engines/xeen/sprites.cpp b/engines/xeen/sprites.cpp
index 3555658..e55a69e 100644
--- a/engines/xeen/sprites.cpp
+++ b/engines/xeen/sprites.cpp
@@ -104,6 +104,7 @@ void SpriteResource::clear() {
delete[] _data;
_data = nullptr;
_filesize = 0;
+ _index.clear();
}
void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Point &pt,
More information about the Scummvm-git-logs
mailing list