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

Merge pull request #5 from antonisauren/master

Dzwieki piasecznicy i odluzniacza jako skladane AdvancedSound. (475piach9)
This commit is contained in:
firleju
2016-05-06 23:39:51 +02:00
4 changed files with 34 additions and 11 deletions

View File

@@ -3859,6 +3859,16 @@ void TDynamicObject::RenderSounds()
rsPisk.Stop(); rsPisk.Stop();
} }
if (MoverParameters->SandDose) // Dzwiek piasecznicy
sSand.TurnOn(MechInside, GetPosition());
else
sSand.TurnOff(MechInside, GetPosition());
sSand.Update(MechInside, GetPosition());
if (MoverParameters->Hamulec->GetStatus() & b_rls) // Dzwiek odluzniacza
sReleaser.TurnOn(MechInside, GetPosition());
else
sReleaser.TurnOff(MechInside, GetPosition());
sReleaser.Update(MechInside, GetPosition());
// if ((MoverParameters->ConverterFlag==false) && // if ((MoverParameters->ConverterFlag==false) &&
// (MoverParameters->TrainType!=dt_ET22)) // (MoverParameters->TrainType!=dt_ET22))
// if // if
@@ -5186,6 +5196,14 @@ void TDynamicObject::LoadMMediaFile(AnsiString BaseDir, AnsiString TypeName,
rsDoorClose.AA = -1 * (105 - random(10)) / 100; rsDoorClose.AA = -1 * (105 - random(10)) / 100;
rsDoorClose.FM = 1.0; rsDoorClose.FM = 1.0;
rsDoorClose.FA = 0.0; rsDoorClose.FA = 0.0;
}
else if (str == AnsiString("sand:")) // pliki z piasecznica
{
sSand.Load(Parser, GetPosition());
}
else if (str == AnsiString("releaser:")) // pliki z odluzniaczem
{
sReleaser.Load(Parser, GetPosition());
} }
} }
else if (str == AnsiString("internaldata:")) // dalej nie czytaj else if (str == AnsiString("internaldata:")) // dalej nie czytaj

View File

@@ -287,6 +287,8 @@ class TDynamicObject
TAdvancedSound sSmallCompressor; TAdvancedSound sSmallCompressor;
TAdvancedSound sDepartureSignal; TAdvancedSound sDepartureSignal;
TAdvancedSound sTurbo; TAdvancedSound sTurbo;
TAdvancedSound sSand;
TAdvancedSound sReleaser;
// Winger 010304 // Winger 010304
// TRealSound rsPanTup; //PSound sPantUp; // TRealSound rsPanTup; //PSound sPantUp;

View File

@@ -51,7 +51,7 @@ HWND Global::hWnd = NULL; // uchwyt okna
int Global::iCameraLast = -1; int Global::iCameraLast = -1;
AnsiString Global::asRelease = "15.4.1171.475"; AnsiString Global::asRelease = "15.4.1171.475";
AnsiString Global::asVersion = AnsiString Global::asVersion =
"Compilation 2016-03-14, release " + Global::asRelease + "."; // tutaj, bo wysy³any "Compilation 2016-05-03, release " + Global::asRelease + "."; // tutaj, bo wysy³any
int Global::iViewMode = 0; // co aktualnie widaæ: 0-kabina, 1-latanie, 2-sprzêgi, 3-dokumenty int Global::iViewMode = 0; // co aktualnie widaæ: 0-kabina, 1-latanie, 2-sprzêgi, 3-dokumenty
int Global::iTextMode = 0; // tryb pracy wyœwietlacza tekstowego int Global::iTextMode = 0; // tryb pracy wyœwietlacza tekstowego
int Global::iScreenMode[12] = {0, 0, 0, 0, 0, 0, int Global::iScreenMode[12] = {0, 0, 0, 0, 0, 0,

View File

@@ -499,8 +499,8 @@ void TTrain::OnKeyDown(int cKey)
if (ggSandButton.SubModel != NULL) if (ggSandButton.SubModel != NULL)
{ {
ggSandButton.PutValue(1); ggSandButton.PutValue(1);
dsbPneumaticRelay->SetVolume(-80); // dsbPneumaticRelay->SetVolume(-80);
dsbPneumaticRelay->Play(0, 0, 0); // dsbPneumaticRelay->Play(0, 0, 0);
} }
} }
} }
@@ -1600,11 +1600,12 @@ void TTrain::OnKeyDown(int cKey)
if (mvOccupied->BrakeCtrlPosNo > 0) if (mvOccupied->BrakeCtrlPosNo > 0)
{ {
ggReleaserButton.PutValue(1); ggReleaserButton.PutValue(1);
if (mvOccupied->BrakeReleaser(1)) mvOccupied->BrakeReleaser(1);
{ // if (mvOccupied->BrakeReleaser(1))
dsbPneumaticRelay->SetVolume(-80); // {
dsbPneumaticRelay->Play(0, 0, 0); // dsbPneumaticRelay->SetVolume(-80);
} // dsbPneumaticRelay->Play(0, 0, 0);
// }
} }
} }
} }
@@ -4302,8 +4303,10 @@ bool TTrain::Update()
{ {
if (mvControlled->TrainType != dt_EZT && ggSandButton.SubModel != NULL) if (mvControlled->TrainType != dt_EZT && ggSandButton.SubModel != NULL)
{ {
mvControlled->SandDose = true; // dsbPneumaticRelay->SetVolume(-30);
// dsbPneumaticRelay->Play(0,0,0);
ggSandButton.PutValue(1); ggSandButton.PutValue(1);
mvControlled->SandDose = true;
// mvControlled->SandDoseOn(true); // mvControlled->SandDoseOn(true);
} }
} }