static unsigned char *fb;
static int fbwidth, fbheight;
-static short scantab[2][160] __attribute__((section(".iwram")));
+static short scantab[2][160];
-void polyfill_framebuffer(unsigned char *ptr, int w, int h)
+void polyfill_framebuffer(void *ptr, int w, int h)
{
fb = ptr;
fbwidth = w;
#define VPREV(p) ((p) == varr ? vlast : (p) - 1)
#define VSUCC(p, side) ((side) == 0 ? VNEXT(p) : VPREV(p))
+ARM_IWRAM
void polyfill_flat(struct pvertex *varr, int vnum, unsigned char col)
{
int i, line, top, bot;
}
}
+ if(top < 0) top = 0;
+ if(bot >= fbheight) bot = fbheight - 1;
+
fbptr = fb + top * fbwidth;
for(i=top; i<=bot; i++) {
start = scantab[0][i];