diff Chest.cpp @ 1414:110eac219e5a

ChestUI_WritePointedObjectStatusString
author Nomad
date Sat, 27 Jul 2013 16:32:20 +0200
parents 204cce84300b
children e11c498c0dc6 a8b1bbac95d4
line wrap: on
line diff
--- a/Chest.cpp	Sat Jul 27 16:09:00 2013 +0200
+++ b/Chest.cpp	Sat Jul 27 16:32:20 2013 +0200
@@ -22,6 +22,7 @@
 #include "ObjectList.h"
 #include "GUIWindow.h"
 #include "Time.h"
+#include "Overlays.h"
 
 #include "mm7_data.h"
 #include "MM7.h"
@@ -195,6 +196,35 @@
   return true;
 }
 
+
+//----- (0042038D) --------------------------------------------------------
+void __cdecl ChestUI_WritePointedObjectStatusString()
+{
+  POINT *v0; // esi@2
+  int v1; // ecx@2
+  const char *v2; // eax@3
+  POINT v3; // [sp+0h] [bp-10h]@2
+  POINT a2; // [sp+8h] [bp-8h]@1
+
+  __debugbreak(); // invalid indexing
+  if ( pMouse->GetCursorPos(&a2)->y < 350 )
+  {
+    v0 = pMouse->GetCursorPos(&a2);
+    v1 = pRenderer->pActiveZBuffer[v0->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v3)->y]];
+    if ( v1 )
+    {
+      auto _w = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C
+                                             + 18 * *((short *)&pChests[0].igChestItems[139].uExpireTime
+                                               + v1 + 2662 * (unsigned int)pChestWindow->ptr_1C + 3));
+
+      _w = (ItemGen *)(&pChests[(unsigned int)pChestWindow->ptr_1C] -32 
+		  + 18 * *((short *)&pChests[(unsigned int)pChestWindow->ptr_1C].igChestItems[139].uExpireTime + v1 + 3));
+      v2 = _w->GetDisplayName();
+      GameUI_SetFooterString(v2);
+    }
+  }
+}
+
 //----- (0042092D) --------------------------------------------------------
 void Chest::DrawChestUI(signed int uChestID)
     {