1
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
//The following code shows a PALETTED8 example for the FT81x. PALETTED8 format is supported
//indirectly in the FT81x and it is different from the PALETTED format in the FT80x. To render
//Alpha, Red, Green and Blue channels, multi-pass drawing action is required.
//addr_pal is the starting address of palette lookup table in RAM_G
//bitmap source(palette indices) is starting from address 0
dl(BITMAP_HANDLE(0))
dl(BITMAP_LAYOUT(PALETTED8, width, height))
dl(BITMAP_SIZE(NEAREST, BORDER, BORDER, width, height))
dl(BITMAP_SOURCE(0)) //bitmap source(palette indices)
dl(BEGIN(BITMAPS))
dl(BLEND_FUNC(ONE, ZERO))
//Draw Alpha channel
dl(COLOR_MASK(0,0,0,1))
dl(PALETTE_SOURCE(addr_pal+3))
dl(VERTEX2II(0, 0, 0, 0))
//Draw Red channel
dl(BLEND_FUNC(DST_ALPHA, ONE_MINUS_DST_ALPHA))
dl(COLOR_MASK(1,0,0,0))
dl(PALETTE_SOURCE (addr_pal+2))
dl(VERTEX2II (0, 0, 0, 0))
//Draw Green channel
dl(COLOR_MASK(0,1,0,0))
dl(PALETTE_SOURCE(addr_pal + 1))
dl(VERTEX2II(0, 0, 0, 0))
//Draw Blue channel
dl(COLOR_MASK(0,0,1,0))
dl(PALETTE_SOURCE(addr_pal)