From 0e338b45db42b40e41f82056d9e1363f3595c9a6 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Sun, 12 Feb 2017 00:44:46 +0100 Subject: [PATCH] Convert to UTF-8 --- src/action.cpp | 14 +- src/arrange.cpp | 60 +++---- src/blupi.cpp | 36 ++-- src/button.cpp | 26 +-- src/button.h | 16 +- src/chemin.cpp | 66 ++++---- src/decblupi.cpp | 416 +++++++++++++++++++++++------------------------ src/decgoal.cpp | 104 ++++++------ src/decgoal.h | 2 +- src/decio.cpp | 40 ++--- src/decmap.cpp | 18 +- src/decmove.cpp | 90 +++++----- src/decor.cpp | 224 ++++++++++++------------- src/decor.h | 100 ++++++------ src/decstat.cpp | 90 +++++----- src/def.h | 106 ++++++------ src/event.cpp | 232 +++++++++++++------------- src/fifo.cpp | 10 +- src/fifo.h | 6 +- src/fog.cpp | 6 +- src/jauge.cpp | 8 +- src/jauge.h | 4 +- src/menu.cpp | 38 ++--- src/misc.cpp | 4 +- src/movie.cpp | 2 +- src/obstacle.cpp | 284 ++++++++++++++++---------------- src/pixmap.cpp | 20 +-- src/pixmap.h | 2 +- src/sound.cpp | 12 +- src/text.cpp | 22 +-- 30 files changed, 1029 insertions(+), 1029 deletions(-) diff --git a/src/action.cpp b/src/action.cpp index e337ae6..23e1509 100644 --- a/src/action.cpp +++ b/src/action.cpp @@ -1365,7 +1365,7 @@ static DescAction action_table[] = {0}, }, { - ACTION_MISC1, // hausse les épaules + ACTION_MISC1, // hausse les épaules CHBLUPI, { {1, 140}, // e @@ -1465,7 +1465,7 @@ static DescAction action_table[] = {0}, }, { - ACTION_MISC5, // ohé + ACTION_MISC5, // ohé CHBLUPI, { {8, 110,110,111,111,110,110,112,112}, @@ -1844,7 +1844,7 @@ static DescAction action_table[] = {0}, }, - // Araignée : + // Araignée : { ACTION_A_STOP, @@ -2443,7 +2443,7 @@ static DescAction action_table[] = -1,-1,SOUND_B_SAUT,-1,-1,-1,-1,-1,-1,-1}, }, - // Détonnateur de mine. + // Détonnateur de mine. { ACTION_D_DELAY, @@ -2568,7 +2568,7 @@ static DescAction action_table[] = // Calcule l'action suivante. -// Retourne false lorsque l'action est terminée. +// Retourne false lorsque l'action est terminée. bool Action(short action, short direct, short &phase, short &step, @@ -2656,7 +2656,7 @@ static short rotate_table[] = -1 }; -// Tourne une icône dans une direction donnée. +// Tourne une icône dans une direction donnée. bool Rotate(short &icon, short direct) { @@ -2717,7 +2717,7 @@ bool Rotate(short &icon, short direct) return false; } -// Retourne la direction d'une icône. +// Retourne la direction d'une icône. int GetIconDirect(short icon) { diff --git a/src/arrange.cpp b/src/arrange.cpp index 0e25bfc..13b4dbd 100644 --- a/src/arrange.cpp +++ b/src/arrange.cpp @@ -5,7 +5,7 @@ #include "misc.h" // Cette table indique les quarts de cases contenant de -// l'eau lorsque la valeur est à un. +// l'eau lorsque la valeur est à un. // 0 1 // 2 3 static char tableSee[14*4] = @@ -27,7 +27,7 @@ static char tableSee[14*4] = }; // Cette table indique les quarts de cases contenant de -// la mousse ou de la terre lorsque la valeur est à un. +// la mousse ou de la terre lorsque la valeur est à un. // 0 1 // 2 3 static char tableDark[13*4] = @@ -76,7 +76,7 @@ bool CDecor::GetSeeBits(POINT cel, char *pBits, int index) if ( index == 1 ) // mousse ? { if ( icon >= 2 && icon <= 14 ) return false; // eau ? - if ( icon == 66 || icon == 79 ) // mousse spéciale ? + if ( icon == 66 || icon == 79 ) // mousse spéciale ? { pBits[0] = 1; pBits[1] = 1; @@ -95,8 +95,8 @@ bool CDecor::GetSeeBits(POINT cel, char *pBits, int index) if ( index == 2 ) // terre ? { if ( icon >= 2 && icon <= 14 ) return false; // eau ? - if ( (icon >= 46 && icon <= 48) || // terre spéciale ? - icon == 71 ) // terre à fer ? + if ( (icon >= 46 && icon <= 48) || // terre spéciale ? + icon == 71 ) // terre à fer ? { pBits[0] = 1; pBits[1] = 1; @@ -132,7 +132,7 @@ bool ChangeBits(char *pDst, char *pSrc) return false; } -// Retourne l'icône correspondant aux bits d'eaux. +// Retourne l'icône correspondant aux bits d'eaux. int CDecor::GetSeeIcon(char *pBits, int index) { @@ -179,7 +179,7 @@ int CDecor::GetSeeIcon(char *pBits, int index) return -1; } -// Arrange le sol après une modification. +// Arrange le sol après une modification. void CDecor::ArrangeFloor(POINT cel) { @@ -193,7 +193,7 @@ void CDecor::ArrangeFloor(POINT cel) if ( icon >= 59 && icon <= 64 ) return; // pont ? max = 3; - if ( icon >= 15 && icon <= 18 ) // dalle spéciale ? + if ( icon >= 15 && icon <= 18 ) // dalle spéciale ? { max = 1; // s'occupe que de l'eau ! } @@ -202,7 +202,7 @@ void CDecor::ArrangeFloor(POINT cel) { if ( !GetSeeBits(cel, here, index) ) continue; - test.x = cel.x -2; // en bas à gauche + test.x = cel.x -2; // en bas à gauche test.y = cel.y +2; if ( GetSeeBits(test, bits, index) ) { @@ -216,7 +216,7 @@ void CDecor::ArrangeFloor(POINT cel) } } - test.x = cel.x -2; // en haut à gauche + test.x = cel.x -2; // en haut à gauche test.y = cel.y -2; if ( GetSeeBits(test, bits, index) ) { @@ -230,7 +230,7 @@ void CDecor::ArrangeFloor(POINT cel) } } - test.x = cel.x +2; // en haut à droite + test.x = cel.x +2; // en haut à droite test.y = cel.y -2; if ( GetSeeBits(test, bits, index) ) { @@ -244,7 +244,7 @@ void CDecor::ArrangeFloor(POINT cel) } } - test.x = cel.x +2; // en bas à droite + test.x = cel.x +2; // en bas à droite test.y = cel.y +2; if ( GetSeeBits(test, bits, index) ) { @@ -265,7 +265,7 @@ void CDecor::ArrangeFloor(POINT cel) } - test.x = cel.x -2; // à gauche + test.x = cel.x -2; // à gauche test.y = cel.y; if ( GetSeeBits(test, bits, index) ) { @@ -279,7 +279,7 @@ void CDecor::ArrangeFloor(POINT cel) } } - test.x = cel.x -2; // en haut à gauche + test.x = cel.x -2; // en haut à gauche test.y = cel.y -2; if ( GetSeeBits(test, bits, index) ) { @@ -306,7 +306,7 @@ void CDecor::ArrangeFloor(POINT cel) } } - test.x = cel.x +2; // en haut à droite + test.x = cel.x +2; // en haut à droite test.y = cel.y -2; if ( GetSeeBits(test, bits, index) ) { @@ -319,7 +319,7 @@ void CDecor::ArrangeFloor(POINT cel) } } - test.x = cel.x +2; // à droite + test.x = cel.x +2; // à droite test.y = cel.y; if ( GetSeeBits(test, bits, index) ) { @@ -333,7 +333,7 @@ void CDecor::ArrangeFloor(POINT cel) } } - test.x = cel.x +2; // en bas à droite + test.x = cel.x +2; // en bas à droite test.y = cel.y +2; if ( GetSeeBits(test, bits, index) ) { @@ -360,7 +360,7 @@ void CDecor::ArrangeFloor(POINT cel) } } - test.x = cel.x -2; // en bas à gauche + test.x = cel.x -2; // en bas à gauche test.y = cel.y +2; if ( GetSeeBits(test, bits, index) ) { @@ -412,7 +412,7 @@ static short tableMurDir[4*2] = // les directions. // index=0 si mur (20..26) // index=1 si palissade (65..71) -// index=2 si barrière (106..112) +// index=2 si barrière (106..112) void CDecor::ArrangeMur(POINT cel, int &icon, int index) { @@ -521,7 +521,7 @@ void CDecor::ArrangeBuild(POINT cel, int &channel, int &icon) matiere = 36; // planches } - // Rien à faire si pas mur. + // Rien à faire si pas mur. if ( channel != CHOBJECT || icon != last ) continue; oldChannel = m_decor[cel.x/2][cel.y/2].objectChannel; @@ -567,7 +567,7 @@ void CDecor::ArrangeBuild(POINT cel, int &channel, int &icon) } } -// Arrange les objets après une modification. +// Arrange les objets après une modification. void CDecor::ArrangeObject(POINT cel) { @@ -591,7 +591,7 @@ void CDecor::ArrangeObject(POINT cel) } if ( index == 2 ) { - first = 106; // barrière + first = 106; // barrière last = 112; } @@ -687,7 +687,7 @@ void CDecor::ArrangeObject(POINT cel) if ( MoveCreate(test, -1, false, CHOBJECT,-1, -1,-1, 9999,1,0, true) ) { - MoveAddIcons(test, 5-i%2, true); // éclairs + MoveAddIcons(test, 5-i%2, true); // éclairs } pos = ConvCelToPos(test); @@ -803,7 +803,7 @@ bool CDecor::ArrangeFillTest(POINT pos) return false; } -// Modifie le décor lors d'un remplissage. +// Modifie le décor lors d'un remplissage. void CDecor::ArrangeFillPut(POINT pos, int channel, int icon) { @@ -831,7 +831,7 @@ void CDecor::ArrangeFillPut(POINT pos, int channel, int icon) } } -// Rempli un sol à partir d'une position donnée. +// Rempli un sol à partir d'une position donnée. void CDecor::ArrangeFillSearch(POINT pos) { @@ -854,7 +854,7 @@ void CDecor::ArrangeFillSearch(POINT pos) } endX = pos.x-2; - // Rempli toute la ligne trouvée. + // Rempli toute la ligne trouvée. pos.x = startX; while ( pos.x <= endX ) { @@ -877,7 +877,7 @@ void CDecor::ArrangeFillSearch(POINT pos) if ( ArrangeFillTest(pos) ) { - ArrangeFillSearch(pos); // appel récursif + ArrangeFillSearch(pos); // appel récursif } while ( pos.x <= endX && ArrangeFillTest(pos) ) @@ -903,7 +903,7 @@ void CDecor::ArrangeFillSearch(POINT pos) if ( ArrangeFillTest(pos) ) { - ArrangeFillSearch(pos); // appel récursif + ArrangeFillSearch(pos); // appel récursif } while ( pos.x <= endX && ArrangeFillTest(pos) ) @@ -914,7 +914,7 @@ void CDecor::ArrangeFillSearch(POINT pos) } } -// Rempli un sol à partir d'une position donnée. +// Rempli un sol à partir d'une position donnée. void CDecor::ArrangeFill(POINT pos, int channel, int icon, bool bFloor) { @@ -956,7 +956,7 @@ void CDecor::ArrangeFill(POINT pos, int channel, int icon, bool bFloor) } -// Supprime tous les personnages bloqués dans des murs +// Supprime tous les personnages bloqués dans des murs // ou debout sur l'eau. void CDecor::ArrangeBlupi() diff --git a/src/blupi.cpp b/src/blupi.cpp index 90d9923..6f69db8 100644 --- a/src/blupi.cpp +++ b/src/blupi.cpp @@ -17,7 +17,7 @@ #include "misc.h" -// D�finitions globales +// D�finitions globales #define NAME "Blupi" #define TITLE "Blupi" @@ -44,7 +44,7 @@ unsigned int g_lastPhase = 999; -// Lit un num�ro d�cimal. +// Lit un num�ro d�cimal. int GetNum(char *p) { @@ -111,7 +111,7 @@ bool ReadConfig(int argc, char *argv[]) } -// Mise � jour principale. +// Mise � jour principale. void UpdateFrame(void) { @@ -149,7 +149,7 @@ void UpdateFrame(void) if ( g_pEvent->IsShift() ) // shift en cours ? { g_pEvent->DecorAutoShift(posMouse); - g_pDecor->Build(clip, posMouse); // construit juste le d�cor + g_pDecor->Build(clip, posMouse); // construit juste le d�cor } else { @@ -159,13 +159,13 @@ void UpdateFrame(void) for ( i=0 ; iBlupiStep(i==0); // avance tous les blupi - g_pDecor->MoveStep(i==0); // avance tous les d�cors + g_pDecor->MoveStep(i==0); // avance tous les d�cors g_pEvent->DemoStep(); // avance enregistrement/reproduction } } g_pEvent->DecorAutoShift(posMouse); - g_pDecor->Build(clip, posMouse); // construit le d�cor + g_pDecor->Build(clip, posMouse); // construit le d�cor g_pDecor->NextPhase(1); // refait la carte de temps en temps } } @@ -177,13 +177,13 @@ void UpdateFrame(void) clip.right = POSDRAWX+DIMDRAWX; clip.bottom = POSDRAWY+DIMDRAWY; g_pEvent->DecorAutoShift(posMouse); - g_pDecor->Build(clip, posMouse); // construit le d�cor + g_pDecor->Build(clip, posMouse); // construit le d�cor g_pDecor->NextPhase(-1); // refait la carte chaque fois } if ( phase == WM_PHASE_INIT ) { - g_pEvent->DemoStep(); // d�marre �v. d�mo automatique + g_pEvent->DemoStep(); // d�marre �v. d�mo automatique } g_pEvent->DrawButtons(); @@ -196,7 +196,7 @@ void UpdateFrame(void) phase == WM_PHASE_PLAYMOVIE || phase == WM_PHASE_WINMOVIE ) { - g_pEvent->MovieToStart(); // fait d�marrer un film si n�cessaire + g_pEvent->MovieToStart(); // fait d�marrer un film si n�cessaire } if ( phase == WM_PHASE_INSERT ) @@ -208,7 +208,7 @@ void UpdateFrame(void) { term = g_pDecor->IsTerminated(); if ( term == 1 ) g_pEvent->ChangePhase(WM_PHASE_LOST); // perdu - if ( term == 2 ) g_pEvent->ChangePhase(WM_PHASE_WINMOVIE); // gagn� + if ( term == 2 ) g_pEvent->ChangePhase(WM_PHASE_WINMOVIE); // gagn� } } @@ -232,7 +232,7 @@ void Benchmark() } -// Restitue le jeu apr�s une activation en mode fullScreen. +// Restitue le jeu apr�s une activation en mode fullScreen. bool RestoreGame() { @@ -242,7 +242,7 @@ bool RestoreGame() return true; } -// Lib�re le jeu avant une d�sactivation en mode fullScreen. +// Lib�re le jeu avant une d�sactivation en mode fullScreen. bool FlushGame() { @@ -449,7 +449,7 @@ static bool DoInit(int argc, char *argv[]) return InitFail("Game not correctly installed", false); } - // Cr�e le pixmap principal. + // Cr�e le pixmap principal. g_pPixmap = new CPixmap; if ( g_pPixmap == nullptr ) return InitFail("New pixmap", true); @@ -569,7 +569,7 @@ static bool DoInit(int argc, char *argv[]) g_pPixmap->LoadCursors (); g_pPixmap->ChangeSprite (SPRITE_WAIT); // met le sablier maison - // Cr�e le gestionnaire de son. + // Cr�e le gestionnaire de son. g_pSound = new CSound; if ( g_pSound == nullptr ) return InitFail("New sound", true); @@ -577,20 +577,20 @@ static bool DoInit(int argc, char *argv[]) g_pSound->CacheAll(); g_pSound->SetState(true); - // Cr�e le gestionnaire de films. + // Cr�e le gestionnaire de films. g_pMovie = new CMovie; if ( g_pMovie == nullptr ) return InitFail("New movie", false); g_pMovie->Create(); - // Cr�e le gestionnaire de d�cors. + // Cr�e le gestionnaire de d�cors. g_pDecor = new CDecor; if ( g_pDecor == nullptr ) return InitFail("New decor", false); g_pDecor->Create(g_pSound, g_pPixmap); g_pDecor->MapInitColors(); - // Cr�e le gestionnaire d'�v�nements. + // Cr�e le gestionnaire d'�v�nements. g_pEvent = new CEvent; if ( g_pEvent == nullptr ) return InitFail("New event", false); @@ -603,7 +603,7 @@ static bool DoInit(int argc, char *argv[]) g_pEvent->ChangePhase(WM_PHASE_TESTCD); #endif - g_bTermInit = true; // initialisation termin�e + g_bTermInit = true; // initialisation termin�e return true; } diff --git a/src/button.cpp b/src/button.cpp index a60bbba..d6e319b 100644 --- a/src/button.cpp +++ b/src/button.cpp @@ -40,7 +40,7 @@ CButton::~CButton() } -// Crée un nouveau bouton. +// Crée un nouveau bouton. bool CButton::Create(CPixmap *pPixmap, CSound *pSound, POINT pos, int type, bool bMinimizeRedraw, @@ -118,7 +118,7 @@ bool CButton::Create(CPixmap *pPixmap, CSound *pSound, return true; } -// Dessine un bouton dans son état. +// Dessine un bouton dans son état. void CButton::Draw() { @@ -129,7 +129,7 @@ void CButton::Draw() if ( m_bMinimizeRedraw && !m_bRedraw ) return; m_bRedraw = false; - if ( m_bHide ) // bouton caché ? + if ( m_bHide ) // bouton caché ? { rect.left = m_pos.x; rect.right = m_pos.x+m_dim.x; @@ -239,7 +239,7 @@ void CButton::SetHide(bool bHide) } -// Traitement d'un événement. +// Traitement d'un événement. bool CButton::TreatEvent(const SDL_Event &event) { @@ -281,7 +281,7 @@ bool CButton::TreatEvent(const SDL_Event &event) return false; } -// (*) Tous les boutons doivent recevoir l'événement BUTTONUP ! +// (*) Tous les boutons doivent recevoir l'événement BUTTONUP ! // Indique si la souris est sur ce bouton. @@ -303,7 +303,7 @@ const char *CButton::GetToolTips(POINT pos) if (m_bHide || !m_bEnable) return nullptr; - if ( m_nbMenu > 1 && m_bMouseDown ) // sous-menu déroulé ? + if ( m_nbMenu > 1 && m_bMouseDown ) // sous-menu déroulé ? { width += 2+(m_dim.x-1)*m_nbMenu; } @@ -335,7 +335,7 @@ const char *CButton::GetToolTips(POINT pos) } -// Détecte si la souris est dans le bouton. +// Détecte si la souris est dans le bouton. bool CButton::Detect(POINT pos) { @@ -343,7 +343,7 @@ bool CButton::Detect(POINT pos) if ( m_bHide || !m_bEnable ) return false; - if ( m_nbMenu > 1 && m_bMouseDown ) // sous-menu déroulé ? + if ( m_nbMenu > 1 && m_bMouseDown ) // sous-menu déroulé ? { width += 2+(m_dim.x-1)*m_nbMenu; } @@ -356,7 +356,7 @@ bool CButton::Detect(POINT pos) return true; } -// Bouton de la souris pressé. +// Bouton de la souris pressé. bool CButton::MouseDown(POINT pos) { @@ -371,7 +371,7 @@ bool CButton::MouseDown(POINT pos) return true; } -// Souris déplacés. +// Souris déplacés. bool CButton::MouseMove(POINT pos) { @@ -385,12 +385,12 @@ bool CButton::MouseMove(POINT pos) if ( m_bMouseDown ) { - if ( bDetect ) m_mouseState = 1; // pressé + if ( bDetect ) m_mouseState = 1; // pressé else m_mouseState = m_state; } else { - if ( bDetect ) m_mouseState = m_state+2; // survollé + if ( bDetect ) m_mouseState = m_state+2; // survollé else m_mouseState = m_state; } @@ -415,7 +415,7 @@ bool CButton::MouseMove(POINT pos) return m_bMouseDown; } -// Bouton de la souris relâché. +// Bouton de la souris relâché. bool CButton::MouseUp(POINT pos) { diff --git a/src/button.h b/src/button.h index 945a749..71f4ec9 100644 --- a/src/button.h +++ b/src/button.h @@ -49,20 +49,20 @@ protected: CSound* m_pSound; int m_type; // type de bouton bool m_bEnable; // true si bouton actif - bool m_bHide; // true si bouton caché - unsigned int m_message; // message envoyé si bouton actionné + bool m_bHide; // true si bouton caché + unsigned int m_message; // message envoyé si bouton actionné POINT m_pos; // coin sup/gauche POINT m_dim; // dimensions - int m_state; // 0=relâché, 1=pressé, +2=survollé - int m_mouseState; // 0=relâché, 1=pressé, +2=survollé - int m_iconMenu[20]; // icônes du sous-menu + int m_state; // 0=relâché, 1=pressé, +2=survollé + int m_mouseState; // 0=relâché, 1=pressé, +2=survollé + int m_iconMenu[20]; // icônes du sous-menu const char **m_toolTips; // info-bulles int m_nbMenu; // nb de case du sous-menu int m_nbToolTips; // nb d'info-bulles - int m_selMenu; // sous-menu sélectionné - bool m_bMouseDown; // true -> bouton souris pressé + int m_selMenu; // sous-menu sélectionné + bool m_bMouseDown; // true -> bouton souris pressé bool m_bMinimizeRedraw; - bool m_bRedraw; // true -> doit être redessiné + bool m_bRedraw; // true -> doit être redessiné }; ///////////////////////////////////////////////////////////////////////////// diff --git a/src/chemin.cpp b/src/chemin.cpp index ab0fe27..580e61b 100644 --- a/src/chemin.cpp +++ b/src/chemin.cpp @@ -6,7 +6,7 @@ #include "fifo.h" #include "action.h" -// Mémorise toutes les positions des blupi. +// Mémorise toutes les positions des blupi. void CDecor::CheminMemPos(int exRank) { @@ -17,7 +17,7 @@ void CDecor::CheminMemPos(int exRank) for ( rank=0 ; rank 0 ) { @@ -131,11 +131,11 @@ void CDecor::CheminFillTerrain(int rank) step = m_cheminWork[pos]; - // on est arrivé au but ? + // on est arrivé au but ? //? if ( pos == dest ) return; if ( pos == dest ) { - but = step; // hélas trop lent ! + but = step; // hélas trop lent ! max = 50; } @@ -153,7 +153,7 @@ void CDecor::CheminFillTerrain(int rank) if ( m_cheminWork[last] == 0 || m_cheminWork[last] > step+cout ) { - // marque les cases sautées + // marque les cases sautées for (int i=1; i 0 && - m_rankBlupiHili == rank ) // est-ce le blupi sélectionné ? + m_rankBlupiHili == rank ) // est-ce le blupi sélectionné ? { m_nbBlupiHili = 0; m_rankBlupiHili = -1; @@ -230,16 +230,16 @@ void CDecor::BlupiDelete(int rank) if ( !m_bBuild && // phase de jeu ? m_nbBlupiHili > 0 && - m_rankBlupiHili == rank ) // est-ce le blupi sélectionné ? + m_rankBlupiHili == rank ) // est-ce le blupi sélectionné ? { m_nbBlupiHili = 0; m_rankBlupiHili = -1; } } -// Supprime tout dans un périmètre donné suite à une explosion. +// Supprime tout dans un périmètre donné suite à une explosion. // type=0 -> explosion -// type=1 -> électro +// type=1 -> électro void CDecor::BlupiKill(int exRank, POINT cel, int type) { @@ -247,8 +247,8 @@ void CDecor::BlupiKill(int exRank, POINT cel, int type) for ( rank=0 ; rank (POWER) redonne l'énergie maximale -// #2 -> (LONESOME) tue toutes les araignées/virus/etc. +// #1 -> (POWER) redonne l'énergie maximale +// #2 -> (LONESOME) tue toutes les araignées/virus/etc. void CDecor::BlupiCheat(int cheat) { @@ -346,7 +346,7 @@ void CDecor::BlupiCheat(int cheat) { if ( m_blupi[rank].bExist && m_blupi[rank].perso != 0 && - m_blupi[rank].perso != 8 ) // araignée/virus/etc. ? + m_blupi[rank].perso != 8 ) // araignée/virus/etc. ? { m_blupi[rank].bExist = false; } @@ -355,7 +355,7 @@ void CDecor::BlupiCheat(int cheat) } -// Actualise un blupi pour pouvoir le dessiner dans son état. +// Actualise un blupi pour pouvoir le dessiner dans son état. void CDecor::BlupiActualise(int rank) { @@ -379,7 +379,7 @@ void CDecor::BlupiActualise(int rank) m_blupi[rank].posZ = 0; } -// Adapte une icône. +// Adapte une icône. void CDecor::BlupiAdaptIcon(int rank) { @@ -394,11 +394,11 @@ void CDecor::BlupiAdaptIcon(int rank) { m_blupi[rank].icon += 100; // 169..192 (tout vert) } - else if ( m_blupi[rank].icon == 270 ) // écrasé ? + else if ( m_blupi[rank].icon == 270 ) // écrasé ? { m_blupi[rank].icon = 271; } - else if ( m_blupi[rank].icon < 318 || // pas télétransporté ? + else if ( m_blupi[rank].icon < 318 || // pas télétransporté ? m_blupi[rank].icon > 321 ) { direct = GetIconDirect(m_blupi[rank].icon); @@ -447,8 +447,8 @@ void CDecor::BlupiAdaptIcon(int rank) if ( m_blupi[rank].icon < 322 || m_blupi[rank].icon > 347 ) { - if ( m_blupi[rank].icon == 106 || // élan pour saut ? - m_blupi[rank].icon == 194 ) // mèche ? + if ( m_blupi[rank].icon == 106 || // élan pour saut ? + m_blupi[rank].icon == 194 ) // mèche ? { m_blupi[rank].icon = 347; } @@ -483,8 +483,8 @@ void CDecor::BlupiAdaptIcon(int rank) // Fait entendre un son pour un blupi. -// Si bStop=true, on stoppe le son précédent associé -// à ce blupi (rank), si nécessaire. +// Si bStop=true, on stoppe le son précédent associé +// à ce blupi (rank), si nécessaire. void CDecor::BlupiSound(int rank, int sound, POINT pos, bool bStop) { @@ -565,7 +565,7 @@ void CDecor::BlupiSound(int rank, int sound, POINT pos, bool bStop) } } -// Sons associés à des actions. +// Sons associés à des actions. static short tableSound[] = { @@ -657,13 +657,13 @@ void CDecor::BlupiInitAction(int rank, int action, int direct) } if ( m_blupi[rank].action == ACTION_STOP && - m_blupi[rank].goalAction == 0 ) // à pied ? + m_blupi[rank].goalAction == 0 ) // à pied ? { rand = Random(0,400); if ( rand >= 10 && rand <= 15 && m_blupi[rank].takeChannel == -1 ) { - m_blupi[rank].action = ACTION_MISC1; // épaules + m_blupi[rank].action = ACTION_MISC1; // épaules m_blupi[rank].step = 0; } if ( rand >= 20 && rand <= 23 ) @@ -685,7 +685,7 @@ void CDecor::BlupiInitAction(int rank, int action, int direct) if ( rand == 50 && m_blupi[rank].takeChannel == -1 ) { - m_blupi[rank].action = ACTION_MISC5; // ohé + m_blupi[rank].action = ACTION_MISC5; // ohé m_blupi[rank].step = 0; } if ( rand == 60 ) @@ -698,7 +698,7 @@ void CDecor::BlupiInitAction(int rank, int action, int direct) m_blupi[rank].goalAction == 0 ) { rand = Random(0,100); - if ( rand == 10 && // propabilité 1/100 + if ( rand == 10 && // propabilité 1/100 m_blupi[rank].takeChannel == -1 ) { m_blupi[rank].action = ACTION_MISC1f; @@ -762,7 +762,7 @@ void CDecor::BlupiInitAction(int rank, int action, int direct) } } - if ( m_blupi[rank].perso == 1 ) // araignée ? + if ( m_blupi[rank].perso == 1 ) // araignée ? { if ( m_blupi[rank].action == ACTION_MARCHE ) { @@ -838,7 +838,7 @@ void CDecor::BlupiInitAction(int rank, int action, int direct) m_blupi[rank].step = 0; } - if ( m_blupi[rank].perso == 7 ) // électro ? + if ( m_blupi[rank].perso == 7 ) // électro ? { if ( m_blupi[rank].action == ACTION_MARCHE ) { @@ -948,7 +948,7 @@ void CDecor::ListFlush(int rank) m_blupi[rank].repeatLevel = -1; } -// Retourne le paramètre associé à une action. +// Retourne le paramètre associé à une action. int CDecor::ListGetParam(int rank, int button, POINT cel) { @@ -988,12 +988,12 @@ bool CDecor::ListPut(int rank, int button, POINT cel, POINT cMem) if ( button == BUTTON_REPEAT || button == BUTTON_GO ) return true; - // Mémorise "mange" seulement après un "cultive". + // Mémorise "mange" seulement après un "cultive". if ( button == BUTTON_MANGE && m_blupi[rank].listButton[0] != BUTTON_CULTIVE ) return true; - // Si prend/dépose à la suite au même endroit, - // il est inutile de mémoriser ! + // Si prend/dépose à la suite au même endroit, + // il est inutile de mémoriser ! last = m_blupi[rank].listButton[0]; if ( (button == BUTTON_CARRY && last == BUTTON_DEPOSE) || (button == BUTTON_DEPOSE && last == BUTTON_CARRY ) ) @@ -1020,7 +1020,7 @@ bool CDecor::ListPut(int rank, int button, POINT cel, POINT cMem) return true; } -// Enlève la dernière action ajoutée dans la liste. +// Enlève la dernière action ajoutée dans la liste. void CDecor::ListRemove(int rank) { @@ -1038,9 +1038,9 @@ void CDecor::ListRemove(int rank) m_blupi[rank].listButton[MAXLIST-1] = -1; } -// Cherche une action à répéter dans la liste. -// Retourne la profondeur de la répétition. -// Retourne -1 si aucune répétiton n'est possible. +// Cherche une action à répéter dans la liste. +// Retourne la profondeur de la répétition. +// Retourne -1 si aucune répétiton n'est possible. int CDecor::ListSearch(int rank, int button, POINT cel, const char *&textForButton) @@ -1150,7 +1150,7 @@ int CDecor::ListSearch(int rank, int button, POINT cel, return -1; } -// Ajuste une action à répéter. +// Ajuste une action à répéter. bool CDecor::RepeatAdjust(int rank, int button, POINT &cel, POINT &cMem, int param, int list) @@ -1179,7 +1179,7 @@ bool CDecor::RepeatAdjust(int rank, int button, 0,-2, // 1<<3 }; - if ( button == BUTTON_DEPOSE && // dépose pour une palissade ? + if ( button == BUTTON_DEPOSE && // dépose pour une palissade ? list > 0 && m_blupi[rank].listButton[list-1] == BUTTON_PALIS ) { @@ -1235,7 +1235,7 @@ bool CDecor::RepeatAdjust(int rank, int button, return false; } - if ( button == BUTTON_DEPOSE && // dépose pour un bateau ? + if ( button == BUTTON_DEPOSE && // dépose pour un bateau ? list > 0 && m_blupi[rank].listButton[list-1] == BUTTON_BATEAU ) { @@ -1250,7 +1250,7 @@ bool CDecor::RepeatAdjust(int rank, int button, //? if ( button == BUTTON_MANGE ) //? { -//? cel = m_blupi[rank].cel; // cherche là où est blupi ! +//? cel = m_blupi[rank].cel; // cherche là où est blupi ! //? } i = 0; @@ -1310,7 +1310,7 @@ bool CDecor::RepeatAdjust(int rank, int button, -// Démarre une action. +// Démarre une action. void CDecor::GoalStart(int rank, int action, POINT cel) { @@ -1324,7 +1324,7 @@ void CDecor::GoalStart(int rank, int action, POINT cel) FlushUsed(rank); } -// Effectue la méta opération suivante. +// Effectue la méta opération suivante. // Retourne false lorsque c'est fini ! bool CDecor::GoalNextPhase(int rank) @@ -1365,7 +1365,7 @@ bool CDecor::GoalNextPhase(int rank) return GoalNextOp(rank, pTable); } -// Initialise la jauge pour une méta opération. +// Initialise la jauge pour une méta opération. void CDecor::GoalInitJauge(int rank) { @@ -1376,7 +1376,7 @@ void CDecor::GoalInitJauge(int rank) m_blupi[rank].jaugeMax = -1; if ( m_blupi[rank].perso != 0 && - m_blupi[rank].perso != 8 ) return; // araignée/virus/etc. ? + m_blupi[rank].perso != 8 ) return; // araignée/virus/etc. ? if ( m_blupi[rank].goalAction == 0 ) return; pTable = GetTableGoal(m_blupi[rank].goalAction); @@ -1405,7 +1405,7 @@ void CDecor::GoalInitJauge(int rank) } } -// Permet de passer à travers certains arbres. +// Permet de passer à travers certains arbres. void CDecor::GoalInitPassCel(int rank) { @@ -1437,7 +1437,7 @@ void CDecor::GoalInitPassCel(int rank) } } -// Ajuste une coordonnée de cellule. +// Ajuste une coordonnée de cellule. void CDecor::GoalAdjustCel(int rank, int &x, int &y) { @@ -1495,7 +1495,7 @@ int table_multi_goal[16*2] = +2,+2, }; -// Effectue une méta opération. +// Effectue une méta opération. bool CDecor::GoalNextOp(int rank, short *pTable) { @@ -1548,7 +1548,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) flag = *pTable++; if ( !!flag ) { - if ( IsBlupiHereEx(cel, rank, false) ) // destination occupée ? + if ( IsBlupiHereEx(cel, rank, false) ) // destination occupée ? { m_blupi[rank].goalPhase --; // on attend ... return true; @@ -1591,7 +1591,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) GoalAdjustCel(rank, x,y); channel = *pTable++; icon = *pTable++; - if ( channel == -3 && icon == -3 ) // l'objet transporté ? + if ( channel == -3 && icon == -3 ) // l'objet transporté ? { channel = m_blupi[rank].takeChannel; icon = m_blupi[rank].takeIcon; @@ -1616,10 +1616,10 @@ bool CDecor::GoalNextOp(int rank, short *pTable) delai = *pTable++; step = *pTable++; - if ( i >= 19 && i <= 32 && // herbe foncée ? - icon == 57 ) icon = 58; // sol tomate foncé + if ( i >= 19 && i <= 32 && // herbe foncée ? + icon == 57 ) icon = 58; // sol tomate foncé if ( i == 58 && - icon == 1 ) icon = 20; // remet herbe foncée + icon == 1 ) icon = 20; // remet herbe foncée if ( !MoveCreate(cel, rank, true, channel, icon, @@ -1680,12 +1680,12 @@ bool CDecor::GoalNextOp(int rank, short *pTable) BlupiKill(rank, cel, 0); MoveFinish(cel); - // Faut-il démarrer une explosion en chaîne. + // Faut-il démarrer une explosion en chaîne. GetObject(cel, channel, icon); if ( channel == CHOBJECT && icon == 85 ) // dynamite ? { rank = BlupiCreate(GetCel(cel,1,1), ACTION_STOP, DIRECT_E, - 6, MAXENERGY); // crée un détonnateur + 6, MAXENERGY); // crée un détonnateur if ( rank >= 0 ) { GoalStart(rank, WM_ACTION_T_DYNAMITE, cel); @@ -1828,13 +1828,13 @@ bool CDecor::GoalNextOp(int rank, short *pTable) { m_blupi[rank].takeIcon = 80; // bouteille } - if ( m_blupi[rank].takeIcon == 84 ) // fleurs foncées ? + if ( m_blupi[rank].takeIcon == 84 ) // fleurs foncées ? { m_blupi[rank].takeIcon = 85; // dynamite } if ( m_blupi[rank].takeIcon == 95 ) // fleurs vertes ? { - m_blupi[rank].takeIcon = 93; // piège + m_blupi[rank].takeIcon = 93; // piège } if ( m_blupi[rank].takeIcon == 60 ) // tomates ? { @@ -1878,7 +1878,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) { cel.x = m_blupi[rank].cel.x+(*pTable++); cel.y = m_blupi[rank].cel.y+(*pTable++); - PutObject(cel, -1,-1); // enlève les oeufs + PutObject(cel, -1,-1); // enlève les oeufs rank = BlupiCreate(cel, ACTION_STOP, DIRECT_E, 0, MAXENERGY/4); if ( rank >= 0 ) @@ -1922,17 +1922,17 @@ bool CDecor::GoalNextOp(int rank, short *pTable) destCel = cel; destCel.x ++; - if ( IsBlupiHereEx(destCel, rank, false) ) // destination occupée ? + if ( IsBlupiHereEx(destCel, rank, false) ) // destination occupée ? { m_blupi[rank].goalPhase --; // on attend ... return true; } destCel.x ++; - if ( IsBlupiHereEx(destCel, rank, false) ) // destination occupée ? + if ( IsBlupiHereEx(destCel, rank, false) ) // destination occupée ? { destCel.y --; if ( icon == 5 || // bombe ? - IsBlupiHereEx(destCel, rank, false) ) // destination occupée ? + IsBlupiHereEx(destCel, rank, false) ) // destination occupée ? { m_blupi[rank].goalPhase --; // on attend ... return true; @@ -1962,8 +1962,8 @@ bool CDecor::GoalNextOp(int rank, short *pTable) if ( !IsUsineFree(rank, cel) ) { GoalStop(rank, true); - m_blupi[rank].goalCel = GetCel(cel,1,-1); // à côté de la porte -//? m_blupi[rank].goalAction = 0; // stoppe sitôt après + m_blupi[rank].goalCel = GetCel(cel,1,-1); // à côté de la porte +//? m_blupi[rank].goalAction = 0; // stoppe sitôt après //? m_blupi[rank].interrupt = 1; //? GoalUnwork(rank); //? FlushUsed(rank); @@ -1976,7 +1976,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) cel.x = m_blupi[rank].cel.x+(*pTable++); cel.y = m_blupi[rank].cel.y+(*pTable++); if ( IsBlupiHereEx(cel, rank, false) ) goto error; - // Crée un détonnateur de mine (blupi invisible). + // Crée un détonnateur de mine (blupi invisible). rank = BlupiCreate(cel, ACTION_STOP, DIRECT_E, 6, MAXENERGY); if ( rank >= 0 ) { @@ -1992,7 +1992,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) if ( op == GOAL_VEHICULE ) { m_blupi[rank].vehicule = *pTable++; - if ( m_blupi[rank].vehicule != 0 && // pas à pied ? + if ( m_blupi[rank].vehicule != 0 && // pas à pied ? m_blupi[rank].takeChannel != -1 && // porte qq chose ? m_blupi[rank].energy <= MAXENERGY/4 ) // faible ? { @@ -2025,7 +2025,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) { if ( !m_blupi[rank].bRepeat ) goto term; - // Bouton stop pressé ? + // Bouton stop pressé ? if ( m_blupi[rank].stop == 1 ) goto term; channel = *pTable++; @@ -2056,7 +2056,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) { if ( !m_blupi[rank].bRepeat ) goto term; - // Bouton stop pressé ? + // Bouton stop pressé ? if ( m_blupi[rank].stop == 1 ) goto term; channel = *pTable++; @@ -2135,7 +2135,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) { cel.x = m_blupi[rank].cel.x+(*pTable++); cel.y = m_blupi[rank].cel.y+(*pTable++); - AddDrapeau(cel); // cellule sondée + AddDrapeau(cel); // cellule sondée return true; } @@ -2178,7 +2178,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) { cel.x = m_blupi[rank].cel.x+(*pTable++); cel.y = m_blupi[rank].cel.y+(*pTable++); - m_blupi[rank].vehicule = 0; // à pied + m_blupi[rank].vehicule = 0; // à pied bOK = IsFreeCel(cel, rank) && !IsBlupiHereEx(cel, rank, false); m_blupi[rank].vehicule = 1; // en bateau @@ -2207,7 +2207,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) { cel.x = m_blupi[rank].cel.x+(*pTable++); cel.y = m_blupi[rank].cel.y+(*pTable++); - if ( IsBlupiHereEx(cel, rank, false) ) // destination occupée ? + if ( IsBlupiHereEx(cel, rank, false) ) // destination occupée ? { m_blupi[rank].goalPhase --; // on attend ... @@ -2277,7 +2277,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) error: i = m_blupi[rank].repeatLevel; GoalStop(rank, bError, i==-1); - if ( i != -1 ) // répétition en cours ? + if ( i != -1 ) // répétition en cours ? { button = m_blupi[rank].listButton[i]; cMem = m_blupi[rank].listCel[i]; @@ -2285,7 +2285,7 @@ bool CDecor::GoalNextOp(int rank, short *pTable) cel = cMem; if ( RepeatAdjust(rank, button, cel, cMem, param, i) ) { - if ( IsBlupiHereEx(cel, rank, false) ) // destination occupée ? + if ( IsBlupiHereEx(cel, rank, false) ) // destination occupée ? { m_blupi[rank].repeatLevel = i; // on continue ... GoalStart(rank, WM_ACTION_GO, m_blupi[rank].cel); // on attend ... @@ -2314,13 +2314,13 @@ void CDecor::GoalUnwork(int rank) { if ( m_decor[x][y].workBlupi == rank ) { - m_decor[x][y].workBlupi = -1; // débloque + m_decor[x][y].workBlupi = -1; // débloque } } } } -// Stoppe complètement une action. +// Stoppe complètement une action. void CDecor::GoalStop(int rank, bool bError, bool bSound) { @@ -2345,7 +2345,7 @@ void CDecor::GoalStop(int rank, bool bError, bool bSound) if ( bError && bSound ) { - ListRemove(rank); // supprime la dernière action mémorisée + ListRemove(rank); // supprime la dernière action mémorisée } m_blupi[rank].goalAction = 0; @@ -2356,21 +2356,21 @@ void CDecor::GoalStop(int rank, bool bError, bool bSound) m_blupi[rank].interrupt = 1; // remet le niveau normal m_blupi[rank].busyCount = 0; m_blupi[rank].busyDelay = 0; - m_blupi[rank].repeatLevel = -1; // stoppe la répétition + m_blupi[rank].repeatLevel = -1; // stoppe la répétition FlushUsed(rank); MoveFinish(rank); GoalUnwork(rank); // En cas d'erreur, il faut accepter de traverser la - // construction avortée (par exemple, le massif d'arbres + // construction avortée (par exemple, le massif d'arbres // dans lequel blupi se trouve, mais qui n'a pas pu - // être abattu). + // être abattu). if ( !bError ) { m_blupi[rank].passCel.x = -1; } - m_blupi[rank].stop = 0; // relâche bouton stop + m_blupi[rank].stop = 0; // relâche bouton stop if ( bSound && (m_blupi[rank].perso == 0 || // blupi ? @@ -2391,7 +2391,7 @@ void CDecor::GoalStop(int rank, bool bError, bool bSound) } -// Teste si une cellule est déjà utilisée comme but pour +// Teste si une cellule est déjà utilisée comme but pour // n'importe quel blupi. bool CDecor::BlupiIsGoalUsed(POINT cel) @@ -2409,14 +2409,14 @@ bool CDecor::BlupiIsGoalUsed(POINT cel) } -// Démarre ou stoppe un rayon entre deux tours. +// Démarre ou stoppe un rayon entre deux tours. void CDecor::BlupiStartStopRayon(int rank, POINT startCel, POINT endCel) { int i, icon, icon2; POINT cel, cel2, vector, pos; - if ( m_blupi[rank].perso == 1 || // araignée ? + if ( m_blupi[rank].perso == 1 || // araignée ? m_blupi[rank].perso == 2 ) // virus ? { return; @@ -2450,7 +2450,7 @@ void CDecor::BlupiStartStopRayon(int rank, POINT startCel, POINT endCel) } } - // Démarre un rayon. + // Démarre un rayon. cel.x = (startCel.x/2)*2; cel.y = (startCel.y/2)*2; cel2.x = (endCel.x/2)*2; @@ -2463,7 +2463,7 @@ void CDecor::BlupiStartStopRayon(int rank, POINT startCel, POINT endCel) if ( MoveCreate(cel, -1, false, CHOBJECT,-1, -1,-1, 9999,1,0, true) ) { - MoveAddIcons(cel, icon==10000?4:5, true); // éclairs + MoveAddIcons(cel, icon==10000?4:5, true); // éclairs } pos = ConvCelToPos(cel); @@ -2480,7 +2480,7 @@ void CDecor::BlupiStartStopRayon(int rank, POINT startCel, POINT endCel) if ( MoveCreate(cel, -1, false, CHOBJECT,-1, -1,-1, 9999,1,0, true) ) { - MoveAddIcons(cel, icon==10000?4:5, true); // éclairs + MoveAddIcons(cel, icon==10000?4:5, true); // éclairs } } } @@ -2488,8 +2488,8 @@ void CDecor::BlupiStartStopRayon(int rank, POINT startCel, POINT endCel) } -// Tourne un blupi, si nécessaire. -// Retourne false si ce n'est pas nécessaire. +// Tourne un blupi, si nécessaire. +// Retourne false si ce n'est pas nécessaire. bool CDecor::BlupiRotate(int rank) { @@ -2605,7 +2605,7 @@ bool CDecor::BlupiNextAction(int rank) } bOK = true; - if ( !BlupiRotate(rank) ) // si rotation pas nécessaire + if ( !BlupiRotate(rank) ) // si rotation pas nécessaire { m_blupi[rank].lastIcon = m_blupi[rank].icon; @@ -2699,7 +2699,7 @@ bool CDecor::BlupiNextAction(int rank) BlupiStartStopRayon(rank, iCel, m_blupi[rank].cel); } - // Blupi perd de l'énergie s'il fait qq chose. + // Blupi perd de l'énergie s'il fait qq chose. if ( m_blupi[rank].action != ACTION_STOP && m_blupi[rank].action != ACTION_STOPf && m_blupi[rank].action != ACTION_STOPb && @@ -2714,7 +2714,7 @@ bool CDecor::BlupiNextAction(int rank) { if ( m_blupi[rank].energy > 0 && m_blupi[rank].perso == 0 && // blupi ? - m_blupi[rank].vehicule == 0 ) // à pied ? + m_blupi[rank].vehicule == 0 ) // à pied ? { if ( m_bSuper ) a = 0; else a = 1; @@ -2738,7 +2738,7 @@ bool CDecor::BlupiNextAction(int rank) } } - // Blupi prend de l'énergie s'il mange. + // Blupi prend de l'énergie s'il mange. if ( m_blupi[rank].action == ACTION_MANGE ) { if ( m_blupi[rank].energy < MAXENERGY ) @@ -2747,7 +2747,7 @@ bool CDecor::BlupiNextAction(int rank) } } - // Le robot perd de l'énergie s'il fait qq chose. + // Le robot perd de l'énergie s'il fait qq chose. if ( m_blupi[rank].action != ACTION_R_STOP ) { if ( m_blupi[rank].energy > 0 && @@ -2761,7 +2761,7 @@ bool CDecor::BlupiNextAction(int rank) } } - // Le robot prend de l'énergie s'il se recharge. + // Le robot prend de l'énergie s'il se recharge. if ( m_blupi[rank].action == ACTION_R_CHARGE ) { if ( m_blupi[rank].energy < MAXENERGY ) @@ -2770,7 +2770,7 @@ bool CDecor::BlupiNextAction(int rank) } } - // Blupi guérrit s'il boit. + // Blupi guérrit s'il boit. if ( m_blupi[rank].action == ACTION_BOIT ) { m_blupi[rank].bMalade = false; @@ -2780,7 +2780,7 @@ bool CDecor::BlupiNextAction(int rank) } } - // Si blupi est presque complètement épuisé, il stoppe. + // Si blupi est presque complètement épuisé, il stoppe. if ( !bOK && m_blupi[rank].perso == 0 && m_blupi[rank].energy < 50 && @@ -2805,7 +2805,7 @@ void CDecor::BlupiNextGoal(int rank) pos = ConvCelToPos(m_blupi[rank].cel); - // Si blupi termine une action "mort", il doit disparaître. + // Si blupi termine une action "mort", il doit disparaître. if ( m_blupi[rank].action == ACTION_BRULE || m_blupi[rank].action == ACTION_TCHAO || m_blupi[rank].action == ACTION_A_GRILLE || @@ -2815,7 +2815,7 @@ void CDecor::BlupiNextGoal(int rank) return; } - // Si blupi passe trop prêt du feu, aie aie aie ... + // Si blupi passe trop prêt du feu, aie aie aie ... if ( IsFireCel(m_blupi[rank].cel) ) // blupi se brule les ailes ? { if ( m_blupi[rank].perso == 0 && @@ -2829,7 +2829,7 @@ void CDecor::BlupiNextGoal(int rank) //? BlupiInitAction(rank, ACTION_BRULE); //? goto init; } - if ( m_blupi[rank].perso == 1 || // araignée ? + if ( m_blupi[rank].perso == 1 || // araignée ? m_blupi[rank].perso == 2 ) // virus ? { BlupiDelete(rank); // la bestiole meurt @@ -2837,11 +2837,11 @@ void CDecor::BlupiNextGoal(int rank) } } - // Si blupi passe trop prêt d'un virus ... + // Si blupi passe trop prêt d'un virus ... if ( m_blupi[rank].perso == 0 && m_blupi[rank].vehicule != 1 && // pas en bateau ? m_blupi[rank].vehicule != 3 && // pas armure ? - !m_blupi[rank].bMalade && // en bonne santé ? + !m_blupi[rank].bMalade && // en bonne santé ? m_blupi[rank].goalAction != WM_ACTION_GRILLE && m_blupi[rank].goalAction != WM_ACTION_ELECTRO && m_blupi[rank].goalAction != WM_ACTION_ELECTROm && @@ -2872,7 +2872,7 @@ void CDecor::BlupiNextGoal(int rank) } } - // Si blupi est complètement épuisé, il meurt. + // Si blupi est complètement épuisé, il meurt. if ( m_blupi[rank].perso == 0 && m_blupi[rank].energy == 0 ) { @@ -2881,8 +2881,8 @@ void CDecor::BlupiNextGoal(int rank) goto init; } - // Assigne un but s'il s'agit d'une araignée. - if ( m_blupi[rank].perso == 1 && // araignée ? + // Assigne un but s'il s'agit d'une araignée. + if ( m_blupi[rank].perso == 1 && // araignée ? m_blupi[rank].goalAction != WM_ACTION_A_MORT ) { cel = m_blupi[rank].cel; @@ -2891,7 +2891,7 @@ void CDecor::BlupiNextGoal(int rank) GetObject(cel, channel, icon); if ( channel == CHOBJECT && (icon == 10000 || icon == 10001) && // rayon ? - MoveIsUsed(cel) ) // enclenché ? + MoveIsUsed(cel) ) // enclenché ? { BlupiInitAction(rank, ACTION_A_GRILLE); goto init; @@ -2922,11 +2922,11 @@ void CDecor::BlupiNextGoal(int rank) //? goto init; } if ( channel == CHOBJECT && - icon == 93 ) // piège ? + icon == 93 ) // piège ? { BlupiSound(rank, SOUND_PIEGE, pos); - PutObject(cel, CHOBJECT, 96); // araignée piégée - BlupiDelete(rank); // supprime araignée + PutObject(cel, CHOBJECT, 96); // araignée piégée + BlupiDelete(rank); // supprime araignée return; } } @@ -2958,7 +2958,7 @@ void CDecor::BlupiNextGoal(int rank) GetObject(cel, channel, icon); if ( channel == CHOBJECT && (icon == 10000 || icon == 10001) && // rayon ? - MoveIsUsed(cel) ) // enclenché ? + MoveIsUsed(cel) ) // enclenché ? { BlupiInitAction(rank, ACTION_V_GRILLE); goto init; @@ -3016,13 +3016,13 @@ void CDecor::BlupiNextGoal(int rank) if ( icon == 125 || // mine ? icon == 127 ) { - // Supprime le détonnateur. + // Supprime le détonnateur. BlupiDelete(GetCel(cel.x+1,cel.y+1), 6); } - if ( icon == 93 ) // piège ? + if ( icon == 93 ) // piège ? { BlupiSound(rank, SOUND_PIEGE, pos); - PutObject(cel, CHOBJECT, 97); // tracks piégé + PutObject(cel, CHOBJECT, 97); // tracks piégé BlupiDelete(rank); // supprime tracks return; } @@ -3038,10 +3038,10 @@ void CDecor::BlupiNextGoal(int rank) m_blupi[rank].bExist = false; if ( IsBlupiHere(cel, false) && m_blupi[m_blupiHere].perso == 0 && - m_blupi[m_blupiHere].vehicule == 0 ) // à pied ? + m_blupi[m_blupiHere].vehicule == 0 ) // à pied ? { m_blupi[rank].bExist = true; - // Blupi écrasé au sol. + // Blupi écrasé au sol. if ( MoveCreate(cel, rank, true, CHFLOOR,-1, -1,-1, 100,1,100, false, true) ) { @@ -3050,7 +3050,7 @@ void CDecor::BlupiNextGoal(int rank) } BlupiDelete(m_blupiHere); // plus de blupi ! BlupiSound(rank, SOUND_AIE, pos); - BlupiInitAction(rank, ACTION_T_ECRASE); // écrase blupi + BlupiInitAction(rank, ACTION_T_ECRASE); // écrase blupi goto init; } m_blupi[rank].bExist = true; @@ -3092,13 +3092,13 @@ void CDecor::BlupiNextGoal(int rank) if ( icon == 125 || // mine ? icon == 127 ) { - // Supprime le détonnateur. + // Supprime le détonnateur. BlupiDelete(GetCel(cel.x+1,cel.y+1), 6); } - if ( icon == 93 ) // piège ? + if ( icon == 93 ) // piège ? { BlupiSound(rank, SOUND_PIEGE, pos); - PutObject(cel, CHOBJECT, 98); // robot piégé + PutObject(cel, CHOBJECT, 98); // robot piégé BlupiDelete(rank); // supprime robot return; } @@ -3140,10 +3140,10 @@ void CDecor::BlupiNextGoal(int rank) cel.y = (cel.y/2)*2; GetObject(cel, channel, icon); if ( channel == CHOBJECT && - icon == 93 ) // piège ? + icon == 93 ) // piège ? { BlupiSound(rank, SOUND_PIEGE, pos); - PutObject(cel, CHOBJECT, 114); // bombe piégée + PutObject(cel, CHOBJECT, 114); // bombe piégée BlupiDelete(rank); // supprime bombe return; } @@ -3156,7 +3156,7 @@ void CDecor::BlupiNextGoal(int rank) GetObject(cel, channel, icon); if ( channel == CHOBJECT && IsBombeObject(icon) && // cabane, palissade, etc. ? - icon != 93 ) // pas piège ? + icon != 93 ) // pas piège ? { BlupiInitAction(rank, ACTION_STOP); GoalStart(rank, WM_ACTION_T_DYNAMITE, m_blupi[rank].cel); @@ -3173,8 +3173,8 @@ void CDecor::BlupiNextGoal(int rank) } } - // Assigne un but s'il s'agit d'un électro. - if ( m_blupi[rank].perso == 7 ) // électro ? + // Assigne un but s'il s'agit d'un électro. + if ( m_blupi[rank].perso == 7 ) // électro ? { cel = m_blupi[rank].cel; if ( cel.x%2 != 0 && cel.y%2 != 0 ) @@ -3183,11 +3183,11 @@ void CDecor::BlupiNextGoal(int rank) cel.y = (cel.y/2)*2; GetObject(cel, channel, icon); if ( channel == CHOBJECT && - icon == 93 ) // piège ? + icon == 93 ) // piège ? { BlupiSound(rank, SOUND_PIEGE, pos); - PutObject(cel, CHOBJECT, 19); // électro piégée - BlupiDelete(rank); // supprime électro + PutObject(cel, CHOBJECT, 19); // électro piégée + BlupiDelete(rank); // supprime électro return; } } @@ -3224,11 +3224,11 @@ void CDecor::BlupiNextGoal(int rank) } else { - // Si blupi a peu d'énergie et qu'il transporte + // Si blupi a peu d'énergie et qu'il transporte // qq chose, il doit stopper ! if ( m_blupi[rank].energy <= MAXENERGY/4 && m_blupi[rank].takeChannel != -1 && - (m_blupi[rank].vehicule == 0 || // à pied ? + (m_blupi[rank].vehicule == 0 || // à pied ? m_blupi[rank].vehicule == 3) ) // armure ? { // Si blupi est en train de descendre de la jeep @@ -3260,7 +3260,7 @@ void CDecor::BlupiNextGoal(int rank) if ( m_blupi[rank].perso == 0 || // blupi ? m_blupi[rank].perso == 8 ) // disciple ? { - if ( m_blupi[rank].busyCount == 0 ) // dernière tentative ? + if ( m_blupi[rank].busyCount == 0 ) // dernière tentative ? { GoalStop(rank, true); m_blupi[rank].goalCel.x = -1; @@ -3282,7 +3282,7 @@ void CDecor::BlupiNextGoal(int rank) } else { - GoalNextPhase(rank); // méta opération suivante + GoalNextPhase(rank); // méta opération suivante } init: @@ -3363,8 +3363,8 @@ void CDecor::BlupiStep(bool bFirst) } -// Retourne le rectangle occupé par un blupi, -// pour les sélections (pas exact). +// Retourne le rectangle occupé par un blupi, +// pour les sélections (pas exact). void CDecor::BlupiGetRect(int rank, RECT &rect) { @@ -3380,7 +3380,7 @@ void CDecor::BlupiGetRect(int rank, RECT &rect) rect.bottom = pos.y+DIMBLUPIY; } -// Retourne le blupi visé par la souris. +// Retourne le blupi visé par la souris. int CDecor::GetTargetBlupi(POINT pos) { @@ -3480,7 +3480,7 @@ int CDecor::GetTargetBlupi(POINT pos) } -// Déslectionne tous les blupi. +// Déslectionne tous les blupi. void CDecor::BlupiDeselect() { @@ -3496,7 +3496,7 @@ void CDecor::BlupiDeselect() m_rankBlupiHili = -1; } -// Déslectionne un blupi. +// Déslectionne un blupi. void CDecor::BlupiDeselect(int rank) { @@ -3504,14 +3504,14 @@ void CDecor::BlupiDeselect(int rank) m_blupi[rank].bArrow = false; if ( m_nbBlupiHili > 0 && - m_rankBlupiHili == rank ) // est-ce le blupi sélectionné ? + m_rankBlupiHili == rank ) // est-ce le blupi sélectionné ? { m_nbBlupiHili = 0; m_rankBlupiHili = -1; } } -// Met ou enlève une flèche au blupi sélectionné blupi. +// Met ou enlève une flèche au blupi sélectionné blupi. void CDecor::BlupiSetArrow(int rank, bool bArrow) { @@ -3530,7 +3530,7 @@ void CDecor::BlupiSetArrow(int rank, bool bArrow) } } -// Initialise la zone outline en fonction du rectangle de sélection. +// Initialise la zone outline en fonction du rectangle de sélection. void CDecor::InitOutlineRect() { @@ -3552,7 +3552,7 @@ void CDecor::InitOutlineRect() } } -// Sélectionne un blupi lorsque le bouton est pressé. +// Sélectionne un blupi lorsque le bouton est pressé. void CDecor::BlupiHiliDown(POINT pos, bool bAdd) { @@ -3568,19 +3568,19 @@ void CDecor::BlupiHiliDown(POINT pos, bool bAdd) InitOutlineRect(); } -// Sélectionne un blupi lorsque la souris est déplacée. +// Sélectionne un blupi lorsque la souris est déplacée. void CDecor::BlupiHiliMove(POINT pos, bool bAdd) { - if ( m_bHiliRect ) // rectangle de sélection existe ? + if ( m_bHiliRect ) // rectangle de sélection existe ? { m_p2Hili = ConvPosToCel(pos); InitOutlineRect(); } } -// Sélectionne un blupi lorsque le bouton est relâché. -// Retourne false si la sélection n'a pas changé ! +// Sélectionne un blupi lorsque le bouton est relâché. +// Retourne false si la sélection n'a pas changé ! void CDecor::BlupiHiliUp(POINT pos, bool bAdd) { @@ -3598,28 +3598,28 @@ void CDecor::BlupiHiliUp(POINT pos, bool bAdd) SOUND_OK6, }; - static int table_sound_okf[3] = // si fatigué + static int table_sound_okf[3] = // si fatigué { SOUND_OK1f, SOUND_OK2f, SOUND_OK3f, }; - static int table_sound_oke[3] = // si énervé + static int table_sound_oke[3] = // si énervé { SOUND_OK1e, SOUND_OK2e, SOUND_OK3e, }; - if ( m_bHiliRect ) // rectangle de sélection existe ? + if ( m_bHiliRect ) // rectangle de sélection existe ? { nb = 0; if ( m_p1Hili.x == m_p2Hili.x && m_p1Hili.y == m_p2Hili.y ) { - rank = GetTargetBlupi(pos); // rank <- blupi visé par la souris + rank = GetTargetBlupi(pos); // rank <- blupi visé par la souris if ( rank != -1 ) { m_blupi[rank].bHili = !m_blupi[rank].bHili; @@ -3690,7 +3690,7 @@ void CDecor::BlupiHiliUp(POINT pos, bool bAdd) if ( nb > 0 ) { - if ( nb > 1 ) // sélection multiple ? + if ( nb > 1 ) // sélection multiple ? { sound = table_sound_ok[Random(0,5)]; } @@ -3704,7 +3704,7 @@ void CDecor::BlupiHiliUp(POINT pos, bool bAdd) { sound = table_sound_ok[Random(0,5)]; } - if ( bEnerve ) // déjà sélectionné y'a peu ? + if ( bEnerve ) // déjà sélectionné y'a peu ? { sound = table_sound_oke[Random(0,2)]; } @@ -3728,7 +3728,7 @@ void CDecor::BlupiHiliUp(POINT pos, bool bAdd) } } -// Dessine le rectangle de sélection, si nécessaire. +// Dessine le rectangle de sélection, si nécessaire. void CDecor::BlupiDrawHili() { @@ -3767,11 +3767,11 @@ void CDecor::BlupiDrawHili() cc.x = c1.x; cc.y = c2.y; - p3 = ConvCelToPos(cc); // p3 à gauche + p3 = ConvCelToPos(cc); // p3 à gauche cc.x = c2.x; cc.y = c1.y; - p4 = ConvCelToPos(cc); // p4 à droite + p4 = ConvCelToPos(cc); // p4 à droite p1.x += DIMCELX/2; p2.x += DIMCELX/2; @@ -3886,8 +3886,8 @@ void CDecor::BlupiDrawHili() } -// Retourne le bouton par défaut à un endroit donné. -// Est utilisé pour trouver que faire lors d'un clic +// Retourne le bouton par défaut à un endroit donné. +// Est utilisé pour trouver que faire lors d'un clic // avec le bouton de droite. int CDecor::GetDefButton(POINT cel) @@ -3918,7 +3918,7 @@ int CDecor::GetDefButton(POINT cel) if ( iCel.x%2 == 1 && iCel.y%2 == 1 ) { - if ( icon == 14 ) button = BUTTON_CARRY; // métal + if ( icon == 14 ) button = BUTTON_CARRY; // métal if ( icon == 36 ) button = BUTTON_CARRY; // planches if ( icon == 44 ) button = BUTTON_CARRY; // pierres if ( icon == 60 ) button = BUTTON_MANGE; // tomates @@ -3929,7 +3929,7 @@ int CDecor::GetDefButton(POINT cel) if ( icon == 95 ) button = BUTTON_CARRY; // fleurs if ( icon == 85 ) button = BUTTON_CARRY; // dynamite if ( icon == 92 ) button = BUTTON_CARRY; // poison - if ( icon == 93 ) button = BUTTON_CARRY; // piège + if ( icon == 93 ) button = BUTTON_CARRY; // piège if ( icon == 123 ) button = BUTTON_CARRY; // fer if ( icon == 125 ) button = BUTTON_CARRY; // mine } @@ -3976,7 +3976,7 @@ int CDecor::GetDefButton(POINT cel) return button; } -// Indique un but visé à long terme, pour un blupi donné. +// Indique un but visé à long terme, pour un blupi donné. bool CDecor::BlupiGoal(int rank, int button, POINT cel, POINT cMem) { @@ -3984,8 +3984,8 @@ bool CDecor::BlupiGoal(int rank, int button, POINT cel, POINT cMem) int i, action, channel, icon, error, direct, step; bool bRepeat = false; - // Si plusieurs blupi sont sélectionnés, ils ne vont pas - // tous à la même destination. + // Si plusieurs blupi sont sélectionnés, ils ne vont pas + // tous à la même destination. if ( button == BUTTON_GO ) { step = 0; @@ -4044,7 +4044,7 @@ bool CDecor::BlupiGoal(int rank, int button, POINT cel, POINT cMem) m_blupi[rank].goalCel = m_blupi[rank].destCel; m_blupi[rank].goalAction = 0; } - m_blupi[rank].repeatLevel = -1; // stoppe la répétition + m_blupi[rank].repeatLevel = -1; // stoppe la répétition return false; } @@ -4067,7 +4067,7 @@ bool CDecor::BlupiGoal(int rank, int button, POINT cel, POINT cMem) goalHili.x%2 == 0 && // au fond ? goalHili.y%2 == 1 ) { - return false; // action refusée + return false; // action refusée } if ( m_blupi[rank].perso != 8 && // pas disciple ? channel == CHOBJECT && @@ -4094,10 +4094,10 @@ bool CDecor::BlupiGoal(int rank, int button, POINT cel, POINT cMem) } GetFloor(goalHili2, channel, icon); if ( m_blupi[rank].perso == 0 && - m_blupi[rank].vehicule == 0 && // à pied ? + m_blupi[rank].vehicule == 0 && // à pied ? m_blupi[rank].takeChannel == -1 && // ne porte rien ? channel == CHFLOOR && - icon == 80 ) // téléporteur ? + icon == 80 ) // téléporteur ? { if ( cel.x%2 == 0 && cel.y%2 == 0 ) { @@ -4123,7 +4123,7 @@ bool CDecor::BlupiGoal(int rank, int button, POINT cel, POINT cMem) if ( action == WM_ACTION_DEPOSE && m_blupi[rank].energy <= MAXENERGY/4 ) { - // Energie juste pour déposer l'objet transporté. + // Energie juste pour déposer l'objet transporté. m_blupi[rank].energy = MAXENERGY/4+20; } @@ -4151,7 +4151,7 @@ bool CDecor::BlupiGoal(int rank, int button, POINT cel, POINT cMem) { GetObject(goalHili2, channel, icon); if ( channel == CHOBJECT && - icon == 83 ) // fleurs foncées ? + icon == 83 ) // fleurs foncées ? { action = WM_ACTION_FLEUR2; } @@ -4263,8 +4263,8 @@ bool CDecor::BlupiGoal(int rank, int button, POINT cel, POINT cMem) return true; } -// Indique un but visé à long terme, pour tous les blupi -// sélectionnés. +// Indique un but visé à long terme, pour tous les blupi +// sélectionnés. void CDecor::BlupiGoal(POINT cel, int button) { @@ -4360,9 +4360,9 @@ void CDecor::BlupiGoal(POINT cel, int button) } -// Indique si une cellule est occupée pour un tracks. -// La cellule est considérée libre uniquement si elle -// contient un blupi à pied ou un détonnateur de mine +// Indique si une cellule est occupée pour un tracks. +// La cellule est considérée libre uniquement si elle +// contient un blupi à pied ou un détonnateur de mine // (personnage invisible). bool CDecor::IsTracksHere(POINT cel, bool bSkipInMove) @@ -4375,9 +4375,9 @@ bool CDecor::IsTracksHere(POINT cel, bool bSkipInMove) { if ( m_blupi[rank].bExist && (m_blupi[rank].perso != 0 || // blupi ? - m_blupi[rank].vehicule != 0 || // à pied ? + m_blupi[rank].vehicule != 0 || // à pied ? m_bInvincible) && - m_blupi[rank].perso != 6 ) // détonnateur ? + m_blupi[rank].perso != 6 ) // détonnateur ? { if ( bSkipInMove && m_blupi[rank].goalCel.x != -1 ) continue; @@ -4400,8 +4400,8 @@ bool CDecor::IsTracksHere(POINT cel, bool bSkipInMove) return false; } -// Indique si une cellule est occupée par un blupi. -// Le blupi donné dans exRank est ignoré ! +// Indique si une cellule est occupée par un blupi. +// Le blupi donné dans exRank est ignoré ! bool CDecor::IsBlupiHereEx(POINT cel1, POINT cel2, int exRank, bool bSkipInMove) { @@ -4413,7 +4413,7 @@ bool CDecor::IsBlupiHereEx(POINT cel1, POINT cel2, int exRank, bool bSkipInMove) for ( rank=0 ; rank 1 ) // sélection multiple ? + if ( m_nbBlupiHili > 1 ) // sélection multiple ? { error = CelOkForAction(cel, table_actions[BUTTON_GO], m_rankBlupiHili); if ( error == 0 ) @@ -4652,18 +4652,18 @@ void CDecor::BlupiGetButtons(POINT pos, int &nb, return; } - // Vérifie si le blupi sélectionné peut construire. + // Vérifie si le blupi sélectionné peut construire. if ( m_rankBlupiHili >= 0 ) { if ( m_blupi[m_rankBlupiHili].energy > MAXENERGY/4 && m_blupi[m_rankBlupiHili].takeChannel == -1 && - m_blupi[m_rankBlupiHili].vehicule == 0 ) // à pied ? + m_blupi[m_rankBlupiHili].vehicule == 0 ) // à pied ? { bBuild = true; } } - // Met les différentes actions. + // Met les différentes actions. i = 0; while ( table_buttons[i] != -1 ) { @@ -4677,17 +4677,17 @@ void CDecor::BlupiGetButtons(POINT pos, int &nb, else bPut = false; if ( bBuild && - table_buttons[i+1] != 0 && // toujours présent si matière ? + table_buttons[i+1] != 0 && // toujours présent si matière ? (m_rankBlupiHili < 0 || m_blupi[m_rankBlupiHili].perso != 8 || // pas disciple ? table_buttons[i+1] != 44) ) // ni pierres ? { GetObject(cel2, channel, icon); if ( channel == CHOBJECT && - icon == table_buttons[i+1] && // matière ? + icon == table_buttons[i+1] && // matière ? cel.x%2 == 1 && cel.y%2 == 1 ) { - bPut = true; // bouton présent, mais disable ! + bPut = true; // bouton présent, mais disable ! } } @@ -4716,7 +4716,7 @@ void CDecor::BlupiGetButtons(POINT pos, int &nb, nb ++; } - // Regarde s'il faut ajouter le bouton "répète". + // Regarde s'il faut ajouter le bouton "répète". if ( m_blupi[m_rankBlupiHili].repeatLevel != -1 || m_blupi[m_rankBlupiHili].energy <= MAXENERGY/4 || m_buttonExist[BUTTON_REPEAT] == 0 ) @@ -4727,7 +4727,7 @@ void CDecor::BlupiGetButtons(POINT pos, int &nb, for ( i=0 ; i 0 ) // au moins 2 actions à répéter ? + if ( rank > 0 ) // au moins 2 actions à répéter ? { m_blupi[m_rankBlupiHili].repeatLevelHope = rank; @@ -4757,10 +4757,10 @@ void CDecor::TerminatedInit() m_winLastRobots = 0; } -// Vérifie si la partie est terminée. -// Retourne 0 si la partie n'est pas terminée. +// Vérifie si la partie est terminée. +// Retourne 0 si la partie n'est pas terminée. // Retourne 1 si la partie est perdue. -// Retourne 2 si la partie est gagnée. +// Retourne 2 si la partie est gagnée. int CDecor::IsTerminated() { @@ -4878,7 +4878,7 @@ int CDecor::IsTerminated() if ( m_nbStatRobots > 0 ) return 0; // continue; } - out = 2; // gagné + out = 2; // gagné delay: m_winCount = count; @@ -4899,7 +4899,7 @@ int CDecor::IsTerminated() } } - return out; // perdu/gagné + return out; // perdu/gagné } m_winCount --; return 0; // continue diff --git a/src/decgoal.cpp b/src/decgoal.cpp index 1687f97..51fed1a 100644 --- a/src/decgoal.cpp +++ b/src/decgoal.cpp @@ -614,7 +614,7 @@ static short table_goal_build1[] = GOAL_GOBLUPI, +1,0, true, GOAL_ACTION, ACTION_PIOCHE, DIRECT_E, //? GOAL_ENERGY, MAXENERGY/4, - // échaffaudage + // échaffaudage GOAL_BUILDOBJECT, -1,0, CHOBJECT,62, -1,-1, DIMOBJY/10,18,10*100, GOAL_ACTION, ACTION_SCIE, DIRECT_S, GOAL_GOBLUPI, 0,-1, true, @@ -663,7 +663,7 @@ static short table_goal_build2[] = GOAL_ACTION, ACTION_PIOCHE, DIRECT_E, GOAL_GOBLUPI, +1,0, true, GOAL_ACTION, ACTION_PIOCHE, DIRECT_E, - GOAL_PUTOBJECT, -1,0, -1,-1, // enlève les planches + GOAL_PUTOBJECT, -1,0, -1,-1, // enlève les planches GOAL_GOBLUPI, -1,+1, true, GOAL_ACTION, ACTION_BUILDSEC, DIRECT_S, GOAL_GOBLUPI, +1,0, true, @@ -726,7 +726,7 @@ static short table_goal_build4[] = GOAL_GROUP, 2, GOAL_INTERRUPT, 0, // prioritaire GOAL_WORK, 0,-1, - // échaffaudage + // échaffaudage GOAL_BUILDOBJECT, 0,-1, CHOBJECT,126, -1,-1, DIMOBJY/10,18,10*100, GOAL_ACTION, ACTION_BUILDSEC, DIRECT_S, GOAL_GOBLUPI, +1,-1, true, @@ -794,7 +794,7 @@ static short table_goal_build5[] = 0 }; -// Construction d'un téléporteur. +// Construction d'un téléporteur. static short table_goal_build6[] = { WM_ACTION_BUILD6, @@ -804,7 +804,7 @@ static short table_goal_build6[] = GOAL_GROUP, 3, GOAL_INTERRUPT, 0, // prioritaire GOAL_WORK, 0,-1, - GOAL_BUILDFLOOR, 0,-1, CHFLOOR,80, CHMASK1,0, 16,14,1*100, // téléporteur + GOAL_BUILDFLOOR, 0,-1, CHFLOOR,80, CHMASK1,0, 16,14,1*100, // téléporteur GOAL_ACTION, ACTION_PIOCHE, DIRECT_E, GOAL_ACTION, ACTION_PIOCHE, DIRECT_E, GOAL_GOBLUPI, +1,-1, true, @@ -813,7 +813,7 @@ static short table_goal_build6[] = GOAL_ACTION, ACTION_PIOCHE, DIRECT_E, GOAL_GOBLUPI, +1,0, true, GOAL_ACTION, ACTION_PIOCHE, DIRECT_E, - GOAL_PUTOBJECT, -1,0, -1,-1, // enlève les planches + GOAL_PUTOBJECT, -1,0, -1,-1, // enlève les planches GOAL_GOBLUPI, -1,+1, true, GOAL_ACTION, ACTION_BUILDSEC, DIRECT_S, GOAL_GOBLUPI, +1,0, true, @@ -850,7 +850,7 @@ static short table_goal_mur[] = GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, - GOAL_PUTOBJECT, 0,0, -1,-1, // enlève les pierres + GOAL_PUTOBJECT, 0,0, -1,-1, // enlève les pierres GOAL_GOBLUPI, +1,+1, true, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, @@ -890,7 +890,7 @@ static short table_goal_tour[] = GOAL_GOBLUPI, +1,-1, true, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, - GOAL_PUTOBJECT, -1,0, -1,-1, // enlève les pierres + GOAL_PUTOBJECT, -1,0, -1,-1, // enlève les pierres GOAL_GOBLUPI, 0,+1, true, GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, @@ -924,7 +924,7 @@ static short table_goal_palis[] = GOAL_ACTION, ACTION_PIOCHE, DIRECT_E, GOAL_GOBLUPI, 0,-1, true, GOAL_ACTION, ACTION_PIOCHE, DIRECT_E, - GOAL_PUTOBJECT, 0,0, -1,-1, // enlève les planches + GOAL_PUTOBJECT, 0,0, -1,-1, // enlève les planches GOAL_GOBLUPI, +1,+1, true, GOAL_ACTION, ACTION_PIOCHESOURD, DIRECT_E, GOAL_ACTION, ACTION_PIOCHESOURD, DIRECT_E, @@ -983,7 +983,7 @@ static short table_goal_depose[] = GOAL_IFTERM, +1,0, // emplacement libre ? GOAL_INTERRUPT, 0, // prioritaire GOAL_WORK, 0,-1, - GOAL_PUTOBJECT, 0,-1, -3,-3, // l'objet transporté + GOAL_PUTOBJECT, 0,-1, -3,-3, // l'objet transporté GOAL_BUILDOBJECT, 0,-1, -2,-2, -1,-1, 11,1,1*100, GOAL_ADDMOVES, 0,-1, 4, GOAL_DEPOSE, @@ -1003,7 +1003,7 @@ static short table_goal_depose2[] = GOAL_IFTERM, 0,+1, // emplacement libre ? GOAL_INTERRUPT, 0, // prioritaire GOAL_WORK, -1,0, - GOAL_PUTOBJECT, -1,0, -3,-3, // l'objet transporté + GOAL_PUTOBJECT, -1,0, -3,-3, // l'objet transporté GOAL_BUILDOBJECT, -1,0, -2,-2, -1,-1, 11,1,1*100, GOAL_ADDMOVES, -1,0, 5, GOAL_DEPOSE, @@ -1022,7 +1022,7 @@ static short table_goal_newblupi[] = GOAL_GROUP, 5, GOAL_INTERRUPT, 0, // prioritaire GOAL_WORK, 0,-1, - GOAL_PUTOBJECT, 0,-1, -3,-3, // l'objet transporté + GOAL_PUTOBJECT, 0,-1, -3,-3, // l'objet transporté GOAL_BUILDOBJECT, 0,-1, -2,-2, -1,-1, 11,1,1*100, GOAL_ADDMOVES, 0,-1, 4, GOAL_DEPOSE, @@ -1159,7 +1159,7 @@ static short table_goal_mange2[] = 0 }; -// Boit à la bouteille (est). +// Boit à la bouteille (est). static short table_goal_boit[] = { WM_ACTION_BOIT, @@ -1178,7 +1178,7 @@ static short table_goal_boit[] = 0 }; -// Boit à la bouteille (sud). +// Boit à la bouteille (sud). static short table_goal_boit2[] = { WM_ACTION_BOIT2, @@ -1323,7 +1323,7 @@ static short table_goal_labo[] = 0 }; -// Blupi fait péter la dynamite. +// Blupi fait péter la dynamite. static short table_goal_dynamite[] = { WM_ACTION_DYNAMITE, @@ -1335,7 +1335,7 @@ static short table_goal_dynamite[] = GOAL_WORK, 0,-1, GOAL_PUTOBJECT, 0,-1, -1,-1, GOAL_BUILDOBJECT, 0,-1, CHOBJECT,-1, -1,-1, DIMOBJY,1,-1*100, - GOAL_ADDICONS, 0,-1, 7, // mèche + GOAL_ADDICONS, 0,-1, 7, // mèche GOAL_ACTION, ACTION_MECHE, DIRECT_E, GOAL_SOUND, SOUND_DYNAMITE, GOAL_GROUP, 4, @@ -1373,7 +1373,7 @@ static short table_goal_dynamite[] = 0 }; -// Blupi fait péter la dynamite très fort. +// Blupi fait péter la dynamite très fort. static short table_goal_dynamite2[] = { WM_ACTION_DYNAMITE2, @@ -1385,7 +1385,7 @@ static short table_goal_dynamite2[] = GOAL_WORK, 0,-1, GOAL_PUTOBJECT, 0,-1, -1,-1, GOAL_BUILDOBJECT, 0,-1, CHOBJECT,-1, -1,-1, DIMOBJY,1,-1*100, - GOAL_ADDICONS, 0,-1, 7, // mèche + GOAL_ADDICONS, 0,-1, 7, // mèche GOAL_ACTION, ACTION_MECHE, DIRECT_E, GOAL_SOUND, SOUND_DYNAMITE, GOAL_GROUP, 5, @@ -1486,7 +1486,7 @@ static short table_goal_dynamite2[] = 0 }; -// Tracks fait péter la dynamite. +// Tracks fait péter la dynamite. static short table_goal_t_dynamite[] = { WM_ACTION_T_DYNAMITE, @@ -1548,7 +1548,7 @@ static short table_goal_mine[] = 0 }; -// Détonnateur de mine créé par GOAL_AMORCE (blupi invisible). +// Détonnateur de mine créé par GOAL_AMORCE (blupi invisible). static short table_goal_mine2[] = { WM_ACTION_MINE2, @@ -2006,7 +2006,7 @@ static short table_goal_bateaun[] = 0 }; -// Départ en bateau. +// Départ en bateau. static short table_goal_bateaude[] = { WM_ACTION_BATEAUDE, @@ -2023,7 +2023,7 @@ static short table_goal_bateaude[] = GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_GROUP, 2, - GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève le bateau + GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève le bateau GOAL_VEHICULE, 1, // en bateau GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_GOBLUPI, +1,0, true, @@ -2047,7 +2047,7 @@ static short table_goal_bateauds[] = GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_GROUP, 2, - GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève le bateau + GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève le bateau GOAL_VEHICULE, 1, // en bateau GOAL_GOBLUPI, 0,+1, true, GOAL_TERM, @@ -2070,7 +2070,7 @@ static short table_goal_bateaudo[] = GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_GROUP, 2, - GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève le bateau + GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève le bateau GOAL_VEHICULE, 1, // en bateau GOAL_GOBLUPI, -1,0, true, GOAL_TERM, @@ -2093,14 +2093,14 @@ static short table_goal_bateaudn[] = GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_GROUP, 2, - GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève le bateau + GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève le bateau GOAL_VEHICULE, 1, // en bateau GOAL_GOBLUPI, 0,-1, true, GOAL_TERM, 0 }; -// Arrivée en bateau. +// Arrivée en bateau. static short table_goal_bateauae[] = { WM_ACTION_BATEAUAE, @@ -2114,7 +2114,7 @@ static short table_goal_bateauae[] = GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_GROUP, 2, GOAL_PUTOBJECT, -1,-1, CHOBJECT,117, // remet le bateau - GOAL_VEHICULE, 0, // à pied + GOAL_VEHICULE, 0, // à pied GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_ACTION, ACTION_STOP, DIRECT_E, @@ -2141,7 +2141,7 @@ static short table_goal_bateauas[] = GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_GROUP, 2, GOAL_PUTOBJECT, -1,-1, CHOBJECT,117, // remet le bateau - GOAL_VEHICULE, 0, // à pied + GOAL_VEHICULE, 0, // à pied GOAL_GOBLUPI, 0,-2, true, GOAL_TERM, 0 @@ -2160,7 +2160,7 @@ static short table_goal_bateauao[] = GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_GROUP, 2, GOAL_PUTOBJECT, -1,-1, CHOBJECT,117, // remet le bateau - GOAL_VEHICULE, 0, // à pied + GOAL_VEHICULE, 0, // à pied GOAL_GOBLUPI, +1,0, true, GOAL_TERM, 0 @@ -2179,7 +2179,7 @@ static short table_goal_bateauan[] = GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_GROUP, 2, GOAL_PUTOBJECT, -1,-1, CHOBJECT,117, // remet le bateau - GOAL_VEHICULE, 0, // à pied + GOAL_VEHICULE, 0, // à pied GOAL_GOBLUPI, 0,+1, true, GOAL_TERM, 0 @@ -2223,7 +2223,7 @@ static short table_goal_r_build1[] = 0 }; -// Le robot construit une usine à araignées. +// Le robot construit une usine à araignées. static short table_goal_r_build2[] = { WM_ACTION_R_BUILD2, @@ -2261,7 +2261,7 @@ static short table_goal_r_build2[] = 0 }; -// Le robot construit une usine à virus. +// Le robot construit une usine à virus. static short table_goal_r_build3[] = { WM_ACTION_R_BUILD3, @@ -2299,7 +2299,7 @@ static short table_goal_r_build3[] = 0 }; -// Le robot construit une usine à tracks. +// Le robot construit une usine à tracks. static short table_goal_r_build4[] = { WM_ACTION_R_BUILD4, @@ -2337,7 +2337,7 @@ static short table_goal_r_build4[] = 0 }; -// Le robot construit une usine à bombe. +// Le robot construit une usine à bombe. static short table_goal_r_build5[] = { WM_ACTION_R_BUILD5, @@ -2375,7 +2375,7 @@ static short table_goal_r_build5[] = 0 }; -// Le robot construit une usine à électro. +// Le robot construit une usine à électro. static short table_goal_r_build6[] = { WM_ACTION_R_BUILD6, @@ -2436,7 +2436,7 @@ static short table_goal_r_make1[] = 0 }; -// Le robot construit une araignée. +// Le robot construit une araignée. static short table_goal_r_make2[] = { WM_ACTION_R_MAKE2, @@ -2477,7 +2477,7 @@ static short table_goal_r_make2[] = GOAL_GROUP, 2, GOAL_FINISHMOVE, GOAL_PUTOBJECT, 0,-1, CHOBJECT,101, // ouvre la porte - GOAL_NEWPERSO, +1,0, 1, // araignée (qui sortira) + GOAL_NEWPERSO, +1,0, 1, // araignée (qui sortira) GOAL_ACTION, ACTION_R_DELAY, DIRECT_E, GOAL_ACTION, ACTION_R_DELAY, DIRECT_E, GOAL_SOUND, SOUND_PORTE, @@ -2693,7 +2693,7 @@ static short table_goal_r_make5[] = 0 }; -// Le robot construit un électro. +// Le robot construit un électro. static short table_goal_r_make6[] = { WM_ACTION_R_MAKE6, @@ -2734,7 +2734,7 @@ static short table_goal_r_make6[] = GOAL_GROUP, 2, GOAL_FINISHMOVE, GOAL_PUTOBJECT, 0,-1, CHOBJECT,18, // ouvre la porte - GOAL_NEWPERSO, +1,0, 7, // électro (qui sortira) + GOAL_NEWPERSO, +1,0, 7, // électro (qui sortira) GOAL_ACTION, ACTION_R_DELAY, DIRECT_E, GOAL_SOUND, SOUND_PORTE, GOAL_PUTOBJECT, 0,-1, CHOBJECT,17, // ferme la porte @@ -2770,7 +2770,7 @@ static short table_goal_mjeep[] = GOAL_WORK, -1,0, GOAL_ACTION, ACTION_SAUTE1, DIRECT_S, GOAL_GROUP, 2, - GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève la jeep + GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève la jeep GOAL_VEHICULE, 2, // en jeep GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_ACTION, ACTION_STOP, DIRECT_E, @@ -2796,7 +2796,7 @@ static short table_goal_djeep[] = GOAL_INTERRUPT, 0, // prioritaire GOAL_WORK, -1,-1, GOAL_PUTOBJECT, -1,-1, CHOBJECT,118, // remet la jeep - GOAL_VEHICULE, 0, // à pied + GOAL_VEHICULE, 0, // à pied GOAL_ACTUALISE, GOAL_ACTION, ACTION_SAUTE1, DIRECT_N, GOAL_ACTION, ACTION_STOP, DIRECT_N, @@ -2825,7 +2825,7 @@ static short table_goal_marmure[] = GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_GROUP, 2, - GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève l'armure + GOAL_PUTOBJECT, -1,-1, -1,-1, // enlève l'armure GOAL_ACTION, ACTION_ARMURECLOSE, DIRECT_E, GOAL_VEHICULE, 3, // en armure GOAL_ACTION, ACTION_STOP, DIRECT_E, @@ -2867,13 +2867,13 @@ static short table_goal_darmure[] = GOAL_GROUP, 3, GOAL_WORK, -1,-1, GOAL_PUTOBJECT, -1,-1, CHOBJECT,16, // remet l'armure - GOAL_VEHICULE, 0, // à pied + GOAL_VEHICULE, 0, // à pied GOAL_GOBLUPI, 0,-1, true, GOAL_TERM, 0 }; -// Blupi cherche où planter des drapeaux. +// Blupi cherche où planter des drapeaux. static short table_goal_drapeau[] = { WM_ACTION_DRAPEAU, @@ -3164,7 +3164,7 @@ static short table_goal_fabdisc[] = 0 }; -// L'électro va sur un blupi puis lance ses rayons. +// L'électro va sur un blupi puis lance ses rayons. static short table_goal_e_rayon[] = { WM_ACTION_E_RAYON, @@ -3254,7 +3254,7 @@ static short table_goal_e_rayon[] = 0 }; -// Blupi s'électrocute. +// Blupi s'électrocute. static short table_goal_electro[] = { WM_ACTION_ELECTRO, @@ -3307,7 +3307,7 @@ static short table_goal_grille[] = 0 }; -// L'araignée meurt. +// L'araignée meurt. static short table_goal_a_mort[] = { WM_ACTION_A_MORT, @@ -3318,12 +3318,12 @@ static short table_goal_a_mort[] = GOAL_ACTION, ACTION_A_MORT1, DIRECT_E, GOAL_ACTION, ACTION_A_MORT2, DIRECT_E, GOAL_ACTION, ACTION_A_MORT3, DIRECT_E, - GOAL_DELETE, // l'araignée meurt brutalement + GOAL_DELETE, // l'araignée meurt brutalement GOAL_TERM, 0 }; -// Blupi se prépare à répéter une liste. +// Blupi se prépare à répéter une liste. static short table_goal_repeat[] = { WM_ACTION_REPEAT, @@ -3331,7 +3331,7 @@ static short table_goal_repeat[] = 0 }; -// Blupi se téléporte d'un endroit à un autre. +// Blupi se téléporte d'un endroit à un autre. static short table_goal_teleporte00[] = { WM_ACTION_TELEPORTE00, @@ -3528,7 +3528,7 @@ static short* table_pGoal[] = nullptr }; -// Retourne le pointeur à la table table_goal_*. +// Retourne le pointeur à la table table_goal_*. short* GetTableGoal(int action) { @@ -3538,7 +3538,7 @@ short* GetTableGoal(int action) { if ( **ppTable == action ) { - return *ppTable+1; // après WM_ACTION_* + return *ppTable+1; // après WM_ACTION_* } ppTable ++; diff --git a/src/decgoal.h b/src/decgoal.h index e5505cc..4fe5307 100644 --- a/src/decgoal.h +++ b/src/decgoal.h @@ -1,7 +1,7 @@ #pragma once -// Méta opérations (goal). +// Méta opérations (goal). #define GOAL_TERM 0 // #define GOAL_GOHILI 1 // dx,dy, bPass diff --git a/src/decio.cpp b/src/decio.cpp index 505d285..b5405c7 100644 --- a/src/decio.cpp +++ b/src/decio.cpp @@ -32,26 +32,26 @@ DescFile; typedef struct { - int bExist; // true -> utilisé - int bHili; // true -> sélectionné + int bExist; // true -> utilisé + int bHili; // true -> sélectionné short perso; // personnage, voir (*) short goalAction; // action (long terme) short goalPhase; // phase (long terme) - POINT goalCel; // cellule visée (long terme) + POINT goalCel; // cellule visée (long terme) POINT passCel; // cellule tranversante - short energy; // énergie restante + short energy; // énergie restante POINT cel; // cellule actuelle POINT destCel; // cellule destination short action; // action en cours short aDirect; // direction actuelle - short sDirect; // direction souhaitée + short sDirect; // direction souhaitée - POINT pos; // position relative à partir de la cellule - short posZ; // déplacement z + POINT pos; // position relative à partir de la cellule + short posZ; // déplacement z short channel; short lastIcon; short icon; @@ -60,12 +60,12 @@ typedef struct short interrupt; // 0=prioritaire, 1=normal, 2=misc short clipLeft; - int nbUsed; // nb de points déjà visités + int nbUsed; // nb de points déjà visités char nextRankUsed; POINT posUsed[MAXUSED]; char rankUsed[MAXUSED]; - short takeChannel; // objet transporté + short takeChannel; // objet transporté short takeIcon; POINT fix; // point fixe (cultive, pont) @@ -73,15 +73,15 @@ typedef struct short jaugePhase; short jaugeMax; short stop; // 1 -> devra stopper - short bArrow; // true -> flèche en dessus de blupi - short bRepeat; // true -> répète l'action + short bArrow; // true -> flèche en dessus de blupi + short bRepeat; // true -> répète l'action short nLoop; // nb de boucles pour GOAL_OTHERLOOP short cLoop; // boucle en cours - short vIcon; // icône variable - POINT goalHili; // but visé + short vIcon; // icône variable + POINT goalHili; // but visé short bMalade; // true -> blupi malade - short bCache; // true -> caché (pas dessiné) - short vehicule; // véhicule utilisé par blupi, voir (**) + short bCache; // true -> caché (pas dessiné) + short vehicule; // véhicule utilisé par blupi, voir (**) char busyCount; char busyDelay; char clicCount; @@ -91,7 +91,7 @@ typedef struct OldBlupi; -// Sauve le décor sur disque. +// Sauve le décor sur disque. bool CDecor::Write(int rank, bool bUser, int world, int time, int total) { @@ -170,7 +170,7 @@ bool CDecor::Write(int rank, bool bUser, int world, int time, int total) return false; } -// Lit le décor sur disque. +// Lit le décor sur disque. bool CDecor::Read(int rank, bool bUser, int &world, int &time, int &total) { @@ -297,7 +297,7 @@ bool CDecor::Read(int rank, bool bUser, int &world, int &time, int &total) InitDrapeau(); } - BlupiDeselect(); // désélectionne tous les blupi + BlupiDeselect(); // désélectionne tous les blupi free(pBuffer); fclose(file); @@ -307,7 +307,7 @@ bool CDecor::Read(int rank, bool bUser, int &world, int &time, int &total) if ( pBuffer != nullptr ) free(pBuffer); if ( file != nullptr ) fclose(file); - Flush(); // initialise un décor neutre + Flush(); // initialise un décor neutre return false; } @@ -381,7 +381,7 @@ bool CDecor::FileExist(int rank, bool bUser, int &world, int &time, int &total) #define MARG 18 -// Initialise un décor neutre. +// Initialise un décor neutre. void CDecor::Flush() { diff --git a/src/decmap.cpp b/src/decmap.cpp index 0dac99d..0d81fd5 100644 --- a/src/decmap.cpp +++ b/src/decmap.cpp @@ -56,10 +56,10 @@ void CDecor::MapInitColors() m_colors[MAP_FIRE] = MapRGB (255, 0, 0); // rouge m_colors[MAP_TOMAT] = MapRGB (255, 0, 0); // rouge m_colors[MAP_BUILD] = MapRGB (0, 0, 0); // noir - m_colors[MAP_ENNEMI]= MapRGB (0, 192, 255); // bleu métal + m_colors[MAP_ENNEMI]= MapRGB (0, 192, 255); // bleu métal m_colors[MAP_FLEUR] = MapRGB (255, 206, 0); // jaune - m_colors[MAP_TREE] = MapRGB (0 ,102, 0); // vert foncé + m_colors[MAP_TREE] = MapRGB (0 ,102, 0); // vert foncé m_colors[MAP_HERB1] = MapRGB (0 ,204, 51); // vert clair m_colors[MAP_HERB2] = MapRGB (0 ,156, 8); // vert moyen m_colors[MAP_TERRE] = MapRGB (94, 78, 12); // brun @@ -124,7 +124,7 @@ POINT CDecor::ConvMapToCel(POINT pos) } -// Déplace le décor suite à un clic dans la carte. +// Déplace le décor suite à un clic dans la carte. bool CDecor::MapMove(POINT pos) { @@ -343,7 +343,7 @@ static char color_object[] = MAP_FLEUR, MAP_FLEUR, MAP_FLEUR, MAP_FLEUR, MAP_FLEUR, MAP_FLEUR, MAP_FLEUR, MAP_FLEUR, - MAP_HERB1, MAP_HERB1, MAP_HERB1, MAP_HERB1, // ennemi piégé + MAP_HERB1, MAP_HERB1, MAP_HERB1, MAP_HERB1, // ennemi piégé MAP_HERB1, MAP_HERB1, MAP_HERB1, MAP_HERB1, MAP_HERB1, MAP_HERB1, MAP_HERB1, MAP_HERB1, @@ -355,7 +355,7 @@ static char color_object[] = MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI, MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI, - MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI, // barrière + MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI, // barrière MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI, MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI, MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI, @@ -364,7 +364,7 @@ static char color_object[] = MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI, MAP_BUILD, MAP_BUILD, MAP_BUILD, MAP_BUILD, // maison - MAP_HERB1, MAP_HERB1, MAP_HERB1, MAP_HERB1, // ennemi piégé + MAP_HERB1, MAP_HERB1, MAP_HERB1, MAP_HERB1, // ennemi piégé MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI, MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI,MAP_ENNEMI, @@ -433,7 +433,7 @@ void CDecor::MapPutCel(POINT pos) fogCel.y = (fogCel.y/4)*4; if ( fogCel.x < 0 || fogCel.x >= MAXCELX || fogCel.y < 0 || fogCel.y >= MAXCELY || - m_decor[fogCel.x/2][fogCel.y/2].fog == FOGHIDE ) // caché ? + m_decor[fogCel.x/2][fogCel.y/2].fog == FOGHIDE ) // caché ? { pColors = color_deffog; goto color; @@ -474,7 +474,7 @@ void CDecor::MapPutCel(POINT pos) } -// Génère la carte. +// Génère la carte. bool CDecor::GenerateMap() { @@ -483,7 +483,7 @@ bool CDecor::GenerateMap() if ( m_phase != -1 && m_phase%20 != 0 ) return true; - // Dessine le décor (sol, objets et brouillard). + // Dessine le décor (sol, objets et brouillard). for ( pos.y=0 ; pos.y 0 && m_decor[x/2][y/2].fire < MoveMaxFire() ) { MoveStartFire(GetCel(x,y)); } - // Démarre les éclairs entre les tours. - if ( m_decor[x/2][y/2].objectIcon == 10000 ) // éclair n-s + // Démarre les éclairs entre les tours. + if ( m_decor[x/2][y/2].objectIcon == 10000 ) // éclair n-s { if ( MoveCreate(GetCel(x,y), -1, false, CHOBJECT,-1, -1,-1, 9999,1,0, true) ) { - MoveAddIcons(GetCel(x,y), 4, true); // éclairs n-s + MoveAddIcons(GetCel(x,y), 4, true); // éclairs n-s } } - if ( m_decor[x/2][y/2].objectIcon == 10001 ) // éclair e-o + if ( m_decor[x/2][y/2].objectIcon == 10001 ) // éclair e-o { if ( MoveCreate(GetCel(x,y), -1, false, CHOBJECT,-1, -1,-1, 9999,1,0, true) ) { - MoveAddIcons(GetCel(x,y), 5, true); // éclairs e-o + MoveAddIcons(GetCel(x,y), 5, true); // éclairs e-o } } } } } -// Crée un nouveau décor animé. -// Si bMisc=true, on garde 10 mouvements en réserve pour +// Crée un nouveau décor animé. +// Si bMisc=true, on garde 10 mouvements en réserve pour // des actions importantes (bMisc=false). bool CDecor::MoveCreate(POINT cel, int rankBlupi, bool bFloor, @@ -691,7 +691,7 @@ bool CDecor::MoveAddIcons(POINT cel, int rankIcons, bool bContinue) m_move[rank].rankIcons = rankIcons; if ( !bContinue ) m_move[rank].phase = 0; - if ( rankIcons == 4 || rankIcons == 5 ) // éclairs entre tours ? + if ( rankIcons == 4 || rankIcons == 5 ) // éclairs entre tours ? { m_move[rank].cTotal = Random(0,10); } @@ -703,7 +703,7 @@ bool CDecor::MoveAddIcons(POINT cel, int rankIcons, bool bContinue) return false; } -// Démarre le feu sur une cellule. +// Démarre le feu sur une cellule. // Retourne true si c'est possible. bool CDecor::MoveStartFire(POINT cel) @@ -742,7 +742,7 @@ bool CDecor::MoveStartFire(POINT cel) icon = m_decor[cel.x/2][cel.y/2].floorIcon; if ( channel == CHFLOOR && - (icon == 20 || // herbe foncée ? + (icon == 20 || // herbe foncée ? (icon >= 59 && icon <= 64)) ) // pont ? { if ( !MoveCreate(cel, -1, false, CHOBJECT,-1, @@ -756,7 +756,7 @@ bool CDecor::MoveStartFire(POINT cel) return false; } -// Démarre le feu si c'est possible par proximité. +// Démarre le feu si c'est possible par proximité. void CDecor::MoveProxiFire(POINT cel) { @@ -787,7 +787,7 @@ void CDecor::MoveProxiFire(POINT cel) if ( x < 0 || x >= MAXCELX || y < 0 || y >= MAXCELX ) continue; - if ( m_decor[x/2][y/2].fire != 0 ) continue; // brule déjà ? + if ( m_decor[x/2][y/2].fire != 0 ) continue; // brule déjà ? x = ((cel.x + xx)/2)*2; y = ((cel.y + yy)/2)*2; @@ -809,13 +809,13 @@ void CDecor::MoveProxiFire(POINT cel) ((icon >= 20 && icon <= 26)|| (icon >= 37 && icon <= 43)) ) continue; - // Démarre éventuellement un seul foyer. + // Démarre éventuellement un seul foyer. if ( MoveStartFire(GetCel(x,y)) ) return; } } } -// Fait évoluer le feu. +// Fait évoluer le feu. void CDecor::MoveFire(int rank) { @@ -841,25 +841,25 @@ void CDecor::MoveFire(int rank) MoveProxiFire(GetCel(x,y)); // boutte le feu } - // Début petites flammes. + // Début petites flammes. if ( m_decor[x/2][y/2].fire == 2 ) { MoveStartFire(GetCel(x,y)); } - // Début grandes flammes. + // Début grandes flammes. if ( m_decor[x/2][y/2].fire == (MoveMaxFire()-DIMOBJY*2)/2 ) { MoveAddIcons(GetCel(x,y), 2, true); // grandes flammes } - // Début objet squelette. + // Début objet squelette. if ( m_decor[x/2][y/2].fire == MoveMaxFire()-DIMOBJY*2 ) { icon = m_decor[x/2][y/2].floorIcon; - if ( icon == 20 ) // herbe foncée ? + if ( icon == 20 ) // herbe foncée ? { - PutFloor(GetCel(x,y), CHFLOOR, 19); // herbe brulée + PutFloor(GetCel(x,y), CHFLOOR, 19); // herbe brulée } icon = m_decor[x/2][y/2].objectIcon; @@ -894,7 +894,7 @@ void CDecor::MoveFire(int rank) m_decor[x/2][y/2].objectChannel = -1; m_decor[x/2][y/2].objectIcon = -1; } - m_decor[x/2][y/2].fire = MoveMaxFire(); // déjà brulé + m_decor[x/2][y/2].fire = MoveMaxFire(); // déjà brulé } } else // sol qui brule ? @@ -905,7 +905,7 @@ void CDecor::MoveFire(int rank) MoveProxiFire(GetCel(x,y)); // boutte le feu } - // Début petites flammes. + // Début petites flammes. if ( m_decor[x/2][y/2].fire == 2 ) { MoveStartFire(GetCel(x,y)); @@ -915,9 +915,9 @@ void CDecor::MoveFire(int rank) if ( m_decor[x/2][y/2].fire == DIMOBJY ) { icon = m_decor[x/2][y/2].floorIcon; - if ( icon == 20 ) // herbe foncée ? + if ( icon == 20 ) // herbe foncée ? { - PutFloor(GetCel(x,y), CHFLOOR, 19); // herbe brulée + PutFloor(GetCel(x,y), CHFLOOR, 19); // herbe brulée } if ( icon == 59 ) // pont ? { @@ -947,12 +947,12 @@ void CDecor::MoveFire(int rank) MoveFinish(GetCel(x,y)); m_decor[x/2][y/2].objectChannel = -1; m_decor[x/2][y/2].objectIcon = -1; - m_decor[x/2][y/2].fire = MoveMaxFire(); // déjà brulé + m_decor[x/2][y/2].fire = MoveMaxFire(); // déjà brulé } } } -// Fait évoluer tous les décors animés. +// Fait évoluer tous les décors animés. void CDecor::MoveStep(bool bFirst) { @@ -963,7 +963,7 @@ void CDecor::MoveStep(bool bFirst) if ( m_move[rank].bExist ) { if ( !bFirst && - (m_move[rank].rankIcons == 4 || // éclair entre tours ? + (m_move[rank].rankIcons == 4 || // éclair entre tours ? m_move[rank].rankIcons == 5 ) ) { continue; @@ -971,8 +971,8 @@ void CDecor::MoveStep(bool bFirst) MoveFire(rank); - // Si le blupi travaillant ici est stoppé, on - // arrête aussi la construction. + // Si le blupi travaillant ici est stoppé, on + // arrête aussi la construction. rankBlupi = m_move[rank].rankBlupi; if ( rankBlupi != -1 ) { @@ -987,7 +987,7 @@ void CDecor::MoveStep(bool bFirst) } m_move[rank].cDelai ++; - if ( m_move[rank].cDelai >= m_move[rank].delai ) // délai écoulé ? + if ( m_move[rank].cDelai >= m_move[rank].delai ) // délai écoulé ? { m_move[rank].cDelai = 0; @@ -1007,7 +1007,7 @@ void CDecor::MoveStep(bool bFirst) } } -// Termine un mouvement pour une cellule donnée. +// Termine un mouvement pour une cellule donnée. void CDecor::MoveFinish(POINT cel) { @@ -1038,7 +1038,7 @@ void CDecor::MoveFinish(POINT cel) } } -// Termine un mouvement, d'après le rang du blupi. +// Termine un mouvement, d'après le rang du blupi. void CDecor::MoveFinish(int rankBlupi) { @@ -1054,7 +1054,7 @@ void CDecor::MoveFinish(int rankBlupi) } } -// Vérifie si une cellule est déjà utilisée. +// Vérifie si une cellule est déjà utilisée. bool CDecor::MoveIsUsed(POINT cel) { @@ -1073,7 +1073,7 @@ bool CDecor::MoveIsUsed(POINT cel) return false; } -// Retourne l'objet en construction à un endroit donné. +// Retourne l'objet en construction à un endroit donné. bool CDecor::MoveGetObject(POINT cel, int &channel, int &icon) { @@ -1095,7 +1095,7 @@ bool CDecor::MoveGetObject(POINT cel, int &channel, int &icon) return false; } -// Modifie un objet en construction à un endroit donné. +// Modifie un objet en construction à un endroit donné. bool CDecor::MovePutObject(POINT cel, int channel, int icon) { diff --git a/src/decor.cpp b/src/decor.cpp index bacaf29..23fcbea 100644 --- a/src/decor.cpp +++ b/src/decor.cpp @@ -21,7 +21,7 @@ -#define TEXTDELAY 10 // délai avant apparition tooltips +#define TEXTDELAY 10 // délai avant apparition tooltips POINT GetCel(int x, int y) { @@ -41,9 +41,9 @@ POINT GetCel(POINT cel, int x, int y) return cel; } -// Indique si une coordonnée de cellule est valide. -// On ne peut pas aller dans la dernière cellule tout au -// bord (-2) pour permettre de gérer le brouillard proprement +// Indique si une coordonnée de cellule est valide. +// On ne peut pas aller dans la dernière cellule tout au +// bord (-2) pour permettre de gérer le brouillard proprement // jusque dans les bords ! bool IsValid(POINT cel) @@ -53,7 +53,7 @@ bool IsValid(POINT cel) return true; } -// Retourne un vecteur orienté dans une direction donnée. +// Retourne un vecteur orienté dans une direction donnée. POINT GetVector(int direct) { @@ -110,7 +110,7 @@ CDecor::CDecor() m_celOutline1.x = -1; m_celOutline2.x = -1; - m_bHiliRect = false; // pas de rectangle de sélection + m_bHiliRect = false; // pas de rectangle de sélection m_shiftHili = 0; m_shiftOffset.x = 0; @@ -143,11 +143,11 @@ CDecor::CDecor() CDecor::~CDecor() { - UndoClose(); // libère le buffer du undo + UndoClose(); // libère le buffer du undo } -// Initialisation générale. +// Initialisation générale. void CDecor::Create(CSound *pSound, CPixmap *pPixmap) { @@ -156,7 +156,7 @@ void CDecor::Create(CSound *pSound, CPixmap *pPixmap) m_bOutline = false; } -// Initialise le décor avec un sol plat partout. +// Initialise le décor avec un sol plat partout. void CDecor::Init(int channel, int icon) { @@ -172,7 +172,7 @@ void CDecor::Init(int channel, int icon) m_decor[x][y].objectChannel = -1; m_decor[x][y].objectIcon = -1; - m_decor[x][y].fog = FOGHIDE; // caché + m_decor[x][y].fog = FOGHIDE; // caché m_decor[x][y].rankMove = -1; m_decor[x][y].workBlupi = -1; m_decor[x][y].fire = 0; @@ -191,7 +191,7 @@ void CDecor::Init(int channel, int icon) m_bGroundRedraw = true; } -// Initialise le décor après une modification. +// Initialise le décor après une modification. void CDecor::InitAfterBuild() { @@ -202,7 +202,7 @@ void CDecor::InitAfterBuild() BlupiDeselect(); } -// Initialise les mises en évidence, avant de jouer. +// Initialise les mises en évidence, avant de jouer. void CDecor::ResetHili() { @@ -210,7 +210,7 @@ void CDecor::ResetHili() InitOutlineRect(); } -// Charge les images nécessaires au décor. +// Charge les images nécessaires au décor. bool CDecor::LoadImages() { @@ -256,7 +256,7 @@ void CDecor::ClearFog() { for ( y=0 ; y= MoveMaxFire() ) // déjà brulé ? + if ( m_decor[x][y].fire >= MoveMaxFire() ) // déjà brulé ? { m_decor[x][y].fire = 0; // pourra de nouveau bruler } if ( m_decor[x][y].fire > 1 ) // en train de bruler ? { - m_decor[x][y].fire = 1; // début du feu + m_decor[x][y].fire = 1; // début du feu } } } @@ -422,7 +422,7 @@ void CDecor::SetShiftOffset(POINT offset) m_bGroundRedraw = true; } -// Convertit la position d'une cellule en coordonnée graphique. +// Convertit la position d'une cellule en coordonnée graphique. POINT CDecor::ConvCelToPos(POINT cel) { @@ -437,7 +437,7 @@ POINT CDecor::ConvCelToPos(POINT cel) return pos; } -// Convertit une coordonnée graphique en cellule. +// Convertit une coordonnée graphique en cellule. POINT CDecor::ConvPosToCel(POINT pos, bool bMap) { @@ -467,7 +467,7 @@ POINT CDecor::ConvPosToCel(POINT pos, bool bMap) return cel; } -// Convertit une coordonnée graphique en grande cellule (2x2). +// Convertit une coordonnée graphique en grande cellule (2x2). POINT CDecor::ConvPosToCel2(POINT pos) { @@ -507,7 +507,7 @@ POINT CDecor::ConvPosToCel2(POINT pos) -// Attribution des blupi aux différentes cellules. +// Attribution des blupi aux différentes cellules. // Lorsque un blupi a deux positions (courante et destination), // il faut toujours mettre blupi le plus au fond possible // (minimiser x et y). @@ -517,7 +517,7 @@ void CDecor::BuildPutBlupi() int x, y, dx, dy, xMin, yMin, rank, clipLeft; POINT pos; -#if 0 // déjà fait au point (1), voir Build +#if 0 // déjà fait au point (1), voir Build for ( x=0 ; x m_blupi[rank].cel.y ) yMin = m_blupi[rank].cel.y; // Si blupi entre dans une maison, il faut initialiser - // le clipping à gauche. + // le clipping à gauche. m_blupi[rank].clipLeft = 0; // pas de clipping if ( !m_bOutline && @@ -568,12 +568,12 @@ void CDecor::BuildPutBlupi() dx = m_blupi[rank].destCel.x - x; dy = m_blupi[rank].destCel.y - y; - if ( dx != -dy ) // déplacement non horizontal (ne/so) ? + if ( dx != -dy ) // déplacement non horizontal (ne/so) ? { if ( dx < 0 ) x = m_blupi[rank].destCel.x; if ( dy < 0 ) y = m_blupi[rank].destCel.y; } - if ( dx == -1 && dy == 1 ) // déplacement "so" ? + if ( dx == -1 && dy == 1 ) // déplacement "so" ? { x = m_blupi[rank].destCel.x; y = m_blupi[rank].destCel.y; @@ -595,7 +595,7 @@ void CDecor::BuildPutBlupi() if ( !IsFreeCelObstacle(GetCel(x+1,y-1)) ) x ++; } - if ( m_rankBlupi[x][y] != -1 ) // déjà occupé ? + if ( m_rankBlupi[x][y] != -1 ) // déjà occupé ? { if ( x == m_blupi[rank].cel.x ) { @@ -606,7 +606,7 @@ void CDecor::BuildPutBlupi() x = m_blupi[rank].cel.x; } - if ( m_rankBlupi[x][y] != -1 ) // déjà occupé ? + if ( m_rankBlupi[x][y] != -1 ) // déjà occupé ? { if ( y == m_blupi[rank].cel.y ) { @@ -617,7 +617,7 @@ void CDecor::BuildPutBlupi() y = m_blupi[rank].cel.y; } - if ( m_rankBlupi[x][y] != -1 ) // déjà occupé ? + if ( m_rankBlupi[x][y] != -1 ) // déjà occupé ? { //? OutputDebug(">>> Manque un blupi <<<\n"); continue; // que faire d'autre ? @@ -629,7 +629,7 @@ void CDecor::BuildPutBlupi() } } -// Dessine une cellule du décor contenant un sol animé. +// Dessine une cellule du décor contenant un sol animé. void CDecor::BuildMoveFloor(int x, int y, POINT pos, int rank) { @@ -668,7 +668,7 @@ void CDecor::BuildMoveFloor(int x, int y, POINT pos, int rank) } } -// Dessine une cellule du décor contenant un objet animé. +// Dessine une cellule du décor contenant un objet animé. void CDecor::BuildMoveObject(int x, int y, POINT pos, int rank) { @@ -720,7 +720,7 @@ void CDecor::BuildMoveObject(int x, int y, POINT pos, int rank) if ( hBuild < -DIMOBJY ) hBuild = -DIMOBJY; } - // Dessine l'objet actuellement dans le décor. + // Dessine l'objet actuellement dans le décor. if ( m_decor[x/2][y/2].objectChannel >= 0 ) { if ( hBuild >= 0 ) @@ -781,7 +781,7 @@ void CDecor::BuildMoveObject(int x, int y, POINT pos, int rank) } } -// Déplace l'objet transporté par blupi. +// Déplace l'objet transporté par blupi. void BuildMoveTransport(int icon, POINT &pos) { @@ -839,13 +839,13 @@ void BuildMoveTransport(int icon, POINT &pos) pos.y += 1; } - if ( icon == 106 ) // se penche (mèche dynamite) ? + if ( icon == 106 ) // se penche (mèche dynamite) ? { pos.x += 8; pos.y += 10; } - if ( icon == 194 ) // se penche (mèche dynamite) ? + if ( icon == 194 ) // se penche (mèche dynamite) ? { pos.x += 9; pos.y += 9; @@ -869,7 +869,7 @@ void BuildMoveTransport(int icon, POINT &pos) pos.y += offset_jeep[(icon-250)*2+1]; } - if ( icon == 270 ) pos.y += 3; // blupi électrocuté + if ( icon == 270 ) pos.y += 3; // blupi électrocuté if ( icon == 271 ) pos.y -= 2; if ( icon == 272 ) pos.y -= 7; } @@ -965,7 +965,7 @@ void CDecor::BuildGround(RECT clip) icon = 78; // losange noir } - if ( !m_bBuild && icon == 71 ) // terre à fer ? + if ( !m_bBuild && icon == 71 ) // terre à fer ? { icon = 33; // terre normale ! } @@ -1002,7 +1002,7 @@ void CDecor::BuildGround(RECT clip) m_bGroundRedraw = false; } -// Construit le décor dans un pixmap. +// Construit le décor dans un pixmap. void CDecor::Build(RECT clip, POINT posMouse) { @@ -1102,7 +1102,7 @@ void CDecor::Build(RECT clip, POINT posMouse) { icon = m_decor[x/2][y/2].floorIcon; - if ( !m_bBuild && icon == 71 ) // terre à fer ? + if ( !m_bBuild && icon == 71 ) // terre à fer ? { icon = 33; // terre normale ! } @@ -1125,7 +1125,7 @@ void CDecor::Build(RECT clip, POINT posMouse) } rank = m_decor[x/2][y/2].rankMove; - if ( rank != -1 && // décor animé ? + if ( rank != -1 && // décor animé ? m_move[rank].bFloor ) { pos.x = cPos.x-DIMCELX/2; @@ -1149,7 +1149,7 @@ void CDecor::Build(RECT clip, POINT posMouse) } } - if ( m_bHiliRect ) // rectangle de sélection existe ? + if ( m_bHiliRect ) // rectangle de sélection existe ? { if ( (m_p1Hili.x == x && m_p1Hili.y == y) || (m_p2Hili.x == x && m_p2Hili.y == y) ) @@ -1202,7 +1202,7 @@ void CDecor::Build(RECT clip, POINT posMouse) } } - BlupiDrawHili(); // dessine le rectangle de sélection + BlupiDrawHili(); // dessine le rectangle de sélection // Construit les objets et les blupi. BuildPutBlupi(); // m_rankBlupi[x][y] <- rangs des blupi @@ -1240,7 +1240,7 @@ void CDecor::Build(RECT clip, POINT posMouse) { tPos.y -= 6; } - // Dessine la sélection/énergie + // Dessine la sélection/énergie if ( m_blupi[rank].clipLeft == 0 ) { m_pPixmap->DrawIconDemi(-1, CHBLUPI, icon, tPos); @@ -1255,7 +1255,7 @@ void CDecor::Build(RECT clip, POINT posMouse) } } - // Dessine la flèche ronde "répète" sous blupi. + // Dessine la flèche ronde "répète" sous blupi. if ( m_blupi[rank].repeatLevel != -1 ) { tPos = pos; @@ -1264,7 +1264,7 @@ void CDecor::Build(RECT clip, POINT posMouse) { tPos.y -= 6; } - // Dessine la sélection/énergie + // Dessine la sélection/énergie if ( m_blupi[rank].clipLeft == 0 ) { m_pPixmap->DrawIconDemi(-1, CHBLUPI, 116, tPos); @@ -1279,7 +1279,7 @@ void CDecor::Build(RECT clip, POINT posMouse) } } - // Dessine la flèche jaune sur blupi. + // Dessine la flèche jaune sur blupi. if ( m_blupi[rank].bArrow ) { tPos = pos; @@ -1311,7 +1311,7 @@ void CDecor::Build(RECT clip, POINT posMouse) m_pPixmap->DrawIcon(-1, m_blupi[rank].channel, m_blupi[rank].icon, pos); - // Dessine l'objet transporté. + // Dessine l'objet transporté. if ( m_blupi[rank].takeChannel != -1 ) { BuildMoveTransport(m_blupi[rank].icon, pos); @@ -1327,7 +1327,7 @@ void CDecor::Build(RECT clip, POINT posMouse) m_pPixmap->DrawIcon(-1, m_blupi[rank].channel, m_blupi[rank].icon, pos); - // Dessine l'objet transporté. + // Dessine l'objet transporté. if ( m_blupi[rank].takeChannel != -1 ) { BuildMoveTransport(m_blupi[rank].icon, pos); @@ -1347,7 +1347,7 @@ void CDecor::Build(RECT clip, POINT posMouse) pos.y = cPos.y-(DIMOBJY-DIMCELY*2); // Dessine l'objet - if ( rank == -1 || // décor fixe ? + if ( rank == -1 || // décor fixe ? m_move[rank].bFloor || m_bBuild ) { @@ -1367,20 +1367,20 @@ void CDecor::Build(RECT clip, POINT posMouse) m_decor[x/2][y/2].objectIcon, pos); - if ( m_decor[x/2][y/2].objectIcon == 12 ) // fusée ? + if ( m_decor[x/2][y/2].objectIcon == 12 ) // fusée ? { pos.y -= DIMOBJY; m_pPixmap->DrawIcon(-1, channel, 13, pos); } } - else // décor animé ? + else // décor animé ? { BuildMoveObject(x, y, pos, rank); } } else { - if ( rank != -1 && // décor animé ? + if ( rank != -1 && // décor animé ? !m_move[rank].bFloor && !m_bBuild ) { @@ -1424,22 +1424,22 @@ void CDecor::Build(RECT clip, POINT posMouse) // Construit le brouillard. if ( !m_bFog ) goto term; - if ( m_shiftOffset.x < 0 ) // décalage à droite ? + if ( m_shiftOffset.x < 0 ) // décalage à droite ? { nbx += 2; } - if ( m_shiftOffset.y < 0 ) // décalage en bas ? + if ( m_shiftOffset.y < 0 ) // décalage en bas ? { nby += 2; } - if ( m_shiftOffset.x > 0 ) // décalage à gauche ? + if ( m_shiftOffset.x > 0 ) // décalage à gauche ? { nbx += 2; iCel.x --; iCel.y ++; iPos = ConvCelToPos(iCel); } - if ( m_shiftOffset.y > 0 ) // décalage en haut ? + if ( m_shiftOffset.y > 0 ) // décalage en haut ? { nby += 2; iCel.x --; @@ -1464,7 +1464,7 @@ void CDecor::Build(RECT clip, POINT posMouse) } else { - icon = FOGHIDE; // caché + icon = FOGHIDE; // caché } if ( abs(x)%4 == abs(y)%4 && @@ -1497,7 +1497,7 @@ void CDecor::Build(RECT clip, POINT posMouse) } term: - // Dessine la flèche jaune sur un objet. + // Dessine la flèche jaune sur un objet. if ( m_celArrow.x != -1 ) { tPos = ConvCelToPos(m_celArrow); @@ -1512,7 +1512,7 @@ void CDecor::Build(RECT clip, POINT posMouse) m_pPixmap->DrawIcon(-1, CHBLUPI,132, tPos); } - // Dessine le nom de l'objet pointé par la souris. + // Dessine le nom de l'objet pointé par la souris. if ( posMouse.x == m_textLastPos.x && posMouse.y == m_textLastPos.y ) { @@ -1545,9 +1545,9 @@ void CDecor::Build(RECT clip, POINT posMouse) // Augmente la phase. -// -1 mise à jour continue -// 0 début de mise à jour périodique -// 1 mise à jour périodique suivante +// -1 mise à jour continue +// 0 début de mise à jour périodique +// 1 mise à jour périodique suivante void CDecor::NextPhase(int mode) { @@ -1569,14 +1569,14 @@ void CDecor::NextPhase(int mode) m_totalTime ++; } -// Modifie le temps total passé dans cette partie. +// Modifie le temps total passé dans cette partie. void CDecor::SetTotalTime(int total) { m_totalTime = total; } -// Retourne le temps total passé dans cette partie. +// Retourne le temps total passé dans cette partie. int CDecor::GetTotalTime() { @@ -1584,7 +1584,7 @@ int CDecor::GetTotalTime() } -// Compte le nombre total de sols contenus dans les décors. +// Compte le nombre total de sols contenus dans les décors. int CDecor::CountFloor(int channel, int icon) { @@ -1604,8 +1604,8 @@ int CDecor::CountFloor(int channel, int icon) } // Indique si une cellule est ok pour une action. -// Le rang du blupi qui effectuera le travail est donnée dans rank. -// action = 0 sélection jeu +// Le rang du blupi qui effectuera le travail est donnée dans rank. +// action = 0 sélection jeu // 1 construction d'une cellule 1x1 // 2 construction d'une cellule 2x2 // WM_ACTION* action @@ -1657,11 +1657,11 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, { bTransport = true; } - if ( m_blupi[rank].vehicule != 0 ) // pas à pied ? + if ( m_blupi[rank].vehicule != 0 ) // pas à pied ? { bVehicule = true; } - if ( m_blupi[rank].vehicule != 0 && // pas à pied ? + if ( m_blupi[rank].vehicule != 0 && // pas à pied ? m_blupi[rank].vehicule != 3 ) // pas armure ? { bVehiculeA = true; @@ -1754,7 +1754,7 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, IsFreeCelGo(GetCel(cel.x+x,cel.y+y), rank) && !IsBlupiHere(GetCel(cel.x+x,cel.y+y), true) ) { -//? icons[1+x][1+y] = ICON_HILI_GO; // flèche +//? icons[1+x][1+y] = ICON_HILI_GO; // flèche icons[1+x][1+y] = ICON_HILI_OP; // action error = 0; } @@ -1841,30 +1841,30 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, if ( action == WM_ACTION_BUILD1 || // cabane ? action == WM_ACTION_BUILD2 || // couveuse ? - action == WM_ACTION_BUILD6 ) // téléporteur ? + action == WM_ACTION_BUILD6 ) // téléporteur ? { GetFloor(cel, channel, icon); if ( channel != CHFLOOR || (icon != 1 && // herbe claire ? - (icon < 19 || icon > 32)) ) // herbe foncée ? + (icon < 19 || icon > 32)) ) // herbe foncée ? { - error = ERROR_GROUND; // sol pas adéquat + error = ERROR_GROUND; // sol pas adéquat } } if ( action == WM_ACTION_BUILD4 ) // mine ? { GetFloor(cel, channel, icon); - if ( channel != CHFLOOR || icon != 71 ) // terre à fer ? + if ( channel != CHFLOOR || icon != 71 ) // terre à fer ? { - error = ERROR_GROUND; // sol pas adéquat + error = ERROR_GROUND; // sol pas adéquat } } - if ( action == WM_ACTION_BUILD6 && // téléporteur ? - CountFloor(CHFLOOR, 80) >= 2 ) // déjà 2 ? + if ( action == WM_ACTION_BUILD6 && // téléporteur ? + CountFloor(CHFLOOR, 80) >= 2 ) // déjà 2 ? { - error = ERROR_TELE2; // déjà 2 téléporteurs + error = ERROR_TELE2; // déjà 2 téléporteurs } if ( action == WM_ACTION_BUILD3 || @@ -1978,9 +1978,9 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, // GetFloor(cel, channel, icon); // if ( channel != CHFLOOR || // (icon != 1 && // herbe claire ? -// (icon < 19 || icon > 32)) ) // herbe foncée ? +// (icon < 19 || icon > 32)) ) // herbe foncée ? // { -// error = ERROR_GROUND; // sol pas adéquat +// error = ERROR_GROUND; // sol pas adéquat // } GetObject(cel, channel, icon); @@ -2002,7 +2002,7 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, { for ( y=-1 ; y<3 ; y++ ) { - if ( x<0 || x>1 || y<0 || y>1 ) // périphérie ? + if ( x<0 || x>1 || y<0 || y>1 ) // périphérie ? { GetFloor(GetCel(cel,x,y), channel, icon); if ( channel == CHFLOOR && @@ -2160,7 +2160,7 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, GetObject(GetCel(cel,-1,-1), channel, icon); if ( bStrong && !bTransport && !bVehiculeA && channel == CHOBJECT && - (icon == 14 || // métal ? + (icon == 14 || // métal ? icon == 36 || // planches ? icon == 44 || // pierres ? icon == 60 || // tomates ? @@ -2171,7 +2171,7 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, icon == 95 || // fleurs ? icon == 85 || // dynamite ? icon == 92 || // poison ? - icon == 93 || // piège ? + icon == 93 || // piège ? icon == 123 || // fer ? icon == 125) && // mine ? (!IsBlupiHereEx(GetCel(cel,-1,0), rank, false) || @@ -2522,7 +2522,7 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, error = ERROR_MISC; if ( m_blupi[rank].vehicule == 2 && // en jeep ? m_decor[cel.x/2][cel.y/2].objectIcon == -1 && - m_decor[cel.x/2][cel.y/2].floorIcon != 80 ) // pas téléporteur ? + m_decor[cel.x/2][cel.y/2].floorIcon != 80 ) // pas téléporteur ? { if ( IsFreeCelGo(GetCel(cel,+1, 0), rank) && IsFreeCelGo(GetCel(cel,+1,+1), rank) && @@ -2553,7 +2553,7 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, if ( m_blupi[rank].vehicule == 3 && // armure ? !bTransport && m_decor[cel.x/2][cel.y/2].objectIcon == -1 && - m_decor[cel.x/2][cel.y/2].floorIcon != 80 ) // pas téléporteur ? + m_decor[cel.x/2][cel.y/2].floorIcon != 80 ) // pas téléporteur ? { if ( IsFreeCelGo(GetCel(cel,+1, 0), rank) && IsFreeCelGo(GetCel(cel,+1,+1), rank) && @@ -2587,13 +2587,13 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, if ( (icon < 33 || icon > 48) && icon != 71 ) // pas terre ? { - error = ERROR_MISC; // terrain pas adapté + error = ERROR_MISC; // terrain pas adapté } GetObject(cel, channel, icon); if ( channel == CHOBJECT ) // y a-t-il un objet ? { - error = ERROR_MISC; // terrain pas adapté + error = ERROR_MISC; // terrain pas adapté } for ( x=0 ; x<2 ; x++ ) @@ -2712,7 +2712,7 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, GetObject(cel, channel, icon); if ( channel != CHOBJECT || icon != 120 || // usine ? m_blupi[rank].takeChannel != CHOBJECT || - m_blupi[rank].takeIcon != 14 ) // métal ? + m_blupi[rank].takeIcon != 14 ) // métal ? { error = ERROR_MISC; // pas d'usine ! } @@ -2743,7 +2743,7 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank, } // Indique si une cellule est ok pour une action. -// Le rang du blupi qui effectuera le travail est donnée dans rank. +// Le rang du blupi qui effectuera le travail est donnée dans rank. int CDecor::CelOkForAction(POINT cel, int action, int rank) { @@ -2754,7 +2754,7 @@ int CDecor::CelOkForAction(POINT cel, int action, int rank) celOutline1, celOutline2); } -// Retourne le rang du nième blupi sélectionné. +// Retourne le rang du nième blupi sélectionné. int CDecor::GetHiliRankBlupi(int nb) { @@ -2780,8 +2780,8 @@ int CDecor::GetHiliRankBlupi(int nb) return -1; } -// Marque la cellule visée par la souris. -// action = 0 sélection jeu +// Marque la cellule visée par la souris. +// action = 0 sélection jeu // 1 construction d'une cellule 1x1 // 2 construction d'une cellule 2x2 @@ -2802,7 +2802,7 @@ void CDecor::CelHili(POINT pos, int action) m_celOutline2.x = -1; m_rankHili = -1; - if ( action == 0 ) // sélection pendant jeu ? + if ( action == 0 ) // sélection pendant jeu ? { rank = GetTargetBlupi(pos); if ( rank >= 0 ) @@ -2852,7 +2852,7 @@ void CDecor::CelHili(POINT pos, int action) m_celOutline1.y = (m_celHili.y/2)*2; GetObject(m_celOutline1, channel, icon); if ( channel == CHOBJECT && - (icon == 14 || // métal ? + (icon == 14 || // métal ? icon == 36 || // planches ? icon == 44 || // pierres ? icon == 60 || // tomates ? @@ -2863,7 +2863,7 @@ void CDecor::CelHili(POINT pos, int action) icon == 95 || // fleurs ? icon == 85 || // dynamite ? icon == 92 || // poison ? - icon == 93 || // piège ? + icon == 93 || // piège ? icon == 123 || // fer ? icon == 125 ) ) // mine ? { @@ -2896,7 +2896,7 @@ void CDecor::CelHili(POINT pos, int action) } } -// Marque la cellule visée par la souris pour un bouton donné. +// Marque la cellule visée par la souris pour un bouton donné. void CDecor::CelHiliButton(POINT cel, int button) { @@ -2941,7 +2941,7 @@ void CDecor::CelHiliButton(POINT cel, int button) } } -// Marque la cellule visée par la souris pour une répétition donnée. +// Marque la cellule visée par la souris pour une répétition donnée. void CDecor::CelHiliRepeat(int list) { @@ -3007,14 +3007,14 @@ void CDecor::CelHiliRepeat(int list) m_celHili = cel; } -// Retourne l'identificateur du texte correspondant à -// l'objet ou au blupi visé par la souris. +// Retourne l'identificateur du texte correspondant à +// l'objet ou au blupi visé par la souris. const char *CDecor::GetResHili(POINT posMouse) { int icon; - // Les valeurs `corner == true` correspondent aux objets placés + // Les valeurs `corner == true` correspondent aux objets placés // au coin inf/droit de la cellule. struct object_t { @@ -3213,7 +3213,7 @@ const char *CDecor::GetResHili(POINT posMouse) }; if (m_bHideTooltips) - return nullptr; // rien si menu présent + return nullptr; // rien si menu présent if ( posMouse.x < POSDRAWX || posMouse.x > POSDRAWX + DIMDRAWX @@ -3223,7 +3223,7 @@ const char *CDecor::GetResHili(POINT posMouse) if ( m_celHili.x != -1 ) { - if ( m_rankHili != -1 ) // blupi visé ? + if ( m_rankHili != -1 ) // blupi visé ? { switch (m_blupi[m_rankHili].perso) { @@ -3233,7 +3233,7 @@ const char *CDecor::GetResHili(POINT posMouse) if (m_blupi[m_rankHili].bMalade) return gettext ("Sick Blupi"); return gettext ("Blupi"); - case 1: // araignée ? + case 1: // araignée ? return gettext ("Spider"); case 2: // virus ? return gettext ("Virus"); @@ -3279,8 +3279,8 @@ const char *CDecor::GetResHili(POINT posMouse) return nullptr; } -// Indique si le menu est présent et qu'il faut cacher -// les tooltips du décor. +// Indique si le menu est présent et qu'il faut cacher +// les tooltips du décor. void CDecor::HideTooltips(bool bHide) { @@ -3288,7 +3288,7 @@ void CDecor::HideTooltips(bool bHide) } -// Modifie l'origine supérieure/gauche du décor. +// Modifie l'origine supérieure/gauche du décor. void CDecor::SetCoin(POINT coin, bool bCenter) { @@ -3320,7 +3320,7 @@ POINT CDecor::GetHome() } -// Mémoirise une position pendant le jeu. +// Mémoirise une position pendant le jeu. void CDecor::MemoPos(int rank, bool bRecord) { @@ -3380,7 +3380,7 @@ int CDecor::GetMusic() } -// Gestion de la difficulté. +// Gestion de la difficulté. void CDecor::SetSkill(int skill) { @@ -3393,7 +3393,7 @@ int CDecor::GetSkill() } -// Gestion de la région. +// Gestion de la région. // 0 = normal // 1 = palmier // 2 = hiver @@ -3436,7 +3436,7 @@ int CDecor::GetInfoHeight() } -// Retourne le pointeur à la liste des boutons existants. +// Retourne le pointeur à la liste des boutons existants. char* CDecor::GetButtonExist() { @@ -3466,11 +3466,11 @@ void CDecor::UndoClose() } } -// Copie le décor dans le buffer pour le undo. +// Copie le décor dans le buffer pour le undo. void CDecor::UndoCopy() { - UndoOpen(); // ouvre le buffer du undo si nécessaire + UndoOpen(); // ouvre le buffer du undo si nécessaire if ( m_pUndoDecor != nullptr ) { @@ -3478,7 +3478,7 @@ void CDecor::UndoCopy() } } -// Revient en arrière pour tout le décor. +// Revient en arrière pour tout le décor. void CDecor::UndoBack() { diff --git a/src/decor.h b/src/decor.h index 279fd77..5c8d439 100644 --- a/src/decor.h +++ b/src/decor.h @@ -21,7 +21,7 @@ #define ICON_HILI_BUILD 118 #define ICON_HILI_ERR 119 -// Descripteur d'une cellule du décor. +// Descripteur d'une cellule du décor. typedef struct { short floorChannel; @@ -34,36 +34,36 @@ typedef struct short fire; } Cellule; -// Cette structure doit être la plus petite possible, car +// Cette structure doit être la plus petite possible, car // il en existe un tableau de 100x100 = 10'000 cellules ! -// Descripteur d'un blupi animé. +// Descripteur d'un blupi animé. #define MAXBLUPI 100 #define MAXUSED 50 #define MAXLIST 10 typedef struct { - int bExist; // true -> utilisé - int bHili; // true -> sélectionné + int bExist; // true -> utilisé + int bHili; // true -> sélectionné short perso; // personnage, voir (*) short goalAction; // action (long terme) short goalPhase; // phase (long terme) - POINT goalCel; // cellule visée (long terme) + POINT goalCel; // cellule visée (long terme) POINT passCel; // cellule tranversante - short energy; // énergie restante + short energy; // énergie restante POINT cel; // cellule actuelle POINT destCel; // cellule destination short action; // action en cours short aDirect; // direction actuelle - short sDirect; // direction souhaitée + short sDirect; // direction souhaitée - POINT pos; // position relative à partir de la cellule - short posZ; // déplacement z + POINT pos; // position relative à partir de la cellule + short posZ; // déplacement z short channel; short lastIcon; short icon; @@ -72,12 +72,12 @@ typedef struct short interrupt; // 0=prioritaire, 1=normal, 2=misc short clipLeft; - int nbUsed; // nb de points déjà visités + int nbUsed; // nb de points déjà visités char nextRankUsed; POINT posUsed[MAXUSED]; char rankUsed[MAXUSED]; - short takeChannel; // objet transporté + short takeChannel; // objet transporté short takeIcon; POINT fix; // point fixe (cultive, pont) @@ -85,15 +85,15 @@ typedef struct short jaugePhase; short jaugeMax; short stop; // 1 -> devra stopper - short bArrow; // true -> flèche en dessus de blupi - short bRepeat; // true -> répète l'action + short bArrow; // true -> flèche en dessus de blupi + short bRepeat; // true -> répète l'action short nLoop; // nb de boucles pour GOAL_OTHERLOOP short cLoop; // boucle en cours - short vIcon; // icône variable - POINT goalHili; // but visé + short vIcon; // icône variable + POINT goalHili; // but visé short bMalade; // true -> blupi malade - short bCache; // true -> caché (pas dessiné) - short vehicule; // véhicule utilisé par blupi, voir (**) + short bCache; // true -> caché (pas dessiné) + short vehicule; // véhicule utilisé par blupi, voir (**) char busyCount; char busyDelay; char clicCount; @@ -110,31 +110,31 @@ Blupi; // (*) Personnages : // 0 -> blupi -// 1 -> araignée +// 1 -> araignée // 2 -> virus // 3 -> tracks // 4 -> robot // 5 -> bombe -// 6 -> détonnateur de mine (invisible) -// 7 -> électro +// 6 -> détonnateur de mine (invisible) +// 7 -> électro // 8 -> disciple (robot2) -// (**) Véhicule : -// 0 -> à pied +// (**) Véhicule : +// 0 -> à pied // 1 -> en bateau // 2 -> en jeep // 3 -> armure -// Descripteur d'un décor animé. +// Descripteur d'un décor animé. #define MAXMOVE 100 #define MOVEICONNB 1000 typedef struct { - int bExist; // true -> utilisé + int bExist; // true -> utilisé - POINT cel; // cellule du décor + POINT cel; // cellule du décor short rankBlupi; // blupi travaillant ici int bFloor; // true -> floor, false -> object @@ -146,8 +146,8 @@ typedef struct short rankMoves; // *nb,dx,dy,... short rankIcons; // *nb,i,i,... - short total; // nb total d'étapes - short delai; // délai entre deux pas + short total; // nb total d'étapes + short delai; // délai entre deux pas short stepY; // pas vertical *100 short cTotal; @@ -455,13 +455,13 @@ protected: POINT m_celOutline2; POINT m_shiftOffset; int m_iconHili[4][4]; - int m_rankHili; // rang du blupi visé + int m_rankHili; // rang du blupi visé bool m_bHiliRect; - POINT m_p1Hili; // coins rectangle de sélection + POINT m_p1Hili; // coins rectangle de sélection POINT m_p2Hili; int m_shiftHili; - int m_nbBlupiHili; // nb de blupi sélectionnés - int m_rankBlupiHili; // rang blupi sélectionné + int m_nbBlupiHili; // nb de blupi sélectionnés + int m_rankBlupiHili; // rang blupi sélectionné bool m_bFog; // true -> brouillard (jeu) bool m_bBuild; // true -> construction bool m_bInvincible; // true -> cheat code @@ -470,30 +470,30 @@ protected: int m_time; // temps relatif global int m_timeConst; // temps relatif global constant int m_timeFlipOutline; // temps quand basculer mode outline - int m_totalTime; // temps total passé sur une partie + int m_totalTime; // temps total passé sur une partie int m_phase; // phase pour la carte - POINT m_celArrow; // cellule avec flèche + POINT m_celArrow; // cellule avec flèche bool m_bOutline; bool m_bGroundRedraw; char m_buttonExist[MAXBUTTON]; int m_statNb; // nb de statistiques - int m_statFirst; // première statistique visible - int m_bStatUp; // flèche up statistique - int m_bStatDown; // flèche down statistique - int m_statHili; // statistique survolée + int m_statFirst; // première statistique visible + int m_bStatUp; // flèche up statistique + int m_bStatDown; // flèche down statistique + int m_statHili; // statistique survolée bool m_bStatRecalc; // true -> recalcule les statistiques bool m_bStatRedraw; // true -> redessine les statistiques int m_nbStatHach; // nb de hachures - int m_nbStatHachBlupi; // hachures occupées par blupi - int m_nbStatHachPlanche;// hachures occupées par planches - int m_nbStatHachTomate; // hachures occupées par tomates - int m_nbStatHachMetal; // hachures occupées par métal - int m_nbStatHachRobot; // hachures occupées par robot + int m_nbStatHachBlupi; // hachures occupées par blupi + int m_nbStatHachPlanche;// hachures occupées par planches + int m_nbStatHachTomate; // hachures occupées par tomates + int m_nbStatHachMetal; // hachures occupées par métal + int m_nbStatHachRobot; // hachures occupées par robot int m_nbStatHome; // nb de maisons - int m_nbStatHomeBlupi; // maisons occupées par blupi + int m_nbStatHomeBlupi; // maisons occupées par blupi int m_nbStatRobots; // nb d'ennemis Term m_term; // conditions pour gagner - int m_winCount; // compteur avant gagné + int m_winCount; // compteur avant gagné int m_winLastHachBlupi; // dernier nombre atteint int m_winLastHachPlanche;// dernier nombre atteint int m_winLastHachTomate;// dernier nombre atteint @@ -502,12 +502,12 @@ protected: int m_winLastHome; // dernier nombre atteint int m_winLastHomeBlupi; // dernier nombre atteint int m_winLastRobots; // dernier nombre atteint - int m_music; // numéro musique - int m_region; // numéro région (*) - int m_lastRegion; // numéro dernière région + int m_music; // numéro musique + int m_region; // numéro région (*) + int m_lastRegion; // numéro dernière région int m_blupiHere; POINT m_lastDrapeau[MAXLASTDRAPEAU]; - bool m_bHideTooltips; // true -> menu présent + bool m_bHideTooltips; // true -> menu présent char m_text[50]; POINT m_textLastPos; int m_textCount; @@ -529,7 +529,7 @@ protected: char* m_pFillMap; }; -// (*) Régions : +// (*) Régions : // 0 -> normal // 1 -> palmier // 2 -> hiver diff --git a/src/decstat.cpp b/src/decstat.cpp index a98597a..7efe13f 100644 --- a/src/decstat.cpp +++ b/src/decstat.cpp @@ -25,9 +25,9 @@ typedef struct { short bExist; - short perso; // -1=objet, -2=feu, -3=flèche - short firstIcon; // négatif si sol - short lastIcon; // négatif si sol + short perso; // -1=objet, -2=feu, -3=flèche + short firstIcon; // négatif si sol + short lastIcon; // négatif si sol short drawIcon; short bBigIcon; const char *text; @@ -50,7 +50,7 @@ static Statistic table_statistic[] = }, { // STATBLUPIf = 1 true, - 0, // blupi fatigué + 0, // blupi fatigué 0,0, // 13, false, @@ -59,7 +59,7 @@ static Statistic table_statistic[] = }, { // STATBLUPI = 2 true, - 0, // blupi énergique + 0, // blupi énergique 0,0, // 14, false, @@ -105,7 +105,7 @@ static Statistic table_statistic[] = { // 7 true, -1, // objet - 93,93, // piège + 93,93, // piège 70, false, translate ("Sticky trap"), @@ -240,7 +240,7 @@ static Statistic table_statistic[] = { // 22 true, -1, // objet - -80,-84, // téléporteur + -80,-84, // téléporteur 101, false, translate ("Teleporter"), @@ -320,7 +320,7 @@ static Statistic table_statistic[] = }, { // STATARAIGNEE = 31 true, - 1, // araignée + 1, // araignée 0,0, // 15, false, @@ -338,7 +338,7 @@ static Statistic table_statistic[] = }, { // STATELECTRO = 33 true, - 7, // électro + 7, // électro 0,0, // 75, false, @@ -358,7 +358,7 @@ static Statistic table_statistic[] = }; -// Retourne la statistique correspondant à un rang donné. +// Retourne la statistique correspondant à un rang donné. Statistic* StatisticGet(int rank) { @@ -385,7 +385,7 @@ Statistic* StatisticGet(int rank) -// Réinitialise les statistiques. +// Réinitialise les statistiques. void CDecor::StatisticInit() { @@ -408,7 +408,7 @@ void CDecor::StatisticInit() } -// Met à jour tous les compteurs des statistiques. +// Met à jour tous les compteurs des statistiques. void CDecor::StatisticUpdate() { @@ -457,7 +457,7 @@ void CDecor::StatisticUpdate() x = (m_blupi[rank].cel.x/2)*2; y = (m_blupi[rank].cel.y/2)*2; if ( m_decor[x/2][y/2].floorChannel == CHFLOOR && - m_decor[x/2][y/2].floorIcon == 17 ) // dalle hachurée ? + m_decor[x/2][y/2].floorIcon == 17 ) // dalle hachurée ? { m_nbStatHachBlupi ++; } @@ -478,7 +478,7 @@ void CDecor::StatisticUpdate() x = (m_blupi[rank].cel.x/2)*2; y = (m_blupi[rank].cel.y/2)*2; if ( m_decor[x/2][y/2].floorChannel == CHFLOOR && - m_decor[x/2][y/2].floorIcon == 17 ) // dalle hachurée ? + m_decor[x/2][y/2].floorIcon == 17 ) // dalle hachurée ? { m_nbStatHachRobot ++; } @@ -491,7 +491,7 @@ void CDecor::StatisticUpdate() m_nbStatRobots ++; } } - if ( m_blupi[rank].perso == 1 ) // araignée ? + if ( m_blupi[rank].perso == 1 ) // araignée ? { table_statistic[STATARAIGNEE].nb ++; if ( !m_term.bHachRobot ) // pas robot sur hachures ? @@ -511,7 +511,7 @@ void CDecor::StatisticUpdate() m_nbStatRobots ++; } } - if ( m_blupi[rank].perso == 7 ) // électro ? + if ( m_blupi[rank].perso == 7 ) // électro ? { table_statistic[STATELECTRO].nb ++; if ( !m_term.bHachRobot ) // pas robot sur hachures ? @@ -528,7 +528,7 @@ void CDecor::StatisticUpdate() { bHach = false; if ( m_decor[x/2][y/2].floorChannel == CHFLOOR && - m_decor[x/2][y/2].floorIcon == 17 ) // dalle hachurée ? + m_decor[x/2][y/2].floorIcon == 17 ) // dalle hachurée ? { bHach = true; m_nbStatHach ++; @@ -566,7 +566,7 @@ void CDecor::StatisticUpdate() { m_nbStatHachTomate ++; } - if ( icon == 14 && bHach ) // métal ? + if ( icon == 14 && bHach ) // métal ? { m_nbStatHachMetal ++; } @@ -577,7 +577,7 @@ void CDecor::StatisticUpdate() icon = m_decor[x/2][y/2].floorIcon; if ( (icon >= 52 && icon <= 56) || // couveuse ? - (icon >= 80 && icon <= 84) ) // téléporteur ? + (icon >= 80 && icon <= 84) ) // téléporteur ? { pStatistic = table_statistic; while ( pStatistic->bExist ) @@ -621,7 +621,7 @@ void CDecor::StatisticUpdate() } else { - // nb <- nb de pages nécessaires + // nb <- nb de pages nécessaires nb = (m_statNb+STATNB-5)/(STATNB-2); m_bStatUp = true; @@ -637,7 +637,7 @@ void CDecor::StatisticUpdate() } } - m_bStatRecalc = false; // c'est calculé + m_bStatRecalc = false; // c'est calculé m_bStatRedraw = true; // faudra tout redessiner } @@ -700,28 +700,28 @@ void CDecor::StatisticDraw() if ( rank == 0 && m_bStatUp ) { - icon = 6+66; // flèche up - if ( rank == m_statHili ) // statistique survolée ? + icon = 6+66; // flèche up + if ( rank == m_statHili ) // statistique survolée ? { icon ++; } pos.x -= 3; pos.y -= 5; if ( pStatistic->drawIcon == 68 ) pos.x += 26; - m_pPixmap->DrawIcon(-1, CHBUTTON, icon, pos); // flèche up + m_pPixmap->DrawIcon(-1, CHBUTTON, icon, pos); // flèche up continue; } if ( rank == STATNB-1 && m_bStatDown ) { - icon = 6+68; // flèche down - if ( rank == m_statHili ) // statistique survolée ? + icon = 6+68; // flèche down + if ( rank == m_statHili ) // statistique survolée ? { icon ++; } pos.x += 23; pos.y -= 5; - m_pPixmap->DrawIcon(-1, CHBUTTON, icon, pos); // flèche down + m_pPixmap->DrawIcon(-1, CHBUTTON, icon, pos); // flèche down continue; } @@ -729,7 +729,7 @@ void CDecor::StatisticDraw() icon = 6+pStatistic->drawIcon; - if ( rank == m_statHili ) // statistique survolée ? + if ( rank == m_statHili ) // statistique survolée ? { m_pPixmap->DrawIconDemi(-1, CHBLUPI, ICON_HILI_STAT, pos); textRes = gettext (pStatistic->text); @@ -764,7 +764,7 @@ void CDecor::StatisticDraw() if ( m_statHili == 102 ) textRes = gettext ("Save"); } - // Dessine le nom de la statistique survolée. + // Dessine le nom de la statistique survolée. pos.x = 0; pos.y = 404; rect.left = pos.x; @@ -780,10 +780,10 @@ void CDecor::StatisticDraw() DrawText(m_pPixmap, pos, textRes); } - m_bStatRedraw = false; // dessin plus nécessaire + m_bStatRedraw = false; // dessin plus nécessaire } -// Génère les statistiques. +// Génère les statistiques. void CDecor::GenerateStatictic() { @@ -791,7 +791,7 @@ void CDecor::GenerateStatictic() if ( m_bStatRecalc || m_phase%20 == 10 ) { - StatisticUpdate(); // met à jour les compteurs + StatisticUpdate(); // met à jour les compteurs } if ( m_bStatRedraw ) @@ -801,7 +801,7 @@ void CDecor::GenerateStatictic() } -// Bouton pressé dans les statistiques. +// Bouton pressé dans les statistiques. bool CDecor::StatisticDown(POINT pos) { @@ -814,7 +814,7 @@ bool CDecor::StatisticDown(POINT pos) hili = StatisticDetect(pos); if ( hili < 0 ) return false; - if ( m_bStatUp && hili == 0 ) // flèche up ? + if ( m_bStatUp && hili == 0 ) // flèche up ? { m_statFirst -= STATNB-2; if ( m_statFirst < STATNB-1 ) @@ -828,7 +828,7 @@ bool CDecor::StatisticDown(POINT pos) return true; } - if ( m_bStatDown && hili == STATNB-1 ) // flèche down ? + if ( m_bStatDown && hili == STATNB-1 ) // flèche down ? { if ( m_statFirst == 0 ) { @@ -853,7 +853,7 @@ bool CDecor::StatisticDown(POINT pos) show = pStatistic->lastShow % pStatistic->nb; pStatistic->lastShow ++; - if ( pStatistic->perso >= 0 ) // blupi/araignée ? + if ( pStatistic->perso >= 0 ) // blupi/araignée ? { for ( rank=0 ; rankdrawIcon == 76) || // malade ? (!m_blupi[rank].bMalade && m_blupi[rank].energy <= MAXENERGY/4 && - pStatistic->drawIcon == 13) || // fatigué ? + pStatistic->drawIcon == 13) || // fatigué ? (m_blupi[rank].energy > MAXENERGY/4 && - pStatistic->drawIcon == 14) ) // énergique ? + pStatistic->drawIcon == 14) ) // énergique ? { if ( show == 0 ) { @@ -878,7 +878,7 @@ bool CDecor::StatisticDown(POINT pos) { BlupiDeselect(); m_blupi[rank].bHili = true; - m_rankBlupiHili = rank; // sélectionne + m_rankBlupiHili = rank; // sélectionne m_nbBlupiHili = 1; } BlupiSetArrow(rank, true); @@ -910,7 +910,7 @@ bool CDecor::StatisticDown(POINT pos) cel = GetCel(x,y); if ( pStatistic->bBigIcon ) { - // Flèche plus haute. + // Flèche plus haute. m_celArrow = GetCel(cel,-2,-2); } else @@ -945,7 +945,7 @@ bool CDecor::StatisticDown(POINT pos) cel = GetCel(x,y); if ( pStatistic->bBigIcon ) { - // Flèche plus haute. + // Flèche plus haute. m_celArrow = GetCel(cel,-2,-2); } else @@ -990,7 +990,7 @@ bool CDecor::StatisticDown(POINT pos) return true; } -// Souris déplacée dans les statistiques. +// Souris déplacée dans les statistiques. bool CDecor::StatisticMove(POINT pos) { @@ -998,7 +998,7 @@ bool CDecor::StatisticMove(POINT pos) rank = StatisticDetect(pos); - if ( rank != m_statHili ) // autre mise en évidence ? + if ( rank != m_statHili ) // autre mise en évidence ? { m_statHili = rank; m_bStatRedraw = true; // faudra tout redessiner @@ -1007,14 +1007,14 @@ bool CDecor::StatisticMove(POINT pos) return false; } -// Bouton relâché dans les statistiques. +// Bouton relâché dans les statistiques. bool CDecor::StatisticUp(POINT pos) { return false; } -// Détecte dans quelle statistique est la souris. +// Détecte dans quelle statistique est la souris. int CDecor::StatisticDetect(POINT pos) { diff --git a/src/def.h b/src/def.h index 8cb51ed..ccfece2 100644 --- a/src/def.h +++ b/src/def.h @@ -6,7 +6,7 @@ #define _INTRO false // true si images d'introduction -#define LXIMAGE 640 // dimensions de la fenêtre de jeu +#define LXIMAGE 640 // dimensions de la fenêtre de jeu #define LYIMAGE 480 #define POSDRAWX 144 // surface de dessin @@ -22,7 +22,7 @@ #define MAXCELX 200 // nb max de cellules d'un monde #define MAXCELY 200 -#define DIMCELX 60 // dimensions d'une cellule (décor) +#define DIMCELX 60 // dimensions d'une cellule (décor) #define DIMCELY 30 #define DIMOBJX 120 // dimensions d'un objet @@ -30,7 +30,7 @@ #define DIMBLUPIX 60 // dimensions de blupi #define DIMBLUPIY 60 -#define SHIFTBLUPIY 5 // petit décalage vers le haut +#define SHIFTBLUPIY 5 // petit décalage vers le haut #define DIMBUTTONX 40 // dimensions d'un button #define DIMBUTTONY 40 @@ -43,10 +43,10 @@ #define DIMSTATX 60 #define DIMSTATY 30 -#define DIMTEXTX 16 // dimensions max d'un caractère +#define DIMTEXTX 16 // dimensions max d'un caractère #define DIMTEXTY 16 -#define DIMLITTLEX 16 // dimensions max d'un petit caractère +#define DIMLITTLEX 16 // dimensions max d'un petit caractère #define DIMLITTLEY 12 #define CHBACK 0 @@ -95,15 +95,15 @@ // Actions : -#define ACTION_STOP 0 // arrêt -#define ACTION_STOPf 1 // arrêt fatigué +#define ACTION_STOP 0 // arrêt +#define ACTION_STOPf 1 // arrêt fatigué #define ACTION_MARCHE 2 // marche -#define ACTION_MARCHEf 3 // marche fatigué +#define ACTION_MARCHEf 3 // marche fatigué #define ACTION_BUILD 4 // construit #define ACTION_PIOCHE 5 // pioche -#define ACTION_ENERGY 6 // prend de l'énergie -#define ACTION_TAKE 8 // fait sauter un objet sur la tête (est) -#define ACTION_DEPOSE 9 // repose l'objet sur la tête (est) +#define ACTION_ENERGY 6 // prend de l'énergie +#define ACTION_TAKE 8 // fait sauter un objet sur la tête (est) +#define ACTION_DEPOSE 9 // repose l'objet sur la tête (est) #define ACTION_SCIE 10 // scie du bois #define ACTION_BRULE 11 // blupi crame ! #define ACTION_TCHAO 12 // blupi disparait ! @@ -114,30 +114,30 @@ #define ACTION_SAUTE4 17 // saute par-dessus un obstacle #define ACTION_SAUTE5 18 // saute par-dessus un obstacle #define ACTION_PONT 19 // pousse un pont -#define ACTION_MISC1 20 // divers 1 (hausse les épaules) +#define ACTION_MISC1 20 // divers 1 (hausse les épaules) #define ACTION_MISC2 21 // divers 2 (grat-grat) #define ACTION_MISC3 22 // divers 3 (yoyo) -#define ACTION_MISC1f 23 // divers 1 fatigué (bof-bof) +#define ACTION_MISC1f 23 // divers 1 fatigué (bof-bof) #define ACTION_GLISSE 24 // glisse en marchant #define ACTION_BOIT 25 // blupi boit #define ACTION_LABO 26 // blupi travaille dans son laboratoire -#define ACTION_DYNAMITE 27 // blupi fait péter la dynamite +#define ACTION_DYNAMITE 27 // blupi fait péter la dynamite #define ACTION_DELAY 28 // blupi attend un frame #define ACTION_CUEILLE1 29 // blupi cueille des fleurs #define ACTION_CUEILLE2 30 // blupi cueille des fleurs #define ACTION_MECHE 31 // blupi se bouche les oreilles -#define ACTION_STOPb 32 // arrêt en bateau +#define ACTION_STOPb 32 // arrêt en bateau #define ACTION_MARCHEb 33 // avance en bateau -#define ACTION_STOPj 34 // arrêt en jeep +#define ACTION_STOPj 34 // arrêt en jeep #define ACTION_MARCHEj 35 // avance en jeep -#define ACTION_ELECTRO 36 // blupi électrocuté +#define ACTION_ELECTRO 36 // blupi électrocuté #define ACTION_GRILLE1 37 // blupi grille (phase 1) #define ACTION_GRILLE2 38 // blupi grille (phase 2) #define ACTION_GRILLE3 39 // blupi grille (phase 3) #define ACTION_MISC4 40 // divers 4 (ferme les yeux) #define ACTION_CONTENT 41 // blupi est content #define ACTION_ARROSE 42 // blupi arrose -#define ACTION_BECHE 43 // blupi bèche +#define ACTION_BECHE 43 // blupi bèche #define ACTION_CUEILLE3 44 // blupi cueille des fleurs #define ACTION_BUILDBREF 45 // construit #define ACTION_BUILDSEC 46 // construit @@ -145,53 +145,53 @@ #define ACTION_BUILDPIERRE 48 // construit #define ACTION_PIOCHEPIERRE 49 // pioche #define ACTION_PIOCHESOURD 50 // pioche -#define ACTION_MISC5 51 // divers 5 (ohé) -#define ACTION_TELEPORTE1 52 // téléporte -#define ACTION_TELEPORTE2 53 // téléporte -#define ACTION_TELEPORTE3 54 // téléporte -#define ACTION_STOPa 55 // arrêt armure +#define ACTION_MISC5 51 // divers 5 (ohé) +#define ACTION_TELEPORTE1 52 // téléporte +#define ACTION_TELEPORTE2 53 // téléporte +#define ACTION_TELEPORTE3 54 // téléporte +#define ACTION_STOPa 55 // arrêt armure #define ACTION_MARCHEa 56 // marche armure #define ACTION_ARMUREOPEN 57 // ouvre armure #define ACTION_ARMURECLOSE 58 // ferme armure #define ACTION_SAUTE1 59 // saute dans la jeep #define ACTION_MISC6 60 // divers 6 (diabolo) -#define ACTION_A_STOP 100 // araignée: arrêt -#define ACTION_A_MARCHE 101 // araignée: marche -#define ACTION_A_SAUT 102 // araignée: saute -#define ACTION_A_GRILLE 103 // araignée: grille dans rayon -#define ACTION_A_POISON 105 // araignée: empoisonée -#define ACTION_A_MORT1 106 // araignée: meurt -#define ACTION_A_MORT2 107 // araignée: meurt -#define ACTION_A_MORT3 108 // araignée: meurt +#define ACTION_A_STOP 100 // araignée: arrêt +#define ACTION_A_MARCHE 101 // araignée: marche +#define ACTION_A_SAUT 102 // araignée: saute +#define ACTION_A_GRILLE 103 // araignée: grille dans rayon +#define ACTION_A_POISON 105 // araignée: empoisonée +#define ACTION_A_MORT1 106 // araignée: meurt +#define ACTION_A_MORT2 107 // araignée: meurt +#define ACTION_A_MORT3 108 // araignée: meurt -#define ACTION_V_STOP 200 // virus: arrêt +#define ACTION_V_STOP 200 // virus: arrêt #define ACTION_V_MARCHE 201 // virus: marche #define ACTION_V_GRILLE 202 // virus: grille dans rayon -#define ACTION_T_STOP 300 // tracks: arrêt +#define ACTION_T_STOP 300 // tracks: arrêt #define ACTION_T_MARCHE 301 // tracks: marche -#define ACTION_T_ECRASE 302 // tracks: écrase un objet +#define ACTION_T_ECRASE 302 // tracks: écrase un objet -#define ACTION_R_STOP 400 // robot: arrêt +#define ACTION_R_STOP 400 // robot: arrêt #define ACTION_R_MARCHE 401 // robot: marche #define ACTION_R_APLAT 402 // robot: applatit #define ACTION_R_BUILD 403 // robot: construit #define ACTION_R_DELAY 404 // robot: construit #define ACTION_R_CHARGE 405 // robot: recharge -#define ACTION_R_ECRASE 406 // robot: écrase un objet +#define ACTION_R_ECRASE 406 // robot: écrase un objet -#define ACTION_B_STOP 500 // bombe: arrêt +#define ACTION_B_STOP 500 // bombe: arrêt #define ACTION_B_MARCHE 501 // bombe: marche -#define ACTION_D_DELAY 600 // détonnateur: attend +#define ACTION_D_DELAY 600 // détonnateur: attend -#define ACTION_E_STOP 700 // électro: arrêt -#define ACTION_E_MARCHE 701 // électro: marche -#define ACTION_E_DEBUT 702 // électro: débute -#define ACTION_E_RAYON 703 // électro: rayonne +#define ACTION_E_STOP 700 // électro: arrêt +#define ACTION_E_MARCHE 701 // électro: marche +#define ACTION_E_DEBUT 702 // électro: débute +#define ACTION_E_RAYON 703 // électro: rayonne -#define ACTION_D_STOP 800 // disciple: arrêt +#define ACTION_D_STOP 800 // disciple: arrêt #define ACTION_D_MARCHE 801 // disciple: marche #define ACTION_D_BUILD 802 // disciple: construit #define ACTION_D_PIOCHE 803 // disciple: pioche @@ -201,7 +201,7 @@ #define ACTION_D_CUEILLE2 807 // disciple: cueille des fleurs #define ACTION_D_MECHE 808 // disciple: se bouche les oreilles #define ACTION_D_ARROSE 809 // disciple: arrose -#define ACTION_D_BECHE 810 // disciple: bèche +#define ACTION_D_BECHE 810 // disciple: bèche // Sons : @@ -603,16 +603,16 @@ enum MouseSprites typedef struct { - short bHachBlupi; // blupi sur dalle hachurée - short bHachPlanche; // planches sur dalle hachurée - short bStopFire; // feu éteint - short nbMinBlupi; // nb de blupi nécessaires - short nbMaxBlupi; // nb de blupi nécessaires - short bHomeBlupi; // blupi à la maison + short bHachBlupi; // blupi sur dalle hachurée + short bHachPlanche; // planches sur dalle hachurée + short bStopFire; // feu éteint + short nbMinBlupi; // nb de blupi nécessaires + short nbMaxBlupi; // nb de blupi nécessaires + short bHomeBlupi; // blupi à la maison short bKillRobots; // plus d'ennemis - short bHachTomate; // tomates sur dalle hachurée - short bHachMetal; // métal sur dalle hachurée - short bHachRobot; // robot sur dalle hachurée + short bHachTomate; // tomates sur dalle hachurée + short bHachMetal; // métal sur dalle hachurée + short bHachRobot; // robot sur dalle hachurée short reserve[14]; } Term; diff --git a/src/event.cpp b/src/event.cpp index adfe9d5..396b0a1 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -41,7 +41,7 @@ typedef struct short mission; // mission en cours (0..n) short speed; short bMovie; - short maxMission; // dernière mission effectuée (0..n) + short maxMission; // dernière mission effectuée (0..n) short scrollSpeed; short audioVolume; short midiVolume; @@ -54,8 +54,8 @@ DescInfo; -// Toutes les premières lettres doivent -// être différentes ! +// Toutes les premières lettres doivent +// être différentes ! static char cheat_code[9][20] = { @@ -960,7 +960,7 @@ static Phase table[] = { translate ("Drop") }, }, { - WM_BUTTON32, // répète + WM_BUTTON32, // répète 0, {1,100}, 170+42*6, 30+52*0, { translate ("Repeat") }, @@ -1028,7 +1028,7 @@ static Phase table[] = { translate ("Boat") }, }, { - WM_BUTTON13, // build6 (téléporteur) + WM_BUTTON13, // build6 (téléporteur) 0, {1,101}, 170+42*4, 30+52*2, { translate ("Teleporter") }, @@ -1192,7 +1192,7 @@ static Phase table[] = { translate ("Tomatoes on striped paving stones") }, }, { - WM_BUTTON11, // hach métal + WM_BUTTON11, // hach métal 0, {1,84}, 170+42*3, 30+42*2, { translate ("Platinium on striped paving stones") }, @@ -1548,7 +1548,7 @@ void CEvent::SetMouseType(int mouseType) m_mouseType = mouseType; } -// Crée le gestionnaire d'événements. +// Crée le gestionnaire d'événements. void CEvent::Create(CPixmap *pPixmap, CDecor *pDecor, CSound *pSound, CMovie *pMovie) @@ -1671,7 +1671,7 @@ void CEvent::SetMenu(int button, int menu) -// Restitue le jeu après une activation en mode fullScreen. +// Restitue le jeu après une activation en mode fullScreen. void CEvent::RestoreGame() { @@ -1698,7 +1698,7 @@ void CEvent::RestoreGame() } -// Crée tous les boutons nécessaires à la phase en cours. +// Crée tous les boutons nécessaires à la phase en cours. bool CEvent::CreateButtons() { @@ -1764,7 +1764,7 @@ void AddCheatCode(char *pDst, char *pSrc) pDst[j] = 0; } -// Dessine un texte multi-lignes centré. +// Dessine un texte multi-lignes centré. void CEvent::DrawTextCenter(const char *text, int x, int y, int font) { @@ -1948,11 +1948,11 @@ bool CEvent::DrawButtons() } else { - if ( m_bDemoRec ) // démo en enregistrement ? + if ( m_bDemoRec ) // démo en enregistrement ? { DrawTextCenter(gettext ("REC"), (10+134)/2, 20, FONTRED); } - if ( m_bDemoPlay ) // démo en restitution ? + if ( m_bDemoPlay ) // démo en restitution ? { DrawTextCenter(gettext ("Demo"), (10+134)/2, 20, FONTRED); } @@ -2026,7 +2026,7 @@ bool CEvent::DrawButtons() m_pPixmap->DrawIcon(-1, CHBUTTON, icon, m_posHelpButton); } } - else // infos cachées ? + else // infos cachées ? { pos.x = POSDRAWX+DIMDRAWX/2-DIMBUTTONX/2; pos.y = -12; @@ -2078,7 +2078,7 @@ bool CEvent::DrawButtons() } } - // Dessine les réglages pour la fin de la partie. + // Dessine les réglages pour la fin de la partie. if ( m_phase == WM_PHASE_TERM ) { Term* pTerm = m_pDecor->GetTerminated(); @@ -2108,13 +2108,13 @@ bool CEvent::DrawButtons() DrawTextCenter(gettext ("Music choice"), (10+134)/2, 20); } - // Dessine les textes pour le choix de la région. + // Dessine les textes pour le choix de la région. if ( m_phase == WM_PHASE_REGION ) { DrawTextCenter(gettext ("Scenery choice"), (10+134)/2, 20); } - // Ajoute "Mission numéro". + // Ajoute "Mission numéro". if ( m_phase == WM_PHASE_INFO ) { if (m_bSchool) @@ -2147,7 +2147,7 @@ bool CEvent::DrawButtons() DrawText(m_pPixmap, pos, text, FONTRED); } - // Ajoute le texte "Informations complémentaires". + // Ajoute le texte "Informations complémentaires". if ( m_phase == WM_PHASE_HELP ) { char *text = gettext ("Help number"); @@ -2160,7 +2160,7 @@ bool CEvent::DrawButtons() DrawText(m_pPixmap, pos, text, FONTRED); } - // Ajoute le numéro du monde. + // Ajoute le numéro du monde. if ( m_phase == WM_PHASE_INFO || m_phase == WM_PHASE_STOP || m_phase == WM_PHASE_HELP ) @@ -2215,7 +2215,7 @@ bool CEvent::DrawButtons() } } - // Affiche le libellé de l'énigme. + // Affiche le libellé de l'énigme. if ( m_phase == WM_PHASE_INFO || m_phase == WM_PHASE_STOP || m_phase == WM_PHASE_HELP || @@ -2235,7 +2235,7 @@ bool CEvent::DrawButtons() DrawTextRect(m_pPixmap, pos, m_libelle, pente, FONTSLIM); } - // Affiche le texte lorsque c'est raté. + // Affiche le texte lorsque c'est raté. if ( m_phase == WM_PHASE_LOST ) { static char *list[] = { @@ -2251,7 +2251,7 @@ bool CEvent::DrawButtons() DrawText(m_pPixmap, pos, list[GetWorld () % 5]); } - // Affiche le texte lorsque c'est réussi. + // Affiche le texte lorsque c'est réussi. if ( m_phase == WM_PHASE_WIN ) { static char *list[] = { @@ -2284,7 +2284,7 @@ bool CEvent::DrawButtons() DrawText(m_pPixmap, pos, text); } - // Dessine les réglages. + // Dessine les réglages. if ( m_phase == WM_PHASE_SETUP || m_phase == WM_PHASE_SETUPp ) { @@ -2364,7 +2364,7 @@ bool CEvent::DrawButtons() DrawText(m_pPixmap, pos, text); } - // Affiche le texte lorsqu'il faut insérer le CD-Rom. + // Affiche le texte lorsqu'il faut insérer le CD-Rom. if ( m_phase == WM_PHASE_INSERT ) { DrawTextCenter(gettext ("Insert CD-Rom Planet Blupi and wait a few seconds..."), LXIMAGE/2, 20); @@ -2384,7 +2384,7 @@ bool CEvent::DrawButtons() return true; } -// Retourne le lutin à utiliser à une position donnée. +// Retourne le lutin à utiliser à une position donnée. MouseSprites CEvent::MousePosToSprite(POINT pos) { @@ -2454,17 +2454,17 @@ MouseSprites CEvent::MousePosToSprite(POINT pos) } } - if ( m_bFillMouse && // bidon présent ? + if ( m_bFillMouse && // bidon présent ? pos.x >= POSDRAWX && pos.x <= POSDRAWX+DIMDRAWX && pos.y >= POSDRAWY && pos.y <= POSDRAWY+DIMDRAWY ) { sprite = SPRITE_FILL; } - if ( m_bWaitMouse ) // sablier présent ? + if ( m_bWaitMouse ) // sablier présent ? { sprite = SPRITE_WAIT; } - if ( m_bHideMouse ) // souris cachée ? + if ( m_bHideMouse ) // souris cachée ? { sprite = SPRITE_EMPTY; } @@ -2472,7 +2472,7 @@ MouseSprites CEvent::MousePosToSprite(POINT pos) return sprite; } -// Gère le lutin de la souris. +// Gère le lutin de la souris. void CEvent::MouseSprite(POINT pos) { @@ -2480,7 +2480,7 @@ void CEvent::MouseSprite(POINT pos) m_pPixmap->ChangeSprite(m_mouseSprite); } -// Met ou enlève le sablier de la souris. +// Met ou enlève le sablier de la souris. void CEvent::WaitMouse(bool bWait) { @@ -2516,14 +2516,14 @@ void CEvent::HideMouse(bool bHide) m_pPixmap->ChangeSprite(m_mouseSprite); } -// Traite les événements pour tous les boutons. +// Traite les événements pour tous les boutons. bool CEvent::EventButtons(const SDL_Event &event, POINT pos) { POINT test; int lg, oldx, sound; - // Cherche le tool tips à utiliser pour la souris. + // Cherche le tool tips à utiliser pour la souris. m_textToolTips[0] = 0; oldx = m_posToolTips.x; m_posToolTips.x = -1; @@ -2649,7 +2649,7 @@ bool CEvent::EventButtons(const SDL_Event &event, POINT pos) && ( event.button.button == SDL_BUTTON_LEFT || event.button.button == SDL_BUTTON_RIGHT)) { - m_pDecor->HideTooltips(true); // plus de tooltips pour décor + m_pDecor->HideTooltips(true); // plus de tooltips pour décor } if (event.type == SDL_MOUSEBUTTONUP && ( event.button.button == SDL_BUTTON_LEFT @@ -2693,7 +2693,7 @@ bool CEvent::MouseOnButton(POINT pos) } -// Retourne l'index dans table pour une phase donnée. +// Retourne l'index dans table pour une phase donnée. int CEvent::SearchPhase(unsigned int phase) { @@ -2708,7 +2708,7 @@ int CEvent::SearchPhase(unsigned int phase) return -1; } -// Donne le numéro du monde. +// Donne le numéro du monde. int CEvent::GetWorld() { @@ -2717,7 +2717,7 @@ int CEvent::GetWorld() else return m_mission; } -// Donne le numéro physique du monde. +// Donne le numéro physique du monde. int CEvent::GetPhysicalWorld() { @@ -2798,17 +2798,17 @@ bool CEvent::ChangePhase(unsigned int phase) } if ( phase == WM_PHASE_PLAY && !m_bDemoPlay && - GetPhysicalWorld() >= 150 && // mission spéciale démo ? + GetPhysicalWorld() >= 150 && // mission spéciale démo ? GetPhysicalWorld() < 200 ) { - DemoRecStart(); // début enregistrement + DemoRecStart(); // début enregistrement } if ( phase != WM_PHASE_PLAY ) { - DemoRecStop(); // stoppe l'enregistrement d'une démo + DemoRecStop(); // stoppe l'enregistrement d'une démo } - m_pDecor->UndoClose(); // libère le buffer undo + m_pDecor->UndoClose(); // libère le buffer undo index = SearchPhase(phase); if ( index < 0 ) return false; @@ -2826,7 +2826,7 @@ bool CEvent::ChangePhase(unsigned int phase) phase == WM_PHASE_INFO ) // quitte construction ? { m_pDecor->Write(GetPhysicalWorld(), false, - GetPhysicalWorld(), 0, 0); // écrit le monde + GetPhysicalWorld(), 0, 0); // écrit le monde } // FIXME: pause is better if the game is not stop but just interrupted @@ -2847,10 +2847,10 @@ bool CEvent::ChangePhase(unsigned int phase) iconDim.y = 0; if ( !m_pPixmap->Cache(CHBACK, filename, totalDim, iconDim) ) { - WaitMouse(false); // enlève le sablier + WaitMouse(false); // enlève le sablier m_tryInsertCount = 40; m_tryPhase = m_phase; - return ChangePhase(WM_PHASE_INSERT); // insérez le CD-Rom ... + return ChangePhase(WM_PHASE_INSERT); // insérez le CD-Rom ... } if ( m_phase == WM_PHASE_READ || @@ -2882,7 +2882,7 @@ bool CEvent::ChangePhase(unsigned int phase) { m_tryInsertCount = 40; m_tryPhase = m_phase; - return ChangePhase(WM_PHASE_INSERT); // insérez le CD-Rom ... + return ChangePhase(WM_PHASE_INSERT); // insérez le CD-Rom ... } m_pDecor->SetTime(0); m_pDecor->SetTotalTime(0); @@ -2934,18 +2934,18 @@ bool CEvent::ChangePhase(unsigned int phase) { m_tryInsertCount = 40; m_tryPhase = m_phase; - return ChangePhase(WM_PHASE_INSERT); // insérez le CD-Rom ... + return ChangePhase(WM_PHASE_INSERT); // insérez le CD-Rom ... } } m_jauges[0].SetHide(true); // cache les jauges m_jauges[1].SetHide(true); - CreateButtons(); // crée les boutons selon la phase + CreateButtons(); // crée les boutons selon la phase m_bMenu = false; m_pDecor->HideTooltips(false); m_menu.Delete(); - m_pDecor->BlupiSetArrow(0, false); // enlève toutes les flèches - m_pDecor->ResetHili(); // enlève les mises en évidence + m_pDecor->BlupiSetArrow(0, false); // enlève toutes les flèches + m_pDecor->ResetHili(); // enlève les mises en évidence if ( m_phase == WM_PHASE_PLAY ) { @@ -3151,7 +3151,7 @@ bool CEvent::ChangePhase(unsigned int phase) } } - WaitMouse(false); // enlève le sablier + WaitMouse(false); // enlève le sablier return true; } @@ -3176,11 +3176,11 @@ void CEvent::TryInsert() } } -// Fait démarrer un film si nécessaire. +// Fait démarrer un film si nécessaire. void CEvent::MovieToStart() { - if ( m_movieToStart[0] != 0 ) // y a-t-il un film à démarrer ? + if ( m_movieToStart[0] != 0 ) // y a-t-il un film à démarrer ? { HideMouse(true); // cache la souris @@ -3198,7 +3198,7 @@ void CEvent::MovieToStart() } -// Décale le décor. +// Décale le décor. void CEvent::DecorShift(int dx, int dy) { @@ -3216,7 +3216,7 @@ void CEvent::DecorShift(int dx, int dy) //? m_pDecor->NextPhase(0); // faudra refaire la carte tout de suite } -// Décale le décor lorsque la souris touche un bord. +// Décale le décor lorsque la souris touche un bord. void CEvent::DecorAutoShift(POINT pos) { @@ -3235,7 +3235,7 @@ void CEvent::DecorAutoShift(POINT pos) if ( m_phase == WM_PHASE_PLAY || m_phase == WM_PHASE_BUILD ) { - if ( m_shiftPhase == 0 ) // début du shift ? + if ( m_shiftPhase == 0 ) // début du shift ? { m_shiftOffset.x = 0; m_shiftOffset.y = 0; @@ -3322,7 +3322,7 @@ void CEvent::DecorAutoShift(POINT pos) offset.y = m_shiftOffset.y*(max-m_shiftPhase)*(DIMCELY/2/max); m_pDecor->SetShiftOffset(offset); - if ( m_shiftPhase == 0 ) // dernière phase ? + if ( m_shiftPhase == 0 ) // dernière phase ? { offset.x = 0; offset.y = 0; @@ -3341,7 +3341,7 @@ bool CEvent::IsShift() } -// Modifie le décor lorsque le bouton de la souris est pressé. +// Modifie le décor lorsque le bouton de la souris est pressé. bool CEvent::PlayDown(POINT pos, const SDL_Event &event) { @@ -3350,7 +3350,7 @@ bool CEvent::PlayDown(POINT pos, const SDL_Event &event) int rank, button, h; POINT cel; - m_pDecor->BlupiSetArrow(0, false); // enlève toutes les flèches + m_pDecor->BlupiSetArrow(0, false); // enlève toutes les flèches m_bMouseDown = false; @@ -3418,7 +3418,7 @@ bool CEvent::PlayDown(POINT pos, const SDL_Event &event) return true; } -// Modifie le décor lorsque la souris est déplacée. +// Modifie le décor lorsque la souris est déplacée. bool CEvent::PlayMove(POINT pos, Uint16 mod) { @@ -3435,7 +3435,7 @@ bool CEvent::PlayMove(POINT pos, Uint16 mod) m_pDecor->StatisticMove(pos); - if ( m_bMouseDown ) // bouton souris pressé ? + if ( m_bMouseDown ) // bouton souris pressé ? { if ( m_bHili ) { @@ -3454,7 +3454,7 @@ bool CEvent::PlayMove(POINT pos, Uint16 mod) return true; } -// Modifie le décor lorsque le bouton de la souris est relâché. +// Modifie le décor lorsque le bouton de la souris est relâché. bool CEvent::PlayUp(POINT pos, Uint16 mod) { @@ -3467,7 +3467,7 @@ bool CEvent::PlayUp(POINT pos, Uint16 mod) m_pDecor->StatisticUp(pos); - if ( m_bMouseDown ) // bouton souris pressé ? + if ( m_bMouseDown ) // bouton souris pressé ? { if ( m_bHili ) { @@ -3489,7 +3489,7 @@ bool CEvent::PlayUp(POINT pos, Uint16 mod) pos, m_menuNb, m_menuButtons, m_menuErrors, m_menuTexts, m_menuPerso); m_bMenu = true; - m_pDecor->HideTooltips(true); // plus de tooltips pour décor + m_pDecor->HideTooltips(true); // plus de tooltips pour décor } } } @@ -3522,7 +3522,7 @@ void CEvent::ChangeButtons(int message) state = GetState(message); if ( state == 0 ) state = 1; else state = 0; - SetState(message, state); // pressé <-> relâché + SetState(message, state); // pressé <-> relâché pButtonExist[message-WM_BUTTON0] = state; pButtonExist[BUTTON_DJEEP] = true; @@ -3545,7 +3545,7 @@ void CEvent::ChangeButtons(int message) state = GetState(message); if ( state == 0 ) state = 1; else state = 0; - SetState(message, state); // pressé <-> relâché + SetState(message, state); // pressé <-> relâché if ( message == WM_BUTTON1 ) pTerm->bHachBlupi = state; if ( message == WM_BUTTON2 ) pTerm->bHachPlanche = state; @@ -3672,7 +3672,7 @@ void CEvent::ChangeButtons(int message) -// Met un sol si nécessaire sous un objet. +// Met un sol si nécessaire sous un objet. void CEvent::BuildFloor(POINT cel, int insIcon) { @@ -3693,7 +3693,7 @@ void CEvent::BuildFloor(POINT cel, int insIcon) insIcon == 113 || // maison ? insIcon == 120 ) // usine ? { - iFloor = 16; // sol brun foncé + iFloor = 16; // sol brun foncé } if ( insIcon == 122 ) // mine de fer ? @@ -3705,10 +3705,10 @@ void CEvent::BuildFloor(POINT cel, int insIcon) insIcon == 100 || // usine ennemie ? insIcon == 102 || // usine ennemie ? insIcon == 104 || // usine ennemie ? - (insIcon >= 106 && insIcon <= 112) || // barrière ? + (insIcon >= 106 && insIcon <= 112) || // barrière ? insIcon == 115 || // usine ennemie ? insIcon == 17 || // usine ennemie ? - insIcon == 12 ) // fusée ? + insIcon == 12 ) // fusée ? { iFloor = 67; // sol bleu ennemi } @@ -3723,31 +3723,31 @@ void CEvent::BuildFloor(POINT cel, int insIcon) } } -// Enlève si nécessaire un objet sur l'eau. +// Enlève si nécessaire un objet sur l'eau. void CEvent::BuildWater(POINT cel, int insIcon) { int channel, icon; - if ( insIcon != 14 ) return; // rien à faire si pas eau + if ( insIcon != 14 ) return; // rien à faire si pas eau m_pDecor->GetObject(cel, channel, icon); if ( channel == CHOBJECT && icon >= 6 && // objet (pas petite plante) ? icon != 117 ) // pas bateau ? { - m_pDecor->PutObject(cel, -1, -1); // enlève l'objet + m_pDecor->PutObject(cel, -1, -1); // enlève l'objet m_pDecor->ArrangeObject(cel); } } -// Cette table donne les objets à construire en fonction +// Cette table donne les objets à construire en fonction // du choix dans le menu. static int tableFloor[] = { 1,49,50,51,0,0,0,0,0,0, // 0 herbe - 20,66,79,0,0,0,0,0,0,0, // 1 foncé + 20,66,79,0,0,0,0,0,0,0, // 1 foncé 33,46,47,48,71,0,0,0,0,0, // 2 terre 14,0,0,0,0,0,0,0,0,0, // 3 mer 15,16,17,18,19,65,67,0,0,0, // 4 dalles @@ -3756,7 +3756,7 @@ static int tableFloor[] = static int tableObject[] = { - -1,0,0,0,0,0,0,0,0,0, // 0 détruit + -1,0,0,0,0,0,0,0,0,0, // 0 détruit 0,4,1,2,3,5,0,0,0,0, // 1 plantes 6,7,8,9,10,11,0,0,0,0, // 2 arbres 81,83,94,0,0,0,0,0,0,0, // 5 fleurs @@ -3764,20 +3764,20 @@ static int tableObject[] = static int tableHome[] = { - -1,0,0,0,0,0,0,0,0,0, // 0 détruit + -1,0,0,0,0,0,0,0,0,0, // 0 détruit 113,61,28,120,0,0,0,0,0,0, // 1 maison 27,0,0,0,0,0,0,0,0,0, // 2 tour de protection 122,0,0,0,0,0,0,0,0,0, // 3 mine de fer 99,100,102,104,115,17,12,0,0,0, // 4 ennemi - 112,0,0,0,0,0,0,0,0,0, // 5 barrière + 112,0,0,0,0,0,0,0,0,0, // 5 barrière 26,71,0,0,0,0,0,0,0,0, // 6 palissade 37,38,39,40,41,42,43,0,0,0, // 7 rochers - 36,44,60,63,80,123,14,0,0,0, // 8 matières - 85,125,93,92,0,0,0,0,0,0, // 9 pièges - 117,118,16,0,0,0,0,0,0,0, // 10 véhicules + 36,44,60,63,80,123,14,0,0,0, // 8 matières + 85,125,93,92,0,0,0,0,0,0, // 9 pièges + 117,118,16,0,0,0,0,0,0,0, // 10 véhicules }; -// Modifie le décor lorsque le bouton de la souris est pressé. +// Modifie le décor lorsque le bouton de la souris est pressé. bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) { @@ -3791,7 +3791,7 @@ bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) if ( bMix ) { - m_pDecor->UndoCopy(); // copie le décor pour undo év. + m_pDecor->UndoCopy(); // copie le décor pour undo év. } if ( GetState(WM_DECOR1) == 1 ) // pose d'un sol @@ -3810,7 +3810,7 @@ bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) } } - if (mod & KMOD_CTRL) // touche Ctrl enfoncée ? + if (mod & KMOD_CTRL) // touche Ctrl enfoncée ? { WaitMouse(true); m_pDecor->ArrangeFill(cel, CHFLOOR, tableFloor[menu*10+m_lastFloor[menu]], true); @@ -3821,7 +3821,7 @@ bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) icon = tableFloor[menu*10+m_lastFloor[menu]]; if ( menu >= 1 ) // met un sol ? { - BuildWater(cel, icon); // enlève les objets + BuildWater(cel, icon); // enlève les objets } m_pDecor->PutFloor(cel, CHFLOOR, icon); m_pDecor->ArrangeFloor(cel); @@ -3844,7 +3844,7 @@ bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) } } - if (mod & KMOD_CTRL) // touche Ctrl enfoncée ? + if (mod & KMOD_CTRL) // touche Ctrl enfoncée ? { WaitMouse(true); m_pDecor->ArrangeFill(cel, CHOBJECT, tableObject[menu*10+m_lastObject[menu]], false); @@ -3853,7 +3853,7 @@ bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) else { icon = tableObject[menu*10+m_lastObject[menu]]; - BuildFloor(cel, icon); // met un sol si nécessaire + BuildFloor(cel, icon); // met un sol si nécessaire m_pDecor->PutObject(cel, CHOBJECT, icon); m_pDecor->ArrangeObject(cel); } @@ -3875,7 +3875,7 @@ bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) } } - if (mod & KMOD_CTRL) // touche Ctrl enfoncée ? + if (mod & KMOD_CTRL) // touche Ctrl enfoncée ? { WaitMouse(true); m_pDecor->ArrangeFill(cel, CHOBJECT, tableHome[menu*10+m_lastHome[menu]], false); @@ -3884,7 +3884,7 @@ bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) else { icon = tableHome[menu*10+m_lastHome[menu]]; - BuildFloor(cel, icon); // met un sol si nécessaire + BuildFloor(cel, icon); // met un sol si nécessaire m_pDecor->PutObject(cel, CHOBJECT, icon); m_pDecor->ArrangeObject(cel); } @@ -3899,11 +3899,11 @@ bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) { m_pDecor->BlupiDelete(cel); } - if ( menu == 1 ) // ajoute blupi-fatigué ? + if ( menu == 1 ) // ajoute blupi-fatigué ? { m_pDecor->BlupiCreate(cel, ACTION_STOP, DIRECT_S, 0, MAXENERGY/4); } - if ( menu == 2 ) // ajoute blupi-énergique ? + if ( menu == 2 ) // ajoute blupi-énergique ? { m_pDecor->BlupiCreate(cel, ACTION_STOP, DIRECT_S, 0, MAXENERGY); } @@ -3911,7 +3911,7 @@ bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) { m_pDecor->BlupiCreate(cel, ACTION_STOP, DIRECT_S, 8, MAXENERGY); } - if ( menu == 4 ) // ajoute araignée ? + if ( menu == 4 ) // ajoute araignée ? { m_pDecor->BlupiCreate(cel, ACTION_STOP, DIRECT_S, 1, MAXENERGY); } @@ -3927,7 +3927,7 @@ bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) { m_pDecor->BlupiCreate(cel, ACTION_STOP, DIRECT_S, 5, MAXENERGY); } - if ( menu == 8 ) // ajoute électro ? + if ( menu == 8 ) // ajoute électro ? { m_pDecor->BlupiCreate(cel, ACTION_STOP, DIRECT_S, 7, MAXENERGY); } @@ -3952,16 +3952,16 @@ bool CEvent::BuildDown(POINT pos, Uint16 mod, bool bMix) } } - m_pDecor->ArrangeBlupi(); // supprime les blupi bloqués + m_pDecor->ArrangeBlupi(); // supprime les blupi bloqués return true; } -// Modifie le décor lorsque la souris est déplacée. +// Modifie le décor lorsque la souris est déplacée. bool CEvent::BuildMove(POINT pos, Uint16 mod, const SDL_Event &event) { - if (event.motion.state & SDL_BUTTON (SDL_BUTTON_LEFT)) // bouton souris pressé ? + if (event.motion.state & SDL_BUTTON (SDL_BUTTON_LEFT)) // bouton souris pressé ? { BuildDown(pos, mod, false); } @@ -3978,7 +3978,7 @@ bool CEvent::BuildMove(POINT pos, Uint16 mod, const SDL_Event &event) return true; } -// Modifie le décor lorsque le bouton de la souris est relâché. +// Modifie le décor lorsque le bouton de la souris est relâché. bool CEvent::BuildUp(POINT pos) { @@ -3986,7 +3986,7 @@ bool CEvent::BuildUp(POINT pos) } -// Démarre un film non interractif. +// Démarre un film non interractif. bool CEvent::StartMovie(const char *pFilename) { @@ -3997,7 +3997,7 @@ bool CEvent::StartMovie(const char *pFilename) if ( !m_pMovie->IsExist(pFilename) ) return false; - rect.left = 1; // mystère: plante avec 0,0,LXIMAGE,LYIMAGE !!! + rect.left = 1; // mystère: plante avec 0,0,LXIMAGE,LYIMAGE !!! rect.top = 1; rect.right = LXIMAGE-2; rect.bottom = LYIMAGE-2; @@ -4070,7 +4070,7 @@ void CEvent::Write(int message) } -// Initialise le libellé d'une mission privée. +// Initialise le libellé d'une mission privée. void CEvent::PrivateLibelle() { @@ -4152,7 +4152,7 @@ void CEvent::PrivateLibelle() m_pDecor->SetInfoHeight(POSDRAWY+h1+10); } -// Lit le libellé d'un monde. +// Lit le libellé d'un monde. bool CEvent::ReadLibelle(int world, bool bSchool, bool bHelp) { @@ -4325,7 +4325,7 @@ bool CEvent::GetPause() } -// Début de l'enregistrement d'une démo. +// Début de l'enregistrement d'une démo. void CEvent::DemoRecStart() { @@ -4343,7 +4343,7 @@ void CEvent::DemoRecStart() m_speed = 1; } -// Fin de l'enregistrement d'une démo. +// Fin de l'enregistrement d'une démo. // Sauve le fichier sur disque. void CEvent::DemoRecStop() @@ -4378,7 +4378,7 @@ void CEvent::DemoRecStop() m_demoTime = 0; } -// Début de la reproduction d'une démo. +// Début de la reproduction d'une démo. // Lit le fichier sur disque. bool CEvent::DemoPlayStart() @@ -4432,7 +4432,7 @@ bool CEvent::DemoPlayStart() return true; } -// Fin de la reproduction d'une démo. +// Fin de la reproduction d'une démo. void CEvent::DemoPlayStop() { @@ -4551,14 +4551,14 @@ void CEvent::DemoStep() if ( m_phase == WM_PHASE_INIT ) { - if ( m_demoTime > DEF_TIME_DEMO ) // ~30 secondes écoulées ? + if ( m_demoTime > DEF_TIME_DEMO ) // ~30 secondes écoulées ? { m_demoNumber = 0; - DemoPlayStart(); // démarre une démo automatique + DemoPlayStart(); // démarre une démo automatique } } - if ( m_bDemoPlay && // démo en lecture ? + if ( m_bDemoPlay && // démo en lecture ? m_pDemoBuffer != nullptr ) { while ( true ) @@ -4583,11 +4583,11 @@ void CEvent::DemoStep() if ( m_demoIndex >= m_demoEnd ) { - m_demoNumber ++; // démo suivante - if ( !DemoPlayStart() ) // démarre la démo suivante + m_demoNumber ++; // démo suivante + if ( !DemoPlayStart() ) // démarre la démo suivante { - m_demoNumber = 0; // première démo - DemoPlayStart(); // démarre la démo + m_demoNumber = 0; // première démo + DemoPlayStart(); // démarre la démo } return; } @@ -4597,7 +4597,7 @@ void CEvent::DemoStep() m_demoTime ++; } -// Mémorise un événement. +// Mémorise un événement. void CEvent::DemoRecEvent(unsigned int message, WPARAM wParam, LPARAM lParam) { @@ -4635,14 +4635,14 @@ void CEvent::DemoRecEvent(unsigned int message, WPARAM wParam, LPARAM lParam) } -// Retourne la dernière position de la souris. +// Retourne la dernière position de la souris. POINT CEvent::GetLastMousePos() { return m_oldMousePos; } -// Traitement d'un événement. +// Traitement d'un événement. bool CEvent::TreatEvent(const SDL_Event &event) { @@ -4663,7 +4663,7 @@ bool CEvent::TreatEvent(const SDL_Event &event) return TreatEventBase(event); } -// Traitement d'un événement. +// Traitement d'un événement. bool CEvent::TreatEventBase(const SDL_Event &event) { @@ -4679,7 +4679,7 @@ bool CEvent::TreatEventBase(const SDL_Event &event) case SDL_KEYDOWN: if ( event.key.keysym.sym >= SDLK_a && event.key.keysym.sym <= SDLK_z ) { - if ( m_posCheat == 0 ) // première lettre ? + if ( m_posCheat == 0 ) // première lettre ? { m_rankCheat = -1; for ( i=0 ; i<9 ; i++ ) @@ -5085,7 +5085,7 @@ bool CEvent::TreatEventBase(const SDL_Event &event) case WM_PHASE_MISSION: m_bSchool = false; m_bPrivate = false; - if ( m_mission == 0 ) // première mission ? + if ( m_mission == 0 ) // première mission ? { if ( ChangePhase(WM_PHASE_H0MOVIE) ) return true; } @@ -5130,7 +5130,7 @@ bool CEvent::TreatEventBase(const SDL_Event &event) break; case WM_PHASE_UNDO: - m_pDecor->UndoBack(); // revient en arrière + m_pDecor->UndoBack(); // revient en arrière break; case WM_PREV: diff --git a/src/fifo.cpp b/src/fifo.cpp index 877b122..3d549b7 100644 --- a/src/fifo.cpp +++ b/src/fifo.cpp @@ -4,8 +4,8 @@ #include "fifo.h" -// gestion d'une pile classée en valeur croissantes -// typiquement reprend les coordonnées les plus proches +// gestion d'une pile classée en valeur croissantes +// typiquement reprend les coordonnées les plus proches // du but en premier lieu CPileTriee::CPileTriee(long taille) @@ -36,10 +36,10 @@ void CPileTriee::put(long pos, long dist) while (i!=m_max) { - // le point est-il plus proche que celui-là ? + // le point est-il plus proche que celui-là ? if (dist=m_taille) i=0; } - // ajoute le point éloigné à la suite + // ajoute le point éloigné à la suite m = m_max+1; if (m>=m_taille) m=0; if (m!=m_out) diff --git a/src/fifo.h b/src/fifo.h index f6fad3b..9cb703d 100644 --- a/src/fifo.h +++ b/src/fifo.h @@ -5,7 +5,7 @@ // stucture pour enpiler des positions -// en fonction de leur distance à la cible +// en fonction de leur distance à la cible typedef struct { long pos; @@ -14,7 +14,7 @@ typedef struct Element; -// traitement d'une pile triée +// traitement d'une pile triée class CPileTriee { @@ -22,7 +22,7 @@ private: long m_taille; // nombre de polongs max long m_max; // position limite long m_out; // position pour reprendre - Element* m_data; // données + Element* m_data; // données public: CPileTriee(long taille); diff --git a/src/fog.cpp b/src/fog.cpp index cc3c4f4..4b3c89b 100644 --- a/src/fog.cpp +++ b/src/fog.cpp @@ -3,7 +3,7 @@ #include "decor.h" // Cette table indique les quarts de cases contenant du -// brouillard lorsque la valeur est à un. +// brouillard lorsque la valeur est à un. // 0 1 // 2 3 static char tableFog[15*4] = @@ -44,7 +44,7 @@ bool GetFogBits(int icon, char *pBits) return true; } -// Retourne l'icône correspondant aux bits de brouillard. +// Retourne l'icône correspondant aux bits de brouillard. int GetFogIcon(char *pBits) { @@ -140,7 +140,7 @@ void CDecor::BlupiPushFog(int rank) for ( i=0 ; i<4 ; i++ ) { - nBits[i] &= cBits[i]; // "ou" visibilité + nBits[i] &= cBits[i]; // "ou" visibilité } m_decor[cel.x/2][cel.y/2].fog = GetFogIcon(nBits); diff --git a/src/jauge.cpp b/src/jauge.cpp index c28e462..c0d3536 100644 --- a/src/jauge.cpp +++ b/src/jauge.cpp @@ -31,7 +31,7 @@ CJauge::~CJauge() } -// Crée un nouveau bouton. +// Crée un nouveau bouton. bool CJauge::Create(CPixmap *pPixmap, CSound *pSound, POINT pos, int type, bool bMinimizeRedraw) @@ -50,7 +50,7 @@ bool CJauge::Create(CPixmap *pPixmap, CSound *pSound, return true; } -// Dessine un bouton dans son état. +// Dessine un bouton dans son état. void CJauge::Draw() { @@ -60,7 +60,7 @@ void CJauge::Draw() if ( m_bMinimizeRedraw && !m_bRedraw ) return; m_bRedraw = false; - if ( m_bHide ) // bouton caché ? + if ( m_bHide ) // bouton caché ? { rect.left = m_pos.x; rect.right = m_pos.x+m_dim.x; @@ -84,7 +84,7 @@ void CJauge::Draw() rect.right = 6+part; rect.top = DIMJAUGEY*m_type; rect.bottom = DIMJAUGEY*(m_type+1); - m_pPixmap->DrawPart(-1, CHJAUGE, m_pos, rect); // partie colorée + m_pPixmap->DrawPart(-1, CHJAUGE, m_pos, rect); // partie colorée } } diff --git a/src/jauge.h b/src/jauge.h index 0c38882..a4b6d78 100644 --- a/src/jauge.h +++ b/src/jauge.h @@ -32,13 +32,13 @@ protected: CPixmap* m_pPixmap; CDecor* m_pDecor; CSound* m_pSound; - bool m_bHide; // true si bouton caché + bool m_bHide; // true si bouton caché POINT m_pos; // coin sup/gauche POINT m_dim; // dimensions int m_type; int m_level; bool m_bMinimizeRedraw; - bool m_bRedraw; // true -> doit être redessiné + bool m_bRedraw; // true -> doit être redessiné }; ///////////////////////////////////////////////////////////////////////////// diff --git a/src/menu.cpp b/src/menu.cpp index c57c302..8e89c5e 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -37,7 +37,7 @@ static const short table_button_icon[] = 35, // build3 (laboratoire) 61, // build4 (mine) 59, // build5 (usine) - 101, // build6 (téléporteur) + 101, // build6 (téléporteur) 20, // mur 26, // palis 42, // abat n @@ -138,7 +138,7 @@ CMenu::~CMenu() } -// Crée un nouveau bouton. +// Crée un nouveau bouton. bool CMenu::Create(CPixmap *pPixmap, CSound *pSound, POINT pos, int nb, int *pButtons, int *pErrors, @@ -175,7 +175,7 @@ bool CMenu::Create(CPixmap *pPixmap, CSound *pSound, return true; } -// Met à jour le menu. +// Met à jour le menu. void CMenu::Update(int nb, int *pButtons, int *pErrors, std::unordered_map &texts) @@ -200,7 +200,7 @@ void CMenu::Update(int nb, int *pButtons, int *pErrors, m_texts = texts; } -// Détruit le menu. +// Détruit le menu. void CMenu::Delete() { @@ -208,7 +208,7 @@ void CMenu::Delete() m_selRank = -1; } -// Dessine un bouton dans son état. +// Dessine un bouton dans son état. void CMenu::Draw() { @@ -246,7 +246,7 @@ void CMenu::Draw() if ( m_perso == 8 ) // disciple ? { if ( icon == 30 ) icon = 88; // prend - if ( icon == 31 ) icon = 89; // dépose + if ( icon == 31 ) icon = 89; // dépose } m_pPixmap->DrawIcon(-1, CHBUTTON, icon+6, pos); } @@ -282,7 +282,7 @@ void CMenu::Draw() { // if ( bLeft ) // { - pos.x = m_pos.x-4-GetTextWidth(text); // texte à gauche + pos.x = m_pos.x-4-GetTextWidth(text); // texte à gauche // } // else // { @@ -293,7 +293,7 @@ void CMenu::Draw() { // if ( bRight ) // { - pos.x = m_pos.x+m_dim.x+4; // texte à droite + pos.x = m_pos.x+m_dim.x+4; // texte à droite // } // else // { @@ -321,7 +321,7 @@ void CMenu::Draw() { // if ( bLeft ) // { - pos.x = m_pos.x-4-GetTextWidth(text); // texte à gauche + pos.x = m_pos.x-4-GetTextWidth(text); // texte à gauche // } // else // { @@ -332,7 +332,7 @@ void CMenu::Draw() { // if ( bRight ) // { - pos.x = m_pos.x+m_dim.x+4; // texte à droite + pos.x = m_pos.x+m_dim.x+4; // texte à droite // } // else // { @@ -355,7 +355,7 @@ void CMenu::Draw() m_pPixmap->SetClipping(oldClip); } -// Retourne le bouton sélectionné. +// Retourne le bouton sélectionné. int CMenu::GetSel() { @@ -364,14 +364,14 @@ int CMenu::GetSel() return m_buttons[m_selRank]; } -// Retourne le rang sélectionné. +// Retourne le rang sélectionné. int CMenu::GetRank() { return m_selRank; } -// Retourne true si le bouton sélectionné a une erreur. +// Retourne true si le bouton sélectionné a une erreur. bool CMenu::IsError() { @@ -392,7 +392,7 @@ bool CMenu::IsExist() } -// Traitement d'un événement. +// Traitement d'un événement. bool CMenu::TreatEvent(const SDL_Event &event) { @@ -434,7 +434,7 @@ bool CMenu::TreatEvent(const SDL_Event &event) return false; } -// Détecte dans quel bouton est la souris. +// Détecte dans quel bouton est la souris. int CMenu::Detect(POINT pos) { @@ -450,14 +450,14 @@ int CMenu::Detect(POINT pos) return rank; } -// Bouton de la souris pressé. +// Bouton de la souris pressé. bool CMenu::MouseDown(POINT pos) { return false; } -// Souris déplacés. +// Souris déplacés. bool CMenu::MouseMove(POINT pos) { @@ -468,13 +468,13 @@ bool CMenu::MouseMove(POINT pos) pos.y < m_pos.y-(DIMBUTTONY+MARGMENU) || pos.y > m_pos.y+m_dim.y+(DIMBUTTONY+MARGMENU) ) { - Delete(); // enlève le menu si souris trop loin ! + Delete(); // enlève le menu si souris trop loin ! } return false; } -// Bouton de la souris relâché. +// Bouton de la souris relâché. bool CMenu::MouseUp(POINT pos) { diff --git a/src/misc.cpp b/src/misc.cpp index 23cb809..a25e822 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -50,14 +50,14 @@ POINT ConvLongToPos(LPARAM lParam) } -// R�initialise le g�n�rateur al�atoire. +// R�initialise le g�n�rateur al�atoire. void InitRandom() { srand(1); } -// Retourne un nombre al�atoire compris entre +// Retourne un nombre al�atoire compris entre // deux bornes (inclues). int Random(int min, int max) diff --git a/src/movie.cpp b/src/movie.cpp index e64bbde..86247c0 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -183,7 +183,7 @@ bool CMovie::Create() } } -// Retourne l'état de DirectMovie. +// Retourne l'état de DirectMovie. bool CMovie::GetEnable() { diff --git a/src/obstacle.cpp b/src/obstacle.cpp index 07cbf81..5a7619c 100644 --- a/src/obstacle.cpp +++ b/src/obstacle.cpp @@ -562,7 +562,7 @@ static char tableObstacleObject[] = 1,1,1,1,1, 0,1,1,1,1, - 0,1,1,1,0, // 12 (fusée) + 0,1,1,1,0, // 12 (fusée) 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, @@ -574,7 +574,7 @@ static char tableObstacleObject[] = 0,0,0,0,0, 0,0,0,0,0, - 0,0,0,0,0, // 14 (métal) + 0,0,0,0,0, // 14 (métal) 0,0,0,0,0, 0,0,1,1,1, 0,0,1,1,1, @@ -604,7 +604,7 @@ static char tableObstacleObject[] = 1,0,0,0,0, 1,1,1,1,1, - 0,0,0,0,0, // 19 (électro piégé) + 0,0,0,0,0, // 19 (électro piégé) 0,0,0,0,0, 0,0,1,1,1, 0,0,1,1,1, @@ -1053,7 +1053,7 @@ static char tableObstacleObject[] = 0,0,1,1,1, 0,0,1,1,1, - 0,0,0,0,0, // 93 (piège) + 0,0,0,0,0, // 93 (piège) 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, @@ -1071,19 +1071,19 @@ static char tableObstacleObject[] = 0,0,1,1,1, 0,0,1,1,1, - 0,0,0,0,0, // 96 (araignée dans piège) + 0,0,0,0,0, // 96 (araignée dans piège) 0,0,0,0,0, 0,0,1,1,1, 0,0,1,1,1, 0,0,1,1,1, - 0,0,0,0,0, // 97 (tracks dans piège) + 0,0,0,0,0, // 97 (tracks dans piège) 0,0,0,0,0, 0,0,1,1,1, 0,0,1,1,1, 0,0,1,1,1, - 0,0,0,0,0, // 98 (robot dans piège) + 0,0,0,0,0, // 98 (robot dans piège) 0,0,0,0,0, 0,0,1,1,1, 0,0,1,1,1, @@ -1131,7 +1131,7 @@ static char tableObstacleObject[] = 1,0,0,0,0, 1,1,1,1,1, - 1,1,1,1,1, // 106 (barrière) + 1,1,1,1,1, // 106 (barrière) 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, @@ -1179,7 +1179,7 @@ static char tableObstacleObject[] = 1,1,1,0,0, 1,1,1,1,1, - 0,0,0,0,0, // 114 (bombe dans piège) + 0,0,0,0,0, // 114 (bombe dans piège) 0,0,0,0,0, 0,0,1,1,1, 0,0,1,1,1, @@ -1251,7 +1251,7 @@ static char tableObstacleObject[] = 0,0,1,1,1, 0,0,1,1,1, - 0,0,0,0,0, // 126 (mine de fer, échaffaudage) + 0,0,0,0,0, // 126 (mine de fer, échaffaudage) 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, @@ -1404,12 +1404,12 @@ void CDecor::AjustFloor(int rank, int icon, POINT cel, int *pBits) lock: for ( i=0 ; i<9 ; i++ ) { - *pBits++ = 1; // bloqué + *pBits++ = 1; // bloqué } return; } -// (*) Blupi est passe muraille lorsqu'il embarque ou débarque +// (*) Blupi est passe muraille lorsqu'il embarque ou débarque // du bateau. Dans ce cas, tous les sols (rivages) doivent // permettre de passer. En revanche, pas les obstacles ! @@ -1423,7 +1423,7 @@ void CDecor::AjustObject(int rank, int icon, POINT cel, int *pBits) if ( m_blupi[rank].perso == 0 ) // blupi ? { - if ( m_blupi[rank].vehicule != 0 && // pas à pied ? + if ( m_blupi[rank].vehicule != 0 && // pas à pied ? cel.x%2 == 1 && cel.y%2 == 1 && m_decor[cel.x/2][cel.y/2].objectIcon == 117 ) // bateau ? { @@ -1455,12 +1455,12 @@ void CDecor::AjustObject(int rank, int icon, POINT cel, int *pBits) return; } - if ( m_blupi[rank].perso == 1 ) // araignée ? + if ( m_blupi[rank].perso == 1 ) // araignée ? { // if ( cel.x%2 != 0 && cel.y%2 != 0 && if ( IsSpiderObject(icon) ) // tomate ou poison ? { - goto pass; // l'araignée peut aller dans les tomates + goto pass; // l'araignée peut aller dans les tomates } return; } @@ -1469,8 +1469,8 @@ void CDecor::AjustObject(int rank, int icon, POINT cel, int *pBits) { if ( icon == 81 || icon == 83 || - icon == 94 || // fleurs non-coupées ? - (icon >= 106 && icon <= 112) ) // barrières ennemies ? + icon == 94 || // fleurs non-coupées ? + (icon >= 106 && icon <= 112) ) // barrières ennemies ? { goto pass; // le virus peut aller } @@ -1495,7 +1495,7 @@ void CDecor::AjustObject(int rank, int icon, POINT cel, int *pBits) if ( m_blupi[rank].perso == 4 ) // robot ? { - if ( IsRobotObject(icon) ) // piège ou dynamite ? + if ( IsRobotObject(icon) ) // piège ou dynamite ? { goto pass; // le robot peut aller } @@ -1504,25 +1504,25 @@ void CDecor::AjustObject(int rank, int icon, POINT cel, int *pBits) if ( m_blupi[rank].perso == 5 ) // bombe ? { - if ( icon == 93 ) // piège ? + if ( icon == 93 ) // piège ? { goto pass; // la bombe peut aller } return; } - if ( m_blupi[rank].perso == 7 ) // électro ? + if ( m_blupi[rank].perso == 7 ) // électro ? { - if ( icon == 93 ) // piège ? + if ( icon == 93 ) // piège ? { - goto pass; // l'électro peut aller + goto pass; // l'électro peut aller } if ( icon == 113 || // maison ? icon == 28 || icon == 29 || // laboratoire ? icon == 119 || icon == 120 || // usine ? icon == 121 || icon == 122 ) // mine de fer ? { - goto lock; // l'électro ne peut pas aller dans la maison + goto lock; // l'électro ne peut pas aller dans la maison } return; } @@ -1560,7 +1560,7 @@ void CDecor::AjustObject(int rank, int icon, POINT cel, int *pBits) lock: for ( i=0 ; i<9 ; i++ ) { - *pBits++ = 1; // bloqué + *pBits++ = 1; // bloqué } return; } @@ -1580,7 +1580,7 @@ void Copy33To99(int *pSrc33, int *pDst99, int dx, int dy) } } -// Indique s'il est possible d'avancer dans une direction donnée. +// Indique s'il est possible d'avancer dans une direction donnée. bool CDecor::IsFreeDirect(POINT cel, int direct, int rank) { @@ -1596,14 +1596,14 @@ bool CDecor::IsFreeDirect(POINT cel, int direct, int rank) if ( m_decor[test.x/2][test.y/2].fire > 0 && m_decor[test.x/2][test.y/2].fire < MoveMaxFire() ) return false; - // Cellule bloquée (un blupi travaille ici) ? + // Cellule bloquée (un blupi travaille ici) ? if ( m_blupi[rank].perso != 3 ) // pas tracks ? { workBlupi = m_decor[test.x/2][test.y/2].workBlupi; if ( workBlupi >= 0 && workBlupi != rank ) return false; } - // Déplacement possible par-rapport au sol ? + // Déplacement possible par-rapport au sol ? // icon = m_decor[cel.x/2][cel.y/2].floorIcon; // SearchFloor(rank, icon, cel, bits); // AjustFloor(rank, icon, cel, bits); @@ -1615,7 +1615,7 @@ bool CDecor::IsFreeDirect(POINT cel, int direct, int rank) if ( bits[1+1*3] == 1 ) return false; if ( bits[(1-vector.x)+(1-vector.y)*3] == 1 ) return false; - // Déplacement possible par-rapport aux obstacles ? + // Déplacement possible par-rapport aux obstacles ? icon = m_decor[cel.x/2][cel.y/2].objectIcon; SearchObject(rank, icon, cel, bits); AjustObject(rank, icon, cel, bits); @@ -1627,7 +1627,7 @@ bool CDecor::IsFreeDirect(POINT cel, int direct, int rank) if ( bits[(1-vector.x)+(1-vector.y)*3] == 1 ) return false; if ( bits[1+1*3] == 1 ) return false; - if ( vector.x != 0 && vector.y != 0 ) // déplacement diagonal ? + if ( vector.x != 0 && vector.y != 0 ) // déplacement diagonal ? { test.x = cel.x; test.y = cel.y+vector.y; @@ -1651,7 +1651,7 @@ bool CDecor::IsFreeDirect(POINT cel, int direct, int rank) } // Indique si une cellule contient un objet. -// Est utilisé lors du dessin (BuildPutBlupi), pour savoir +// Est utilisé lors du dessin (BuildPutBlupi), pour savoir // si blupi est devant un objet. bool CDecor::IsFreeCelObstacle(POINT cel) @@ -1675,7 +1675,7 @@ bool CDecor::IsFreeCelObstacle(POINT cel) } // Indique si une cellule contient un sol. -// Est utilisé pour savoir si blupi peut aller sur une cellule +// Est utilisé pour savoir si blupi peut aller sur une cellule // en tenant compte uniquement des sols. // Retourne true si blupi peut y aller ! @@ -1698,8 +1698,8 @@ bool CDecor::IsFreeCelFloor(POINT cel, int rank) } // Indique si une cellule est libre. -// Est utilisé pour savoir si blupi peut venir ici -// débarquer en bateau ou monter dans sa jeep. +// Est utilisé pour savoir si blupi peut venir ici +// débarquer en bateau ou monter dans sa jeep. bool CDecor::IsFreeCelGo(POINT cel, int rank) { @@ -1739,7 +1739,7 @@ bool CDecor::IsFreeCelGo(POINT cel, int rank) if ( bOK ) return true; if ( !m_blupi[rank].bMalade && - m_blupi[rank].vehicule == 0 && // à pied ? + m_blupi[rank].vehicule == 0 && // à pied ? m_blupi[rank].perso != 8 && // pas le disciple ? channel == CHOBJECT && icon == 118 ) // jeep ? @@ -1748,7 +1748,7 @@ bool CDecor::IsFreeCelGo(POINT cel, int rank) } if ( !m_blupi[rank].bMalade && - m_blupi[rank].vehicule == 0 && // à pied ? + m_blupi[rank].vehicule == 0 && // à pied ? m_blupi[rank].perso != 8 && // pas le disciple ? m_blupi[rank].energy > MAXENERGY/4 && // fort ? m_blupi[rank].takeChannel == -1 && // porte rien ? @@ -1762,8 +1762,8 @@ bool CDecor::IsFreeCelGo(POINT cel, int rank) } // Indique si on peut faire qq chose sur une cellule. -// Est utilisé pour savoir comment est la mise en évidence (hili) -// à cet endroit. +// Est utilisé pour savoir comment est la mise en évidence (hili) +// à cet endroit. bool CDecor::IsFreeCelHili(POINT cel, int rank) { @@ -1780,9 +1780,9 @@ bool CDecor::IsFreeCelHili(POINT cel, int rank) icon = m_decor[cel.x/2][cel.y/2].objectIcon; if ( channel == CHOBJECT && - (icon == 12 || // fusée ? + (icon == 12 || // fusée ? (icon >= 20 && icon <= 26) || // mur ? - (icon >= 106 && icon <= 112) || // barrière ? + (icon >= 106 && icon <= 112) || // barrière ? (icon >= 99 && icon <= 105) || // batiment ennemi ? (icon >= 115 && icon <= 116) || // idem ? (icon >= 17 && icon <= 18)) ) // idem ? @@ -1806,7 +1806,7 @@ bool CDecor::IsFreeCelHili(POINT cel, int rank) } // Indique si une cellule est libre. -// Est utilisé pour savoir si blupi peut venir ici. +// Est utilisé pour savoir si blupi peut venir ici. bool CDecor::IsFreeCel(POINT cel, int rank) { @@ -1818,7 +1818,7 @@ bool CDecor::IsFreeCel(POINT cel, int rank) if ( m_decor[cel.x/2][cel.y/2].fire > 0 && m_decor[cel.x/2][cel.y/2].fire < MoveMaxFire() ) return false; - // Cellule bloquée (un blupi travaille ici) ? + // Cellule bloquée (un blupi travaille ici) ? if ( rank != -1 && m_blupi[rank].perso != 3 ) // pas tracks ? { workBlupi = m_decor[cel.x/2][cel.y/2].workBlupi; @@ -1838,7 +1838,7 @@ bool CDecor::IsFreeCel(POINT cel, int rank) return true; // pas d'obstacle } -// Indique si blupi peut déposer un objet ici. +// Indique si blupi peut déposer un objet ici. bool CDecor::IsFreeCelDepose(POINT cel, int rank) { @@ -1847,14 +1847,14 @@ bool CDecor::IsFreeCelDepose(POINT cel, int rank) if ( !IsFreeCel(cel, rank) ) return false; icon = m_decor[cel.x/2][cel.y/2].objectIcon; - if ( icon == 10000 || icon == 10001 || // éclairs entre tours ? + if ( icon == 10000 || icon == 10001 || // éclairs entre tours ? icon == 18 ) // dalle glissante ? { return false; } icon = m_decor[cel.x/2][cel.y/2].floorIcon; - if ( icon == 80 ) // téléporteur ? + if ( icon == 80 ) // téléporteur ? { return false; } @@ -1863,7 +1863,7 @@ bool CDecor::IsFreeCelDepose(POINT cel, int rank) } // Indique s'il est possible d'embarquer ici. -// Le point retourné dans "limit" indique jusqu'où il est +// Le point retourné dans "limit" indique jusqu'où il est // possible de marcher normalement (sans passe muraille). bool CDecor::IsFreeCelEmbarque(POINT cel, int rank, @@ -1872,12 +1872,12 @@ bool CDecor::IsFreeCelEmbarque(POINT cel, int rank, bool bOK; int channel, icon; - // Impossible si blupi n'est pas à pied, + // Impossible si blupi n'est pas à pied, // ou s'il s'agit d'un disciple. if ( rank == -1 || m_blupi[rank].vehicule != 0 || m_blupi[rank].perso == 8 ) return false; - // A-t-on cliqué sur un bateau ? + // A-t-on cliqué sur un bateau ? if ( cel.x%2 != 1 || cel.y%2 != 1 ) return false; GetObject(cel, channel, icon); if ( channel != CHOBJECT || icon != 117 ) return false; @@ -1941,8 +1941,8 @@ bool CDecor::IsFreeCelEmbarque(POINT cel, int rank, return false; } -// Indique s'il est possible de débarquer ici. -// Le point retourné dans "limit" indique jusqu'où il est +// Indique s'il est possible de débarquer ici. +// Le point retourné dans "limit" indique jusqu'où il est // possible de naviguer normalement (sans passe muraille). bool CDecor::IsFreeCelDebarque(POINT cel, int rank, @@ -1956,14 +1956,14 @@ bool CDecor::IsFreeCelDebarque(POINT cel, int rank, if ( rank == -1 || m_blupi[rank].vehicule != 1 ) return false; m_blupi[rank].vehicule = 0; - bOK = IsFreeCel(cel, rank); // libre (à pied) ? + bOK = IsFreeCel(cel, rank); // libre (à pied) ? m_blupi[rank].vehicule = 1; if ( !bOK ) return false; GetFloor(GetCel(cel,+2,0), channel1, icon1); GetObject(GetCel(cel,+2,0), channel2, icon2); if ( channel1 == CHFLOOR && icon1 == 2 && // rive ? - channel2 == -1 && icon2 == -1 && // pas de bateau amarré ? + channel2 == -1 && icon2 == -1 && // pas de bateau amarré ? cel.x%2 == 1 && cel.y%2 == 1 ) { limit = GetCel(cel,+3,0); @@ -1974,7 +1974,7 @@ bool CDecor::IsFreeCelDebarque(POINT cel, int rank, GetFloor(GetCel(cel,0,+2), channel1, icon1); GetObject(GetCel(cel,0,+2), channel2, icon2); if ( channel1 == CHFLOOR && icon1 == 3 && // rive ? - channel2 == -1 && icon2 == -1 && // pas de bateau amarré ? + channel2 == -1 && icon2 == -1 && // pas de bateau amarré ? cel.x%2 == 1 && cel.y%2 == 1 ) { limit = GetCel(cel,0,+3); @@ -1985,7 +1985,7 @@ bool CDecor::IsFreeCelDebarque(POINT cel, int rank, GetFloor(GetCel(cel,-2,0), channel1, icon1); GetObject(GetCel(cel,-2,0), channel2, icon2); if ( channel1 == CHFLOOR && icon1 == 4 && // rive ? - channel2 == -1 && icon2 == -1 && // pas de bateau amarré ? + channel2 == -1 && icon2 == -1 && // pas de bateau amarré ? cel.x%2 == 0 && cel.y%2 == 1 ) { limit = GetCel(cel,-2,0); @@ -1996,7 +1996,7 @@ bool CDecor::IsFreeCelDebarque(POINT cel, int rank, GetFloor(GetCel(cel,0,-2), channel1, icon1); GetObject(GetCel(cel,0,-2), channel2, icon2); if ( channel1 == CHFLOOR && icon1 == 5 && // rive ? - channel2 == -1 && icon2 == -1 && // pas de bateau amarré ? + channel2 == -1 && icon2 == -1 && // pas de bateau amarré ? cel.x%2 == 1 && cel.y%2 == 0 ) { limit = GetCel(cel,0,-2); @@ -2015,13 +2015,13 @@ bool CDecor::IsFreeJump(POINT cel, int direct, int rank, int &action) int i, icon; int bits[3*3]; - // Refuse de sauter si blupi n'est pas à pied ! + // Refuse de sauter si blupi n'est pas à pied ! if ( m_blupi[rank].vehicule != 0 ) return false; // Refuse de sauter dans les directions se, so, no, ne. if ( (direct/16)%2 != 0 ) return false; - // Refuse de sauter si peu d'énergie ou si porte qq chose. + // Refuse de sauter si peu d'énergie ou si porte qq chose. if ( m_blupi[rank].perso != 0 || m_blupi[rank].energy <= MAXENERGY/4 || m_blupi[rank].takeChannel != -1 ) return false; @@ -2041,13 +2041,13 @@ bool CDecor::IsFreeJump(POINT cel, int direct, int rank, int &action) } if ( i == 0 ) return false; - // Départ possible par-rapport aux obstacles ? + // Départ possible par-rapport aux obstacles ? icon = m_decor[depart.x/2][depart.y/2].objectIcon; SearchObject(rank, icon, depart, bits); AjustObject(rank, icon, depart, bits); if ( bits[(1+vector.x)+(1+vector.y)*3] == 1 ) return false; - // Arrivée possible par-rapport aux obstacles ? + // Arrivée possible par-rapport aux obstacles ? icon = m_decor[cel.x/2][cel.y/2].objectIcon; SearchObject(rank, icon, cel, bits); AjustObject(rank, icon, cel, bits); @@ -2083,7 +2083,7 @@ bool CDecor::IsFreeGlisse(POINT cel, int direct, int rank, int &action) // Cherche la meilleure direction pour atteindre un but. -// Retourne -1 si on est déjà sur le but. +// Retourne -1 si on est déjà sur le but. int CDecor::DirectSearch(POINT cel, POINT goal) { @@ -2120,7 +2120,7 @@ int CDecor::DirectSearch(POINT cel, POINT goal) } #endif - // Cherche le huitième de cadrant correspondant à + // Cherche le huitième de cadrant correspondant à // la direction. // 41 = 100*tan(22.5) // 241 = 100*tan(67.5) @@ -2169,7 +2169,7 @@ int CDecor::DirectSearch(POINT cel, POINT goal) } -// Vide les positions déjà essayées. +// Vide les positions déjà essayées. void CDecor::FlushUsed(int rank) { @@ -2177,16 +2177,16 @@ void CDecor::FlushUsed(int rank) m_blupi[rank].nextRankUsed = 0; } -// Ajoute une position déjà été essayée. +// Ajoute une position déjà été essayée. void CDecor::AddUsedPos(int rank, POINT pos) { int i, j, old; - // Un virus est bête. + // Un virus est bête. if ( m_blupi[rank].perso == 2 ) return; - // Déjà dans la liste ? + // Déjà dans la liste ? for ( i=0 ; i 0 ) { @@ -2363,20 +2363,20 @@ bool CDecor::SearchBestPass(int rank, int &action) } return false; } - if ( CheminCherche(rank, action) ) // recherche futée selon DD ... + if ( CheminCherche(rank, action) ) // recherche futée selon DD ... { return true; } else { - // Si la destination est occupée pendant une répétition, - // il faut attendre à l'infini ! + // Si la destination est occupée pendant une répétition, + // il faut attendre à l'infini ! if ( m_blupi[rank].repeatLevel != -1 && IsBlupiHereEx(m_blupi[rank].goalCel, rank, false) ) { m_blupi[rank].busyCount ++; } - m_blupi[rank].busyDelay = Random(8,12); // délai avant réessai + m_blupi[rank].busyDelay = Random(8,12); // délai avant réessai return false; } } @@ -2404,8 +2404,8 @@ bool CDecor::SearchBestPass(int rank, int &action) m_blupi[rank].cel = cel; lCel = cel; - // Est-on revenu juste à côté de la position - // de départ ? Si oui, simplifie le mouvement. + // Est-on revenu juste à côté de la position + // de départ ? Si oui, simplifie le mouvement. if ( i > 1 && abs(m_blupi[rank].cel.x-iCel.x) <= 1 && abs(m_blupi[rank].cel.y-iCel.y) <= 1 ) @@ -2450,9 +2450,9 @@ bool CDecor::SearchBestPass(int rank, int &action) } -// Vérifie si un objet est utilisable pour travailler dessus. +// Vérifie si un objet est utilisable pour travailler dessus. // Le sol doit permettre d'aller aux 4 coins, et il ne doit -// pas y avoir un autre blupi que soi-même. +// pas y avoir un autre blupi que soi-même. bool CDecor::IsWorkableObject(POINT cel, int rank) { @@ -2621,7 +2621,7 @@ bool CDecor::SearchOtherDrapeau(int rank, POINT initCel, int distMax, if ( m_decor[x/2][y/2].objectIcon == -1 && ((icon >= 33 && icon <= 48) || // terre ? icon == 71 ) && - !TestDrapeau(GetCel(x,y)) ) // pas encore sondé ? + !TestDrapeau(GetCel(x,y)) ) // pas encore sondé ? { cel.x = x; cel.y = y; @@ -2644,7 +2644,7 @@ bool CDecor::SearchOtherDrapeau(int rank, POINT initCel, int distMax, return true; } -// Cherche un autre sol permettant de déposer du bois +// Cherche un autre sol permettant de déposer du bois // pour construire un bateau. bool CDecor::SearchOtherBateau(int rank, POINT initCel, int distMax, @@ -2686,16 +2686,16 @@ bool CDecor::SearchOtherBateau(int rank, POINT initCel, int distMax, } -// Vérifie si l'objet peut être détruit par l'araignée. +// Vérifie si l'objet peut être détruit par l'araignée. bool CDecor::IsSpiderObject(int icon) { return ( icon == 60 || // tomates ? icon == 92 || // poison ? - icon == 93 ); // piège ? + icon == 93 ); // piège ? } -// Cherche un autre objet pour l'araignée. +// Cherche un autre objet pour l'araignée. bool CDecor::SearchSpiderObject(int rank, POINT initCel, int distMax, POINT &foundCel, int &foundIcon) @@ -2727,8 +2727,8 @@ bool CDecor::SearchSpiderObject(int rank, POINT initCel, int distMax, dist = abs(initCel.x-x) + abs(initCel.y-y); - if ( m_decor[x/2][y/2].objectIcon == 93 && //piège ? - dist > 4 ) continue; // si piège loin -> ignore + if ( m_decor[x/2][y/2].objectIcon == 93 && //piège ? + dist > 4 ) continue; // si piège loin -> ignore if ( dist <= min ) { @@ -2747,7 +2747,7 @@ bool CDecor::SearchSpiderObject(int rank, POINT initCel, int distMax, } -// Vérifie si l'objet peut être détruit par le tracks. +// Vérifie si l'objet peut être détruit par le tracks. bool CDecor::IsTracksObject(int icon) { @@ -2758,8 +2758,8 @@ bool CDecor::IsTracksObject(int icon) icon == 80 || // bouteille ? icon == 85 || // dynamite ? icon == 92 || // poison ? - icon == 93 || // piège ? - icon == 123 || // piège ? + icon == 93 || // piège ? + icon == 123 || // piège ? icon == 125 || // mine ? icon == 127 || // mine ? (icon >= 81 && icon <= 84) || // fleurs ? @@ -2809,12 +2809,12 @@ bool CDecor::SearchTracksObject(int rank, POINT initCel, int distMax, } } - // Le tracks peut écraser blupi. + // Le tracks peut écraser blupi. for ( rank=0 ; rank MAXBLUPI-10 ) return false; // rien si trop peuplé ! - // Cherche l'ennemi le moins répandu. + if ( nb > MAXBLUPI-10 ) return false; // rien si trop peuplé ! + // Cherche l'ennemi le moins répandu. min = 999; index = 0; for ( i=0 ; i<5 ; i++ ) @@ -3047,12 +3047,12 @@ bool CDecor::SearchRobotObject(int rank, POINT initCel, int distMax, index = 0; // station de recharge } if ( m_skill >= 1 ) maxUsine *= 2; // 2 ennemis par batiment - if ( min >= maxUsine ) // assez peuplé ? + if ( min >= maxUsine ) // assez peuplé ? { index = 0; // station de recharge } - // Cherche l'usine pour fabriquer l'ennemi le moins rédandu. + // Cherche l'usine pour fabriquer l'ennemi le moins rédandu. //? search: min = distMax; for ( y=starty ; y 67) ) return false; @@ -3162,7 +3162,7 @@ bool CDecor::IsUsineBuild(int rank, POINT cel) } // Teste s'il est possible d'entrer dans une usine. -// L'usine doit être libre devant (lieu de stationnement +// L'usine doit être libre devant (lieu de stationnement // pour l'ennemi qui sera construit). bool CDecor::IsUsineFree(int rank, POINT cel) @@ -3171,7 +3171,7 @@ bool CDecor::IsUsineFree(int rank, POINT cel) GetObject(cel, channel, icon); - if ( channel == CHOBJECT && icon == 115 ) // usine à bombes ? + if ( channel == CHOBJECT && icon == 115 ) // usine à bombes ? { return ( !IsBlupiHereEx(GetCel(cel,0,1), rank, false) && !IsBlupiHereEx(GetCel(cel,1,1), rank, false) && @@ -3188,7 +3188,7 @@ bool CDecor::IsUsineFree(int rank, POINT cel) } -// Vérifie si l'objet peut être détruit par une bombe. +// Vérifie si l'objet peut être détruit par une bombe. bool CDecor::IsBombeObject(int icon) { @@ -3196,7 +3196,7 @@ bool CDecor::IsBombeObject(int icon) icon == 61 || // cabane ? icon == 121 || icon == 122 || // mine de fer ? (icon >= 65 && icon <= 71) || // palissade ? - icon == 93 || // piège ? + icon == 93 || // piège ? icon == 117 ); // bateau ? } @@ -3232,8 +3232,8 @@ bool CDecor::SearchBombeObject(int rank, POINT initCel, int distMax, dist = abs(initCel.x-x) + abs(initCel.y-y); - if ( m_decor[x/2][y/2].objectIcon == 93 && //piège ? - dist > 8 ) continue; // si piège loin -> ignore + if ( m_decor[x/2][y/2].objectIcon == 93 && //piège ? + dist > 8 ) continue; // si piège loin -> ignore if ( dist <= min ) { @@ -3251,7 +3251,7 @@ bool CDecor::SearchBombeObject(int rank, POINT initCel, int distMax, return true; } -// Cherche un autre objet pour un électro. +// Cherche un autre objet pour un électro. bool CDecor::SearchElectroObject(int rank, POINT initCel, int distMax, POINT &foundCel, int &foundIcon) @@ -3275,7 +3275,7 @@ bool CDecor::SearchElectroObject(int rank, POINT initCel, int distMax, { for ( x=startx ; x0 ; i-- ) { @@ -3606,7 +3606,7 @@ void CDecor::AddDrapeau(POINT cel) m_lastDrapeau[0] = cel; } -// Supprime une cellule visitée (ne contenant pas de fer). +// Supprime une cellule visitée (ne contenant pas de fer). void CDecor::SubDrapeau(POINT cel) { @@ -3623,7 +3623,7 @@ void CDecor::SubDrapeau(POINT cel) } } -// Teste si une cellule a déjà été visitée. +// Teste si une cellule a déjà été visitée. bool CDecor::TestDrapeau(POINT cel) { diff --git a/src/pixmap.cpp b/src/pixmap.cpp index d27c542..46bdaae 100644 --- a/src/pixmap.cpp +++ b/src/pixmap.cpp @@ -72,7 +72,7 @@ CPixmap::~CPixmap() } } -// Cr�e l'objet DirectDraw principal. +// Cr�e l'objet DirectDraw principal. // Retourne false en cas d'erreur. bool CPixmap::Create(POINT dim, @@ -90,7 +90,7 @@ bool CPixmap::Create(POINT dim, return true; } -// Lib�re les bitmaps. +// Lib�re les bitmaps. bool CPixmap::Flush() { @@ -101,7 +101,7 @@ bool CPixmap::Flush() void CPixmap::Fill(RECT rect, COLORREF color) { - // � faire si n�cessaire ... + // � faire si n�cessaire ... } // Effectue un appel BltFast. @@ -192,7 +192,7 @@ int CPixmap::BltFast(SDL_Texture *lpSDL, int channel, POINT dst, RECT rcRect) return res; } -// Cache une image contenant des ic�nes. +// Cache une image contenant des ic�nes. bool CPixmap::Cache(int channel, const char *pFilename, POINT totalDim, POINT iconDim) { @@ -284,14 +284,14 @@ bool CPixmap::Cache(int channel, SDL_Surface *surface, POINT totalDim) return true; } -// Modifie la r�gion de clipping. +// Modifie la r�gion de clipping. void CPixmap::SetClipping(RECT clip) { m_clipRect = clip; } -// Retourne la r�gion de clipping. +// Retourne la r�gion de clipping. RECT CPixmap::GetClipping() { @@ -299,7 +299,7 @@ RECT CPixmap::GetClipping() } -// Teste si un point fait partie d'une ic�ne. +// Teste si un point fait partie d'une ic�ne. bool CPixmap::IsIconPixel(int channel, int rank, POINT pos) { @@ -427,7 +427,7 @@ bool CPixmap::DrawIconPart(int chDst, int channel, int rank, POINT pos, return !BltFast (chDst, channel, pos, rect); } -// Dessine une partie d'image n'importe o�. +// Dessine une partie d'image n'importe o�. bool CPixmap::DrawPart(int chDst, int channel, POINT dest, RECT rect, bool bMask) { @@ -464,7 +464,7 @@ bool CPixmap::DrawImage(int chDst, int channel, RECT rect) } -// Construit une ic�ne en utilisant un masque. +// Construit une ic�ne en utilisant un masque. bool CPixmap::BuildIconMask(int channelMask, int rankMask, int channel, int rankSrc, int rankDst) @@ -514,7 +514,7 @@ bool CPixmap::BuildIconMask(int channelMask, int rankMask, } -// Affiche le pixmap � l'�cran. +// Affiche le pixmap � l'�cran. // Retourne false en cas d'erreur. bool CPixmap::Display() diff --git a/src/pixmap.h b/src/pixmap.h index a4c0d31..6b4e3d3 100644 --- a/src/pixmap.h +++ b/src/pixmap.h @@ -70,7 +70,7 @@ protected: char m_filename[MAXIMAGE][20]; POINT m_totalDim[MAXIMAGE]; // dimensions totale image - POINT m_iconDim[MAXIMAGE]; // dimensions d'une ic�ne + POINT m_iconDim[MAXIMAGE]; // dimensions d'une ic�ne }; ///////////////////////////////////////////////////////////////////////////// diff --git a/src/sound.cpp b/src/sound.cpp index 02fe535..84c14bc 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -84,7 +84,7 @@ bool CSound::Create() } -// Retourne l'�tat de DirectSound. +// Retourne l'�tat de DirectSound. bool CSound::GetEnable() { @@ -92,7 +92,7 @@ bool CSound::GetEnable() } -// Enclenche ou d�clenche le son. +// Enclenche ou d�clenche le son. void CSound::SetState(bool bState) { @@ -163,7 +163,7 @@ bool CSound::Cache(int channel, const char *pFilename) return true; } -// D�charge un son. +// D�charge un son. void CSound::Flush(int channel) { @@ -206,7 +206,7 @@ bool CSound::Play(int channel, int volume, Uint8 panLeft, Uint8 panRight) // Fait entendre un son dans une image. // Si rank != -1, il indique le rang du blupi dont il faudra -// �ventuellement stopper le dernier son en cours ! +// �ventuellement stopper le dernier son en cours ! bool CSound::PlayImage(int channel, POINT pos, int rank) { @@ -347,7 +347,7 @@ bool CSound::IsStoppedOnDemand () return m_bStopped; } -// Adapte le volume de la musique en cours, si n�cessaire. +// Adapte le volume de la musique en cours, si n�cessaire. void CSound::AdaptVolumeMusic() { @@ -358,7 +358,7 @@ void CSound::AdaptVolumeMusic() } } -// Indique le nombre de suspend � sauter. +// Indique le nombre de suspend � sauter. void CSound::SetSuspendSkip(int nb) { diff --git a/src/text.cpp b/src/text.cpp index 28b1da1..a031083 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -10,7 +10,7 @@ ///////////////////////////////////////////////////////////////////////////// -// Retourne l'offset pour un caractère donné. +// Retourne l'offset pour un caractère donné. int GetOffset(char c) { @@ -29,12 +29,12 @@ int GetOffset(char c) return 15+i; } } - if ( c<0 || c>128 ) return 1; // carré + if ( c<0 || c>128 ) return 1; // carré return c; } -// Retourne la longueur d'un caractère. +// Retourne la longueur d'un caractère. int GetCharWidth(char c, int font) { @@ -101,7 +101,7 @@ void DrawText(CPixmap *pPixmap, POINT pos, const char *pText, int font) } } -// Affiche un texte penché. +// Affiche un texte penché. void DrawTextPente(CPixmap *pPixmap, POINT pos, char *pText, int pente, int font) @@ -123,8 +123,8 @@ void DrawTextPente(CPixmap *pPixmap, POINT pos, char *pText, } } -// Affiche un pavé de texte. -// Une ligne vide est affichée avec un demi interligne ! +// Affiche un pavé de texte. +// Une ligne vide est affichée avec un demi interligne ! // Si part != -1, n'affiche que les lignes qui commencent // par "n|", avec n=part. @@ -175,13 +175,13 @@ void DrawTextRect(CPixmap *pPixmap, POINT pos, char *pText, } else { - pos.y += itl; // passe à la ligne suivante + pos.y += itl; // passe à la ligne suivante } } } -// Affiche un texte centré pouvant éventuellement -// contenir plusieurs lignes séparées par des '\n'. +// Affiche un texte centré pouvant éventuellement +// contenir plusieurs lignes séparées par des '\n'. void DrawTextCenter(CPixmap *pPixmap, POINT pos, const char *pText, int font) { @@ -215,7 +215,7 @@ void DrawTextCenter(CPixmap *pPixmap, POINT pos, const char *pText, int font) } else { - pos.y += itl; // passe à la ligne suivante + pos.y += itl; // passe à la ligne suivante } } } @@ -260,7 +260,7 @@ int GetTextHeight(char *pText, int font, int part) } else { - h += itl; // passe à la ligne suivante + h += itl; // passe à la ligne suivante } }