mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-07-01 19:10:15 -04:00
Rename lib_121e0 to memory.c, rename symbols, introduce MEMPOOL constants and improve documentation
This commit is contained in:
@@ -1138,8 +1138,15 @@
|
||||
#define MAX_SQUADRONS 16
|
||||
#define MAX_TEAMS 8
|
||||
|
||||
#define MEMBANK_PRIMARY 0
|
||||
#define MEMBANK_SECONDARY 1
|
||||
#define MEMBANK_ONBOARD 0
|
||||
#define MEMBANK_EXPANSION 1
|
||||
|
||||
#define MEMPOOL_0 0
|
||||
#define MEMPOOL_STAGE 4 // Cleared on stage load
|
||||
#define MEMPOOL_5 5
|
||||
#define MEMPOOL_PERMANENT 6 // Never cleared
|
||||
#define MEMPOOL_7 7
|
||||
#define MEMPOOL_8 8
|
||||
|
||||
#define MENUDIALOGTYPE_DEFAULT 1
|
||||
#define MENUDIALOGTYPE_DANGER 2
|
||||
|
||||
@@ -415,8 +415,8 @@ extern u32 var8009520c;
|
||||
extern u32 var80095210;
|
||||
extern u32 var80099024;
|
||||
extern u32 var800992e4;
|
||||
extern struct memorypool g_PrimaryMemoryPools[9];
|
||||
extern struct memorypool g_SecondaryMemoryPools[9];
|
||||
extern struct memorypool g_OnboardMemoryPools[9];
|
||||
extern struct memorypool g_ExpansionMemoryPools[9];
|
||||
extern u32 var8009946c;
|
||||
extern u32 var80099470;
|
||||
extern u32 var80099474;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef _IN_LIB_LIB_121E0_H
|
||||
#define _IN_LIB_LIB_121E0_H
|
||||
#ifndef _IN_LIB_MEMORY_H
|
||||
#define _IN_LIB_MEMORY_H
|
||||
#include <ultra64.h>
|
||||
#include "types.h"
|
||||
|
||||
@@ -13,7 +13,7 @@ s32 memReallocate(u32 allocation, s32 size, u8 poolnum);
|
||||
u32 memGetFree(u8 poolnum, u32 bank);
|
||||
void memResetPool(u8 pool);
|
||||
void memDisablePool(u8 pool);
|
||||
u32 func000125dc(void);
|
||||
u32 func00012644(void);
|
||||
u32 memAllocFromBankRight(void);
|
||||
u32 mallocFromRight(void);
|
||||
|
||||
#endif
|
||||
+3
-3
@@ -4896,9 +4896,9 @@ struct gecreditsdata {
|
||||
|
||||
struct memorypool {
|
||||
/*0x00*/ u32 start;
|
||||
/*0x04*/ u32 nextallocation;
|
||||
/*0x08*/ u32 end;
|
||||
/*0x0c*/ u32 unk0c;
|
||||
/*0x04*/ u32 leftpos;
|
||||
/*0x08*/ u32 rightpos;
|
||||
/*0x0c*/ u32 end;
|
||||
/*0x10*/ u32 prevallocation;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user