mirror of
https://github.com/zeldaret/mm.git
synced 2024-11-30 08:10:26 +00:00
f276d2b0e6
* fixing some warnings * more pointer fixing * Use `-Wno-int-conversion` on audio files * more progress * fix * more pointer fixes * kinda progress * Fix remaining casts * Format * fix merge * fix warnings * fix parameter * use SEGMENT_ROM_START_OFFSET a bit more * format * fix audio warnings * some more fixes * fix en_go * review * review * whoops, missing cast * review * review * ->data * format * review * fix * asPtr * fix * Update src/code/sched.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review * fix in EnDnh * improve format * engo * format * fix * format * Update include/z64.h Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * TexturePtr * fix warnings * fix warnings * format * fix * review --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
30 lines
904 B
C
30 lines
904 B
C
#ifndef THA_H
|
|
#define THA_H
|
|
|
|
#include "ultra64.h"
|
|
#include "libc/stdint.h"
|
|
#include "libc/stddef.h"
|
|
|
|
typedef struct TwoHeadArena {
|
|
/* 0x0 */ size_t size;
|
|
/* 0x4 */ void* start;
|
|
/* 0x8 */ void* head;
|
|
/* 0xC */ void* tail;
|
|
} TwoHeadArena; // size = 0x10
|
|
|
|
void* THA_GetHead(TwoHeadArena* tha);
|
|
void THA_SetHead(TwoHeadArena* tha, void* newHead);
|
|
void* THA_GetTail(TwoHeadArena* tha);
|
|
void* THA_AllocHead(TwoHeadArena* tha, size_t size);
|
|
void* THA_AllocHeadByte(TwoHeadArena* tha);
|
|
void* THA_AllocTail(TwoHeadArena* tha, size_t size);
|
|
void* THA_AllocTailAlign16(TwoHeadArena* tha, size_t size);
|
|
void* THA_AllocTailAlign(TwoHeadArena* tha, size_t size, uintptr_t mask);
|
|
ptrdiff_t THA_GetRemaining(TwoHeadArena* tha);
|
|
u32 THA_IsCrash(TwoHeadArena* tha);
|
|
void THA_Reset(TwoHeadArena* tha);
|
|
void THA_Init(TwoHeadArena* tha, void* start, size_t size);
|
|
void THA_Destroy(TwoHeadArena* tha);
|
|
|
|
#endif
|