I am trying to make a bitmap in my game be able to be tinted red, but I am having trouble with al_set_blender. I need it to not draw the red where the bitmap has no alpha. Here is my code.
Is there any reason not to use al_draw_tinted_bitmap?
There are several ways to do it, but if you can't figure out the right blending mode one simple way would be to disable alpha writes: al_set_render_state(ALLEGRO_WRITE_MASK_FLAGS, ALLEGRO_MASK_RGB)
I tried drawing a tinted bitmap, but the image is mostly black so I don't think it works because there isn't color to tint. Also, for some reason it seems like al_set_render_state() is nowhere to be found.
You mean your version of Allegro doesn't have al_set_render_state?
What do I have to include to use it? I can't really find information on it anywhere.
Nothing? It is a normal function like any other: http://liballeg.org/a5docs/trunk/graphics.html#al_set_render_state
Well it just isn't showing up for me. Maybe I have a weird version of Allegro, but it doesn't matter cause I decided to just do something different for the enemy anyway.
You need 5.1.2 or later, according to the docs.
If you're on Linux, it's fairly easy to grab the newest version and compile it. On Windows, someone will have to provide the link to a new enough binary version.
"On Windows, someone will have to provide the link to a new enough binary version"
I never had problems compiling on windows.