diff NPC.cpp @ 1583:75fafd8ced59

Allocator (CMemory) bye-bye
author Nomad
date Tue, 10 Sep 2013 21:07:07 +0200
parents 61458df2cb4f
children e42073046f92
line wrap: on
line diff
--- a/NPC.cpp	Tue Sep 10 18:43:52 2013 +0200
+++ b/NPC.cpp	Tue Sep 10 21:07:07 2013 +0200
@@ -2,7 +2,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 #endif
 
-#include "Allocator.h"
 #include "texts.h"
 #include "LOD.h"
 #include "Autonotes.h"
@@ -248,7 +247,7 @@
 	int decode_step;
 
 	if (pNPCTextTXT_Raw)
-		pAllocator->FreeChunk(pNPCTextTXT_Raw);
+		free(pNPCTextTXT_Raw);
 	pNPCTextTXT_Raw =NULL;
 	pNPCTextTXT_Raw = (char *)pEvents_LOD->LoadRaw("npctext.txt", 0);
 	strtok(pNPCTextTXT_Raw, "\r");
@@ -286,7 +285,7 @@
 		}
 
 	if (pNPCTopicTXT_Raw)
-		pAllocator->FreeChunk(pNPCTopicTXT_Raw);
+		free(pNPCTopicTXT_Raw);
 	pNPCTopicTXT_Raw =NULL;
 	pNPCTopicTXT_Raw = (char *)pEvents_LOD->LoadRaw("npctopic.txt", 0);
 	strtok(pNPCTopicTXT_Raw, "\r");
@@ -324,7 +323,7 @@
 		}
 
 	if (pNPCDistTXT_Raw)
-		pAllocator->FreeChunk(pNPCDistTXT_Raw);
+		free(pNPCDistTXT_Raw);
 	pNPCDistTXT_Raw = NULL;
 	pNPCDistTXT_Raw = (char *)pEvents_LOD->LoadRaw("npcdist.txt", 0);
 	strtok(pNPCDistTXT_Raw, "\r");
@@ -381,7 +380,7 @@
 
 	if (pNPCDistTXT_Raw)
 		{
-		pAllocator->FreeChunk(pNPCDistTXT_Raw);
+		free(pNPCDistTXT_Raw);
 		pNPCDistTXT_Raw = NULL;
 		}
 	}
@@ -716,23 +715,23 @@
 //----- (00477266) --------------------------------------------------------
 void NPCStats::Release()
 	{
-	pAllocator->FreeChunk(pNPCTopicTXT_Raw);
+	free(pNPCTopicTXT_Raw);
 	pNPCTopicTXT_Raw = NULL;
-	pAllocator->FreeChunk(pNPCTextTXT_Raw);
+	free(pNPCTextTXT_Raw);
 	pNPCTextTXT_Raw = NULL;
-	pAllocator->FreeChunk(pNPCNewsTXT_Raw);
+	free(pNPCNewsTXT_Raw);
 	pNPCNewsTXT_Raw = NULL;
-	pAllocator->FreeChunk(pNPCProfTXT_Raw);
+	free(pNPCProfTXT_Raw);
 	pNPCProfTXT_Raw = NULL;
-	pAllocator->FreeChunk(pNPCNamesTXT_Raw);
+	free(pNPCNamesTXT_Raw);
 	pNPCNamesTXT_Raw = NULL;
-	pAllocator->FreeChunk(pNPCDataTXT_Raw);
+	free(pNPCDataTXT_Raw);
 	pNPCDataTXT_Raw = NULL;
-	pAllocator->FreeChunk(pNPCDistTXT_Raw);
+	free(pNPCDistTXT_Raw);
 	pNPCDistTXT_Raw = NULL;
-	pAllocator->FreeChunk(pNPCGreetTXT_Raw);
+	free(pNPCGreetTXT_Raw);
 	pNPCGreetTXT_Raw = NULL;
-	pAllocator->FreeChunk(pNCPGroupTXT_Raw);
+	free(pNCPGroupTXT_Raw);
 	pNCPGroupTXT_Raw = NULL;
 	}
 
@@ -936,7 +935,7 @@
 	int decode_step;
 
 	if ( pAwardsTXT_Raw )
-		pAllocator->FreeChunk(pAwardsTXT_Raw);
+		free(pAwardsTXT_Raw);
 	pAwardsTXT_Raw = NULL;
 	pAwardsTXT_Raw = (char *)pEvents_LOD->LoadRaw("awards.txt", 0);
 	strtok(pAwardsTXT_Raw, "\r");
@@ -990,7 +989,7 @@
 	int decode_step;
 
 	if ( pScrollsTXT_Raw )
-		pAllocator->FreeChunk(pScrollsTXT_Raw);
+		free(pScrollsTXT_Raw);
 	pScrollsTXT_Raw = NULL;
 	pScrollsTXT_Raw = (char *)pEvents_LOD->LoadRaw("scroll.txt", 0);
 	strtok(pScrollsTXT_Raw, "\r");
@@ -1039,7 +1038,7 @@
 	int decode_step;
 
 	if ( pMerchantsTXT_Raw )
-		pAllocator->FreeChunk(pMerchantsTXT_Raw);
+		free(pMerchantsTXT_Raw);
 	pMerchantsTXT_Raw = NULL;
 	pMerchantsTXT_Raw = (char *)pEvents_LOD->LoadRaw("merchant.txt", 0);
 	strtok(pMerchantsTXT_Raw, "\r");
@@ -1103,7 +1102,7 @@
 	int decode_step;
 
 	if ( pTransitionsTXT_Raw )
-		pAllocator->FreeChunk(pTransitionsTXT_Raw);
+		free(pTransitionsTXT_Raw);
 	pTransitionsTXT_Raw = NULL;
 	pTransitionsTXT_Raw = (char *)pEvents_LOD->LoadRaw("trans.txt", 0);
 	strtok(pTransitionsTXT_Raw, "\r");
@@ -1153,7 +1152,7 @@
 	int decode_step;
 
 	if ( pAutonoteTXT_Raw )
-		pAllocator->FreeChunk(pAutonoteTXT_Raw);
+		free(pAutonoteTXT_Raw);
 	pAutonoteTXT_Raw = 0;
 	pAutonoteTXT_Raw = (char *)pEvents_LOD->LoadRaw("autonote.txt", 0);
 	strtok(pAutonoteTXT_Raw, "\r");
@@ -1238,7 +1237,7 @@
 	int decode_step;
 
 	if ( pQuestsTXT_Raw )
-		pAllocator->FreeChunk(pQuestsTXT_Raw);
+		free(pQuestsTXT_Raw);
 	pQuestsTXT_Raw = NULL;
 	pQuestsTXT_Raw = (char *)pEvents_LOD->LoadRaw("quests.txt", 0);
 	strtok(pQuestsTXT_Raw, "\r");