Archived

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

Chris F

help a newbie

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