gui_set_screen(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ NAME ✨

okay bestie, meet gui_set_screen β€” it changes the bitmap surface the GUI routines draw to. it's part of the Allegro game programming library, and this page is from the Allegro manual, section 3. periodt πŸ’…

🌸 SYNOPSIS 🌸

#include <allegro.h>

void gui_set_screen(BITMAP *bmp);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, this function is your lil remote control for where the GUI routines are drawing. you can use it to change the bitmap surface they draw to. highkey useful if you're running a double buffering or page flipping system. and if you pass NULL, it'll make the default surface (screen) get used again. iconic ✨

example, because visuals ate:

BITMAP *page[2];

/* Allocate two pages of video memory */
page[0] = create_video_bitmap(SCREEN_W, SCREEN_H);
page[1] = create_video_bitmap(SCREEN_W, SCREEN_H);

/* Page flip */
show_video_bitmap(page[0]);
gui_set_screen(page[0]);

πŸ’œ SEE ALSO πŸ’œ


cute sign-off: this was gui_set_screen(3) from the Allegro manual, version 4.4.3. go off, bestie πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from