al_store_state(3alleg5)
β¨ 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β grabsnew_display_format,new_display_refresh_rate, andnew_display_flagsπALLEGRO_STATE_NEW_BITMAP_PARAMETERSβ grabsnew_bitmap_formatandnew_bitmap_flagsπ¨ALLEGRO_STATE_DISPLAYβ grabscurrent_displayπALLEGRO_STATE_TARGET_BITMAPβ grabstarget_bitmapπ―ALLEGRO_STATE_BLENDERβ grabsblenderπALLEGRO_STATE_TRANSFORMβ grabscurrent_transformationπ¦ALLEGRO_STATE_PROJECTION_TRANSFORMβ grabscurrent_projection_transformationπALLEGRO_STATE_NEW_FILE_INTERFACEβ grabsnew_file_interfaceπALLEGRO_STATE_BITMAPβ the combo meal: same asALLEGRO_STATE_NEW_BITMAP_PARAMETERSandALLEGRO_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
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms