diff mm7_4.cpp @ 1583:75fafd8ced59

Allocator (CMemory) bye-bye
author Nomad
date Tue, 10 Sep 2013 21:07:07 +0200
parents 9f8b3e904e14
children e42073046f92
line wrap: on
line diff
--- a/mm7_4.cpp	Tue Sep 10 18:43:52 2013 +0200
+++ b/mm7_4.cpp	Tue Sep 10 21:07:07 2013 +0200
@@ -24,7 +24,6 @@
 #include "IndoorCamera.h"
 #include "LOD.h"
 #include "Actor.h"
-#include "Allocator.h"
 #include "Events.h"
 #include "Viewport.h"
 #include "FrameTableInc.h"
@@ -397,38 +396,12 @@
 }
 
 //----- (00487DA9) --------------------------------------------------------
-void  sub_487DA9()
+void sub_487DA9()
 {
   for (int i = 0; i < 20000; ++i)
     array_77EC08[i].field_108 = 0;
 }
 
-//----- (00487DBE) --------------------------------------------------------
-void Software_ResetNewEdges()
-{
-  int v0; // ecx@1
-  Edge **v1; // eax@1
-  signed int v2; // eax@3
-
-  v0 = 0;
-  v1 = ptr_80CA10.data();
-  do
-  {
-    ++v0;
-    *((int *)&pNewEdges[v0] - 9) = (int)&defaultEdge;
-    *v1 = 0;
-    ++v1;
-  }
-  while ( (signed int)v1 < (signed int)&unk_80D190 );
-  v2 = 2000;
-  do
-  {
-    pSurfs->field_22 = 0;
-    --v2;
-  }
-  while ( v2 );
-}
-
 //----- (0048A959) --------------------------------------------------------
 unsigned int ReplaceHSV(unsigned int uColor, float h_replace, float s_replace, float v_replace)
 {
@@ -1571,7 +1544,7 @@
   assert(uNumFrames);
   assert(!num_mm8_frames);
 
-  pFrames = (PlayerFrame *)pAllocator->AllocNamedChunk(pFrames, uNumFrames * sizeof(PlayerFrame), "P Frames");
+  pFrames = (PlayerFrame *)malloc(uNumFrames * sizeof(PlayerFrame));
   memcpy(pFrames,                                   (char *)data_mm7 + 4, num_mm7_frames * sizeof(PlayerFrame));
   memcpy(pFrames + num_mm7_frames,                  (char *)data_mm6 + 4, num_mm6_frames * sizeof(PlayerFrame));
   memcpy(pFrames + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 4, num_mm8_frames * sizeof(PlayerFrame));
@@ -1634,7 +1607,7 @@
     v4 = v25;
   }
   v2->uNumFrames = v4;
-  v5 = pAllocator->AllocNamedChunk(v2->pFrames, 10 * v4, "P Frames");
+  v5 = malloc(10 * v4);
   v2->pFrames = (PlayerFrame *)v5;
   if ( !v5 )
     Error("PlayerFrameTable::load - Out of Memory!");