help a newbie

Started by
2 comments, last by Chris F 24 years, 3 months ago
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

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.
William Reiach - Human Extrodinaire

Marlene and Me


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.
"I have realised that maths can explain everything. How it can is unimportant, I want to know why." -Me
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
"I have realised that maths can explain everything. How it can is unimportant, I want to know why." -Me

This topic is closed to new replies.

Advertisement