comparison Indoor.cpp @ 97:d7e68aebe0b3

Слияние
author Ritor1
date Sat, 03 Nov 2012 19:59:36 +0600
parents 51a5b0dc3f30 b5e26a133fae
children 6305c1cd9f6e 2331a331d36a
comparison
equal deleted inserted replaced
96:51a5b0dc3f30 97:d7e68aebe0b3
451 //double v19; // st6@27 451 //double v19; // st6@27
452 //double v20; // st5@27 452 //double v20; // st5@27
453 //char v21; // dl@27 453 //char v21; // dl@27
454 //unsigned int v22; // eax@44 454 //unsigned int v22; // eax@44
455 unsigned int v23; // eax@35 455 unsigned int v23; // eax@35
456 DWORD v24; // eax@37 456 //DWORD v24; // eax@37
457 int v25; // eax@38 457 //int v25; // eax@38
458 //char *v26; // edi@38 458 //char *v26; // edi@38
459 IDirect3DTexture2 *v27; // eax@42 459 IDirect3DTexture2 *v27; // eax@42
460 Texture *v28; // [sp+Ch] [bp-1Ch]@15 460 Texture *v28; // [sp+Ch] [bp-1Ch]@15
461 //int i; // [sp+10h] [bp-18h]@38 461 //int i; // [sp+10h] [bp-18h]@38
462 //LightmapBuilder *pStru4; // [sp+14h] [bp-14h]@16 462 //LightmapBuilder *pStru4; // [sp+14h] [bp-14h]@16
501 { 501 {
502 static_vertices_F7C228[i].vWorldPosition.x = pIndoor->pVertices[pFace->pVertexIDs[i]].x; 502 static_vertices_F7C228[i].vWorldPosition.x = pIndoor->pVertices[pFace->pVertexIDs[i]].x;
503 static_vertices_F7C228[i].vWorldPosition.y = pIndoor->pVertices[pFace->pVertexIDs[i]].y; 503 static_vertices_F7C228[i].vWorldPosition.y = pIndoor->pVertices[pFace->pVertexIDs[i]].y;
504 static_vertices_F7C228[i].vWorldPosition.z = pIndoor->pVertices[pFace->pVertexIDs[i]].z; 504 static_vertices_F7C228[i].vWorldPosition.z = pIndoor->pVertices[pFace->pVertexIDs[i]].z;
505 static_vertices_F7C228[i].u = (signed short)pFace->pVertexUIDs[i]; 505 static_vertices_F7C228[i].u = (signed short)pFace->pVertexUIDs[i];
506 static_vertices_F7C228[i].v = (signed short)pFace->pVertexUIDs[i]; 506 static_vertices_F7C228[i].v = (signed short)pFace->pVertexVIDs[i];
507 } 507 }
508 508
509 if (!pVertices || 509 if (!pVertices ||
510 (pGame->pStru9Instance->_498377(a4, 4u, pVertices, static_vertices_F7C228, &uNumVerticesa), uNumVerticesa) ) 510 (pGame->pStru9Instance->_498377(a4, 4u, pVertices, static_vertices_F7C228, &uNumVerticesa), uNumVerticesa) )
511 { 511 {
566 goto LABEL_42; 566 goto LABEL_42;
567 } 567 }
568 568
569 if (pFace->Animated()) 569 if (pFace->Animated())
570 { 570 {
571 v24 = GetTickCount() / 4; 571 //auto v24 = GetTickCount() / 4;
572 v25 = v24 - stru_5C6E00->uIntegerHalfPi; 572 //auto v25 = v24 - stru_5C6E00->uIntegerHalfPi;
573 573 uint eightSeconds = GetTickCount() % 8000;
574 float angle = (eightSeconds / 8000.0f) * 2 * 3.1415f;
575
576 //animte lava back and forth
574 for (uint i = 0; i < uNumVerticesa; ++i) 577 for (uint i = 0; i < uNumVerticesa; ++i)
575 array_507D30[i].v += (double)(pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 & (unsigned int)(stru_5C6E00->SinCos(v25) >> 8)); 578 //array_507D30[i].v += (double)(pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 & (unsigned int)(stru_5C6E00->SinCos(v25) >> 8));
579 array_507D30[i].v += pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 * cosf(angle);
576 580
577 v23 = pFace->uBitmapID; 581 v23 = pFace->uBitmapID;
578 goto LABEL_42; 582 goto LABEL_42;
579 } 583 }
580 else 584 else if (pFace->uAttributes & 0x4000)
581 { 585 {
582 if (pFace->uAttributes & 0x4000)
583 {
584 v23 = pTextureFrameTable->GetFrameTexture( 586 v23 = pTextureFrameTable->GetFrameTexture(
585 pFace->uBitmapID, 587 pFace->uBitmapID,
586 pBLVRenderParams->field_0_timer_); 588 pBLVRenderParams->field_0_timer_);
587 LABEL_42: 589 LABEL_42:
588 v27 = pBitmaps_LOD->pHardwareTextures[v23]; 590 v27 = pBitmaps_LOD->pHardwareTextures[v23];
589 if (pFace->uAttributes & 0x400000) 591 if (pFace->uAttributes & 0x400000)
590 _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); 592 _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID);
591 else 593 else
592 pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | 6, v17, 0); 594 pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | 6, v17, 0);
593 return; 595 return;
594 }
595 } 596 }
596 } 597 }
597 } 598 }
598 } 599 }
599 } 600 }
4443 bUnderwater = 1; 4444 bUnderwater = 1;
4444 pGame->uFlags2 |= 8u; 4445 pGame->uFlags2 |= 8u;
4445 } 4446 }
4446 if ( !_strcmpi(pCurrentMapName, "out15.odm") || !_strcmpi(pCurrentMapName, "d23.blv") ) 4447 if ( !_strcmpi(pCurrentMapName, "out15.odm") || !_strcmpi(pCurrentMapName, "d23.blv") )
4447 bNoNPCHiring = 1; 4448 bNoNPCHiring = 1;
4448 pPaletteManager->field_267AD3 = 0; 4449 pPaletteManager->pPalette_tintColor[0] = 0;
4449 pPaletteManager->field_267AD4 = 0; 4450 pPaletteManager->pPalette_tintColor[1] = 0;
4450 pPaletteManager->field_267AD5 = 0; 4451 pPaletteManager->pPalette_tintColor[2] = 0;
4451 pPaletteManager->RecalculateAll(); 4452 pPaletteManager->RecalculateAll();
4452 if ( qword_A750D8 ) 4453 if ( qword_A750D8 )
4453 qword_A750D8 = 0i64; 4454 qword_A750D8 = 0i64;
4454 v2 = pMapStats->GetMapInfo(pCurrentMapName); 4455 v2 = pMapStats->GetMapInfo(pCurrentMapName);
4455 v39 = v2; 4456 v39 = v2;