Original Post
First of all, thanks for anyone who can help me out. I tried looking through SDL documentation and doing google searches but nothing helped me out with this. I have two main questions: 1. If an SDL_Surface uses 32bit pixel data, I know how to pull a single pixel's information and store it in a Uint32, but how would I modify the single pixel data once it is in the Uint32 format? Specifically, I want to be able to modify the pixel's alpha value, and place it into a new SDL_Surface. 2. This is why the first question is relevant. Basically what I want to do is use, in the source image for my SDL_surface that will hold my sprites, an alpha mask for every sprite. Basically, for every sprite on my sprite sheet, I want a corresponding alpha mask that is black and white, where the percentage that a pixel is black corresponds with the percentage I want that pixel on the sprite to be alpha'd. My question is: is there a super simple way to do this (that SDL provides specifically for this purpose, perhaps), or would I have to use the pixel-by-pixel manipulation method I plan on using with the knowledge gained by question one?