Mercurial > mm7
comparison mm7_3.cpp @ 1799:dfafcd39c67b
GetSpellColor, DrawSkyD3D()(continue)
author | Ritor1 |
---|---|
date | Sun, 06 Oct 2013 22:45:00 +0600 |
parents | 0c4d3c6a9d5a |
children | 3a41be960164 |
comparison
equal
deleted
inserted
replaced
1798:4d4df91a2546 | 1799:dfafcd39c67b |
---|---|
749 } | 749 } |
750 | 750 |
751 //----- (0047050A) -------------------------------------------------------- | 751 //----- (0047050A) -------------------------------------------------------- |
752 int stru141_actor_collision_object::_47050A(int dt) | 752 int stru141_actor_collision_object::_47050A(int dt) |
753 { | 753 { |
754 stru141_actor_collision_object *v2; // esi@1 | 754 //stru141_actor_collision_object *v2; // esi@1 |
755 //signed int v3; // eax@1 | 755 //signed int v3; // eax@1 |
756 //int v4; // ecx@1 | 756 //int v4; // ecx@1 |
757 //int v5; // edx@1 | 757 //int v5; // edx@1 |
758 //int v6; // edx@1 | 758 //int v6; // edx@1 |
759 int v7; // eax@1 | 759 int v7; // eax@1 |
760 int v8; // eax@3 | 760 //int v8; // eax@3 |
761 signed int result; // eax@4 | 761 signed int result; // eax@4 |
762 int v10; // eax@5 | 762 //int v10; // eax@5 |
763 int v11; // eax@5 | 763 //int v11; // eax@5 |
764 int v12; // ebx@5 | 764 //int v12; // ebx@5 |
765 int v13; // edx@5 | 765 //int v13; // edx@5 |
766 int v14; // edi@5 | 766 //int v14; // edi@5 |
767 int v15; // ecx@5 | 767 //int v15; // ecx@5 |
768 int v16; // eax@5 | 768 //int v16; // eax@5 |
769 int v17; // eax@5 | 769 int v17; // eax@5 |
770 int v18; // eax@7 | 770 int v18; // eax@7 |
771 int v19; // edx@9 | 771 //int v19; // edx@9 |
772 int v20; // edi@9 | 772 //int v20; // edi@9 |
773 int v21; // eax@9 | 773 int v21; // eax@9 |
774 int v22; // eax@11 | 774 int v22; // eax@11 |
775 int v23; // edx@13 | 775 //int v23; // edx@13 |
776 int v24; // eax@13 | 776 //int v24; // eax@13 |
777 int v25; // eax@14 | 777 //int v25; // eax@14 |
778 int v26; // eax@16 | 778 //int v26; // eax@16 |
779 int v27; // eax@17 | 779 //int v27; // eax@17 |
780 int v28; // [sp+14h] [bp+8h]@5 | 780 //int v28; // [sp+14h] [bp+8h]@5 |
781 | 781 |
782 v2 = this; | 782 //v2 = this; |
783 int speed = 1 | integer_sqrt(this->velocity.z * this->velocity.z + this->velocity.y * this->velocity.y + this->velocity.x * this->velocity.x); | 783 int speed = 1 | integer_sqrt(this->velocity.z * this->velocity.z + this->velocity.y * this->velocity.y + this->velocity.x * this->velocity.x); |
784 | 784 |
785 v2->direction.x = 65536 / speed * v2->velocity.x; | 785 this->direction.x = 65536 / speed * this->velocity.x; |
786 v2->direction.y = 65536 / speed * v2->velocity.y; | 786 this->direction.y = 65536 / speed * this->velocity.y; |
787 v2->direction.z = 65536 / speed * v2->velocity.z; | 787 this->direction.z = 65536 / speed * this->velocity.z; |
788 | 788 |
789 v2->speed = speed; | 789 this->speed = speed; |
790 v2->inv_speed = 65536 / speed; | 790 this->inv_speed = 65536 / speed; |
791 | 791 |
792 if (dt) | 792 if (dt) |
793 v7 = dt; | 793 v7 = dt; |
794 else | 794 else |
795 v7 = pEventTimer->dt_in_some_format; | 795 v7 = pEventTimer->dt_in_some_format; |
796 | 796 |
797 v8 = fixpoint_mul(v7, speed) - v2->field_70; // speed * dt - something | 797 //v8 = fixpoint_mul(v7, speed) - this->field_70; // speed * dt - something |
798 v2->field_6C = v8; | 798 this->field_6C = fixpoint_mul(v7, speed) - this->field_70; |
799 if ( v8 > 0 ) | 799 if ( this->field_6C > 0 ) |
800 { | 800 { |
801 v10 = fixpoint_mul(v8, v2->direction.x) + v2->normal.x; | 801 //v10 = fixpoint_mul(v8, this->direction.x) + this->normal.x; |
802 v2->field_4C = v10; | 802 this->field_4C = fixpoint_mul(this->field_6C, this->direction.x) + this->normal.x; |
803 v2->normal2.x = v10; | 803 this->normal2.x = fixpoint_mul(this->field_6C, this->direction.x) + this->normal.x; |
804 v11 = fixpoint_mul(v2->field_6C, v2->direction.y) + v2->normal.y; | 804 //v11 = fixpoint_mul(this->field_6C, this->direction.y) + this->normal.y; |
805 v2->field_50 = v11; | 805 this->field_50 = fixpoint_mul(this->field_6C, this->direction.y) + this->normal.y; |
806 v2->normal2.y = v11; | 806 this->normal2.y = fixpoint_mul(this->field_6C, this->direction.y) + this->normal.y; |
807 v2->normal2.z = fixpoint_mul(v2->field_6C, v2->direction.z) + v2->normal.z; | 807 this->normal2.z = fixpoint_mul(this->field_6C, this->direction.z) + this->normal.z; |
808 v12 = v2->position.z; | 808 //v12 = this->position.z; |
809 v13 = v2->normal.x; | 809 //v13 = this->normal.x; |
810 v14 = v2->normal2.x; | 810 //v14 = this->normal2.x; |
811 v15 = v2->prolly_normal_d; | 811 //v15 = this->prolly_normal_d; |
812 v16 = v12 + fixpoint_mul(v2->field_6C, v2->direction.z); | 812 //v16 = this->position.z + fixpoint_mul(this->field_6C, this->direction.z); |
813 v28 = v16; | 813 //v28 = this->position.z + fixpoint_mul(this->field_6C, this->direction.z); |
814 v2->field_54 = v16; | 814 this->field_54 = this->position.z + fixpoint_mul(this->field_6C, this->direction.z); |
815 v17 = v13; | 815 v17 = this->normal.x; |
816 if ( v13 >= v14 ) | 816 if ( v17 >= this->normal2.x ) |
817 v17 = v14; | 817 v17 = this->normal2.x; |
818 v2->sMaxX = v17 - v15; | 818 this->sMaxX = v17 - this->prolly_normal_d; |
819 v18 = v15 + v13; | 819 v18 = this->prolly_normal_d + this->normal.x; |
820 if ( v13 <= v14 ) | 820 if ( this->normal.x <= this->normal2.x ) |
821 v18 = v15 + v14; | 821 v18 = this->prolly_normal_d + this->normal2.x; |
822 v19 = v2->normal.y; | 822 //v19 = this->normal.y; |
823 v20 = v2->normal2.y; | 823 //v20 = this->normal2.y; |
824 v2->sMinX = v18; | 824 this->sMinX = v18; |
825 v21 = v19; | 825 v21 = this->normal.y; |
826 if ( v19 >= v20 ) | 826 if ( v21 >= this->normal2.y ) |
827 v21 = v20; | 827 v21 = this->normal2.y; |
828 v2->sMaxY = v21 - v15; | 828 this->sMaxY = v21 - this->prolly_normal_d; |
829 v22 = v15 + v19; | 829 v22 = this->prolly_normal_d + this->normal.y; |
830 if ( v19 <= v20 ) | 830 if ( this->normal.y <= this->normal2.y ) |
831 v22 = v20 + v15; | 831 v22 = this->normal2.y + this->prolly_normal_d; |
832 v23 = v2->normal2.z; | 832 //v23 = this->normal2.z; |
833 v2->sMinY = v22; | 833 this->sMinY = v22; |
834 v24 = v2->normal.z; | 834 //v24 = this->normal.z; |
835 if ( v24 >= v23 ) | 835 if ( this->normal.z >= this->normal2.z ) |
836 v25 = v23 - v15; | 836 this->sMaxZ = this->normal2.z - this->prolly_normal_d; |
837 else | 837 else |
838 v25 = v24 - v15; | 838 this->sMaxZ = this->normal.z - this->prolly_normal_d; |
839 v2->sMaxZ = v25; | 839 //this->sMaxZ = v25; |
840 v26 = v2->field_8_radius; | 840 //v26 = this->field_8_radius; |
841 if ( v12 <= v28 ) | 841 if ( this->position.z <= this->position.z + fixpoint_mul(this->field_6C, this->direction.z) ) |
842 v27 = v28 + v26; | 842 this->sMinZ = (this->position.z + fixpoint_mul(this->field_6C, this->direction.z)) + this->field_8_radius; |
843 else | 843 else |
844 v27 = v12 + v26; | 844 this->sMinZ = this->position.z + this->field_8_radius; |
845 v2->uFaceID = 0; | 845 this->uFaceID = 0; |
846 v2->field_80 = -1; | 846 this->field_80 = -1; |
847 v2->field_88 = -1; | 847 this->field_88 = -1; |
848 v2->sMinZ = v27; | 848 //this->sMinZ = v27; |
849 v2->field_7C = 0xFFFFFFu; | 849 this->field_7C = 0xFFFFFFu; |
850 result = 0; | 850 result = 0; |
851 } | 851 } |
852 else | 852 else |
853 { | 853 { |
854 result = 1; | 854 result = 1; |
5046 v39 = pSkyPolygon.v_18.x + v16; | 5046 v39 = pSkyPolygon.v_18.x + v16; |
5047 pViewportBR_Y = pSkyPolygon.v_18.x + v16; | 5047 pViewportBR_Y = pSkyPolygon.v_18.x + v16; |
5048 break; | 5048 break; |
5049 } | 5049 } |
5050 | 5050 |
5051 pShading = fixpoint_div(v34, pViewportBR_Y); | 5051 pShading = fixpoint_div(v34, pViewportBR_Y);//53570690 = -33554432 / -41049 |
5052 if ( pShading < 0 ) | 5052 if ( pShading < 0 ) |
5053 pShading = pODMRenderParams->shading_dist_mist; | 5053 pShading = pODMRenderParams->shading_dist_mist; |
5054 | 5054 int a = ((unsigned __int64)(pSkyPolygon.ptr_38->field_10 * v13) >> 16);//16316 |
5055 v37 += ((unsigned __int64)(pSkyPolygon.ptr_38->field_10 * v13) >> 16); | 5055 v37 += ((unsigned __int64)(pSkyPolygon.ptr_38->field_10 * v13) >> 16); |
5056 int b = ((unsigned __int64)(pSkyPolygon.ptr_38->field_1C * v13) >> 16); | |
5056 screen_center_x += ((unsigned __int64)(pSkyPolygon.ptr_38->field_1C * v13) >> 16); | 5057 screen_center_x += ((unsigned __int64)(pSkyPolygon.ptr_38->field_1C * v13) >> 16); |
5057 v35 = 224 * pMiscTimer->uTotalGameTimeElapsed + fixpoint_mul(v37, pShading) / 8;// Медленно вращаем небесный купол | 5058 v35 = 224 * pMiscTimer->uTotalGameTimeElapsed + fixpoint_mul(v37, pShading) / 8;// Медленно вращаем небесный купол |
5058 screen_center_x = 224 * pMiscTimer->uTotalGameTimeElapsed + fixpoint_mul(screen_center_x, pShading) / 8; | 5059 screen_center_x = 224 * pMiscTimer->uTotalGameTimeElapsed + fixpoint_mul(screen_center_x, pShading) / 8; |
5059 | 5060 |
5060 //array_50AC10[vertex_id].vWorldViewPosition.x = pODMRenderParams->shading_dist_mist; | 5061 array_50AC10[vertex_id].vWorldViewPosition.x = pODMRenderParams->shading_dist_mist; |
5061 //array_50AC10[vertex_id].vWorldPosition.x = v36 / (pSky.pTexture->uTextureHeight * 65536.0); | 5062 //array_50AC10[vertex_id].vWorldPosition.x = v36 / (pSkyPolygon.pTexture->uTextureHeight * 65536.0); |
5062 //array_50AC10[vertex_id].vWorldPosition.y = 1.0 / (pODMRenderParams->shading_dist_mist >> 16); | 5063 //array_50AC10[vertex_id].vWorldPosition.y = 1.0 / (pODMRenderParams->shading_dist_mist >> 16); |
5063 //array_50AC10[vertex_id].vWorldPosition.z = v35 / (pSky.pTexture->uTextureWidth * 65536.0); | 5064 //array_50AC10[vertex_id].vWorldPosition.z = v35 / (pSkyPolygon.pTexture->uTextureWidth * 65536.0); |
5064 //array_50AC10[vertex_id]._rhw = 1.0f / (pShading >> 16); | 5065 array_50AC10[vertex_id]._rhw = 1.0f / (pShading >> 16);//1.0 / (array_50AC10[vertex_id].vWorldViewPosition.x + 0.0000001); |
5065 //array_50AC10[vertex_id].u = (double)v35 / (65536.0 * pSkyPolygon.pTexture->uTextureWidth); | 5066 array_50AC10[vertex_id].u = (double)v35 / (65536.0 * pSkyPolygon.pTexture->uTextureWidth);//t - pParty->sRotationY / 1024.0f |
5066 //array_50AC10[vertex_id].v = (double)screen_center_x / (65536.0 * pSkyPolygon.pTexture->uTextureHeight); | 5067 array_50AC10[vertex_id].v = (double)screen_center_x / (65536.0 * pSkyPolygon.pTexture->uTextureHeight); |
5067 //----------------------------------------------------------------------------------------- | 5068 //----------------------------------------------------------------------------------------- |
5068 | 5069 |
5069 array_50AC10[vertex_id]._rhw = 1.0f; | 5070 //array_50AC10[vertex_id]._rhw = 1.0f; |
5070 } | 5071 } |
5071 //if ( i == _this.uNumVertices - 1 ) | 5072 //if ( i == _this.uNumVertices - 1 ) |
5072 //{ | 5073 //{ |
5073 pRenderer->DrawSkyPolygon(pSkyPolygon.uNumVertices, &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[pSkyPolygon.uTileBitmapID]); | 5074 pRenderer->DrawSkyPolygon(pSkyPolygon.uNumVertices, &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[pSkyPolygon.uTileBitmapID]); |
5074 | 5075 |
5078 array_50AC10[3].vWorldViewProjY = pViewportBR_Y; | 5079 array_50AC10[3].vWorldViewProjY = pViewportBR_Y; |
5079 | 5080 |
5080 pRenderer->DrawSkyPolygon(pSkyPolygon.uNumVertices, &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[pSkyPolygon.uTileBitmapID]); | 5081 pRenderer->DrawSkyPolygon(pSkyPolygon.uNumVertices, &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[pSkyPolygon.uTileBitmapID]); |
5081 //} | 5082 //} |
5082 } | 5083 } |
5084 /*void Render::DrawSkyD3D() | |
5085 { | |
5086 int v0; // esi@2 | |
5087 int v1; // eax@2 | |
5088 double v2; // st7@2 | |
5089 double v3; // st6@2 | |
5090 double v4; // st5@2 | |
5091 double v5; // st4@2 | |
5092 double v6; // st7@2 | |
5093 char *v7; // esi@3 | |
5094 int v8; // eax@4 | |
5095 int v9; // eax@4 | |
5096 int v10; // ebx@4 | |
5097 signed __int64 v11; // qax@6 | |
5098 double v12; // st7@6 | |
5099 int v13; // edi@6 | |
5100 int v14; // ecx@6 | |
5101 int v15; // eax@8 | |
5102 int v16; // eax@12 | |
5103 signed __int64 v17; // qtt@13 | |
5104 signed int v18; // ecx@13 | |
5105 Texture *v19; // eax@15 | |
5106 double v20; // st6@15 | |
5107 double v21; // st7@15 | |
5108 double v22; // st6@15 | |
5109 unsigned __int8 v23; // sf@15 | |
5110 unsigned __int8 v24; // of@15 | |
5111 struct Polygon pSkyPolygon; // [sp+14h] [bp-150h]@1 | |
5112 double v26; // [sp+120h] [bp-44h]@4 | |
5113 float v27; // [sp+128h] [bp-3Ch]@4 | |
5114 float v28; // [sp+12Ch] [bp-38h]@2 | |
5115 int v29; // [sp+130h] [bp-34h]@4 | |
5116 int v30; // [sp+134h] [bp-30h]@1 | |
5117 int v31; // [sp+138h] [bp-2Ch]@2 | |
5118 int v32; // [sp+13Ch] [bp-28h]@6 | |
5119 int v33; // [sp+140h] [bp-24h]@2 | |
5120 signed __int64 v34; // [sp+144h] [bp-20h]@1 | |
5121 int v35; // [sp+148h] [bp-1Ch]@4 | |
5122 double v36; // [sp+14Ch] [bp-18h]@2 | |
5123 int v37; // [sp+154h] [bp-10h]@8 | |
5124 int v38; // [sp+158h] [bp-Ch]@1 | |
5125 int v39; // [sp+15Ch] [bp-8h]@4 | |
5126 int v40; // [sp+160h] [bp-4h]@7 | |
5127 | |
5128 v30 = (signed __int64)((double)(pODMRenderParams->int_fov_rad * pGame->pIndoorCameraD3D->vPartyPos.z) | |
5129 / ((double)pODMRenderParams->int_fov_rad + 8192.0) | |
5130 + (double)(pViewport->uScreenCenterY + 7));//include "+ 7" | |
5131 //v34 = cos((double)pGame->pIndoorCameraD3D->sRotationX * 0.0030664064) * (double)pODMRenderParams->shading_dist_mist; | |
5132 /*v38 = (signed __int64)((double)(pViewport->uScreenCenterY + 7) | |
5133 - (double)pODMRenderParams->int_fov_rad | |
5134 / (v34 + 0.0000001) | |
5135 * (sin((double)pGame->pIndoorCameraD3D->sRotationX * 0.0030664064) | |
5136 * (double)-pODMRenderParams->shading_dist_mist | |
5137 - (double)pGame->pIndoorCameraD3D->vPartyPos.z));*/ | |
5138 /*v34 = cos((double)pGame->pIndoorCameraD3D->sRotationX * 0.0030664064) * 0x2000; | |
5139 v38 = (signed __int64)((double)(pViewport->uScreenCenterY + 7) | |
5140 - (double)pODMRenderParams->int_fov_rad | |
5141 / (v34 + 0.0000001) | |
5142 * (sin((double)pGame->pIndoorCameraD3D->sRotationX * 0.0030664064) | |
5143 * (double)-0x2000 | |
5144 - (double)pGame->pIndoorCameraD3D->vPartyPos.z)); | |
5145 pSkyPolygon.Create_48607B(&stru_8019C8);//заполняется ptr_38 | |
5146 pSkyPolygon.ptr_38->_48694B_frustum_sky(); | |
5147 pSkyPolygon.uTileBitmapID = pOutdoor->uSky_TextureID;//179(original 166) | |
5148 pSkyPolygon.pTexture = (Texture *)(SLOWORD(pOutdoor->uSky_TextureID) != -1 ? (int)&pBitmaps_LOD->pTextures[SLOWORD(pOutdoor->uSky_TextureID)] : 0); | |
5149 if ( pSkyPolygon.pTexture ) | |
5150 { | |
5151 v0 = pGame->pIndoorCameraD3D->sRotationX; | |
5152 pSkyPolygon.dimming_level = 0; | |
5153 pSkyPolygon.uNumVertices = 4; | |
5154 pSkyPolygon.v_18.x = -stru_5C6E00->Sin(pGame->pIndoorCameraD3D->sRotationX + 16); | |
5155 pSkyPolygon.v_18.y = 0; | |
5156 v1 = stru_5C6E00->Cos(v0 + 16); | |
5157 v2 = (double)(signed int)pViewport->uViewportTL_X; | |
5158 pSkyPolygon.v_18.z = -v1; | |
5159 array_50AC10[0].vWorldViewProjX = v2; | |
5160 v3 = (double)(signed int)pViewport->uViewportTL_Y; | |
5161 array_50AC10[0].vWorldViewProjY = v3; | |
5162 array_50AC10[1].vWorldViewProjX = v2; | |
5163 v4 = (double)v38; | |
5164 pSkyPolygon.sTextureDeltaU = 224 * pMiscTimer->uTotalGameTimeElapsed; | |
5165 pSkyPolygon.sTextureDeltaV = 224 * pMiscTimer->uTotalGameTimeElapsed; | |
5166 v28 = v4; | |
5167 array_50AC10[1].vWorldViewProjY = v4; | |
5168 v5 = (double)(signed int)pViewport->uViewportBR_X; | |
5169 array_50AC10[2].vWorldViewProjX = v5; | |
5170 v38 = pViewport->uViewportBR_X - pViewport->uViewportTL_X; | |
5171 pSkyPolygon.field_24 = 0x2000000u; | |
5172 array_50AC10[2].vWorldViewProjY = v4; | |
5173 array_50AC10[3].vWorldViewProjX = v5; | |
5174 array_50AC10[3].vWorldViewProjY = v3; | |
5175 v36 = (double)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) * 0.5; | |
5176 v6 = tan(0.6457717418670654); | |
5177 v31 = 0; | |
5178 v33 = 65536 / (signed int)(signed __int64)(v36 / v6 + 0.5); | |
5179 if ( (signed int)pSkyPolygon.uNumVertices <= 0 ) | |
5180 goto LABEL_16; | |
5181 v7 = (char *)&array_50AC10[0].vWorldViewProjY; | |
5182 while ( 1 ) | |
5183 { | |
5184 LODWORD(v27) = *(_DWORD *)v7; | |
5185 v26 = v27 + 6.7553994e15; | |
5186 v29 = v27; | |
5187 v38 = pSkyPolygon.ptr_38->field_14; | |
5188 v39 = (unsigned __int64)(v38 * (signed __int64)(v33 * (v30 - v27))) >> 16; | |
5189 v8 = v39 + pSkyPolygon.ptr_38->field_C; | |
5190 v39 = v33 * (v30 - v27); | |
5191 v35 = v8; | |
5192 v38 = pSkyPolygon.ptr_38->field_20; | |
5193 v39 = (unsigned __int64)(v38 * (signed __int64)(v33 * (v30 - v27))) >> 16; | |
5194 v36 = v39 + pSkyPolygon.ptr_38->field_18; | |
5195 v38 = pSkyPolygon.v_18.z; | |
5196 v9 = (unsigned __int64)(pSkyPolygon.v_18.z * (signed __int64)(v33 * (v30 - v27))) >> 16; | |
5197 v10 = pSkyPolygon.v_18.x + v9; | |
5198 v39 = pSkyPolygon.v_18.x + v9; | |
5199 if ( pSkyPolygon.v_18.x + v9 > 0 ) | |
5200 { | |
5201 v10 = 0; | |
5202 v39 = 0; | |
5203 } | |
5204 v11 = (signed __int64)*((float *)v7 - 1); | |
5205 v38 = v10; | |
5206 v12 = *(float *)v7 - 1.0; | |
5207 v13 = v33 * (pViewport->uScreenCenterX - v11); | |
5208 v34 = -pSkyPolygon.field_24; | |
5209 v32 = (signed __int64)v12; | |
5210 v14 = v33 * (v30 - v32); | |
5211 while ( 1 ) | |
5212 { | |
5213 v40 = v14; | |
5214 if ( !v10 ) | |
5215 goto LABEL_12; | |
5216 v37 = abs((int)v34 >> 14); | |
5217 v15 = abs(v10); | |
5218 if ( v37 <= v15 || v32 <= (signed int)pViewport->uViewportTL_Y ) | |
5219 { | |
5220 if ( v39 <= 0 ) | |
5221 break; | |
5222 } | |
5223 v14 = v40; | |
5224 LABEL_12: | |
5225 v37 = pSkyPolygon.v_18.z; | |
5226 v16 = (unsigned __int64)(pSkyPolygon.v_18.z * (signed __int64)v14) >> 16; | |
5227 --v32; | |
5228 v14 += v33; | |
5229 v10 = pSkyPolygon.v_18.x + v16; | |
5230 v39 = pSkyPolygon.v_18.x + v16; | |
5231 v38 = pSkyPolygon.v_18.x + v16; | |
5232 } | |
5233 LODWORD(v17) = LODWORD(v34) << 16; | |
5234 //HIDWORD(v17) = LODWORD(v34) >> 16; | |
5235 HIDWORD(v17) = v34 >> 16; | |
5236 //v17 = (int)v34 >> 16; | |
5237 //v17 = v17 << 16; | |
5238 v40 = v17 / v38;//v38 = -42331 | |
5239 v18 = v17 / v38; | |
5240 if ( v18 < 0 ) | |
5241 v18 = pODMRenderParams->shading_dist_mist; | |
5242 v40 = v13; | |
5243 v37 = pSkyPolygon.ptr_38->field_10; | |
5244 v40 = v13; | |
5245 v37 = v35 + ((unsigned __int64)(v37 * (signed __int64)v13) >> 16); | |
5246 v35 = pSkyPolygon.ptr_38->field_1C; | |
5247 v36 += (unsigned __int64)(v35 * (signed __int64)v13) >> 16; | |
5248 v35 = 224 * pMiscTimer->uTotalGameTimeElapsed | |
5249 + ((signed int)((unsigned __int64)(v37 * (signed __int64)v18) >> 16) >> 3); | |
5250 v40 = (unsigned __int64)(v36 * (signed __int64)v18) >> 16; | |
5251 v19 = pSkyPolygon.pTexture; | |
5252 v36 = pSkyPolygon.pTexture->uTextureWidth; | |
5253 v7 += 48; | |
5254 v20 = (double)v36 * 65536.0; | |
5255 HIDWORD(v36) = 224 * pMiscTimer->uTotalGameTimeElapsed + (v40 >> 3); | |
5256 ++v31; | |
5257 array_50AC10[v31 - 1].u = (double)v35 / v20; | |
5258 v21 = (double)SHIDWORD(v36); | |
5259 HIDWORD(v36) = v19->uTextureHeight; | |
5260 v22 = (double)SHIDWORD(v36); | |
5261 HIDWORD(v36) = v18 >> 16; | |
5262 //v24 = __OFSUB__(v31, pSkyPolygon.uNumVertices); | |
5263 //v23 = ((v31 - pSkyPolygon.uNumVertices) & 0x80000000u) != 0; | |
5264 array_50AC10[v31 - 1].v = v21 / (v22 * 65536.0); | |
5265 //array_50AC10[v31 - 1].vWorldViewPosition.x = (double)pODMRenderParams->shading_dist_mist; | |
5266 array_50AC10[v31 - 1].vWorldViewPosition.x = (double)0x2000; | |
5267 array_50AC10[v31 - 1]._rhw = 1.0 / (double)SHIDWORD(v36); | |
5268 //if ( !(v23 ^ v24) ) | |
5269 if ( v31 == pSkyPolygon.uNumVertices ) | |
5270 { | |
5271 LABEL_16: | |
5272 pRenderer->DrawSkyPolygon(pSkyPolygon.uNumVertices, | |
5273 &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPolygon.uTileBitmapID]); | |
5274 array_50AC10[0].vWorldViewProjY = v28; | |
5275 array_50AC10[1].vWorldViewProjY = array_50AC10[1].vWorldViewProjY + 30.0; | |
5276 array_50AC10[2].vWorldViewProjY = array_50AC10[2].vWorldViewProjY + 30.0; | |
5277 array_50AC10[3].vWorldViewProjY = v28; | |
5278 pRenderer->DrawSkyPolygon(pSkyPolygon.uNumVertices, &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPolygon.uTileBitmapID]); | |
5279 return; | |
5280 } | |
5281 } | |
5282 } | |
5283 }*/ | |
5083 | 5284 |
5084 //----- (0047A384) -------------------------------------------------------- | 5285 //----- (0047A384) -------------------------------------------------------- |
5085 void ODM_LoadAndInitialize(const char *pLevelFilename, ODMRenderParams *thisa) | 5286 void ODM_LoadAndInitialize(const char *pLevelFilename, ODMRenderParams *thisa) |
5086 { | 5287 { |
5087 int v2; // ebx@3 | 5288 int v2; // ebx@3 |