From f427439b7eb07f060419527a667a716cecb38bde Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Thu, 10 Aug 2017 00:02:23 +0200 Subject: [PATCH] Cosmetic: rename more def --- src/action.cxx | 30 +++++++++++++++--------------- src/decblupi.cxx | 18 +++++++++--------- src/decmove.cxx | 2 +- src/def.h | 24 ++++++++++++------------ src/obstacle.cxx | 4 ++-- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/action.cxx b/src/action.cxx index c520982..e43b0c3 100644 --- a/src/action.cxx +++ b/src/action.cxx @@ -325,7 +325,7 @@ static const DescAction action_table[] = {10, 5, +600, 0, +1, +600, 0, +1, +600, 0, 0, +600, 0, -1, +600, 0, -1}, #endif }, - { 20, -1, -1, SOUND_BATEAU, -1, -1, -1, -1, -1, -1, -1, + { 20, -1, -1, SOUND_BOAT, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, }, @@ -438,7 +438,7 @@ static const DescAction action_table[] = }, }, { - ACTION_SAUTE2, + ACTION_JUMP2, CHBLUPI, { { 15, 106, 106, 106, 106, 106, 136, 136, 136, 136, 136, @@ -494,7 +494,7 @@ static const DescAction action_table[] = }, }, { - ACTION_SAUTE3, + ACTION_JUMP3, CHBLUPI, { { 20, 106, 106, 106, 106, 106, 136, 136, 136, 136, 136, @@ -555,7 +555,7 @@ static const DescAction action_table[] = }, }, { - ACTION_SAUTE4, + ACTION_JUMP4, CHBLUPI, { { 25, 106, 106, 106, 106, 106, 136, 136, 136, 136, 136, @@ -629,7 +629,7 @@ static const DescAction action_table[] = }, }, { - ACTION_SAUTE5, + ACTION_JUMP5, CHBLUPI, { { 30, 106, 106, 106, 106, 106, 136, 136, 136, 136, 136, @@ -711,7 +711,7 @@ static const DescAction action_table[] = }, }, { - ACTION_GLISSE, + ACTION_SLIDE, CHBLUPI, { {8, 48, 49, 50, 51, 52, 53, 54, 55}, // e @@ -1007,11 +1007,11 @@ static const DescAction action_table[] = {40, 1, 0, 0, 0}, // n {40, 1, 0, 0, 0}, // ne }, - { 40, -1, -1, -1, SOUND_SCIE, -1, -1, -1, -1, - -1, -1, -1, SOUND_SCIE, -1, -1, -1, -1, - -1, -1, -1, SOUND_SCIE, -1, -1, -1, -1, - -1, -1, -1, SOUND_SCIE, -1, -1, -1, -1, - -1, -1, -1, SOUND_SCIE, -1, -1, -1, -1 + { 40, -1, -1, -1, SOUND_SAW, -1, -1, -1, -1, + -1, -1, -1, SOUND_SAW, -1, -1, -1, -1, + -1, -1, -1, SOUND_SAW, -1, -1, -1, -1, + -1, -1, -1, SOUND_SAW, -1, -1, -1, -1, + -1, -1, -1, SOUND_SAW, -1, -1, -1, -1 }, }, { @@ -2912,13 +2912,13 @@ Sint32 GetAmplitude (Sint16 action) { switch (action) { - case ACTION_SAUTE2: + case ACTION_JUMP2: return 2; - case ACTION_SAUTE3: + case ACTION_JUMP3: return 3; - case ACTION_SAUTE4: + case ACTION_JUMP4: return 4; - case ACTION_SAUTE5: + case ACTION_JUMP5: return 5; } diff --git a/src/decblupi.cxx b/src/decblupi.cxx index ca7a7e2..3f6421e 100644 --- a/src/decblupi.cxx +++ b/src/decblupi.cxx @@ -467,10 +467,10 @@ void CDecor::BlupiSound (Sint32 rank, Sint32 sound, POINT pos, bool bStop) static const Sint16 tableSound[] = { ACTION_BURN, SOUND_BRULE, ACTION_TCHAO, SOUND_TCHAO, - ACTION_EAT, SOUND_MANGE, - ACTION_DRINK, SOUND_BOIT, - ACTION_GLISSE, SOUND_GLISSE, - ACTION_R_LOAD, SOUND_R_CHARGE, + ACTION_EAT, SOUND_EAT, + ACTION_DRINK, SOUND_DRINK, + ACTION_SLIDE, SOUND_SLIDE, + ACTION_R_LOAD, SOUND_R_LOAD, -1 }; // clang-format on @@ -616,10 +616,10 @@ void CDecor::BlupiInitAction (Sint32 rank, Sint32 action, Sint32 direct) m_blupi[rank].action == ACTION_DRINK || m_blupi[rank].action == ACTION_BORN || m_blupi[rank].action == ACTION_JUMPJEEP || - m_blupi[rank].action == ACTION_SAUTE2 || - m_blupi[rank].action == ACTION_SAUTE3 || - m_blupi[rank].action == ACTION_SAUTE4 || - m_blupi[rank].action == ACTION_SAUTE5 || + m_blupi[rank].action == ACTION_JUMP2 || + m_blupi[rank].action == ACTION_JUMP3 || + m_blupi[rank].action == ACTION_JUMP4 || + m_blupi[rank].action == ACTION_JUMP5 || //? m_blupi[rank].action == ACTION_GLISSE || m_blupi[rank].action == ACTION_BRIDGE || m_blupi[rank].action == ACTION_MECHE || @@ -2582,7 +2582,7 @@ bool CDecor::BlupiNextAction (Sint32 rank) a = 5; min = 1; } - if (m_blupi[rank].action == ACTION_GLISSE) + if (m_blupi[rank].action == ACTION_SLIDE) { if (m_bSuper) a = 0; diff --git a/src/decmove.cxx b/src/decmove.cxx index 8f56bc6..cb167cd 100644 --- a/src/decmove.cxx +++ b/src/decmove.cxx @@ -1145,7 +1145,7 @@ void CDecor::MoveFire (Sint32 rank) m_decor[x / 2][y / 2].fire++; pos = ConvCelToPos (GetCel (x, y)); - m_pSound->PlayImage (SOUND_FEU, pos); + m_pSound->PlayImage (SOUND_FIRE, pos); if (m_decor[x / 2][y / 2].objectIcon >= 0) // objet qui brule ? { diff --git a/src/def.h b/src/def.h index e5c24b9..ddba262 100644 --- a/src/def.h +++ b/src/def.h @@ -130,16 +130,16 @@ #define ACTION_TCHAO 12 // blupi disappeard ! #define ACTION_EAT 13 // blupi eats #define ACTION_BORN 14 // born -#define ACTION_SAUTE2 15 // saute par-dessus un obstacle -#define ACTION_SAUTE3 16 // saute par-dessus un obstacle -#define ACTION_SAUTE4 17 // saute par-dessus un obstacle -#define ACTION_SAUTE5 18 // saute par-dessus un obstacle +#define ACTION_JUMP2 15 // jump over an obstacle +#define ACTION_JUMP3 16 // jump over an obstacle +#define ACTION_JUMP4 17 // jump over an obstacle +#define ACTION_JUMP5 18 // jump over an obstacle #define ACTION_BRIDGE 19 // push a bridge #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_GLISSE 24 // glisse en marchant +#define ACTION_SLIDE 24 // slide when walking #define ACTION_DRINK 25 // blupi is drinking #define ACTION_LABO 26 // blupi travaille dans son laboratoire #define ACTION_DYNAMITE 27 // blupi fait péter la dynamite @@ -242,11 +242,11 @@ #define SOUND_COUPTOC 12 #define SOUND_SAUT 13 #define SOUND_HOP 14 -#define SOUND_SCIE 15 -#define SOUND_FEU 16 +#define SOUND_SAW 15 +#define SOUND_FIRE 16 #define SOUND_BRULE 17 #define SOUND_TCHAO 18 -#define SOUND_MANGE 19 +#define SOUND_EAT 19 #define SOUND_NAISSANCE 20 #define SOUND_A_SAUT 21 #define SOUND_A_HIHI 22 @@ -255,8 +255,8 @@ #define SOUND_RAYON1 25 #define SOUND_RAYON2 26 #define SOUND_VIRUS 27 -#define SOUND_GLISSE 28 -#define SOUND_BOIT 29 +#define SOUND_SLIDE 28 +#define SOUND_DRINK 29 #define SOUND_LABO 30 #define SOUND_DYNAMITE 31 #define SOUND_PORTE 32 @@ -269,9 +269,9 @@ #define SOUND_R_MOTEUR 39 #define SOUND_R_APLAT 40 #define SOUND_R_ROTATE 41 -#define SOUND_R_CHARGE 42 +#define SOUND_R_LOAD 42 #define SOUND_B_SAUT 43 -#define SOUND_BATEAU 44 +#define SOUND_BOAT 44 #define SOUND_JEEP 45 #define SOUND_MINE 46 #define SOUND_USINE 47 diff --git a/src/obstacle.cxx b/src/obstacle.cxx index 97382c8..af2d63a 100644 --- a/src/obstacle.cxx +++ b/src/obstacle.cxx @@ -2104,7 +2104,7 @@ bool CDecor::IsFreeJump (POINT cel, Sint32 direct, Sint32 rank, Sint32 & action) if (!IsFreeCel (cel, rank) || IsBlupiHere (cel, true)) return false; - action = ACTION_SAUTE2 + (i - 1); + action = ACTION_JUMP2 + (i - 1); return true; } @@ -2126,7 +2126,7 @@ bool CDecor::IsFreeGlisse ( if (!IsFreeDirect (cel, direct, rank)) return false; - action = ACTION_GLISSE; + action = ACTION_SLIDE; return true; }