From 62e97669627257e9dc711afe4eca5d0e831a4808 Mon Sep 17 00:00:00 2001 From: VB Date: Tue, 21 Feb 2017 17:53:24 +0100 Subject: [PATCH] lowercase vehicle name, tweaks --- EU07.cpp | 24 ++++++++++-------------- World.cpp | 3 --- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/EU07.cpp b/EU07.cpp index eb98cd0f..9cdf0f7c 100644 --- a/EU07.cpp +++ b/EU07.cpp @@ -38,13 +38,7 @@ void window_resize_callback(GLFWwindow *window, int w, int h) { Global::ScreenWidth = w; Global::ScreenHeight = h; - glViewport(0, 0, w, h); // Reset The Current Viewport - glMatrixMode(GL_PROJECTION); // select the Projection Matrix - glLoadIdentity(); // reset the Projection Matrix - // calculate the aspect ratio of the window - gluPerspective(45.0f, (GLdouble)w / (GLdouble)h, 0.2f, 2500.0f); - glMatrixMode(GL_MODELVIEW); // select the Modelview Matrix - glLoadIdentity(); // reset the Modelview Matrix + glViewport(0, 0, w, h); } void cursor_pos_callback(GLFWwindow *window, double x, double y) @@ -132,12 +126,14 @@ int main(int argc, char *argv[]) else Global::iConvertModels = -7; // z optymalizacją, bananami i prawidłowym Opacity } - else if (argc <= i + 1) - continue; - else if (token == "-s") + else if (i + 1 < argc && token == "-s") Global::SceneryFile = std::string(argv[++i]); - else if (token == "-v") - Global::asHumanCtrlVehicle = std::string(argv[++i]); + else if (i + 1 < argc && token == "-v") + { + std::string v(argv[++i]); + std::transform(v.begin(), v.end(), v.begin(), ::tolower); + Global::asHumanCtrlVehicle = v; + } else { std::cout << "usage: " << std::string(argv[0]) << " [-s sceneryfilepath] " @@ -146,8 +142,6 @@ int main(int argc, char *argv[]) } } - glfwWindowHint(GLFW_SAMPLES, Global::iMultisampling); - // match requested video mode to current to allow for // fullwindow creation when resolution is the same GLFWmonitor *monitor = glfwGetPrimaryMonitor(); @@ -158,6 +152,8 @@ int main(int argc, char *argv[]) glfwWindowHint(GLFW_BLUE_BITS, vmode->blueBits); glfwWindowHint(GLFW_REFRESH_RATE, vmode->refreshRate); + glfwWindowHint(GLFW_SAMPLES, Global::iMultisampling); + GLFWwindow *window = glfwCreateWindow(Global::iWindowWidth, Global::iWindowHeight, "EU07++NG", Global::bFullScreen ? monitor : nullptr, nullptr); diff --git a/World.cpp b/World.cpp index 9d85ab32..e56c8af0 100644 --- a/World.cpp +++ b/World.cpp @@ -174,9 +174,6 @@ bool TWorld::Init(GLFWwindow *w) Global::detonatoryOK = true; WriteLog("Starting MaSzyna rail vehicle simulator."); WriteLog(Global::asVersion); - if( sizeof( TSubModel ) != 256 ) { - std::cout << "sizeof(TSubModel) != 256: E3D file support unavailable" << std::endl; - } WriteLog("Online documentation and additional files on http://eu07.pl"); WriteLog("Authors: Marcin_EU, McZapkie, ABu, Winger, Tolaris, nbmx, OLO_EU, Bart, Quark-t, " "ShaXbee, Oli_EU, youBy, KURS90, Ra, hunter, szociu, Stele, Q, firleju and others");