mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Dynamically add teleporters instead of using indices
That is, instead of doing the following:
teleporters[0] = ...;
teleporters[1] = ...;
teleporters[2] = ...;
...
Instead do:
teleporters.push_back(...);
teleporters.push_back(...);
teleporters.push_back(...);
...
This commit is contained in:
@@ -57,7 +57,6 @@ mapclass::mapclass()
|
|||||||
for (int i = 0; i < 30; i++)
|
for (int i = 0; i < 30; i++)
|
||||||
{
|
{
|
||||||
vmult.push_back(int(i * 40));
|
vmult.push_back(int(i * 40));
|
||||||
teleporters.push_back(point());
|
|
||||||
shinytrinkets.push_back(point());
|
shinytrinkets.push_back(point());
|
||||||
}
|
}
|
||||||
//We create a blank map
|
//We create a blank map
|
||||||
@@ -126,8 +125,10 @@ int mapclass::intpol(int a, int b, float c)
|
|||||||
|
|
||||||
void mapclass::setteleporter(int t, int x, int y)
|
void mapclass::setteleporter(int t, int x, int y)
|
||||||
{
|
{
|
||||||
teleporters[t].x = x;
|
point temp;
|
||||||
teleporters[t].y = y;
|
temp.x = x;
|
||||||
|
temp.y = y;
|
||||||
|
teleporters.push_back(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mapclass::settrinket(int t, int x, int y)
|
void mapclass::settrinket(int t, int x, int y)
|
||||||
|
|||||||
Reference in New Issue
Block a user