1al_get_allegro_version(3)                            al_get_allegro_version(3)
2
3
4

NAME

6       al_get_allegro_version - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              uint32_t al_get_allegro_version(void)
12

DESCRIPTION

14       Returns  the  (compiled)  version of the Allegro library, packed into a
15       single integer as groups of 8 bits  in  the  form  (major << 24) | (mi‐
16       nor << 16) | (revision << 8) | release.
17
18       You can use code like this to extract them:
19
20              uint32_t version = al_get_allegro_version();
21              int major = version >> 24;
22              int minor = (version >> 16) & 255;
23              int revision = (version >> 8) & 255;
24              int release = version & 255;
25
26       The  release number is 0 for an unofficial version and 1 or greater for
27       an official release.  For example "5.0.2[1]" would be the (first) offi‐
28       cial  5.0.2  release  while  "5.0.2[0]" would be a compile of a version
29       from the "5.0.2" branch before the official release.
30
31
32
33Allegro reference manual                             al_get_allegro_version(3)
Impressum