diff LOD.cpp @ 710:735dab8d3c9a

Town portal screen + misc gui const replacements
author Nomad
date Thu, 21 Mar 2013 20:30:17 +0200
parents e39702f35283
children 700b58aac975
line wrap: on
line diff
--- a/LOD.cpp	Thu Mar 21 12:37:49 2013 +0200
+++ b/LOD.cpp	Thu Mar 21 20:30:17 2013 +0200
@@ -2370,15 +2370,15 @@
   strcpy(v5->pName, pContainer);
   pDst = (Texture *)v5->uTextureSize;
   v6 = v5->uDecompressedSize;
-  v5->pLevelOfDetail0 = 0;
+  v5->pLevelOfDetail0_prolly_alpha_mask = 0;
   if ( v6 )
   {
     v7 = operator new(v6);
     v8 = v5->uTextureSize;
-    v5->pLevelOfDetail0 = (unsigned __int8 *)v7;
+    v5->pLevelOfDetail0_prolly_alpha_mask = (unsigned __int8 *)v7;
     pContainer = (const char *)operator new(v8);
     fread((void *)pContainer, 1u, (size_t)pDst, File);
-    zlib::MemUnzip(v5->pLevelOfDetail0, &v5->uDecompressedSize, pContainer, v5->uTextureSize);
+    zlib::MemUnzip(v5->pLevelOfDetail0_prolly_alpha_mask, &v5->uDecompressedSize, pContainer, v5->uTextureSize);
     v9 = (void *)pContainer;
     v5->uTextureSize = v5->uDecompressedSize;
     free(v9);
@@ -2387,7 +2387,7 @@
   {
     v10 = (unsigned __int8 *)operator new(0);
     v11 = File;
-    v5->pLevelOfDetail0 = v10;
+    v5->pLevelOfDetail0_prolly_alpha_mask = v10;
     fread(v10, 1u, (size_t)pDst, v11);
   }
   v5->pPalette24 = 0;
@@ -2423,7 +2423,7 @@
   if ( v5->pBits & 2 )
   {
     v14 = v5->uSizeOfMaxLevelOfDetail;
-    v15 = (int)&v5->pLevelOfDetail0[v14];
+    v15 = (int)&v5->pLevelOfDetail0_prolly_alpha_mask[v14];
     v5->pLevelOfDetail1 = (unsigned __int8 *)v15;
     v16 = (v14 >> 2) + v15;
     v5->pLevelOfDetail2 = (unsigned __int8 *)v16;
@@ -2701,7 +2701,7 @@
   v5 = FindContainer(pContainer, 0);
   File = v5;
   if ( v5
-    && (v6 = pDst, pDst->pLevelOfDetail0)
+    && (v6 = pDst, pDst->pLevelOfDetail0_prolly_alpha_mask)
     && mode == 2
     && pDst->pPalette16
     && !pDst->pPalette24
@@ -2715,7 +2715,7 @@
     v10 = &pDst->uDecompressedSize;
     if ( !pDst->uDecompressedSize || v4->dword_011BA4 )
     {
-      fread(pDst->pLevelOfDetail0, 1u, v8, File);
+      fread(pDst->pLevelOfDetail0_prolly_alpha_mask, 1u, v8, File);
     }
     else
     {
@@ -2725,7 +2725,7 @@
       zlib::MemUnzip(Sourcea, &v6->uDecompressedSize, DstBufa, v6->uTextureSize);
       v6->uTextureSize = *v10;
       free(DstBufa);
-      memcpy(v6->pLevelOfDetail0, Sourcea, *v10);
+      memcpy(v6->pLevelOfDetail0_prolly_alpha_mask, Sourcea, *v10);
       free(Sourcea);
     }
     v11 = 0;
@@ -2851,8 +2851,8 @@
   if ( !v8->uDecompressedSize || dword_011BA4 )
   {
     v20 = pAllocator;
-    v32 = pAllocator->AllocNamedChunk(v8->pLevelOfDetail0, v15, v8->pName);
-    v8->pLevelOfDetail0 = (unsigned __int8 *)v32;
+    v32 = pAllocator->AllocNamedChunk(v8->pLevelOfDetail0_prolly_alpha_mask, v15, v8->pName);
+    v8->pLevelOfDetail0_prolly_alpha_mask = (unsigned __int8 *)v32;
     fread(v32, 1u, (size_t)pOutTex, pFile);
   }
   else
@@ -2871,10 +2871,10 @@
       pOutTex = (Texture *)(((signed int)v8->uSizeOfMaxLevelOfDetail >> 2)
                           + ((signed int)v8->uSizeOfMaxLevelOfDetail >> 4)
                           + ((signed int)v8->uSizeOfMaxLevelOfDetail >> 6));
-      v21 = pAllocator->AllocNamedChunk(v8->pLevelOfDetail0, (unsigned int)pOutTex, v8->pName);
+      v21 = pAllocator->AllocNamedChunk(v8->pLevelOfDetail0_prolly_alpha_mask, (unsigned int)pOutTex, v8->pName);
       v22 = (size_t)pOutTex;
       v23 = &pContainer[v8->uTextureWidth * v8->uTextureHeight];
-      v8->pLevelOfDetail0 = (unsigned __int8 *)v21;
+      v8->pLevelOfDetail0_prolly_alpha_mask = (unsigned __int8 *)v21;
       memcpy(v21, v23, v22);
       v8->uTextureWidth = (signed __int16)v8->uTextureWidth >> 1;
       v24 = v8->uTextureWidth;
@@ -2894,9 +2894,9 @@
     {
       v29 = *v16;
       v20 = pAllocator;
-      v30 = pAllocator->AllocNamedChunk(v8->pLevelOfDetail0, v29, v8->pName);
+      v30 = pAllocator->AllocNamedChunk(v8->pLevelOfDetail0_prolly_alpha_mask, v29, v8->pName);
       v31 = v8->uDecompressedSize;
-      v8->pLevelOfDetail0 = (unsigned __int8 *)v30;
+      v8->pLevelOfDetail0_prolly_alpha_mask = (unsigned __int8 *)v30;
       memcpy(v30, pContainer, v31);
     }
     free((void *)pContainer);
@@ -2937,7 +2937,7 @@
   if ( v8->pBits & 2 )
   {
     v34 = v8->uSizeOfMaxLevelOfDetail;
-    v35 = &v8->pLevelOfDetail0[v34];
+    v35 = &v8->pLevelOfDetail0_prolly_alpha_mask[v34];
     v8->pLevelOfDetail1 = v35;
     v36 = &v35[v34 >> 2];
     v8->pLevelOfDetail2 = v36;