I'm trying to display an image converted with grit on a background. everything works, exept instead of displaying transparency (or better said, not displaying magenta) it displays magenta (although it does seem darker than usual). I'm doing everything like before, exept I'm also creating a map with it.
these are the grit options:
Code: Select all
#-------------------------------------------------------
# Set the warning/log level to 3
#-------------------------------------------------------
-W3
#-------------------------------------------------------
# Set the bit depth to 4
#-------------------------------------------------------
-gB4
#-------------------------------------------------------
# graphics in tile format
#-------------------------------------------------------
-gt
#include map
-m
#-------------------------------------------------------
# tile reduction by tiles, palette and hflip/vflip
#-------------------------------------------------------
-mRtpf
#-------------------------------------------------------
# Tell grit to include a palette (the first index in it will be transparent)
#-------------------------------------------------------
-p
#-------------------------------------------------------
# Set the transparent color to (rrggbb hex)
#-------------------------------------------------------
-gTFF00FF
Code: Select all
//debug mode (sassert) will be turned off when defined
//#define NDEBUG
#include <DSOL.hpp>
//generated with grit
#include "vuurrobin.h"
const uint vuurrobinBGLayer = 0;
const BgType vuurrobinBGType = BgType_Text4bpp;
const BgSize vuurrobinBGSize = BgSize_T_256x256;
int main()
{
DSOL::init2d();
int bg = bgInit(vuurrobinBGLayer, vuurrobinBGType, vuurrobinBGSize, 0, 1);
dmaCopy(vuurrobinMap, bgGetMapPtr(bg), vuurrobinMapLen);
dmaCopy(vuurrobinTiles, bgGetGfxPtr(bg), vuurrobinTilesLen);
dmaCopy(vuurrobinPal, BG_PALETTE, vuurrobinPalLen);
//update everything and loop forever
DSOL::sleepForever();
return 0;
}
http://vuurrobin.100webcustomers.com/st ... rrobin.png
does anybody see what I'm doing wrong here, some grit option I forgot or the image not saved right or something.