All pastes #393792 Raw Edit

mar77a

public cpp v1 · immutable
·published 2007-03-13 21:15 UTC
rendered paste body
void Dot::handle_input(){      //Get the keystates    Uint8 *keystate = SDL_GetKeyState( NULL );          //If a key was pressed      if( event.type == SDL_KEYDOWN )      {          //Adjust the velocity          switch( event.key.keysym.sym )          {              case SDLK_UP:                 yVel -= yAcc;                break;              case SDLK_DOWN:                 yVel += yAcc;                break;              case SDLK_LEFT:                 xVel -= xAcc;                break;              case SDLK_RIGHT:                 xVel += xAcc;                break;              }                }      }