I have this code, it does not load the palettes... "Incompatible pointer in VDP_setpalette"
Code: Select all
u16 palette[64];
u16 ind;
VDP_setScreenWidth320();
ind = TILE_USERINDEX;
//Plane A
VDP_drawImageEx(APLAN, &plane_A, TILE_ATTR_FULL(PAL0,0,0,0,ind),0,0,0,1);
ind += plane_A.tileset->numTile;
//Plane B
VDP_drawImageEx(BPLAN, &plane_B, TILE_ATTR_FULL(PAL1,0,0,0,ind),0,0,0,1);
ind += plane_B.tileset->numTile;
VDP_setPalette(0,plane_A.palette);
VDP_setPalette(1,plane_B.palette);
Code: Select all
const u16 bkg_palette[16] = {
0x0000,0x0424,0x0026,0x0420,0x0248,0x0ECA,0x0846,
0x0446,0x048A,0x0864,0x0A88,0x0888,0x0664,0x0C86,0x0668,0x0EEE,
};
BMP get pixel and set pixel... This code does nothing at all...
At 2,2 pixels are white, at 30,30 pixels are black, so this should paint a white pixel in the middle of the black zone.. It does not.. and i don't know how to load the bmp palette...
Code: Select all
u16 color = 0x0000;
int main(){
VDP_drawBitmap(VDP_PLAN_A,&bkg,0,0);
color = BMP_GETPIXEL(2,2);
BMP_SETPIXEL(30,30,color);
}