Original Post
🔒 Locked
Please Help me.
Advertisement
The short answer is "it depends on how you handle stuff in your program."
Unfortunatly for you, it''s also the long answer right now.
How does your program work? What kind of objects do you mean? Are you talking about sprites, for instance? Or tiles? Either way, you''d probably want to do something like setting a "selected" flag on or off depending on what you click on. It''s really hard to give you a proper answer without knowing what it is you want to do in more details, frankly.
Unfortunatly for you, it''s also the long answer right now.
How does your program work? What kind of objects do you mean? Are you talking about sprites, for instance? Or tiles? Either way, you''d probably want to do something like setting a "selected" flag on or off depending on what you click on. It''s really hard to give you a proper answer without knowing what it is you want to do in more details, frankly.
quote:
Original post by pcman
I''m new in DDraw. I got a question.
How to select an object with mouse left-click in DDraw ?
By writing a lot of code.
You''ll need to keep track of the locations of everything you blit to the screen - a structure containing each drawn item (its original surface and location on that surface - i.e. where it''s being blitted *from*) and its current bounding box (where it is being blitted *to*). Then when the user clicks the mouse, you retrieve the coordinates, and compare against all the bounding boxes of all items on the screen that you''ve been keeping track of.
quote:
Original post by BriTegquote:
Original post by pcman
I''m new in DDraw. I got a question.
How to select an object with mouse left-click in DDraw ?
By writing a lot of code.
You''ll need to keep track of the locations of everything you blit to the screen - a structure containing each drawn item (its original surface and location on that surface - i.e. where it''s being blitted *from*) and its current bounding box (where it is being blitted *to*). Then when the user clicks the mouse, you retrieve the coordinates, and compare against all the bounding boxes of all items on the screen that you''ve been keeping track of.
But, Starcraft of Blizzard use same detectiongs ?
It runs well on the Pentium MMX CPU.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement