Original Post
I have a map that is loaded into a seprate directx surface and im trying to figure out exactly how to move around on it i can load it up on a normal 640, 480 surface and veiw it.
One way i tried was by doing this
I made the map surface(1024, 1024) witch is the size of the map.
Then I put each tile(10, 10) into the map each tile is located on the map and I raise the x, y corridnate by having a loop that goes through and does iteration*10 to get the x, y.
Then after they are loaded onto the surface i had it so when the player moved it changed the x and y offset of the map and changed the Rect Displayed on the sceen like this
RECT rcRect;
rcRect.left = Map.xOff;
rcRect.top = Map.yOff;
rcRect.right = Map.xOff + 640; // 640 is screen width
rcRect.bottom = Map.yOff + 480; // 480 is screen height
Then I blt the screen of the map to the back buffer surface and flip that with the primary(only once frame is done being made) its not working for some reason can someone help?
Also am I even going into the correct direction im quite sure the loading of the map is correct but the whole way im moving the tiles around doesn''t seem to work very well. Can someone tell me if I am or not or of a place to find the correct way to do it or even just explain here.