diff ObjectList.cpp @ 1306:13b7be8b06a0

Слияние
author Ritor1
date Sun, 23 Jun 2013 14:27:57 +0600
parents dcc52e17b517 c423f946dc99
children 7ef4b64f6329
line wrap: on
line diff
--- a/ObjectList.cpp	Sun Jun 23 14:27:32 2013 +0600
+++ b/ObjectList.cpp	Sun Jun 23 14:27:57 2013 +0600
@@ -1,9 +1,36 @@
 #include "ObjectList.h"
 #include "mm7_data.h"
 #include "Sprites.h"
+#include "FrameTableInc.h"
 #include "Allocator.h"
-#include "FrameTableInc.h"
+
+//----- (0042EB42) --------------------------------------------------------
+__int16 ObjectList::ObjectIDByItemID(unsigned __int16 uItemID)
+{
+  unsigned int v2; // edx@1
+  signed int v3; // eax@1
+  char *v4; // ecx@2
 
+  v2 = this->uNumObjects;
+  v3 = 0;
+  if ( (signed int)this->uNumObjects <= 0 )
+  {
+LABEL_5:
+    LOWORD(v3) = 0;
+  }
+  else
+  {
+    v4 = (char *)&this->pObjects->uObjectID;
+    while ( uItemID != *(short *)v4 )
+    {
+      ++v3;
+      v4 += 56;
+      if ( v3 >= (signed int)v2 )
+        goto LABEL_5;
+    }
+  }
+  return v3;
+}
 //----- (00459064) --------------------------------------------------------
 void ObjectList::InitializeSprites()
 {