16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 13:29:18 +02:00

maintenance: removed deprecated settings

This commit is contained in:
tmj-fstate
2017-09-09 17:33:21 +02:00
parent 435dc24d3e
commit 24221163cc
6 changed files with 32 additions and 240 deletions

View File

@@ -309,10 +309,7 @@ int main(int argc, char *argv[])
{
std::string token(argv[i]);
if (token == "-modifytga")
Global::iModifyTGA = -1;
else if (token == "-e3d")
{
if (token == "-e3d") {
if (Global::iConvertModels > 0)
Global::iConvertModels = -Global::iConvertModels;
else
@@ -328,8 +325,12 @@ int main(int argc, char *argv[])
}
else
{
std::cout << "usage: " << std::string(argv[0]) << " [-s sceneryfilepath] "
<< "[-v vehiclename] [-modifytga] [-e3d]" << std::endl;
std::cout
<< "usage: " << std::string(argv[0])
<< " [-s sceneryfilepath]"
<< " [-v vehiclename]"
<< " [-e3d]"
<< std::endl;
return -1;
}
}
@@ -438,37 +439,31 @@ int main(int argc, char *argv[])
if( !joyGetNumDevs() )
WriteLog( "No joystick" );
*/
if( Global::iModifyTGA < 0 ) { // tylko modyfikacja TGA, bez uruchamiania symulacji
Global::iMaxTextureSize = 64; //żeby nie zamulać pamięci
World.ModifyTGA(); // rekurencyjne przeglądanie katalogów
}
else {
if( Global::iConvertModels < 0 ) {
Global::iConvertModels = -Global::iConvertModels;
World.CreateE3D( "models\\" ); // rekurencyjne przeglądanie katalogów
World.CreateE3D( "dynamic\\", true );
} // po zrobieniu E3D odpalamy normalnie scenerię, by ją zobaczyć
if( Global::iConvertModels < 0 ) {
Global::iConvertModels = -Global::iConvertModels;
World.CreateE3D( "models\\" ); // rekurencyjne przeglądanie katalogów
World.CreateE3D( "dynamic\\", true );
} // po zrobieniu E3D odpalamy normalnie scenerię, by ją zobaczyć
Console::On(); // włączenie konsoli
Console::On(); // włączenie konsoli
try {
while( ( false == glfwWindowShouldClose( window ) )
&& ( true == World.Update() )
&& ( true == GfxRenderer.Render() ) ) {
glfwPollEvents();
input::Keyboard.poll();
if( true == Global::InputMouse ) { input::Mouse.poll(); }
if( true == Global::InputGamepad ) { input::Gamepad.poll(); }
}
try {
while( ( false == glfwWindowShouldClose( window ) )
&& ( true == World.Update() )
&& ( true == GfxRenderer.Render() ) ) {
glfwPollEvents();
input::Keyboard.poll();
if( true == Global::InputMouse ) { input::Mouse.poll(); }
if( true == Global::InputGamepad ) { input::Gamepad.poll(); }
}
catch( std::bad_alloc const &Error ) {
ErrorLog( "Critical error, memory allocation failure: " + std::string( Error.what() ) );
return -1;
}
Console::Off(); // wyłączenie konsoli (komunikacji zwrotnej)
}
catch( std::bad_alloc const &Error ) {
ErrorLog( "Critical error, memory allocation failure: " + std::string( Error.what() ) );
return -1;
}
Console::Off(); // wyłączenie konsoli (komunikacji zwrotnej)
TPythonInterpreter::killInstance();
delete pConsole;