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

custom sounds for cab controls configurable on per-item basis

This commit is contained in:
tmj-fstate
2017-07-15 19:27:49 +02:00
parent 4f9000ebe2
commit 3a67219e30
15 changed files with 687 additions and 570 deletions

46
Train.h
View File

@@ -34,8 +34,9 @@ class TCab
public:
TCab();
~TCab();
void Init(double Initx1, double Inity1, double Initz1, double Initx2, double Inity2,
double Initz2, bool InitEnabled, bool InitOccupied);
/*
void Init(double Initx1, double Inity1, double Initz1, double Initx2, double Inity2, double Initz2, bool InitEnabled, bool InitOccupied);
*/
void Load(cParser &Parser);
vector3 CabPos1;
vector3 CabPos2;
@@ -43,17 +44,19 @@ class TCab
bool bOccupied;
double dimm_r, dimm_g, dimm_b; // McZapkie-120503: tlumienie swiatla
double intlit_r, intlit_g, intlit_b; // McZapkie-120503: oswietlenie kabiny
double intlitlow_r, intlitlow_g,
intlitlow_b; // McZapkie-120503: przyciemnione oswietlenie kabiny
double intlitlow_r, intlitlow_g, intlitlow_b; // McZapkie-120503: przyciemnione oswietlenie kabiny
private:
// bool bChangePossible;
/*
TGauge *ggList; // Ra 2014-08: lista animacji macierzowych (gałek) w kabinie
int iGaugesMax, iGauges; // ile miejsca w tablicy i ile jest w użyciu
TButton *btList; // Ra 2014-08: lista animacji dwustanowych (lampek) w kabinie
int iButtonsMax, iButtons; // ile miejsca w tablicy i ile jest w użyciu
*/
std::vector<TGauge> ggList;
std::vector<TButton> btList;
public:
TGauge *Gauge(int n = -1); // pobranie adresu obiektu
TButton *Button(int n = -1); // pobranie adresu obiektu
TGauge &Gauge(int n = -1); // pobranie adresu obiektu
TButton &Button(int n = -1); // pobranie adresu obiektu
void Update();
};
@@ -103,11 +106,9 @@ class TTrain
// sets cabin controls based on current state of the vehicle
// NOTE: we can get rid of this function once we have per-cab persistent state
void set_cab_controls();
// initializes a gauge matching provided label. returns: true if the label was found, false
// otherwise
// initializes a gauge matching provided label. returns: true if the label was found, false otherwise
bool initialize_gauge(cParser &Parser, std::string const &Label, int const Cabindex);
// initializes a button matching provided label. returns: true if the label was found, false
// otherwise
// initializes a button matching provided label. returns: true if the label was found, false otherwise
bool initialize_button(cParser &Parser, std::string const &Label, int const Cabindex);
// plays specified sound, or fallback sound if the primary sound isn't presend
// NOTE: temporary routine until sound system is sorted out and paired with switches
@@ -209,12 +210,7 @@ public: // reszta może by?publiczna
TGauge ggClockSInd;
TGauge ggClockMInd;
TGauge ggClockHInd;
// TGauge ggHVoltage;
TGauge ggLVoltage;
// TGauge ggEnrot1m;
// TGauge ggEnrot2m;
// TGauge ggEnrot3m;
// TGauge ggEngageRatio;
TGauge ggMainGearStatus;
TGauge ggEngineVoltage;
@@ -277,13 +273,7 @@ public: // reszta może by?publiczna
TGauge ggHornLowButton;
TGauge ggHornHighButton;
TGauge ggNextCurrentButton;
/*
// ABu 090305 - uniwersalne przyciski
TGauge ggUniversal1Button;
TGauge ggUniversal2Button;
TGauge ggUniversal4Button;
bool Universal4Active;
*/
std::array<TGauge, 10> ggUniversals; // NOTE: temporary arrangement until we have dynamically built control table
TGauge ggInstrumentLightButton;
@@ -336,7 +326,6 @@ public: // reszta może by?publiczna
TButton btLampkaRadio;
TButton btLampkaHamowanie1zes;
TButton btLampkaHamowanie2zes;
// TButton btLampkaUnknown;
TButton btLampkaOpory;
TButton btLampkaWysRozr;
TButton btInstrumentLight;
@@ -363,8 +352,6 @@ public: // reszta może by?publiczna
TButton btLampkaBoczniki;
TButton btLampkaMaxSila;
TButton btLampkaPrzekrMaxSila;
// TButton bt;
//
TButton btLampkaDoorLeft;
TButton btLampkaDoorRight;
TButton btLampkaDepartureSignal;
@@ -439,8 +426,6 @@ public: // reszta może by?publiczna
PSound dsbHasler;
PSound dsbBuzzer;
PSound dsbSlipAlarm; // Bombardier 011010: alarm przy poslizgu dla 181/182
// TFadeSound sConverter; //przetwornica
// TFadeSound sSmallCompressor; //przetwornica
int iCabLightFlag; // McZapkie:120503: oswietlenie kabiny (0: wyl, 1: przyciemnione, 2: pelne)
bool bCabLight; // hunter-091012: czy swiatlo jest zapalone?
@@ -454,11 +439,6 @@ public: // reszta może by?publiczna
PSound dsbCouplerStretch;
PSound dsbEN57_CouplerStretch;
PSound dsbBufferClamp;
// TSubModel *smCzuwakShpOn;
// TSubModel *smCzuwakOn;
// TSubModel *smShpOn;
// TSubModel *smCzuwakShpOff;
// double fCzuwakTimer;
double fBlinkTimer;
float fHaslerTimer;
float fConverterTimer; // hunter-261211: dla przekaznika