Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Demo-the-New

This thread is locked; no one can reply to it. rss feed Print
Demo-the-New
Peter Hull
Member #1,136
March 2001

Well, here I am playing the a5teroids demo on OS X!
{"name":"594738","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/9\/691222ed02db58d5d0944a3bc3a0b114.png","w":640,"h":502,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/9\/691222ed02db58d5d0944a3bc3a0b114"}594738
In that code, there is reference to MAX_PATH but as far as I can see that's not defined, though PATH_MAX is. Any idea which is correct?

Also, there are some parts like

#ifdef __linux
/* Linux code */
#else
/* Windows code */
#endif

which I changed to

#ifdef ALLEGRO_LINUX
/* Linux code */
#endif
#if defined(ALLEGRO_MSVC) || defined(ALLEGRO_MINGW)
/* Windows code */
#endif
#ifdef ALLEGRO_MACOSX
/* OSX code */
#endif

Does that look better? Is there a single define for the Windows platform?

Pete

Trent Gamblin
Member #261
April 2000
avatar

Quote:

In that code, there is reference to MAX_PATH but as far as I can see that's not defined, though PATH_MAX is. Any idea which is correct?

Apparently there's a FILENAME_MAX, maybe that's what you need.

Quote:

Does that look better? Is there a single define for the Windows platform?

Yes, there's ALLEGRO_WINDOWS.

Goalie Ca
Member #2,579
July 2002
avatar

Heh.. this summer i'll be away from my beloved PC and i'll only have my ibook g4 to play on. Yay for the mac port!!!

-------------
Bah weep granah weep nini bong!

brigham toskin
Member #2,213
April 2002

Quote:

Does that look better?

might also want to change them to #elseif. Realistically, it probably doesn't matter as far as logic, because it shouldn't be the case that more than one of those will be defined at any given time. But it might speed up your compiles a little if it doesn't have to do a few compares.

---
I now submit to your flogging.

Go to: