Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit fb76586

Browse files
committed
Fixed comments
1 parent cdf9be0 commit fb76586

File tree

5 files changed

+67
-71
lines changed

5 files changed

+67
-71
lines changed

Constants.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ namespace RTE {
1717
#undef uint64_t
1818

1919
#pragma region Buffer Constants
20-
static constexpr unsigned int c_MaxFileName = 256; ///! Maximum length of output file directory+name string.
21-
static constexpr unsigned int c_FileBufferSize = 8192; ///! Buffer to hold data read from the zip file.
22-
static constexpr unsigned int c_MaxUnzippedFileSize = 104857600; ///! Maximum size of single file being extracted from zip archive.
20+
static constexpr unsigned int c_MaxFileName = 256; //! Maximum length of output file directory+name string.
21+
static constexpr unsigned int c_FileBufferSize = 8192; //! Buffer to hold data read from the zip file.
22+
static constexpr unsigned int c_MaxUnzippedFileSize = 104857600; //! Maximum size of single file being extracted from zip archive.
2323
#pragma endregion
2424

2525
#pragma region Graphics Constants
26-
static constexpr unsigned int c_PaletteEntriesNumber = 256; ///! Number of indexes in the graphics palette.
27-
static constexpr unsigned int c_MOIDLayerBitDepth = 16; ///! Bit depth of MOID layer bitmap.
26+
static constexpr unsigned int c_PaletteEntriesNumber = 256; //! Number of indexes in the graphics palette.
27+
static constexpr unsigned int c_MOIDLayerBitDepth = 16; //! Bit depth of MOID layer bitmap.
2828

29-
static constexpr unsigned int c_GoldMaterialID = 2; ///! Index of gold material in the material palette.
29+
static constexpr unsigned int c_GoldMaterialID = 2; //! Index of gold material in the material palette.
3030

3131
// GUI colors
3232
#define c_GUIColorWhite makecol(255, 255, 255)

Entities/Sound.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -210,17 +210,16 @@ namespace RTE {
210210

211211
protected:
212212

213-
static Entity::ClassInfo m_sClass; ///! ClassInfo for this class.
213+
static Entity::ClassInfo m_sClass; //! ClassInfo for this class.
214214

215-
// All the samples of this Sound, they are NOT owned by this, but owned by the ContentFile static maps
216-
std::vector<std::pair<ContentFile, AUDIO_STRUCT *> > m_Samples;
215+
std::vector<std::pair<ContentFile, AUDIO_STRUCT *> > m_Samples; //! All the samples of this Sound, they are NOT owned by this, but owned by the ContentFile static maps
217216

218-
int m_CurrentSample; ///! Index of the current (or last, if nothing is being played) sample being played
219-
int m_LastChannel; ///! Current channel the current Sample of this Sound is being played on.
220-
int m_Loops; ///! Number of loops (repeats) the sound should play when played. 0 means it plays once, -1 means it plays until stopped
221-
int m_Priority; ///! The mixing priority of this, the higher the more likely it's to be mixed and heard
222-
bool m_AffectedByPitch; ///! Whether this should be altered by pitch
223-
size_t m_Hash; ///! Sound file hash for network transmission.
217+
int m_CurrentSample; //! Index of the current (or last, if nothing is being played) sample being played
218+
int m_LastChannel; //! Current channel the current Sample of this Sound is being played on.
219+
int m_Loops; //! Number of loops (repeats) the sound should play when played. 0 means it plays once, -1 means it plays until stopped
220+
int m_Priority; //! The mixing priority of this, the higher the more likely it's to be mixed and heard
221+
bool m_AffectedByPitch; //! Whether this should be altered by pitch
222+
size_t m_Hash; //! Sound file hash for network transmission.
224223

225224
/// <summary>
226225
/// Clears all the member variables of this Sound, effectively resetting the members of this abstraction level only.

GUI/GUISound.h

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -217,44 +217,44 @@ namespace RTE {
217217

218218
protected:
219219

220-
Sound m_SplashSound; ///! Juicy logo signature jingle sound.
220+
Sound m_SplashSound; //! Juicy logo signature jingle sound.
221221

222-
Sound m_EnterMenuSound; ///! Sound for enabling menu.
223-
Sound m_ExitMenuSound; ///! Sound for disabling menu.
222+
Sound m_EnterMenuSound; //! Sound for enabling menu.
223+
Sound m_ExitMenuSound; //! Sound for disabling menu.
224224

225-
Sound m_FocusChangeSound; ///! Sound for changing focus.
225+
Sound m_FocusChangeSound; //! Sound for changing focus.
226226

227-
Sound m_SelectionChangeSound; ///! Sound for selecting items in list, etc.
228-
Sound m_ItemChangeSound; ///! Sound for adding or deleting items in list.
227+
Sound m_SelectionChangeSound; //! Sound for selecting items in list, etc.
228+
Sound m_ItemChangeSound; //! Sound for adding or deleting items in list.
229229

230-
Sound m_ButtonPressSound; ///! Sound for button press.
231-
Sound m_BackButtonPressSound; ///! Sound for button press of going back button.
232-
Sound m_ConfirmSound; ///! Sound for confirming a selection.
233-
Sound m_UserErrorSound; ///! Sound for erroneous input.
234-
Sound m_TestSound; ///! Sound for testing volume when adjusting volume sliders.
230+
Sound m_ButtonPressSound; //! Sound for button press.
231+
Sound m_BackButtonPressSound; //! Sound for button press of going back button.
232+
Sound m_ConfirmSound; //! Sound for confirming a selection.
233+
Sound m_UserErrorSound; //! Sound for erroneous input.
234+
Sound m_TestSound; //! Sound for testing volume when adjusting volume sliders.
235235

236-
Sound m_PieMenuEnterSound; ///! Sound for opening pie menu.
237-
Sound m_PieMenuExitSound; ///! Sound for closing pie menu.
236+
Sound m_PieMenuEnterSound; //! Sound for opening pie menu.
237+
Sound m_PieMenuExitSound; //! Sound for closing pie menu.
238238

239-
Sound m_HoverChangeSound; ///! Sound for when PieMenu hover arrow appears or changes slice.
240-
Sound m_HoverDisabledSound; ///! Sound for when PieMenu hover arrow appears or changes to a disabled slice.
241-
Sound m_SlicePickedSound; ///! Sound for picking a valid PieMenu slice.
242-
Sound m_DisabledPickedSound; ///! Sound for erroneous input in PieMenu.
239+
Sound m_HoverChangeSound; //! Sound for when PieMenu hover arrow appears or changes slice.
240+
Sound m_HoverDisabledSound; //! Sound for when PieMenu hover arrow appears or changes to a disabled slice.
241+
Sound m_SlicePickedSound; //! Sound for picking a valid PieMenu slice.
242+
Sound m_DisabledPickedSound; //! Sound for erroneous input in PieMenu.
243243

244-
Sound m_FundsChangedSound; ///! Sound for when the funds of a team changes.
244+
Sound m_FundsChangedSound; //! Sound for when the funds of a team changes.
245245

246-
Sound m_ActorSwitchSound; ///! Sound for switching between regular (non-brain) actors.
247-
Sound m_BrainSwitchSound; ///! Sound for switching to the brain shortcut.
246+
Sound m_ActorSwitchSound; //! Sound for switching between regular (non-brain) actors.
247+
Sound m_BrainSwitchSound; //! Sound for switching to the brain shortcut.
248248

249-
Sound m_CameraTravelSound; ///! Sound when camera is traveling between actors.
249+
Sound m_CameraTravelSound; //! Sound when camera is traveling between actors.
250250

251-
Sound m_AreaPickedSound; ///! Sound for making an area focus.
252-
Sound m_ObjectPickedSound; ///! Sound for making an object focus.
253-
Sound m_PurchaseMadeSound; ///! Sound for making a purchase.
251+
Sound m_AreaPickedSound; //! Sound for making an area focus.
252+
Sound m_ObjectPickedSound; //! Sound for making an object focus.
253+
Sound m_PurchaseMadeSound; //! Sound for making a purchase.
254254

255-
Sound m_PlacementBlip; ///! Sound for placement of object to scene.
256-
Sound m_PlacementThud; ///! Sound for placement of object to scene.
257-
Sound m_PlacementGravel; ///! Sound for gravely placement of object to scene.
255+
Sound m_PlacementBlip; //! Sound for placement of object to scene.
256+
Sound m_PlacementThud; //! Sound for placement of object to scene.
257+
Sound m_PlacementGravel; //! Sound for gravely placement of object to scene.
258258

259259
/// <summary>
260260
/// Clears all the member variables of this GUISound, effectively resetting the members of this abstraction level only.

Managers/AudioMan.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ namespace RTE {
340340
return true;
341341
}
342342

343-
344343
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
345344

346345
bool AudioMan::SetSoundAttenuation(Sound *pSound, float distance) {

Managers/AudioMan.h

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,15 @@ namespace RTE {
184184
void SetGlobalPitch(double pitch = 1.0, bool excludeMusic = false);
185185

186186
/// <summary>
187-
/// Sets/updates the distance attenuation for a specific sound.
188-
/// Will only have an effect if the sound is currently being played.
187+
/// Sets/updates the distance attenuation for a specific sound. Will only have an effect if the sound is currently being played.
189188
/// </summary>
190189
/// <param name="pSound">A pointer to a Sound object. Ownership IS NOT transferred!</param>
191190
/// <param name="distance">Distance attenuation scalar: 0 = full volume, 1.0 = max distant, but not completely inaudible.</param>
192191
/// <returns>Whether a sample of the Sound is currently being played by any of the channels, and the attenuation was successfully set.</returns>
193192
bool SetSoundAttenuation(Sound *pSound, float distance = 0.0);
194193

195194
/// <summary>
196-
/// Sets/updates the frequency/pitch for a specific sound.
197-
/// Will only have an effect if the sound is currently being played.
195+
/// Sets/updates the frequency/pitch for a specific sound. Will only have an effect if the sound is currently being played.
198196
/// </summary>
199197
/// <param name="pSound">A pointer to a Sound object. Ownership IS NOT transferred!</param>
200198
/// <param name="pitch">New pitch, a multiplier of the original normal frequency. Keep it > 0.</param>
@@ -396,41 +394,41 @@ namespace RTE {
396394
#pragma endregion
397395

398396
protected:
399-
static Entity::ClassInfo m_sClass; ///! ClassInfo for this class.
400-
static const std::string m_ClassName;
397+
static Entity::ClassInfo m_sClass; //! ClassInfo for this class.
398+
static const std::string m_ClassName; //! A string with the friendly-formatted type name of this object.
401399

402-
bool m_AudioEnabled;
403-
int m_MusicChannel;
400+
bool m_AudioEnabled; //! Bool to tell whether audio is enabled or not.
401+
int m_MusicChannel; //! Channel number for Music streams. Typically 0.
404402

405403
#ifdef __USE_SOUND_FMOD
406-
static constexpr unsigned short int s_MaxVolume = 255;
407-
FSOUND_STREAM *m_pMusic;
404+
static constexpr unsigned short int s_MaxVolume = 255; //! Maximum value to use for volume control.
405+
FSOUND_STREAM *m_pMusic; //! Pointer to Fmod sound stream data structure.
408406

409407
#elif __USE_SOUND_GORILLA
410-
static constexpr float s_MaxVolume = 1.0;
411-
gau_Manager* m_pManager;
412-
ga_Mixer* m_pMixer;
413-
ga_StreamManager* m_pStreamManager;
414-
ga_Handle * m_pMusic;
415-
std::vector<ga_Handle *> m_SoundChannels;
416-
std::vector<ga_Sound *> m_SoundInstances;
408+
static constexpr float s_MaxVolume = 1.0; //! Maximum value to use for volume control.
409+
gau_Manager* m_pManager; //! Pointer to Gorilla Audio manager and associated functions.
410+
ga_Mixer* m_pMixer; //! Pointer to Gorilla Audio mixer data structure.
411+
ga_StreamManager* m_pStreamManager; //! Pointer to Gorilla Audio stream manager data structure.
412+
ga_Handle * m_pMusic; //! Pointer to Gorilla Audio playback control handle data structure.
413+
std::vector<ga_Handle *> m_SoundChannels; //! Vector containing active sound channels.
414+
std::vector<ga_Sound *> m_SoundInstances; //! Vector containing Sound instances.
417415
#endif
418-
double m_SoundsVolume; ///! Global sounds effects volume.
419-
double m_MusicVolume; ///! Global music volume.
416+
double m_SoundsVolume; //! Global sounds effects volume.
417+
double m_MusicVolume; //! Global music volume.
420418

421-
double m_GlobalPitch; ///! Global pitch multiplier.
422-
std::vector<int> m_NormalFrequencies; ///! The 'normal' unpitched frequency of each channel handle we have.
423-
std::vector<double> m_PitchModifiers; ///! How each channel's pitch is modified individually.
419+
double m_GlobalPitch; //! Global pitch multiplier.
420+
std::vector<int> m_NormalFrequencies; //! The 'normal' unpitched frequency of each channel handle we have.
421+
std::vector<double> m_PitchModifiers; //! How each channel's pitch is modified individually.
424422

425-
std::string m_MusicPath; ///! The path to the last played music stream.
426-
std::list<std::string> m_MusicPlayList; ///! Playlist of paths to music to play after the current non looping one is done.
423+
std::string m_MusicPath; //! The path to the last played music stream.
424+
std::list<std::string> m_MusicPlayList; //! Playlist of paths to music to play after the current non looping one is done.
427425

428-
Timer m_SilenceTimer; ///! Timer for measuring silences between songs.
426+
Timer m_SilenceTimer; //! Timer for measuring silences between songs.
429427

430428

431-
bool m_IsInMultiplayerMode; ///! If true then the server is in multiplayer mode and will register sound and music events into internal lists.
432-
std::list<NetworkSoundData> m_SoundEvents[c_MaxClients]; ///! Lists of per player sound events.
433-
std::list<NetworkMusicData> m_MusicEvents[c_MaxClients]; ///! Lists of per player music events.
429+
bool m_IsInMultiplayerMode; //! If true then the server is in multiplayer mode and will register sound and music events into internal lists.
430+
std::list<NetworkSoundData> m_SoundEvents[c_MaxClients]; //! Lists of per player sound events.
431+
std::list<NetworkMusicData> m_MusicEvents[c_MaxClients]; //! Lists of per player music events.
434432

435433
private:
436434
/// <summary>

0 commit comments

Comments
 (0)