Mercurial > mm7
comparison mm7_4.cpp @ 351:5f36449527c6
stru351 -> summoned/spell-enchanted item
author | Nomad |
---|---|
date | Thu, 21 Feb 2013 03:04:08 +0200 |
parents | 5bc2df838558 |
children | ec6cc5cefa4b |
comparison
equal
deleted
inserted
replaced
350:77601b0fb14b | 351:5f36449527c6 |
---|---|
3726 } | 3726 } |
3727 | 3727 |
3728 | 3728 |
3729 | 3729 |
3730 //----- (00493F79) -------------------------------------------------------- | 3730 //----- (00493F79) -------------------------------------------------------- |
3731 int sub_493F79(stru351 *_this, __int64 a2) | 3731 void sub_493F79(stru351_summoned_item *_this, __int64 a2) |
3732 { | 3732 { |
3733 signed __int64 v2; // ST2C_8@1 | 3733 signed __int64 v2; // ST2C_8@1 |
3734 signed __int64 v3; // qax@1 | 3734 signed __int64 v3; // qax@1 |
3735 signed __int64 v4; // ST1C_8@1 | 3735 //signed __int64 v4; // ST1C_8@1 |
3736 unsigned __int64 v5; // qax@1 | 3736 unsigned __int64 v5; // qax@1 |
3737 unsigned int v6; // ebx@1 | 3737 unsigned int v6; // ebx@1 |
3738 int result; // eax@1 | |
3739 | 3738 |
3740 v2 = (signed __int64)((double)a2 * 0.234375); | 3739 v2 = (signed __int64)((double)a2 * 0.234375); |
3741 v3 = v2 / 60 / 60; | 3740 v3 = v2 / 60 / 60; |
3742 v4 = v3; | 3741 //v4 = v3; |
3743 v5 = (unsigned int)v3 / 0x18; | 3742 v5 = (unsigned int)v3 / 0x18; |
3744 v6 = (unsigned int)(v5 / 7) >> 2; | 3743 v6 = (unsigned int)(v5 / 7) >> 2; |
3745 _this->field_0 = v2 % 60; | 3744 _this->field_0_expire_second = v2 % 60; |
3746 _this->field_4 = v2 / 60 % 60; | 3745 _this->field_4_expire_minute = v2 / 60 % 60; |
3747 _this->field_8 = v4 % 24; | 3746 _this->field_8_expire_hour = v3 % 24; |
3748 _this->field_10 = v5 / 7 & 3; | 3747 _this->field_10_expire_week = v5 / 7 & 3; |
3749 _this->field_C = (unsigned int)v5 % 0x1C; | 3748 _this->field_C_expire_day = (unsigned int)v5 % 0x1C; |
3750 result = v6 / 0xC + 1168; | 3749 _this->field_14_exprie_month = v6 % 0xC; |
3751 _this->field_14 = v6 % 0xC; | 3750 _this->field_18_expire_year = v6 / 0xC + 1168; |
3752 _this->field_18 = result; | |
3753 return result; | |
3754 } | 3751 } |
3755 | 3752 |
3756 | 3753 |
3757 | 3754 |
3758 | 3755 |
4887 int v51; // eax@108 | 4884 int v51; // eax@108 |
4888 Player *v52; // eax@109 | 4885 Player *v52; // eax@109 |
4889 int v53; // [sp-4h] [bp-13Ch]@107 | 4886 int v53; // [sp-4h] [bp-13Ch]@107 |
4890 int v54; // [sp+0h] [bp-138h]@107 | 4887 int v54; // [sp+0h] [bp-138h]@107 |
4891 __int16 v55[56]; // [sp+10h] [bp-128h]@34 | 4888 __int16 v55[56]; // [sp+10h] [bp-128h]@34 |
4892 stru351 v56; // [sp+80h] [bp-B8h]@107 | 4889 stru351_summoned_item v56; // [sp+80h] [bp-B8h]@107 |
4893 stru351 v57; // [sp+9Ch] [bp-9Ch]@115 | 4890 stru351_summoned_item v57; // [sp+9Ch] [bp-9Ch]@115 |
4894 char a1[100]; // [sp+B8h] [bp-80h]@3 | 4891 char a1[100]; // [sp+B8h] [bp-80h]@3 |
4895 unsigned int v59; // [sp+11Ch] [bp-1Ch]@3 | 4892 unsigned int v59; // [sp+11Ch] [bp-1Ch]@3 |
4896 //size_t v60; // [sp+120h] [bp-18h]@3 | 4893 //size_t v60; // [sp+120h] [bp-18h]@3 |
4897 //Player *v61; // [sp+124h] [bp-14h]@3 | 4894 //Player *v61; // [sp+124h] [bp-14h]@3 |
4898 //char *Str; // [sp+128h] [bp-10h]@1 | 4895 //char *Str; // [sp+128h] [bp-10h]@1 |
5237 case 30: | 5234 case 30: |
5238 { | 5235 { |
5239 if ( !a6 ) | 5236 if ( !a6 ) |
5240 goto _continue_strcat; | 5237 goto _continue_strcat; |
5241 sub_493F79(&v57, *a6); | 5238 sub_493F79(&v57, *a6); |
5242 v54 = v57.field_18; | 5239 v54 = v57.field_18_expire_year; |
5243 v53 = v57.field_C + 1; | 5240 v53 = v57.field_C_expire_day + 1; |
5244 v50 = v57.field_14; | 5241 v50 = v57.field_14_exprie_month; |
5245 sprintf(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v50], v53, v54); | 5242 sprintf(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v50], v53, v54); |
5246 v11 = a1; | 5243 v11 = a1; |
5247 goto _continue_strcat; | 5244 goto _continue_strcat; |
5248 } | 5245 } |
5249 | 5246 |
5261 if ( v17 - 51 >= 20 ) | 5258 if ( v17 - 51 >= 20 ) |
5262 goto _continue_strcat; | 5259 goto _continue_strcat; |
5263 HIDWORD(v49) = pParty->field_3C.field_440[2 * v17 + 1]; | 5260 HIDWORD(v49) = pParty->field_3C.field_440[2 * v17 + 1]; |
5264 LODWORD(v49) = pParty->field_3C.field_440[2 * v17]; | 5261 LODWORD(v49) = pParty->field_3C.field_440[2 * v17]; |
5265 sub_493F79(&v56, v49); | 5262 sub_493F79(&v56, v49); |
5266 v54 = v56.field_18; | 5263 v54 = v56.field_18_expire_year; |
5267 v53 = v56.field_C + 1; | 5264 v53 = v56.field_C_expire_day + 1; |
5268 v50 = v56.field_14; | 5265 v50 = v56.field_14_exprie_month; |
5269 sprintf(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v50], v53, v54); | 5266 sprintf(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v50], v53, v54); |
5270 v11 = a1; | 5267 v11 = a1; |
5271 goto _continue_strcat; | 5268 goto _continue_strcat; |
5272 } | 5269 } |
5273 } | 5270 } |