Esempio n. 1
0
int main( int argc, char* argv[] )
{
  if( argc == 1 ) {
    std::cout <<" !!  ERROR !! Expecting a command-argument from '0' to '6'.\n";
    return -1;
  }

  std::cerr <<"Hello!\n";
  Tester test;

  if( *argv[1] > '0' )
    test.Init();

  if( *argv[1] > '1' )
    test.Window( "Test memory leak with Valgrind.", 300, 200 );

  if( *argv[1] > '2' )
    test.Renderer();

  if( *argv[1] > '3' )
    test.Load_surface( "Image.png" );

  if( *argv[1] > '4' )
    test.Load_texture();

  if( *argv[1] > '5' ) {
    std::cout <<"Wait for input...\n";
    SDL_Delay( 1000 );
    test.Update();
  }

  std::cerr <<"Bye!\n";
  return 0;
}