From 49719536811998a600d49ba13a57ce30a439d065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Sat, 24 Jul 2021 20:36:18 +0700 Subject: Reindent Game.h --- src/GameInitDispose.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/GameInitDispose.cpp') 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); +} -- cgit v1.2.3