diff mm7_5.cpp @ 81:377535d6e366

structure boundaries fixed in many places. fixed quests, notes, awards, calendar.
author zipi
date Sun, 03 Feb 2013 15:36:54 +0000
parents 0a7860ded5c2
children 1faa29fd4c2d
line wrap: on
line diff
--- a/mm7_5.cpp	Sat Feb 02 16:56:01 2013 +0000
+++ b/mm7_5.cpp	Sun Feb 03 15:36:54 2013 +0000
@@ -13539,7 +13539,7 @@
   pRenderer->DrawTextureTransparent(v1, v12, v14);
   if ( !byte_5C6D50[dword_506528] )
   {
-    v2 = pStru179->field_0[dword_506528];
+    v2 = pStru179.field_0[dword_506528];
     a1.uFrameWidth = 460;
     a1.uFrameX = 8;
     a1.uFrameY = 8;
@@ -13577,7 +13577,7 @@
     dword_50651C = 0;
   }
   dword_506544 = 0;
-  v6 = pStru179->field_0[dword_506528];
+  v6 = pStru179.field_0[dword_506528];
   dword_506548 = 0;
   dword_506520 = 0;
   v7 = *(&pStorylineText->field_0 + 3 * v6);
@@ -13679,10 +13679,10 @@
   dword_506520 = 0;
   while ( v3 < dword_506524 )
   {
-    v4 = pStru179->field_0[v3];
+    v4 = pStru179.field_0[v3];
     ++dword_506520;
-    v5 = (&dword_722F10)[4 * v4];
-    a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_722F10)[4 * v4], 0, 0, 0);
+    v5 = pQuestTable[v4-1];//(&dword_722F10)[4 * v4];
+    a1.DrawText(pAutonoteFont, 1, 0, 0, pQuestTable[v4-1], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0);
     v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0);
     v7 = a1.uFrameY + v6;
     if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight )
@@ -13928,15 +13928,17 @@
     v8 = 0;
     do
     {
-      if ( dword_72371C[2 * v8] == dword_506568 )
-      {
-        v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8];
+      //if ( dword_72371C[2 * v8] == dword_506568 )
+	  if ( pAutonoteTxt[v8-1].eType == dword_506568 )
+      {
+        //v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8];
+		v32 = (char *)pAutonoteTxt[v8-1].pText;
         if ( (short)v8 )
         {
           if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 )
           {
             v9 = dword_506520++;
-            pStru179->field_0[v9] = (signed __int16)v8;
+            pStru179.field_0[v9] = (signed __int16)v8;
           }
         }
       }
@@ -13982,10 +13984,12 @@
   dword_506540 = 0;
   while ( v12 < dword_506524 )
   {
-    v13 = pStru179->field_0[v12];
+    v13 = pStru179.field_0[v12];
     ++dword_506520;
-    v14 = (&dword_723718_autonote_related)[8 * v13];
-    a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0);
+    //v14 = (&dword_723718_autonote_related)[8 * v13];
+	v14 = pAutonoteTxt[v13-1].pText;
+    //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0);
+	a1.DrawText(pAutonoteFont, 1, 0, 0, pAutonoteTxt[v13-1].pText, 0, 0, 0);
     v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0);
     v16 = a1.uFrameY + v15;
     if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight )
@@ -14224,6 +14228,15 @@
   a1.uFrameZ = 467;
   a1.uFrameW = 467;
   a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[186], 3u);
+  if ( pParty->uCurrentHour >= 12 )
+  {
+    if ( pParty->uCurrentHour >= 24 )
+		v2=0;
+	else
+		v2=1;
+  }
+  else
+    v2=0;
   v1 = GetDayPart();
   sprintf(
     pTmpBuf,
@@ -17627,7 +17640,7 @@
   unsigned __int8 v10; // of@7
   stru179 *v11; // edi@9
   int v12; // edx@11
-  int v13; // [sp+Ch] [bp-8h]@2
+  char *v13; // [sp+Ch] [bp-8h]@2
   signed int v14; // [sp+Ch] [bp-8h]@9
   int i; // [sp+10h] [bp-4h]@10
 
@@ -17643,11 +17656,11 @@
   v2 = (unsigned __int8 *)pPlayer->field_152;
   do
   {
-    v13 = dword_723E80_award_related[2 * v1];
+    v13 = (char *)pAwards[v1-1].pText;//dword_723E80_award_related[2 * v1];
     if ( (unsigned __int16)_449B57_test_bit(v2, v1) && v13 )
     {
       v3 = dword_506520++;
-      pStru179->field_0[v3] = v1;
+      pStru179.field_0[v3] = v1;
     }
     ++v1;
   }
@@ -17667,21 +17680,22 @@
       v9 = dword_506524 + v5++;
       v10 = v5 > dword_506524;//__OFSUB__(v5, dword_506524);
       v7 = v5 - dword_506524 < 0;
-      pStru179->field_0[v9] = v8;
+      pStru179.field_0[v9] = v8;
     }
     while ( v7 ^ v10 );
     if ( result > 0 )
     {
       v14 = 1;
-      v11 = pStru179;
+      v11 = &pStru179;
       do
       {
         for ( i = v14; i < result; ++i )
         {
-          v12 = pStru179->field_0[i];
-          if ( dword_723E84[2 * v12] < dword_723E84[2 * v11->field_0[0]] )
-          {
-            pStru179->field_0[i] = v11->field_0[0];
+          v12 = pStru179.field_0[i];
+          //if ( dword_723E84[2 * v12] < dword_723E84[2 * v11->field_0[0]] )
+		  if(pAwards[v12-1].uSort < pAwards[v11->field_0[0]].uSort)
+          {
+            pStru179.field_0[i] = v11->field_0[0];
             v11->field_0[0] = v12;
           }
         }