mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-09 10:29:45 +01:00
Unindent case labels in entity creation
Everyone knows that best practice is to put case labels on the same line as the switch statement...
This commit is contained in:
parent
fd2ee96c49
commit
4b6406d08e
1 changed files with 16 additions and 16 deletions
|
@ -1689,7 +1689,7 @@ void mapclass::loadlevel(int rx, int ry)
|
||||||
const int ex = (edentity[edi].x % 40) * 8;
|
const int ex = (edentity[edi].x % 40) * 8;
|
||||||
const int ey = (edentity[edi].y % 30) * 8;
|
const int ey = (edentity[edi].y % 30) * 8;
|
||||||
switch(edentity[edi].t){
|
switch(edentity[edi].t){
|
||||||
case 1: //Enemies
|
case 1: //Enemies
|
||||||
int bx1, by1, bx2, by2;
|
int bx1, by1, bx2, by2;
|
||||||
bx1=ed.level[rx-100+((ry-100)*ed.maxwidth)].enemyx1;
|
bx1=ed.level[rx-100+((ry-100)*ed.maxwidth)].enemyx1;
|
||||||
by1=ed.level[rx-100+((ry-100)*ed.maxwidth)].enemyy1;
|
by1=ed.level[rx-100+((ry-100)*ed.maxwidth)].enemyy1;
|
||||||
|
@ -1703,7 +1703,7 @@ void mapclass::loadlevel(int rx, int ry)
|
||||||
obj.createentity(ex, ey, 56,
|
obj.createentity(ex, ey, 56,
|
||||||
edentity[edi].p1, 4, bx1, by1, bx2, by2);
|
edentity[edi].p1, 4, bx1, by1, bx2, by2);
|
||||||
break;
|
break;
|
||||||
case 2: //Platforms and Threadmills
|
case 2: //Platforms and Threadmills
|
||||||
if(edentity[edi].p1<=4){
|
if(edentity[edi].p1<=4){
|
||||||
int bx1, by1, bx2, by2;
|
int bx1, by1, bx2, by2;
|
||||||
bx1=ed.level[rx-100+((ry-100)*ed.maxwidth)].platx1;
|
bx1=ed.level[rx-100+((ry-100)*ed.maxwidth)].platx1;
|
||||||
|
@ -1721,32 +1721,32 @@ void mapclass::loadlevel(int rx, int ry)
|
||||||
edentity[edi].p1+3, 4);
|
edentity[edi].p1+3, 4);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3: //Disappearing platforms
|
case 3: //Disappearing platforms
|
||||||
obj.createentity(ex, ey, 3);
|
obj.createentity(ex, ey, 3);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
obj.createentity(ex, ey, 9, ed.findtrinket(edi));
|
obj.createentity(ex, ey, 9, ed.findtrinket(edi));
|
||||||
break;
|
break;
|
||||||
case 10: //Checkpoints
|
case 10: //Checkpoints
|
||||||
obj.createentity(ex, ey, 10,
|
obj.createentity(ex, ey, 10,
|
||||||
edentity[edi].p1,((rx+(ry*100))*20)+tempcheckpoints);
|
edentity[edi].p1,((rx+(ry*100))*20)+tempcheckpoints);
|
||||||
tempcheckpoints++;
|
tempcheckpoints++;
|
||||||
break;
|
break;
|
||||||
case 11: //Gravity Lines
|
case 11: //Gravity Lines
|
||||||
if(edentity[edi].p1==0){ //Horizontal
|
if(edentity[edi].p1==0){ //Horizontal
|
||||||
obj.createentity((edentity[edi].p2*8), ey + 4, 11, edentity[edi].p3);
|
obj.createentity((edentity[edi].p2*8), ey + 4, 11, edentity[edi].p3);
|
||||||
}else{ //Vertical
|
}else{ //Vertical
|
||||||
obj.createentity(ex + 3,(edentity[edi].p2*8), 12, edentity[edi].p3);
|
obj.createentity(ex + 3,(edentity[edi].p2*8), 12, edentity[edi].p3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 13: //Warp Tokens
|
case 13: //Warp Tokens
|
||||||
obj.createentity(ex, ey, 13, edentity[edi].p1, edentity[edi].p2);
|
obj.createentity(ex, ey, 13, edentity[edi].p1, edentity[edi].p2);
|
||||||
break;
|
break;
|
||||||
case 15: //Collectable crewmate
|
case 15: //Collectable crewmate
|
||||||
obj.createentity(ex - 4, ey + 1, 55, ed.findcrewmate(edi), edentity[edi].p1, edentity[edi].p2);
|
obj.createentity(ex - 4, ey + 1, 55, ed.findcrewmate(edi), edentity[edi].p1, edentity[edi].p2);
|
||||||
break;
|
break;
|
||||||
case 17: //Roomtext!
|
case 17: //Roomtext!
|
||||||
{
|
{
|
||||||
roomtexton = true;
|
roomtexton = true;
|
||||||
Roomtext text;
|
Roomtext text;
|
||||||
text.x = ex / 8;
|
text.x = ex / 8;
|
||||||
|
@ -1754,9 +1754,9 @@ void mapclass::loadlevel(int rx, int ry)
|
||||||
text.text = edentity[edi].scriptname;
|
text.text = edentity[edi].scriptname;
|
||||||
roomtext.push_back(text);
|
roomtext.push_back(text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 18: //Terminals
|
case 18: //Terminals
|
||||||
{
|
{
|
||||||
obj.customscript=edentity[edi].scriptname;
|
obj.customscript=edentity[edi].scriptname;
|
||||||
|
|
||||||
int usethistile = edentity[edi].p1;
|
int usethistile = edentity[edi].p1;
|
||||||
|
@ -1776,8 +1776,8 @@ void mapclass::loadlevel(int rx, int ry)
|
||||||
obj.createentity(ex, usethisy + 8, 20, usethistile);
|
obj.createentity(ex, usethisy + 8, 20, usethistile);
|
||||||
obj.createblock(5, ex - 8, usethisy + 8, 20, 16, 35);
|
obj.createblock(5, ex - 8, usethisy + 8, 20, 16, 35);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 19: //Script Box
|
case 19: //Script Box
|
||||||
if (INBOUNDS_ARR(tempscriptbox, game.customscript))
|
if (INBOUNDS_ARR(tempscriptbox, game.customscript))
|
||||||
{
|
{
|
||||||
game.customscript[tempscriptbox]=edentity[edi].scriptname;
|
game.customscript[tempscriptbox]=edentity[edi].scriptname;
|
||||||
|
@ -1786,7 +1786,7 @@ void mapclass::loadlevel(int rx, int ry)
|
||||||
edentity[edi].p1*8, edentity[edi].p2*8, 300+tempscriptbox, "custom_" + edentity[edi].scriptname);
|
edentity[edi].p1*8, edentity[edi].p2*8, 300+tempscriptbox, "custom_" + edentity[edi].scriptname);
|
||||||
tempscriptbox++;
|
tempscriptbox++;
|
||||||
break;
|
break;
|
||||||
case 50: //Warp Lines
|
case 50: //Warp Lines
|
||||||
obj.customwarpmode=true;
|
obj.customwarpmode=true;
|
||||||
if(edentity[edi].p1==0){ //
|
if(edentity[edi].p1==0){ //
|
||||||
obj.createentity(ex + 4,(edentity[edi].p2*8), 51, edentity[edi].p3);
|
obj.createentity(ex + 4,(edentity[edi].p2*8), 51, edentity[edi].p3);
|
||||||
|
|
Loading…
Reference in a new issue