aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/video/robot_decoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/video/robot_decoder.cpp')
-rw-r--r--engines/sci/video/robot_decoder.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index 446b986581..0cb4831159 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -43,7 +43,7 @@ namespace Sci {
#pragma mark RobotAudioStream
-extern void deDPCM16(int16 *out, const byte *in, const uint32 numBytes, int16 &sample);
+extern void deDPCM16Mono(int16 *out, const byte *in, const uint32 numBytes, int16 &sample);
RobotAudioStream::RobotAudioStream(const int32 bufferSize) :
_loopBuffer((byte *)malloc(bufferSize)),
@@ -181,7 +181,7 @@ void RobotAudioStream::fillRobotBuffer(const RobotAudioPacket &packet, const int
}
int16 carry = 0;
- deDPCM16((int16 *)_decompressionBuffer, packet.data, packet.dataSize, carry);
+ deDPCM16Mono((int16 *)_decompressionBuffer, packet.data, packet.dataSize, carry);
_decompressionBufferPosition = packet.position;
}
@@ -1436,6 +1436,14 @@ void RobotDecoder::doVersion5(const bool shouldSubmitAudio) {
_screenItemList[i] = nullptr;
}
}
+
+ if (screenItemCount < oldScreenItemCount) {
+ _screenItemList.resize(screenItemCount);
+ _screenItemX.resize(screenItemCount);
+ _screenItemY.resize(screenItemCount);
+ _originalScreenItemX.resize(screenItemCount);
+ _originalScreenItemY.resize(screenItemCount);
+ }
}
void RobotDecoder::createCels5(const byte *rawVideoData, const int16 numCels, const bool usePalette) {