Mercurial > mm7
comparison Indoor.cpp @ 1207:96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
undone changes in render.h, because framerate dropped by half
author | Grumpy7 |
---|---|
date | Sun, 09 Jun 2013 01:30:36 +0200 |
parents | ab6560001f5b |
children | 182b910c528d |
comparison
equal
deleted
inserted
replaced
1206:ab6560001f5b | 1207:96a81634669e |
---|---|
530 v17 = (248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) | (((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) | 530 v17 = (248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) | (((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) |
531 | ((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) << 8)) << 8); | 531 | ((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) << 8)) << 8); |
532 sub_4B0E07(uFaceID); | 532 sub_4B0E07(uFaceID); |
533 pGame->pLightmapBuilder->ApplyLights_IndoorFace(uFaceID); | 533 pGame->pLightmapBuilder->ApplyLights_IndoorFace(uFaceID); |
534 pDecalBuilder->ApplyBloodsplatDecals_IndoorFace(uFaceID); | 534 pDecalBuilder->ApplyBloodsplatDecals_IndoorFace(uFaceID); |
535 pGame->pIndoorCameraD3D->ViewTransfrom_OffsetUV(static_vertices_F7B628, uNumVerticesa, array_507D30.data(), &stru_F8AD28); | 535 pGame->pIndoorCameraD3D->ViewTransfrom_OffsetUV(static_vertices_F7B628, uNumVerticesa, array_507D30, &stru_F8AD28); |
536 pGame->pIndoorCameraD3D->Project(array_507D30.data(), uNumVerticesa, 0); | 536 pGame->pIndoorCameraD3D->Project(array_507D30, uNumVerticesa, 0); |
537 pGame->pLightmapBuilder->std__vector_000004_size = 0; | 537 pGame->pLightmapBuilder->std__vector_000004_size = 0; |
538 if (stru_F8AD28.uNumLightsApplied > 0 || | 538 if (stru_F8AD28.uNumLightsApplied > 0 || |
539 pDecalBuilder->uNumDecals > 0) | 539 pDecalBuilder->uNumDecals > 0) |
540 { | 540 { |
541 stru_F7B60C.face_plane.vNormal.x = pFace->pFacePlane.vNormal.x; | 541 stru_F7B60C.face_plane.vNormal.x = pFace->pFacePlane.vNormal.x; |
544 stru_F7B60C.face_plane.vNormal.z = pFace->pFacePlane.vNormal.z; | 544 stru_F7B60C.face_plane.vNormal.z = pFace->pFacePlane.vNormal.z; |
545 stru_F7B60C.face_plane.dist = pFace->pFacePlane.dist; | 545 stru_F7B60C.face_plane.dist = pFace->pFacePlane.dist; |
546 } | 546 } |
547 | 547 |
548 if (stru_F8AD28.uNumLightsApplied > 0 && !(pFace->uAttributes & FACE_DO_NOT_LIGHT)) | 548 if (stru_F8AD28.uNumLightsApplied > 0 && !(pFace->uAttributes & FACE_DO_NOT_LIGHT)) |
549 pGame->pLightmapBuilder->ApplyLights(&stru_F8AD28, &stru_F7B60C, uNumVerticesa, array_507D30.data(), pVertices, 0); | 549 pGame->pLightmapBuilder->ApplyLights(&stru_F8AD28, &stru_F7B60C, uNumVerticesa, array_507D30, pVertices, 0); |
550 | 550 |
551 if (pDecalBuilder->uNumDecals > 0) | 551 if (pDecalBuilder->uNumDecals > 0) |
552 pDecalBuilder->ApplyDecals(a4a, 1, &stru_F7B60C, uNumVerticesa, array_507D30.data(), pVertices, 0, pFace->uSectorID); | 552 pDecalBuilder->ApplyDecals(a4a, 1, &stru_F7B60C, uNumVerticesa, array_507D30, pVertices, 0, pFace->uSectorID); |
553 | 553 |
554 if (pFace->Fluid()) | 554 if (pFace->Fluid()) |
555 { | 555 { |
556 if (pFace->uBitmapID == pRenderer->hd_water_tile_id) | 556 if (pFace->uBitmapID == pRenderer->hd_water_tile_id) |
557 { | 557 { |
2884 | 2884 |
2885 pGameLoadingUI_ProgressBar->Progress(); | 2885 pGameLoadingUI_ProgressBar->Progress(); |
2886 pGameLoadingUI_ProgressBar->Progress(); | 2886 pGameLoadingUI_ProgressBar->Progress(); |
2887 | 2887 |
2888 memcpy(&uNumSpriteObjects, pData, 4); | 2888 memcpy(&uNumSpriteObjects, pData, 4); |
2889 memcpy(pSpriteObjects, pData + 4, uNumSpriteObjects * sizeof(SpriteObject)); | 2889 memcpy(pSpriteObjects.data(), pData + 4, uNumSpriteObjects * sizeof(SpriteObject)); |
2890 pData += 4 + uNumSpriteObjects * sizeof(SpriteObject); | 2890 pData += 4 + uNumSpriteObjects * sizeof(SpriteObject); |
2891 | 2891 |
2892 pGameLoadingUI_ProgressBar->Progress(); | 2892 pGameLoadingUI_ProgressBar->Progress(); |
2893 | 2893 |
2894 for (uint i = 0; i < uNumSpriteObjects; ++i) | 2894 for (uint i = 0; i < uNumSpriteObjects; ++i) |
2895 { | 2895 { |
2896 auto pItem = pSpriteObjects + i; | 2896 auto pItem = &pSpriteObjects[i]; |
2897 | 2897 |
2898 if (pItem->stru_24.uItemID && !(pItem->uAttributes & 0x0100)) | 2898 if (pItem->stru_24.uItemID && !(pItem->uAttributes & 0x0100)) |
2899 { | 2899 { |
2900 pItem->uType = pItemsTable->pItems[pItem->stru_24.uItemID - 1].uSpriteID; | 2900 pItem->uType = pItemsTable->pItems[pItem->stru_24.uItemID - 1].uSpriteID; |
2901 | 2901 |
4544 | 4544 |
4545 pGameLoadingUI_ProgressBar->Progress(); | 4545 pGameLoadingUI_ProgressBar->Progress(); |
4546 | 4546 |
4547 for (uint i = 0; i < uNumSpriteObjects; ++i) | 4547 for (uint i = 0; i < uNumSpriteObjects; ++i) |
4548 { | 4548 { |
4549 auto p = pSpriteObjects + i; | 4549 auto p = &pSpriteObjects[i]; |
4550 if (p->uObjectDescID) | 4550 if (p->uObjectDescID) |
4551 { | 4551 { |
4552 auto uItemID = p->stru_24.uItemID; | 4552 auto uItemID = p->stru_24.uItemID; |
4553 if (uItemID) | 4553 if (uItemID) |
4554 { | 4554 { |