al_store_state(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

al_store_state β€” the Allegro 5 API function that's literally out here saving your thread's state like a screenshot of the vibe πŸ’Ύβœ¨ (yes bestie, this page lives in the 3alleg5 manual, iykyk)


🌸 SYNOPSIS 🌸

void al_store_state(ALLEGRO_STATE *state, int flags)

πŸŽ€ DESCRIPTION πŸŽ€

okay so picture this: you're deep in your thread, everything's set up just how you like it, and you want to keep that moment. that's what al_store_state does β€” it stores part of the state of the current thread into the ALLEGRO_STATE object you hand it. no cap. 🫢

and the flags parameter? that's the fun part. it can take any bit-combination of these flags, so mix and match however you want:

  • ALLEGRO_STATE_NEW_DISPLAY_PARAMETERS β€” grabs new_display_format, new_display_refresh_rate, and new_display_flags πŸ’…
  • ALLEGRO_STATE_NEW_BITMAP_PARAMETERS β€” grabs new_bitmap_format and new_bitmap_flags 🎨
  • ALLEGRO_STATE_DISPLAY β€” grabs current_display πŸ‘‘
  • ALLEGRO_STATE_TARGET_BITMAP β€” grabs target_bitmap 🎯
  • ALLEGRO_STATE_BLENDER β€” grabs blender πŸŒ€
  • ALLEGRO_STATE_TRANSFORM β€” grabs current_transformation πŸ¦‹
  • ALLEGRO_STATE_PROJECTION_TRANSFORM β€” grabs current_projection_transformation 🌈
  • ALLEGRO_STATE_NEW_FILE_INTERFACE β€” grabs new_file_interface πŸ“
  • ALLEGRO_STATE_BITMAP β€” the combo meal: same as ALLEGRO_STATE_NEW_BITMAP_PARAMETERS and ALLEGRO_STATE_TARGET_BITMAP πŸ“
  • ALLEGRO_STATE_ALL β€” all of the above, the whole entire menu, absolutely ate πŸ”₯
ngl bestie, if you're gonna save it, you might as well know how to put it back β€” that's what al_restore_state is for 😭

πŸ’– SEE ALSO πŸ’–


and that's the whole page, babe πŸ’œ this was al_store_state(3alleg5) straight out of the Allegro reference manual β€” go store that state, you icon, periodt βœ¨πŸ‘‘

πŸ“¦ where this page comes from