diff options
author | Strangerke | 2018-04-16 06:54:04 +0200 |
---|---|---|
committer | Strangerke | 2018-04-16 06:54:04 +0200 |
commit | f01af1690e1e8f7169ba8b263e1c9cf71bdfe287 (patch) | |
tree | b1e8180a2d530a7f0708c583d0b38deb4dba7811 /engines/lilliput/sound.cpp | |
parent | 0922d44199aa492cd57bc3fe1a40e0ff631e98ba (diff) | |
download | scummvm-rg350-f01af1690e1e8f7169ba8b263e1c9cf71bdfe287.tar.gz scummvm-rg350-f01af1690e1e8f7169ba8b263e1c9cf71bdfe287.tar.bz2 scummvm-rg350-f01af1690e1e8f7169ba8b263e1c9cf71bdfe287.zip |
LILLIPUT: Fix a regresssion in scrollToViewportCharacterTarget(), some more renaming
Diffstat (limited to 'engines/lilliput/sound.cpp')
-rw-r--r-- | engines/lilliput/sound.cpp | 54 |
1 files changed, 39 insertions, 15 deletions
diff --git a/engines/lilliput/sound.cpp b/engines/lilliput/sound.cpp index d94cf1eb76..78de105784 100644 --- a/engines/lilliput/sound.cpp +++ b/engines/lilliput/sound.cpp @@ -31,35 +31,59 @@ LilliputSound::LilliputSound(LilliputEngine *vm) : _vm(vm) { } LilliputSound::~LilliputSound() { + free(_musicBuff); } -// Used during initialisation -void LilliputSound::contentFct0() { - debugC(1, kDebugSound, "contentFct0()"); +void LilliputSound::loadMusic(Common::String filename) { + debugC(1, kDebugSound, "loadMusic(%s)", filename.c_str()); + + Common::File f; + + if (!f.open(filename)) + error("Missing music file %s", filename.c_str()); + + byte *res = (byte *)malloc(sizeof(byte) * 50000); + for (int i = 0; i < 50000; ++i) + res[i] = f.readByte(); + +// f.close(); + f.seek(0); + int filenumb = f.readUint16LE(); + + + + free(res); +} + +// Used during initialization +void LilliputSound::init() { + debugC(1, kDebugSound, "LilliputSound::init()"); + + loadMusic("ROBIN.MUS"); } -void LilliputSound::contentFct1() { - debugC(1, kDebugSound, "contentFct1()"); +void LilliputSound::refresh() { + debugC(1, kDebugSound, "LilliputSound::refresh()"); } -void LilliputSound::contentFct2(int var1, Common::Point var2, Common::Point var3, Common::Point var4) { - debugC(1, kDebugSound, "contentFct2(%d, %d - %d, %d - %d, %d - %d)", var1, var2.x, var2.y, var3.x, var3.y, var4.x, var4.y); +void LilliputSound::play(int var1, Common::Point var2, Common::Point var3, Common::Point var4) { + debugC(1, kDebugSound, "LilliputSound::play(%d, %d - %d, %d - %d, %d - %d)", var1, var2.x, var2.y, var3.x, var3.y, var4.x, var4.y); } -void LilliputSound::contentFct3(Common::Point pos) { - debugC(1, kDebugSound, "contentFct3(%d - %d)", pos.x, pos.y); +void LilliputSound::stop(Common::Point pos) { + debugC(1, kDebugSound, "LilliputSound::stop(%d - %d)", pos.x, pos.y); } -void LilliputSound::contentFct4() { - debugC(1, kDebugSound, "contentFct4()"); +void LilliputSound::toggleOnOff() { + debugC(1, kDebugSound, "LilliputSound::toggleOnOff()"); } -void LilliputSound::contentFct5() { - debugC(1, kDebugSound, "contentFct5()"); +void LilliputSound::update() { + debugC(1, kDebugSound, "LilliputSound::update()"); } -void LilliputSound::contentFct6() { - debugC(1, kDebugSound, "contentFct6()"); +void LilliputSound::remove() { + debugC(1, kDebugSound, "Lilliput::remove()"); } } // End of namespace |