actually removed stack.c

This commit is contained in:
farisawan-2000
2020-12-13 18:42:49 -05:00
parent 5f64fc0797
commit 54869be8a3
2 changed files with 0 additions and 45 deletions

33
stack.c
View File

@@ -1,33 +0,0 @@
#include <ultra64.h>
#include <PR/gs2dex.h>
// 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;
}

12
stack.h
View File

@@ -1,12 +0,0 @@
#include <ultra64.h>
#include <PR/gs2dex.h>
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);