comparison LOD.cpp @ 1635:04cae215a13c

Слияние
author Ritor1
date Tue, 17 Sep 2013 16:30:43 +0600
parents 8094f1706b1f
children 780dd567f1da
comparison
equal deleted inserted replaced
1634:08ebd0fee604 1635:04cae215a13c
2149 pDst = (Texture *)v5->uTextureSize; 2149 pDst = (Texture *)v5->uTextureSize;
2150 v6 = v5->uDecompressedSize; 2150 v6 = v5->uDecompressedSize;
2151 v5->pLevelOfDetail0_prolly_alpha_mask = 0; 2151 v5->pLevelOfDetail0_prolly_alpha_mask = 0;
2152 if ( v6 ) 2152 if ( v6 )
2153 { 2153 {
2154 v7 = operator new(v6); 2154 v7 = malloc(v6);
2155 v8 = v5->uTextureSize; 2155 v8 = v5->uTextureSize;
2156 v5->pLevelOfDetail0_prolly_alpha_mask = (unsigned __int8 *)v7; 2156 v5->pLevelOfDetail0_prolly_alpha_mask = (unsigned __int8 *)v7;
2157 pContainer = (const char *)operator new(v8); 2157 pContainer = (const char *)malloc(v8);
2158 fread((void *)pContainer, 1u, (size_t)pDst, File); 2158 fread((void *)pContainer, 1u, (size_t)pDst, File);
2159 zlib::MemUnzip(v5->pLevelOfDetail0_prolly_alpha_mask, &v5->uDecompressedSize, pContainer, v5->uTextureSize); 2159 zlib::MemUnzip(v5->pLevelOfDetail0_prolly_alpha_mask, &v5->uDecompressedSize, pContainer, v5->uTextureSize);
2160 v9 = (void *)pContainer; 2160 v9 = (void *)pContainer;
2161 v5->uTextureSize = v5->uDecompressedSize; 2161 v5->uTextureSize = v5->uDecompressedSize;
2162 free(v9); 2162 free(v9);
2163 } 2163 }
2164 else 2164 else
2165 { 2165 {
2166 v10 = (unsigned __int8 *)operator new(0); 2166 v10 = (unsigned __int8 *)malloc(0);
2167 v11 = File; 2167 v11 = File;
2168 v5->pLevelOfDetail0_prolly_alpha_mask = v10; 2168 v5->pLevelOfDetail0_prolly_alpha_mask = v10;
2169 fread(v10, 1u, (size_t)pDst, v11); 2169 fread(v10, 1u, (size_t)pDst, v11);
2170 } 2170 }
2171 v5->pPalette24 = 0; 2171 v5->pPalette24 = 0;
2172 if ( uTextureType == 1 ) 2172 if ( uTextureType == 1 )
2173 { 2173 {
2174 v12 = operator new(0x300u); 2174 v12 = malloc(0x300u);
2175 v13 = File; 2175 v13 = File;
2176 v5->pPalette24 = (unsigned __int8 *)v12; 2176 v5->pPalette24 = (unsigned __int8 *)v12;
2177 fread(v12, 1u, 0x300u, v13); 2177 fread(v12, 1u, 0x300u, v13);
2178 LABEL_10: 2178 LABEL_10:
2179 v5->pPalette16 = 0; 2179 v5->pPalette16 = 0;
2181 } 2181 }
2182 if ( uTextureType != 2 ) 2182 if ( uTextureType != 2 )
2183 goto LABEL_10; 2183 goto LABEL_10;
2184 v18 = 0; 2184 v18 = 0;
2185 v5->pPalette16 = 0; 2185 v5->pPalette16 = 0;
2186 v5->pPalette16 = (unsigned __int16 *)operator new(0x400u); 2186 v5->pPalette16 = (unsigned __int16 *)malloc(0x400u);
2187 do 2187 do
2188 { 2188 {
2189 fread((char *)&pContainer + 3, 1u, 1u, File); 2189 fread((char *)&pContainer + 3, 1u, 1u, File);
2190 fread((char *)&uTextureType + 3, 1u, 1u, File); 2190 fread((char *)&uTextureType + 3, 1u, 1u, File);
2191 v19 = fread((char *)&pDst + 3, 1u, 1u, File); 2191 v19 = fread((char *)&pDst + 3, 1u, 1u, File);
2341 &v1->pHardwareTextures[v2]); 2341 &v1->pHardwareTextures[v2]);
2342 } 2342 }
2343 else 2343 else
2344 { 2344 {
2345 v4 = strlen(v3 - 2); 2345 v4 = strlen(v3 - 2);
2346 v5 = (char *)operator new(v4 + 2); 2346 v5 = (char *)malloc(v4 + 2);
2347 *v5 = 'h'; 2347 *v5 = 'h';
2348 strcpy(v5 + 1, v3 - 2); 2348 strcpy(v5 + 1, v3 - 2);
2349 pRenderer->LoadTexture( 2349 pRenderer->LoadTexture(
2350 v5, 2350 v5,
2351 *((short *)v3 + 17), 2351 *((short *)v3 + 17),
2608 &pHardwareTextures[v14]); 2608 &pHardwareTextures[v14]);
2609 } 2609 }
2610 else 2610 else
2611 { 2611 {
2612 v11 = strlen(pContainer); 2612 v11 = strlen(pContainer);
2613 v12 = (enum TEXTURE_TYPE)(int)operator new(v11 + 2); 2613 v12 = (enum TEXTURE_TYPE)(int)malloc(v11 + 2);
2614 eTextureType = v12; 2614 eTextureType = v12;
2615 *(char *)v12 = 104; 2615 *(char *)v12 = 104;
2616 strcpy((char *)(v12 + 1), pContainer); 2616 strcpy((char *)(v12 + 1), pContainer);
2617 v13 = pRenderer->LoadTexture( 2617 v13 = pRenderer->LoadTexture(
2618 (const char *)eTextureType, 2618 (const char *)eTextureType,