Mercurial > mm7
changeset 1074:d6bea22f8b53
sub_440BED() cleaned
author | zipi |
---|---|
date | Sat, 25 May 2013 13:30:58 +0100 |
parents | d4a1a46192ba |
children | 1e38e5c049f3 |
files | Indoor.cpp |
diffstat | 1 files changed, 25 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/Indoor.cpp Sat May 25 12:24:35 2013 +0100 +++ b/Indoor.cpp Sat May 25 13:30:58 2013 +0100 @@ -315,12 +315,13 @@ void __fastcall sub_440BED(IndoorLocation_drawstru *_this) { unsigned __int16 *v1; // edi@7 - char *v2; // esi@8 + BspRenderer_stru0 *v2; // esi@8 int v3; // ecx@9 unsigned int v4; // edx@9 - char *v5; // eax@10 + short *v5; // eax@10 signed int v6; // [sp+8h] [bp-8h]@7 int v7; // [sp+Ch] [bp-4h]@8 + short *v8; PrepareDrawLists_BLV(_this); if (pBLVRenderParams->uPartySectorID) @@ -334,34 +335,28 @@ if (pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_SW_OUTLINES) { v1 = pBLVRenderParams->pRenderTarget; - v6 = 0; - if ( (signed int)pBspRenderer->num_nodes > 0 ) - { - v7 = 0; - v2 = (char *)&pBspRenderer->nodes[0].field_C._viewport_space_w; - do - { - v3 = *((int *)v2 - 1); - v4 = pRenderer->uTargetSurfacePitch * *((int *)v2 - 1); - if ( v3 <= *(int *)v2 ) - { - v5 = (char *)&pBspRenderer->nodes[0].field_C.array_3D8[v3 + v7]; - do - { - v1[v4 + *((short *)v5 - 480)] = 255; - ++v3; - v1[v4 + *(short *)v5] = 255; - v4 += pRenderer->uTargetSurfacePitch; - v5 += 2; - } - while ( v3 <= *(int *)v2 ); - } - ++v6; - v7 += 1126; - v2 += 2252; - } - while ( v6 < (signed int)pBspRenderer->num_nodes ); - } + v7 = 0; + for(int i=0; i < pBspRenderer->num_nodes; i++) + { + BspRenderer_stru0 *pNode = &pBspRenderer->nodes[i]; + v4 = pRenderer->uTargetSurfacePitch * pNode->field_C._viewport_space_y; + if ( pNode->field_C._viewport_space_y <= pNode->field_C._viewport_space_w ) + { + //v5 = (char *)&pBspRenderer->nodes[0].field_C.array_3D8[pNode->field_C._viewport_space_y + v7]; + v5 = &pNode->field_C.array_3D8[pNode->field_C._viewport_space_y]; + v8 = &pNode->field_C.array_18[pNode->field_C._viewport_space_y]; + do + { + v1[v4 + *v8] = 255; + ++pNode->field_C._viewport_space_y; + v1[v4 + *v5] = 255; + v4 += pRenderer->uTargetSurfacePitch; + ++v5; + ++v8; + } + while ( pNode->field_C._viewport_space_y <= pNode->field_C._viewport_space_w ); + } + } } } }