Sign in to follow this  

Allegro Question

This topic is 3371 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It likely means that the screen coordinates start at zero. Therefore, for the width of the drawing area to be SCREEN_W wide then the coordinates are from 0 to SCREEN_W - 1.

Share this post


Link to post
Share on other sites
Also, when I read that book I remember the author mentioning that it was easy to crash Allegro if you went outside of your drawing area when using certain functions so he does that in all his code to safeguard against the infamous "off by one bugs".
Personally, I just stuck with SCREEN_W and SCREEN_H myself since that's what all the official Allegro tutorials and documentation uses, it's less typing and looks more readable.

Share this post


Link to post
Share on other sites

This topic is 3371 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this