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

Commit 2b01aba

Browse files
committed
Changed GUISound to not extend Entity
Removed writer from GUISound and AudioMan - isn't actually needed to instantiate unless extends Entity
1 parent fb76586 commit 2b01aba

File tree

2 files changed

+8
-23
lines changed

2 files changed

+8
-23
lines changed

GUI/GUISound.h

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace RTE {
1111
/// <summary>
1212
/// The singleton loader for all GUI sound effects.
1313
/// </summary>
14-
class GUISound : public Singleton<GUISound>, public Entity {
14+
class GUISound : public Singleton<GUISound> {
1515

1616
public:
1717

@@ -28,27 +28,21 @@ namespace RTE {
2828
virtual int Create();
2929
#pragma endregion
3030

31-
#pragma region INI Handling
31+
#pragma region Destruction
3232
/// <summary>
33-
/// Saves the complete state of this GUISound to an output stream for later recreation with Create(Reader &reader);
33+
/// Resets the entire GUISound, including its inherited members, to their default settings or values.
3434
/// </summary>
35-
/// <param name="writer">A Writer that the GUISound will save itself with.</param>
36-
/// <returns>An error return value signaling success or any particular failure. Anything below 0 is an error signal.</returns>
37-
virtual int Save(Writer &writer) const { return 0; }
38-
#pragma endregion
35+
void Reset() { Clear(); Reset(); }
3936

40-
#pragma region Destruction
4137
/// <summary>
42-
/// Destructor method used to clean up a GUISound object before deletion from system memory.
38+
/// Destroys and resets (through Clear()) the GUISound object.
4339
/// </summary>
44-
virtual ~GUISound() { Destroy(true); }
45-
#pragma endregion
40+
void Destroy() { Clear(); }
4641

47-
#pragma region Virtual Override Methods
4842
/// <summary>
49-
/// Resets the entire GUISound, including its inherited members, to their default settings or values.
43+
/// Destructor method used to clean up a GUISound object before deletion from system memory.
5044
/// </summary>
51-
virtual void Reset() { Clear(); Entity::Reset(); }
45+
virtual ~GUISound() { Destroy(); }
5246
#pragma endregion
5347

5448
#pragma region Getters

Managers/AudioMan.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,6 @@ namespace RTE {
8787
virtual int Create();
8888
#pragma endregion
8989

90-
#pragma region INI Handling
91-
/// <summary>
92-
/// Saves the complete state of this AudioMan to an output stream for later recreation with Create(Reader &reader);
93-
/// </summary>
94-
/// <param name="writer">A Writer that the AudioMan will save itself with.</param>
95-
/// <returns>An error return value signaling success or any particular failure. Anything below 0 is an error signal.</returns>
96-
virtual int Save(Writer &writer) const { return 0; }
97-
#pragma endregion
98-
9990
#pragma region Destruction
10091
/// <summary>
10192
/// Destructor method used to clean up a AudioMan object before deletion from system memory.

0 commit comments

Comments
 (0)