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

unified simulation sound sources, gfx namespace for gfx code and structures

This commit is contained in:
tmj-fstate
2017-11-12 00:23:21 +01:00
parent 492c1342b1
commit 5226fca281
36 changed files with 1487 additions and 1433 deletions

View File

@@ -22,8 +22,8 @@ class TButton
bool m_state { false };
bool const *bData { nullptr };
int iFeedbackBit { 0 }; // Ra: bit informacji zwrotnej, do wyprowadzenia na pulpit
PSound m_soundfxincrease { nullptr }; // sound associated with increasing control's value
PSound m_soundfxdecrease { nullptr }; // sound associated with decreasing control's value
sound_source m_soundfxincrease; // sound associated with increasing control's value
sound_source m_soundfxdecrease; // sound associated with decreasing control's value
// methods
// imports member data pair from the config file
bool
@@ -31,10 +31,6 @@ class TButton
// plays the sound associated with current state
void
play();
// plays specified sound
static
void
play( PSound Sound );
public:
TButton() = default;
@@ -42,14 +38,10 @@ class TButton
inline void FeedbackBitSet(int const i) {
iFeedbackBit = 1 << i; };
void Turn( bool const State );
inline void TurnOn() {
Turn( true ); };
inline void TurnOff() {
Turn( false ); };
inline void Switch() {
Turn( !m_state ); };
inline bool Active() {
return (pModelOn) || (pModelOff); };
inline
bool Active() {
return ( ( pModelOn != nullptr )
|| ( pModelOff != nullptr ) ); }
void Update();
void Init(std::string const &asName, TModel3d *pModel, bool bNewOn = false);
void Load(cParser &Parser, TModel3d *pModel1, TModel3d *pModel2 = NULL);