Archived

This topic is now archived and is closed to further replies.

L-Tryosine

Why the PixelCheck does not work???

Recommended Posts

L-Tryosine    122
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!

Share this post


Link to post
Share on other sites
Neo[NB]    122
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
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 :-)


Share this post


Link to post
Share on other sites
type4    122
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

Share this post


Link to post
Share on other sites