Jump to content
  • Advertisement

Archived

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

alkirah

Question about direct draw & surfaces

This topic is 5141 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

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
Advertisement
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
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!