mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Replace if.. by switch
This commit is contained in:
parent
7965f0e477
commit
ab80a8fcc1
@ -1158,29 +1158,27 @@ void CDecor::MoveFire (Sint32 rank)
|
|||||||
if (m_decor[x / 2][y / 2].fire == DIMOBJY)
|
if (m_decor[x / 2][y / 2].fire == DIMOBJY)
|
||||||
{
|
{
|
||||||
icon = m_decor[x / 2][y / 2].floorIcon;
|
icon = m_decor[x / 2][y / 2].floorIcon;
|
||||||
if (icon == 20) // herbe foncée ?
|
switch (icon)
|
||||||
{
|
{
|
||||||
|
case 20: // herbe foncée ?
|
||||||
PutFloor (GetCel (x, y), CHFLOOR, 19); // herbe brulée
|
PutFloor (GetCel (x, y), CHFLOOR, 19); // herbe brulée
|
||||||
}
|
break;
|
||||||
if (icon == 59) // pont ?
|
case 59: // pont ?
|
||||||
{
|
|
||||||
PutFloor (GetCel (x, y), CHFLOOR, 2); // rivage
|
PutFloor (GetCel (x, y), CHFLOOR, 2); // rivage
|
||||||
}
|
break;
|
||||||
if (icon == 61) // pont ?
|
case 61: // pont ?
|
||||||
{
|
|
||||||
PutFloor (GetCel (x, y), CHFLOOR, 4); // rivage
|
PutFloor (GetCel (x, y), CHFLOOR, 4); // rivage
|
||||||
}
|
break;
|
||||||
if (icon == 62) // pont ?
|
case 62: // pont ?
|
||||||
{
|
|
||||||
PutFloor (GetCel (x, y), CHFLOOR, 3); // rivage
|
PutFloor (GetCel (x, y), CHFLOOR, 3); // rivage
|
||||||
}
|
break;
|
||||||
if (icon == 64) // pont ?
|
case 64: // pont ?
|
||||||
{
|
|
||||||
PutFloor (GetCel (x, y), CHFLOOR, 5); // rivage
|
PutFloor (GetCel (x, y), CHFLOOR, 5); // rivage
|
||||||
}
|
break;
|
||||||
if (icon == 60 || icon == 63) // pont ?
|
case 60:
|
||||||
{
|
case 63: // pont ?
|
||||||
PutFloor (GetCel (x, y), CHFLOOR, 14); // eau
|
PutFloor (GetCel (x, y), CHFLOOR, 14); // eau
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user