[Scummvm-cvs-logs] SF.net SVN: scummvm:[35843] scummvm/trunk/engines/made
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Jan 13 11:11:53 CET 2009
Revision: 35843
http://scummvm.svn.sourceforge.net/scummvm/?rev=35843&view=rev
Author: thebluegr
Date: 2009-01-13 10:11:52 +0000 (Tue, 13 Jan 2009)
Log Message:
-----------
- Music now works in LGoP2
- Changed the default music volume to 127, down from 255
- Added an explanation/FIXME for the out of sync mouth animations in RTZ
- Added some TODOs and removed some obsolete ones
Modified Paths:
--------------
scummvm/trunk/engines/made/music.cpp
scummvm/trunk/engines/made/screenfx.cpp
scummvm/trunk/engines/made/scriptfuncs.cpp
Modified: scummvm/trunk/engines/made/music.cpp
===================================================================
--- scummvm/trunk/engines/made/music.cpp 2009-01-12 22:09:56 UTC (rev 35842)
+++ scummvm/trunk/engines/made/music.cpp 2009-01-13 10:11:52 UTC (rev 35843)
@@ -164,7 +164,7 @@
_parser = parser;
- setVolume(255);
+ setVolume(127);
_looping = flags & MUSIC_LOOP;
_isPlaying = true;
@@ -190,7 +190,7 @@
_parser = parser;
- setVolume(255);
+ setVolume(127);
_looping = flags & MUSIC_LOOP;
_isPlaying = true;
@@ -213,7 +213,7 @@
}
void MusicPlayer::resume() {
- setVolume(255);
+ setVolume(127);
_isPlaying = true;
}
Modified: scummvm/trunk/engines/made/screenfx.cpp
===================================================================
--- scummvm/trunk/engines/made/screenfx.cpp 2009-01-12 22:09:56 UTC (rev 35842)
+++ scummvm/trunk/engines/made/screenfx.cpp 2009-01-13 10:11:52 UTC (rev 35843)
@@ -56,7 +56,6 @@
void ScreenEffects::run(int16 effectNum, Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) {
// TODO: Put effect functions into an array
- // TODO: Implement more visual effects
switch (effectNum) {
Modified: scummvm/trunk/engines/made/scriptfuncs.cpp
===================================================================
--- scummvm/trunk/engines/made/scriptfuncs.cpp 2009-01-12 22:09:56 UTC (rev 35842)
+++ scummvm/trunk/engines/made/scriptfuncs.cpp 2009-01-13 10:11:52 UTC (rev 35843)
@@ -244,15 +244,30 @@
}
int16 ScriptFunctions::sfPlayMusic(int16 argc, int16 *argv) {
- // TODO: Music in LGOP2 and Manhole isn't supported yet
+ int16 musicNum = argv[0];
+
if (_vm->getGameID() == GID_RTZ) {
- int16 musicNum = argv[0];
if (musicNum > 0) {
_musicRes = _vm->_res->getXmidi(musicNum);
if (_musicRes)
_vm->_music->playXMIDI(_musicRes);
}
+ } else {
+ // HACK: music number 2 in LGOP2 is file MT32SET.TON, which
+ // is used to set the MT32 instruments. This is not loaded
+ // correctly and the game freezes, and since we don't support
+ // MT32 music yet, we ignore it here
+ // FIXME: Remove this hack and handle this file properly
+ if (_vm->getGameID() == GID_LGOP2 && musicNum == 2)
+ return 0;
+
+ if (musicNum > 0) {
+ _musicRes = _vm->_res->getMidi(musicNum);
+ if (_musicRes)
+ _vm->_music->playSMF(_musicRes);
+ }
}
+
return 0;
}
@@ -321,6 +336,7 @@
}
int16 ScriptFunctions::sfGetMusicBeat(int16 argc, int16 *argv) {
+ // TODO
// This is called loads of times in the intro of the floppy version
// of RtZ. Not sure what it does. Commented out to reduce spam
//warning("Unimplemented opcode: sfGetMusicBeat");
@@ -599,6 +615,16 @@
int16 ScriptFunctions::sfGetSoundEnergy(int16 argc, int16 *argv) {
// This is called while in-game voices are played to animate
// mouths when NPCs are talking
+
+ // FIXME: the mouth animations are out of sync. This occurs
+ // because the original unpacked sounds on the fly, whereas
+ // in ScummVM we unpack them when they're loaded. In ScummVM,
+ // the "sound energy" values are stored in an array (used as
+ // a stack), which means that sfGetSoundEnergy can empty that
+ // array prematurely. A proper fix would be to figure out
+ // when a value should be popped from the sound energy stack,
+ // or to unpack sounds on the fly like the original does
+
int result = 0;
if (soundEnergy.size() > 0) {
result = *soundEnergy.begin();
@@ -909,6 +935,9 @@
// 2 = SBFM/ADLIB
// 3 = ADLIBG
// 4 = MT32MPU
+
+ // TODO
+
warning("Unimplemented opcode: sfGetSynthType");
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list