comparison SpriteObject.cpp @ 837:bebc19f3d2af

Save/load work with some problems
author Gloval
date Thu, 28 Mar 2013 00:37:27 +0400
parents f5156b8c61ad
children d061180f2b42
comparison
equal deleted inserted replaced
821:5e3f4bf3b8e6 837:bebc19f3d2af
1078 } 1078 }
1079 1079
1080 //----- (0042F933) -------------------------------------------------------- 1080 //----- (0042F933) --------------------------------------------------------
1081 void SpriteObject::OnInteraction(unsigned int uLayingItemID) 1081 void SpriteObject::OnInteraction(unsigned int uLayingItemID)
1082 { 1082 {
1083 unsigned int v1; // ecx@1 1083 pSpriteObjects[uLayingItemID].uObjectDescID = 0;
1084 unsigned __int16 *pAttributes; // ecx@2
1085 unsigned __int16 v3; // ax@2
1086
1087 //__debugbreak(); // find out what's going on
1088
1089 v1 = uLayingItemID;
1090 pSpriteObjects[v1].uObjectDescID = 0;
1091 if ( pParty->bTurnBasedModeOn == 1 ) 1084 if ( pParty->bTurnBasedModeOn == 1 )
1092 { 1085 {
1093 pAttributes = &pSpriteObjects[v1].uAttributes; 1086 if (pSpriteObjects[uLayingItemID].uAttributes & 4 )
1094 v3 = *pAttributes; 1087 {
1095 if ( *pAttributes & 4 ) 1088 pSpriteObjects[uLayingItemID].uAttributes &= 0xFB;
1096 {
1097 v3 = v3 & 0xFB;
1098 --pTurnEngine->field_1C; 1089 --pTurnEngine->field_1C;
1099 *pAttributes = v3;
1100 } 1090 }
1101 } 1091 }
1102 } 1092 }
1103 1093
1104 1094