diff mm7_2.cpp @ 134:6d1f537a1346

Слияние
author Ritor1
date Tue, 13 Nov 2012 20:40:21 +0600
parents d2ca891da89f a64b244da76c
children fcf3209727a4
line wrap: on
line diff
--- a/mm7_2.cpp	Tue Nov 13 20:37:07 2012 +0600
+++ b/mm7_2.cpp	Tue Nov 13 20:40:21 2012 +0600
@@ -11280,7 +11280,7 @@
   v27 = height;
   v23 = 452.0 / (double)width;
   v25 = 336.0 / (double)height;
-  pPixels = (unsigned __int16 *)operator new(2 * height * width);
+  pPixels = (unsigned __int16 *)malloc(2 * height * width);
   v3 = pPixels;
   if ( pRenderer->pRenderD3D )
   {
@@ -11754,16 +11754,17 @@
     pNew_LOD->CreateTempFile();
     pNew_LOD->uNumSubIndices = 0;
     pDir.Reset();
-	for (int i =  pGames_LOD->uNumSubIndices / 2; i < pGames_LOD->uNumSubIndices; ++i)
-   {
-    memcpy(&pDir, (char *)&pGames_LOD->pSubIndices[i], sizeof(pDir));
-    v3 = pGames_LOD->FindContainer((const char *)&pGames_LOD->pSubIndices[i], 1);
-    fread(pSave, pGames_LOD->pSubIndices[i].uDataSize, 1, v3);
-    pNew_LOD->AppendDirectory(&pDir, pSave);
-   }
+
+    for (int i = pGames_LOD->uNumSubIndices / 2; i < pGames_LOD->uNumSubIndices; ++i)
+    {
+      memcpy(&pDir, &pGames_LOD->pSubIndices[i], sizeof(pDir));
+      v3 = pGames_LOD->FindContainer(pGames_LOD->pSubIndices[i].pFilename, 1);
+      fread(pSave, pGames_LOD->pSubIndices[i].uDataSize, 1, v3);
+      pNew_LOD->AppendDirectory(&pDir, pSave);
+    }
     v7.Reset();
     strcpy(pSavegameHeader->pLocationName, "out01.odm");
-    strcpy((char *)&v7, "header.bin");
+    strcpy(v7.pFilename, "header.bin");
     v7.uDataSize = 100;
     pNew_LOD->AppendDirectory(&v7, &pSavegameHeader);
     pNew_LOD->Save();