mirror of
https://github.com/jkdansereau/goldeneye-pc-port.git
synced 2026-10-23 15:52:42 +02:00
Virtual seats, per-seat camera and input routing, aim modes, hot-plugged controllers reopening via a coalesced rescan (D450, dolent's PR #122, merged as the original commit). Rule-2 sign-off for D417. Refs: #99 D416 D417 D418 D419 D422 D428 D448 D450 #122
71 lines
1.5 KiB
C
71 lines
1.5 KiB
C
#ifndef _MEMP_H_
|
|
#define _MEMP_H_
|
|
|
|
#include <ultra64.h>
|
|
|
|
/*
|
|
* Align to 16 bit boundary. Version "b", without preliminary addition.
|
|
*/
|
|
#define ALIGN16_b(val) (((val) | 0xf) ^ 0xf)
|
|
|
|
typedef struct MemoryPool {
|
|
u8 *start;
|
|
u8 *pos;
|
|
u8 *end;
|
|
u8 *prevpos;
|
|
} MemoryPool;
|
|
|
|
typedef struct s_mempMVALS { //mempSizes
|
|
u32 mfIndex;
|
|
u32 mf;
|
|
u32 mlIndex;
|
|
u32 ml;
|
|
u32 meIndex;
|
|
u32 me;
|
|
u32 EndIndex;
|
|
u32 EndPool;
|
|
} s_mempMVALS;
|
|
|
|
// Pool Names
|
|
enum MEMPOOL
|
|
{
|
|
MEMPOOL_TOTAL, // the mempool starts at _bssSegmentEnd and ends at _stacksSegmentStart
|
|
MEMPOOL_MF,
|
|
MEMPOOL_2,
|
|
MEMPOOL_ML,
|
|
MEMPOOL_STAGE,
|
|
MEMPOOL_ME,
|
|
MEMPOOL_PERMANENT,
|
|
MEMPOOL_COUNT
|
|
};
|
|
|
|
typedef enum MEMP_ADD_ENTRY_RESULT
|
|
{
|
|
MEMP_ADD_ENTRY_SUCCESS = 1,
|
|
MEMP_ADD_ENTRY_NOT_LAST_ALLOCATION = 2
|
|
} MEMP_ADD_ENTRY_RESULT;
|
|
|
|
void mempInit(void);
|
|
#ifdef PORT
|
|
void mempCheckMemflagTokens(uintptr_t bstart, int bsize);
|
|
#else
|
|
void mempCheckMemflagTokens(int bstart,int bsize);
|
|
#endif
|
|
void mempSetBankStarts(s32 banks[8]);
|
|
void *mempAllocBytesInBank(u32 bytes,u8 bank);
|
|
MEMP_ADD_ENTRY_RESULT mempAddEntryOfSizeToBank(void *allocation, s32 newsize, u8 poolnum);
|
|
void nulled_mempLoopAllMemBanks(void);
|
|
s32 mempGetBankSizeLeft(u8 bank);
|
|
#ifdef PORT
|
|
void *mempAllocPackedBytesInBank(u32 param_1);
|
|
#else
|
|
u32 mempAllocPackedBytesInBank(u32 param_1);
|
|
#endif
|
|
#ifdef PORT
|
|
void mempRedzoneCheck(const char *why); /* D464: GE_MEMPREDZONE */
|
|
#endif
|
|
void mempResetBank(u8 bank);
|
|
void mempNullNextEntryInBank(u8 bank);
|
|
|
|
#endif
|