]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameInitDispose.cpp
OpenAL: Fix dispose logic on Linux
[lugaru.git] / Source / GameInitDispose.cpp
index 57f6958faba924144401c348bb146e0ae268dcb9..85be11836614665da639511091eef841efe2dee1 100644 (file)
@@ -1,6 +1,6 @@
 /*
 Copyright (C) 2003, 2010 - Wolfire Games
-Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
+Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file)
 
 This file is part of Lugaru.
 
@@ -40,8 +40,6 @@ extern float realtexdetail;
 extern float volume;
 extern int detail;
 extern bool cellophane;
-extern GLubyte bloodText[512 * 512 * 3];
-extern GLubyte wolfbloodText[512 * 512 * 3];
 extern bool ismotionblur;
 extern bool trilinear;
 extern bool musictoggle;
@@ -90,16 +88,11 @@ void Dispose()
 
     OPENAL_StopSound(OPENAL_ALL);
 
-// this is causing problems on Linux, but we'll force an _exit() a little
-//  later in the shutdown process.  --ryan.
-#if !PLATFORM_LINUX
-
     for (int i = 0; i < sounds_count; ++i) {
         OPENAL_Sample_Free(samp[i]);
     }
 
     OPENAL_Close();
-#endif
 }
 
 void Game::newGame()
@@ -602,6 +595,10 @@ void Game::InitGame()
     Menu::Load();
 
     Animation::loadAll();
+
+    PersonType::Load();
+
+    Person::players.emplace_back(new Person());
 }
 
 void Game::LoadScreenTexture()
@@ -738,8 +735,8 @@ void Game::LoadStuff()
     iris.Scale(.03, .03, .03);
     iris.CalculateNormals(0);
 
-    LoadSave("Textures/BloodFur.png", &bloodText[0]);
-    LoadSave("Textures/WolfBloodFur.png", &wolfbloodText[0]);
+    LoadSave("Textures/WolfBloodFur.png", &PersonType::types[wolftype].bloodText[0]);
+    LoadSave("Textures/BloodFur.png", &PersonType::types[rabbittype].bloodText[0]);
 
     oldenvironment = -4;