Size of sprites in spritesheets
How do I figure out the position and size of a single sprite in a sprite sheet?
In the book (breakout game chapter 3) ben writes this
GamePaddleRect = new Rectangle(39, 1, 93, 23),
GameBallRect = new Rectangle(1, 1, 36, 36),
GameBlockRect = new Rectangle(136, 1, 62, 27),
GameYouWonRect = new Rectangle(2, 39, 92, 21),
GameYouLostRect = new Rectangle(105, 39, 94, 21);
// Make sure paddle stay between 0 and 1 (offset 0.05f for paddle width)
if (paddlePosition < 0.05f)
paddlePosition = 0.05f;
Ok, now ive got the coordinates out of the code and i can use them.
But how can I get these values out of the image itself?
Is there a program for this, or do you just know them if you created the spritesheet yourself?