Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int index = get_pixel_index(100, 100, TitleScreenBG->w);
- Uint32 *all_pixels = (Uint32*) TitleScreenBG->pixels; //Get all pixels from surface.
- Uint32 pixelint = all_pixels[index];//Get specific pixel
- pixelint = SDL_MapRGBA(TitleScreenBG->format, red, green, blue, alpha);
- cout << pixelint << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement