First off @ MarauderIIC:
Is this at all similar to what you tried to explain?:
level.txt
Code: Select all
//tilex, tiley, levelx, levely
32 32 160 160
tiles.txt
tile 2 0 0
tile 4 1 0
tile 1 2 0
tile 1 3 0
tile 0 4 0
tile 3 0 1
tile 3 1 1
tile 2 2 1
tile 2 3 1
tile 0 4 1
tile 2 0 2
tile 0 1 2
tile 1 2 2
tile 1 3 2
tile 1 4 2
tile 0 0 3
tile 2 1 3
tile 4 2 3
tile 1 3 3
tile 1 4 3
tile 4 0 4
tile 3 1 4
tile 0 2 4
tile 3 3 4
tile 3 4 4
Code: Select all
a.png 0 //tile 0
b.png 0 //tile 1
c.png 0 //tile 2
a.png 1 //tile 3 (same as tile 0 but with collision)
b.png 1 //tile 4 (same as tile 1 but with collision)
This is what my map file looks like at the moment:
test.map (line 1 is tilex, tiley, levelx, levely, -1 to terminate):
Code: Select all
32 32 640 480 -1
21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21
21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21
21 21 21 21 21 21 21 21 21 27 32 32 32 39 21 21 21 21 21 21
21 21 21 36 21 21 21 21 21 38 21 21 21 28 31 21 21 21 21 21
21 21 21 29 32 32 32 32 32 41 21 21 21 38 21 21 21 21 21 21
21 21 21 21 21 21 21 21 21 21 21 21 21 38 21 21 21 21 21 21
21 21 21 21 21 21 21 21 21 21 21 21 21 28 32 31 21 21 21 21
21 21 21 27 32 32 32 32 32 32 32 32 32 41 21 21 21 21 21 21
21 21 21 38 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21
21 21 21 38 21 27 32 32 32 32 39 21 21 21 21 21 21 21 21 21
21 21 21 38 21 38 21 21 21 21 38 21 21 21 21 21 21 21 21 21
21 21 21 38 21 38 21 21 21 21 38 21 21 21 21 21 21 21 21 21
21 21 21 38 21 29 32 33 33 32 41 21 21 27 32 32 39 21 21 21
21 21 21 38 21 21 21 38 38 21 21 21 21 38 21 21 29 31 21 21
21 21 21 29 32 32 32 35 35 32 32 32 32 41 21 21 21 21 21 21
Code: Select all
class Level
{
private:
int mapData[20][15];
public:
Level();
int Load( std::string filename );
int Draw();
};
Thanks in advance for any help
-Dan