• Advertisement

Archived

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

Why the PixelCheck does not work???

This topic is 6378 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
It''s bug of the old version of DelphiX, but I believe that the new version of DelphiX ( with directX7 ) has fixed the bug.

Share this post


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

  • Advertisement