Skip to content

Commit 57e8937

Browse files
MarkOatesSiegeLord
authored andcommitted
Add "al_is_primitives_addon_initialized"
1 parent 3f020a4 commit 57e8937

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

addons/primitives/allegro5/allegro_primitives.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ ALLEGRO_PRIM_FUNC(uint32_t, al_get_allegro_primitives_version, (void));
165165
* Primary Functions
166166
*/
167167
ALLEGRO_PRIM_FUNC(bool, al_init_primitives_addon, (void));
168+
ALLEGRO_PRIM_FUNC(bool, al_is_primitives_addon_initialized, (void));
168169
ALLEGRO_PRIM_FUNC(void, al_shutdown_primitives_addon, (void));
169170
ALLEGRO_PRIM_FUNC(int, al_draw_prim, (const void* vtxs, const ALLEGRO_VERTEX_DECL* decl, ALLEGRO_BITMAP* texture, int start, int end, int type));
170171
ALLEGRO_PRIM_FUNC(int, al_draw_indexed_prim, (const void* vtxs, const ALLEGRO_VERTEX_DECL* decl, ALLEGRO_BITMAP* texture, const int* indices, int num_vtx, int type));

addons/primitives/primitives.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ bool al_init_primitives_addon(void)
5555
return ret;
5656
}
5757

58+
/* Function: al_is_primitives_addon_initialized
59+
*/
60+
bool al_is_primitives_addon_initialized(void)
61+
{
62+
return addon_initialized;
63+
}
64+
5865
/* Function: al_shutdown_primitives_addon
5966
*/
6067
void al_shutdown_primitives_addon(void)

docs/src/refman/primitives.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ True on success, false on failure.
2323

2424
See also: [al_shutdown_primitives_addon]
2525

26+
### API: al_is_primitives_addon_initialized
27+
28+
Returns true if the primitives addon is initialized, otherwise returns false.
29+
30+
See also: [al_init_primitives_addon], [al_shutdown_primitives_addon]
31+
2632
### API: al_shutdown_primitives_addon
2733

2834
Shut down the primitives addon. This is done automatically at program exit,

0 commit comments

Comments
 (0)