mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Remove map.numshinytrinkets
This removes map.numshinytrinkets in favor of using map.shinytrinkets.size(). Having automatic length tracking is much less error-prone and less tedious.
This commit is contained in:
parent
4f7290440b
commit
76e3b3ede4
3 changed files with 2 additions and 4 deletions
|
@ -430,7 +430,6 @@ void mapclass::initmapdata()
|
||||||
setteleporter(18, 1);
|
setteleporter(18, 1);
|
||||||
setteleporter(18, 7);
|
setteleporter(18, 7);
|
||||||
|
|
||||||
numshinytrinkets = 18;
|
|
||||||
settrinket(14, 4);
|
settrinket(14, 4);
|
||||||
settrinket(13, 6);
|
settrinket(13, 6);
|
||||||
settrinket(11, 12);
|
settrinket(11, 12);
|
||||||
|
|
|
@ -154,7 +154,6 @@ public:
|
||||||
std::vector<point> teleporters;
|
std::vector<point> teleporters;
|
||||||
std::vector<point> shinytrinkets;
|
std::vector<point> shinytrinkets;
|
||||||
|
|
||||||
int numshinytrinkets;
|
|
||||||
bool showteleporters, showtargets, showtrinkets;
|
bool showteleporters, showtargets, showtrinkets;
|
||||||
|
|
||||||
//Roomtext
|
//Roomtext
|
||||||
|
|
|
@ -2026,7 +2026,7 @@ void maprender()
|
||||||
|
|
||||||
if (map.showtrinkets)
|
if (map.showtrinkets)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < map.numshinytrinkets; i++)
|
for (size_t i = 0; i < map.shinytrinkets.size(); i++)
|
||||||
{
|
{
|
||||||
if (!obj.collect[i])
|
if (!obj.collect[i])
|
||||||
{
|
{
|
||||||
|
@ -2837,7 +2837,7 @@ void teleporterrender()
|
||||||
|
|
||||||
if (map.showtrinkets)
|
if (map.showtrinkets)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < map.numshinytrinkets; i++)
|
for (size_t i = 0; i < map.shinytrinkets.size(); i++)
|
||||||
{
|
{
|
||||||
if (!obj.collect[i])
|
if (!obj.collect[i])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue