#include "intr.h"
#include "debug.h"
-static unsigned char tex[32 * 32] __attribute__((section(".iwram")));
-
void gamescr(void)
{
int i, j, tx, ty, angle, depth, nframes, backbuf, zoffs;
uint16_t *cdst, *top, *bot;
unsigned char *csrc;
uint32_t tun, *tunptr;
+ unsigned char *tex;
REG_DISPCNT = 4 | DISPCNT_BG2 | DISPCNT_FB1;
fillblock_16byte(vram[0], 0xffffffff, 240 * 160 / 16);
fillblock_16byte(vram[1], 0xffffffff, 240 * 160 / 16);
+ tex = iwram_sbrk(32 * 32);
memcpy(tex, tuncross_pixels, 32 * 32);
nframes = 0;
bot = vram[backbuf] + 159 * 240 / 2;
tunptr = tunmap;
for(i=0; i<80; i++) {
- for(j=0; j<240/2; j++) {
+ top++;
+ bot++;
+ tunptr++;
+ for(j=1; j<240/2; j++) {
uint16_t pptop, ppbot;
tun = *tunptr++;