diff 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
line wrap: on
line diff
--- a/mm7_4.cpp	Thu Feb 21 02:13:46 2013 +0200
+++ b/mm7_4.cpp	Thu Feb 21 03:04:08 2013 +0200
@@ -3728,29 +3728,26 @@
 
 
 //----- (00493F79) --------------------------------------------------------
-int sub_493F79(stru351 *_this, __int64 a2)
+void sub_493F79(stru351_summoned_item *_this, __int64 a2)
 {
   signed __int64 v2; // ST2C_8@1
   signed __int64 v3; // qax@1
-  signed __int64 v4; // ST1C_8@1
+  //signed __int64 v4; // ST1C_8@1
   unsigned __int64 v5; // qax@1
   unsigned int v6; // ebx@1
-  int result; // eax@1
 
   v2 = (signed __int64)((double)a2 * 0.234375);
   v3 = v2 / 60 / 60;
-  v4 = v3;
+  //v4 = v3;
   v5 = (unsigned int)v3 / 0x18;
   v6 = (unsigned int)(v5 / 7) >> 2;
-  _this->field_0 = v2 % 60;
-  _this->field_4 = v2 / 60 % 60;
-  _this->field_8 = v4 % 24;
-  _this->field_10 = v5 / 7 & 3;
-  _this->field_C = (unsigned int)v5 % 0x1C;
-  result = v6 / 0xC + 1168;
-  _this->field_14 = v6 % 0xC;
-  _this->field_18 = result;
-  return result;
+  _this->field_0_expire_second = v2 % 60;
+  _this->field_4_expire_minute = v2 / 60 % 60;
+  _this->field_8_expire_hour = v3 % 24;
+  _this->field_10_expire_week = v5 / 7 & 3;
+  _this->field_C_expire_day = (unsigned int)v5 % 0x1C;
+  _this->field_14_exprie_month = v6 % 0xC;
+  _this->field_18_expire_year = v6 / 0xC + 1168;
 }
 
 
@@ -4889,8 +4886,8 @@
   int v53; // [sp-4h] [bp-13Ch]@107
   int v54; // [sp+0h] [bp-138h]@107
   __int16 v55[56]; // [sp+10h] [bp-128h]@34
-  stru351 v56; // [sp+80h] [bp-B8h]@107
-  stru351 v57; // [sp+9Ch] [bp-9Ch]@115
+  stru351_summoned_item v56; // [sp+80h] [bp-B8h]@107
+  stru351_summoned_item v57; // [sp+9Ch] [bp-9Ch]@115
   char a1[100]; // [sp+B8h] [bp-80h]@3
   unsigned int v59; // [sp+11Ch] [bp-1Ch]@3
   //size_t v60; // [sp+120h] [bp-18h]@3
@@ -5239,9 +5236,9 @@
                 if ( !a6 )
       goto _continue_strcat;
     sub_493F79(&v57, *a6);
-    v54 = v57.field_18;
-    v53 = v57.field_C + 1;
-    v50 = v57.field_14;
+    v54 = v57.field_18_expire_year;
+    v53 = v57.field_C_expire_day + 1;
+    v50 = v57.field_14_exprie_month;
     sprintf(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v50], v53, v54);
     v11 = a1;
     goto _continue_strcat;
@@ -5263,9 +5260,9 @@
             HIDWORD(v49) = pParty->field_3C.field_440[2 * v17 + 1];
             LODWORD(v49) = pParty->field_3C.field_440[2 * v17];
             sub_493F79(&v56, v49);
-            v54 = v56.field_18;
-            v53 = v56.field_C + 1;
-            v50 = v56.field_14;
+            v54 = v56.field_18_expire_year;
+            v53 = v56.field_C_expire_day + 1;
+            v50 = v56.field_14_exprie_month;
             sprintf(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v50], v53, v54);
             v11 = a1;
             goto _continue_strcat;