aboutsummaryrefslogtreecommitdiff
path: root/src/GameInitDispose.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GameInitDispose.cpp')
-rw-r--r--src/GameInitDispose.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp
index 8725f40..9a0435d 100644
--- a/src/GameInitDispose.cpp
+++ b/src/GameInitDispose.cpp
@@ -13,7 +13,6 @@ extern Skeleton testskeleton;
extern Sprites sprites;
extern Decals decals;
-/*********************> InitGame()<*****/
extern Model skeletonmodels[10];
extern Model gunmodels[10];
extern Costume costume[10];
@@ -2131,8 +2130,6 @@ void Game::InitGame()
oldscore=score;
}
-/*********************> InitGL() <*****/
-
int Game::InitGL(void)
{
//Config
@@ -2292,15 +2289,6 @@ int Game::InitGL(void)
return TRUE;
}
-//***************> Dispose() <******/
-void Game::Dispose()
-{
- //Delete sound sources
- alDeleteSources(100, gSourceID);
-}
-
-//***************> ResizeGLScene() <******/
-
GLvoid Game::ReSizeGLScene(float fov, float near)
{
if (screenheight==0)
@@ -2313,3 +2301,12 @@ GLvoid Game::ReSizeGLScene(float fov, float near)
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
+
+Game::~Game()
+{
+ alDeleteSources(100, gSourceID); // delete sound sources
+ glDeleteTextures(1, (const GLuint*) personspritetextureptr);
+ glDeleteTextures(1, (const GLuint*) deadpersonspritetextureptr);
+ glDeleteTextures(1, (const GLuint*) scopetextureptr);
+ glDeleteTextures(1, (const GLuint*) flaretextureptr);
+}