changeset 416:233f9cfc32a3

Merge
author Gloval
date Sat, 23 Feb 2013 19:35:32 +0400
parents 49158f2cc88d (diff) d8b3056df4e2 (current diff)
children 913675aac25b 88c30918eef7
files
diffstat 13 files changed, 25 insertions(+), 300 deletions(-) [+]
line wrap: on
line diff
--- a/LOD.cpp	Sat Feb 23 17:15:36 2013 +0200
+++ b/LOD.cpp	Sat Feb 23 19:35:32 2013 +0400
@@ -1947,53 +1947,36 @@
 //----- (0046188A) --------------------------------------------------------
 int LOD::File::LoadSubIndices(const char *pContainer)
 {
-  LOD::File *v2; // esi@1
+
   unsigned int uDir; // edi@1
-  int uDir_dup; // ebx@2
-  int result; // eax@5
-  LOD::Directory *v6; // eax@7
-  LOD::Directory *v7; // eax@7
-  __int32 v8; // edx@7
-  FILE *v9; // ST00_4@7
-  LOD::Directory *pSubIndices_dup; // eax@7
+  LOD::Directory *curr_index; // eax@7
 
-  v2 = this;
+
   ResetSubIndices();
   uDir = 0;
-  if ( (signed int)v2->header.uNumIndices <= 0 )
-  {
-LABEL_5:
-    result = 3;
-  }
+
+  if ( header.uNumIndices <= 0)
+	  return 3;
   else
-  {
-    uDir_dup = 0;
-    while ( _strcmpi(pContainer, (const char *)&v2->pRoot[uDir_dup]) )
-    {
-      ++uDir;
-      ++uDir_dup;
-      if ( (signed int)uDir >= (signed int)v2->header.uNumIndices )
-        goto LABEL_5;
-    }
-    strcpy((char *)v2->pContainerName, pContainer);
-    v6 = v2->pRoot;
-    v2->uCurrentIndexDir = uDir;
-    v7 = &v6[uDir];
-    v8 = v7->uOfsetFromSubindicesStart;
-    v2->uOffsetToSubIndex = v8;
-    v9 = v2->pFile;
-    v2->uNumSubIndices = v7->uNumSubIndices;
-    fseek(v9, v8, 0);
-    pSubIndices_dup = (LOD::Directory *)pAllocator->AllocNamedChunk(
-                                        v2->pSubIndices,
-                                        32 * (v2->uNumSubIndices + 5),
-                                        "LOD Index");
-    v2->pSubIndices = pSubIndices_dup;
-    if ( pSubIndices_dup )
-      fread(pSubIndices_dup, 0x20u, v2->uNumSubIndices, v2->pFile);
-    result = 0;
-  }
-  return result;
+	  {
+	  while (stricmp(pContainer, pRoot[uDir].pFilename))
+		  {
+		  ++uDir;  
+		  if (uDir >=  header.uNumIndices )
+			  return 3;
+		  }
+	  strcpy( pContainerName, pContainer);
+	  uCurrentIndexDir = uDir;
+	  curr_index=(LOD::Directory *)&pRoot[uDir];
+	  uOffsetToSubIndex =curr_index->uOfsetFromSubindicesStart ;
+	  uNumSubIndices =curr_index->uNumSubIndices;// *(_WORD *)(v8 + 28);
+	  fseek( pFile, uOffsetToSubIndex, 0);
+	  pSubIndices = (LOD::Directory *)pAllocator->AllocNamedChunk(pSubIndices, sizeof(LOD::Directory)*(uNumSubIndices + 5), "LOD Index");
+
+	  if ( pSubIndices)
+		  fread( pSubIndices, sizeof(LOD::Directory),  uNumSubIndices,  pFile);
+	  return 0;
+	  }
 }
 
 //----- (004617D5) --------------------------------------------------------
--- a/lib/legacy_dx/lib/.svn/all-wcprops	Sat Feb 23 17:15:36 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 40
-/svn/bb7/!svn/ver/289/libs/legacy_dx/lib
-END
-dinput8.lib
-K 25
-svn:wc:ra_dav:version-url
-V 52
-/svn/bb7/!svn/ver/289/libs/legacy_dx/lib/dinput8.lib
-END
-ddraw.lib
-K 25
-svn:wc:ra_dav:version-url
-V 50
-/svn/bb7/!svn/ver/289/libs/legacy_dx/lib/ddraw.lib
-END
-dinput.lib
-K 25
-svn:wc:ra_dav:version-url
-V 51
-/svn/bb7/!svn/ver/289/libs/legacy_dx/lib/dinput.lib
-END
-dxguid.lib
-K 25
-svn:wc:ra_dav:version-url
-V 51
-/svn/bb7/!svn/ver/289/libs/legacy_dx/lib/dxguid.lib
-END
-d3dxof.lib
-K 25
-svn:wc:ra_dav:version-url
-V 51
-/svn/bb7/!svn/ver/289/libs/legacy_dx/lib/d3dxof.lib
-END
--- a/lib/legacy_dx/lib/.svn/entries	Sat Feb 23 17:15:36 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-10
-
-dir
-316
-http://svn2.assembla.com/svn/bb7/libs/legacy_dx/lib
-http://svn2.assembla.com/svn/bb7
-
-
-
-2010-12-18T21:09:41.003199Z
-289
-Feaerenil
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0b0191bc-8333-4b8d-b53c-6b3aa212730c
-
-dinput8.lib
-file
-
-
-
-
-2004-09-03T13:18:30.000000Z
-a9300cdf7a34c7da7be2117e099e15a7
-2010-12-18T21:09:41.003199Z
-289
-Feaerenil
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-173542
-
-ddraw.lib
-file
-
-
-
-
-2004-09-06T18:58:26.000000Z
-77752b153225ae97f64688aa5c16db31
-2010-12-18T21:09:41.003199Z
-289
-Feaerenil
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-4540
-
-dinput.lib
-file
-
-
-
-
-2004-09-03T13:18:30.000000Z
-21f11641cd6d0b29f2979fcad555a81e
-2010-12-18T21:09:41.003199Z
-289
-Feaerenil
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-161464
-
-dxguid.lib
-file
-
-
-
-
-2005-05-26T12:11:04.000000Z
-b5d00b6a24df5706d25ae59b9ff77658
-2010-12-18T21:09:41.003199Z
-289
-Feaerenil
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-408632
-
-d3dxof.lib
-file
-
-
-
-
-2004-09-29T14:47:54.000000Z
-f17de8653cb71aa503a45d7908a6c296
-2010-12-18T21:09:41.003199Z
-289
-Feaerenil
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1746
-
--- a/lib/legacy_dx/lib/.svn/prop-base/d3dxof.lib.svn-base	Sat Feb 23 17:15:36 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
--- a/lib/legacy_dx/lib/.svn/prop-base/ddraw.lib.svn-base	Sat Feb 23 17:15:36 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
--- a/lib/legacy_dx/lib/.svn/prop-base/dinput.lib.svn-base	Sat Feb 23 17:15:36 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
--- a/lib/legacy_dx/lib/.svn/prop-base/dinput8.lib.svn-base	Sat Feb 23 17:15:36 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
--- a/lib/legacy_dx/lib/.svn/prop-base/dxguid.lib.svn-base	Sat Feb 23 17:15:36 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
Binary file lib/legacy_dx/lib/.svn/text-base/d3dxof.lib.svn-base has changed
Binary file lib/legacy_dx/lib/.svn/text-base/ddraw.lib.svn-base has changed
Binary file lib/legacy_dx/lib/.svn/text-base/dinput.lib.svn-base has changed
Binary file lib/legacy_dx/lib/.svn/text-base/dinput8.lib.svn-base has changed
Binary file lib/legacy_dx/lib/.svn/text-base/dxguid.lib.svn-base has changed