Why the PixelCheck does not work???
Someone could tell me what I am making in wrong for the property PixelCheck simply not work?
I am working in 640x480x16, and the sprites stills colliding using the transparent rectangle. This annoyed me to the point to create one another method of collision check that generated the next problem!
It''s bug of the old version of DelphiX, but I believe that the new version of DelphiX ( with directX7 ) has fixed the bug.
Well you can solve this problem by your own. Open the dxsprite.pas and search for the ImageCollisionTest function. Some lines later (after the pixelcheck comment) you can find 4 times these two lines:
P1 := Pointer(Integer(ddsd1.lpSurface)+y*ddsd1.lPitch);
P2 := Pointer(Integer(ddsd1.lpSurface)+y*ddsd2.lPitch);
But the first "1" in the second line have to be a "2". If you change this for every bit depth than the pixelcheck works fine.
Neo
www.neobrothers.de
Remark: The bug is corrected in DelphiX 7
P1 := Pointer(Integer(ddsd1.lpSurface)+y*ddsd1.lPitch);
P2 := Pointer(Integer(ddsd1.lpSurface)+y*ddsd2.lPitch);
But the first "1" in the second line have to be a "2". If you change this for every bit depth than the pixelcheck works fine.
Neo
www.neobrothers.de
Remark: The bug is corrected in DelphiX 7
quote:Original post by Neo[NB]
Well you can solve this problem by your own. Open the dxsprite.pas and search for the ImageCollisionTest function. Some lines later (after the pixelcheck comment) you can find 4 times these two lines:
P1 := Pointer(Integer(ddsd1.lpSurface)+y*ddsd1.lPitch);
P2 := Pointer(Integer(ddsd1.lpSurface)+y*ddsd2.lPitch);
But the first "1" in the second line have to be a "2". If you change this for every bit depth than the pixelcheck works fine.
Neo
www.neobrothers.de
Remark: The bug is corrected in DelphiX 7
Thank you very much!!!! Now I know why this fucking collision detection didn''t worked all the years :-)
Thank you very much!!!! Now I know why this fucking collision detection didn''t worked all the years :-)
-------
sorry, I forgot to enter my username/pass in this form
ZOK-Software development
http://www.finalfighter.com
http://www.zoksoftware.com
-------
sorry, I forgot to enter my username/pass in this form
ZOK-Software development
http://www.finalfighter.com
http://www.zoksoftware.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement