1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
#include <iostream>
using namespace std;
int level = 2;
char Level_Map;
void Level1();
void Level2();
void Level3();
char map[100][100] = Level_Map[100][100];
int main()
{
if(Level == 1) //and this is where the char map should be made to equal the map shown in Level1()
{
Level1();
for(int display=0; display<26; display++)
{
cout << map[display] << endl;
}
}
if(Level == 2) //and this is where the char map should be made to equal the map shown in Level2()
{
Level2();
for(int display=0; display<26; display++)
{
cout << map[display] << endl;
}
}
if(Level == 3) //and this is where the char map should be made to equal the map shown in Level3()
{
Level3();
for(int display=0; display<26; display++)
{
cout << map[display] << endl;
}
}
//and then the movement of the character and colision test
if(GetAsyncKeyState(VK_DOWN)) // or up or left or right but you get it
{
int y2 = y+1;
if(map[y2][x] == '+') // and if '-' then Level - 1;
{
Level = Level + 1;
}
}
void Level1()
{
Level[100][100] =
{
"########",
"# #",
"# @ #",
"# #",
"# #",
"# + #",
"########"
};
}
void Level2()
{
Level[100][100] =
{
"########",
"# #",
"# @ #",
"# #",
"# #",
"# - + #",
"########"
};
}
void Level3()
{
Level[100][100] =
{
"########",
"# #",
"# @ #",
"# #",
"# #",
"# - #",
"########"
};
}
|