diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2024-09-08 18:02:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-08 12:02:38 -0400 |
| commit | de1a08c0612c36ca7528b9208a5a28d47d6b830a (patch) | |
| tree | 09fd7e172d3e55a5ad3dce3dc2f791905ec0a4ae /include/stackcheck.h | |
| parent | c39323a3368d54fd00479fd51eefcf0ac82606e1 (diff) | |
[headers 11] stackcheck.h, jpeg functions (#2171)
* [headers 11] stackcheck.h, jpeg functions
* bss
Diffstat (limited to 'include/stackcheck.h')
| -rw-r--r-- | include/stackcheck.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/stackcheck.h b/include/stackcheck.h new file mode 100644 index 000000000..33b4a674c --- /dev/null +++ b/include/stackcheck.h @@ -0,0 +1,27 @@ +#ifndef STACKCHECK_H +#define STACKCHECK_H + +#include "ultra64.h" + +typedef enum StackStatus { + /* 0 */ STACK_STATUS_OK, + /* 1 */ STACK_STATUS_WARNING, + /* 2 */ STACK_STATUS_OVERFLOW +} StackStatus; + +typedef struct StackEntry { + /* 0x00 */ struct StackEntry* next; + /* 0x04 */ struct StackEntry* prev; + /* 0x08 */ u32* head; + /* 0x0C */ u32* tail; + /* 0x10 */ u32 initValue; + /* 0x14 */ s32 minSpace; + /* 0x18 */ const char* name; +} StackEntry; + +void StackCheck_Init(StackEntry* entry, void* stackBottom, void* stackTop, u32 initValue, s32 minSpace, + const char* name); +void StackCheck_Cleanup(StackEntry* entry); +u32 StackCheck_Check(StackEntry* entry); + +#endif |
