diff --git a/stack.c b/stack.c deleted file mode 100644 index 9eee8176..00000000 --- a/stack.c +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include -// My matrix stack for S2DEX transformations. -// Probably doesnt need to be 0x80 long -#define ARRAY_COUNT(x) (sizeof(x) / sizeof(x[0])) - - -uObjMtx stack[0x80]; - -u32 stack_top = 0; - -u32 s_isfull(void) { - return (stack_top >= ARRAY_COUNT(stack)); -} - -u32 s_isempty(void) { - return (stack_top == 0); -} - -void s_push(uObjMtx *f) { - if (!s_isfull()) - stack[++stack_top] = *f; -} - -uObjMtx *s_pop(void) { - if (!s_isempty()) - return &stack[stack_top--]; -} - -void s_clear(void) { - stack_top = 0; -} - diff --git a/stack.h b/stack.h deleted file mode 100644 index da45b83b..00000000 --- a/stack.h +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include - -extern uObjMtx stack[0x80]; - -extern u32 stack_top; - -extern u32 s_isfull(void); -extern u32 s_isempty(void); -extern void s_push(uObjMtx *f); -extern uObjMtx *s_pop(void); -extern void s_clear(void);