diff LOD.cpp @ 1439:468f434a8d8a

Слияние
author Ritor1
date Mon, 22 Jul 2013 18:00:58 +0600
parents c0b273d33338
children 934074e7fcc1
line wrap: on
line diff
--- a/LOD.cpp	Mon Jul 22 18:00:34 2013 +0600
+++ b/LOD.cpp	Mon Jul 22 18:00:58 2013 +0600
@@ -74,121 +74,73 @@
     field_ECA0 = uNumLoadedSprites;
 }
 
-
-
 //----- (004355F7) --------------------------------------------------------
-void LODFile_IconsBitmaps::_4355F7()
+void LODFile_IconsBitmaps::RemoveTexturesFromTextureList()
 {
-  LODFile_IconsBitmaps *v1; // esi@1
-  int v2; // edi@2
-  Texture *v3; // ebp@3
-  struct IDirect3DTexture2 **v4; // eax@4
-  struct IDirect3DTexture2 *v5; // eax@5
-  struct IDirectDrawSurface **v6; // eax@7
-  struct IDirectDrawSurface *v7; // eax@8
-  int v8; // eax@11
-
-  v1 = this;
   if ( this->uTexturePacksCount )
   {
-    v2 = this->uNumLoadedFiles - 1;
-    if ( v2 >= this->uNumPrevLoadedFiles )
+    if ( (this->uNumLoadedFiles - 1) >= this->uNumPrevLoadedFiles )
     {
-      v3 = &this->pTextures[v2];
-      do
+      for ( uint i = this->uNumLoadedFiles - 1; i >= this->uNumPrevLoadedFiles; --i )
       {
-        v3->Release();
-        v4 = v1->pHardwareTextures;
-        if ( v4 )
+        this->pTextures[i].Release();
+        if ( this->pHardwareTextures )
         {
-          v5 = v4[v2];
-          if ( v5 )
+          if ( this->pHardwareTextures[i] )
           {
-            v5->Release();
-            v1->pHardwareTextures[v2] = 0;
+            this->pHardwareTextures[i]->Release();
+            this->pHardwareTextures[i] = 0;
           }
         }
-        v6 = v1->pHardwareSurfaces;
-        if ( v6 )
+        if ( this->pHardwareSurfaces )
         {
-          v7 = v6[v2];
-          if ( v7 )
+          if ( this->pHardwareSurfaces[i] )
           {
-            v7->Release();
-            v1->pHardwareSurfaces[v2] = 0;
+            this->pHardwareSurfaces[i]->Release();
+            this->pHardwareSurfaces[i] = 0;
           }
         }
-        --v2;
-        --v3;
       }
-      while ( v2 >= v1->uNumPrevLoadedFiles );
     }
-    v8 = v1->uNumPrevLoadedFiles;
-    v1->uNumPrevLoadedFiles = 0;
-    v1->uNumLoadedFiles = v8;
-    v1->uTexturePacksCount = 0;
+    this->uNumLoadedFiles = this->uNumPrevLoadedFiles;
+    this->uNumPrevLoadedFiles = 0;
+    this->uTexturePacksCount = 0;
   }
 }
 
 //----- (004114F2) --------------------------------------------------------
-void LODFile_IconsBitmaps::_4114F2()
+void LODFile_IconsBitmaps::RemoveTexturesPackFromTextureList()
 {
-  LODFile_IconsBitmaps *v1; // esi@1
-  int *pTexturePacksCount; // eax@1
-  int v3; // ecx@1
-  int v4; // ecx@2
-  int v5; // edi@3
-  Texture *v6; // ebx@4
-  struct IDirect3DTexture2 **v7; // eax@5
-  struct IDirect3DTexture2 *v8; // eax@6
-  struct IDirectDrawSurface **v9; // eax@8
-  struct IDirectDrawSurface *v10; // eax@9
-  int v11; // eax@12
-
-  v1 = this;
-  pTexturePacksCount = &this->uTexturePacksCount;
-  v3 = this->uTexturePacksCount;
-  if ( v3 )
+  if ( this->uTexturePacksCount )
   {
-    v4 = v3 - 1;
-    *pTexturePacksCount = v4;
-    if ( !v4 )
+    this->uTexturePacksCount--;
+    if ( !this->uTexturePacksCount )
     {
-      v5 = v1->uNumLoadedFiles - 1;
-      if ( v5 >= v1->uNumPrevLoadedFiles )
+      if ( (this->uNumLoadedFiles - 1) >= this->uNumPrevLoadedFiles )
       {
-        v6 = &v1->pTextures[v5];
-        do
+        for ( uint i = this->uNumLoadedFiles - 1; i >= this->uNumPrevLoadedFiles; --i )
         {
-          v6->Release();
-          v7 = v1->pHardwareTextures;
-          if ( v7 )
+          this->pTextures[i].Release();
+          if ( this->pHardwareTextures )
           {
-            v8 = v7[v5];
-            if ( v8 )
+            if ( this->pHardwareTextures[i] )
             {
-              v8->Release();
-              v1->pHardwareTextures[v5] = 0;
+              this->pHardwareTextures[i]->Release();
+              this->pHardwareTextures[i] = 0;
             }
           }
-          v9 = v1->pHardwareSurfaces;
-          if ( v9 )
+          if ( this->pHardwareSurfaces )
           {
-            v10 = v9[v5];
-            if ( v10 )
+            if ( this->pHardwareSurfaces[i] )
             {
-              v10->Release();
-              v1->pHardwareSurfaces[v5] = 0;
+              this->pHardwareSurfaces[i]->Release();
+              this->pHardwareSurfaces[i] = 0;
             }
           }
-          --v5;
-          --v6;
         }
-        while ( v5 >= v1->uNumPrevLoadedFiles );
       }
-      v11 = v1->uNumPrevLoadedFiles;
-      v1->uNumPrevLoadedFiles = 0;
-      v1->uNumLoadedFiles = v11;
+      this->uNumLoadedFiles = this->uNumPrevLoadedFiles;
+      this->uNumPrevLoadedFiles = 0;
     }
   }
 }