Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allegro and Code::Blocks' Autocomplete feature

I've tried Allegro 5 with msvc++ 2010 before and it provided me with function definitions while typing out functions like al_map_rgb, where as in code::blocks I get no such thing.

I learned from a question that Allegro uses macros to define functions and hence Code::Blocks is unable to use that for autocomplete.

How do I go about to enable that feature in Code::Blocks? [If possible]

PS. http://forums.codeblocks.org/index.php?topic=15728.0 , in this discussion they talk about creating a separate header file for Allegro with all the function signatures, how do I do that?

like image 212
Aksdad Avatar asked Jul 23 '26 16:07

Aksdad


1 Answers

To make a header with all the signatures you would have to go thorugh every allegro function and add it to a header (like allegro_prototypes.h for example)

Eg:

ALLEGRO_FILE *al_fopen(const char *path, const char *mode);
void al_fclose(ALLEGRO_FILE *f);
size_t al_fread(ALLEGRO_FILE *f, void *ptr, size_t size);

Continue this for every function in allegro. Will take a lot of work, but may be worth it if you rely on auto completion a lot. You will need approximately 750 prototypes.

like image 195
Brad Avatar answered Jul 25 '26 06:07

Brad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!