View Single Post
  #1 (permalink)  
Old May 17th, 2007, 03:35 PM
mcleod mcleod is offline
Registered User
 
Join Date: May 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 2: width/height

I know I must be overlooking it, but where do the width and height variables get declared in the Pong game? Here's a sample of the code using it:

spriteBatch.Draw(sprite.texture,
                    new Rectangle(
                    sprite.rect.X * width / 1024,
                    sprite.rect.Y * height / 768,
                    sprite.rect.Width * width / 1024,
                    sprite.rect.Height * height / 768),
                    sprite.sourceRect, sprite.color);