This commit is contained in:
Daveo 2001-05-17 16:39:58 +00:00
parent 64c42e88d3
commit 1316434cc7
3 changed files with 19 additions and 28 deletions

View File

@ -111,7 +111,7 @@ ACTOR_SPONGEBOB := SpongeBob SpongeBob_CoralBlower SpongeBob_JellyLauncher Spon
ACTOR_NPC := BarnacleBoy Krusty Squidward Gary Sandy Patrick MermaidMan
ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil \
Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish Lrgjellyfish \
Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish \
PuffaFish Sharkman Skeletalfish SpiderCrab SpikeyAnenome Stomper \
SharkSub Motherjellyfish SeaSnake

View File

@ -128,18 +128,11 @@ static const char * s_sceneNames[] =
"System",
"UNKNOWN",
};
#endif /* __DEBUG_MEM__ */
static const int s_nbSceneNames = sizeof(s_sceneNames) / sizeof(char *);
static FontBank s_debugFont;
#ifdef __DEBUG_MEM__
void dumpDebugMem()
{
if (s_dumpMem)
@ -371,6 +364,13 @@ void freeDebugMem( void * addr )
ASSERT( !"Can't find debug mem node ( memory already freed? )" );
}
// hmm.. have to alloc this memory before the first scene, but have to wait until all the
// systems are active so can't do it in the standard MemInit() thing
void DebugMemFontInit()
{
s_debugFont.initialise( &standardFont );
s_debugFont.setOt( 0 );
}
#endif
@ -402,21 +402,10 @@ void MemInit()
}
// hmm.. have to alloc this memory before the first scene, but have to wait until all the
// systems are active so can't do it in the standard MemInit() thing
void DebugMemFontInit()
{
#ifdef __DEBUG_MEM__
s_debugFont.initialise( &standardFont );
s_debugFont.setOt( 0 );
#endif
}
/*****************************************************************************/
// 030700 Dave - Implemented smart allocation
// It now looks thru the whole node list, and takes from the smallest VALID node
// I now understand how this memory stuff works, it aint all bad!
char * MemAllocate( u32 TLen, char const *Name, char const * File, int LineNumber )
{
sLList *mem = &MainRam;
@ -482,7 +471,7 @@ int BestNode,FirstNode;
}
#ifdef __DEBUG_MEM__
addDebugMem( Addr, Name, File, LineNumber );
addDebugMem( Addr, Name, File, LineNumber );
#endif
ASSERT( (Addr != (char*)-1) );

View File

@ -12,14 +12,13 @@
/*****************************************************************************/
#ifdef __VERSION_DEBUG__
#define __DEBUG_MEM__ // Define if you want to debug memory - TS
// Define if you want to debug memory
#ifdef __USER_paul__
#ifdef __VERSION_DEBUG__
#define __DEBUG_MEM__
#endif
#endif
/*****************************************************************************/
/*****************************************************************************/
#define LListLen 50
@ -51,7 +50,6 @@ typedef struct
char * MemAllocate( u32 Size, char const *Name, char const * File, int LineNumber);
void MemInit();
void DebugMemFontInit();
void MemFree(void *Addr);
void * operator new(size_t Size, const char * name = NULL);
@ -60,11 +58,15 @@ void operator delete(void *Ptr);
void operator delete[](void *Ptr);
#ifdef __VERSION_DEBUG__
#ifdef __DEBUG_MEM__
void dumpDebugMem();
void DebugMemFontInit();
#define MemAlloc( Size, Name ) MemAllocate( (Size), (Name), __FILE__, __LINE__ )
#else
#define MemAlloc(Size,Name) MemAllocate( (Size), NULL, NULL, 0 )
#define dumpDebugMem ;
#define DebugMemFontInit ;
#endif