Mercurial > mm7
comparison Indoor.cpp @ 1074:d6bea22f8b53
sub_440BED() cleaned
author | zipi |
---|---|
date | Sat, 25 May 2013 13:30:58 +0100 |
parents | bcebd491e8fa |
children | b44dee7e70e8 |
comparison
equal
deleted
inserted
replaced
1073:d4a1a46192ba | 1074:d6bea22f8b53 |
---|---|
313 | 313 |
314 //----- (00440BED) -------------------------------------------------------- | 314 //----- (00440BED) -------------------------------------------------------- |
315 void __fastcall sub_440BED(IndoorLocation_drawstru *_this) | 315 void __fastcall sub_440BED(IndoorLocation_drawstru *_this) |
316 { | 316 { |
317 unsigned __int16 *v1; // edi@7 | 317 unsigned __int16 *v1; // edi@7 |
318 char *v2; // esi@8 | 318 BspRenderer_stru0 *v2; // esi@8 |
319 int v3; // ecx@9 | 319 int v3; // ecx@9 |
320 unsigned int v4; // edx@9 | 320 unsigned int v4; // edx@9 |
321 char *v5; // eax@10 | 321 short *v5; // eax@10 |
322 signed int v6; // [sp+8h] [bp-8h]@7 | 322 signed int v6; // [sp+8h] [bp-8h]@7 |
323 int v7; // [sp+Ch] [bp-4h]@8 | 323 int v7; // [sp+Ch] [bp-4h]@8 |
324 short *v8; | |
324 | 325 |
325 PrepareDrawLists_BLV(_this); | 326 PrepareDrawLists_BLV(_this); |
326 if (pBLVRenderParams->uPartySectorID) | 327 if (pBLVRenderParams->uPartySectorID) |
327 IndoorLocation::ExecDraw(pRenderer->pRenderD3D != 0); | 328 IndoorLocation::ExecDraw(pRenderer->pRenderD3D != 0); |
328 pRenderer->DrawBillboardList_BLV(); | 329 pRenderer->DrawBillboardList_BLV(); |
332 if (pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_D3D_OUTLINES) | 333 if (pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_D3D_OUTLINES) |
333 pBspRenderer->DrawFaceOutlines(); | 334 pBspRenderer->DrawFaceOutlines(); |
334 if (pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_SW_OUTLINES) | 335 if (pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_SW_OUTLINES) |
335 { | 336 { |
336 v1 = pBLVRenderParams->pRenderTarget; | 337 v1 = pBLVRenderParams->pRenderTarget; |
337 v6 = 0; | 338 v7 = 0; |
338 if ( (signed int)pBspRenderer->num_nodes > 0 ) | 339 for(int i=0; i < pBspRenderer->num_nodes; i++) |
339 { | 340 { |
340 v7 = 0; | 341 BspRenderer_stru0 *pNode = &pBspRenderer->nodes[i]; |
341 v2 = (char *)&pBspRenderer->nodes[0].field_C._viewport_space_w; | 342 v4 = pRenderer->uTargetSurfacePitch * pNode->field_C._viewport_space_y; |
342 do | 343 if ( pNode->field_C._viewport_space_y <= pNode->field_C._viewport_space_w ) |
343 { | 344 { |
344 v3 = *((int *)v2 - 1); | 345 //v5 = (char *)&pBspRenderer->nodes[0].field_C.array_3D8[pNode->field_C._viewport_space_y + v7]; |
345 v4 = pRenderer->uTargetSurfacePitch * *((int *)v2 - 1); | 346 v5 = &pNode->field_C.array_3D8[pNode->field_C._viewport_space_y]; |
346 if ( v3 <= *(int *)v2 ) | 347 v8 = &pNode->field_C.array_18[pNode->field_C._viewport_space_y]; |
347 { | 348 do |
348 v5 = (char *)&pBspRenderer->nodes[0].field_C.array_3D8[v3 + v7]; | 349 { |
349 do | 350 v1[v4 + *v8] = 255; |
350 { | 351 ++pNode->field_C._viewport_space_y; |
351 v1[v4 + *((short *)v5 - 480)] = 255; | 352 v1[v4 + *v5] = 255; |
352 ++v3; | 353 v4 += pRenderer->uTargetSurfacePitch; |
353 v1[v4 + *(short *)v5] = 255; | 354 ++v5; |
354 v4 += pRenderer->uTargetSurfacePitch; | 355 ++v8; |
355 v5 += 2; | 356 } |
356 } | 357 while ( pNode->field_C._viewport_space_y <= pNode->field_C._viewport_space_w ); |
357 while ( v3 <= *(int *)v2 ); | 358 } |
358 } | 359 } |
359 ++v6; | |
360 v7 += 1126; | |
361 v2 += 2252; | |
362 } | |
363 while ( v6 < (signed int)pBspRenderer->num_nodes ); | |
364 } | |
365 } | 360 } |
366 } | 361 } |
367 } | 362 } |
368 | 363 |
369 | 364 |