Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Direct Pixel Manipulation (looking for an example of TLN_GetBitmapPtr)
#4
Hi again!

You can -in fact you must- draw something to the bitmap you're using in order to see anything. Just setting pixels or color entries won't give any result, you must set both. Be aware that a pixel value of 0 means fully transparent.

You don't have to use tilesets: bitmap layers and tiled layers are totally independent, which one to use depends on your game needs.

In your example, your call to TLN_SetLayerPalette(0, palette); is redundant: as you've already attached the palette to the bitmap with TLN_SetBitmapPalette(), calling TLN_SetLayerBitmap() automatically sets the palette too. You can set bitmap pixels and/or palette colors at any time, the effect will be visible on the next call to TLN_DrawFrame().

Keep going!
Reply


Messages In This Thread
RE: Direct Pixel Manipulation (looking for an example of TLN_GetBitmapPtr) - by megamarc - 08-28-2019, 03:15 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)