comparison Render.cpp @ 1394:8ea496564034

Some LightmapBuilder renames.
author Nomad
date Thu, 18 Jul 2013 16:51:35 +0200
parents cc9a3a24d61d
children c9e3b93ec570 468f434a8d8a
comparison
equal deleted inserted replaced
1393:28f87f5234a1 1394:8ea496564034
2471 v53 = v7; 2471 v53 = v7;
2472 v54 = v7->std__vector_000004_size; 2472 v54 = v7->std__vector_000004_size;
2473 if ( v7->std__vector_000004_size) 2473 if ( v7->std__vector_000004_size)
2474 a2 = 0xFFFFFFFF; 2474 a2 = 0xFFFFFFFF;
2475 pGame->AlterGamma_ODM(a4, &a2); 2475 pGame->AlterGamma_ODM(a4, &a2);
2476 if ( byte_4D864C && pGame->uFlags & 1 ) 2476 if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_01)
2477 { 2477 {
2478 v8 = ::GetActorTintColor(a3->dimming_level, 0, array_50AC10[0].vWorldViewPosition.x, 0, 0); 2478 v8 = ::GetActorTintColor(a3->dimming_level, 0, array_50AC10[0].vWorldViewPosition.x, 0, 0);
2479 v7->_45D74F_MessWithLight(v8, 0); 2479 v7->DrawLightmaps(/*v8, 0*/);
2480 } 2480 }
2481 else 2481 else
2482 { 2482 {
2483 if ( !v54 || byte_4D864C && pGame->uFlags & 2 ) 2483 if ( !v54 || byte_4D864C && pGame->uFlags & 2 )
2484 { 2484 {
2566 uNumVertices, 2566 uNumVertices,
2567 D3DDP_DONOTLIGHT)); 2567 D3DDP_DONOTLIGHT));
2568 //v50 = (const char *)v5->pRenderD3D->pDevice; 2568 //v50 = (const char *)v5->pRenderD3D->pDevice;
2569 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_NONE)); 2569 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_NONE));
2570 //(*(void (**)(void))(*(int *)v50 + 88))(); 2570 //(*(void (**)(void))(*(int *)v50 + 88))();
2571 v53->_45D74F_MessWithLight(-1, 0); 2571 v53->DrawLightmaps(/*-1, 0*/);
2572 for (uint i = 0; i < uNumVertices; ++i) 2572 for (uint i = 0; i < uNumVertices; ++i)
2573 { 2573 {
2574 d3d_vertex_buffer[i].diffuse = a2; 2574 d3d_vertex_buffer[i].diffuse = a2;
2575 } 2575 }
2576 ErrD3D(pRenderD3D->pDevice->SetTexture(0, pTexture)); 2576 ErrD3D(pRenderD3D->pDevice->SetTexture(0, pTexture));
5376 //v61 = pVertices; 5376 //v61 = pVertices;
5377 5377
5378 /* v9 = pGame->pLightmapBuilder; 5378 /* v9 = pGame->pLightmapBuilder;
5379 v65 = v9; 5379 v65 = v9;
5380 v10 = v9->std__vector_000004_size;*/ 5380 v10 = v9->std__vector_000004_size;*/
5381 if ( byte_4D864C && pGame->uFlags & 1 ) 5381 if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_01)
5382 { 5382 {
5383 v11 = ::GetActorTintColor(a4->dimming_level, 0, array_50AC10[0].vWorldViewPosition.x, 0, 0); 5383 v11 = ::GetActorTintColor(a4->dimming_level, 0, array_50AC10[0].vWorldViewPosition.x, 0, 0);
5384 pGame->pLightmapBuilder->_45D74F_MessWithLight(v11, 0); 5384 pGame->pLightmapBuilder->DrawLightmaps(/*v11, 0*/);
5385 } 5385 }
5386 else 5386 else
5387 { 5387 {
5388 if (transparent || !pGame->pLightmapBuilder->std__vector_000004_size || 5388 if (transparent || !pGame->pLightmapBuilder->std__vector_000004_size ||
5389 byte_4D864C && pGame->uFlags & 2 ) 5389 byte_4D864C && pGame->uFlags & 2 )
5473 uNumVertices, 5473 uNumVertices,
5474 16)); 5474 16));
5475 //v63 = (const char *)v7->pRenderD3D->pDevice; 5475 //v63 = (const char *)v7->pRenderD3D->pDevice;
5476 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_NONE)); 5476 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_NONE));
5477 //(*(void (**)(void))(*(int *)v63 + 88))(); 5477 //(*(void (**)(void))(*(int *)v63 + 88))();
5478 pGame->pLightmapBuilder->_45D74F_MessWithLight(-1, 0); 5478 pGame->pLightmapBuilder->DrawLightmaps(/*-1, 0*/);
5479 for (uint i = 0; i < uNumVertices; ++i) 5479 for (uint i = 0; i < uNumVertices; ++i)
5480 { 5480 {
5481 d3d_vertex_buffer[i].diffuse = -1; 5481 d3d_vertex_buffer[i].diffuse = -1;
5482 } 5482 }
5483 ErrD3D(pRenderD3D->pDevice->SetTexture(0, a5)); 5483 ErrD3D(pRenderD3D->pDevice->SetTexture(0, a5));
6101 if (GetTickCount() % 300 >= 150) 6101 if (GetTickCount() % 300 >= 150)
6102 uColor = uCorrectedColor = 0xFF20FF20; 6102 uColor = uCorrectedColor = 0xFF20FF20;
6103 else uColor = uCorrectedColor = 0xFF109010; 6103 else uColor = uCorrectedColor = 0xFF109010;
6104 } 6104 }
6105 6105
6106 if (byte_4D864C && pGame->uFlags & 1) 6106 if (byte_4D864C && pGame->uFlags & GAME_FLAGS_1_01)
6107 { 6107 {
6108 __debugbreak(); 6108 __debugbreak();
6109 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, false)); 6109 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, false));
6110 ErrD3D(pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, D3DTADDRESS_WRAP)); 6110 ErrD3D(pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, D3DTADDRESS_WRAP));
6111 for (uint i = 0; i < uNumVertices; ++i) 6111 for (uint i = 0; i < uNumVertices; ++i)
6126 D3DPT_TRIANGLEFAN, 6126 D3DPT_TRIANGLEFAN,
6127 D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1, 6127 D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1,
6128 d3d_vertex_buffer, 6128 d3d_vertex_buffer,
6129 uNumVertices, 6129 uNumVertices,
6130 28)); 6130 28));
6131 pGame->pLightmapBuilder->_45D74F_MessWithLight(-1, 0); 6131 pGame->pLightmapBuilder->DrawLightmaps(/*-1, 0*/);
6132 } 6132 }
6133 else 6133 else
6134 { 6134 {
6135 if (!pGame->pLightmapBuilder->std__vector_000004_size || 6135 if (!pGame->pLightmapBuilder->std__vector_000004_size ||
6136 byte_4D864C && pGame->uFlags & 2) 6136 byte_4D864C && pGame->uFlags & 2)
6206 d3d_vertex_buffer, 6206 d3d_vertex_buffer,
6207 uNumVertices, 6207 uNumVertices,
6208 28)); 6208 28));
6209 6209
6210 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_NONE)); 6210 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_NONE));
6211 pGame->pLightmapBuilder->_45D74F_MessWithLight(-1, 0); 6211 pGame->pLightmapBuilder->DrawLightmaps(/*-1, 0*/);
6212 6212
6213 for (uint i = 0; i < uNumVertices; ++i) 6213 for (uint i = 0; i < uNumVertices; ++i)
6214 d3d_vertex_buffer[i].diffuse = uCorrectedColor; 6214 d3d_vertex_buffer[i].diffuse = uCorrectedColor;
6215 /*v33 = uNumVertices; 6215 /*v33 = uNumVertices;
6216 if ( (signed int)uNumVertices > 0 ) 6216 if ( (signed int)uNumVertices > 0 )