[Scummvm-git-logs] scummvm master -> 057bf6ea921bea28c3b09a4905c81af65f03c7eb

dreammaster dreammaster at scummvm.org
Sun May 27 20:45:14 CEST 2018


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9abcaecb0c XEEN: Animate open treasure chests with treasure
057bf6ea92 XEEN: Leave chests open after their contents are taken


Commit: 9abcaecb0c2c4d58b85856f06152dec838ebda96
    https://github.com/scummvm/scummvm/commit/9abcaecb0c2c4d58b85856f06152dec838ebda96
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-05-27T13:56:15-04:00

Commit Message:
XEEN: Animate open treasure chests with treasure

Changed paths:
    engines/xeen/party.cpp


diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index 5ae53d6..1fee098 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -1498,14 +1498,14 @@ bool Party::giveExt(int mode1, uint val1, int mode2, uint val2, int mode3, uint
 					sound.playFX(10);
 					intf.draw3d(true, false);
 					Common::String msg = Common::String::format(Res.PICKS_THE_LOCK, c._name.c_str());
-					ErrorScroll::show(g_vm, msg);
+					ErrorScroll::show(g_vm, msg, WT_NONFREEZED_WAIT);
 				} else {
 					sound.playFX(21);
 
 					obj._frame = 0;
 					scripts._animCounter = 0;
 					Common::String msg = Common::String::format(Res.UNABLE_TO_PICK_LOCK, c._name.c_str());
-					ErrorScroll::show(g_vm, msg);
+					ErrorScroll::show(g_vm, msg, WT_NONFREEZED_WAIT);
 
 					scripts._animCounter = 255;
 					return true;


Commit: 057bf6ea921bea28c3b09a4905c81af65f03c7eb
    https://github.com/scummvm/scummvm/commit/057bf6ea921bea28c3b09a4905c81af65f03c7eb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-05-27T14:45:01-04:00

Commit Message:
XEEN: Leave chests open after their contents are taken

Changed paths:
    engines/xeen/map.h
    engines/xeen/scripts.cpp


diff --git a/engines/xeen/map.h b/engines/xeen/map.h
index 1bb3cf2..1c00e54 100644
--- a/engines/xeen/map.h
+++ b/engines/xeen/map.h
@@ -322,7 +322,6 @@ public:
 	};
 private:
 	XeenEngine *_vm;
-	Common::Array<SpriteResourceEntry> _objectSprites;
 	Common::Array<SpriteResourceEntry> _monsterSprites;
 	Common::Array<SpriteResourceEntry> _monsterAttackSprites;
 	Common::Array<SpriteResourceEntry> _wallItemSprites;
@@ -330,6 +329,7 @@ public:
 	Common::Array<MazeObject> _objects;
 	Common::Array<MazeMonster> _monsters;
 	Common::Array<MazeWallItem> _wallItems;
+	Common::Array<SpriteResourceEntry> _objectSprites;
 public:
 	MonsterObjectData(XeenEngine *vm);
 
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 66e9013..bc0b179 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -216,20 +216,23 @@ int Scripts::checkEvents() {
 		MazeObject &selectedObj = map._mobData._objects[intf._objNumber];
 
 		if (selectedObj._spriteId == (ccNum ? 15 : 16)) {
-			for (int idx = 0; idx < MIN((int)map._mobData._objects.size(), 16); ++idx) {
-				MazeObject &obj = map._mobData._objects[idx];
-				if (obj._spriteId == (ccNum ? 62 : 57)) {
+			// Treasure chests that were opened will be set to be in an open, empty state
+			for (uint idx = 0; idx < map._mobData._objectSprites.size(); ++idx) {
+				MonsterObjectData::SpriteResourceEntry &e = map._mobData._objectSprites[idx];
+				if (e._spriteId == (ccNum ? 57 : 62)) {
 					selectedObj._id = idx;
-					selectedObj._spriteId = ccNum ? 62 : 57;
+					selectedObj._spriteId = ccNum ? 57 : 62;
+					selectedObj._sprites = &e._sprites;
 					break;
 				}
 			}
 		} else if (selectedObj._spriteId == 73) {
-			for (int idx = 0; idx < MIN((int)map._mobData._objects.size(), 16); ++idx) {
-				MazeObject &obj = map._mobData._objects[idx];
-				if (obj._spriteId == 119) {
+			for (uint idx = 0; idx < map._mobData._objectSprites.size(); ++idx) {
+				MonsterObjectData::SpriteResourceEntry &e = map._mobData._objectSprites[idx];
+				if (e._spriteId == 119) {
 					selectedObj._id = idx;
 					selectedObj._spriteId = 119;
+					selectedObj._sprites = &e._sprites;
 					break;
 				}
 			}





More information about the Scummvm-git-logs mailing list