-
Notifications
You must be signed in to change notification settings - Fork 7
Update year and translate code tips #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,12 +30,12 @@ | |
| #include "utils.h" | ||
| #include "preference.h" | ||
|
|
||
| /*** Variable globales ***/ | ||
| /*** Global varibles ***/ | ||
| /*************************/ | ||
| extern sNewPreference Pref; | ||
| extern int Horloge; | ||
|
|
||
| /*** Constructeur et Destructeur ***/ | ||
| /*** Contructor and Destructor ***/ | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. constructor / destructor
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but for me, we can delete them |
||
| /***********************************/ | ||
| Audio::~Audio() | ||
| { | ||
|
|
@@ -51,7 +51,7 @@ Audio::~Audio() | |
| Mix_CloseAudio(); | ||
| } | ||
|
|
||
| /*** Initialise l'Audio ***/ | ||
| /*** Audio initialization***/ | ||
| /**************************/ | ||
| bool Audio::Init() | ||
| { | ||
|
|
@@ -62,11 +62,11 @@ bool Audio::Init() | |
| return false; | ||
| } | ||
|
|
||
| /*** Allocation de la mémoire ***/ | ||
| /*** Memory allocation ***/ | ||
| N = sFin; | ||
| Son = new Mix_Chunk *[sFin]; | ||
|
|
||
| /*** Chargement des sons ***/ | ||
| /*** Loading sounds ***/ | ||
| strcpy(PathFile, "Sounds/clic.wav"); | ||
| Utils::GetPath(PathFile); | ||
| Son[sClic] = Mix_LoadWAV(PathFile); | ||
|
|
@@ -110,7 +110,7 @@ bool Audio::Init() | |
| return true; | ||
| } | ||
|
|
||
| /*** Charge une music 0=menu 1,2,3,4 = game ***/ | ||
| /*** Load music 0=menu 1,2,3,4 = game ***/ | ||
| /**********************************************/ | ||
| void Audio::LoadMusic(int Num) | ||
| { | ||
|
|
@@ -124,12 +124,12 @@ void Audio::LoadMusic(int Num) | |
|
|
||
| if (Music) { | ||
| PauseMusic(true); | ||
| Mix_HaltMusic(); // Arrete la music | ||
| Mix_HaltMusic(); // Stop music | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not really useful, the function name is already comprehensive enough |
||
| Mix_FreeMusic(Music); | ||
| Music = nullptr; | ||
| } | ||
|
|
||
| if (Num == 0) { // Si music du menu | ||
| if (Num == 0) { // If music from the menu | ||
| strcpy(Provi, "Sounds/menu.mod"); | ||
| Utils::GetPath(Provi); | ||
| Music = Mix_LoadMUS(Provi); | ||
|
|
@@ -142,7 +142,7 @@ void Audio::LoadMusic(int Num) | |
| PlayMusic(); | ||
| } | ||
|
|
||
| /*** Passe à la music de jeu suivante ***/ | ||
| /*** Skip to the next game music ***/ | ||
| /****************************************/ | ||
| void Audio::NextMusic() | ||
| { | ||
|
|
@@ -153,7 +153,7 @@ void Audio::NextMusic() | |
| LoadMusic(NMus); | ||
| } | ||
|
|
||
| /*** Fait la lecture d'un son ***/ | ||
| /*** Plays a sound ***/ | ||
| /********************************/ | ||
| void Audio::Play(eSon So) | ||
| { | ||
|
|
@@ -171,7 +171,7 @@ void Audio::Play(eSon So) | |
| Mix_PlayChannel(-1, Son[So], 0); | ||
| } | ||
|
|
||
| /*** Joue la music ***/ | ||
| /*** Play music ***/ | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same, it's just repeating the method name |
||
| /*********************/ | ||
| void Audio::PlayMusic() const | ||
| { | ||
|
|
@@ -195,7 +195,7 @@ void Audio::PauseMusic(bool Et) const | |
| } | ||
| } | ||
|
|
||
| /*** Valide les Volumes ***/ | ||
| /*** Validates Volumes ***/ | ||
| /**************************/ | ||
| void Audio::DoVolume() const | ||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variables