Jump to content
  • Advertisement

Archived

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

Chris F

help a newbie

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

Just browsing through, but thought I might give a quick hack to at least clean up the visual side of this problem. If you're using tiles of 32x32 for example, draw a black border of this size right around the screen before performing the screen swap. Ok you will lose some of the screen res but this is the quickest/dirtiest way I can think of. Of course more experienced DirectX programmers will know more than I do......

Regards

Matt

Share this post


Link to post
Share on other sites
Advertisement
You have to check if a tile is on the edge of a screen first, then ajust the source and destination rect's acordingly. So if your tiles are 32x32 and you are bliting your first tile in the upper left and half of the tile is off the screen then you would change your both your rect's left field to 16. Or you could use a clipper, but I think that this way would be faster.

Share this post


Link to post
Share on other sites
ok, ive worked out how to blt all the tiles, and scroll the map the only problem is if a tiles position overlaps the edge of the screen, the tile wont show up on the screen, i really dont know why this is and i cant seem to find a solution, please help me, im using directx and c++, thanks in advance for any help.

Share this post


Link to post
Share on other sites
thanks, im using the clipper at the moment as thats the way i tried to do it before i read your post, but ill use the rect way now, thanks again, later

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!