comparison Render.cpp @ 323:d720a13e2273

Very basic picking & entering houses
author Nomad
date Wed, 20 Feb 2013 08:23:12 +0200
parents 2a09e1d6fc8f
children 672b83584b0f
comparison
equal deleted inserted replaced
322:ce39b96acf5c 323:d720a13e2273
608 (array_77EC08[1999].pTexture = (Texture *)(pOutdoor->uMainTile_BitmapID != -1 ? (int)v2 : 0)) == 0) ) 608 (array_77EC08[1999].pTexture = (Texture *)(pOutdoor->uMainTile_BitmapID != -1 ? (int)v2 : 0)) == 0) )
609 return (signed __int16)v2; 609 return (signed __int16)v2;
610 array_77EC08[1999].field_58 = 23 - (-20 * pOutdoor->vSunlight.z >> 16); 610 array_77EC08[1999].field_58 = 23 - (-20 * pOutdoor->vSunlight.z >> 16);
611 if ( array_77EC08[1999].field_58 > 20 ) 611 if ( array_77EC08[1999].field_58 > 20 )
612 array_77EC08[1999].field_58 = 20; 612 array_77EC08[1999].field_58 = 20;
613 v10 = stru_5C6E00->SinCos(pIndoorCamera->sRotationX - stru_5C6E00->uIntegerHalfPi); 613 v10 = stru_5C6E00->Sin(pIndoorCamera->sRotationX);
614 array_77EC08[1999].v_18.y = 0; 614 array_77EC08[1999].v_18.y = 0;
615 array_77EC08[1999].v_18.x = v10; 615 array_77EC08[1999].v_18.x = v10;
616 array_77EC08[1999].v_18.z = stru_5C6E00->SinCos(pIndoorCamera->sRotationX); 616 array_77EC08[1999].v_18.z = stru_5C6E00->Cos(pIndoorCamera->sRotationX);
617 array_77EC08[1999].field_24 = 2048 - (pIndoorCamera->pos.z << 16); 617 array_77EC08[1999].field_24 = 2048 - (pIndoorCamera->pos.z << 16);
618 a1a = (signed __int64)((double)(pIndoorCamera->pos.z * pOutdoorCamera->int_fov_rad) 618 a1a = (signed __int64)((double)(pIndoorCamera->pos.z * pOutdoorCamera->int_fov_rad)
619 / ((double)pOutdoorCamera->int_fov_rad + 8192.0) 619 / ((double)pOutdoorCamera->int_fov_rad + 8192.0)
620 + (double)pViewport->uScreenCenterY); 620 + (double)pViewport->uScreenCenterY);
621 cos((double)pIndoorCamera->sRotationX * 0.0030664064); 621 cos((double)pIndoorCamera->sRotationX * 0.0030664064);
625 v2 = (stru148 *)&pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID]; 625 v2 = (stru148 *)&pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID];
626 array_77EC08[1999].pTexture = (Texture *)(pOutdoor->uSky_TextureID != -1 ? (int)v2 : 0); 626 array_77EC08[1999].pTexture = (Texture *)(pOutdoor->uSky_TextureID != -1 ? (int)v2 : 0);
627 if ( !(pOutdoor->uSky_TextureID != -1 ? (int)v2 : 0) ) 627 if ( !(pOutdoor->uSky_TextureID != -1 ? (int)v2 : 0) )
628 return (signed __int16)v2; 628 return (signed __int16)v2;
629 array_77EC08[1999].field_58 = 0; 629 array_77EC08[1999].field_58 = 0;
630 v11 = stru_5C6E00->SinCos(pIndoorCamera->sRotationX + 16 - stru_5C6E00->uIntegerHalfPi); 630 v11 = stru_5C6E00->Sin(pIndoorCamera->sRotationX + 16);
631 array_77EC08[1999].v_18.y = 0; 631 array_77EC08[1999].v_18.y = 0;
632 array_77EC08[1999].v_18.x = -v11; 632 array_77EC08[1999].v_18.x = -v11;
633 array_77EC08[1999].v_18.z = -stru_5C6E00->SinCos(pIndoorCamera->sRotationX + 16); 633 array_77EC08[1999].v_18.z = -stru_5C6E00->Cos(pIndoorCamera->sRotationX + 16);
634 LOWORD(v2) = 224 * LOWORD(pMiscTimer->uTotalGameTimeElapsed); 634 LOWORD(v2) = 224 * LOWORD(pMiscTimer->uTotalGameTimeElapsed);
635 array_77EC08[1999].field_24 = 0x2000000u; 635 array_77EC08[1999].field_24 = 0x2000000u;
636 array_77EC08[1999].sTextureDeltaU = 224 * pMiscTimer->uTotalGameTimeElapsed; 636 array_77EC08[1999].sTextureDeltaU = 224 * pMiscTimer->uTotalGameTimeElapsed;
637 array_77EC08[1999].sTextureDeltaV = 224 * pMiscTimer->uTotalGameTimeElapsed; 637 array_77EC08[1999].sTextureDeltaV = 224 * pMiscTimer->uTotalGameTimeElapsed;
638 if ( day_attrib & 1 638 if ( day_attrib & 1
727 } 727 }
728 while ( v9 ); 728 while ( v9 );
729 } 729 }
730 return (signed __int16)v2; 730 return (signed __int16)v2;
731 } 731 }
732 // 6BE030: using guessed type int day_attrib;
733 // 6BE3C4: using guessed type char bUnderwater;
734 // 80AA10: using guessed type char byte_80AA10;
735 // 80AA14: using guessed type int dword_80AA14;
736 // 80AA18: using guessed type int dword_80AA18;
737 // 80AA1C: using guessed type int dword_80AA1C;
738 // 80AA20: using guessed type int dword_80AA20;
739 732
740 //----- (00485044) -------------------------------------------------------- 733 //----- (00485044) --------------------------------------------------------
741 int Render::DrawSkySW(Span *a1, stru148 *a2, int a3) 734 int Render::DrawSkySW(Span *a1, stru148 *a2, int a3)
742 { 735 {
743 stru148 *v3; // esi@1 736 stru148 *v3; // esi@1
1032 int v126; // [sp+70h] [bp-4h]@9 1025 int v126; // [sp+70h] [bp-4h]@9
1033 1026
1034 v105 = pIndoorCamera->sRotationY / ((signed int)stru_5C6E00->uIntegerHalfPi / 2);//2 1027 v105 = pIndoorCamera->sRotationY / ((signed int)stru_5C6E00->uIntegerHalfPi / 2);//2
1035 pDirectionIndicator1 = stru_5C6E00->uDoublePiMask & (stru_5C6E00->uIntegerDoublePi - pIndoorCamera->sRotationY);//1536 1028 pDirectionIndicator1 = stru_5C6E00->uDoublePiMask & (stru_5C6E00->uIntegerDoublePi - pIndoorCamera->sRotationY);//1536
1036 pDirectionIndicator2 = stru_5C6E00->uDoublePiMask & (stru_5C6E00->uIntegerPi + pDirectionIndicator1);//512 1029 pDirectionIndicator2 = stru_5C6E00->uDoublePiMask & (stru_5C6E00->uIntegerPi + pDirectionIndicator1);//512
1037 v124 = ((pIndoorCamera->uMapGridCellX << 16) + 3 * stru_5C6E00->SinCos(stru_5C6E00->uDoublePiMask & (stru_5C6E00->uIntegerPi + pDirectionIndicator1))) >> 16; 1030 v124 = ((pIndoorCamera->uMapGridCellX << 16) + 3 * stru_5C6E00->Cos(stru_5C6E00->uDoublePiMask & (stru_5C6E00->uIntegerPi + pDirectionIndicator1))) >> 16;
1038 v123 = ((pIndoorCamera->uMapGridCellZ << 16) + 3 * stru_5C6E00->SinCos(pDirectionIndicator2 - stru_5C6E00->uIntegerHalfPi)) >> 16; 1031 v123 = ((pIndoorCamera->uMapGridCellZ << 16) + 3 * stru_5C6E00->Sin(pDirectionIndicator2)) >> 16;
1039 v120 = pOutdoorCamera->outdoor_grid_band_3 + v124;//+- range X 1032 v120 = pOutdoorCamera->outdoor_grid_band_3 + v124;//+- range X
1040 v119 = pOutdoorCamera->outdoor_grid_band_3 + v123; 1033 v119 = pOutdoorCamera->outdoor_grid_band_3 + v123;
1041 v2 = pOutdoorCamera->uCameraFovInDegrees + 15; 1034 v2 = pOutdoorCamera->uCameraFovInDegrees + 15;
1042 i = v124 - pOutdoorCamera->outdoor_grid_band_3; 1035 i = v124 - pOutdoorCamera->outdoor_grid_band_3;
1043 v122 = v123 - pOutdoorCamera->outdoor_grid_band_3; 1036 v122 = v123 - pOutdoorCamera->outdoor_grid_band_3;
1045 if ( v2 > 90 ) 1038 if ( v2 > 90 )
1046 v2 = 90; 1039 v2 = 90;
1047 v3 = (v2 << 11) / 720; 1040 v3 = (v2 << 11) / 720;
1048 v4 = stru_5C6E00->uDoublePiMask & (pDirectionIndicator1 - v3); 1041 v4 = stru_5C6E00->uDoublePiMask & (pDirectionIndicator1 - v3);
1049 v5 = stru_5C6E00->uDoublePiMask & (v3 + pDirectionIndicator1); 1042 v5 = stru_5C6E00->uDoublePiMask & (v3 + pDirectionIndicator1);
1050 v106 = stru_5C6E00->SinCos(v4); 1043 v106 = stru_5C6E00->Cos(v4);
1051 uEndZ = stru_5C6E00->SinCos(v4 - stru_5C6E00->uIntegerHalfPi); 1044 uEndZ = stru_5C6E00->Sin(v4);
1052 v111 = stru_5C6E00->SinCos(v5); 1045 v111 = stru_5C6E00->Cos(v5);
1053 v6 = stru_5C6E00->SinCos(v5 - stru_5C6E00->uIntegerHalfPi); 1046 v6 = stru_5C6E00->Sin(v5);
1054 v7 = v4 & stru_5C6E00->uPiMask; 1047 v7 = v4 & stru_5C6E00->uPiMask;
1055 1048
1056 if ( (v4 & stru_5C6E00->uPiMask) >= stru_5C6E00->uIntegerHalfPi ) 1049 if ( (v4 & stru_5C6E00->uPiMask) >= stru_5C6E00->uIntegerHalfPi )
1057 v8 = -stru_5C6E00->pTanTable[stru_5C6E00->uIntegerPi - v7]; 1050 v8 = -stru_5C6E00->pTanTable[stru_5C6E00->uIntegerPi - v7];
1058 else 1051 else
3040 billboard.pPalette = v9; 3033 billboard.pPalette = v9;
3041 if ( !v10 ) 3034 if ( !v10 )
3042 billboard.pPalette = pPaletteManager->field_261600[*((short *)v1 - 7)]; 3035 billboard.pPalette = pPaletteManager->field_261600[*((short *)v1 - 7)];
3043 if ( !(billboard.uFlags & 0x40) && billboard.uFlags & 0x80 ) 3036 if ( !(billboard.uFlags & 0x40) && billboard.uFlags & 0x80 )
3044 { 3037 {
3045 v12 = stru_5C6E00->SinCos(i * 5 + GetTickCount()); 3038 v12 = stru_5C6E00->Cos(i * 5 + GetTickCount());
3046 v15 = abs(v12); 3039 v15 = abs(v12);
3047 v18 = (unsigned __int64)(15i64 * v15) >> 16; 3040 v18 = (unsigned __int64)(15i64 * v15) >> 16;
3048 billboard.pPalette2 = PaletteManager::Get_Dark_or_Red_LUT(*((short *)v1 - 7), 15 - v18, 1); 3041 billboard.pPalette2 = PaletteManager::Get_Dark_or_Red_LUT(*((short *)v1 - 7), 15 - v18, 1);
3049 } 3042 }
3050 v13 = *((short *)v1 - 8); 3043 v13 = *((short *)v1 - 8);
4435 } 4428 }
4436 else 4429 else
4437 { 4430 {
4438 if ( !v54 || byte_4D864C && pGame->uFlags & 2 ) 4431 if ( !v54 || byte_4D864C && pGame->uFlags & 2 )
4439 { 4432 {
4440 ErrD3D(pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, D3DTADDRESS_WRAP));//Режимы визуализации точечных спрайтов 4433 ErrD3D(pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, D3DTADDRESS_WRAP));
4441 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_CW)); 4434 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_CW));
4442 if (bUsingSpecular) 4435 if (bUsingSpecular)
4443 { 4436 {
4444 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE)); 4437 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE));
4445 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE)); 4438 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE));
4477 v18 = v55-- == 1; 4470 v18 = v55-- == 1;
4478 v57 = v46 + 32; 4471 v57 = v46 + 32;
4479 } 4472 }
4480 while ( !v18 ); 4473 while ( !v18 );
4481 } 4474 }
4475
4476 if (a4->uAttributes & FACE_OUTLINED)
4477 {
4478 int color;
4479 if (GetTickCount() % 300 >= 150)
4480 color = 0xFFFF2020;
4481 else color = 0xFF901010;
4482
4483 for (uint i = 0; i < uNumVertices; ++i)
4484 d3d_vertex_buffer[i].diffuse = color;
4485 }
4486
4482 pRenderD3D->pDevice->SetTexture(0, pTexture); 4487 pRenderD3D->pDevice->SetTexture(0, pTexture);
4483 pRenderD3D->pDevice->DrawPrimitive(D3DPT_TRIANGLEFAN, 4488 pRenderD3D->pDevice->DrawPrimitive(D3DPT_TRIANGLEFAN,
4484 D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1, 4489 D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1,
4485 d3d_vertex_buffer, 4490 d3d_vertex_buffer,
4486 uNumVertices, 4491 uNumVertices,
8169 v13 = v12; 8174 v13 = v12;
8170 v14 = (double)(v10 - 12); 8175 v14 = (double)(v10 - 12);
8171 v15 = v14; 8176 v15 = v14;
8172 v16 = (double)(v9 - 12) - v12; 8177 v16 = (double)(v9 - 12) - v12;
8173 v17 = (double)(v10 - 25) - v14; 8178 v17 = (double)(v10 - 25) - v14;
8174 v18 = stru_5C6E00->SinCos(angle); 8179 v18 = stru_5C6E00->Cos(angle);
8175 v19 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); 8180 v19 = stru_5C6E00->Sin(angle);
8176 v20 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); 8181 v20 = stru_5C6E00->Sin(angle);
8177 v21 = stru_5C6E00->SinCos(angle); 8182 v21 = stru_5C6E00->Cos(angle);
8178 pBillboardRenderListD3D[v8].pQuards[0].pos.x = (((double)(unsigned __int16)v18 * 0.000015259022 8183 pBillboardRenderListD3D[v8].pQuards[0].pos.x = (((double)(unsigned __int16)v18 * 0.000015259022
8179 + (double)(v18 >> 16)) 8184 + (double)(v18 >> 16))
8180 * v16 8185 * v16
8181 - ((double)(unsigned __int16)v19 * 0.000015259022 8186 - ((double)(unsigned __int16)v19 * 0.000015259022
8182 + (double)(v19 >> 16)) 8187 + (double)(v19 >> 16))
8194 pBillboardRenderListD3D[v8].pQuards[0].rhw = 1.0 / v6; 8199 pBillboardRenderListD3D[v8].pQuards[0].rhw = 1.0 / v6;
8195 pBillboardRenderListD3D[v8].pQuards[0].texcoord.x = 0.0; 8200 pBillboardRenderListD3D[v8].pQuards[0].texcoord.x = 0.0;
8196 pBillboardRenderListD3D[v8].pQuards[0].texcoord.y = 0.0; 8201 pBillboardRenderListD3D[v8].pQuards[0].texcoord.y = 0.0;
8197 v31 = (double)(a2->uScreenSpaceX + 12) - v13; 8202 v31 = (double)(a2->uScreenSpaceX + 12) - v13;
8198 v32 = (double)a2->uScreenSpaceY - v15; 8203 v32 = (double)a2->uScreenSpaceY - v15;
8199 v25 = stru_5C6E00->SinCos(angle); 8204 v25 = stru_5C6E00->Cos(angle);
8200 v26 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); 8205 v26 = stru_5C6E00->Sin(angle);
8201 v27 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); 8206 v27 = stru_5C6E00->Sin(angle);
8202 v28 = stru_5C6E00->SinCos(angle); 8207 v28 = stru_5C6E00->Cos(angle);
8203 pBillboardRenderListD3D[v8].pQuards[1].pos.x = (((double)(unsigned __int16)v25 * 0.000015259022 8208 pBillboardRenderListD3D[v8].pQuards[1].pos.x = (((double)(unsigned __int16)v25 * 0.000015259022
8204 + (double)(v25 >> 16)) 8209 + (double)(v25 >> 16))
8205 * v23 8210 * v23
8206 - ((double)(unsigned __int16)v26 * 0.000015259022 8211 - ((double)(unsigned __int16)v26 * 0.000015259022
8207 + (double)(v26 >> 16)) 8212 + (double)(v26 >> 16))
8220 pBillboardRenderListD3D[v8].pQuards[1].diffuse = uDiffuse; 8225 pBillboardRenderListD3D[v8].pQuards[1].diffuse = uDiffuse;
8221 pBillboardRenderListD3D[v8].pQuards[1].texcoord.x = 0.0; 8226 pBillboardRenderListD3D[v8].pQuards[1].texcoord.x = 0.0;
8222 pBillboardRenderListD3D[v8].pQuards[1].texcoord.y = 1.0; 8227 pBillboardRenderListD3D[v8].pQuards[1].texcoord.y = 1.0;
8223 v23 = (double)(a2->uScreenSpaceX - 12) - v13; 8228 v23 = (double)(a2->uScreenSpaceX - 12) - v13;
8224 v24 = (double)a2->uScreenSpaceY - v15; 8229 v24 = (double)a2->uScreenSpaceY - v15;
8225 v33 = stru_5C6E00->SinCos(angle); 8230 v33 = stru_5C6E00->Cos(angle);
8226 v34 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); 8231 v34 = stru_5C6E00->Sin(angle);
8227 v35 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); 8232 v35 = stru_5C6E00->Sin(angle);
8228 v36 = stru_5C6E00->SinCos(angle); 8233 v36 = stru_5C6E00->Cos(angle);
8229 pBillboardRenderListD3D[v8].pQuards[2].pos.x = (((double)(unsigned __int16)v33 * 0.000015259022 8234 pBillboardRenderListD3D[v8].pQuards[2].pos.x = (((double)(unsigned __int16)v33 * 0.000015259022
8230 + (double)(v33 >> 16)) 8235 + (double)(v33 >> 16))
8231 * v31 8236 * v31
8232 - ((double)(unsigned __int16)v34 * 0.000015259022 8237 - ((double)(unsigned __int16)v34 * 0.000015259022
8233 + (double)(v34 >> 16)) 8238 + (double)(v34 >> 16))
8246 pBillboardRenderListD3D[v8].pQuards[2].pos.y = v38; 8251 pBillboardRenderListD3D[v8].pQuards[2].pos.y = v38;
8247 pBillboardRenderListD3D[v8].pQuards[2].texcoord.x = 1.0; 8252 pBillboardRenderListD3D[v8].pQuards[2].texcoord.x = 1.0;
8248 pBillboardRenderListD3D[v8].pQuards[2].texcoord.y = 1.0; 8253 pBillboardRenderListD3D[v8].pQuards[2].texcoord.y = 1.0;
8249 v39 = (double)(a2->uScreenSpaceX + 12) - v13; 8254 v39 = (double)(a2->uScreenSpaceX + 12) - v13;
8250 v40 = (double)(a2->uScreenSpaceY - 25) - v15; 8255 v40 = (double)(a2->uScreenSpaceY - 25) - v15;
8251 v41 = stru_5C6E00->SinCos(angle); 8256 v41 = stru_5C6E00->Cos(angle);
8252 v42 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); 8257 v42 = stru_5C6E00->Sin(angle);
8253 v43 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); 8258 v43 = stru_5C6E00->Sin(angle);
8254 v44 = stru_5C6E00->SinCos(angle); 8259 v44 = stru_5C6E00->Cos(angle);
8255 pBillboardRenderListD3D[v8].pQuards[3].pos.x = (((double)(unsigned __int16)v41 * 0.000015259022 8260 pBillboardRenderListD3D[v8].pQuards[3].pos.x = (((double)(unsigned __int16)v41 * 0.000015259022
8256 + (double)(v41 >> 16)) 8261 + (double)(v41 >> 16))
8257 * v39 8262 * v39
8258 - ((double)(unsigned __int16)v42 * 0.000015259022 8263 - ((double)(unsigned __int16)v42 * 0.000015259022
8259 + (double)(v42 >> 16)) 8264 + (double)(v42 >> 16))
8343 v13 = v12; 8348 v13 = v12;
8344 v14 = (double)(v10 - 12); 8349 v14 = (double)(v10 - 12);
8345 v15 = v14; 8350 v15 = v14;
8346 v16 = (double)(v9 - 12) - v12; 8351 v16 = (double)(v9 - 12) - v12;
8347 v17 = (double)(v10 - 25) - v14; 8352 v17 = (double)(v10 - 25) - v14;
8348 v18 = stru_5C6E00->SinCos(angle); 8353 v18 = stru_5C6E00->Cos(angle);
8349 v19 = angle - stru_5C6E00->uIntegerHalfPi; 8354 v19 = angle - stru_5C6E00->uIntegerHalfPi;
8350 v20 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); 8355 v20 = stru_5C6E00->Sin(angle);
8351 v21 = stru_5C6E00->SinCos(v19); 8356 v21 = stru_5C6E00->Sin(angle);
8352 v22 = stru_5C6E00->SinCos(angle); 8357 v22 = stru_5C6E00->Cos(angle);
8353 pBillboardRenderListD3D[v8].pQuards[0].pos.x = (((double)(unsigned __int16)v18 * 0.000015259022 8358 pBillboardRenderListD3D[v8].pQuards[0].pos.x = (((double)(unsigned __int16)v18 * 0.000015259022
8354 + (double)(v18 >> 16)) 8359 + (double)(v18 >> 16))
8355 * v16 8360 * v16
8356 - ((double)(unsigned __int16)v20 * 0.000015259022 8361 - ((double)(unsigned __int16)v20 * 0.000015259022
8357 + (double)(v20 >> 16)) 8362 + (double)(v20 >> 16))
8371 pBillboardRenderListD3D[v8].pQuards[0].rhw = v25; 8376 pBillboardRenderListD3D[v8].pQuards[0].rhw = v25;
8372 pBillboardRenderListD3D[v8].pQuards[0].texcoord.x = 0.0; 8377 pBillboardRenderListD3D[v8].pQuards[0].texcoord.x = 0.0;
8373 pBillboardRenderListD3D[v8].pQuards[0].texcoord.y = 0.0; 8378 pBillboardRenderListD3D[v8].pQuards[0].texcoord.y = 0.0;
8374 v26 = (double)(a2->uScreenSpaceX - 12) - v13; 8379 v26 = (double)(a2->uScreenSpaceX - 12) - v13;
8375 v27 = (double)a2->uScreenSpaceY - v15; 8380 v27 = (double)a2->uScreenSpaceY - v15;
8376 v28 = stru_5C6E00->SinCos(angle); 8381 v28 = stru_5C6E00->Cos(angle);
8377 v29 = stru_5C6E00->SinCos(v19); 8382 v29 = stru_5C6E00->Sin(v19 + stru_5C6E00->uIntegerHalfPi);
8378 v30 = stru_5C6E00->SinCos(v19); 8383 v30 = stru_5C6E00->Sin(v19 + stru_5C6E00->uIntegerHalfPi);
8379 v31 = stru_5C6E00->SinCos(angle); 8384 v31 = stru_5C6E00->Cos(angle);
8380 pBillboardRenderListD3D[v8].pQuards[1].pos.x = (((double)(unsigned __int16)v28 * 0.000015259022 8385 pBillboardRenderListD3D[v8].pQuards[1].pos.x = (((double)(unsigned __int16)v28 * 0.000015259022
8381 + (double)(v28 >> 16)) 8386 + (double)(v28 >> 16))
8382 * v26 8387 * v26
8383 - ((double)(unsigned __int16)v29 * 0.000015259022 8388 - ((double)(unsigned __int16)v29 * 0.000015259022
8384 + (double)(v29 >> 16)) 8389 + (double)(v29 >> 16))
8396 pBillboardRenderListD3D[v8].pQuards[1].diffuse = uDiffuse; 8401 pBillboardRenderListD3D[v8].pQuards[1].diffuse = uDiffuse;
8397 pBillboardRenderListD3D[v8].pQuards[1].texcoord.x = 0.0; 8402 pBillboardRenderListD3D[v8].pQuards[1].texcoord.x = 0.0;
8398 pBillboardRenderListD3D[v8].pQuards[1].texcoord.y = 1.0; 8403 pBillboardRenderListD3D[v8].pQuards[1].texcoord.y = 1.0;
8399 v33 = (double)(a2->uScreenSpaceX + 12) - v13; 8404 v33 = (double)(a2->uScreenSpaceX + 12) - v13;
8400 v34 = (double)a2->uScreenSpaceY - v15; 8405 v34 = (double)a2->uScreenSpaceY - v15;
8401 v35 = stru_5C6E00->SinCos(angle); 8406 v35 = stru_5C6E00->Cos(angle);
8402 v36 = stru_5C6E00->SinCos(v19); 8407 v36 = stru_5C6E00->Sin(v19 + stru_5C6E00->uIntegerHalfPi);
8403 v37 = stru_5C6E00->SinCos(v19); 8408 v37 = stru_5C6E00->Sin(v19 + stru_5C6E00->uIntegerHalfPi);
8404 v38 = stru_5C6E00->SinCos(angle); 8409 v38 = stru_5C6E00->Cos(angle);
8405 pBillboardRenderListD3D[v8].pQuards[2].pos.x = (((double)(unsigned __int16)v35 * 0.000015259022 8410 pBillboardRenderListD3D[v8].pQuards[2].pos.x = (((double)(unsigned __int16)v35 * 0.000015259022
8406 + (double)(v35 >> 16)) 8411 + (double)(v35 >> 16))
8407 * v33 8412 * v33
8408 - ((double)(unsigned __int16)v36 * 0.000015259022 8413 - ((double)(unsigned __int16)v36 * 0.000015259022
8409 + (double)(v36 >> 16)) 8414 + (double)(v36 >> 16))
8421 pBillboardRenderListD3D[v8].pQuards[2].pos.y = v39; 8426 pBillboardRenderListD3D[v8].pQuards[2].pos.y = v39;
8422 pBillboardRenderListD3D[v8].pQuards[2].texcoord.x = 1.0; 8427 pBillboardRenderListD3D[v8].pQuards[2].texcoord.x = 1.0;
8423 pBillboardRenderListD3D[v8].pQuards[2].texcoord.y = 1.0; 8428 pBillboardRenderListD3D[v8].pQuards[2].texcoord.y = 1.0;
8424 v40 = (double)(a2->uScreenSpaceX + 12) - v13; 8429 v40 = (double)(a2->uScreenSpaceX + 12) - v13;
8425 v41 = (double)(a2->uScreenSpaceY - 25) - v15; 8430 v41 = (double)(a2->uScreenSpaceY - 25) - v15;
8426 v42 = stru_5C6E00->SinCos(angle); 8431 v42 = stru_5C6E00->Cos(angle);
8427 v43 = stru_5C6E00->SinCos(v19); 8432 v43 = stru_5C6E00->Sin(v19 + stru_5C6E00->uIntegerHalfPi);
8428 v44 = stru_5C6E00->SinCos(v19); 8433 v44 = stru_5C6E00->Sin(v19 + stru_5C6E00->uIntegerHalfPi);
8429 v45 = stru_5C6E00->SinCos(angle); 8434 v45 = stru_5C6E00->Cos(angle);
8430 pBillboardRenderListD3D[v8].pQuards[3].pos.x = (((double)(unsigned __int16)v42 * 0.000015259022 8435 pBillboardRenderListD3D[v8].pQuards[3].pos.x = (((double)(unsigned __int16)v42 * 0.000015259022
8431 + (double)(v42 >> 16)) 8436 + (double)(v42 >> 16))
8432 * v40 8437 * v40
8433 - ((double)(unsigned __int16)v43 * 0.000015259022 8438 - ((double)(unsigned __int16)v43 * 0.000015259022
8434 + (double)(v43 >> 16)) 8439 + (double)(v43 >> 16))