Mercurial > mm7
comparison mm7_3.cpp @ 430:58b71c1af7d8
Objects are drawn (items, spells sfx)
author | Nomad |
---|---|
date | Sun, 24 Feb 2013 00:54:25 +0200 |
parents | afad358dc684 |
children | 8c45cac1c5e1 |
comparison
equal
deleted
inserted
replaced
427:49d945ce4285 | 430:58b71c1af7d8 |
---|---|
1446 v42 <= -30000) | 1446 v42 <= -30000) |
1447 && ((v4 = pIndoor->GetSector(v1->vPosition.x, v1->vPosition.y, v1->vPosition.z), | 1447 && ((v4 = pIndoor->GetSector(v1->vPosition.x, v1->vPosition.y, v1->vPosition.z), |
1448 (v1->uSectorID = v4) == 0) | 1448 (v1->uSectorID = v4) == 0) |
1449 || (v42 = _46CEC3_get_floor_level(v1->vPosition.x, v1->vPosition.y, v1->vPosition.z, v4, &uFaceID), v42 == -30000)) ) | 1449 || (v42 = _46CEC3_get_floor_level(v1->vPosition.x, v1->vPosition.y, v1->vPosition.z, v4, &uFaceID), v42 == -30000)) ) |
1450 { | 1450 { |
1451 LayingItem::_42F933(uLayingItemID_); | 1451 LayingItem::OnItemPickup(uLayingItemID_); |
1452 return; | 1452 return; |
1453 } | 1453 } |
1454 v5 = v2->uFlags; | 1454 v5 = v2->uFlags; |
1455 if ( v5 & 0x20 ) | 1455 if ( v5 & 0x20 ) |
1456 { | 1456 { |
1842 { | 1842 { |
1843 v9 = v6 + 60; | 1843 v9 = v6 + 60; |
1844 if ( v55 ) | 1844 if ( v55 ) |
1845 v9 = v7 + 30; | 1845 v9 = v7 + 30; |
1846 sub_42F960_create_object(v1->vPosition.x, v1->vPosition.y, v9); | 1846 sub_42F960_create_object(v1->vPosition.x, v1->vPosition.y, v9); |
1847 LayingItem::_42F933(uLayingItemID_); | 1847 LayingItem::OnItemPickup(uLayingItemID_); |
1848 v7 = v54; | 1848 v7 = v54; |
1849 } | 1849 } |
1850 } | 1850 } |
1851 else | 1851 else |
1852 { | 1852 { |
2033 if ( v50 ) | 2033 if ( v50 ) |
2034 v44 = v27 + 30; | 2034 v44 = v27 + 30; |
2035 else | 2035 else |
2036 v44 = v54 + 60; | 2036 v44 = v54 + 60; |
2037 sub_42F960_create_object(v1->vPosition.x, v1->vPosition.y, v44); | 2037 sub_42F960_create_object(v1->vPosition.x, v1->vPosition.y, v44); |
2038 LayingItem::_42F933(uLayingItemID_); | 2038 LayingItem::OnItemPickup(uLayingItemID_); |
2039 return; | 2039 return; |
2040 } | 2040 } |
2041 if ( stru_721530.field_7C >= stru_721530.field_6C ) | 2041 if ( stru_721530.field_7C >= stru_721530.field_6C ) |
2042 { | 2042 { |
2043 v1->vPosition.x = stru_721530.normal2.x; | 2043 v1->vPosition.x = stru_721530.normal2.x; |
2221 item->uAttributes &= 0xFFBF; | 2221 item->uAttributes &= 0xFFBF; |
2222 else | 2222 else |
2223 { | 2223 { |
2224 //v3 = item->uObjectDescID; | 2224 //v3 = item->uObjectDescID; |
2225 v4 = &pObjectList->pObjects[item->uObjectDescID]; | 2225 v4 = &pObjectList->pObjects[item->uObjectDescID]; |
2226 if (item->uAttributes) | 2226 if (item->AttachedToActor()) |
2227 { | 2227 { |
2228 v5 = *(int *)(v2 + 62) >> 3; | 2228 v5 = item->field_5C >> 3; |
2229 *(int *)(v2 - 26) = pActors[v5].vPosition.x; | 2229 *(int *)(v2 - 26) = pActors[v5].vPosition.x; |
2230 *(int *)(v2 - 22) = pActors[v5].vPosition.y; | 2230 *(int *)(v2 - 22) = pActors[v5].vPosition.y; |
2231 *(int *)(v2 - 18) = pActors[v5].vPosition.z + pActors[v5].uActorHeight; | 2231 *(int *)(v2 - 18) = pActors[v5].vPosition.z + pActors[v5].uActorHeight; |
2232 if ( !item->uObjectDescID || (v6 = LOWORD(pEventTimer->uTimeElapsed) + *(short *)v2, *(short *)v2 = v6, !(v4->uFlags & 4)) ) | 2232 if ( !item->uObjectDescID || (v6 = LOWORD(pEventTimer->uTimeElapsed) + *(short *)v2, *(short *)v2 = v6, !(v4->uFlags & 4)) ) |
2233 goto LABEL_36; | 2233 goto LABEL_36; |
2251 goto LABEL_22; | 2251 goto LABEL_22; |
2252 if ( v8 < 0 ) | 2252 if ( v8 < 0 ) |
2253 { | 2253 { |
2254 v10 = i; | 2254 v10 = i; |
2255 LABEL_35: | 2255 LABEL_35: |
2256 LayingItem::_42F933(v10); | 2256 LayingItem::OnItemPickup(v10); |
2257 goto LABEL_36; | 2257 goto LABEL_36; |
2258 } | 2258 } |
2259 v11 = v4->uLifetime; | 2259 v11 = v4->uLifetime; |
2260 if (item->uAttributes & 2) | 2260 if (item->uAttributes & 2) |
2261 v11 = *((short *)v2 + 1); | 2261 v11 = *((short *)v2 + 1); |
12097 v37 = (unsigned __int64)(v12->scale * v20 / x) >> 16; | 12097 v37 = (unsigned __int64)(v12->scale * v20 / x) >> 16; |
12098 } | 12098 } |
12099 HIWORD(v22) = HIWORD(x); | 12099 HIWORD(v22) = HIWORD(x); |
12100 v15->_screenspace_y_scaler_packedfloat = v37; | 12100 v15->_screenspace_y_scaler_packedfloat = v37; |
12101 v15->field_1E = v30; | 12101 v15->field_1E = v30; |
12102 v15->some_x = a1; | 12102 v15->world_x = a1; |
12103 v15->some_y = a2; | 12103 v15->world_y = a2; |
12104 v15->some_z = a3; | 12104 v15->world_z = a3; |
12105 v15->uScreenSpaceX = a5; | 12105 v15->uScreenSpaceX = a5; |
12106 v15->uScreenSpaceY = a6; | 12106 v15->uScreenSpaceY = a6; |
12107 v23 = 8 * v26; | 12107 v23 = 8 * v26; |
12108 LOBYTE(v23) = 8 * v26 | OBJECT_Decoration; | 12108 LOBYTE(v23) = 8 * v26 | OBJECT_Decoration; |
12109 LOWORD(v22) = 0; | 12109 LOWORD(v22) = 0; |
12196 v3 = &pBillboardRenderList[uNumBillboardsToDraw]; | 12196 v3 = &pBillboardRenderList[uNumBillboardsToDraw]; |
12197 v4 = pSpriteFrameTable->GetFrame(v1->uSpriteID, p->uSpriteFrameID); | 12197 v4 = pSpriteFrameTable->GetFrame(v1->uSpriteID, p->uSpriteFrameID); |
12198 v5 = v4; | 12198 v5 = v4; |
12199 v24 = v4; | 12199 v24 = v4; |
12200 v30 = v4->uFlags; | 12200 v30 = v4->uFlags; |
12201 a6 = v4->uGlowRadius * p->field_22; | 12201 a6 = v4->uGlowRadius * p->field_22_glow_radius_multiplier; |
12202 v6 = stru_5C6E00->Atan2( | 12202 v6 = stru_5C6E00->Atan2(p->vPosition.x - pBLVRenderParams->vPartyPos.x, |
12203 p->vPosition.x - pBLVRenderParams->vPartyPos.x, | 12203 p->vPosition.y - pBLVRenderParams->vPartyPos.y); |
12204 p->vPosition.y - pBLVRenderParams->vPartyPos.y); | |
12205 LOWORD(v7) = p->uFacing; | 12204 LOWORD(v7) = p->uFacing; |
12206 v8 = v30; | 12205 v8 = v30; |
12207 v9 = ((signed int)(stru_5C6E00->uIntegerPi + ((signed int)stru_5C6E00->uIntegerPi >> 3) + v7 - v6) >> 8) & 7; | 12206 v9 = ((signed int)(stru_5C6E00->uIntegerPi + ((signed int)stru_5C6E00->uIntegerPi >> 3) + v7 - v6) >> 8) & 7; |
12208 v10 = v5->pHwSpriteIDs[v9]; | 12207 v10 = v5->pHwSpriteIDs[v9]; |
12209 v3->uHwSpriteID = v10; | 12208 v3->uHwSpriteID = v10; |
12272 v31 = (unsigned __int64)(v24->scale * (__int64)v18) >> 16; | 12271 v31 = (unsigned __int64)(v24->scale * (__int64)v18) >> 16; |
12273 } | 12272 } |
12274 HIWORD(v21) = HIWORD(x); | 12273 HIWORD(v21) = HIWORD(x); |
12275 v3->_screenspace_y_scaler_packedfloat = v31; | 12274 v3->_screenspace_y_scaler_packedfloat = v31; |
12276 v3->field_1E = v34; | 12275 v3->field_1E = v34; |
12277 v3->some_x = a1; | 12276 v3->world_x = a1; |
12278 v3->some_y = a2; | 12277 v3->world_y = a2; |
12279 v3->some_z = a3; | 12278 v3->world_z = a3; |
12280 v3->uScreenSpaceX = v36; | 12279 v3->uScreenSpaceX = v36; |
12281 v22 = v35; | 12280 v22 = v35; |
12282 v3->uTintColor = 0; | 12281 v3->uTintColor = 0; |
12283 v3->uScreenSpaceY = v22; | 12282 v3->uScreenSpaceY = v22; |
12284 LOWORD(v21) = 0; | 12283 LOWORD(v21) = 0; |
18576 LayingItem::LayingItem() | 18575 LayingItem::LayingItem() |
18577 { | 18576 { |
18578 LayingItem *v1; // esi@1 | 18577 LayingItem *v1; // esi@1 |
18579 | 18578 |
18580 v1 = this; | 18579 v1 = this; |
18581 v1->field_22 = 1; | 18580 v1->field_22_glow_radius_multiplier = 1; |
18582 v1->uSoundID = 0; | 18581 v1->uSoundID = 0; |
18583 v1->uFacing = 0; | 18582 v1->uFacing = 0; |
18584 v1->vVelocity.z = 0; | 18583 v1->vVelocity.z = 0; |
18585 v1->vVelocity.y = 0; | 18584 v1->vVelocity.y = 0; |
18586 v1->vVelocity.x = 0; | 18585 v1->vVelocity.x = 0; |