comparison mm7_4.cpp @ 519:8f70e52646eb

Merge
author Gloval
date Fri, 01 Mar 2013 22:18:22 +0400
parents 9c984eef0a7d cb0ad52d6a26
children 35f28d4c0ff9
comparison
equal deleted inserted replaced
518:9c984eef0a7d 519:8f70e52646eb
21 #include "Allocator.h" 21 #include "Allocator.h"
22 #include "Events.h" 22 #include "Events.h"
23 #include "Viewport.h" 23 #include "Viewport.h"
24 #include "FrameTableInc.h" 24 #include "FrameTableInc.h"
25 #include "Math.h" 25 #include "Math.h"
26 #include "LayingItem.h" 26 #include "SpriteObject.h"
27 #include "ObjectList.h" 27 #include "ObjectList.h"
28 #include "Chest.h" 28 #include "Chest.h"
29 #include "PaletteManager.h" 29 #include "PaletteManager.h"
30 #include "DecorationList.h" 30 #include "DecorationList.h"
31 #include "SaveLoad.h" 31 #include "SaveLoad.h"
192 } 192 }
193 } 193 }
194 if ( v1->field_2 & 4 ) 194 if ( v1->field_2 & 4 )
195 { 195 {
196 v38 = 0; 196 v38 = 0;
197 if ( (signed int)uNumLayingItems > 0 ) 197 if ( (signed int)uNumSpriteObjects > 0 )
198 { 198 {
199 v17 = (char *)&pLayingItems[0].vPosition.y; 199 v17 = (char *)&pSpriteObjects[0].vPosition.y;
200 do 200 do
201 { 201 {
202 v18 = abs(v33 - *((int *)v17 - 1)); 202 v18 = abs(v33 - *((int *)v17 - 1));
203 v30 = abs(v32 - *(int *)v17); 203 v30 = abs(v32 - *(int *)v17);
204 v27 = abs(v35 - *((int *)v17 + 1)); 204 v27 = abs(v35 - *((int *)v17 + 1));
226 if ( (signed int)(((unsigned int)(11 * v20) >> 5) + (v21 >> 2) + v19) < v31 ) 226 if ( (signed int)(((unsigned int)(11 * v20) >> 5) + (v21 >> 2) + v19) < v31 )
227 EventProcessor(v1->field_16_event_id, 0, 1); 227 EventProcessor(v1->field_16_event_id, 0, 1);
228 ++v38; 228 ++v38;
229 v17 += 112; 229 v17 += 112;
230 } 230 }
231 while ( v38 < (signed int)uNumLayingItems ); 231 while ( v38 < (signed int)uNumSpriteObjects );
232 } 232 }
233 } 233 }
234 v0 = i + 1; 234 v0 = i + 1;
235 } 235 }
236 } 236 }
1060 unsigned int __fastcall sub_46DEF2(signed int a2, unsigned int uLayingItemID) 1060 unsigned int __fastcall sub_46DEF2(signed int a2, unsigned int uLayingItemID)
1061 { 1061 {
1062 unsigned int result; // eax@1 1062 unsigned int result; // eax@1
1063 1063
1064 result = uLayingItemID; 1064 result = uLayingItemID;
1065 if ( pObjectList->pObjects[pLayingItems[uLayingItemID].uObjectDescID].uFlags & 0x10 ) 1065 if ( pObjectList->pObjects[pSpriteObjects[uLayingItemID].uObjectDescID].uFlags & 0x10 )
1066 result = _46BFFA_check_object_intercept(uLayingItemID, a2); 1066 result = _46BFFA_check_object_intercept(uLayingItemID, a2);
1067 return result; 1067 return result;
1068 } 1068 }
1069 1069
1070 //----- (0046DF1A) -------------------------------------------------------- 1070 //----- (0046DF1A) --------------------------------------------------------
3399 int v37; // edi@104 3399 int v37; // edi@104
3400 int v38; // edi@106 3400 int v38; // edi@106
3401 int v39; // edi@111 3401 int v39; // edi@111
3402 int v40; // ecx@113 3402 int v40; // ecx@113
3403 char v41[400]; // [sp+4h] [bp-22Ch]@20 3403 char v41[400]; // [sp+4h] [bp-22Ch]@20
3404 LayingItem a1; // [sp+194h] [bp-9Ch]@15 3404 SpriteObject a1; // [sp+194h] [bp-9Ch]@15
3405 Vec3_int_ a3; // [sp+204h] [bp-2Ch]@15 3405 Vec3_int_ a3; // [sp+204h] [bp-2Ch]@15
3406 int v44; // [sp+210h] [bp-20h]@22 3406 int v44; // [sp+210h] [bp-20h]@22
3407 int v45; // [sp+214h] [bp-1Ch]@25 3407 int v45; // [sp+214h] [bp-1Ch]@25
3408 int v46; // [sp+218h] [bp-18h]@25 3408 int v46; // [sp+218h] [bp-18h]@25
3409 int v47; // [sp+21Ch] [bp-14h]@25 3409 int v47; // [sp+21Ch] [bp-14h]@25
3460 } 3460 }
3461 } 3461 }
3462 } 3462 }
3463 if (pParty->ImmolationActive()) 3463 if (pParty->ImmolationActive())
3464 { 3464 {
3465 //LayingItem::LayingItem(&a1); 3465 //SpriteObject::SpriteObject(&a1);
3466 v9 = 0; 3466 v9 = 0;
3467 a3.z = 0; 3467 a3.z = 0;
3468 a3.y = 0; 3468 a3.y = 0;
3469 a3.x = 0; 3469 a3.x = 0;
3470 a1.stru_24.Reset(); 3470 a1.stru_24.Reset();
3471 a1.field_4C = pParty->pPartyBuffs[10].uPower; 3471 a1.field_4C = pParty->pPartyBuffs[10].uPower;
3472 a1.field_50 = pParty->ImmolationSkillLevel(); 3472 a1.field_50 = pParty->ImmolationSkillLevel();
3473 v10 = 0; 3473 v10 = 0;
3474 a1.uItemType = 1070; 3474 a1.uType = 1070;
3475 a1.field_48 = 8; 3475 a1.field_48 = 8;
3476 if ( (signed int)pObjectList->uNumObjects <= 0 ) 3476 if ( (signed int)pObjectList->uNumObjects <= 0 )
3477 { 3477 {
3478 LABEL_19: 3478 LABEL_19:
3479 LOWORD(v10) = 0; 3479 LOWORD(v10) = 0;
13528 ++v4; 13528 ++v4;
13529 ++v7; 13529 ++v7;
13530 } 13530 }
13531 while ( v4 < v2->uActorQueueSize ); 13531 while ( v4 < v2->uActorQueueSize );
13532 } 13532 }
13533 if ( (signed int)uNumLayingItems > 0 ) 13533 if ( (signed int)uNumSpriteObjects > 0 )
13534 { 13534 {
13535 pAttributes = &pLayingItems[0].uAttributes; 13535 pAttributes = &pSpriteObjects[0].uAttributes;
13536 v9 = uNumLayingItems; 13536 v9 = uNumSpriteObjects;
13537 do 13537 do
13538 { 13538 {
13539 v10 = *pAttributes; 13539 v10 = *pAttributes;
13540 if ( *pAttributes & 4 ) 13540 if ( *pAttributes & 4 )
13541 { 13541 {