diff _deleted.cpp @ 2020:b123afb8246b

WritePointedObjectStatusString() clear
author Ritor1
date Mon, 11 Nov 2013 22:03:16 +0600
parents 30c2b575d25c
children b2a434d65344
line wrap: on
line diff
--- a/_deleted.cpp	Mon Nov 11 21:01:54 2013 +0600
+++ b/_deleted.cpp	Mon Nov 11 22:03:16 2013 +0600
@@ -13838,4 +13838,211 @@
   };
   #undef CASE
 }
+
+//----- (0046A99B) --------------------------------------------------------
+int  sub_46A99B()
+{
+  int v0; // ebx@1
+  signed int v1; // ecx@1
+  signed int v2; // esi@1
+  int v3; // edx@1
+  signed int v4; // eax@1
+  int v5; // ecx@2
+  int *v6; // eax@3
+  int v7; // ecx@3
+  int v8; // edx@5
+  int v9; // edi@6
+  unsigned __int8 v10; // zf@14
+  char v11; // sf@14
+  char v12; // of@14
+  int *v14; // esi@19
+  signed int v15; // ebx@19
+  int i; // edi@20
+  int v17; // ecx@21
+  int v18; // edi@26
+  int v19; // esi@27
+  unsigned int v20; // ecx@27
+  BLVFace *v21; // eax@32
+  unsigned int v22; // ecx@33
+  const char *v23; // eax@35
+  const char *v24; // ecx@36
+  LevelDecoration *v25; // ecx@43
+  LevelDecoration *v26; // edi@43
+  __int16 v27; // ax@43
+  int v28; // [sp+Ch] [bp-18h]@1
+  int v29; // [sp+14h] [bp-10h]@2
+  int v30; // [sp+18h] [bp-Ch]@1
+  signed int v31; // [sp+1Ch] [bp-8h]@3
+  int v32; // [sp+20h] [bp-4h]@1
+
+  v0 = 0;
+  v1 = (signed int)(viewparams->uScreen_BttmR_Y + viewparams->uScreen_topL_Y) >> 1;
+  v2 = (signed int)(viewparams->uScreen_topL_X + viewparams->uScreen_BttmR_X) >> 1;
+  v3 = v1 - 50;
+  v32 = 0;
+  v4 = 100;
+  v30 = v1 - 50;
+  v28 = v1 + 50;
+  if ( v1 - 50 >= v1 + 50 )
+    return 0;
+  v5 = 640 * v3;
+  v29 = 640 * v3;
+  while ( 2 )
+  {
+    v6 = &pRenderer->pActiveZBuffer[v2 + v5 - v4 / 2]-1;
+    v7 = v0;
+    //while ( 1 )
+    for( int i = 0; i < 100; i++)
+	{
+	  ++v6;
+      v8 = *v6;
+      if ( (unsigned int)*v6 <= 0x2000000 )
+      {
+        v9 = 0;
+        if ( v7 > 0 )
+        {
+          do
+          {
+            if ( dword_7201B0_zvalues[v9] == (unsigned __int16)v8 )
+              break;
+            ++v9;
+          }
+          while ( v9 < v0 );
+        }
+        if ( v9 == v0 )
+        {
+          if ( v8 & 7 )
+          {
+            dword_720020_zvalues[v7] = v8;
+            dword_7201B0_zvalues[v7] = (unsigned __int16)v8;
+            ++v7;
+            ++v0;
+            v32 = v0;
+            if ( v7 == 99 )
+            {
+              v12 = 0;
+              v10 = v0 == 0;
+              v11 = v0 < 0;
+              goto LABEL_18;
+            }
+          }
+        }
+      }
+     }
+    v4 = -1;
+    ++v30;
+    v5 = v29 + 640;
+    v29 += 640;
+    if ( v30 >= v28 )
+      break;
+  }
+  v12 = 0;
+  v10 = v0 == 0;
+  v11 = v0 < 0;
+  if ( !v0 )
+    return 0;
+LABEL_18:
+  if ( !((unsigned __int8)(v11 ^ v12) | v10) )
+  {
+    v14 = dword_720020_zvalues.data();
+    v15 = 1;
+    do
+    {
+      for ( i = v15; i < v32; ++i )
+      {
+        v17 = dword_720020_zvalues[i];
+        if ( v17 < *v14 )
+        {
+          dword_720020_zvalues[i] = *v14;
+          *v14 = v17;
+        }
+      }
+      ++v15;
+      ++v14;
+    }
+    while ( v15 - 1 < v32 );
+    v0 = v32;
+  }
+  v18 = 0;
+  if ( v0 <= 0 )
+    return 0;
+  while ( 1 )
+  {
+    v19 = dword_720020_zvalues[v18] & 0xFFFF;
+    v20 = PID_ID(dword_720020_zvalues[v18]);
+    if ( PID_TYPE(dword_720020_zvalues[v18]) == OBJECT_Item)
+    {
+      if ( v20 >= 0x3E8 )
+        return 0;
+      if ( !(pSpriteObjects[v20].uAttributes & 0x10) )
+      {
+        v23 = pSpriteObjects[v20].stru_24.GetDisplayName();
+        v24 = v23;
+	    GameUI_SetFooterString(v24);
+	    return v19;
+      }
+    }
+    else
+	{
+		if ( PID_TYPE(dword_720020_zvalues[v18]) == OBJECT_Actor)
+		{
+		  if ( v20 >= 0xBB8 )
+			return 0;
+		  v24 = (const char *)&pActors[v20];
+		  GameUI_SetFooterString(v24);
+		  return v19;
+		}
+		if ( PID_TYPE(dword_720020_zvalues[v18]) == OBJECT_Decoration)
+		  break;
+		if ( PID_TYPE(dword_720020_zvalues[v18]) == OBJECT_BModel)
+		{
+		  if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
+		  {
+			v21 = &pIndoor->pFaces[v20];
+			if ( BYTE3(v21->uAttributes) & 2 )
+				v22 = pIndoor->pFaceExtras[v21->uFaceExtraID].uEventID;
+		  }
+		  else
+		  {
+			if ( (dword_720020_zvalues[v18] & 0xFFFFu) >> 9 < pOutdoor->uNumBModels )
+			{
+				v22 = pOutdoor->pBModels[(dword_720020_zvalues[v18] & 0xFFFFu) >> 9].pFaces[v20 & 0x3F].sCogTriggeredID;
+				if ( v22 )
+				{
+					v23 = GetEventHintString(v22);
+					if ( v23 )
+					{
+						v24 = v23;
+						GameUI_SetFooterString(v24);
+						return v19;
+					}
+				}
+			}
+		  }
+		}
+	}
+	++v18;
+    if ( v18 >= v0 )
+      return 0;
+  }
+  v25 = &pLevelDecorations[v20];
+  v26 = v25;
+  v27 = pLevelDecorations[v20].uEventID;
+  if ( v27 )
+  {
+    v23 = GetEventHintString(v27);
+    if ( !v23 )
+      return v19;
+	v24 = v23;
+	GameUI_SetFooterString(v24);
+	return v19;
+  }
+  if ( v25->IsInteractive() )
+    v24 = pNPCTopics[stru_5E4C90_MapPersistVars._decor_events[v26->_idx_in_stru123 - 75] + 379].pTopic;
+  else
+    v24 = pDecorationList->pDecorations[v26->uDecorationDescID].field_20;
+  GameUI_SetFooterString(v24);
+  return v19;
+}
+
 */
\ No newline at end of file