Advertisement
Guest User

Untitled

a guest
Oct 29th, 2012
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1.     int index = get_pixel_index(100, 100, TitleScreenBG->w);
  2.    
  3.     Uint32 *all_pixels = (Uint32*) TitleScreenBG->pixels; //Get all pixels from surface.
  4.    
  5.     Uint32 pixelint = all_pixels[index];//Get specific pixel   
  6.    
  7.     pixelint = SDL_MapRGBA(TitleScreenBG->format, red, green, blue, alpha);
  8.    
  9.     cout << pixelint << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement