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

Merge remote-tracking branch 'refs/remotes/TMJ/mover_in_c++'

This commit is contained in:
Królik Uszasty
2017-07-31 17:32:23 +02:00
29 changed files with 995 additions and 326 deletions

View File

@@ -32,6 +32,8 @@ http://mozilla.org/MPL/2.0/.
#include "uilayer.h"
#include "translation.h"
//#define EU07_USE_DEBUG_SHADOWMAP
//---------------------------------------------------------------------------
TDynamicObject *Controlled = NULL; // pojazd, który prowadzimy
@@ -632,8 +634,13 @@ void TWorld::OnKeyDown(int cKey)
break;
}
case GLFW_KEY_F8: {
#ifdef EU07_USE_DEBUG_SHADOWMAP
if( Global::iTextMode == cKey ) { ++Global::iScreenMode[ cKey - GLFW_KEY_F1 ]; }
if( Global::iScreenMode[ cKey - GLFW_KEY_F1 ] > 1 ) {
Global::iScreenMode[ cKey - GLFW_KEY_F1 ] = 0;
}
#endif
Global::iTextMode = cKey;
// FPS
break;
}
case GLFW_KEY_F9: {
@@ -956,8 +963,6 @@ void TWorld::FollowView(bool wycisz) {
+ Train->GetDirection() * 5.0 * Train->Dynamic()->MoverParameters->ActiveCab;
}
Train->pMechOffset = Train->pMechSittingPosition;
Global::SetCameraPosition( Train->Dynamic() ->GetPosition()); // tu ustawić nową, bo od niej liczą się odległości
}
}
else
@@ -1696,7 +1701,7 @@ TWorld::Update_UI() {
std::to_string( int( tmp->MoverParameters->Im ) ) )
+ "; U=" + to_string( int( tmp->MoverParameters->RunningTraction.TractionVoltage + 0.5 ) )
+ "; R=" +
( tmp->MoverParameters->RunningShape.R > 100000.0 ?
( std::abs( tmp->MoverParameters->RunningShape.R ) > 10000.0 ?
"~0.0" :
to_string( tmp->MoverParameters->RunningShape.R, 1 ) )
+ " An=" + to_string( tmp->MoverParameters->AccN, 2 ); // przyspieszenie poprzeczne