Locking DirectDraw Surfaces *[Resolved]*
If I Lock a section of a surafce, area O1 (which is a RECT), then call GetLockedArray B1() should I just get a byte array for the locked area or does it give me the whole surface?
VB Code:
Sur1.Lock O1, Sur1Desc, DDLOCK_WAIT, 0
Sur1.GetLockedArray B1()
For i = 0 To UBound(B1, 1) - 1 Step 3
For j = 0 To UBound(B1, 2)
Next
Next
Sur1.Unlock O1
When I do this it seems to give an area bigger than O1. I'm not sure wheather I should be using Step 4 instead of 3 because its running in 32bit but "(UBound(B1, 1) - 1)/3" is 42 and "(UBound(B1, 1) - 1)/4" is 31.5 for a 32*32 surface, and if theres a remander theres bytes getting missed.Mind "UBound(B1, 2)" is 31 so step 4 would make sense, apart from the remander, because that means 32 elements each way.
Could someone please point me in the right direct. Thanx.