Mercurial > mm7
comparison mm7_3.cpp @ 1399:91ff22cc755b
Слияние
author | Ritor1 |
---|---|
date | Thu, 18 Jul 2013 09:40:14 +0600 |
parents | 8557d021a31b 613c77e51e38 |
children | 3161094869e0 |
comparison
equal
deleted
inserted
replaced
1398:8557d021a31b | 1399:91ff22cc755b |
---|---|
3828 pActions[i] = pActions[i + 1]; | 3828 pActions[i] = pActions[i + 1]; |
3829 --uNumActions; | 3829 --uNumActions; |
3830 | 3830 |
3831 return result; | 3831 return result; |
3832 } | 3832 } |
3833 // 47730C: using guessed type int __stdcall const_1(int); | |
3834 | 3833 |
3835 //----- (004775ED) -------------------------------------------------------- | 3834 //----- (004775ED) -------------------------------------------------------- |
3836 int stru6_stru1_indoor_sw_billboard::_4775ED(float a2) | 3835 int stru6_stru1_indoor_sw_billboard::_4775ED(float a2) |
3837 { | 3836 { |
3838 char *v2; // edi@1 | 3837 char *v2; // edi@1 |
3873 int v37; // [sp+C8h] [bp-10h]@6 | 3872 int v37; // [sp+C8h] [bp-10h]@6 |
3874 int v38; // [sp+CCh] [bp-Ch]@1 | 3873 int v38; // [sp+CCh] [bp-Ch]@1 |
3875 float v39; // [sp+D0h] [bp-8h]@6 | 3874 float v39; // [sp+D0h] [bp-8h]@6 |
3876 int *v40; // [sp+D4h] [bp-4h]@2 | 3875 int *v40; // [sp+D4h] [bp-4h]@2 |
3877 | 3876 |
3878 v2 = (char *)&this->field_14[4 * this->field_10 + 20]; | 3877 v2 = (char *)&this->field_64[4 * this->uNumVertices]; |
3879 v38 = 0; | 3878 v38 = 0; |
3880 *(int *)v2 = this->field_14[20]; | 3879 *(int *)v2 = this->field_64[0]; |
3881 v2 += 4; | 3880 v2 += 4; |
3882 *(int *)v2 = this->field_14[21]; | 3881 *(int *)v2 = this->field_64[1]; |
3883 v2 += 4; | 3882 v2 += 4; |
3884 *(int *)v2 = this->field_14[22]; | 3883 *(int *)v2 = this->field_64[2]; |
3885 *((int *)v2 + 1) = this->field_14[23]; | 3884 *((int *)v2 + 1) = this->field_64[3]; |
3886 v3 = this->field_10; | 3885 v3 = this->uNumVertices; |
3887 v35 = this; | 3886 v35 = this; |
3888 if ( v3 > 0 ) | 3887 if ( v3 > 0 ) |
3889 { | 3888 { |
3890 v40 = &this->field_14[40]; | 3889 v40 = &this->field_64[20]; |
3891 v4 = (char *)&this->field_14[23] + 3; | 3890 v4 = (char *)&this->field_64[3] + 3; |
3892 v34 = v3; | 3891 v34 = v3; |
3893 while ( 1 ) | 3892 while ( 1 ) |
3894 { | 3893 { |
3895 v5 = v4 - 15; | 3894 v5 = v4 - 15; |
3896 if ( *(float *)(v4 - 15) <= (double)a2 && *(float *)(v4 + 1) <= (double)a2 ) | 3895 if ( *(float *)(v4 - 15) <= (double)a2 && *(float *)(v4 + 1) <= (double)a2 ) |
3972 //this = v35; | 3971 //this = v35; |
3973 v5 = (char *)&v30 + 4; | 3972 v5 = (char *)&v30 + 4; |
3974 goto LABEL_10; | 3973 goto LABEL_10; |
3975 } | 3974 } |
3976 LABEL_12: | 3975 LABEL_12: |
3977 result = v38; | 3976 return this->uNumVertices = v38; |
3978 this->field_10 = v38; | |
3979 return result; | |
3980 } | 3977 } |
3981 | 3978 |
3982 //----- (00477927) -------------------------------------------------------- | 3979 //----- (00477927) -------------------------------------------------------- |
3983 int stru6_stru1_indoor_sw_billboard::_477927(float a2) | 3980 int stru6_stru1_indoor_sw_billboard::_477927(float a2) |
3984 { | 3981 { |
4020 int v37; // [sp+C8h] [bp-10h]@6 | 4017 int v37; // [sp+C8h] [bp-10h]@6 |
4021 int v38; // [sp+CCh] [bp-Ch]@1 | 4018 int v38; // [sp+CCh] [bp-Ch]@1 |
4022 float v39; // [sp+D0h] [bp-8h]@6 | 4019 float v39; // [sp+D0h] [bp-8h]@6 |
4023 int *v40; // [sp+D4h] [bp-4h]@2 | 4020 int *v40; // [sp+D4h] [bp-4h]@2 |
4024 | 4021 |
4025 v2 = (char *)&this->field_14[4 * this->field_10 + 20]; | 4022 v2 = (char *)&this->field_64[4 * this->uNumVertices]; |
4026 v38 = 0; | 4023 v38 = 0; |
4027 *(int *)v2 = this->field_14[20]; | 4024 *(int *)v2 = this->field_64[0]; |
4028 v2 += 4; | 4025 v2 += 4; |
4029 *(int *)v2 = this->field_14[21]; | 4026 *(int *)v2 = this->field_64[1]; |
4030 v2 += 4; | 4027 v2 += 4; |
4031 *(int *)v2 = this->field_14[22]; | 4028 *(int *)v2 = this->field_64[2]; |
4032 *((int *)v2 + 1) = this->field_14[23]; | 4029 *((int *)v2 + 1) = this->field_64[3]; |
4033 v3 = this->field_10; | 4030 v3 = this->uNumVertices; |
4034 v35 = this; | 4031 v35 = this; |
4035 if ( v3 > 0 ) | 4032 if ( v3 > 0 ) |
4036 { | 4033 { |
4037 v40 = &this->field_14[40]; | 4034 v40 = &this->field_64[20]; |
4038 v4 = (char *)&this->field_14[23] + 3; | 4035 v4 = (char *)&this->field_64[3] + 3; |
4039 v34 = v3; | 4036 v34 = v3; |
4040 while ( 1 ) | 4037 while ( 1 ) |
4041 { | 4038 { |
4042 v5 = v4 - 15; | 4039 v5 = v4 - 15; |
4043 if ( *(float *)(v4 - 15) >= (double)a2 && *(float *)(v4 + 1) >= (double)a2 ) | 4040 if ( *(float *)(v4 - 15) >= (double)a2 && *(float *)(v4 + 1) >= (double)a2 ) |
4119 //this = v35; | 4116 //this = v35; |
4120 v5 = (char *)&v30 + 4; | 4117 v5 = (char *)&v30 + 4; |
4121 goto LABEL_10; | 4118 goto LABEL_10; |
4122 } | 4119 } |
4123 LABEL_12: | 4120 LABEL_12: |
4124 result = v38; | 4121 return this->uNumVertices = v38; |
4125 this->field_10 = v38; | |
4126 return result; | |
4127 } | 4122 } |
4128 | 4123 |
4129 //----- (00477C61) -------------------------------------------------------- | 4124 //----- (00477C61) -------------------------------------------------------- |
4130 int stru6_stru1_indoor_sw_billboard::sub_477C61() | 4125 int stru6_stru1_indoor_sw_billboard::sub_477C61() |
4131 { | 4126 { |
4173 | 4168 |
4174 //v1 = this; | 4169 //v1 = this; |
4175 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) | 4170 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) |
4176 { | 4171 { |
4177 v2 = 0; | 4172 v2 = 0; |
4178 if ( this->field_10 > 0 ) | 4173 if ( this->uNumVertices > 0 ) |
4179 { | 4174 { |
4180 v3 = (int)&this->field_14[1]; | 4175 v3 = (int)&this->field_14[1]; |
4181 do | 4176 do |
4182 { | 4177 { |
4183 v4 = *(float *)(v3 - 4); | 4178 v4 = *(float *)(v3 - 4); |
4226 *(float *)(v3 + 76) = v10; | 4221 *(float *)(v3 + 76) = v10; |
4227 *(int *)(v3 + 88) = v14; | 4222 *(int *)(v3 + 88) = v14; |
4228 *(float *)(v3 + 80) = v11; | 4223 *(float *)(v3 + 80) = v11; |
4229 v3 += 16; | 4224 v3 += 16; |
4230 } | 4225 } |
4231 while ( v2 < this->field_10 ); | 4226 while ( v2 < this->uNumVertices ); |
4232 } | 4227 } |
4233 } | 4228 } |
4234 else | 4229 else |
4235 { | 4230 { |
4236 v15 = (char *)&this->field_14[1]; | 4231 v15 = (char *)&this->field_14[1]; |
4272 v15 += 16; | 4267 v15 += 16; |
4273 --v31; | 4268 --v31; |
4274 } | 4269 } |
4275 while ( v31 ); | 4270 while ( v31 ); |
4276 } | 4271 } |
4277 this->field_10 = 3; | 4272 this->uNumVertices = 3; |
4278 return 1; | 4273 return 1; |
4279 } | 4274 } |
4280 | 4275 |
4281 //----- (00477F63) -------------------------------------------------------- | 4276 //----- (00477F63) -------------------------------------------------------- |
4282 bool stru6_stru1_indoor_sw_billboard::sub_477F63() | 4277 bool stru6_stru1_indoor_sw_billboard::sub_477F63() |
4304 else | 4299 else |
4305 { | 4300 { |
4306 v10 = (double)pOutdoorCamera->shading_dist_mist; | 4301 v10 = (double)pOutdoorCamera->shading_dist_mist; |
4307 v3 = 8.0; | 4302 v3 = 8.0; |
4308 } | 4303 } |
4309 v4 = a1->field_10; | 4304 v4 = a1->uNumVertices; |
4310 if ( v4 <= 0 ) | 4305 if ( v4 <= 0 ) |
4311 goto LABEL_16; | 4306 goto LABEL_16; |
4312 v5 = (char *)&a1->field_14[20]; | 4307 v5 = (char *)&a1->field_14[20]; |
4313 v6 = v4; | 4308 v6 = v4; |
4314 do | 4309 do |
4327 if ( !v1 ) | 4322 if ( !v1 ) |
4328 { | 4323 { |
4329 if ( v9 ) | 4324 if ( v9 ) |
4330 { | 4325 { |
4331 v2->_477927(v10); | 4326 v2->_477927(v10); |
4332 return v2->field_10 != 0; | 4327 return v2->uNumVertices != 0; |
4333 } | 4328 } |
4334 LABEL_16: | 4329 LABEL_16: |
4335 memcpy(&v2->field_14[40], &v2->field_14[20], 16 * v4); | 4330 memcpy(&v2->field_14[40], &v2->field_14[20], 16 * v4); |
4336 return v2->field_10 != 0; | 4331 return v2->uNumVertices != 0; |
4337 } | 4332 } |
4338 v7 = v3; | 4333 v7 = v3; |
4339 _4775ED(v7); | 4334 _4775ED(v7); |
4340 return v2->field_10 != 0; | 4335 return v2->uNumVertices != 0; |
4341 } | 4336 } |
4342 | 4337 |
4343 //----- (0047802A) -------------------------------------------------------- | 4338 //----- (0047802A) -------------------------------------------------------- |
4344 int stru6_stru1_indoor_sw_billboard::sub_47802A() | 4339 int stru6_stru1_indoor_sw_billboard::sub_47802A() |
4345 { | 4340 { |
4352 auto a1 = this; | 4347 auto a1 = this; |
4353 | 4348 |
4354 v16 = 0; | 4349 v16 = 0; |
4355 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) | 4350 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) |
4356 { | 4351 { |
4357 for(int i = 0; i < a1->field_10; i++) | 4352 for(int i = 0; i < a1->uNumVertices; i++) |
4358 { | 4353 { |
4359 v6 = (double)pBLVRenderParams->field_40 * 0.000015258789 / a1->field_B4[i*4]; | 4354 v6 = (double)pBLVRenderParams->field_40 * 0.000015258789 / a1->field_B4[i*4]; |
4360 if ( pRenderer->pRenderD3D ) | 4355 if ( pRenderer->pRenderD3D ) |
4361 { | 4356 { |
4362 pGame->pIndoorCameraD3D->Project( | 4357 pGame->pIndoorCameraD3D->Project( |
4383 v16 = 1; | 4378 v16 = 1; |
4384 } | 4379 } |
4385 } | 4380 } |
4386 else | 4381 else |
4387 { | 4382 { |
4388 for(int i = 0; i < a1->field_10; i++) | 4383 for(int i = 0; i < a1->uNumVertices; i++) |
4389 { | 4384 { |
4390 v12 = (double)pOutdoorCamera->int_fov_rad / a1->field_B4[i*4]; | 4385 v12 = (double)pOutdoorCamera->int_fov_rad / a1->field_B4[i*4]; |
4391 a1->field_B4[i*4+20] = (double)pViewport->uScreenCenterX - v12 * a1->field_B4[i*4+1]; | 4386 a1->field_B4[i*4+20] = (double)pViewport->uScreenCenterX - v12 * a1->field_B4[i*4+1]; |
4392 a1->field_B4[i*4+21] = (double)pViewport->uScreenCenterY - v12 * a1->field_B4[i*4+2]; | 4387 a1->field_B4[i*4+21] = (double)pViewport->uScreenCenterY - v12 * a1->field_B4[i*4+2]; |
4393 *((int *)&a1->field_B4[i*4+22]) = (int)a1->field_B4[i*4]; | 4388 *((int *)&a1->field_B4[i*4+22]) = (int)a1->field_B4[i*4]; |
6116 | 6111 |
6117 pRenderer->DrawSkyPolygon(pSky.uNumVertices, &pSky, pBitmaps_LOD->pHardwareTextures[pSky.uTileBitmapID]); | 6112 pRenderer->DrawSkyPolygon(pSky.uNumVertices, &pSky, pBitmaps_LOD->pHardwareTextures[pSky.uTileBitmapID]); |
6118 //} | 6113 //} |
6119 } | 6114 } |
6120 | 6115 |
6121 //----- (00479A53) -------------------------------------------------------- | |
6122 void __fastcall _479A53_draw_some_blv_poly(unsigned int uNumVertices, unsigned int uFaceID) | |
6123 { | |
6124 BLVFace *pFace; // esi@1 | |
6125 unsigned int v3; // edi@1 | |
6126 PolygonType v4; // al@1 | |
6127 double v5; // st7@3 | |
6128 signed __int64 v6; // qax@3 | |
6129 PolygonType v7; // cl@3 | |
6130 int v8; // esi@7 | |
6131 int v9; // eax@7 | |
6132 unsigned int v10; // eax@7 | |
6133 double v11; // st6@7 | |
6134 int v12; // edx@7 | |
6135 int v13; // eax@7 | |
6136 char *v14; // esi@8 | |
6137 void *v15; // ecx@9 | |
6138 int v16; // eax@9 | |
6139 int v17; // edi@9 | |
6140 double v18; // st7@9 | |
6141 signed int v19; // ebx@9 | |
6142 void *v20; // ecx@9 | |
6143 int v21; // ebx@11 | |
6144 int v22; // eax@14 | |
6145 signed __int64 v23; // qtt@16 | |
6146 double v24; // st7@16 | |
6147 unsigned __int8 v25; // sf@16 | |
6148 unsigned __int8 v26; // of@16 | |
6149 Render *v27; // ecx@17 | |
6150 double v28; // st7@20 | |
6151 char *v29; // ebx@20 | |
6152 char *v30; // edx@20 | |
6153 unsigned __int8 v31; // c0@21 | |
6154 unsigned __int8 v32; // c3@21 | |
6155 double v33; // st6@23 | |
6156 char *v34; // esi@30 | |
6157 const void *v35; // ecx@31 | |
6158 int v36; // eax@31 | |
6159 const void *v37; // edi@31 | |
6160 signed __int64 v38; // qax@31 | |
6161 int v39; // ecx@31 | |
6162 int v40; // ebx@33 | |
6163 int v41; // eax@36 | |
6164 signed __int64 v42; // qtt@39 | |
6165 int v43; // eax@39 | |
6166 char v44; // zf@39 | |
6167 double v45; // st7@39 | |
6168 double v46; // st7@39 | |
6169 unsigned int v47; // edx@40 | |
6170 double v48; // st7@41 | |
6171 RenderVertexSoft *v49; // ebx@41 | |
6172 void *v50; // edi@43 | |
6173 double v51; // st7@46 | |
6174 RenderVertexSoft *v52; // edx@46 | |
6175 void *v53; // edi@48 | |
6176 char *v54; // ebx@52 | |
6177 unsigned int v55; // eax@53 | |
6178 unsigned int v56; // eax@55 | |
6179 int v57; // ST10_4@55 | |
6180 Texture *v58; // eax@55 | |
6181 signed int v59; // [sp-4h] [bp-178h]@17 | |
6182 stru148 *v60; // [sp+0h] [bp-174h]@17 | |
6183 IDirect3DTexture2 *v61; // [sp+4h] [bp-170h]@17 | |
6184 stru148 v62; // [sp+14h] [bp-160h]@6 | |
6185 unsigned int v63; // [sp+120h] [bp-54h]@7 | |
6186 double v64; // [sp+124h] [bp-50h]@7 | |
6187 unsigned int v65; // [sp+128h] [bp-4Ch]@1 | |
6188 unsigned int v66; // [sp+12Ch] [bp-48h]@7 | |
6189 float v67; // [sp+130h] [bp-44h]@7 | |
6190 __int64 v68; // [sp+134h] [bp-40h]@3 | |
6191 __int64 v69; // [sp+13Ch] [bp-38h]@3 | |
6192 int v70; // [sp+144h] [bp-30h]@3 | |
6193 int X; // [sp+148h] [bp-2Ch]@9 | |
6194 int v72; // [sp+14Ch] [bp-28h]@7 | |
6195 float v73; // [sp+150h] [bp-24h]@16 | |
6196 unsigned int v74; // [sp+154h] [bp-20h]@3 | |
6197 RenderVertexSoft *v75; // [sp+158h] [bp-1Ch]@3 | |
6198 float v76; // [sp+15Ch] [bp-18h]@9 | |
6199 int v77; // [sp+160h] [bp-14h]@9 | |
6200 int v78; // [sp+164h] [bp-10h]@7 | |
6201 void *v79; // [sp+168h] [bp-Ch]@9 | |
6202 float v80; // [sp+16Ch] [bp-8h]@3 | |
6203 const void *v81; // [sp+170h] [bp-4h]@7 | |
6204 | |
6205 __debugbreak(); | |
6206 | |
6207 pFace = &pIndoor->pFaces[uFaceID]; | |
6208 v65 = uFaceID; | |
6209 v3 = uNumVertices; | |
6210 v4 = pFace->uPolygonType; | |
6211 if ( v4 == POLYGON_InBetweenFloorAndWall || v4 == POLYGON_Floor ) | |
6212 { | |
6213 if ( (signed int)uNumVertices > 0 ) | |
6214 { | |
6215 v54 = (char *)&array_507D30[0].u; | |
6216 LODWORD(v80) = uNumVertices; | |
6217 do | |
6218 { | |
6219 v69 = (GetTickCount() >> 5) - pBLVRenderParams->vPartyPos.x; | |
6220 *(float *)v54 = (double)v69 + *(float *)v54; | |
6221 *(float *)v54 = *(float *)v54 * 0.25; | |
6222 v55 = GetTickCount(); | |
6223 v54 += 48; | |
6224 v44 = LODWORD(v80)-- == 1; | |
6225 v68 = pBLVRenderParams->vPartyPos.y + (v55 >> 5); | |
6226 *((float *)v54 - 11) = ((double)v68 + *((float *)v54 - 11)) * 0.25; | |
6227 } | |
6228 while ( !v44 ); | |
6229 uFaceID = v65; | |
6230 } | |
6231 v56 = 8 * uFaceID; | |
6232 LOBYTE(v56) = PID(OBJECT_BModel,uFaceID); | |
6233 v57 = v56; | |
6234 v58 = pFace->GetTexture(); | |
6235 pRenderer->DrawIndoorPolygon(v3, pFace, pBitmaps_LOD->pHardwareTextures[pFace->uBitmapID], v58, v57, -1, 0); | |
6236 return; | |
6237 } | |
6238 HIDWORD(v69) = pIndoorCamera->sRotationX; | |
6239 HIDWORD(v68) = pIndoorCamera->pos.z; | |
6240 *(float *)&v74 = (double)pBLVRenderParams->uViewportCenterY; | |
6241 v70 = (signed __int64)((double)(pBLVRenderParams->field_40 * pBLVRenderParams->vPartyPos.z) | |
6242 / (((double)pBLVRenderParams->field_40 + 16192.0) | |
6243 * 65536.0) | |
6244 + *(float *)&v74); | |
6245 v5 = (double)pIndoorCamera->sRotationX * 0.0030664064; | |
6246 *(float *)&v75 = v5; | |
6247 v80 = cos(v5) * 16192.0; | |
6248 v6 = (signed __int64)(*(float *)&v74 | |
6249 - (double)pBLVRenderParams->field_40 | |
6250 / ((v80 + 0.0000001) | |
6251 * 65535.0) | |
6252 * (sin(*(float *)&v75) * -16192.0 - (double)SHIDWORD(v68))); | |
6253 v7 = pFace->uPolygonType; | |
6254 if ( v7 == 4 || v7 == 3 ) | |
6255 v70 = v6; | |
6256 stru_8019C8._48653D(65536, 0, 0, 0, 65536, 0); | |
6257 v62._48607B(&stru_8019C8); | |
6258 v62.uTileBitmapID = pFace->uBitmapID; | |
6259 v62.pTexture = (Texture *)((signed __int16)v62.uTileBitmapID != -1 ? &pBitmaps_LOD->pTextures[(signed __int16)v62.uTileBitmapID] : 0); | |
6260 if ( !v62.pTexture ) | |
6261 return; | |
6262 v8 = pBLVRenderParams->sPartyRotX; | |
6263 v62.dimming_level = 0; | |
6264 v62.uNumVertices = v3; | |
6265 v9 = stru_5C6E00->Sin(pBLVRenderParams->sPartyRotX + 16); | |
6266 v62.v_18.y = 0; | |
6267 v62.v_18.x = -v9; | |
6268 v62.v_18.z = -stru_5C6E00->Cos(v8 + 16); | |
6269 v10 = pBLVRenderParams->uViewportZ - pBLVRenderParams->uViewportX; | |
6270 memcpy(&array_507D30[v3], array_507D30, sizeof(array_507D30[v3])); | |
6271 LODWORD(v80) = v10; | |
6272 v62.field_24 = 33554432; | |
6273 v64 = (double)(signed int)v10 * 0.5; | |
6274 v72 = 65536 / (signed int)(signed __int64)(v64 / tan(0.6457717418670654) + 0.5); | |
6275 LODWORD(v80) = v62.pTexture->uTextureWidth; | |
6276 v11 = 1.0 / (double)SLODWORD(v80); | |
6277 LODWORD(v80) = v62.pTexture->uTextureHeight; | |
6278 v12 = v62.pTexture->uWidthMinus1; | |
6279 v13 = v62.pTexture->uHeightMinus1; | |
6280 v67 = v11; | |
6281 v63 = 224 * pMiscTimer->uTotalGameTimeElapsed & v13; | |
6282 v66 = 224 * pMiscTimer->uTotalGameTimeElapsed & v12; | |
6283 v78 = 0; | |
6284 v81 = 0; | |
6285 *((float *)&v68 + 1) = 1.0 / (double)SLODWORD(v80); | |
6286 if ( (signed int)v62.uNumVertices <= 0 ) | |
6287 { | |
6288 LABEL_17: | |
6289 v61 = pBitmaps_LOD->pHardwareTextures[(signed __int16)v62.uTileBitmapID]; | |
6290 v27 = pRenderer; | |
6291 v60 = &v62; | |
6292 v59 = v62.uNumVertices; | |
6293 goto LABEL_18; | |
6294 } | |
6295 v14 = (char *)&array_507D30[0].vWorldViewProjY; | |
6296 while ( 2 ) | |
6297 { | |
6298 v15 = (void *)(v72 * (v70 - (unsigned __int64)(signed __int64)*(float *)v14)); | |
6299 LODWORD(v80) = v62.ptr_38->field_14; | |
6300 v77 = (unsigned __int64)(SLODWORD(v80) * (signed __int64)(signed int)v15) >> 16; | |
6301 v16 = v77 + v62.ptr_38->field_C; | |
6302 v77 = (int)v15; | |
6303 v74 = v16; | |
6304 LODWORD(v80) = v62.ptr_38->field_20; | |
6305 v77 = (unsigned __int64)(SLODWORD(v80) * (signed __int64)(signed int)v15) >> 16; | |
6306 v79 = v15; | |
6307 v75 = (RenderVertexSoft *)(v77 + v62.ptr_38->field_18); | |
6308 LODWORD(v80) = v62.v_18.z; | |
6309 v79 = (void *)((unsigned __int64)(v62.v_18.z * (signed __int64)(signed int)v15) >> 16); | |
6310 v17 = v72 * (pBLVRenderParams->uViewportCenterX - (unsigned __int64)(signed __int64)*((float *)v14 - 1)); | |
6311 v18 = *(float *)v14 - 1.0; | |
6312 v19 = -v62.field_24; | |
6313 v77 = -v62.field_24; | |
6314 X = (int)((char *)v79 + v62.v_18.x); | |
6315 LODWORD(v76) = (signed __int64)v18; | |
6316 v20 = (void *)(v72 * (v70 - LODWORD(v76))); | |
6317 while ( 1 ) | |
6318 { | |
6319 v79 = v20; | |
6320 if ( !X ) | |
6321 goto LABEL_14; | |
6322 v21 = abs(v19 >> 14); | |
6323 if ( v21 <= abs(X) ) | |
6324 break; | |
6325 if ( SLODWORD(v76) <= (signed int)pViewport->uViewportTL_Y ) | |
6326 break; | |
6327 v19 = v77; | |
6328 v20 = v79; | |
6329 LABEL_14: | |
6330 LODWORD(v80) = v62.v_18.z; | |
6331 v79 = (void *)((unsigned __int64)(v62.v_18.z * (signed __int64)(signed int)v20) >> 16); | |
6332 v22 = (unsigned __int64)(v62.v_18.z * (signed __int64)(signed int)v20) >> 16; | |
6333 --LODWORD(v76); | |
6334 v20 = (char *)v20 + v72; | |
6335 X = v22 + v62.v_18.x; | |
6336 v78 = 1; | |
6337 } | |
6338 if ( !v78 ) | |
6339 { | |
6340 LODWORD(v23) = v77 << 16; | |
6341 HIDWORD(v23) = v77 >> 16; | |
6342 v79 = (void *)(v23 / X); | |
6343 v77 = v17; | |
6344 LODWORD(v80) = v62.ptr_38->field_10; | |
6345 v77 = v17; | |
6346 LODWORD(v76) = v74 + ((unsigned __int64)(SLODWORD(v80) * (signed __int64)v17) >> 16); | |
6347 LODWORD(v80) = v62.ptr_38->field_1C; | |
6348 v75 = (RenderVertexSoft *)((char *)v75 + ((unsigned __int64)(SLODWORD(v80) * (signed __int64)v17) >> 16)); | |
6349 v77 = (unsigned __int64)(SLODWORD(v76) * v23 / X) >> 16; | |
6350 LODWORD(v73) = (unsigned __int64)((signed int)v75 * v23 / X) >> 16; | |
6351 v14 += 48; | |
6352 LODWORD(v80) = v66 + ((signed int)((unsigned __int64)(SLODWORD(v76) * v23 / X) >> 16) >> 4); | |
6353 v81 = (char *)v81 + 1; | |
6354 v24 = (double)SLODWORD(v80) * 0.000015259022; | |
6355 LODWORD(v80) = v63 + ((signed int)((unsigned __int64)((signed int)v75 * v23 / X) >> 16) >> 4); | |
6356 v26 = __OFSUB__((int)v81, v62.uNumVertices); | |
6357 v25 = (signed int)((char *)v81 - v62.uNumVertices) < 0; | |
6358 *((float *)v14 - 10) = v24 * v67; | |
6359 *((float *)v14 - 9) = (double)SLODWORD(v80) * 0.000015259022 * *((float *)&v68 + 1); | |
6360 *((float *)v14 - 11) = 65536.0 / (double)(signed int)v79; | |
6361 if ( !(v25 ^ v26) ) | |
6362 goto LABEL_17; | |
6363 continue; | |
6364 } | |
6365 break; | |
6366 } | |
6367 LODWORD(v73) = 0; | |
6368 v80 = v76; | |
6369 if ( (signed int)v62.uNumVertices > 0 ) | |
6370 { | |
6371 v28 = (double)SLODWORD(v76); | |
6372 LODWORD(v76) = (int)(char *)array_50AC10 + 28; | |
6373 v29 = (char *)&array_50AC10[0].vWorldViewProjX; | |
6374 v30 = (char *)&array_507D30[1].vWorldViewProjY; | |
6375 v79 = array_50AC10; | |
6376 v81 = array_507D30; | |
6377 v78 = v62.uNumVertices; | |
6378 do | |
6379 { | |
6380 v31 = v28 < *((float *)v30 - 12); | |
6381 v32 = v28 == *((float *)v30 - 12); | |
6382 ++LODWORD(v73); | |
6383 memcpy(v79, v81, 0x30u); | |
6384 v79 = (char *)v79 + 48; | |
6385 LODWORD(v76) += 48; | |
6386 v29 += 48; | |
6387 if ( v31 | v32 || v28 >= *(float *)v30 ) | |
6388 { | |
6389 if ( v28 >= *((float *)v30 - 12) || v28 <= *(float *)v30 ) | |
6390 goto LABEL_28; | |
6391 v33 = (*((float *)v30 - 1) - *((float *)v30 - 13)) * v28 / (*(float *)v30 - *((float *)v30 - 12)) | |
6392 + *((float *)v30 - 1); | |
6393 } | |
6394 else | |
6395 { | |
6396 v33 = (*((float *)v30 - 13) - *((float *)v30 - 1)) * v28 / (*((float *)v30 - 12) - *(float *)v30) | |
6397 + *((float *)v30 - 13); | |
6398 } | |
6399 *(float *)v29 = v33; | |
6400 v79 = (char *)v79 + 48; | |
6401 v29 += 48; | |
6402 ++LODWORD(v73); | |
6403 *(unsigned int *)LODWORD(v76) = v28; | |
6404 LODWORD(v76) += 48; | |
6405 LABEL_28: | |
6406 v81 = (char *)v81 + 48; | |
6407 v30 += 48; | |
6408 --v78; | |
6409 } | |
6410 while ( v78 ); | |
6411 } | |
6412 if ( SLODWORD(v73) <= 0 ) | |
6413 goto LABEL_40; | |
6414 v34 = (char *)&array_50AC10[0].vWorldViewProjY; | |
6415 v65 = v77 >> 14; | |
6416 HIDWORD(v69) = LODWORD(v73); | |
6417 do | |
6418 { | |
6419 v35 = (const void *)(v72 * (v70 - (unsigned __int64)(signed __int64)*(float *)v34)); | |
6420 v78 = v62.ptr_38->field_14; | |
6421 v81 = (const void *)((unsigned __int64)(v78 * (signed __int64)(signed int)v35) >> 16); | |
6422 v36 = (int)((char *)v81 + v62.ptr_38->field_C); | |
6423 v81 = v35; | |
6424 v74 = v36; | |
6425 v78 = v62.ptr_38->field_20; | |
6426 v81 = (const void *)((unsigned __int64)(v78 * (signed __int64)(signed int)v35) >> 16); | |
6427 v78 = (int)v35; | |
6428 v75 = (RenderVertexSoft *)((char *)v81 + v62.ptr_38->field_18); | |
6429 v81 = (const void *)v62.v_18.z; | |
6430 v78 = (unsigned __int64)(v62.v_18.z * (signed __int64)(signed int)v35) >> 16; | |
6431 v37 = (const void *)(v72 | |
6432 * (pBLVRenderParams->uViewportCenterX - (unsigned __int64)(signed __int64)*((float *)v34 - 1))); | |
6433 v38 = (signed __int64)(*(float *)v34 - 1.0); | |
6434 v81 = 0; | |
6435 LODWORD(v76) = v38; | |
6436 v39 = v72 * (v70 - v38); | |
6437 while ( 1 ) | |
6438 { | |
6439 v78 = v39; | |
6440 if ( !X ) | |
6441 goto LABEL_36; | |
6442 v40 = abs(X); | |
6443 if ( abs((signed __int64)v65) <= v40 ) | |
6444 break; | |
6445 if ( SLODWORD(v76) <= (signed int)pViewport->uViewportTL_Y ) | |
6446 break; | |
6447 v39 = v78; | |
6448 LABEL_36: | |
6449 v78 = v62.v_18.z; | |
6450 v41 = (unsigned __int64)(v62.v_18.z * (signed __int64)v39) >> 16; | |
6451 --LODWORD(v76); | |
6452 v39 += v72; | |
6453 X = v41 + v62.v_18.x; | |
6454 v81 = (const void *)1; | |
6455 } | |
6456 if ( v81 ) | |
6457 { | |
6458 v79 = (void *)v62.v_18.z; | |
6459 v78 = 2 * LODWORD(v76); | |
6460 v81 = (const void *)((unsigned __int64)(v62.v_18.z | |
6461 * (signed __int64)(signed int)(signed __int64)(((double)v70 | |
6462 - ((double)(2 * LODWORD(v76)) | |
6463 - *(float *)v34)) | |
6464 * (double)v72)) >> 16); | |
6465 X = (int)((char *)v81 + v62.v_18.x); | |
6466 } | |
6467 LODWORD(v42) = v77 << 16; | |
6468 HIDWORD(v42) = v77 >> 16; | |
6469 v79 = (void *)(v42 / X); | |
6470 v81 = v37; | |
6471 v78 = v62.ptr_38->field_10; | |
6472 v81 = (const void *)((unsigned __int64)(v78 * (signed __int64)(signed int)v37) >> 16); | |
6473 v43 = v74 + ((unsigned __int64)(v78 * (signed __int64)(signed int)v37) >> 16); | |
6474 v74 = (unsigned int)v37; | |
6475 LODWORD(v76) = v43; | |
6476 v78 = v62.ptr_38->field_1C; | |
6477 v75 = (RenderVertexSoft *)((char *)v75 + ((unsigned __int64)(v78 * (signed __int64)(signed int)v37) >> 16)); | |
6478 v74 = (unsigned __int64)(v43 * v42 / X) >> 16; | |
6479 v81 = (const void *)((unsigned __int64)((signed int)v75 * v42 / X) >> 16); | |
6480 v34 += 48; | |
6481 v78 = v66 + ((signed int)v74 >> 4); | |
6482 v44 = HIDWORD(v69)-- == 1; | |
6483 v45 = (double)v78 * 0.000015259022; | |
6484 v78 = v63 + ((signed int)((unsigned __int64)((signed int)v75 * v42 / X) >> 16) >> 4); | |
6485 *((float *)v34 - 10) = v45 * v67; | |
6486 *((float *)v34 - 9) = (double)v78 * 0.000015259022 * *((float *)&v68 + 1); | |
6487 v46 = (double)(signed int)v79; | |
6488 *((float *)v34 - 16) = 0.000015258789 * v46; | |
6489 *((float *)v34 - 11) = 65536.0 / v46; | |
6490 } | |
6491 while ( !v44 ); | |
6492 LABEL_40: | |
6493 v47 = 0; | |
6494 if ( SLODWORD(v73) > 0 ) | |
6495 { | |
6496 v48 = (double)SLODWORD(v80); | |
6497 v75 = array_507D30; | |
6498 v49 = array_50AC10; | |
6499 HIDWORD(v69) = LODWORD(v73); | |
6500 do | |
6501 { | |
6502 if ( v48 >= v49->vWorldViewProjY ) | |
6503 { | |
6504 v50 = v75; | |
6505 ++v47; | |
6506 ++v75; | |
6507 memcpy(v50, v49, 0x30u); | |
6508 } | |
6509 ++v49; | |
6510 --HIDWORD(v69); | |
6511 } | |
6512 while ( HIDWORD(v69) ); | |
6513 } | |
6514 v62.uNumVertices = v47; | |
6515 pRenderer->_4A2ED5(v47, &v62, pBitmaps_LOD->pHardwareTextures[(signed __int16)v62.uTileBitmapID]); | |
6516 *(float *)&v74 = 0.0; | |
6517 if ( SLODWORD(v73) > 0 ) | |
6518 { | |
6519 v51 = (double)SLODWORD(v80); | |
6520 v75 = array_507D30; | |
6521 v52 = array_50AC10; | |
6522 v80 = v73; | |
6523 do | |
6524 { | |
6525 if ( v51 <= v52->vWorldViewProjY ) | |
6526 { | |
6527 v53 = v75; | |
6528 ++v74; | |
6529 ++v75; | |
6530 memcpy(v53, v52, 0x30u); | |
6531 } | |
6532 ++v52; | |
6533 --LODWORD(v80); | |
6534 } | |
6535 while ( v80 != 0.0 ); | |
6536 } | |
6537 v62.uNumVertices = v74; | |
6538 v61 = pBitmaps_LOD->pHardwareTextures[(signed __int16)v62.uTileBitmapID]; | |
6539 v60 = &v62; | |
6540 v59 = v74; | |
6541 v27 = pRenderer; | |
6542 LABEL_18: | |
6543 v27->_4A2ED5(v59, v60, v61); | |
6544 } | |
6545 | |
6546 //----- (0047A384) -------------------------------------------------------- | 6116 //----- (0047A384) -------------------------------------------------------- |
6547 void ODM_LoadAndInitialize(const char *pLevelFilename, OutdoorCamera *thisa) | 6117 void ODM_LoadAndInitialize(const char *pLevelFilename, OutdoorCamera *thisa) |
6548 { | 6118 { |
6549 int v2; // ebx@3 | 6119 int v2; // ebx@3 |
6550 unsigned int v3; // eax@3 | 6120 unsigned int v3; // eax@3 |