executable info, static daylight toggle fix

This commit is contained in:
tmj-fstate
2017-03-21 17:31:50 +01:00
parent 38acc083d1
commit f4a5f60465
7 changed files with 23 additions and 7 deletions

View File

@@ -249,6 +249,12 @@ int main(int argc, char *argv[])
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_GREEN );
}
std::string executable( argv[ 0 ] ); auto const pathend = executable.rfind( '\\' );
Global::ExecutableName =
( pathend != std::string::npos ?
executable.substr( executable.rfind( '\\' ) + 1 ) :
executable );
for (int i = 1; i < argc; ++i)
{
std::string token(argv[i]);

View File

@@ -48,9 +48,9 @@ GLFWwindow *Global::window;
bool Global::shiftState;
bool Global::ctrlState;
int Global::iCameraLast = -1;
std::string Global::asRelease = "16.0.1172.482++";
std::string Global::asVersion =
"Compilation 2017-03-19, release " + Global::asRelease + "."; // tutaj, bo wysyłany
std::string Global::asRelease = "16.0.1172.482";
std::string Global::asVersion = "Compilation 2017-03-19, release " + Global::asRelease; // tutaj, bo wysyłany
std::string Global::ExecutableName;
int Global::iTextMode = 0; // tryb pracy wyświetlacza tekstowego
int Global::iScreenMode[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // numer ekranu wyświetlacza tekstowego
double Global::fSunDeclination = 0.0; // deklinacja Słońca

View File

@@ -266,6 +266,7 @@ class Global
static int iCameraLast;
static std::string asRelease; // numer
static std::string asVersion; // z opisem
static std::string ExecutableName;
static GLint iMaxTextureSize; // maksymalny rozmiar tekstury
static int iTextMode; // tryb pracy wyświetlacza tekstowego
static int iScreenMode[12]; // numer ekranu wyświetlacza tekstowego

View File

@@ -307,7 +307,7 @@ void TPythonScreenRenderer::updateTexture()
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
}
// build texture
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, textureData);
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, textureData );
#ifdef _PY_INT_MORE_LOG
GLenum status = glGetError();

View File

@@ -149,7 +149,7 @@ bool TWorld::Init( GLFWwindow *Window ) {
Global::pCamera = &Camera; // Ra: wskaźnik potrzebny do likwidacji drgań
WriteLog("\nStarting MaSzyna rail vehicle simulator.");
WriteLog(Global::asVersion);
WriteLog( "Release " + Global::asRelease + " (executable: " + Global::ExecutableName + ")" );
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\n");

View File

@@ -8,6 +8,10 @@
<LocalDebuggerWorkingDirectory>..\..\Projects\maszyna</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>..\..\Projects\maszyna</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>..\..\Projects\maszyna</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
@@ -18,4 +22,9 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>_NO_DEBUG_HEAP=1</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>..\..\Projects\maszyna</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>_NO_DEBUG_HEAP=1</LocalDebuggerEnvironment>
</PropertyGroup>
</Project>

View File

@@ -99,8 +99,8 @@ void cSun::setLocation( float const Longitude, float const Latitude ) {
void cSun::setTime( int const Hour, int const Minute, int const Second ) {
m_observer.hour = clamp( Hour, -1, 23 );
m_observer.minute = clamp( Minute, 0, 59 );
m_observer.second = clamp( Second, 0, 59 );
m_observer.minute = clamp( Minute, -1, 59 );
m_observer.second = clamp( Second, -1, 59 );
}
void cSun::setTemperature( float const Temperature ) {