Mercurial > mm7
comparison Engine/Graphics/Render.cpp @ 2535:3a36de426f5f
For draw uPlayerCreationUI_ArrowAnim
author | Ritor1 |
---|---|
date | Sun, 15 Feb 2015 23:39:07 +0600 |
parents | 1bcadc6dd203 |
children | 400edd7b0407 |
comparison
equal
deleted
inserted
replaced
2534:1bcadc6dd203 | 2535:3a36de426f5f |
---|---|
8680 array_50AC10[3].vWorldViewProjY = (double)(signed int)pViewport->uViewportTL_Y;//8 | 8680 array_50AC10[3].vWorldViewProjY = (double)(signed int)pViewport->uViewportTL_Y;//8 |
8681 | 8681 |
8682 pSkyPolygon.sTextureDeltaU = 224 * pMiscTimer->uTotalGameTimeElapsed;//7168 | 8682 pSkyPolygon.sTextureDeltaU = 224 * pMiscTimer->uTotalGameTimeElapsed;//7168 |
8683 pSkyPolygon.sTextureDeltaV = 224 * pMiscTimer->uTotalGameTimeElapsed;//7168 | 8683 pSkyPolygon.sTextureDeltaV = 224 * pMiscTimer->uTotalGameTimeElapsed;//7168 |
8684 | 8684 |
8685 pSkyPolygon.field_24 = 0x2000000u;//maybe attributes | 8685 pSkyPolygon.field_24 = 0x2000000;//maybe attributes |
8686 v33 = 65536 / (signed int)(signed __int64)(((double)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) / 2) / tan(0.6457717418670654) + 0.5); | 8686 v33 = 65536 / (signed int)(signed __int64)(((double)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) / 2) / tan(0.6457717418670654) + 0.5); |
8687 for ( uint i = 0; i < pSkyPolygon.uNumVertices; ++i ) | 8687 for ( uint i = 0; i < pSkyPolygon.uNumVertices; ++i ) |
8688 { | 8688 { |
8689 //rotate skydome(вращение купола неба)-------------------------------------- | 8689 //rotate skydome(вращение купола неба)-------------------------------------- |
8690 // В игре принята своя система измерения углов. Полный угол (180). Значению угла 0 соответствует | 8690 // В игре принята своя система измерения углов. Полный угол (180). Значению угла 0 соответствует |
8857 if ( PID_TYPE(v5) == OBJECT_Actor) | 8857 if ( PID_TYPE(v5) == OBJECT_Actor) |
8858 { | 8858 { |
8859 if ( pBillboardRenderList[v3].sZValue <= (unsigned int)(pDepth << 16) ) | 8859 if ( pBillboardRenderList[v3].sZValue <= (unsigned int)(pDepth << 16) ) |
8860 { | 8860 { |
8861 v6 = PID_ID(v5); | 8861 v6 = PID_ID(v5); |
8862 if ( pActors[v6].uAIState != Dead && pActors[v6].uAIState != Dying && pActors[v6].uAIState != Removed | 8862 if ( pActors[v6].uAIState != Dead |
8863 && pActors[v6].uAIState != Disabled && pActors[v6].uAIState != Summoned ) | 8863 && pActors[v6].uAIState != Dying |
8864 && pActors[v6].uAIState != Removed | |
8865 && pActors[v6].uAIState != Disabled | |
8866 && pActors[v6].uAIState != Summoned ) | |
8864 { | 8867 { |
8865 if ( pGame->pVisInstance->DoesRayIntersectBillboard((double)pDepth, a1a) ) | 8868 if ( pGame->pVisInstance->DoesRayIntersectBillboard((double)pDepth, a1a) ) |
8866 { | 8869 { |
8867 if ( mon_num < 100 ) | 8870 if ( mon_num < 100 ) |
8868 { | 8871 { |
8943 | 8946 |
8944 //----- (00437C96) -------------------------------------------------------- | 8947 //----- (00437C96) -------------------------------------------------------- |
8945 void Render::do_draw_debug_line_d3d(const RenderVertexD3D3 *pLineBegin, signed int sDiffuseBegin, const RenderVertexD3D3 *pLineEnd, signed int sDiffuseEnd, float z_stuff) | 8948 void Render::do_draw_debug_line_d3d(const RenderVertexD3D3 *pLineBegin, signed int sDiffuseBegin, const RenderVertexD3D3 *pLineEnd, signed int sDiffuseEnd, float z_stuff) |
8946 { | 8949 { |
8947 double v6; // st7@2 | 8950 double v6; // st7@2 |
8948 //IDirect3DDevice3 *v7; // eax@2 | |
8949 // HRESULT v8; // eax@2 | |
8950 std::string v9; // [sp-18h] [bp-60h]@3 | 8951 std::string v9; // [sp-18h] [bp-60h]@3 |
8951 // const char *v10; // [sp-Ch] [bp-54h]@2 | |
8952 // const char *v11; // [sp-8h] [bp-50h]@2 | |
8953 // int v12; // [sp-4h] [bp-4Ch]@2 | |
8954 RenderVertexD3D3 v13[2]; // [sp+8h] [bp-40h]@2 | 8952 RenderVertexD3D3 v13[2]; // [sp+8h] [bp-40h]@2 |
8955 | 8953 |
8956 //if ( pRenderer->pRenderD3D ) | 8954 //if ( pRenderer->pRenderD3D ) |
8957 { | 8955 { |
8958 v6 = 0.001 - z_stuff; | 8956 v6 = 0.001 - z_stuff; |
8961 v13[0].pos.z = v6; | 8959 v13[0].pos.z = v6; |
8962 v13[1].pos.z = v6; | 8960 v13[1].pos.z = v6; |
8963 v13[0].diffuse = sDiffuseBegin; | 8961 v13[0].diffuse = sDiffuseBegin; |
8964 v13[1].diffuse = sDiffuseEnd; | 8962 v13[1].diffuse = sDiffuseEnd; |
8965 ErrD3D(pRenderD3D->pDevice->SetTexture(0, nullptr)); | 8963 ErrD3D(pRenderD3D->pDevice->SetTexture(0, nullptr)); |
8966 ErrD3D(pRenderD3D->pDevice->DrawPrimitive(D3DPT_LINELIST, | 8964 ErrD3D(pRenderD3D->pDevice->DrawPrimitive(D3DPT_LINELIST, 452, v13, 2, 16)); |
8967 452, | |
8968 v13, | |
8969 2, | |
8970 16)); | |
8971 } | 8965 } |
8972 } | 8966 } |
8973 | 8967 |
8974 | 8968 |
8975 void Render::DrawLines(const RenderVertexD3D3 *vertices, unsigned int num_vertices) | 8969 void Render::DrawLines(const RenderVertexD3D3 *vertices, unsigned int num_vertices) |
9162 } | 9156 } |
9163 | 9157 |
9164 //----- (0047C4FC) -------------------------------------------------------- | 9158 //----- (0047C4FC) -------------------------------------------------------- |
9165 int __fastcall GetActorTintColor(int max_dimm, int min_dimm, float distance, int a4, RenderBillboard *a5) | 9159 int __fastcall GetActorTintColor(int max_dimm, int min_dimm, float distance, int a4, RenderBillboard *a5) |
9166 { | 9160 { |
9167 //int v5; // esi@1 | |
9168 signed int v6; // edx@1 | 9161 signed int v6; // edx@1 |
9169 //signed int result; // eax@2 | |
9170 int v8; // eax@3 | 9162 int v8; // eax@3 |
9171 double v9; // st7@12 | 9163 double v9; // st7@12 |
9172 //double v10; // ST0C_8@18 | |
9173 int v11; // ecx@28 | 9164 int v11; // ecx@28 |
9174 //signed int v12; // edi@28 | |
9175 //double v13; // ST0C_8@33 | |
9176 //double v14; // ST0C_8@34 | |
9177 double v15; // st7@44 | 9165 double v15; // st7@44 |
9178 //double v16; // ST0C_8@44 | |
9179 //double v17; // ST0C_8@44 | |
9180 int v18; // ST14_4@44 | 9166 int v18; // ST14_4@44 |
9181 //double v19; // ST0C_8@44 | |
9182 signed int v20; // [sp+10h] [bp-4h]@10 | 9167 signed int v20; // [sp+10h] [bp-4h]@10 |
9183 // float a3a; // [sp+1Ch] [bp+8h]@33 | |
9184 //float a3b; // [sp+1Ch] [bp+8h]@34 | |
9185 float a3c; // [sp+1Ch] [bp+8h]@44 | 9168 float a3c; // [sp+1Ch] [bp+8h]@44 |
9186 //float a3d; // [sp+1Ch] [bp+8h]@44 | |
9187 //float a4b; // [sp+20h] [bp+Ch]@18 | |
9188 //int a4a; // [sp+20h] [bp+Ch]@33 | |
9189 //float a4c; // [sp+20h] [bp+Ch]@44 | |
9190 //float a4d; // [sp+20h] [bp+Ch]@44 | |
9191 int a5a; // [sp+24h] [bp+10h]@44 | 9169 int a5a; // [sp+24h] [bp+10h]@44 |
9192 | 9170 |
9193 //v5 = a2; | 9171 //v5 = a2; |
9194 v6 = 0; | 9172 v6 = 0; |
9195 | 9173 |
9325 } | 9303 } |
9326 | 9304 |
9327 //----- (0043F5C8) -------------------------------------------------------- | 9305 //----- (0043F5C8) -------------------------------------------------------- |
9328 int __fastcall _43F5C8_get_point_light_level_with_respect_to_lights(unsigned int uBaseLightLevel, int uSectorID, float x, float y, float z) | 9306 int __fastcall _43F5C8_get_point_light_level_with_respect_to_lights(unsigned int uBaseLightLevel, int uSectorID, float x, float y, float z) |
9329 { | 9307 { |
9330 // int v5; // esi@1 | |
9331 signed int v6; // edi@1 | 9308 signed int v6; // edi@1 |
9332 int v8; // eax@6 | 9309 int v8; // eax@6 |
9333 int v9; // ebx@6 | 9310 int v9; // ebx@6 |
9334 unsigned int v10; // ecx@6 | 9311 unsigned int v10; // ecx@6 |
9335 unsigned int v11; // edx@9 | 9312 unsigned int v11; // edx@9 |
9336 unsigned int v12; // edx@11 | 9313 unsigned int v12; // edx@11 |
9337 signed int v13; // ecx@12 | 9314 signed int v13; // ecx@12 |
9338 BLVLightMM7 *v16; // esi@20 | 9315 BLVLightMM7 *v16; // esi@20 |
9339 int v17; // ebx@21 | 9316 int v17; // ebx@21 |
9340 // int v18; // eax@24 | |
9341 // int v19; // ebx@24 | |
9342 // unsigned int v20; // ecx@24 | |
9343 // int v21; // edx@25 | |
9344 // unsigned int v22; // edx@27 | |
9345 // unsigned int v23; // edx@29 | |
9346 signed int v24; // ecx@30 | 9317 signed int v24; // ecx@30 |
9347 int v26; // ebx@35 | 9318 int v26; // ebx@35 |
9348 // int v27; // eax@38 | |
9349 // int v28; // ebx@38 | |
9350 // unsigned int v29; // ecx@38 | |
9351 // int v30; // edx@39 | |
9352 // unsigned int v31; // edx@41 | |
9353 // unsigned int v32; // edx@43 | |
9354 //signed int v33; // ecx@44 | |
9355 int v37; // [sp+Ch] [bp-18h]@37 | 9319 int v37; // [sp+Ch] [bp-18h]@37 |
9356 // int v38; // [sp+10h] [bp-14h]@5 | |
9357 int v39; // [sp+10h] [bp-14h]@23 | 9320 int v39; // [sp+10h] [bp-14h]@23 |
9358 int v40; // [sp+10h] [bp-14h]@36 | 9321 int v40; // [sp+10h] [bp-14h]@36 |
9359 int v42; // [sp+14h] [bp-10h]@22 | 9322 int v42; // [sp+14h] [bp-10h]@22 |
9360 unsigned int v43; // [sp+18h] [bp-Ch]@12 | 9323 unsigned int v43; // [sp+18h] [bp-Ch]@12 |
9361 unsigned int v44; // [sp+18h] [bp-Ch]@30 | 9324 unsigned int v44; // [sp+18h] [bp-Ch]@30 |
9980 signed int result; // eax@21 | 9943 signed int result; // eax@21 |
9981 unsigned int v10; // [sp+8h] [bp-Ch]@1 | 9944 unsigned int v10; // [sp+8h] [bp-Ch]@1 |
9982 int a3; // [sp+Ch] [bp-8h]@13 | 9945 int a3; // [sp+Ch] [bp-8h]@13 |
9983 int v12; // [sp+10h] [bp-4h]@15 | 9946 int v12; // [sp+10h] [bp-4h]@15 |
9984 | 9947 |
9985 v1 = 0xFFFFFFu; | 9948 v1 = 0xFFFFFF; |
9986 v10 = 0xFFFFFFu; | 9949 v10 = 0xFFFFFF; |
9987 for (uint i = 0; i < pIndoor->pSectors[stru_721530.uSectorID].uNumPortals; ++i) | 9950 for (uint i = 0; i < pIndoor->pSectors[stru_721530.uSectorID].uNumPortals; ++i) |
9988 { | 9951 { |
9989 if (pIndoor->pSectors[stru_721530.uSectorID].pPortals[i] != stru_721530.field_80) | 9952 if (pIndoor->pSectors[stru_721530.uSectorID].pPortals[i] != stru_721530.field_80) |
9990 { | 9953 { |
9991 face = &pIndoor->pFaces[pIndoor->pSectors[stru_721530.uSectorID].pPortals[i]]; | 9954 face = &pIndoor->pFaces[pIndoor->pSectors[stru_721530.uSectorID].pPortals[i]]; |
10016 stru_721530.field_80 = v12; | 9979 stru_721530.field_80 = v12; |
10017 if (pIndoor->pFaces[v12].uSectorID == stru_721530.uSectorID) | 9980 if (pIndoor->pFaces[v12].uSectorID == stru_721530.uSectorID) |
10018 stru_721530.uSectorID = pIndoor->pFaces[v12].uBackSectorID; | 9981 stru_721530.uSectorID = pIndoor->pFaces[v12].uBackSectorID; |
10019 else | 9982 else |
10020 stru_721530.uSectorID = pIndoor->pFaces[v12].uSectorID; | 9983 stru_721530.uSectorID = pIndoor->pFaces[v12].uSectorID; |
10021 stru_721530.field_7C = 268435455; | 9984 stru_721530.field_7C = 268435455;//0xFFFFFFF |
10022 result = 0; | 9985 result = 0; |
10023 } | 9986 } |
10024 else | 9987 else |
10025 result = 1; | 9988 result = 1; |
10026 return result; | 9989 return result; |