aboutsummaryrefslogtreecommitdiff
path: root/scumm/instrument.h
diff options
context:
space:
mode:
authorMax Horn2005-01-07 14:42:51 +0000
committerMax Horn2005-01-07 14:42:51 +0000
commit071b09cab4881287d702d45726438797b143f7d5 (patch)
tree9b1e407b1c31dd2b5aeb0a7d3effe1db952fc91b /scumm/instrument.h
parentb4d547c736d6c8718cdd1bc36aa4a2fc083b6c52 (diff)
downloadscummvm-rg350-071b09cab4881287d702d45726438797b143f7d5.tar.gz
scummvm-rg350-071b09cab4881287d702d45726438797b143f7d5.tar.bz2
scummvm-rg350-071b09cab4881287d702d45726438797b143f7d5.zip
Flag 64 bit problem in iMuse, as well as what I think might be very old regression in our code
svn-id: r16477
Diffstat (limited to 'scumm/instrument.h')
-rw-r--r--scumm/instrument.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/scumm/instrument.h b/scumm/instrument.h
index c8b9b0b3f4..1d8c84a5d2 100644
--- a/scumm/instrument.h
+++ b/scumm/instrument.h
@@ -60,7 +60,20 @@ public:
void clear();
void copy_to (Instrument *dest) { if (_instrument) _instrument->copy_to (dest); else dest->clear(); }
+
+ // FIXME: This is evil! We cast a pointer to an int. Besides not being
+ // portable to 64bit systems, it is unclear why this is needed.
+ // If the only reason is to supply a unique identifier of that
+ // instrument: there are better ways do do that.
+ // OTOH, maybe the code is simply wrong, and what is really meant
+ // here is to first dereference _instrument, then cast it? Like
+ // this: (int)*_instrument
+ // At least this would explain the otherwise unused operator int()
+ // supplied by class Instrument_Program.
+ // If that is the case, the operator int() should all be replaced by
+ // a proper method, like "get_something()"
operator int() { return (_instrument ? (int) _instrument : 255); }
+
void program (byte program, bool mt32);
void adlib (byte *instrument);
void roland (byte *instrument);