diff --git a/CMakeLists.txt b/CMakeLists.txt index bf3edad33..c38e2b8f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2330,6 +2330,7 @@ if(CLIENT) mapitems/map.cpp mapitems/map_io.cpp mapitems/sound.cpp + mapitems/sound.h popups.cpp proof_mode.cpp proof_mode.h diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 6a5dd13c2..db6c97443 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -32,6 +32,7 @@ #include #include +#include #include "auto_map.h" #include "editor.h" diff --git a/src/game/editor/editor.h b/src/game/editor/editor.h index a43b4957a..ccd36e57f 100644 --- a/src/game/editor/editor.h +++ b/src/game/editor/editor.h @@ -330,30 +330,7 @@ public: }; class CEditorImage; - -class CEditorSound -{ -public: - CEditor *m_pEditor; - - CEditorSound(CEditor *pEditor) - { - m_pEditor = pEditor; - m_aName[0] = 0; - m_SoundID = 0; - - m_pData = nullptr; - m_DataSize = 0; - } - - ~CEditorSound(); - - int m_SoundID; - char m_aName[IO_MAX_PATH_LENGTH]; - - void *m_pData; - unsigned m_DataSize; -}; +class CEditorSound; class CEditorMap { diff --git a/src/game/editor/mapitems/map_io.cpp b/src/game/editor/mapitems/map_io.cpp index d2dce83f9..092431d2b 100644 --- a/src/game/editor/mapitems/map_io.cpp +++ b/src/game/editor/mapitems/map_io.cpp @@ -12,6 +12,7 @@ #include #include "image.h" +#include "sound.h" template static int MakeVersion(int i, const T &v) diff --git a/src/game/editor/mapitems/sound.cpp b/src/game/editor/mapitems/sound.cpp index 2ee5bb36e..cdf7e025e 100644 --- a/src/game/editor/mapitems/sound.cpp +++ b/src/game/editor/mapitems/sound.cpp @@ -1,7 +1,9 @@ -#include +#include "sound.h" #include +#include + CEditorSound::~CEditorSound() { m_pEditor->Sound()->UnloadSample(m_SoundID); diff --git a/src/game/editor/mapitems/sound.h b/src/game/editor/mapitems/sound.h new file mode 100644 index 000000000..6d3b00ed3 --- /dev/null +++ b/src/game/editor/mapitems/sound.h @@ -0,0 +1,32 @@ +#ifndef GAME_EDITOR_MAPITEMS_SOUND_H +#define GAME_EDITOR_MAPITEMS_SOUND_H + +#include + +class CEditor; + +class CEditorSound +{ +public: + CEditor *m_pEditor; + + CEditorSound(CEditor *pEditor) + { + m_pEditor = pEditor; + m_aName[0] = 0; + m_SoundID = 0; + + m_pData = nullptr; + m_DataSize = 0; + } + + ~CEditorSound(); + + int m_SoundID; + char m_aName[IO_MAX_PATH_LENGTH]; + + void *m_pData; + unsigned m_DataSize; +}; + +#endif diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp index d5fad78fe..ca7a7f300 100644 --- a/src/game/editor/popups.cpp +++ b/src/game/editor/popups.cpp @@ -13,6 +13,7 @@ #include #include +#include #include "editor.h"