Mercurial > might-and-magic-trilogy
comparison Indoor.cpp @ 58:41cbaabde2cb
BLV render
author | Nomad |
---|---|
date | Thu, 25 Oct 2012 02:05:16 +0200 |
parents | fd2fd234a66c |
children | 5159d2e6f559 |
comparison
equal
deleted
inserted
replaced
53:fd2fd234a66c | 58:41cbaabde2cb |
---|---|
98 v5 = 800 * pParty->pPartyBuffs[16].uPower; | 98 v5 = 800 * pParty->pPartyBuffs[16].uPower; |
99 LOBYTE(v1) = byte_4E94D0; | 99 LOBYTE(v1) = byte_4E94D0; |
100 //v4 = pParty->flt_TorchlightColorR + 6.7553994e15; | 100 //v4 = pParty->flt_TorchlightColorR + 6.7553994e15; |
101 //v3 = pParty->flt_TorchlightColorG + 6.7553994e15; | 101 //v3 = pParty->flt_TorchlightColorG + 6.7553994e15; |
102 pMobileLightsStack->AddLight( | 102 pMobileLightsStack->AddLight( |
103 SLOWORD(pBLVRenderParams->vPartyPos.x), | 103 pBLVRenderParams->vPartyPos.x, |
104 SLOWORD(pBLVRenderParams->vPartyPos.y), | 104 pBLVRenderParams->vPartyPos.y, |
105 SLOWORD(pBLVRenderParams->vPartyPos.z), | 105 pBLVRenderParams->vPartyPos.z, |
106 SLOWORD(pBLVRenderParams->uRadius), | 106 pBLVRenderParams->uPartySectorID, |
107 v5, | 107 v5, |
108 floorf(pParty->flt_TorchlightColorR + 0.5f), | 108 floorf(pParty->flt_TorchlightColorR + 0.5f), |
109 floorf(pParty->flt_TorchlightColorG + 0.5f), | 109 floorf(pParty->flt_TorchlightColorG + 0.5f), |
110 floorf(pParty->flt_TorchlightColorB + 0.5f), | 110 floorf(pParty->flt_TorchlightColorB + 0.5f), |
111 v1); | 111 v1); |
177 v5 = this->vPartyPos.y; | 177 v5 = this->vPartyPos.y; |
178 this->sPartyRotY = a2->sRotationY; | 178 this->sPartyRotY = a2->sRotationY; |
179 v6 = this->vPartyPos.x; | 179 v6 = this->vPartyPos.x; |
180 this->sPartyRotX = a2->sRotationX; | 180 this->sPartyRotX = a2->sRotationX; |
181 v7 = pIndoor->GetSector(v6, v5, v4); | 181 v7 = pIndoor->GetSector(v6, v5, v4); |
182 v3->uRadius = v7; | 182 v3->uPartySectorID = v7; |
183 if ( !v7 ) | 183 if ( !v7 ) |
184 { | 184 { |
185 v8 = v3->vPartyPos.z; | 185 v8 = v3->vPartyPos.z; |
186 v3->vPartyPos.x = pParty->vPosition.x; | 186 v3->vPartyPos.x = pParty->vPosition.x; |
187 v9 = pParty->vPosition.z; | 187 v9 = pParty->vPosition.y; |
188 v10 = v3->vPartyPos.x; | 188 v10 = v3->vPartyPos.x; |
189 v3->vPartyPos.y = pParty->vPosition.z; | 189 v3->vPartyPos.y = pParty->vPosition.y; |
190 v3->uRadius = pIndoor->GetSector(v10, v9, v8); | 190 v3->uPartySectorID = pIndoor->GetSector(v10, v9, v8); |
191 } | 191 } |
192 if ( pRenderer->pRenderD3D ) | 192 if ( pRenderer->pRenderD3D ) |
193 { | 193 { |
194 v3->sCosineY = stru_5C6E00->SinCos(v3->sPartyRotY); | 194 v3->sCosineY = stru_5C6E00->SinCos(v3->sPartyRotY); |
195 v3->sSineY = stru_5C6E00->SinCos(v3->sPartyRotY - stru_5C6E00->uIntegerHalfPi); | 195 v3->sSineY = stru_5C6E00->SinCos(v3->sPartyRotY - stru_5C6E00->uIntegerHalfPi); |
268 unsigned int v5; // ecx@9 | 268 unsigned int v5; // ecx@9 |
269 RenderVertexSoft *v6; // [sp-4h] [bp-8h]@4 | 269 RenderVertexSoft *v6; // [sp-4h] [bp-8h]@4 |
270 | 270 |
271 if (bD3D) | 271 if (bD3D) |
272 { | 272 { |
273 pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.z, pParty->vPosition.y); | 273 pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); |
274 for (uint i = 0; i < pStru170->uNumFaceIDs; ++i) | 274 for (uint i = 0; i < pStru170->uNumFaceIDs; ++i) |
275 { | 275 { |
276 v2 = pStru170->pFaceIDs[2 * i + 1]; | 276 v2 = pStru170->pFaceIDs[2 * i + 1]; |
277 if ( pStru170->field_FA8[v2].std__vector_0007A8 == -1 ) | 277 if ( pStru170->field_FA8[v2].std__vector_0007A8 == -1 ) |
278 { | 278 { |
308 char *v5; // eax@10 | 308 char *v5; // eax@10 |
309 signed int v6; // [sp+8h] [bp-8h]@7 | 309 signed int v6; // [sp+8h] [bp-8h]@7 |
310 int v7; // [sp+Ch] [bp-4h]@8 | 310 int v7; // [sp+Ch] [bp-4h]@8 |
311 | 311 |
312 sub_43F39E(_this); | 312 sub_43F39E(_this); |
313 if ( pBLVRenderParams->uRadius ) | 313 if (pBLVRenderParams->uPartySectorID) |
314 IndoorLocation::ExecDraw(pRenderer->pRenderD3D != 0); | 314 IndoorLocation::ExecDraw(pRenderer->pRenderD3D != 0); |
315 pRenderer->DrawBillboardList_BLV(); | 315 pRenderer->DrawBillboardList_BLV(); |
316 if ( !pRenderer->pRenderD3D ) | 316 if ( !pRenderer->pRenderD3D ) |
317 { | 317 { |
318 if ( pBLVRenderParams->uFlags & 2 ) | 318 if ( pBLVRenderParams->uFlags & 2 ) |
360 void IndoorLocation::Draw() | 360 void IndoorLocation::Draw() |
361 { | 361 { |
362 int v0; // eax@1 | 362 int v0; // eax@1 |
363 IndoorLocation_drawstru _this; // [sp+0h] [bp-4Ch]@5 | 363 IndoorLocation_drawstru _this; // [sp+0h] [bp-4Ch]@5 |
364 int v2; // [sp+44h] [bp-8h]@5 | 364 int v2; // [sp+44h] [bp-8h]@5 |
365 float v3; // [sp+48h] [bp-4h]@5 | 365 int v3; // [sp+48h] [bp-4h]@5 |
366 | 366 |
367 v0 = 0; | 367 v0 = 0; |
368 if ( viewparams->field_50_draw_debug_outlines ) | 368 if ( viewparams->field_50_draw_debug_outlines ) |
369 v0 = 1; | 369 v0 = 1; |
370 if ( viewparams->field_54 ) | 370 if ( viewparams->field_54 ) |
373 _this.uFlags = v0; | 373 _this.uFlags = v0; |
374 _this.vPosition.x = pParty->vPosition.x | 374 _this.vPosition.x = pParty->vPosition.x |
375 - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY) | 375 - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY) |
376 * (signed __int64)pParty->field_18) >> 16); | 376 * (signed __int64)pParty->field_18) >> 16); |
377 v2 = stru_5C6E00->SinCos(pParty->sRotationY - stru_5C6E00->uIntegerHalfPi); | 377 v2 = stru_5C6E00->SinCos(pParty->sRotationY - stru_5C6E00->uIntegerHalfPi); |
378 LODWORD(v3) = (unsigned __int64)(v2 * (signed __int64)pParty->field_18) >> 16; | 378 v3 = (unsigned __int64)(v2 * (signed __int64)pParty->field_18) >> 16; |
379 _this.field_1C_mb_fov = 65; | 379 _this.field_1C_mb_fov = 65; |
380 _this.vPosition.y = pParty->vPosition.z - LODWORD(v3); | 380 _this.vPosition.y = pParty->vPosition.y - v3; |
381 _this.sRotationY = pParty->sRotationY; | 381 _this.sRotationY = pParty->sRotationY; |
382 _this.sRotationX = pParty->sRotationX; | 382 _this.sRotationX = pParty->sRotationX; |
383 _this.pRenderTarget = pRenderer->pTargetSurface; | 383 _this.pRenderTarget = pRenderer->pTargetSurface; |
384 _this.uViewportX = pViewport->uScreenX; | 384 _this.uViewportX = pViewport->uScreenX; |
385 _this.uViewportY = pViewport->uScreenY; | 385 _this.uViewportY = pViewport->uScreenY; |
386 _this.uViewportZ = pViewport->uScreenZ; | 386 _this.uViewportZ = pViewport->uScreenZ; |
387 _this.uViewportW = pViewport->uScreenW; | 387 _this.uViewportW = pViewport->uScreenW; |
388 _this.field_3C = pViewport->field_30; | 388 _this.field_3C = pViewport->field_30; |
389 _this.vPosition.z = pParty->vPosition.y + pParty->sEyelevel; | 389 _this.vPosition.z = pParty->vPosition.z + pParty->sEyelevel; |
390 _this.uTargetWidth = 640; | 390 _this.uTargetWidth = 640; |
391 _this.uTargetHeight = 480; | 391 _this.uTargetHeight = 480; |
392 _this.pTargetZ = pRenderer->pActiveZBuffer; | 392 _this.pTargetZ = pRenderer->pActiveZBuffer; |
393 sub_440BED(&_this); | 393 sub_440BED(&_this); |
394 pParty->uFlags &= 0xFFFFFFFDu; | 394 pParty->uFlags &= 0xFFFFFFFDu; |
2704 for (uint i = 0, j = 0; i < uNumSectors; ++i) | 2704 for (uint i = 0, j = 0; i < uNumSectors; ++i) |
2705 { | 2705 { |
2706 auto pSector = pSectors + i; | 2706 auto pSector = pSectors + i; |
2707 | 2707 |
2708 pSector->pFloors = ptr_0002B0_sector_rdata + j; | 2708 pSector->pFloors = ptr_0002B0_sector_rdata + j; |
2709 j += pSector->field_4; | 2709 j += pSector->uNumFloors; |
2710 | 2710 |
2711 pSector->pWalls = ptr_0002B0_sector_rdata + j; | 2711 pSector->pWalls = ptr_0002B0_sector_rdata + j; |
2712 j += pSector->field_C; | 2712 j += pSector->field_C; |
2713 | 2713 |
2714 pSector->pCeilings = ptr_0002B0_sector_rdata + j; | 2714 pSector->pCeilings = ptr_0002B0_sector_rdata + j; |
3178 { | 3178 { |
3179 int v4; // esi@1 | 3179 int v4; // esi@1 |
3180 //unsigned __int8 v5; // zf@1 | 3180 //unsigned __int8 v5; // zf@1 |
3181 //unsigned __int8 v6; // sf@1 | 3181 //unsigned __int8 v6; // sf@1 |
3182 //unsigned __int8 v7; // of@1 | 3182 //unsigned __int8 v7; // of@1 |
3183 BLVSector *v8; // eax@3 | 3183 //BLVSector *v8; // eax@3 |
3184 int v9; // edi@9 | 3184 //int v9; // edi@9 |
3185 int v10; // eax@9 | 3185 //int v10; // eax@9 |
3186 int v11; // edx@9 | 3186 //int v11; // edx@9 |
3187 int v12; // eax@10 | 3187 //int v12; // eax@10 |
3188 unsigned __int16 v13; // ax@12 | 3188 //unsigned __int16 v13; // ax@12 |
3189 int v14; // edi@14 | 3189 //int v14; // edi@14 |
3190 BLVFace *v15; // eax@14 | 3190 //BLVFace *v15; // eax@14 |
3191 BLVFace *v16; // edi@14 | 3191 //BLVFace *v16; // edi@14 |
3192 PolygonType v17; // al@14 | 3192 //PolygonType v17; // al@14 |
3193 unsigned __int16 *pVertexIDs; // esi@16 | 3193 //unsigned __int16 *pVertexIDs; // esi@16 |
3194 Vec3_short_ *v19; // eax@16 | 3194 //Vec3_short_ *v19; // eax@16 |
3195 int v20; // edx@16 | 3195 //int v20; // edx@16 |
3196 unsigned __int16 *v21; // esi@17 | 3196 //unsigned __int16 *v21; // esi@17 |
3197 int v22; // edi@19 | 3197 //int v22; // edi@19 |
3198 int v23; // edi@20 | 3198 //int v23; // edi@20 |
3199 Vec3_short_ *v24; // edx@20 | 3199 //Vec3_short_ *v24; // edx@20 |
3200 signed int v25; // edx@21 | 3200 signed int v25; // edx@21 |
3201 int v26; // ebx@23 | 3201 int v26; // ebx@23 |
3202 int v27; // edx@26 | 3202 //int v27; // edx@26 |
3203 signed __int64 v28; // qtt@26 | 3203 //signed __int64 v28; // qtt@26 |
3204 Vec3_short_ *v29; // eax@26 | 3204 ///Vec3_short_ *v29; // eax@26 |
3205 Vec3_short_ *v30; // edx@26 | 3205 //Vec3_short_ *v30; // edx@26 |
3206 int v31; // edx@26 | 3206 //int v31; // edx@26 |
3207 signed int v32; // edi@27 | 3207 signed int v32; // edi@27 |
3208 signed __int64 v33; // qtt@27 | 3208 signed __int64 v33; // qtt@27 |
3209 Vec3_short_ *v34; // edx@27 | 3209 //Vec3_short_ *v34; // edx@27 |
3210 int v35; // edx@32 | 3210 int v35; // edx@32 |
3211 int v37; // edi@38 | 3211 int v37; // edi@38 |
3212 int v38; // ebx@40 | 3212 int v38; // ebx@40 |
3213 int v39; // eax@41 | 3213 int v39; // eax@41 |
3214 BLVFace *v40; // esi@42 | 3214 BLVFace *v40; // esi@42 |
3215 PolygonType v41; // dl@42 | 3215 PolygonType v41; // dl@42 |
3216 int v42; // edx@43 | 3216 int v42; // edx@43 |
3217 int v43[50]; // [sp+Ch] [bp-108h]@1 | 3217 int v43[50]; // [sp+Ch] [bp-108h]@1 |
3218 int v44; // [sp+D4h] [bp-40h]@9 | 3218 //int v44; // [sp+D4h] [bp-40h]@9 |
3219 int v45; // [sp+D8h] [bp-3Ch]@14 | 3219 //int v45; // [sp+D8h] [bp-3Ch]@14 |
3220 int v46; // [sp+DCh] [bp-38h]@14 | 3220 //int v46; // [sp+DCh] [bp-38h]@14 |
3221 int v47; // [sp+E0h] [bp-34h]@19 | 3221 //int v47; // [sp+E0h] [bp-34h]@19 |
3222 int v48; // [sp+E4h] [bp-30h]@9 | 3222 //int v48; // [sp+E4h] [bp-30h]@9 |
3223 Vec3_short_ *v49; // [sp+E8h] [bp-2Ch]@19 | 3223 //Vec3_short_ *v49; // [sp+E8h] [bp-2Ch]@19 |
3224 bool v50; // [sp+ECh] [bp-28h]@19 | 3224 bool v50; // [sp+ECh] [bp-28h]@19 |
3225 int v51; // [sp+F0h] [bp-24h]@9 | 3225 int v51; // [sp+F0h] [bp-24h]@9 |
3226 unsigned int v52; // [sp+F4h] [bp-20h]@2 | 3226 //unsigned int v52; // [sp+F4h] [bp-20h]@2 |
3227 int v53; // [sp+F8h] [bp-1Ch]@10 | 3227 int v53; // [sp+F8h] [bp-1Ch]@10 |
3228 int v54; // [sp+FCh] [bp-18h]@16 | 3228 int v54; // [sp+FCh] [bp-18h]@16 |
3229 int v55; // [sp+100h] [bp-14h]@1 | 3229 int v55; // [sp+100h] [bp-14h]@1 |
3230 int v56; // [sp+104h] [bp-10h]@1 | 3230 int v56; // [sp+104h] [bp-10h]@1 |
3231 int v57; // [sp+108h] [bp-Ch]@16 | 3231 int v57; // [sp+108h] [bp-Ch]@16 |
3232 Vec3_short_ *v58; // [sp+10Ch] [bp-8h]@20 | 3232 //Vec3_short_ *v58; // [sp+10Ch] [bp-8h]@20 |
3233 int v59; // [sp+110h] [bp-4h]@16 | 3233 int v59; // [sp+110h] [bp-4h]@16 |
3234 | 3234 |
3235 v4 = 0; | 3235 v4 = 0; |
3236 //v7 = __OFSUB__(this->uNumSectors, 1); | 3236 //v7 = __OFSUB__(this->uNumSectors, 1); |
3237 //v5 = this->uNumSectors == 1; | 3237 //v5 = this->uNumSectors == 1; |
3238 //v6 = this->uNumSectors - 1 < 0; | 3238 //v6 = this->uNumSectors - 1 < 0; |
3239 v55 = 0; | 3239 v55 = 0; |
3240 v43[0] = 0; | 3240 v43[0] = 0; |
3241 v56 = 1; | 3241 //v56 = 1; |
3242 if (uNumSectors < 2) | 3242 if (uNumSectors < 2) |
3243 return 0; | 3243 return 0; |
3244 | 3244 |
3245 v52 = 116; | 3245 for (uint i = 1; i < uNumSectors; ++i) |
3246 do | 3246 { |
3247 { | 3247 auto pSector = pSectors + i; |
3248 v8 = &this->pSectors[v52 / 0x74]; | 3248 |
3249 if ( v8->pBounding.x1 <= sX ) | 3249 if (pSector->pBounding.x1 <= sX && pSector->pBounding.x2 >= sX) |
3250 { | 3250 if (pSector->pBounding.y1 <= sY && pSector->pBounding.y2 >= sY) |
3251 if ( v8->pBounding.x2 >= sX ) | 3251 if (pSector->pBounding.z1 - 64 <= sZ && pSector->pBounding.z2 + 64 >= sZ) |
3252 { | |
3253 if ( v8->pBounding.y1 <= sY ) | |
3254 { | 3252 { |
3255 if ( v8->pBounding.y2 >= sY ) | 3253 Log::Warning(L"Sector[%u]", i); |
3256 { | 3254 v51 = pSector->uNumFloors + pSector->uNumPortals; |
3257 if ( v8->pBounding.z1 - 64 <= sZ ) | 3255 if (!v51) |
3258 { | 3256 continue; |
3259 if ( v8->pBounding.z2 + 64 >= sZ ) | 3257 |
3260 { | 3258 //v9 = pSector->uNumFloors; |
3261 v9 = v8->field_4; | 3259 //v10 = v9 + pSector->uNumPortals; |
3262 v10 = v9 + v8->uNumPortals; | 3260 //v11 = 0; |
3263 v11 = 0; | 3261 //v44 = v9; |
3264 v44 = v9; | 3262 //v48 = 0; |
3265 v51 = v10; | 3263 |
3266 v48 = 0; | 3264 //v12 = -2 * v9; |
3267 if ( v10 > 0 ) | 3265 //v53 = -2 * v9; |
3268 { | 3266 for (uint j = 0; j < v51; ++j) |
3269 v12 = -2 * v9; | 3267 { |
3270 v53 = -2 * v9; | 3268 unsigned int uFaceID; |
3271 do | 3269 if (j < pSector->uNumFloors) |
3272 { | 3270 uFaceID = pSector->pFloors[j]; |
3273 if ( v11 < v44 ) | 3271 else |
3274 v13 = this->pSectors[v52 / 0x74].pFloors[v11]; | 3272 uFaceID = pSector->pPortals[j - pSector->uNumFloors]; |
3273 | |
3274 auto pFace = pFaces + uFaceID; | |
3275 //v14 = (signed __int16)v13; | |
3276 //v15 = this->pFaces; | |
3277 //v46 = v13; | |
3278 //v14 *= 96; | |
3279 //v45 = v13 * sizeof(BLVFace); | |
3280 //v16 = pFaces + uFaceID; | |
3281 //v17 = v16->uPolygonType; | |
3282 if (pFace->uPolygonType == POLYGON_Floor || | |
3283 pFace->uPolygonType == POLYGON_InBetweenFloorAndWall) | |
3284 { | |
3285 //pVertexIDs = pFace->pVertexIDs; | |
3286 //v19 = this->pVertices; | |
3287 //v20 = pVertices[pFace->pVertexIDs[0]].y; | |
3288 v54 = 0; | |
3289 //v57 = 0; | |
3290 //v5 = v16->uNumVertices == 0; | |
3291 v59 = pVertices[pFace->pVertexIDs[0]].y >= sY; | |
3292 | |
3293 //v21 = pFace->pVertexIDs + 1; | |
3294 for (uint k = 1; k < pFace->uNumVertices; ++k) | |
3295 { | |
3296 if (v54 >= 2) | |
3297 break; | |
3298 | |
3299 //v49 = &pVertices[pFace->pVertexIDs[k]]; | |
3300 auto v2 = &pVertices[pFace->pVertexIDs[k]]; | |
3301 //v22 = pVertex->y; | |
3302 //v47 = pVertex->y; | |
3303 v50 = v2->y >= sY; | |
3304 if ( v59 ^ v50 ) | |
3305 { | |
3306 //v58 = &pVertices[pFace->pVertexIDs[k - 1]]; | |
3307 auto v1 = &pVertices[pFace->pVertexIDs[k - 1]]; | |
3308 //v23 = v58->x; | |
3309 //HIWORD(v24) = HIWORD(v49); | |
3310 //LOWORD(v24) = v49->x; | |
3311 //v49 = v24; | |
3312 //v59 = v49->x; | |
3313 v25 = v1->x >= sX ? 0 : 2; // BUG TODO TROLOLO | |
3314 v26 = v25 | v2->x < sX; // SWAP v1 and v2 till the result's correct | |
3315 if ( v26 != 3 ) | |
3316 { | |
3317 if (!v26) | |
3318 ++v54; | |
3275 else | 3319 else |
3276 v13 = *(unsigned __int16 *)((char *)this->pSectors[v52 / 0x74].pPortals + v12); | |
3277 v14 = (signed __int16)v13; | |
3278 v15 = this->pFaces; | |
3279 v46 = v14; | |
3280 v14 *= 96; | |
3281 v45 = v14; | |
3282 v16 = (BLVFace *)((char *)v15 + v14); | |
3283 v17 = v16->uPolygonType; | |
3284 if ( v17 == 3 || v17 == 4 ) | |
3285 { | 3320 { |
3286 pVertexIDs = v16->pVertexIDs; | 3321 if (v1->x >= v2->x) |
3287 v19 = this->pVertices; | |
3288 v20 = v19[*pVertexIDs].y; | |
3289 v54 = 0; | |
3290 v57 = 0; | |
3291 //v5 = v16->uNumVertices == 0; | |
3292 v59 = v20 >= sY; | |
3293 if (v16->uNumVertices) | |
3294 { | 3322 { |
3295 v21 = pVertexIDs + 1; | 3323 int _a58; |
3296 do | 3324 int _a59; |
3297 { | 3325 |
3298 if ( v54 >= 2 ) | 3326 v32 = v1->x - v2->x; |
3299 break; | 3327 LODWORD(v33) = v32 << 16; |
3300 v49 = &v19[*v21]; | 3328 HIDWORD(v33) = v32 >> 16; |
3301 v22 = v49->y; | 3329 _a58 = v33 / (v1->y - v2->y); |
3302 v47 = v49->y; | 3330 _a59 = (unsigned __int64)(_a58 * (__int64)(sY - v2->y)) >> 16; |
3303 v50 = v22 >= sY; | 3331 |
3304 if ( v59 ^ v50 ) | 3332 if (v59 + pVertices[k].x > sX) |
3305 { | 3333 ++v54; |
3306 v58 = &v19[*(v21 - 1)]; | 3334 } |
3307 v23 = v58->x; | 3335 else |
3308 HIWORD(v24) = HIWORD(v49); | 3336 { |
3309 LOWORD(v24) = v49->x; | 3337 int _a58; |
3310 v49 = v24; | 3338 int _a59; |
3311 v59 = (signed __int16)v24; | 3339 v32 = v2->x - v1->x; |
3312 v25 = (signed __int16)v24 >= sX ? 0 : 2; | 3340 LODWORD(v33) = v32 << 16; |
3313 v26 = v25 | v23 < sX; | 3341 HIDWORD(v33) = v32 >> 16; |
3314 if ( v26 != 3 ) | 3342 _a58 = v33 / (v2->y - v1->y); |
3315 { | 3343 _a59 = (unsigned __int64)(_a58 * (signed __int64)(sY - v1->y)) >> 16; |
3316 if ( !v26 | 3344 |
3317 || (v58->x >= (signed __int16)v49 ? (v32 = v23 - v59, | 3345 if (_a59 + pVertices[k - 1].x > sX) |
3318 v58 = (Vec3_short_ *)(v58->y - v47), | 3346 ++v54; |
3319 LODWORD(v33) = v32 << 16, | |
3320 HIDWORD(v33) = v32 >> 16, | |
3321 v59 = v33 / (signed int)v58, | |
3322 v34 = this->pVertices, | |
3323 v58 = (Vec3_short_ *)(v33 / (signed int)v58), | |
3324 v59 = sY - v34[*v21].y, | |
3325 v59 = (unsigned __int64)((signed int)v58 | |
3326 * (signed __int64)v59) >> 16, | |
3327 v31 = *v21) : (v27 = v58->y, | |
3328 v59 -= v23, | |
3329 v58 = (Vec3_short_ *)(v47 - v27), | |
3330 LODWORD(v28) = v59 << 16, | |
3331 HIDWORD(v28) = v59 >> 16, | |
3332 v59 = v28 / (v47 - v27), | |
3333 v29 = (Vec3_short_ *)(v28 / (v47 - v27)), | |
3334 v30 = this->pVertices, | |
3335 v58 = v29, | |
3336 v59 = sY - v30[*(v21 - 1)].y, | |
3337 v59 = (unsigned __int64)((signed int)v29 * (signed __int64)v59) >> 16, | |
3338 v31 = *(v21 - 1)), | |
3339 v19 = this->pVertices, | |
3340 v59 + v19[v31].x > sX) ) | |
3341 ++v54; | |
3342 } | |
3343 } | |
3344 ++v57; | |
3345 v59 = v50; | |
3346 ++v21; | |
3347 } | |
3348 while ( v57 < *(&this->pFaces->uNumVertices + v45) ); | |
3349 if ( v54 == 1 ) | |
3350 { | |
3351 v35 = v55++; | |
3352 v43[v35] = v46; | |
3353 } | |
3354 } | 3347 } |
3355 } | 3348 } |
3356 v11 = v48 + 1; | 3349 } |
3357 v12 = v53 + 2; | 3350 } |
3358 //v7 = __OFSUB__(v48 + 1, v51); | 3351 |
3359 //v6 = v48++ + 1 - v51 < 0; | 3352 v59 = v50; |
3360 v53 += 2; | 3353 } |
3361 } | 3354 |
3362 while ( ++v48 < v51 ); | 3355 if (pFace->uNumVertices) |
3363 v4 = v43[0]; | 3356 { |
3364 } | 3357 if (v54 == 1) |
3365 } | 3358 { |
3359 v35 = v55++; | |
3360 v43[v35] = uFaceID; | |
3361 } | |
3362 } | |
3363 } | |
3366 } | 3364 } |
3365 v4 = v43[0]; | |
3367 } | 3366 } |
3368 } | 3367 } |
3369 } | 3368 |
3370 } | |
3371 ++v56; | |
3372 v52 += 116; | |
3373 } | |
3374 while ( v56 < this->uNumSectors ); | |
3375 if ( v55 == 1 ) | 3369 if ( v55 == 1 ) |
3376 return this->pFaces[v4].uSectorID; | 3370 return this->pFaces[v4].uSectorID; |
3377 v37 = 0; | 3371 v37 = 0; |
3378 if ( !v55 ) | 3372 if ( !v55 ) |
3379 return 0; | 3373 return 0; |
4758 this_.PrepareSprites(0); | 4752 this_.PrepareSprites(0); |
4759 if ( !v37 ) | 4753 if ( !v37 ) |
4760 { | 4754 { |
4761 pParty->sRotationX = 0; | 4755 pParty->sRotationX = 0; |
4762 pParty->sRotationY = 0; | 4756 pParty->sRotationY = 0; |
4757 pParty->vPosition.z = 0; | |
4763 pParty->vPosition.y = 0; | 4758 pParty->vPosition.y = 0; |
4764 pParty->vPosition.z = 0; | |
4765 pParty->vPosition.x = 0; | 4759 pParty->vPosition.x = 0; |
4766 pParty->uFallStartY = 0; | 4760 pParty->uFallStartY = 0; |
4767 pParty->uFallSpeed = 0; | 4761 pParty->uFallSpeed = 0; |
4768 TeleportToStartingPoint(uLevel_StartingPointType); | 4762 TeleportToStartingPoint(uLevel_StartingPointType); |
4769 } | 4763 } |