Recently, I've begun developing for the Sega Genesis/Mega Drive using SGDK. However, one thing I seem to be having trouble with is creating tiles and sprites to use in my programs. I'm not sure if this is because of my coding, because of how I edit the image in GIMP, or a combination of both.
In this case, I'm trying to create a simple demo to flash the SEGA logo on-screen. Here's the image I'm using (a bit dirty, I know
 ):
The above image is indexed, and contains 15 colors, with the first color set to black.
):
The above image is indexed, and contains 15 colors, with the first color set to black.Here's my resource.res:
Code: Select all
PALETTE PAL_Sega      "sega.png" 2
SPRITE  SPR_Sega      "sega.png" 2 2 0 10 NONE
Code: Select all
void segaLogo() {
    SYS_disableInts();
    VDP_setEnable(0);
    
    VDP_setPalette(PAL2, PAL_Sega.data);
    
    SegaLetter s = {NULL, 0, 0};
    SegaLetter e = {NULL, 4, 0};
    SegaLetter g = {NULL, 8, 0};
    SegaLetter a = {NULL, 12, 0};
    
    s.spr = SPR_addSprite(&SPR_Sega, s.x, s.y, TILE_ATTR(PAL0,0,0,0));
    e.spr = SPR_addSprite(&SPR_Sega, e.x, e.y, TILE_ATTR(PAL0,0,0,1));
    g.spr = SPR_addSprite(&SPR_Sega, g.x, g.y, TILE_ATTR(PAL0,0,0,2));
    a.spr = SPR_addSprite(&SPR_Sega, a.x, a.y, TILE_ATTR(PAL0,0,0,3));
    
    VDP_setEnable(1);
    SYS_enableInts();
    
    while (1) {
        VDP_waitVSync();
    }
}
Thanks in advance.

 That should do it !
 That should do it !