PDA

View Full Version : [shouting] Does anybody have an example of using lock and unlock? [/shouting]



incognito
05-15-2002, 08:43 PM
I am having problems with this, so I am looking for a little piece of code that uses this, so I can try and make some sense of it, please contribute if you could. :)

jdinger
05-15-2002, 09:06 PM
You would use lock and unlock to manipulate the surface by individual pixel changes. The only examples I've ever seen for it (I don't use lock/unlock, don't have a need for it) were to do a pixel-perfect collision detection test or to do some special effects (like fire) by changing pixels.

Shiro
05-16-2002, 02:36 PM
What do you want to lock and unlock?

incognito
05-16-2002, 02:41 PM
Originally posted by Shiro
What do you want to lock and unlock?

just anything, I want to see a code of it at work, because the book doesn't explain it real good. I want to see it at work.

jdinger
05-16-2002, 02:50 PM
Originally posted by Shiro
What do you want to lock and unlock?

He's talking about locking/unlocking DirectDraw surfaces.

El, check out this (http://www.gamedev.net/reference/articles/article588.asp) for a code example.