Advertisement

How do I get and put specific pixels in DDraw?

Started by January 30, 2000 02:39 PM
1 comment, last by Bucket_Head 25 years, 1 month ago
Hey there, what I''m trying to do is take a direct draw surface, check a specific pixel and get the value, and then change it by some variable and put it back...Anyone here know the quickest/easiest/best way to do this? Thanks for your time... - Ah, to write code; to compose electrical music, to manipulate the bits that make up everything...such is our chosen line of work. And for a game, no less!
- Hai, watashi no chichi no kuruma ga oishikatta desu!...or, in other words, "Yes, my dad's car was delicious!"
...Well actually (heh) I guess its more accurate to say that I want to take an 8 bit surface, copy it into a char array, and then make a copy of that, so I have two char arrays...then I will check each element of one array and based on certain circumstances, will overwrite the same element on the copy array...once it''s all done, I want to re-copy the 2nd char array back over the surface, so I get a fully updated image...Any help would be much appreciated...

- Ah, to write code; to compose electrical music, to manipulate the bits that make up everything...such is our chosen line of work. And for a game, no less!
- Hai, watashi no chichi no kuruma ga oishikatta desu!...or, in other words, "Yes, my dad's car was delicious!"
Advertisement
i think the only good way to do that is to get a pointer to your surface using Lock, do your work, Unlock the surface.

cyberg
cyberg- cyberg_coder@hotmail.com- http://members.xoom.com/cybergsoft

This topic is closed to new replies.

Advertisement