Mercurial > mm7
comparison mm7_1.cpp @ 1047:76ce871b0076
m
author | Ritor1 |
---|---|
date | Thu, 23 May 2013 11:16:46 +0600 |
parents | 7735bdb3c30f |
children | d36681a9e4f8 |
comparison
equal
deleted
inserted
replaced
1046:5758ddc56127 | 1047:76ce871b0076 |
---|---|
1013 SpriteObject a1; // [sp+Ch] [bp-80h]@1 | 1013 SpriteObject a1; // [sp+Ch] [bp-80h]@1 |
1014 POINT v25; // [sp+7Ch] [bp-10h]@3 | 1014 POINT v25; // [sp+7Ch] [bp-10h]@3 |
1015 POINT a2; // [sp+84h] [bp-8h]@3 | 1015 POINT a2; // [sp+84h] [bp-8h]@3 |
1016 | 1016 |
1017 if ( pRenderer->pRenderD3D ) | 1017 if ( pRenderer->pRenderD3D ) |
1018 { | |
1019 v0 = pGame->pVisInstance->get_picked_object_zbuf_val(); | 1018 v0 = pGame->pVisInstance->get_picked_object_zbuf_val(); |
1020 } | |
1021 else | 1019 else |
1022 { | 1020 { |
1023 v1 = pMouse->GetCursorPos(&a2); | 1021 v1 = pMouse->GetCursorPos(&a2); |
1024 v0 = pRenderer->pActiveZBuffer[v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v25)->y]]; | 1022 v0 = pRenderer->pActiveZBuffer[v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v25)->y]]; |
1025 } | 1023 } |
1026 if ( PID_TYPE(v0) == OBJECT_Item) | 1024 if ( PID_TYPE(v0) == OBJECT_Item) |
1027 { | 1025 { |
1028 a2.y = (signed int)(unsigned __int16)v0 >> 3; | 1026 a2.y = (signed int)(unsigned __int16)v0 >> 3; |
1029 v21 = (signed int)(unsigned __int16)v0 >> 3; | 1027 v21 = (signed int)(unsigned __int16)v0 >> 3; |
1030 if ( !(pObjectList->pObjects[pSpriteObjects[v21].uObjectDescID].uFlags & 0x10) | 1028 if ( !(pObjectList->pObjects[pSpriteObjects[v21].uObjectDescID].uFlags & 0x10) && a2.y < 1000 && pSpriteObjects[v21].uObjectDescID |
1031 && a2.y < 1000 | |
1032 && pSpriteObjects[v21].uObjectDescID | |
1033 && (unsigned int)v0 < 0x2000000 ) | 1029 && (unsigned int)v0 < 0x2000000 ) |
1034 { | 1030 { |
1035 v22 = &pSpriteObjects[v21].stru_24; | 1031 v22 = &pSpriteObjects[v21].stru_24; |
1036 v23 = pSpriteObjects[v21].stru_24.uItemID; | 1032 v23 = pSpriteObjects[v21].stru_24.uItemID; |
1037 if ( pItemsTable->pItems[v23].uEquipType == 18 ) | 1033 if ( pItemsTable->pItems[v23].uEquipType == 18 ) |
1111 LABEL_14: | 1107 LABEL_14: |
1112 v5 = pItemsTable->pItems[v4].uSpriteID; | 1108 v5 = pItemsTable->pItems[v4].uSpriteID; |
1113 v6 = 0; | 1109 v6 = 0; |
1114 a1.uType = v5; | 1110 a1.uType = v5; |
1115 if ( (signed int)pObjectList->uNumObjects <= 0 ) | 1111 if ( (signed int)pObjectList->uNumObjects <= 0 ) |
1116 { | |
1117 LOWORD(v6) = 0; | 1112 LOWORD(v6) = 0; |
1118 } | |
1119 else | 1113 else |
1120 { | 1114 { |
1121 v7 = (char *)&pObjectList->pObjects->uObjectID; | 1115 v7 = (char *)&pObjectList->pObjects->uObjectID; |
1122 while ( v5 != *(short *)v7 ) | 1116 while ( v5 != *(short *)v7 ) |
1123 { | 1117 { |
1136 a1.vPosition.x = pParty->vPosition.x; | 1130 a1.vPosition.x = pParty->vPosition.x; |
1137 a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z; | 1131 a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z; |
1138 a1.uSoundID = 0; | 1132 a1.uSoundID = 0; |
1139 a1.uFacing = 0; | 1133 a1.uFacing = 0; |
1140 a1.uAttributes = 8; | 1134 a1.uAttributes = 8; |
1141 a1.uSectorID = pIndoor->GetSector( | 1135 a1.uSectorID = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->sEyelevel + pParty->vPosition.z); |
1142 pParty->vPosition.x, | |
1143 pParty->vPosition.y, | |
1144 pParty->sEyelevel + pParty->vPosition.z); | |
1145 a1.uSpriteFrameID = 0; | 1136 a1.uSpriteFrameID = 0; |
1146 memcpy(&a1.stru_24, &pParty->pPickedItem, 0x24u); | 1137 memcpy(&a1.stru_24, &pParty->pPickedItem, 0x24u); |
1147 v8 = (int *)pMouse->GetCursorPos(&v25); | 1138 v8 = (int *)pMouse->GetCursorPos(&v25); |
1148 v9 = UnprojectX(*v8); | 1139 v9 = UnprojectX(*v8); |
1149 a1.Create(pParty->sRotationY + v9, 184, 200, 0); | 1140 a1.Create(pParty->sRotationY + v9, 184, 200, 0); |
1150 v10 = pIcons_LOD->LoadTexture( | 1141 v10 = pIcons_LOD->LoadTexture(pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName, TEXTURE_16BIT_PALETTE); |
1151 pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName, | |
1152 TEXTURE_16BIT_PALETTE); | |
1153 if (v10 != -1) | 1142 if (v10 != -1) |
1154 pIcons_LOD->pTextures[v10].Release(); | 1143 pIcons_LOD->pTextures[v10].Release(); |
1155 pMouse->RemoveHoldingItem(); | 1144 pMouse->RemoveHoldingItem(); |
1156 pIcons_LOD->SyncLoadedFilesCount(); | 1145 pIcons_LOD->SyncLoadedFilesCount(); |
1157 return; | 1146 return; |