[Scummvm-cvs-logs] CVS: scummvm/sky autoroute.cpp,1.17,1.18 logic.cpp,1.131,1.132 sky.cpp,1.106,1.107 sound.cpp,1.32,1.33 sound.h,1.15,1.16
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Wed Aug 20 05:48:02 CEST 2003
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv24176/sky
Modified Files:
autoroute.cpp logic.cpp sky.cpp sound.cpp sound.h
Log Message:
copied some fixes which only were in 0.5.1 branch.
Index: autoroute.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/autoroute.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- autoroute.cpp 2 Aug 2003 19:37:00 -0000 1.17
+++ autoroute.cpp 20 Aug 2003 12:12:11 -0000 1.18
@@ -236,7 +236,7 @@
clipCoordX(cpt->extCompact->arTargetX, destX, initDestX);
clipCoordY(cpt->extCompact->arTargetY, destY, initDestY);
- ((uint16*)cpt->extCompact->animScratch)[0] = 0;
+ memset(cpt->extCompact->animScratch, 0, 64);
if ((startX == destX) && (startY == destY))
return 2;
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.cpp,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -d -r1.131 -r1.132
--- logic.cpp 3 Aug 2003 17:17:24 -0000 1.131
+++ logic.cpp 20 Aug 2003 12:12:11 -0000 1.132
@@ -146,11 +146,10 @@
void SkyLogic::autoRoute() {
_compact->downFlag = _skyAutoRoute->autoRoute(_compact);
- if (!_compact->downFlag) { // route ok
+ if (_compact->downFlag != 1) { // route ok
_compact->grafixProg.pos = 0;
_compact->grafixProg.ptrTarget = 0;
_compact->grafixProg.ptrType = AUTOROUTE;
- //_compact->grafixProg = (uint16*)_compact->extCompact->animScratch;
}
_compact->logic = L_SCRIPT; // continue the script
Index: sky.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sky.cpp,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- sky.cpp 18 Aug 2003 23:20:27 -0000 1.106
+++ sky.cpp 20 Aug 2003 12:12:11 -0000 1.107
@@ -235,7 +235,7 @@
OSystem::Property prop;
_skyDisk = new SkyDisk(_gameDataPath);
- _skySound = new SkySound(_mixer, _skyDisk);
+ _skySound = new SkySound(_mixer, _skyDisk, _detector->_sfx_volume);
_systemVars.gameVersion = _skyDisk->determineGameVersion();
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- sound.cpp 18 Aug 2003 20:36:55 -0000 1.32
+++ sound.cpp 20 Aug 2003 12:12:11 -0000 1.33
@@ -1012,7 +1012,7 @@
{ 0, 0, 0, 0}
};
-SkySound::SkySound(SoundMixer *mixer, SkyDisk *pDisk) {
+SkySound::SkySound(SoundMixer *mixer, SkyDisk *pDisk, uint8 pVolume) {
_skyDisk = pDisk;
_soundData = NULL;
_mixer = mixer;
@@ -1022,6 +1022,7 @@
_ingameSpeech = 0;
_ingameSound0 = _ingameSound1 = 0;
_saveSounds[0] = _saveSounds[1] = 0xFFFF;
+ _mainSfxVolume = pVolume;
}
SkySound::~SkySound(void) {
@@ -1159,7 +1160,7 @@
// get fx volume
- uint8 volume = 0x40; // start with max vol
+ uint8 volume = _mainSfxVolume; // start with standard vol
if (!SkyState::isCDVersion()) {
// as long as we can't set the volume for sfx without changing the speech volume,
@@ -1168,6 +1169,7 @@
volume = roomList[i].adlibVolume;
if (SkyState::_systemVars.systemFlags & SF_ROLAND)
volume = roomList[i].rolandVolume;
+ volume = (volume * _mainSfxVolume) >> 8;
}
// Check the flags, the sound may come on after a delay.
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- sound.h 9 Aug 2003 19:20:10 -0000 1.15
+++ sound.h 20 Aug 2003 12:12:11 -0000 1.16
@@ -58,7 +58,7 @@
int playSound(uint32 id, byte *sound, uint32 size, PlayingSoundHandle *handle);
public:
- SkySound(SoundMixer *mixer, SkyDisk *pDisk);
+ SkySound(SoundMixer *mixer, SkyDisk *pDisk, uint8 pVolume);
~SkySound(void);
int playVoice(byte *sound, uint32 size);
int playBgSound(byte *sound, uint32 size);
@@ -81,6 +81,7 @@
uint16 _sfxBaseOfs;
uint8 *_soundData;
uint8 *_sampleRates, *_sfxInfo;
+ uint8 _mainSfxVolume;
static uint16 _speechConvertTable[8];
static SfxQueue _sfxQueue[MAX_QUEUED_FX];
More information about the Scummvm-git-logs
mailing list