aboutsummaryrefslogtreecommitdiff
path: root/src/GameInitDispose.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GameInitDispose.cpp')
-rw-r--r--src/GameInitDispose.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp
index 9877f93..782cf6a 100644
--- a/src/GameInitDispose.cpp
+++ b/src/GameInitDispose.cpp
@@ -20,7 +20,7 @@
// You should have received a copy of the GNU General Public License
// along with Black Shades. If not, see <https://www.gnu.org/licenses/>.
-#include <AL/alut.h>
+#include <AL/alc.h>
#include "Textures.h"
#include "Game.h"
@@ -57,10 +57,14 @@ extern int aimkey;
extern int psychicaimkey;
extern int psychickey;
+Game* makeGame()
+{
+ return new Game();
+}
+
void LoadSounds(bool musictoggle)
{
// generate ten OpenAL sample sets and two sources
- alutInit(NULL, 0);
alGenBuffers(37, gSampleSet);
alGenSources(37, gSourceID);
@@ -1903,13 +1907,13 @@ GLvoid Game::ReSizeGLScene(float fov, float near)
glLoadIdentity();
}
-Game::~Game()
+void closeGame(Game* game)
{
const GLuint textures[] {
- personspritetextureptr,
- deadpersonspritetextureptr,
- scopetextureptr,
- flaretextureptr,
+ game->personspritetextureptr,
+ game->deadpersonspritetextureptr,
+ game->scopetextureptr,
+ game->flaretextureptr,
};
glDeleteTextures(4, textures);
alDeleteSources(100, gSourceID); // delete sound sources