diff options
author | Strangerke | 2012-04-20 19:43:31 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | f2512b82c2fcd991a0a6d7f0c83bdb0aa438681e (patch) | |
tree | 82c7c2a28074b6dc73c51d4fba886ca6cc47e17e /engines | |
parent | 70f1d349c538842ed981f0950ff55f05111adb2e (diff) | |
download | scummvm-rg350-f2512b82c2fcd991a0a6d7f0c83bdb0aa438681e.tar.gz scummvm-rg350-f2512b82c2fcd991a0a6d7f0c83bdb0aa438681e.tar.bz2 scummvm-rg350-f2512b82c2fcd991a0a6d7f0c83bdb0aa438681e.zip |
LILLIPUT: Put sound stubs in a separated class
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lilliput/lilliput.cpp | 7 | ||||
-rw-r--r-- | engines/lilliput/lilliput.h | 7 | ||||
-rw-r--r-- | engines/lilliput/module.mk | 3 | ||||
-rw-r--r-- | engines/lilliput/script.cpp | 23 | ||||
-rw-r--r-- | engines/lilliput/sound.cpp | 60 | ||||
-rw-r--r-- | engines/lilliput/sound.h | 49 |
6 files changed, 135 insertions, 14 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index eb49ea1fd3..0014ec37ef 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -33,6 +33,7 @@ #include "lilliput/lilliput.h" #include "engines/util.h" #include "lilliput/script.h" +#include "lilliput/sound.h" namespace Lilliput { @@ -109,6 +110,7 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd) _system = syst; DebugMan.addDebugChannel(kDebugEngine, "Engine", "Engine debug level"); DebugMan.addDebugChannel(kDebugScript, "Script", "Script debug level"); + DebugMan.addDebugChannel(kDebugSound, "Sound", "Sound debug level"); _console = new LilliputConsole(this); _rnd = 0; @@ -125,6 +127,7 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd) _skipDisplayFlag2 = 0; _scriptHandler = new LilliputScript(this); + _soundHandler = new LilliputSound(this); _byte1714E = 0; _byte12FCE = 0; @@ -231,7 +234,7 @@ void LilliputEngine::newInt8() { // return; // if (_soundEnabled) - warning("TODO: call sound function #1"); + _soundHandler->contentFct1(); if (_byte12A08 != 1) { _byte12A08 = 1; @@ -766,7 +769,7 @@ void LilliputEngine::sub163F0(int var1, int var3) { var4 = 0; } while ((var2 != 0) && (var4 !=0)); - warning("Sound function #5"); + _soundHandler->contentFct5(); } void LilliputEngine::sub16553(byte *buf) { diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h index 8a3f87c63a..298a367d3d 100644 --- a/engines/lilliput/lilliput.h +++ b/engines/lilliput/lilliput.h @@ -25,6 +25,7 @@ #include "lilliput/console.h" #include "lilliput/script.h" +#include "lilliput/sound.h" #include "common/file.h" #include "engines/engine.h" @@ -55,8 +56,9 @@ enum GameType { }; enum LilliputDebugChannels { - kDebugEngine = 1 << 0, - kDebugScript = 1 << 1 + kDebugEngine = 1 << 0, + kDebugScript = 1 << 1, + kDebugSound = 1 << 2 }; struct LilliputGameDescription; @@ -79,6 +81,7 @@ public: Common::RandomSource *_rnd; LilliputScript *_scriptHandler; + LilliputSound *_soundHandler; Graphics::Surface *_mainSurface; struct18560 _arr18560[4]; diff --git a/engines/lilliput/module.mk b/engines/lilliput/module.mk index 6f701a3e43..807f53639c 100644 --- a/engines/lilliput/module.mk +++ b/engines/lilliput/module.mk @@ -4,7 +4,8 @@ MODULE_OBJS = \ console.o \ detection.o \ lilliput.o \ - script.o + script.o \ + sound.o MODULE_DIRS += \ engines/lilliput diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index 576e738cbd..a6a10e5e23 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -1819,7 +1819,7 @@ void LilliputScript::OC_displayTitleScreen() { } void LilliputScript::OC_sub1853B() { - debugC(1, kDebugScript, "OC_initArr1853B()"); + debugC(1, kDebugScript, "OC_sub1853B()"); OC_unkPaletteFunction_1(); _byte16F08 = 0; @@ -1830,7 +1830,8 @@ void LilliputScript::OC_sub1853B() { OC_unkPaletteFunction_2(); _byte12A09 = 0; - warning("TODO: call sound function #5"); + + _vm->_soundHandler->contentFct5(); } void LilliputScript::OC_sub1864D() { @@ -1884,7 +1885,7 @@ void LilliputScript::OC_sub186E5_snd() { byte var2l = (_word12A02 & 0xFF); int var1 = _currScript->readUint16LE(); - warning("TODO: call sound function #2"); + _vm->_soundHandler->contentFct2(); } void LilliputScript::OC_sub1870A_snd() { @@ -1894,27 +1895,30 @@ void LilliputScript::OC_sub1870A_snd() { int var4 = var3; int var2 = (_word12A00 << 8) + _word12A02; int var1 = (_currScript->readUint16LE() & 0xFF); - warning("TODO: ovlContentOVL Function 2"); + + _vm->_soundHandler->contentFct2(); } void LilliputScript::OC_sub18725_snd() { debugC(1, kDebugScript, "OC_sub18725_snd()"); int var4 = getValue1() | 0xFF00; - warning("TODO: ovlContentOVL Function 3"); + + _vm->_soundHandler->contentFct3(); } void LilliputScript::OC_sub18733_snd() { debugC(1, kDebugScript, "OC_sub18733_snd()"); int var4 = getValue2(); - warning("TODO: ovlContentOVL Function 3"); + + _vm->_soundHandler->contentFct3(); } void LilliputScript::OC_sub1873F_snd() { debugC(1, kDebugScript, "OC_sub1873F_snd()"); - warning("TODO: ovlContentOVL Function 4"); + _vm->_soundHandler->contentFct4(); } void LilliputScript::OC_sub18746_snd() { @@ -1923,13 +1927,14 @@ void LilliputScript::OC_sub18746_snd() { int var4 = -1; int var2 = (_word12A00 << 8) + _word12A02; int var1 = _currScript->readUint16LE() & 0xFF; - warning("TODO: ovlContentOVL Function 2"); + + _vm->_soundHandler->contentFct2(); } void LilliputScript::OC_sub1875D_snd() { debugC(1, kDebugScript, "OC_sub1875D_snd()"); - warning("TODO: ovlContentOVL Function 6"); + _vm->_soundHandler->contentFct6(); } void LilliputScript::OC_sub18764() { diff --git a/engines/lilliput/sound.cpp b/engines/lilliput/sound.cpp new file mode 100644 index 0000000000..d5f37d7df0 --- /dev/null +++ b/engines/lilliput/sound.cpp @@ -0,0 +1,60 @@ +/* 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 "lilliput/lilliput.h" +#include "lilliput/sound.h" + +#include "common/debug.h" + +namespace Lilliput { + +LilliputSound::LilliputSound(LilliputEngine *vm) : _vm(vm) { +} + +LilliputSound::~LilliputSound() { +} + +void LilliputSound::contentFct1() { + debugC(1, kDebugSound, "contentFct1()"); +} + +void LilliputSound::contentFct2() { + debugC(1, kDebugSound, "contentFct2()"); +} + +void LilliputSound::contentFct3() { + debugC(1, kDebugSound, "contentFct3()"); +} + +void LilliputSound::contentFct4() { + debugC(1, kDebugSound, "contentFct4()"); +} + +void LilliputSound::contentFct5() { + debugC(1, kDebugSound, "contentFct5()"); +} + +void LilliputSound::contentFct6() { + debugC(1, kDebugSound, "contentFct6()"); +} + +} // End of namespace diff --git a/engines/lilliput/sound.h b/engines/lilliput/sound.h new file mode 100644 index 0000000000..5fa84bfbcb --- /dev/null +++ b/engines/lilliput/sound.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 LILLIPUT_SOUND_H +#define LILLIPUT_SOUND_H + +namespace Lilliput { + +class LilliputEngine; + +class LilliputSound { +public: + LilliputSound(LilliputEngine *vm); + ~LilliputSound(); + + void contentFct1(); + void contentFct2(); + void contentFct3(); + void contentFct4(); + void contentFct5(); + void contentFct6(); + +private: + LilliputEngine *_vm; +}; + +} // End of namespace Lilliput + +#endif + |