1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-18 10:38:31 +02:00

Turn areamap into plain array

For this one, I had to make it a static data member and then initialize
it in a certain way in Map.cpp. It's pretty cool that you're able to do
this.
This commit is contained in:
Misa 2020-07-02 21:13:23 -07:00 committed by Ethan Lee
parent cb3afa295a
commit a1d4523177
2 changed files with 9 additions and 10 deletions

View File

@ -74,8 +74,13 @@ mapclass::mapclass()
specialnames.resize(8);
resetnames();
//Areamap starts at 100,100 and extends 20x20
const int tmap[] = {
ypos = 0;
oldypos = 0;
bypos = 0;
}
//Areamap starts at 100,100 and extends 20x20
const int mapclass::areamap[] = {
1,2,2,2,2,2,2,2,0,3,0,0,0,4,4,4,4,4,4,4,
1,2,2,2,2,2,2,0,0,3,0,0,0,0,4,4,4,4,4,4,
0,1,0,0,2,0,0,0,0,3,0,0,0,0,4,4,4,4,4,4,
@ -96,13 +101,7 @@ mapclass::mapclass()
0,2,2,2,2,2,2,2,0,3,0,0,0,0,0,0,0,0,0,0,
2,2,2,2,2,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,
2,2,2,2,2,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,
};
areamap.insert(areamap.end(), tmap, tmap+400);
ypos = 0;
oldypos = 0;
bypos = 0;
}
};
int mapclass::RGB(int red,int green,int blue)
{

View File

@ -81,7 +81,7 @@ public:
int roomdeaths[20 * 20];
int roomdeathsfinal[20 * 20];
std::vector <int> areamap;
static const int areamap[20 * 20];
std::vector <int> contents;
bool explored[20 * 20];
std::vector <int> vmult;