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

audio subsystem replacement: openal audio renderer and buffer class, removed deprecated files

This commit is contained in:
tmj-fstate
2017-11-10 16:57:08 +01:00
parent a93b1a5b1a
commit 492c1342b1
28 changed files with 498 additions and 104 deletions

View File

@@ -589,9 +589,9 @@ void TTrain::OnCommand_secondcontrollerincrease( TTrain *Train, command_data con
if( Command.action != GLFW_RELEASE ) {
// on press or hold
if( Train->mvControlled->ShuntMode ) {
Train->mvControlled->AnPos += ( Command.time_delta * 0.75f );
if( Train->mvControlled->AnPos > 1 )
Train->mvControlled->AnPos = 1;
Train->mvControlled->AnPos = clamp(
Train->mvControlled->AnPos + ( Command.time_delta * 1.0f ),
0.0, 1.0 );
}
else {
Train->mvControlled->IncScndCtrl( 1 );
@@ -650,9 +650,9 @@ void TTrain::OnCommand_secondcontrollerdecrease( TTrain *Train, command_data con
if( Command.action != GLFW_RELEASE ) {
// on press or hold
if( Train->mvControlled->ShuntMode ) {
Train->mvControlled->AnPos -= ( Command.time_delta * 0.75f );
if( Train->mvControlled->AnPos > 1 )
Train->mvControlled->AnPos = 1;
Train->mvControlled->AnPos = clamp(
Train->mvControlled->AnPos - ( Command.time_delta * 1.0f ),
0.0, 1.0 );
}
Train->mvControlled->DecScndCtrl( 1 );
}
@@ -2030,7 +2030,9 @@ void TTrain::OnCommand_motoroverloadrelaythresholdtoggle( TTrain *Train, command
if( Command.action == GLFW_PRESS ) {
// only reacting to press, so the switch doesn't flip back and forth if key is held down
if( Train->mvControlled->Imax < Train->mvControlled->ImaxHi ) {
if( ( true == Train->mvControlled->ShuntModeAllow ?
( false == Train->mvControlled->ShuntMode ) :
( Train->mvControlled->Imax < Train->mvControlled->ImaxHi ) ) ) {
// turn on
if( true == Train->mvControlled->CurrentSwitch( true ) ) {
// visual feedback