exalpha(3)
β¨ exalpha β bestie edition β¨
okay so this is exalpha(3), straight out of the Allegro manual, and it's the Allegro game programming library btw π so you know it's the real deal. It's all about creating and using 32 bit RGBA sprites and honestly? iconic. π
πΈ SYNOPSIS πΈ
#include <allegro.h>
Example exalpha
π¦ DESCRIPTION π¦
okay so listen, this program is literally a whole demo of how to use the 32 bit RGBA translucency functions to store an alpha channel along with a bitmap graphic. like, the alpha channel is just living in there with the bitmap. besties. π«Ά
Two images get loaded from disk:
- one of them is the background π
- the other one is the sprite β¨
Then β and this is the main character moment β the example generates an alpha channel for the sprite image, composing that 32 bit RGBA bitmap during runtime, and draws it at the position of the mouse cursor. π±οΈπ
so it follows your mouse around. yes really. slay.
π SEE ALSO π
like all the siblings, fr fr. go read these too:
BITMAP(3)END_OF_MAIN(3)SCREEN_H(3)SCREEN_W(3)allegro_error(3)allegro_init(3)allegro_message(3)blit(3)clear_keybuf(3)create_bitmap(3)destroy_bitmap(3)draw_trans_sprite(3)drawing_mode(3)font(3)getb(3)getg(3)getpixel(3)getr(3)install_keyboard(3)install_mouse(3)install_timer(3)keypressed(3)load_bitmap(3)makecol(3)mouse_x(3)mouse_y(3)putpixel(3)rectfill(3)replace_filename(3)screen(3)set_alpha_blender(3)set_color_conversion(3)set_color_depth(3)set_gfx_mode(3)set_multiply_blender(3)set_write_alpha_blender(3)solid_mode(3)stretch_blit(3)textprintf_ex(3)
π and that's the whole page, bestie π This lil gem comes to you from Allegro, version 4.4.3, dated exalpha(3) β mwah, no notes, go write some RGBA sprites. ππ¦πΈ
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms