mirror of
https://github.com/zeldaret/af.git
synced 2026-09-26 05:31:51 -04:00
c7729c05c0
* C file * game_dt * game_ct * fix offsets and building * game_init_hyral and SetGameFrame * more funcs * game_main * game_get_controller and func_800D2E00_jp * Input * game_draw_last * a few attempts * game_draw_first * improve func_800D2E58_jp a bit * format * migrate data and bss * what * whoops * name bss * minor cleanup * match game.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * fix malloc function wrongly named * Update src/code/game.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
29 lines
877 B
C
29 lines
877 B
C
#ifndef TWO_HEAD_ARENA_H
|
|
#define TWO_HEAD_ARENA_H
|
|
|
|
#include "ultra64.h"
|
|
#include "libc/stdint.h"
|
|
|
|
typedef struct TwoHeadArena {
|
|
/* 0x00 */ size_t size;
|
|
/* 0x04 */ void* start;
|
|
/* 0x08 */ void* head;
|
|
/* 0x0C */ void* tail;
|
|
} TwoHeadArena; // size = 0x10
|
|
|
|
void* THA_getHeadPtr(TwoHeadArena* tha);
|
|
void THA_setHeadPtr(TwoHeadArena* tha, void* newHead);
|
|
void* THA_getTailPtr(TwoHeadArena* tha);
|
|
void* THA_nextPtrN(TwoHeadArena* tha, size_t size);
|
|
void* THA_nextPtr1(TwoHeadArena* tha);
|
|
void* THA_alloc(TwoHeadArena* tha, size_t size);
|
|
void* THA_alloc16(TwoHeadArena* tha, size_t size);
|
|
void* THA_allocAlign(TwoHeadArena* tha, size_t size, uintptr_t mask);
|
|
s32 THA_getFreeBytes(TwoHeadArena* tha);
|
|
u32 THA_isCrash(TwoHeadArena* tha);
|
|
void THA_init(TwoHeadArena* tha);
|
|
void THA_ct(TwoHeadArena* tha, void* start, size_t size);
|
|
void THA_dt(TwoHeadArena* tha);
|
|
|
|
#endif
|