mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 05:49:19 +02:00
move sound_manager new/delete into main
This commit is contained in:
7
EU07.cpp
7
EU07.cpp
@@ -346,6 +346,12 @@ int main(int argc, char *argv[])
|
|||||||
|| (false == UILayer.init(window)))
|
|| (false == UILayer.init(window)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if (!(sound_man = new sound_manager()))
|
||||||
|
{
|
||||||
|
ErrorLog("Sound subsystem setup failed");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
input::Keyboard.init();
|
input::Keyboard.init();
|
||||||
input::Mouse.init();
|
input::Mouse.init();
|
||||||
input::Gamepad.init();
|
input::Gamepad.init();
|
||||||
@@ -409,6 +415,7 @@ int main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete sound_man;
|
||||||
TPythonInterpreter::killInstance();
|
TPythonInterpreter::killInstance();
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
delete pConsole;
|
delete pConsole;
|
||||||
|
|||||||
10
World.cpp
10
World.cpp
@@ -218,7 +218,6 @@ TWorld::~TWorld()
|
|||||||
Global::bManageNodes = false; // Ra: wyłączenie wyrejestrowania, bo się sypie
|
Global::bManageNodes = false; // Ra: wyłączenie wyrejestrowania, bo się sypie
|
||||||
TrainDelete();
|
TrainDelete();
|
||||||
// Ground.Free(); //Ra: usunięcie obiektów przed usunięciem dźwięków - sypie się
|
// Ground.Free(); //Ra: usunięcie obiektów przed usunięciem dźwięków - sypie się
|
||||||
delete sound_man;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TWorld::TrainDelete(TDynamicObject *d)
|
void TWorld::TrainDelete(TDynamicObject *d)
|
||||||
@@ -302,15 +301,6 @@ bool TWorld::Init( GLFWwindow *Window ) {
|
|||||||
|
|
||||||
UILayer.set_background( "logo" );
|
UILayer.set_background( "logo" );
|
||||||
|
|
||||||
sound_man = new sound_manager();
|
|
||||||
|
|
||||||
if (!sound_man)
|
|
||||||
{
|
|
||||||
ErrorLog( "Sound subsystem setup failed" );
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
WriteLog("SoundAL Init OK");
|
|
||||||
|
|
||||||
glfwSetWindowTitle( window, ( Global::AppName + " (" + Global::SceneryFile + ")" ).c_str() ); // nazwa scenerii
|
glfwSetWindowTitle( window, ( Global::AppName + " (" + Global::SceneryFile + ")" ).c_str() ); // nazwa scenerii
|
||||||
UILayer.set_progress(0.01);
|
UILayer.set_progress(0.01);
|
||||||
UILayer.set_progress( "Loading scenery / Wczytywanie scenerii" );
|
UILayer.set_progress( "Loading scenery / Wczytywanie scenerii" );
|
||||||
|
|||||||
Reference in New Issue
Block a user