diff options
Diffstat (limited to 'engines/titanic/sound')
50 files changed, 2788 insertions, 0 deletions
diff --git a/engines/titanic/sound/auto_music_player.cpp b/engines/titanic/sound/auto_music_player.cpp new file mode 100644 index 0000000000..964814348d --- /dev/null +++ b/engines/titanic/sound/auto_music_player.cpp @@ -0,0 +1,52 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/auto_music_player.h" + +namespace Titanic { + +CAutoMusicPlayer::CAutoMusicPlayer() : CAutoMusicPlayerBase() { +} + +void CAutoMusicPlayer::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeQuotedLine(_string2, indent); + + CAutoMusicPlayerBase::save(file, indent); +} + +void CAutoMusicPlayer::load(SimpleFile *file) { + file->readNumber(); + _string2 = file->readString(); + + CAutoMusicPlayerBase::load(file); +} + +bool CAutoMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) { + if (!_fieldCC) { + warning("TODO"); + } + + return true; +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/auto_music_player.h b/engines/titanic/sound/auto_music_player.h new file mode 100644 index 0000000000..e9e9763116 --- /dev/null +++ b/engines/titanic/sound/auto_music_player.h @@ -0,0 +1,52 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_AUTO_MUSIC_PLAYER_H +#define TITANIC_AUTO_MUSIC_PLAYER_H + +#include "titanic/sound/auto_music_player_base.h" +#include "titanic/messages/messages.h" + +namespace Titanic { + +class CAutoMusicPlayer : public CAutoMusicPlayerBase { + bool EnterRoomMsg(CEnterRoomMsg *msg); +private: + CString _string2; +public: + CLASSDEF; + CAutoMusicPlayer(); + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_LINK_ITEM_H */ diff --git a/engines/titanic/sound/auto_music_player_base.cpp b/engines/titanic/sound/auto_music_player_base.cpp new file mode 100644 index 0000000000..c8b9adc275 --- /dev/null +++ b/engines/titanic/sound/auto_music_player_base.cpp @@ -0,0 +1,52 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/auto_music_player_base.h" + +namespace Titanic { + +CAutoMusicPlayerBase::CAutoMusicPlayerBase() : CGameObject(), + _fieldC8(1), _fieldCC(0), _fieldD0(-1), _fieldD4(1) { +} +void CAutoMusicPlayerBase::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeQuotedLine(_string1, indent); + file->writeNumberLine(_fieldC8, indent); + file->writeNumberLine(_fieldCC, indent); + file->writeNumberLine(_fieldD0, indent); + file->writeNumberLine(_fieldD4, indent); + + CGameObject::save(file, indent); +} + +void CAutoMusicPlayerBase::load(SimpleFile *file) { + file->readNumber(); + _string1 = file->readString(); + _fieldC8 = file->readNumber(); + _fieldCC = file->readNumber(); + _fieldD0 = file->readNumber(); + _fieldD4 = file->readNumber(); + + CGameObject::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/auto_music_player_base.h b/engines/titanic/sound/auto_music_player_base.h new file mode 100644 index 0000000000..657c5272e4 --- /dev/null +++ b/engines/titanic/sound/auto_music_player_base.h @@ -0,0 +1,54 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_AUTO_MUSIC_PLAYER_BASE_H +#define TITANIC_AUTO_MUSIC_PLAYER_BASE_H + +#include "titanic/core/game_object.h" + +namespace Titanic { + +class CAutoMusicPlayerBase : public CGameObject { +protected: + CString _string1; + int _fieldC8; + int _fieldCC; + int _fieldD0; + int _fieldD4; +public: + CLASSDEF; + CAutoMusicPlayerBase(); + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_AUTO_MUSIC_PLAYER_BASE_H */ diff --git a/engines/titanic/sound/auto_sound_player.cpp b/engines/titanic/sound/auto_sound_player.cpp new file mode 100644 index 0000000000..3e3d5298e4 --- /dev/null +++ b/engines/titanic/sound/auto_sound_player.cpp @@ -0,0 +1,64 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/auto_sound_player.h" + +namespace Titanic { + +CAutoSoundPlayer::CAutoSoundPlayer() : CGameObject(), + _fieldBC(0), _fieldCC(70), _fieldD0(0), _fieldD4(0), _fieldD8(-1), + _fieldDC(0), _fieldE0(-1), _fieldE4(0), _fieldE8(0) { +} + +void CAutoSoundPlayer::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldBC, indent); + file->writeQuotedLine(_string1, indent); + file->writeNumberLine(_fieldCC, indent); + file->writeNumberLine(_fieldD0, indent); + file->writeNumberLine(_fieldD4, indent); + file->writeNumberLine(_fieldD8, indent); + file->writeNumberLine(_fieldDC, indent); + file->writeNumberLine(_fieldE0, indent); + file->writeNumberLine(_fieldE4, indent); + file->writeNumberLine(_fieldE8, indent); + + CGameObject::save(file, indent); +} + +void CAutoSoundPlayer::load(SimpleFile *file) { + file->readNumber(); + _fieldBC = file->readNumber(); + _string1 = file->readString(); + _fieldCC = file->readNumber(); + _fieldD0 = file->readNumber(); + _fieldD4 = file->readNumber(); + _fieldD8 = file->readNumber(); + _fieldDC = file->readNumber(); + _fieldE0 = file->readNumber(); + _fieldE4 = file->readNumber(); + _fieldE8 = file->readNumber(); + + CGameObject::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/auto_sound_player.h b/engines/titanic/sound/auto_sound_player.h new file mode 100644 index 0000000000..6de2b12561 --- /dev/null +++ b/engines/titanic/sound/auto_sound_player.h @@ -0,0 +1,59 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_AUTO_SOUND_PLAYER_H +#define TITANIC_AUTO_SOUND_PLAYER_H + +#include "titanic/core/game_object.h" + +namespace Titanic { + +class CAutoSoundPlayer : public CGameObject { +public: + int _fieldBC; + CString _string1; + int _fieldCC; + int _fieldD0; + int _fieldD4; + int _fieldD8; + int _fieldDC; + int _fieldE0; + int _fieldE4; + int _fieldE8; +public: + CLASSDEF; + CAutoSoundPlayer(); + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_AUTO_SOUND_PLAYER_H */ diff --git a/engines/titanic/sound/auto_sound_player_adsr.cpp b/engines/titanic/sound/auto_sound_player_adsr.cpp new file mode 100644 index 0000000000..4bfd5578fb --- /dev/null +++ b/engines/titanic/sound/auto_sound_player_adsr.cpp @@ -0,0 +1,43 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/auto_sound_player_adsr.h" + +namespace Titanic { + +void CAutoSoundPlayerADSR::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeQuotedLine(_string2, indent); + file->writeQuotedLine(_string3, indent); + file->writeQuotedLine(_string4, indent); + CAutoSoundPlayer::save(file, indent); +} + +void CAutoSoundPlayerADSR::load(SimpleFile *file) { + file->readNumber(); + _string2 = file->readString(); + _string3 = file->readString(); + _string4 = file->readString(); + CAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/auto_sound_player_adsr.h b/engines/titanic/sound/auto_sound_player_adsr.h new file mode 100644 index 0000000000..6dc2853425 --- /dev/null +++ b/engines/titanic/sound/auto_sound_player_adsr.h @@ -0,0 +1,51 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_AUTO_SOUND_PLAYER_ADSR_H +#define TITANIC_AUTO_SOUND_PLAYER_ADSR_H + +#include "titanic/sound/auto_sound_player.h" + +namespace Titanic { + +class CAutoSoundPlayerADSR : public CAutoSoundPlayer { +private: + CString _string2; + CString _string3; + CString _string4; +public: + CLASSDEF; + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_AUTO_SOUND_PLAYER_ADSR_H */ diff --git a/engines/titanic/sound/background_sound_maker.cpp b/engines/titanic/sound/background_sound_maker.cpp new file mode 100644 index 0000000000..0abab8906b --- /dev/null +++ b/engines/titanic/sound/background_sound_maker.cpp @@ -0,0 +1,39 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/background_sound_maker.h" + +namespace Titanic { + +void CBackgroundSoundMaker::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_value, indent); + CGameObject::save(file, indent); +} + +void CBackgroundSoundMaker::load(SimpleFile *file) { + file->readNumber(); + _value = file->readNumber(); + CGameObject::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/background_sound_maker.h b/engines/titanic/sound/background_sound_maker.h new file mode 100644 index 0000000000..022d8f4741 --- /dev/null +++ b/engines/titanic/sound/background_sound_maker.h @@ -0,0 +1,50 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_BACKGROUND_SOUND_MAKER_H +#define TITANIC_BACKGROUND_SOUND_MAKER_H + +#include "titanic/core/game_object.h" + +namespace Titanic { + +class CBackgroundSoundMaker : public CGameObject { +public: + int _value; +public: + CLASSDEF; + CBackgroundSoundMaker() : CGameObject(), _value(0) {} + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_BACKGROUND_SOUND_MAKER_H */ diff --git a/engines/titanic/sound/bird_song.cpp b/engines/titanic/sound/bird_song.cpp new file mode 100644 index 0000000000..7f7d0ad5ce --- /dev/null +++ b/engines/titanic/sound/bird_song.cpp @@ -0,0 +1,39 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/bird_song.h" + +namespace Titanic { + +void CBirdSong::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_value, indent); + CRoomAutoSoundPlayer::save(file, indent); +} + +void CBirdSong::load(SimpleFile *file) { + file->readNumber(); + _value = file->readNumber(); + CRoomAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/bird_song.h b/engines/titanic/sound/bird_song.h new file mode 100644 index 0000000000..35758e5b77 --- /dev/null +++ b/engines/titanic/sound/bird_song.h @@ -0,0 +1,50 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_BIRD_SONG_H +#define TITANIC_BIRD_SONG_H + +#include "titanic/sound/room_auto_sound_player.h" + +namespace Titanic { + +class CBirdSong : public CRoomAutoSoundPlayer { +public: + int _value; +public: + CLASSDEF; + CBirdSong() : CRoomAutoSoundPlayer(), _value(0) {} + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_BIRD_SONG_H */ diff --git a/engines/titanic/sound/dome_from_top_of_well.cpp b/engines/titanic/sound/dome_from_top_of_well.cpp new file mode 100644 index 0000000000..3721b9f3b7 --- /dev/null +++ b/engines/titanic/sound/dome_from_top_of_well.cpp @@ -0,0 +1,39 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/dome_from_top_of_well.h" + +namespace Titanic { + +EMPTY_MESSAGE_MAP(CDomeFromTopOfWell, CViewAutoSoundPlayer); + +void CDomeFromTopOfWell::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + CViewAutoSoundPlayer::save(file, indent); +} + +void CDomeFromTopOfWell::load(SimpleFile *file) { + file->readNumber(); + CViewAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/dome_from_top_of_well.h b/engines/titanic/sound/dome_from_top_of_well.h new file mode 100644 index 0000000000..e3d2877379 --- /dev/null +++ b/engines/titanic/sound/dome_from_top_of_well.h @@ -0,0 +1,48 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_DOME_FROM_TOP_OF_WELL_H +#define TITANIC_DOME_FROM_TOP_OF_WELL_H + +#include "titanic/sound/view_auto_sound_player.h" + +namespace Titanic { + +class CDomeFromTopOfWell : public CViewAutoSoundPlayer { + DECLARE_MESSAGE_MAP; +public: + CLASSDEF; + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_DOME_FROM_TOP_OF_WELL_H */ diff --git a/engines/titanic/sound/enter_view_toggles_other_music.cpp b/engines/titanic/sound/enter_view_toggles_other_music.cpp new file mode 100644 index 0000000000..0b149993a3 --- /dev/null +++ b/engines/titanic/sound/enter_view_toggles_other_music.cpp @@ -0,0 +1,44 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/enter_view_toggles_other_music.h" + +namespace Titanic { + +CEnterViewTogglesOtherMusic::CEnterViewTogglesOtherMusic() : CTriggerAutoMusicPlayer(), _fieldC8(0) { +} + +void CEnterViewTogglesOtherMusic::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldC8, indent); + + CTriggerAutoMusicPlayer::save(file, indent); +} + +void CEnterViewTogglesOtherMusic::load(SimpleFile *file) { + file->readNumber(); + _fieldC8 = file->readNumber(); + + CTriggerAutoMusicPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/enter_view_toggles_other_music.h b/engines/titanic/sound/enter_view_toggles_other_music.h new file mode 100644 index 0000000000..6bbeea4890 --- /dev/null +++ b/engines/titanic/sound/enter_view_toggles_other_music.h @@ -0,0 +1,50 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_ENTER_VIEW_TOGGLES_OTHER_MUSIC_H +#define TITANIC_ENTER_VIEW_TOGGLES_OTHER_MUSIC_H + +#include "titanic/sound/trigger_auto_music_player.h" + +namespace Titanic { + +class CEnterViewTogglesOtherMusic : public CTriggerAutoMusicPlayer { +protected: + int _fieldC8; +public: + CLASSDEF; + CEnterViewTogglesOtherMusic(); + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_ENTER_VIEW_TOGGLES_OTHER_MUSIC_H */ diff --git a/engines/titanic/sound/gondolier_song.cpp b/engines/titanic/sound/gondolier_song.cpp new file mode 100644 index 0000000000..b44400b2db --- /dev/null +++ b/engines/titanic/sound/gondolier_song.cpp @@ -0,0 +1,39 @@ +/* ScummVM - Graphic Adventure Engine +* +* ScummVM is the legal property of its developers, whose names +* are too numerous to list here. Please refer to the COPYRIGHT +* file distributed with this source distribution. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +*/ + +#include "titanic/sound/gondolier_song.h" + +namespace Titanic { + +void CGondolierSong::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_value, indent); + CRoomAutoSoundPlayer::save(file, indent); +} + +void CGondolierSong::load(SimpleFile *file) { + file->readNumber(); + _value = file->readNumber(); + CRoomAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/gondolier_song.h b/engines/titanic/sound/gondolier_song.h new file mode 100644 index 0000000000..0a7120c0fc --- /dev/null +++ b/engines/titanic/sound/gondolier_song.h @@ -0,0 +1,50 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_GONDOLIER_SONG_H +#define TITANIC_GONDOLIER_SONG_H + +#include "titanic/sound/room_auto_sound_player.h" + +namespace Titanic { + +class CGondolierSong : public CRoomAutoSoundPlayer { +public: + int _value; +public: + CLASSDEF; + CGondolierSong() : CRoomAutoSoundPlayer(), _value(0) {} + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_GONDOLIER_SONG_H */ diff --git a/engines/titanic/sound/music_player.cpp b/engines/titanic/sound/music_player.cpp new file mode 100644 index 0000000000..fb48ae8378 --- /dev/null +++ b/engines/titanic/sound/music_player.cpp @@ -0,0 +1,52 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/music_player.h" + +namespace Titanic { + +void CMusicPlayer::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldBC, indent); + file->writeQuotedLine(_string1, indent); + file->writeNumberLine(_fieldCC, indent); + file->writeNumberLine(_fieldD0, indent); + + CGameObject::save(file, indent); +} + +void CMusicPlayer::load(SimpleFile *file) { + file->readNumber(); + _fieldBC = file->readNumber(); + _string1 = file->readString(); + _fieldCC = file->readNumber(); + _fieldD0 = file->readNumber(); + + CGameObject::load(file); +} + +bool CMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) { + warning("TODO: CMusicPlayer::handleEvent"); + return true; +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/music_player.h b/engines/titanic/sound/music_player.h new file mode 100644 index 0000000000..a2c495d2eb --- /dev/null +++ b/engines/titanic/sound/music_player.h @@ -0,0 +1,56 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_MUSIC_PLAYER_H +#define TITANIC_MUSIC_PLAYER_H + +#include "titanic/core/game_object.h" +#include "titanic/messages/messages.h" + +namespace Titanic { + +class CMusicPlayer : public CGameObject { + bool EnterRoomMsg(CEnterRoomMsg *msg); +protected: + int _fieldBC; + CString _string1; + int _fieldCC; + int _fieldD0; +public: + CLASSDEF; + CMusicPlayer() : CGameObject(), + _fieldBC(0), _fieldCC(0), _fieldD0(100) {} + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_MUSIC_PLAYER_H */ diff --git a/engines/titanic/sound/music_room.cpp b/engines/titanic/sound/music_room.cpp new file mode 100644 index 0000000000..593c572277 --- /dev/null +++ b/engines/titanic/sound/music_room.cpp @@ -0,0 +1,36 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/music_room.h" +#include "common/textconsole.h" + +namespace Titanic { + +CMusicRoom::CMusicRoom(CGameManager *gameManager) : + _gameManager(gameManager) { +} + +void CMusicRoom::preLoad() { + warning("TODO: CMusicRoom::preLoad"); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/music_room.h b/engines/titanic/sound/music_room.h new file mode 100644 index 0000000000..ce262a2b99 --- /dev/null +++ b/engines/titanic/sound/music_room.h @@ -0,0 +1,44 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_MUSIC_ROOM_H +#define TITANIC_MUSIC_ROOM_H + +namespace Titanic { + +class CGameManager; + +class CMusicRoom { +public: + CGameManager *_gameManager; +public: + CMusicRoom(CGameManager *owner); + + /** + * Called when a game is about to be loaded + */ + void preLoad(); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_MUSIC_ROOM_H */ diff --git a/engines/titanic/sound/node_auto_sound_player.cpp b/engines/titanic/sound/node_auto_sound_player.cpp new file mode 100644 index 0000000000..f74c891644 --- /dev/null +++ b/engines/titanic/sound/node_auto_sound_player.cpp @@ -0,0 +1,44 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/node_auto_sound_player.h" + +namespace Titanic { + +void CNodeAutoSoundPlayer::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldEC, indent); + CAutoSoundPlayer::save(file, indent); +} + +void CNodeAutoSoundPlayer::load(SimpleFile *file) { + file->readNumber(); + _fieldEC = file->readNumber(); + CAutoSoundPlayer::load(file); +} + +bool CNodeAutoSoundPlayer::EnterNodeMsg(CEnterNodeMsg *msg) { + warning("CNodeAutoSoundPlayer::handleEvent"); + return true; +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/node_auto_sound_player.h b/engines/titanic/sound/node_auto_sound_player.h new file mode 100644 index 0000000000..e980841c36 --- /dev/null +++ b/engines/titanic/sound/node_auto_sound_player.h @@ -0,0 +1,52 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_NODE_AUTO_SOUND_PLAYER_H +#define TITANIC_NODE_AUTO_SOUND_PLAYER_H + +#include "titanic/sound/auto_sound_player.h" +#include "titanic/messages/messages.h" + +namespace Titanic { + +class CNodeAutoSoundPlayer : public CAutoSoundPlayer { + bool EnterNodeMsg(CEnterNodeMsg *msg); +private: + int _fieldEC; +public: + CLASSDEF; + CNodeAutoSoundPlayer() : CAutoSoundPlayer(), _fieldEC(1) {} + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_NODE_AUTO_SOUND_PLAYER_H */ diff --git a/engines/titanic/sound/restricted_auto_music_player.cpp b/engines/titanic/sound/restricted_auto_music_player.cpp new file mode 100644 index 0000000000..4ccfecc58d --- /dev/null +++ b/engines/titanic/sound/restricted_auto_music_player.cpp @@ -0,0 +1,52 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/restricted_auto_music_player.h" + +namespace Titanic { + +void CRestrictedAutoMusicPlayer::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeQuotedLine(_string3, indent); + file->writeQuotedLine(_string4, indent); + file->writeQuotedLine(_string5, indent); + file->writeQuotedLine(_string6, indent); + + CAutoMusicPlayer::save(file, indent); +} + +void CRestrictedAutoMusicPlayer::load(SimpleFile *file) { + file->readNumber(); + _string3 = file->readString(); + _string4 = file->readString(); + _string5 = file->readString(); + _string6 = file->readString(); + + CAutoMusicPlayer::load(file); +} + +bool CRestrictedAutoMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) { + warning("CRestrictedAutoMusicPlayer::handleEvent"); + return true; +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/restricted_auto_music_player.h b/engines/titanic/sound/restricted_auto_music_player.h new file mode 100644 index 0000000000..4a26d3770a --- /dev/null +++ b/engines/titanic/sound/restricted_auto_music_player.h @@ -0,0 +1,54 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_RESTRICTED_AUTO_MUSIC_PLAYER_H +#define TITANIC_RESTRICTED_AUTO_MUSIC_PLAYER_H + +#include "titanic/sound/auto_music_player.h" +#include "titanic/messages/messages.h" + +namespace Titanic { + +class CRestrictedAutoMusicPlayer : public CAutoMusicPlayer { + bool EnterRoomMsg(CEnterRoomMsg *msg); +private: + CString _string3; + CString _string4; + CString _string5; + CString _string6; +public: + CLASSDEF; + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_RESTRICTED_AUTO_MUSIC_PLAYER_H */ diff --git a/engines/titanic/sound/room_auto_sound_player.cpp b/engines/titanic/sound/room_auto_sound_player.cpp new file mode 100644 index 0000000000..da98d41329 --- /dev/null +++ b/engines/titanic/sound/room_auto_sound_player.cpp @@ -0,0 +1,42 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/room_auto_sound_player.h" + +namespace Titanic { + +void CRoomAutoSoundPlayer::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + CAutoSoundPlayer::save(file, indent); +} + +void CRoomAutoSoundPlayer::load(SimpleFile *file) { + file->readNumber(); + CAutoSoundPlayer::load(file); +} + +bool CRoomAutoSoundPlayer::EnterRoomMsg(CEnterRoomMsg *msg) { + warning("CRoomAutoSoundPlayer::handleEvent"); + return true; +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/room_auto_sound_player.h b/engines/titanic/sound/room_auto_sound_player.h new file mode 100644 index 0000000000..9c3feb5d91 --- /dev/null +++ b/engines/titanic/sound/room_auto_sound_player.h @@ -0,0 +1,49 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_ROOM_AUTO_SOUND_PLAYER_H +#define TITANIC_ROOM_AUTO_SOUND_PLAYER_H + +#include "titanic/sound/auto_sound_player.h" +#include "titanic/messages/messages.h" + +namespace Titanic { + +class CRoomAutoSoundPlayer : public CAutoSoundPlayer { + bool EnterRoomMsg(CEnterRoomMsg *msg); +public: + CLASSDEF; + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_ROOM_AUTO_SOUND_PLAYER_H */ diff --git a/engines/titanic/sound/room_trigger_auto_music_player.cpp b/engines/titanic/sound/room_trigger_auto_music_player.cpp new file mode 100644 index 0000000000..4506dfd7d4 --- /dev/null +++ b/engines/titanic/sound/room_trigger_auto_music_player.cpp @@ -0,0 +1,42 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/room_trigger_auto_music_player.h" + +namespace Titanic { + +void CRoomTriggerAutoMusicPlayer::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + CTriggerAutoMusicPlayer::save(file, indent); +} + +void CRoomTriggerAutoMusicPlayer::load(SimpleFile *file) { + file->readNumber(); + CTriggerAutoMusicPlayer::load(file); +} + +bool CRoomTriggerAutoMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) { + warning("CRoomTriggerAutoMusicPlayer::handleEvent"); + return true; +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/room_trigger_auto_music_player.h b/engines/titanic/sound/room_trigger_auto_music_player.h new file mode 100644 index 0000000000..250adad864 --- /dev/null +++ b/engines/titanic/sound/room_trigger_auto_music_player.h @@ -0,0 +1,49 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_ROOM_TRIGGER_AUTO_MUSIC_PLAYER_H +#define TITANIC_ROOM_TRIGGER_AUTO_MUSIC_PLAYER_H + +#include "titanic/sound/trigger_auto_music_player.h" +#include "titanic/messages/messages.h" + +namespace Titanic { + +class CRoomTriggerAutoMusicPlayer : public CTriggerAutoMusicPlayer { + bool EnterRoomMsg(CEnterRoomMsg *msg); +public: + CLASSDEF; + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_ROOM_TRIGGER_AUTO_MUSIC_PLAYER_H */ diff --git a/engines/titanic/sound/season_noises.cpp b/engines/titanic/sound/season_noises.cpp new file mode 100644 index 0000000000..e7307654fe --- /dev/null +++ b/engines/titanic/sound/season_noises.cpp @@ -0,0 +1,53 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/season_noises.h" + +namespace Titanic { + +CSeasonNoises::CSeasonNoises() : CViewAutoSoundPlayer(), _fieldF0(0), + _string2("NULL"), _string3("NULL"), _string4("NULL"), _string5("NULL") { +} + +void CSeasonNoises::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldF0, indent); + file->writeQuotedLine(_string2, indent); + file->writeQuotedLine(_string3, indent); + file->writeQuotedLine(_string4, indent); + file->writeQuotedLine(_string5, indent); + + CViewAutoSoundPlayer::save(file, indent); +} + +void CSeasonNoises::load(SimpleFile *file) { + file->readNumber(); + _fieldF0 = file->readNumber(); + _string2 = file->readString(); + _string3 = file->readString(); + _string4 = file->readString(); + _string5 = file->readString(); + + CViewAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/season_noises.h b/engines/titanic/sound/season_noises.h new file mode 100644 index 0000000000..ff39b01d73 --- /dev/null +++ b/engines/titanic/sound/season_noises.h @@ -0,0 +1,54 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_SEASON_NOISES_H +#define TITANIC_SEASON_NOISES_H + +#include "titanic/sound/view_auto_sound_player.h" + +namespace Titanic { + +class CSeasonNoises : public CViewAutoSoundPlayer { +private: + int _fieldF0; + CString _string2; + CString _string3; + CString _string4; + CString _string5; +public: + CLASSDEF; + CSeasonNoises(); + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_SEASON_NOISES_H */ diff --git a/engines/titanic/sound/seasonal_music_player.cpp b/engines/titanic/sound/seasonal_music_player.cpp new file mode 100644 index 0000000000..8ac6eb6763 --- /dev/null +++ b/engines/titanic/sound/seasonal_music_player.cpp @@ -0,0 +1,66 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/seasonal_music_player.h" + +namespace Titanic { + +CSeasonalMusicPlayer::CSeasonalMusicPlayer() : CAutoMusicPlayerBase() { + _fieldD8 = 0; + _fieldDC = 1; + _fieldE0 = 0; + _fieldE4 = 0; + _fieldE8 = -4; + _fieldEC = -2; + _fieldF0 = -4; + _fieldF4 = -4; +} + +void CSeasonalMusicPlayer::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldD8, indent); + file->writeNumberLine(_fieldDC, indent); + file->writeNumberLine(_fieldE0, indent); + file->writeNumberLine(_fieldE4, indent); + file->writeNumberLine(_fieldE8, indent); + file->writeNumberLine(_fieldEC, indent); + file->writeNumberLine(_fieldF0, indent); + file->writeNumberLine(_fieldF4, indent); + + CAutoMusicPlayerBase::save(file, indent); +} + +void CSeasonalMusicPlayer::load(SimpleFile *file) { + file->readNumber(); + _fieldD8 = file->readNumber(); + _fieldDC = file->readNumber(); + _fieldE0 = file->readNumber(); + _fieldE4 = file->readNumber(); + _fieldE8 = file->readNumber(); + _fieldEC = file->readNumber(); + _fieldF0 = file->readNumber(); + _fieldF4 = file->readNumber(); + + CAutoMusicPlayerBase::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/seasonal_music_player.h b/engines/titanic/sound/seasonal_music_player.h new file mode 100644 index 0000000000..30c296d24d --- /dev/null +++ b/engines/titanic/sound/seasonal_music_player.h @@ -0,0 +1,57 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_SEASONAL_MUSIC_PLAYER_H +#define TITANIC_SEASONAL_MUSIC_PLAYER_H + +#include "titanic/sound/auto_music_player_base.h" + +namespace Titanic { + +class CSeasonalMusicPlayer : public CAutoMusicPlayerBase { +private: + int _fieldD8; + int _fieldDC; + int _fieldE0; + int _fieldE4; + int _fieldE8; + int _fieldEC; + int _fieldF0; + int _fieldF4; +public: + CLASSDEF; + CSeasonalMusicPlayer(); + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_LINK_ITEM_H */ diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp new file mode 100644 index 0000000000..7968a088da --- /dev/null +++ b/engines/titanic/sound/sound.cpp @@ -0,0 +1,143 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/sound.h" +#include "titanic/game_manager.h" +#include "titanic/titanic.h" + +namespace Titanic { + +int CSoundItem::fn1() { + // TODO + return 0; +} + +CSound::CSound(CGameManager *owner) : _gameManager(owner) { + g_vm->_movieManager.setSoundManager(&_soundManager); +} + +void CSound::save(SimpleFile *file) const { + _soundManager.save(file); +} + +void CSound::load(SimpleFile *file) { + _soundManager.load(file); +} + +void CSound::preLoad() { + _soundManager.preLoad(); + + if (_gameManager) + _gameManager->_musicRoom.preLoad(); +} + +void CSound::preEnterView(CViewItem *newView, bool isNewRoom) { + warning("CSound::preEnterView"); +} + +bool CSound::fn1(int val) { + if (val == 0 || val == -1) { + if (!_soundManager.proc14()) + return true; + } + + return false; +} + +void CSound::fn2(int handle) { + warning("TODO: CSound::fn3"); +} + +void CSound::fn3(int handle, int val2, int val3) { + warning("TODO: CSound::fn3"); +} + +int CSound::playSpeech(CDialogueFile *dialogueFile, int speechId, const CProximity &prox) { + warning("TODO: CSound::playSpeech"); + return 0; +} + +uint CSound::loadSound(const CString &name) { + checkSounds(); + + // Check whether an entry for the given name is already active + for (CSoundItemList::iterator i = _sounds.begin(); i != _sounds.end(); ++i) { + CSoundItem *soundItem = *i; + if (soundItem->_name == name) { + // Found it, so move it to the front of the list and return + _sounds.remove(soundItem); + _sounds.push_front(soundItem); + return soundItem->_soundHandle; + } + } + + // Create new sound item + CSoundItem *soundItem = new CSoundItem(name); + soundItem->_soundHandle = _soundManager.loadSound(name); + + if (!soundItem->_soundHandle) { + // Could load sound, so destroy new item and return + delete soundItem; + return 0; + } + + // Add the item to the list of sounds + _sounds.push_front(soundItem); + + // If there are more than 10 sounds loaded, remove the last one, + // which is the least recently used of all of them + if (_sounds.size() > 10) + removeOldest(); + + return soundItem->_soundHandle; +} + +void CSound::checkSounds() { + for (CSoundItemList::iterator i = _sounds.begin(); i != _sounds.end(); ++i) { + CSoundItem *soundItem = *i; + if (soundItem->_field24 && soundItem->_field28) { + if (_soundManager.isActive(soundItem->_soundHandle)) { + _sounds.remove(soundItem); + delete soundItem; + } + } + } +} + +void CSound::removeOldest() { + for (CSoundItemList::iterator i = _sounds.reverse_begin(); + i != _sounds.end(); --i) { + CSoundItem *soundItem = *i; + if (soundItem->_field28 && !_soundManager.isActive(soundItem->_soundHandle)) { + _sounds.remove(soundItem); + delete soundItem; + break; + } + } +} + +CSoundItem *CSound::getTrueTalkSound(CDialogueFile *dialogueFile, int index) { + warning("TODO: CSound::getTrueTalkSound"); + return nullptr; +} + +} // End of namespace Titanic z diff --git a/engines/titanic/sound/sound.h b/engines/titanic/sound/sound.h new file mode 100644 index 0000000000..f550493624 --- /dev/null +++ b/engines/titanic/sound/sound.h @@ -0,0 +1,135 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_SOUND_H +#define TITANIC_SOUND_H + +#include "titanic/support/simple_file.h" +#include "titanic/support/proximity.h" +#include "titanic/sound/sound_manager.h" +#include "titanic/core/list.h" +#include "titanic/core/view_item.h" +#include "titanic/true_talk/dialogue_file.h" + +namespace Titanic { + +class CGameManager; + +class CSoundItem : public ListItem { +public: + CString _name; + int _soundHandle; + int _field1C; + int _field20; + int _field24; + int _field28; +public: + CSoundItem() : ListItem(), _soundHandle(0), _field1C(0), + _field20(0), _field24(0), _field28(0) {} + CSoundItem(const CString &name) : ListItem(), _name(name), + _soundHandle(0), _field1C(0), _field20(0), _field24(0), _field28(0) {} + + int fn1(); +}; + +class CSoundItemList : public List<CSoundItem> { +}; + +class CSound { +private: + CGameManager *_gameManager; + CSoundItemList _sounds; +private: + /** + * Check whether any sounds are done and can be be removed + */ + void checkSounds(); + + /** + * Removes the oldest sound from the sounds list that isn't + * currently playing + */ + void removeOldest(); +public: + QSoundManager _soundManager; +public: + CSound(CGameManager *owner); + + /** + * Save the data for the class to file + */ + void save(SimpleFile *file) const; + + /** + * Load the data for the class from file + */ + void load(SimpleFile *file); + + /** + * Called when a game is about to be loaded + */ + void preLoad(); + + /** + * Called when loading a game is complete + */ + void postLoad() { _soundManager.postLoad(); } + + /** + * Called when a game is about to be saved + */ + void preSave() { _soundManager.preSave(); } + + /** + * Called when a game has finished being saved + */ + void postSave() { _soundManager.postSave(); } + + /** + * Called when the view has been changed + */ + void preEnterView(CViewItem *newView, bool isNewRoom); + + /** + * Load a sound + * @param name Name of sound resource + * @returns Sound handle Id + */ + uint loadSound(const CString &name); + + bool fn1(int val); + void fn2(int handle); + void fn3(int handle, int val2, int val3); + + /** + * Play a speech + */ + int playSpeech(CDialogueFile *dialogueFile, int speechId, const CProximity &prox); + + void managerProc8(int v) { _soundManager.proc8(v); } + + CSoundItem *getTrueTalkSound(CDialogueFile *dialogueFile, int index); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_SOUND_H */ diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp new file mode 100644 index 0000000000..1cafe3bafa --- /dev/null +++ b/engines/titanic/sound/sound_manager.cpp @@ -0,0 +1,128 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/sound_manager.h" + +namespace Titanic { + +CSoundManager::CSoundManager() : _musicPercent(75.0), _speechPercent(75.0), + _masterPercent(75.0), _parrotPercent(75.0), _field14(1) { +} + +/*------------------------------------------------------------------------*/ + +QSoundManager::QSoundManager() : _field18(0), _field1C(0) { + Common::fill(&_field4A0[0], &_field4A0[16], 0); +} + +int QSoundManager::loadSound(const CString &name) { + warning("TODO"); + return 0; +} + +int QSoundManager::proc4() const { + warning("TODO"); + return 0; +} + +int QSoundManager::proc5() const { + warning("TODO"); + return 0; +} + +void QSoundManager::proc6() { + warning("TODO"); +} + +void QSoundManager::proc7() { + warning("TODO"); +} + +void QSoundManager::proc8(int v) { + warning("TODO"); +} + +void QSoundManager::proc9() { + warning("TODO"); +} + +void QSoundManager::proc10() { + warning("TODO"); +} + +void QSoundManager::proc11() { + warning("TODO"); +} + +void QSoundManager::proc12() { + warning("TODO"); +} + +void QSoundManager::proc13() { + warning("TODO"); +} + +bool QSoundManager::proc14() { + warning("TODO"); + return false; +} + +bool QSoundManager::isActive(int handle) const { + warning("TODO"); + return false; +} + +int QSoundManager::proc16() const { + warning("TODO"); + return 0; +} + +void QSoundManager::WaveMixPump() { + warning("TODO"); +} + +bool QSoundManager::movieStarted() const { + // TODO + return 0; +} + +void QSoundManager::proc19(int v) { + warning("TODO"); +} + +void QSoundManager::proc20(int v) { + warning("TODO"); +} + +void QSoundManager::proc21(int v) { + warning("TODO"); +} + +void QSoundManager::proc29() { + warning("TODO"); +} + +void QSoundManager::proc30() { + warning("TODO"); +} + +} // End of namespace Titanic z diff --git a/engines/titanic/sound/sound_manager.h b/engines/titanic/sound/sound_manager.h new file mode 100644 index 0000000000..a65162d779 --- /dev/null +++ b/engines/titanic/sound/sound_manager.h @@ -0,0 +1,153 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_SOUND_MANAGER_H +#define TITANIC_SOUND_MANAGER_H + +#include "titanic/support/simple_file.h" + +namespace Titanic { + +class CSoundManager { +protected: + double _musicPercent; + double _speechPercent; + double _masterPercent; + double _parrotPercent; + int _field14; +public: + CSoundManager(); + virtual ~CSoundManager() {} + + /** + * Loads a sound + * @param name Name of sound resource + * @returns Loaded sound handle + */ + virtual int loadSound(const CString &name) { return 0; } + + virtual int proc4() const { return 0; } + virtual int proc5() const { return 0; } + virtual void proc6() = 0; + virtual void proc7() = 0; + virtual void proc8(int v) = 0; + virtual void proc9() {} + virtual void proc10() = 0; + virtual void proc11() = 0; + virtual void proc12() {} + virtual void proc13() {} + virtual bool proc14() = 0; + virtual bool isActive(int handle) const { return false; } + virtual int proc16() const { return 0; } + virtual void WaveMixPump() {} + + /** + * Called when a movie with audio is started + */ + virtual bool movieStarted() const { return false; } + + virtual void setMusicPercent(double percent) { _musicPercent = percent; } + virtual void setSpeechPercent(double percent) { _speechPercent = percent; } + virtual void setMasterPercent(double percent) { _masterPercent = percent; } + virtual void setParrotPercent(double percent) { _parrotPercent = percent; } + + /** + * Called when a game is about to be loaded + */ + virtual void preLoad() { proc10(); } + + /** + * Load the data for the class from file + */ + void load(SimpleFile *file) {} + + /** + * Called after loading of a game is completed + */ + virtual void postLoad() {} + + /** + * Called when a game is about to be saved + */ + virtual void preSave() {} + + /** + * Save the data for the class to file + */ + void save(SimpleFile *file) const {} + + /** + * Called after saving is complete + */ + virtual void postSave() {} + + virtual void proc29() {} +}; + +class QSoundManager : public CSoundManager { +public: + int _field18; + int _field1C; + + int _field4A0[16]; +public: + QSoundManager(); + + /** + * Loads a sound + * @param name Name of sound resource + * @returns Loaded sound handle + */ + virtual int loadSound(const CString &name); + + virtual int proc4() const; + virtual int proc5() const; + virtual void proc6(); + virtual void proc7(); + virtual void proc8(int v); + virtual void proc9(); + virtual void proc10(); + virtual void proc11(); + virtual void proc12(); + virtual void proc13(); + virtual bool proc14(); + virtual bool isActive(int handle) const; + virtual int proc16() const; + virtual void WaveMixPump(); + + + /** + * Called when a movie with audio is started + */ + virtual bool movieStarted() const; + + virtual void proc19(int v); + virtual void proc20(int v); + virtual void proc21(int v); + + virtual void proc29(); + virtual void proc30(); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_QSOUND_MANAGER_H */ diff --git a/engines/titanic/sound/titania_speech.cpp b/engines/titanic/sound/titania_speech.cpp new file mode 100644 index 0000000000..f9d5b91705 --- /dev/null +++ b/engines/titanic/sound/titania_speech.cpp @@ -0,0 +1,48 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/titania_speech.h" + +namespace Titanic { + +void CTitaniaSpeech::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_value1, indent); + file->writeNumberLine(_value2, indent); + + CGameObject::save(file, indent); +} + +void CTitaniaSpeech::load(SimpleFile *file) { + file->readNumber(); + _value1 = file->readNumber(); + _value2 = file->readNumber(); + + CGameObject::load(file); +} + +bool CTitaniaSpeech::EnterRoomMsg(CEnterRoomMsg *msg) { + warning("CTitaniaSpeech::handleEvent"); + return true; +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/titania_speech.h b/engines/titanic/sound/titania_speech.h new file mode 100644 index 0000000000..c9b93043f6 --- /dev/null +++ b/engines/titanic/sound/titania_speech.h @@ -0,0 +1,52 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_TITANIA_SPEECH_H +#define TITANIC_TITANIA_SPEECH_H + +#include "titanic/core/game_object.h" +#include "titanic/messages/messages.h" + +namespace Titanic { + +class CTitaniaSpeech : public CGameObject { + bool EnterRoomMsg(CEnterRoomMsg *msg); +private: + int _value1, _value2; +public: + CLASSDEF; + CTitaniaSpeech() : CGameObject(), _value1(1), _value2(0) {} + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_TITANIA_SPEECH_H */ diff --git a/engines/titanic/sound/trigger_auto_music_player.cpp b/engines/titanic/sound/trigger_auto_music_player.cpp new file mode 100644 index 0000000000..21050e0877 --- /dev/null +++ b/engines/titanic/sound/trigger_auto_music_player.cpp @@ -0,0 +1,39 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/trigger_auto_music_player.h" + +namespace Titanic { + +void CTriggerAutoMusicPlayer::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeQuotedLine(_fieldBC, indent); + CGameObject::save(file, indent); +} + +void CTriggerAutoMusicPlayer::load(SimpleFile *file) { + file->readNumber(); + _fieldBC = file->readString(); + CGameObject::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/trigger_auto_music_player.h b/engines/titanic/sound/trigger_auto_music_player.h new file mode 100644 index 0000000000..537e780db6 --- /dev/null +++ b/engines/titanic/sound/trigger_auto_music_player.h @@ -0,0 +1,49 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_TRIGGER_AUTO_MUSIC_PLAYER_H +#define TITANIC_TRIGGER_AUTO_MUSIC_PLAYER_H + +#include "titanic/core/game_object.h" + +namespace Titanic { + +class CTriggerAutoMusicPlayer : public CGameObject { +protected: + CString _fieldBC; +public: + CLASSDEF; + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_TRIGGER_AUTO_MUSIC_PLAYER_H */ diff --git a/engines/titanic/sound/view_auto_sound_player.cpp b/engines/titanic/sound/view_auto_sound_player.cpp new file mode 100644 index 0000000000..91507488fd --- /dev/null +++ b/engines/titanic/sound/view_auto_sound_player.cpp @@ -0,0 +1,39 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/view_auto_sound_player.h" + +namespace Titanic { + +void CViewAutoSoundPlayer::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldEC, indent); + CAutoSoundPlayer::save(file, indent); +} + +void CViewAutoSoundPlayer::load(SimpleFile *file) { + file->readNumber(); + _fieldEC = file->readNumber(); + CAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/view_auto_sound_player.h b/engines/titanic/sound/view_auto_sound_player.h new file mode 100644 index 0000000000..29bdee71a0 --- /dev/null +++ b/engines/titanic/sound/view_auto_sound_player.h @@ -0,0 +1,50 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_VIEW_AUTO_SOUND_PLAYER_H +#define TITANIC_VIEW_AUTO_SOUND_PLAYER_H + +#include "titanic/sound/auto_sound_player.h" + +namespace Titanic { + +class CViewAutoSoundPlayer : public CAutoSoundPlayer { +private: + int _fieldEC; +public: + CLASSDEF; + CViewAutoSoundPlayer() : CAutoSoundPlayer(), _fieldEC(0) {} + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_VIEW_AUTO_SOUND_PLAYER_H */ diff --git a/engines/titanic/sound/view_toggles_other_music.cpp b/engines/titanic/sound/view_toggles_other_music.cpp new file mode 100644 index 0000000000..35888fba9d --- /dev/null +++ b/engines/titanic/sound/view_toggles_other_music.cpp @@ -0,0 +1,44 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/view_toggles_other_music.h" + +namespace Titanic { + +CViewTogglesOtherMusic::CViewTogglesOtherMusic() : CEnterViewTogglesOtherMusic(), _fieldCC(0) { +} + +void CViewTogglesOtherMusic::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldCC, indent); + + CEnterViewTogglesOtherMusic::save(file, indent); +} + +void CViewTogglesOtherMusic::load(SimpleFile *file) { + file->readNumber(); + _fieldCC = file->readNumber(); + + CEnterViewTogglesOtherMusic::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/view_toggles_other_music.h b/engines/titanic/sound/view_toggles_other_music.h new file mode 100644 index 0000000000..a5ba68ba45 --- /dev/null +++ b/engines/titanic/sound/view_toggles_other_music.h @@ -0,0 +1,50 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_VIEW_TOGGLES_OTHER_MUSIC_H +#define TITANIC_VIEW_TOGGLES_OTHER_MUSIC_H + +#include "titanic/sound/enter_view_toggles_other_music.h" + +namespace Titanic { + +class CViewTogglesOtherMusic : public CEnterViewTogglesOtherMusic { +private: + int _fieldCC; +public: + CLASSDEF; + CViewTogglesOtherMusic(); + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_VIEW_TOGGLES_OTHER_MUSIC_H */ diff --git a/engines/titanic/sound/water_lapping_sounds.cpp b/engines/titanic/sound/water_lapping_sounds.cpp new file mode 100644 index 0000000000..c33db412e1 --- /dev/null +++ b/engines/titanic/sound/water_lapping_sounds.cpp @@ -0,0 +1,49 @@ +/* ScummVM - Graphic Adventure Engine +* +* ScummVM is the legal property of its developers, whose names +* are too numerous to list here. Please refer to the COPYRIGHT +* file distributed with this source distribution. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +*/ + +#include "titanic/sound/water_lapping_sounds.h" + +namespace Titanic { + +EMPTY_MESSAGE_MAP(CWaterLappingSounds, CRoomAutoSoundPlayer); + +void CWaterLappingSounds::save(SimpleFile *file, int indent) { + file->writeNumberLine(1, indent); + file->writeQuotedLine(_string1, indent); + file->writeNumberLine(_fieldD4, indent); + file->writeNumberLine(_fieldE0, indent); + file->writeNumberLine(_value, indent); + + CRoomAutoSoundPlayer::save(file, indent); +} + +void CWaterLappingSounds::load(SimpleFile *file) { + file->readNumber(); + _string1 = file->readString(); + _fieldD4 = file->readNumber(); + _fieldE0 = file->readNumber(); + _value = file->readNumber(); + + CRoomAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/water_lapping_sounds.h b/engines/titanic/sound/water_lapping_sounds.h new file mode 100644 index 0000000000..5db41a312e --- /dev/null +++ b/engines/titanic/sound/water_lapping_sounds.h @@ -0,0 +1,51 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_WATER_LAPPING_SOUNDS_H +#define TITANIC_WATER_LAPPING_SOUNDS_H + +#include "titanic/sound/room_auto_sound_player.h" + +namespace Titanic { + +class CWaterLappingSounds : public CRoomAutoSoundPlayer { + DECLARE_MESSAGE_MAP; +public: + int _value; +public: + CLASSDEF; + CWaterLappingSounds() : CRoomAutoSoundPlayer(), _value(0) {} + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent); + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_WATER_LAPPING_SOUNDS_H */ diff --git a/engines/titanic/sound/wave_file.cpp b/engines/titanic/sound/wave_file.cpp new file mode 100644 index 0000000000..288f5f525d --- /dev/null +++ b/engines/titanic/sound/wave_file.cpp @@ -0,0 +1,27 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/sound/wave_file.h" + +namespace Titanic { + +} // End of namespace Titanic z diff --git a/engines/titanic/sound/wave_file.h b/engines/titanic/sound/wave_file.h new file mode 100644 index 0000000000..0bb836ef74 --- /dev/null +++ b/engines/titanic/sound/wave_file.h @@ -0,0 +1,54 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef TITANIC_WAVE_FILE_H +#define TITANIC_WAVE_FILE_H + +#include "titanic/support/simple_file.h" + +namespace Titanic { + +class CSoundManager; + +class WaveFile { +public: + int _field0; + int _field4; + int _field8; + uint _handle; + CSoundManager *_owner; + int _field14; + int _field18; + int _field1C; + int _field20; + int _field24; + int _field28; + int _field2C; +public: + WaveFile() : _field0(2), _field4(0), _field8(0), _handle(0), + _owner(nullptr), _field14(1), _field18(0), _field1C(0), + _field20(0), _field24(0), _field28(0), _field2C(-1) {} +}; + +} // End of namespace Titanic + +#endif /* TITANIC_WAVE_FILE_H */ |