Re: [AD] alternate entry point for allegro programs

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Michael Benfield wrote:
Is the END_OF_MAIN stuff and changing the user's main() function to _mangled_main() really necessary?

The initial reasoning for it was so Allegro games that were compiled in DJGPP (DOS) could be compiled in Windows, Unix, and anywhere else with minimal change (adding END_OF_MAIN()), and still behave the same. Specificly, certain platforms don't handle argv[0] the same, or even have the same type of entry function for non-console-based apps. On top of this, main itself can have different, yet still valid, type of declarations.

I personally, howeever, wouldn't mind deprecating that stuff and use something like al_main (with a suitable, yet static, argument list). The real entry point would still be main/WinMain, but Allegro would handle the entry point differences, call allegro_init, then al_main.

Although I'm not sure how possible this is with Allegro's current END_OF_MAIN hacks.

- Kitty Cat




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/