Mercurial > mm7
diff mm7_1.cpp @ 515:cb0ad52d6a26
LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Some object-related subs moved to SpriteObject.cpp
author | Nomad |
---|---|
date | Fri, 01 Mar 2013 21:13:12 +0200 |
parents | 7c86030324a5 |
children | 35f28d4c0ff9 |
line wrap: on
line diff
--- a/mm7_1.cpp Fri Mar 01 18:23:49 2013 +0200 +++ b/mm7_1.cpp Fri Mar 01 21:13:12 2013 +0200 @@ -29,7 +29,7 @@ #include "Viewport.h" #include "FrameTableInc.h" #include "Math.h" -#include "LayingItem.h" +#include "SpriteObject.h" #include "ObjectList.h" #include "Chest.h" #include "PaletteManager.h" @@ -4024,12 +4024,12 @@ int v3; // ebx@4 int v4; // esi@6 int v5; // ecx@6 - //LayingItem v6; // [sp+Ch] [bp-80h]@1 + //SpriteObject v6; // [sp+Ch] [bp-80h]@1 char v7; // [sp+7Ch] [bp-10h]@2 POINT a2; // [sp+84h] [bp-8h]@2 - LayingItem v6; // [sp+Ch] [bp-80h]@1 - //LayingItem::LayingItem(&v6); + SpriteObject v6; // [sp+Ch] [bp-80h]@1 + //SpriteObject::SpriteObject(&v6); v0 = pGUIWindow_CurrentMenu->ptr_1C; if ( pParty->pPickedItem.uItemID ) @@ -4155,7 +4155,7 @@ if ( (v18 & 7) == OBJECT_Item ) { v30 = v19; - if ( pObjectList->pObjects[pLayingItems[v30].uObjectDescID].uFlags & 0x10 ) + if ( pObjectList->pObjects[pSpriteObjects[v30].uObjectDescID].uFlags & 0x10 ) //goto LABEL_73; { pMouse->uPointingObjectID = 0; @@ -4174,7 +4174,7 @@ } if ( v18 >= (signed int)0x2000000u || pParty->pPickedItem.uItemID ) { - v22 = pLayingItems[v30].stru_24.GetDisplayName(); + v22 = pSpriteObjects[v30].stru_24.GetDisplayName(); //LABEL_93: v26 = v22; //goto LABEL_87; @@ -4190,7 +4190,7 @@ uLastPointedObjectID = pMouse->uPointingObjectID; return; } - v31 = pLayingItems[v30].stru_24.GetDisplayName(); + v31 = pSpriteObjects[v30].stru_24.GetDisplayName(); v28 = pTmpBuf; sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[470], v31);// "Get %s" } @@ -4847,7 +4847,7 @@ signed int v6; // eax@11 char *v7; // edi@12 __int16 v8; // ax@16 - LayingItem a1; // [sp+4h] [bp-78h]@11 + SpriteObject a1; // [sp+4h] [bp-78h]@11 int v11; // [sp+74h] [bp-8h]@2 int v12; // [sp+78h] [bp-4h]@5 @@ -4884,7 +4884,7 @@ { v5 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; v6 = 0; - a1.uItemType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; + a1.uType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; if ( (signed int)pObjectList->uNumObjects <= 0 ) { LOWORD(v6) = 0; @@ -5186,7 +5186,7 @@ signed int v21; // eax@58 ItemGen *v22; // esi@62 unsigned int v23; // eax@62 - LayingItem a1; // [sp+Ch] [bp-80h]@1 + SpriteObject a1; // [sp+Ch] [bp-80h]@1 POINT v25; // [sp+7Ch] [bp-10h]@3 POINT a2; // [sp+84h] [bp-8h]@3 @@ -5203,13 +5203,13 @@ { a2.y = (signed int)(unsigned __int16)v0 >> 3; v21 = (signed int)(unsigned __int16)v0 >> 3; - if ( !(pObjectList->pObjects[pLayingItems[v21].uObjectDescID].uFlags & 0x10) + if ( !(pObjectList->pObjects[pSpriteObjects[v21].uObjectDescID].uFlags & 0x10) && a2.y < 1000 - && pLayingItems[v21].uObjectDescID + && pSpriteObjects[v21].uObjectDescID && (unsigned int)v0 < 0x2000000 ) { - v22 = &pLayingItems[v21].stru_24; - v23 = pLayingItems[v21].stru_24.uItemID; + v22 = &pSpriteObjects[v21].stru_24; + v23 = pSpriteObjects[v21].stru_24.uItemID; if ( pItemsTable->pItems[v23].uEquipType == 18 ) { party_finds_gold(v22->uSpecEnchantmentType, 0); @@ -5226,7 +5226,7 @@ if ( !pParty->AddItem(v22) ) pParty->SetHoldingItem(v22); } - LayingItem::OnItemPickup(a2.y); + SpriteObject::OnInteraction(a2.y); return; } goto LABEL_13; @@ -5269,7 +5269,7 @@ LABEL_14: v5 = pItemsTable->pItems[v4].uSpriteID; v6 = 0; - a1.uItemType = v5; + a1.uType = v5; if ( (signed int)pObjectList->uNumObjects <= 0 ) { LABEL_18: