[Scummvm-cvs-logs] SF.net SVN: scummvm:[35801] scummvm/trunk/engines/scumm
aquadran at users.sourceforge.net
aquadran at users.sourceforge.net
Sat Jan 10 14:04:33 CET 2009
Revision: 35801
http://scummvm.svn.sourceforge.net/scummvm/?rev=35801&view=rev
Author: aquadran
Date: 2009-01-10 13:04:33 +0000 (Sat, 10 Jan 2009)
Log Message:
-----------
- added initial radio chatter sfx, still not fully correct
- remove obsolete mixerStreamRunning track variable
Modified Paths:
--------------
scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp
scummvm/trunk/engines/scumm/imuse_digi/dimuse.h
scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.h
scummvm/trunk/engines/scumm/saveload.h
scummvm/trunk/engines/scumm/script_v6.cpp
Modified: scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp
===================================================================
--- scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp 2009-01-10 10:38:06 UTC (rev 35800)
+++ scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp 2009-01-10 13:04:33 UTC (rev 35801)
@@ -98,6 +98,7 @@
memset(_attributes, 0, sizeof(_attributes));
_nextSeqToPlay = 0;
_stopingSequence = 0;
+ _radioChatterSFX = 0;
_triggerUsed = false;
}
@@ -112,6 +113,7 @@
MKLINE(IMuseDigital, _curMusicSeq, sleInt32, VER(31)),
MKLINE(IMuseDigital, _curMusicCue, sleInt32, VER(31)),
MKLINE(IMuseDigital, _nextSeqToPlay, sleInt32, VER(31)),
+ MKLINE(IMuseDigital, _radioChatterSFX, sleByte, VER(76)),
MKARRAY(IMuseDigital, _attributes[0], sleInt32, 188, VER(31)),
MKEND()
};
@@ -128,7 +130,7 @@
MKLINE(Track, used, sleByte, VER(31)),
MKLINE(Track, toBeRemoved, sleByte, VER(31)),
MKLINE(Track, souStreamUsed, sleByte, VER(31)),
- MKLINE(Track, mixerStreamRunning, sleByte, VER(31)), // FIXME: OBSOLETE, remove this!
+ MK_OBSOLETE(Track, mixerStreamRunning, sleByte, VER(31), VER(76)),
MKLINE(Track, soundPriority, sleInt32, VER(31)),
MKLINE(Track, regionOffset, sleInt32, VER(31)),
MK_OBSOLETE(Track, trackOffset, sleInt32, VER(31), VER(31)),
@@ -309,6 +311,25 @@
}
} else if (bits == 8) {
curFeedSize = _sound->getDataFromRegion(track->soundDesc, track->curRegion, &tmpSndBufferPtr, track->regionOffset, feedSize);
+ if (_radioChatterSFX && track->volGroupId == IMUSE_VOLGRP_VOICE) {
+ byte *buf = new byte[curFeedSize];
+ int index = 0;
+ int count = curFeedSize;
+ byte *ptr_1 = tmpSndBufferPtr;
+ byte *ptr_2 = tmpSndBufferPtr + 4;
+ int value = ptr_1[0] - 0x80;
+ value += ptr_1[1] - 0x80;
+ value += ptr_1[2] - 0x80;
+ value += ptr_1[3] - 0x80;
+ do {
+ int t = *ptr_1++;
+ int v = t - (value / 4);
+ value = (int)(*(ptr_2++) - 0x80) + (value - t + 128);
+ buf[index++] = (byte)v * 4;
+ } while (--count);
+ delete[] tmpSndBufferPtr;
+ tmpSndBufferPtr = buf;
+ }
if (channels == 2) {
curFeedSize &= ~1;
}
Modified: scummvm/trunk/engines/scumm/imuse_digi/dimuse.h
===================================================================
--- scummvm/trunk/engines/scumm/imuse_digi/dimuse.h 2009-01-10 10:38:06 UTC (rev 35800)
+++ scummvm/trunk/engines/scumm/imuse_digi/dimuse.h 2009-01-10 13:04:33 UTC (rev 35801)
@@ -85,6 +85,7 @@
int32 _curMusicSeq; // current or previous id of sequence music
int32 _curMusicCue; // current cue for current music. used in FT
int _stopingSequence;
+ bool _radioChatterSFX;
int32 makeMixerFlags(int32 flags);
static void timer_handler(void *refConf);
@@ -136,6 +137,9 @@
void saveOrLoad(Serializer *ser);
void resetState();
+ void setRadioChatterSFX(bool state) {
+ _radioChatterSFX = state;
+ }
void setPriority(int soundId, int priority);
void setVolume(int soundId, int volume);
Modified: scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.h
===================================================================
--- scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.h 2009-01-10 10:38:06 UTC (rev 35800)
+++ scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.h 2009-01-10 13:04:33 UTC (rev 35801)
@@ -61,7 +61,6 @@
char soundName[15]; // sound name but also filename of sound in bundle data
bool used; // flag mean that track is used
bool toBeRemoved; // flag mean that track need to be free
- bool mixerStreamRunning; // flag mean sound mixer's stream is running OBSOLETE
bool souStreamUsed; // flag mean that track use stream from sou file
bool sndDataExtComp;// flag mean that sound data is compressed by scummvm tools
int32 soundPriority;// priority level of played sound (0-127)
Modified: scummvm/trunk/engines/scumm/saveload.h
===================================================================
--- scummvm/trunk/engines/scumm/saveload.h 2009-01-10 10:38:06 UTC (rev 35800)
+++ scummvm/trunk/engines/scumm/saveload.h 2009-01-10 13:04:33 UTC (rev 35801)
@@ -50,7 +50,7 @@
* only saves/loads those which are valid for the version of the savegame
* which is being loaded/saved currently.
*/
-#define CURRENT_VER 75
+#define CURRENT_VER 76
/**
* An auxillary macro, used to specify savegame versions. We use this instead
Modified: scummvm/trunk/engines/scumm/script_v6.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v6.cpp 2009-01-10 10:38:06 UTC (rev 35800)
+++ scummvm/trunk/engines/scumm/script_v6.cpp 2009-01-10 13:04:33 UTC (rev 35801)
@@ -2613,7 +2613,7 @@
enqueueText(getStringAddressVar(VAR_STRING2DRAW), args[3], args[4], args[2], args[1], (args[0] == 16));
break;
case 20:
- // it's used for turn on/off 'RadioChatter' effect for voice in the dig, but i's not needed
+ _imuseDigital->setRadioChatterSFX(args[1]);
break;
case 107:
a = derefActor(args[1], "o6_kernelSetFunctions: 107");
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