I have got this function to make black color around a bitmap black. Is it good? Doesent work for me.
Im running the game in 32bit mode. Is there a better way at doing this? I guess all the bitmap images must be 32 bit too?
Thanks!
Instead of checking if the pixel matches makecol (which it may not if the image has alpha data), check r, g, and b explicitly. Also, unless you're using the alpha blender, you need to set the pixel to the mask color and use draw_sprite or masked_blit.
If you know for sure you'll have a 32-bit bitmap there, you can use _putpixel32 to speed it up some. Also, you're not resetting 'i' for every row, and you're skipping three pixels for every one you do.
did you set the color depth before loading the dat file?
Have you set the alpha blender somewhere in your code?
If not, try changing your code like Kitty Cat suggested. This should do the trick as long as you want to make the black completely transparent and you don't need any partial transparency.
set the pixel to the mask color and use draw_sprite or masked_blit