mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01: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:
parent
cb3afa295a
commit
a1d4523177
2 changed files with 9 additions and 10 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue