Archived

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

alkirah

Question about direct draw & surfaces

Recommended Posts

alkirah    122
Hi, i''m doing an Online Role Playing Game and I''m wondering if I could do something. i''ve search the net and didn''t found how to do it. I want to be able to know which directdraw7 surface my mouse is over. So if an item is on the ground, i wanna be able to put a palette on it to make it clearer and write a text up of the item. I have tons of more things to do with it but you should understand with it. If my mouse is over the item, I wanna know what is the surface just down the mouse. I''ve seen it in many games but I didn''t found how to do it on the internet...

Share this post


Link to post
Share on other sites
alkirah    122
Hi, thx for the answer, it is not a bad idea but what about if I have a colorkey? is it possible to get only pixels that are blittered on the screen buffer?

so If I have 2 items at the same pos, I would be able to select either 1 of the other if they r not identicly of the same shape ...?

Share this post


Link to post
Share on other sites
alkirah    122
Yes, it is exactly this Miksan, i know it is a lot more tricky but I was wondering if there is a function that come with DirectX that would return a ptr or wathever that could be useful to get it like LPDIRECTDRAWSURFACE7 * getsurfaceundermouse(int x, int y) or if someone have already done something similar that can paste a little exemple on how it could be done ...

If not, i''ll have to go with what u say first ... saving my rect used to draw sprite and do a mouse check ...

Share this post


Link to post
Share on other sites