Sign in to follow this  
JamesAndreas

Beginner to Windows Programming, POINT variable?

Recommended Posts

Allrighty folks, I'm working out of "Beginning Game Programing" by Michael Morrison. (Personal, not schoolwork) and I've came across a snag. At the end of the chapter is an "Extreme Game Makeover", where you take what you have learned, and convert it to something else. this is where I am stuck: ----- 2. Add a POINT global variable to the program that is used to "remember" the position of the fireball; this position can initially be randomally calculated. ----- Now, I get how to do all that, but what is a POINT data type? I've googled around for about a half hour, but no luck. He didn't talk about it at any time (yet) either.

Share this post


Link to post
Share on other sites
IT sounds like one of the winapi's many structures. I am not 100% but I would assume it is a 2D location (an x and y component). You could easily make your own as well:


struct POINT
{
int x, y;
};

Share this post


Link to post
Share on other sites
POINT Pt[3];

Pt[0].x = 125; Pt[0].y = 10;
Pt[1].x = 95; Pt[1].y = 70;
Pt[2].x = 155; Pt[2].y = 70;


The POINT data type should be usuable with any code that includes windows.h

Share this post


Link to post
Share on other sites

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