Mercurial > mm7
comparison mm7_3.cpp @ 2125:ba3de1337989
house animations working
round renamed to round_to_int
author | zipi |
---|---|
date | Thu, 26 Dec 2013 22:46:49 +0000 |
parents | 7f403ebf619f |
children | 0d0aa7c1ccdd |
comparison
equal
deleted
inserted
replaced
2124:7f403ebf619f | 2125:ba3de1337989 |
---|---|
2065 for(int i = 0; i < this->uNumVertices; i++) | 2065 for(int i = 0; i < this->uNumVertices; i++) |
2066 { | 2066 { |
2067 v6 = (double)pBLVRenderParams->fov_rad_fixpoint * 0.000015258789 / this->field_B4[i*4]; | 2067 v6 = (double)pBLVRenderParams->fov_rad_fixpoint * 0.000015258789 / this->field_B4[i*4]; |
2068 if ( pRenderer->pRenderD3D ) | 2068 if ( pRenderer->pRenderD3D ) |
2069 { | 2069 { |
2070 pGame->pIndoorCameraD3D->Project(round(this->field_B4[i*4]), round(this->field_B4[i*4+1]), round(this->field_B4[i*4+2]), | 2070 pGame->pIndoorCameraD3D->Project(round_to_int(this->field_B4[i*4]), round_to_int(this->field_B4[i*4+1]), round_to_int(this->field_B4[i*4+2]), |
2071 &a5, &a6); | 2071 &a5, &a6); |
2072 this->field_B4[i*4+16] = (double)a5; | 2072 this->field_B4[i*4+16] = (double)a5; |
2073 this->field_B4[i*4+17] = (double)a6; | 2073 this->field_B4[i*4+17] = (double)a6; |
2074 this->field_B4[i*4+18] = round(this->field_B4[i*4]); | 2074 this->field_B4[i*4+18] = round_to_int(this->field_B4[i*4]); |
2075 } | 2075 } |
2076 else | 2076 else |
2077 { | 2077 { |
2078 this->field_B4[i*4+16] = (double)pBLVRenderParams->uViewportCenterX - v6 * this->field_B4[i*4+1]; | 2078 this->field_B4[i*4+16] = (double)pBLVRenderParams->uViewportCenterX - v6 * this->field_B4[i*4+1]; |
2079 this->field_B4[i*4+17] = (double)pBLVRenderParams->uViewportCenterY - v6 * this->field_B4[i*4+2]; | 2079 this->field_B4[i*4+17] = (double)pBLVRenderParams->uViewportCenterY - v6 * this->field_B4[i*4+2]; |
3293 v_18.y = 0; | 3293 v_18.y = 0; |
3294 v_18.z = 65536; | 3294 v_18.z = 65536; |
3295 } | 3295 } |
3296 else | 3296 else |
3297 { | 3297 { |
3298 v_18.x = round((double)this->v_18.x / len * 65536.0); | 3298 v_18.x = round_to_int((double)this->v_18.x / len * 65536.0); |
3299 v_18.y = round((double)this->v_18.y / len * 65536.0); | 3299 v_18.y = round_to_int((double)this->v_18.y / len * 65536.0); |
3300 v_18.y = round((double)this->v_18.z / len * 65536.0); | 3300 v_18.y = round_to_int((double)this->v_18.z / len * 65536.0); |
3301 } | 3301 } |
3302 } | 3302 } |
3303 | 3303 |
3304 //----- (0048616B) -------------------------------------------------------- | 3304 //----- (0048616B) -------------------------------------------------------- |
3305 void stru149::_48616B_frustum_odm(int a2, int a3, int a4, int a5, int a6, int a7) | 3305 void stru149::_48616B_frustum_odm(int a2, int a3, int a4, int a5, int a6, int a7) |
3992 int v4; // ecx@3 | 3992 int v4; // ecx@3 |
3993 char v6; // zf@9 | 3993 char v6; // zf@9 |
3994 | 3994 |
3995 v1 = pParty->uCurrentMonth + 1; | 3995 v1 = pParty->uCurrentMonth + 1; |
3996 v2 = pParty->uDaysPlayed + 1; | 3996 v2 = pParty->uDaysPlayed + 1; |
3997 if ( a1 ) | 3997 if ((v1 == (a1 + 1) * 3 && v2 >= 21) || v1 == (a1 + 1) % 4 * 3 + 1 || v1 == (a1 + 1) % 4 * 3 + 2 || (v1 == (a1 + 2) % 4 * 3 && v2 < 21)) |
3998 { | 3998 return true; |
3999 v3 = a1 - 1; | 3999 return false; |
4000 if ( a1 - 1 ) | 4000 |
4001 { | 4001 switch (a1) |
4002 v4 = v3 - 1; | 4002 { |
4003 if ( v3 - 1 ) | 4003 case 3: |
4004 { | 4004 if (v1 != 12)//12.21 -> 3.20 |
4005 if ( v4 != 1 ) | 4005 { |
4006 return false; | 4006 if ((signed int)v1 >= 1 && (signed int)v1 <= 2) |
4007 if ( v1 != 12 ) | 4007 return true; |
4008 { | 4008 v6 = v1 == 3; |
4009 if ( (signed int)v1 >= 1 && (signed int)v1 <= 2 ) | 4009 if (!v6 || (signed int)v2 >= 21) |
4010 return true; | 4010 return false; |
4011 v6 = v1 == 3; | 4011 return true; |
4012 if ( !v6 || (signed int)v2 >= 21 ) | 4012 } |
4013 return false; | 4013 break; |
4014 return true; | 4014 case 2: |
4015 } | 4015 if (v1 != 9)//9.21 -> 12.20 |
4016 } | 4016 { |
4017 else | 4017 if ((signed int)v1 >= 10 && (signed int)v1 <= 11) |
4018 { | 4018 return true; |
4019 if ( v1 != 9 ) | 4019 v6 = v1 == 12; |
4020 { | 4020 if (!v6 || (signed int)v2 >= 21) |
4021 if ( (signed int)v1 >= 10 && (signed int)v1 <= 11 ) | 4021 return false; |
4022 return true; | 4022 return true; |
4023 v6 = v1 == 12; | 4023 } |
4024 if ( !v6 || (signed int)v2 >= 21 ) | 4024 break; |
4025 return false; | 4025 case 1: |
4026 return true; | 4026 if (v1 != 6)//6.21 -> 9.20 |
4027 } | 4027 { |
4028 } | 4028 if ((signed int)v1 >= 7 && (signed int)v1 <= 8) |
4029 } | 4029 return true; |
4030 else | 4030 v6 = v1 == 9; |
4031 { | 4031 if (!v6 || (signed int)v2 >= 21) |
4032 if ( v1 != 6 ) | 4032 return false; |
4033 { | 4033 return true; |
4034 if ( (signed int)v1 >= 7 && (signed int)v1 <= 8 ) | 4034 } |
4035 return true; | 4035 break; |
4036 v6 = v1 == 9; | 4036 case 0: |
4037 if ( !v6 || (signed int)v2 >= 21 ) | 4037 if (v1 != 3)//3.21 -> 9.20 |
4038 return false; | 4038 { |
4039 return true; | 4039 if ((signed int)v1 >= 4 && (signed int)v1 <= 5) |
4040 } | 4040 return true; |
4041 } | 4041 v6 = v1 == 6; |
4042 } | 4042 if (!v6 || (signed int)v2 >= 21) |
4043 else | 4043 return false; |
4044 { | 4044 return true; |
4045 if ( v1 != 3 ) | 4045 } |
4046 { | 4046 break; |
4047 if ( (signed int)v1 >= 4 && (signed int)v1 <= 5 ) | 4047 default: |
4048 return true; | 4048 return false; |
4049 v6 = v1 == 6; | |
4050 if ( !v6 || (signed int)v2 >= 21 ) | |
4051 return false; | |
4052 return true; | |
4053 } | |
4054 } | 4049 } |
4055 if ( (signed int)v2 >= 21 ) | 4050 if ( (signed int)v2 >= 21 ) |
4056 return true; | 4051 return true; |
4057 return false; | 4052 return false; |
4058 } | 4053 } |