Mercurial > mm7
comparison mm7_3.cpp @ 695:af0332a32034
sub_444564 clean and fix right click on map screen
author | zipi |
---|---|
date | Sun, 17 Mar 2013 11:59:37 +0000 |
parents | e0a1fccc89b1 |
children | d6236f6a9882 a5ee769b02c6 |
comparison
equal
deleted
inserted
replaced
694:52329962fcdb | 695:af0332a32034 |
---|---|
13379 { | 13379 { |
13380 double v0; // st7@3 | 13380 double v0; // st7@3 |
13381 int v1; // ebx@3 | 13381 int v1; // ebx@3 |
13382 int v2; // edi@3 | 13382 int v2; // edi@3 |
13383 int v3; // eax@3 | 13383 int v3; // eax@3 |
13384 int v4; // esi@5 | |
13385 int v5; // edi@6 | 13384 int v5; // edi@6 |
13386 int v6; // eax@6 | 13385 int v6; // eax@6 |
13387 int v7; // eax@6 | 13386 int v7; // eax@6 |
13388 BSPModel **v8; // ecx@6 | |
13389 unsigned __int8 v9; // zf@7 | 13387 unsigned __int8 v9; // zf@7 |
13390 unsigned __int8 v10; // sf@7 | 13388 unsigned __int8 v10; // sf@7 |
13391 ODMFace *v11; // eax@9 | 13389 ODMFace *v11; // eax@9 |
13392 __int16 v12; // cx@9 | 13390 __int16 v12; // cx@9 |
13393 const char *v13; // eax@11 | 13391 const char *v13; // eax@11 |
13395 const char *result; // eax@15 | 13393 const char *result; // eax@15 |
13396 unsigned int v16; // [sp+0h] [bp-20h]@3 | 13394 unsigned int v16; // [sp+0h] [bp-20h]@3 |
13397 const char *v17; // [sp+4h] [bp-1Ch]@3 | 13395 const char *v17; // [sp+4h] [bp-1Ch]@3 |
13398 unsigned int pY; // [sp+8h] [bp-18h]@3 | 13396 unsigned int pY; // [sp+8h] [bp-18h]@3 |
13399 float v19; // [sp+Ch] [bp-14h]@1 | 13397 float v19; // [sp+Ch] [bp-14h]@1 |
13400 int v20; // [sp+10h] [bp-10h]@1 | 13398 int v20; |
13401 int v21; // [sp+14h] [bp-Ch]@1 | 13399 int v21; // [sp+14h] [bp-Ch]@1 |
13402 unsigned int v22; // [sp+18h] [bp-8h]@8 | 13400 unsigned int v22; // [sp+18h] [bp-8h]@8 |
13403 int pX; // [sp+1Ch] [bp-4h]@3 | 13401 int pX; // [sp+1Ch] [bp-4h]@3 |
13404 | 13402 |
13405 v20 = viewparams->sViewCenterX; | 13403 v20 = viewparams->sViewCenterX; |
13416 v0 = 1.0 / v19; | 13414 v0 = 1.0 / v19; |
13417 v1 = (signed __int64)((double)(pX - 229) * v0 + (double)v20); | 13415 v1 = (signed __int64)((double)(pX - 229) * v0 + (double)v20); |
13418 LODWORD(v19) = (signed __int64)((double)v21 - (double)(signed int)(pY - 181) * v0); | 13416 LODWORD(v19) = (signed __int64)((double)v21 - (double)(signed int)(pY - 181) * v0); |
13419 v2 = abs(v1 + 22528) / 512; | 13417 v2 = abs(v1 + 22528) / 512; |
13420 v3 = abs((signed)LODWORD(v19) - 22528); | 13418 v3 = abs((signed)LODWORD(v19) - 22528); |
13419 result = 0; | |
13421 if ( pOutdoor->_47F04C(v2, v3 / 512) | 13420 if ( pOutdoor->_47F04C(v2, v3 / 512) |
13422 && uCurrentlyLoadedLevelType == LEVEL_Outdoor | 13421 && uCurrentlyLoadedLevelType == LEVEL_Outdoor |
13423 && (v4 = 0, v20 = 0, (signed int)v16 > 0) ) | 13422 && (signed int)v16 > 0 ) |
13424 { | 13423 { |
13425 while ( 1 ) | 13424 for(int i = 0; i < pOutdoor->uNumBModels && !v17; i++) |
13426 { | 13425 { |
13427 pX = *(int *)((char *)&pOutdoor->pBModels[v4].vBoundingCenter.x) - v1; | 13426 pX = pOutdoor->pBModels[i].vBoundingCenter.x - v1; |
13428 pY = *(int *)((char *)&pOutdoor->pBModels[v4].vBoundingCenter.y) - LODWORD(v19); | 13427 pY = pOutdoor->pBModels[i].vBoundingCenter.y - LODWORD(v19); |
13429 v5 = abs((signed)pY); | 13428 v5 = abs((signed)pY); |
13430 v6 = abs((signed)pX); | 13429 v6 = abs((signed)pX); |
13431 v7 = int_get_vector_length(v6, v5, 0); | 13430 v7 = int_get_vector_length(v6, v5, 0); |
13432 v8 = &pOutdoor->pBModels; | 13431 if ( v7 < pOutdoor->pBModels[i].sBoundingRadius ) |
13433 if ( v7 < *(int *)((char *)&pOutdoor->pBModels[v4].sBoundingRadius) ) | 13432 { |
13434 { | 13433 if ( pOutdoor->pBModels[i].uNumFaces > 0 ) |
13435 v9 = pOutdoor->pBModels[v4].uNumFaces == 0; | |
13436 v10 = pOutdoor->pBModels[v4].uNumFaces < 0; | |
13437 v21 = 0; | |
13438 if ( !(v10 | v9) ) | |
13439 { | 13434 { |
13440 v22 = 0; | 13435 for(int j = 0; j < pOutdoor->pBModels[i].uNumFaces; j++) |
13441 do | |
13442 { | 13436 { |
13443 v11 = &v8[v4]->pFaces[v22 / 0x134]; | 13437 v11 = &pOutdoor->pBModels[i].pFaces[j];//&v8[v4]->pFaces[v22 / 0x134]; |
13444 v12 = v11->sCogTriggeredID; | 13438 v12 = v11->sCogTriggeredID; |
13445 if ( v12 ) | 13439 if ( v12 ) |
13446 { | 13440 { |
13447 if ( !(BYTE2(v11->uAttributes) & 0x10) ) | 13441 if ( !(BYTE2(v11->uAttributes) & 0x10) ) |
13448 { | 13442 { |
13453 if ( _strcmpi(v13, "") ) | 13447 if ( _strcmpi(v13, "") ) |
13454 v17 = v14; | 13448 v17 = v14; |
13455 } | 13449 } |
13456 } | 13450 } |
13457 } | 13451 } |
13458 ++v21; | |
13459 v8 = &pOutdoor->pBModels; | |
13460 v22 += 308; | |
13461 } | 13452 } |
13462 while ( v21 < pOutdoor->pBModels[v4].uNumFaces ); | |
13463 } | 13453 } |
13464 result = v17; | 13454 result = v17; |
13465 if ( v17 ) | 13455 } |
13466 break; | 13456 } |
13467 } | |
13468 ++v20; | |
13469 v4 += 188; | |
13470 if ( v20 >= (signed int)v16 ) | |
13471 goto LABEL_17; | |
13472 } | |
13473 } | |
13474 else | |
13475 { | |
13476 LABEL_17: | |
13477 result = 0; | |
13478 } | 13457 } |
13479 return result; | 13458 return result; |
13480 } | 13459 } |
13481 | 13460 |
13482 | 13461 |