What I am trying to accomplish is to "color in" sections of a blank bmap based on the color values in another bmap. For example, for every red pixel (R=250, G=0, B=0) in the primary bitmap, write a blue pixel (R=0, G=0, B=250) to the second bmap at the same location in the bmap. (Both bmaps are the same resolution, so im drawing a blue pixel in the second bmap everywhere there is a red pixel in the first bmap, essentially.)
Good catch on passing the parameter. I had forgotten about passing a pointer instead of the struct itself. I corrected that, but the code still does not write a pixel to temp_bmap. As I said, I know that the pixel_to_bmap() instruction is being reached and that it is being executed, but it does not write a pixel to the second bmap. At runtime, the second bmap is completely blank.
You state that when calling pixel_to_vec() you have to pass the address of the color variable instead of the variable itself. (IE "pixel_to_vec(&vec_color, &pixel_transparency, format, pixel);" instead of "pixel_to_vec(vec_color, ppixel_transparency, format, pixel);". I know for a fact that I can pass vec_color and not &vec_color - I have another routine that is working just fine using the variable instead of the address.
In your code, when you call pixel_to_bmap(), you are passing the bmap pointer, the x & y co-ordinates, and a pixel value converted by pixel_for_vec(). Im essentially doing the exact same thing in my code, yet yours works and mine doesnt? The only thing you are doing differently is passing a vector() to pixel_for_vec() instead of a COLOR value. a COLOR value is still a vector, im pretty sure thats not the problem.
I'm sorry, I think im just missing your point. What is it that the greyscale code you showed me does differently from the way im doing things?