/*
-blender for the Gameboy Advance
-Copyright (C) 2021 John Tsiombikas <nuclear@member.fsf.org>
+gbajam22 entry for the Gameboy Advance
+Copyright (C) 2022 John Tsiombikas <nuclear@mutantstargoat.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef XGL_H_
#define XGL_H_
+#include <stdint.h>
+
#define X_PI 0x3243f
#define X_2PI 0x6487f
#define X_HPI 0x19220
struct xvertex {
int32_t x, y, z;
int32_t nx, ny, nz;
- unsigned char cidx;
+ int32_t tx, ty;
+ int32_t lit;
};
void xgl_init(void);
void xgl_draw(int prim, const struct xvertex *varr, int vcount);
void xgl_transform(const struct xvertex *vin, int *x, int *y);
+void xgl_index(int c);
+
void xgl_xyzzy(void);
+int xgl_clip_near(struct xvertex *vout, int *voutnum, struct xvertex *vin, int vnum);
+
#endif /* XGL_H_ */