I'm encountering an issue with VPD_setTileMapRect. I'm not sure if it's a bug or I'm just not using it properly.
I've tried to simplify the problem as much as possible. Here's some basic code I have.
Code: Select all
const u16 map2[4] =
{
0, 1,
2, 3
};
VDP_setTileMapRect(APLAN, map2, TILE_ATTR_FULL(PAL3, 0, 0, 0, 0), 0, 0, 2, 2);
But I'm expecting:
If I look at VPD_setTileMapRect's code,
Code: Select all
while (i--)
{
*plctrl = GFX_WRITE_VRAM_ADDR(addr);
j = w;
while (j--) *pwdata = basetile | *src++;
...
Code: Select all
// "fixed" version
while (j--) *pwdata = basetile + *src++;
My first impression is that the behaviour should be identical, but it's obviously not.
Could this be a bug in VDP_setTileMapRect or am I just not using it correctly?
Thanks!
DJCC.