Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#Actualrip-off

Posted 15 September 2013 - 05:26 PM

Here is what the code you posted does:

  • You initialise mx and my to zero
  • You append these values into the stringstreams
  • You render these stringstreams to SDL_Surfaces
  • If a mouse event occurred, you update the mx and my variables using SDL_GetMouseState()
  • You blit the surfaces to the game surface

Note that the order of operations is very important. You need to update the variables before appending them to the stringstream.


#2rip-off

Posted 15 September 2013 - 05:25 PM

Here is what the code you posted does:

 

  • You initialise mx and my to zero

     

     

  • You append these values into the stringstreams

     

     

  • You render these stringstreams to SDL_Surfaces

     

     

  • If a mouse event occurred, you update the mx and my variables using SDL_GetMouseState()

     

     

  • You blit the surfaces to the game surface

     

     

 

Note that the order of operations is very important. You need to update the variables before appending them to the stringstream.


#1rip-off

Posted 15 September 2013 - 05:25 PM

Here is what the code you posted does:

  • You initialise mx and my to zero

  • You append these values into the stringstreams

  • You render these stringstreams to SDL_Surfaces

  • If a mouse event occurred, you update the mx and my variables using SDL_GetMouseState()

  • You blit the surfaces to the game surface

Note that the order of operations is very important. You need to update the variables before appending them to the stringstream.


PARTNERS