map question
ok i have my map like so:
000000000
000000000
001110000
001110000
000000000
and this map is 40x40 tiles
now how do i make it so that after i have blitted everything on the map i want the map x,y coords to start at the first 1 which is lets say 100,100
I take it you want a wrap around world map?
if so it''s easy :
as you move across the map mod the xpos with the maximum size of the map i.e.
xp = xp % wolrdwidth
and do the same for the height.
if so it''s easy :
as you move across the map mod the xpos with the maximum size of the map i.e.
xp = xp % wolrdwidth
and do the same for the height.
When I find my code in tons of trouble,Friends and colleages come to me,Speaking words of wisdom:"Write in C."My Web Site
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement