vblperf_setcolor(0xff);//192);
/* sprite setup */
- spr_setup(16, 16, spr_game_pixels, spr_game_cmap);
+ spr_setup(32, 16, spr_game_pixels, spr_game_cmap);
wait_vblank();
spr_clear();
if(bnstate & BN_B) rot += 2;
- spr_oam(oam, 0, 512 + 256, x - 64, y - 64, SPR_256COL | SPR_SZ64 | SPR_DBLSZ |
+ spr_oam(oam, 0, 512, x - 64, y - 64, SPR_SZ64 | SPR_DBLSZ |
SPR_ROTSCL | SPR_ROTSCL_SEL(0));
mat[0] = COS(rot);
for(j=0; j<8; j++) {
*dst++ = src[j * 64];
*dst++ = src[j * 64 + 1];
- *dst++ = src[j * 64 + 2];
- *dst++ = src[j * 64 + 3];
}
- src += 4;
+ src += 2;
- if((i & 15) == 15) {
+ if((i & 31) == 31) {
src += 7 * 64; /* skip to the next row of tiles (skip 7 rows of pixels) */
}
}
cptr = (uint16_t*)CRAM_OBJ_ADDR;
- for(i=0; i<256; i++) {
+ for(i=0; i<16; i++) {
unsigned char r = *cmap++ >> 3;
unsigned char g = *cmap++ >> 3;
unsigned char b = *cmap++ >> 3;
- *cptr++ = r | (g << 5) | (b < 10);
+ *cptr++ = r | ((uint16_t)g << 5) | ((uint16_t)b << 10);
}
}