[Scummvm-cvs-logs] SF.net SVN: scummvm: [24327] scummvm/trunk/engines/scumm/imuse/imuse_part. cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Oct 15 03:51:08 CEST 2006
Revision: 24327
http://svn.sourceforge.net/scummvm/?rev=24327&view=rev
Author: fingolfin
Date: 2006-10-14 18:51:02 -0700 (Sat, 14 Oct 2006)
Log Message:
-----------
Added FIXME comment about 'static' abuse in imuse_part.cpp
Modified Paths:
--------------
scummvm/trunk/engines/scumm/imuse/imuse_part.cpp
Modified: scummvm/trunk/engines/scumm/imuse/imuse_part.cpp
===================================================================
--- scummvm/trunk/engines/scumm/imuse/imuse_part.cpp 2006-10-15 01:44:58 UTC (rev 24326)
+++ scummvm/trunk/engines/scumm/imuse/imuse_part.cpp 2006-10-15 01:51:02 UTC (rev 24327)
@@ -230,6 +230,13 @@
mc = _player->getMidiDriver()->getPercussionChannel();
if (!mc)
return;
+
+ // FIXME: The following is evil, EVIL!!! Either prev_vol_eff is
+ // actually meant to be a member of the Part class (i.e. each
+ // instance of Part keeps a separate copy of it); or it really
+ // is supposed to be shared by all Part instances -- but then it
+ // should be implemented as a class static var. As it is, using
+ // a function level static var in most cases is arcane and evil.
static byte prev_vol_eff = 128;
if (_vol_eff != prev_vol_eff){
mc->volume(_vol_eff);
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