[Scummvm-cvs-logs] SF.net SVN: scummvm:[53103] scummvm/trunk/engines/scumm/player_towns.cpp
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Sat Oct 9 18:39:57 CEST 2010
Revision: 53103
http://scummvm.svn.sourceforge.net/scummvm/?rev=53103&view=rev
Author: athrxx
Date: 2010-10-09 16:39:56 +0000 (Sat, 09 Oct 2010)
Log Message:
-----------
SCUMM/FM-TOWNS: minor fix for sfx code
Modified Paths:
--------------
scummvm/trunk/engines/scumm/player_towns.cpp
Modified: scummvm/trunk/engines/scumm/player_towns.cpp
===================================================================
--- scummvm/trunk/engines/scumm/player_towns.cpp 2010-10-09 14:55:33 UTC (rev 53102)
+++ scummvm/trunk/engines/scumm/player_towns.cpp 2010-10-09 16:39:56 UTC (rev 53103)
@@ -102,10 +102,9 @@
if (!_intf)
return;
- const uint8 *ptr = data;
- const uint8 *sfxData = ptr + 16;
+ const uint8 *sfxData = data + 16;
- int numChan = _v2 ? 1 : ptr[14];
+ int numChan = _v2 ? 1 : data[14];
for (int i = 0; i < numChan; i++) {
int chan = allocatePcmChannel(sound, i, priority);
if (!chan)
@@ -145,8 +144,8 @@
if (_v2 && priority > 255) {
chan = 8;
- if (_intf->callback(40, 0x47) && _pcmCurrentSound[chan].index != 0xffff)
- _vm->_sound->stopSound(_pcmCurrentSound[chan].index);
+ if (_intf->callback(40, 0x47))
+ _intf->callback(39, 0x47);
} else {
for (int i = 8; i; i--) {
if (!_pcmCurrentSound[i].index) {
@@ -158,7 +157,9 @@
continue;
chan = i;
- if (_pcmCurrentSound[chan].index != 0xffff)
+ if (_pcmCurrentSound[chan].index == 0xffff)
+ _intf->callback(39, chan + 0x3f);
+ else
_vm->_sound->stopSound(_pcmCurrentSound[chan].index);
}
@@ -166,8 +167,10 @@
for (int i = 1; i < 9; i++) {
if (priority >= _pcmCurrentSound[i].priority)
chan = i;
- }
- if (chan && _pcmCurrentSound[chan].index != 0xffff)
+ }
+ if (_pcmCurrentSound[chan].index == 0xffff)
+ _intf->callback(39, chan + 0x3f);
+ else
_vm->_sound->stopSound(_pcmCurrentSound[chan].index);
}
}
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