1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Clean up style of room wrap for-loops

They no longer mix code and declarations and now use a pre-increment.
This commit is contained in:
Misa 2021-04-22 15:31:23 -07:00 committed by Ethan Lee
parent 53b3811a4d
commit 285fc24513

View file

@ -958,7 +958,8 @@ void gamelogic(void)
//Finally: Are we changing room?
if (map.warpx && !map.towermode)
{
for (size_t i = 0; i < obj.entities.size(); i++)
size_t i;
for (i = 0; i < obj.entities.size(); ++i)
{
if(obj.entities[i].type<50 //Don't warp warp lines
&& obj.entities[i].size < 12) //Don't wrap SWN enemies
@ -1012,7 +1013,8 @@ void gamelogic(void)
if (map.warpy && !map.towermode)
{
for (size_t i = 0; i < obj.entities.size(); i++)
size_t i;
for (i = 0; i < obj.entities.size(); ++i)
{
if(obj.entities[i].type<50){ //Don't warp warp lines
if (obj.entities[i].yp <= -12)
@ -1039,7 +1041,8 @@ void gamelogic(void)
if (map.warpy && !map.warpx && !map.towermode)
{
for (size_t i = 0; i < obj.entities.size(); i++)
size_t i;
for (i = 0; i < obj.entities.size(); ++i)
{
if(obj.entities[i].type<50 //Don't warp warp lines