1
0
Fork 0
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:
Misa 2020-04-14 19:39:08 -07:00 committed by Ethan Lee
parent 4f7290440b
commit 76e3b3ede4
3 changed files with 2 additions and 4 deletions

View file

@ -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);

View file

@ -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

View file

@ -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])
{ {