Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Dial-Up

Scale?

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

I''m going from Visual Basic to C++, and I was wondering if there was anyway to redefine the coordinates of the screen. In VB, it would go: Form1.Scale(x1,y1)-(x2,y2) Where (x1,y1) is the upper-left corner and (x2,y2) is the lower-right corner. I''m working in DOS, using Allegro with DJGPP, if it matters at all...

Share this post


Link to post
Share on other sites
Advertisement
That isn''t what I''m talking about... Normally, when you type in coordinates for something, it would be in pixels. What I want to do is to be able to redefine that so that (0,0) is in the centre of the screen.

Share this post


Link to post
Share on other sites
Just make a point function:


const int left = -400;
const int top = -300;

POINT ScreenPoint(int x, int y)
{
POINT ret;
ret.x = x-left;
ret.y = y-top;

return ret;
}

>>>>>>>>>>>>>>>>>
Ilthigore
<<<<<<<<<<<<<<<<<

Share this post


Link to post
Share on other sites

  • 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!