Jump to content
  • Advertisement
Sign in to follow this  
Kenny77

SDL Equivalent of Win32's POINT

This topic is 3665 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

A quick search on Google lead nowhere, so I'm asking here. It would be good to use as a variable for velocity but is there something like this in SDL? Or should I just use two int's?

Share this post


Link to post
Share on other sites
Advertisement
SDL actually uses SDL_Rect for the same purpose, some of the time, and just ignores the .w and .h members. (For example, when positioning a image)

As mentioned, you can just create your own, as a simple struct.
struct SDL_Point
{
Uint32 x; //You could use Sint32 also, for a unsigned int.
Uint32 y;
};

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!