1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Cosmetic: fix indent with more recent clang-format

This commit is contained in:
Mathieu Schroeter 2017-08-04 23:34:10 +02:00
parent 4f856916a0
commit 1ee58d06c4
4 changed files with 36 additions and 31 deletions

View File

@ -196,7 +196,7 @@ void CDecor::Init (Sint32 channel, Sint32 icon)
for (x = 0; x < MAXCELX; x++) for (x = 0; x < MAXCELX; x++)
{ {
for (y = 0; y < MAXCELY; y++) for (y = 0; y < MAXCELY; y++)
m_rankBlupi[x][y] = -1; m_rankBlupi[x][y] = -1;
} }
@ -537,7 +537,7 @@ void CDecor::BuildPutBlupi ()
xMin = m_blupi[rank].destCel.x; xMin = m_blupi[rank].destCel.x;
if (xMin > m_blupi[rank].cel.x) if (xMin > m_blupi[rank].cel.x)
xMin = m_blupi[rank].cel.x; xMin = m_blupi[rank].cel.x;
yMin = m_blupi[rank].destCel.y; yMin = m_blupi[rank].destCel.y;
if (yMin > m_blupi[rank].cel.y) if (yMin > m_blupi[rank].cel.y)
yMin = m_blupi[rank].cel.y; yMin = m_blupi[rank].cel.y;
@ -562,7 +562,7 @@ void CDecor::BuildPutBlupi ()
pos = ConvCelToPos (GetCel (xMin, yMin)); pos = ConvCelToPos (GetCel (xMin, yMin));
clipLeft = pos.x + 34; clipLeft = pos.x + 34;
if (clipLeft < POSDRAWX) if (clipLeft < POSDRAWX)
clipLeft = POSDRAWX; clipLeft = POSDRAWX;
m_blupi[rank].clipLeft = clipLeft; m_blupi[rank].clipLeft = clipLeft;
} }
@ -1110,9 +1110,10 @@ void CDecor::Build (RECT clip, POINT posMouse)
// Dessine l'eau en mouvement. // Dessine l'eau en mouvement.
pos.x = cPos.x - DIMCELX / 2; pos.x = cPos.x - DIMCELX / 2;
pos.y = cPos.y; pos.y = cPos.y;
n = table_eau[(m_timeConst / 2 + // lent ! n = table_eau
table_random_x[x % 10] + table_random_y[y % 10]) % [(m_timeConst / 2 + // lent !
6]; table_random_x[x % 10] + table_random_y[y % 10]) %
6];
m_pPixmap->DrawIcon (CHGROUND, CHFLOOR, n, pos); // eau m_pPixmap->DrawIcon (CHGROUND, CHFLOOR, n, pos); // eau
if (icon != 14) if (icon != 14)
m_pPixmap->DrawIcon (CHGROUND, CHFLOOR, icon, pos); m_pPixmap->DrawIcon (CHGROUND, CHFLOOR, icon, pos);
@ -1224,7 +1225,7 @@ void CDecor::Build (RECT clip, POINT posMouse)
icon = 120; icon = 120;
if (icon > 137) if (icon > 137)
icon = 137; icon = 137;
tPos = pos; tPos = pos;
tPos.y += DIMCELY; tPos.y += DIMCELY;
if (m_blupi[rank].vehicule == 1) // en bateau ? if (m_blupi[rank].vehicule == 1) // en bateau ?
tPos.y -= 6; tPos.y -= 6;
@ -1582,7 +1583,7 @@ Errors CDecor::CelOkForAction (
for (x = 0; x < 4; x++) for (x = 0; x < 4; x++)
{ {
for (y = 0; y < 4; y++) for (y = 0; y < 4; y++)
icons[x][y] = -1; icons[x][y] = -1;
} }
@ -2747,7 +2748,7 @@ void CDecor::CelHili (POINT pos, Sint32 action)
for (x = 0; x < 4; x++) for (x = 0; x < 4; x++)
{ {
for (y = 0; y < 4; y++) for (y = 0; y < 4; y++)
m_iconHili[x][y] = -1; m_iconHili[x][y] = -1;
} }
@ -2881,7 +2882,7 @@ void CDecor::CelHiliRepeat (Sint32 list)
for (x = 0; x < 4; x++) for (x = 0; x < 4; x++)
{ {
for (y = 0; y < 4; y++) for (y = 0; y < 4; y++)
m_iconHili[x][y] = -1; m_iconHili[x][y] = -1;
} }

View File

@ -316,13 +316,15 @@ void CMenu::Draw ()
{ {
// if ( bRight ) // if ( bRight )
// { // {
pos.x = m_pos.x + m_dim.x + 4; // texte à droite pos.x =
// } m_pos.x + m_dim.x +
// else 4; // texte à droite
// { // }
// pos.x = // else
// m_pos.x+(i/m_nbCel.y)*(DIMBUTTONX+MARGMENU)-4-GetTextWidth(text); // {
// } // pos.x =
// m_pos.x+(i/m_nbCel.y)*(DIMBUTTONX+MARGMENU)-4-GetTextWidth(text);
// }
} }
DrawText (m_pPixmap, pos, text, FONTWHITE); DrawText (m_pPixmap, pos, text, FONTWHITE);
@ -358,13 +360,15 @@ void CMenu::Draw ()
{ {
// if ( bRight ) // if ( bRight )
// { // {
pos.x = m_pos.x + m_dim.x + 4; // texte à droite pos.x =
// } m_pos.x + m_dim.x +
// else 4; // texte à droite
// { // }
// pos.x = // else
// m_pos.x+(i/m_nbCel.y)*(DIMBUTTONX+MARGMENU)-4-GetTextWidth(text); // {
// } // pos.x =
// m_pos.x+(i/m_nbCel.y)*(DIMBUTTONX+MARGMENU)-4-GetTextWidth(text);
// }
} }
pos.y += DIMTEXTY; pos.y += DIMTEXTY;

View File

@ -1598,7 +1598,7 @@ void Copy33To99 (Sint32 * pSrc33, Sint32 * pDst99, Sint32 dx, Sint32 dy)
for (y = 0; y < 3; y++) for (y = 0; y < 3; y++)
{ {
for (x = 0; x < 3; x++) for (x = 0; x < 3; x++)
pDst99[(dx + 1) * 3 + x + ((dy + 1) * 3 + y) * 9] = pSrc33[x + y * 3]; pDst99[(dx + 1) * 3 + x + ((dy + 1) * 3 + y) * 9] = pSrc33[x + y * 3];
} }
} }
@ -2990,7 +2990,7 @@ bool CDecor::SearchRobotObject (
starty = ((initCel.y - distMax / 2) / 2) * 2; starty = ((initCel.y - distMax / 2) / 2) * 2;
endy = ((initCel.y + distMax / 2) / 2) * 2; endy = ((initCel.y + distMax / 2) / 2) * 2;
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)
nbUsine[i] = 0; nbUsine[i] = 0;
if (startx < 0) if (startx < 0)
@ -3117,9 +3117,9 @@ bool CDecor::SearchRobotObject (
} }
// Cherche l'ennemi le moins répandu. // Cherche l'ennemi le moins répandu.
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)
nbPerso[i] = 0; nbPerso[i] = 0;
nb = 0; nb = 0;
for (r = 0; r < MAXBLUPI; r++) for (r = 0; r < MAXBLUPI; r++)
{ {
if (m_blupi[r].bExist) if (m_blupi[r].bExist)
@ -3744,7 +3744,7 @@ void CDecor::AddDrapeau (POINT cel)
if (TestDrapeau (cel)) if (TestDrapeau (cel))
return; // déjà dans la liste return; // déjà dans la liste
for (i = MAXLASTDRAPEAU - 1; i > 0; i--) for (i = MAXLASTDRAPEAU - 1; i > 0; i--)
m_lastDrapeau[i] = m_lastDrapeau[i - 1]; m_lastDrapeau[i] = m_lastDrapeau[i - 1];
m_lastDrapeau[0] = cel; m_lastDrapeau[0] = cel;

View File

@ -181,7 +181,7 @@ void CDecor::CheminFillTerrain (Sint32 rank)
m_cheminWork[last] = step + cout; m_cheminWork[last] = step + cout;
//? char buffer[50]; //? char buffer[50];
//? sprintf(buffer, "word = %d;%d %d\n", last%200, //? sprintf(buffer, "word = %d;%d %d\n", last%200,
//last/200, step+cout); ? OutputDebug(buffer); // last/200, step+cout); ? OutputDebug(buffer);
dx = m_blupi[rank].goalCel.x - last % MAXCELX; dx = m_blupi[rank].goalCel.x - last % MAXCELX;
dy = m_blupi[rank].goalCel.y - last / MAXCELX; dy = m_blupi[rank].goalCel.y - last / MAXCELX;
//? dist = dy*dy + dx*dx; //? dist = dy*dy + dx*dx;
@ -269,7 +269,7 @@ bool CDecor::CheminTestDirection (
{ {
// Si blupi immobile, comme si obstacle qq. // Si blupi immobile, comme si obstacle qq.
//? if ( m_blupi[m_blupiHere].goalCel.x == -1 ) return //? if ( m_blupi[m_blupiHere].goalCel.x == -1 ) return
//false; // false;
if (m_blupi[rankHere].goalCel.x == -1) if (m_blupi[rankHere].goalCel.x == -1)
return false; return false;