It contains defines that should be available from scummsys.h.
Also, it contains defines to support ancient and
now unsupported versions of MSVC (2013 and earlier)
Resolve an issue where the value was incorrectly treated as a signed integer during multiplication/division. This was causing fluctuations in volume, with levels varying up and down.
The original code reads the envelopeEnd(1 and 2) value as a byte, extends it to a word then ANDs it with 0x00FF before multiplying/dividing.
To implement a MOD variant for the Chewy engine, this commit makes some changes
to make subclassing of the ProtrackerStream and associated Module class easier.
Mostly done using the following Ruby script:
(Dir.glob('**/*.cpp') + Dir.glob('**/*.h')).each do |file|
s = File.read(file, encoding: 'iso8859-1')
t = s.gsub(/(([\w_.\[\]]+)\s*=\s*new\s+\S+?\[[^\]]+?\](?!\())([^\{\}]*?)\n\s+memset\(\s*\2\s*,\s*0\s*,[^;]*;/m, '\1()\3')
if t != s
File.open(file, 'w') { |io| io.write(t) }
end
end
Identified by coverity - if the module load fails, _mixBufferSamples could be
left as an invalid pointer, which would cause a problem in the destructor.
Moved most things to initailizer list to avoid the problem.
Coverity still identifies a lot of uninitialized members, but they should all
get initialized when playback starts and have less chance of causing real bugs.
Make Amiga music loop until fade out when changing scene. This is
based on watching a video of Future Wars Amiga walkthrough, not on
playing the Amiga version or reading its disassembly. But it does seem
that the music loops instead of just playing once.
Add support for dividing the playing rate of Paula and SoundFx audio
by integers other than 1. This is going to be used in the Cine engine
for dividing the playing rate of music in the Amiga version of Operation
Stealth by 2 to get it to sound right. Otherwise it sounds too high
pitched.
This is groundwork for fixing bug #11676.
The instrument names are a maximum of 22 characters in length but
were previously shortened to a maximum of 8 characters. At least in
Amiga versions of Operation Stealth some of the instrument names are
longer than 8 characters and failed to be loaded because of this.
Raising the limit from 8 to 22 characters fixes this.
Addresses bug #11676.