aboutsummaryrefslogtreecommitdiff
path: root/src/GameInitDispose.cpp
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-08-13 16:52:49 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-08-13 16:52:49 +0700
commited8cfb6d7823b374c085434dc1ad4d53566e4672 (patch)
tree913fce336656fd0ae13c488c12a7996df174364a /src/GameInitDispose.cpp
parentf69f7e5fd144e55dd46f33b13b1d9c6af74c5ab7 (diff)
downloadblackshades-ed8cfb6d7823b374c085434dc1ad4d53566e4672.tar.gz
Retire ALUT
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