aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge/bg_effects.cpp
diff options
context:
space:
mode:
authoryinsimei2017-05-30 09:59:56 +0200
committerEugene Sandulenko2017-07-13 18:27:45 +0200
commit8c59f8deac6da7fd3b46234b70ca1cea428ca1f5 (patch)
tree5ceb323ae2ac20c28120084726330b17bbd2861c /engines/sludge/bg_effects.cpp
parentb920f61a111b2dddac41b44a318c9078dea833ff (diff)
downloadscummvm-rg350-8c59f8deac6da7fd3b46234b70ca1cea428ca1f5.tar.gz
scummvm-rg350-8c59f8deac6da7fd3b46234b70ca1cea428ca1f5.tar.bz2
scummvm-rg350-8c59f8deac6da7fd3b46234b70ca1cea428ca1f5.zip
SLUDGE: Replace sludge stream reading functions by scummvm ones
Diffstat (limited to 'engines/sludge/bg_effects.cpp')
-rw-r--r--engines/sludge/bg_effects.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/sludge/bg_effects.cpp b/engines/sludge/bg_effects.cpp
index 8a615514fa..9c8bcb304b 100644
--- a/engines/sludge/bg_effects.cpp
+++ b/engines/sludge/bg_effects.cpp
@@ -118,16 +118,16 @@ static int s_matrixEffectBase = 0;
void blur_saveSettings(Common::WriteStream *stream) {
if (s_matrixEffectData) {
- put4bytes(s_matrixEffectDivide, stream);
- put4bytes(s_matrixEffectWidth, stream);
- put4bytes(s_matrixEffectHeight, stream);
- put4bytes(s_matrixEffectBase, stream);
+ stream->writeUint32LE(s_matrixEffectDivide);
+ stream->writeUint32LE(s_matrixEffectWidth);
+ stream->writeUint32LE(s_matrixEffectHeight);
+ stream->writeUint32LE(s_matrixEffectBase);
stream->write(s_matrixEffectData, sizeof(int) * s_matrixEffectWidth * s_matrixEffectHeight);
} else {
- put4bytes(0, stream);
- put4bytes(0, stream);
- put4bytes(0, stream);
- put4bytes(0, stream);
+ stream->writeUint32LE(0);
+ stream->writeUint32LE(0);
+ stream->writeUint32LE(0);
+ stream->writeUint32LE(0);
}
}
@@ -143,10 +143,10 @@ static int *blur_allocateMemoryForEffect() {
}
void blur_loadSettings(Common::SeekableReadStream *stream) {
- s_matrixEffectDivide = get4bytes(stream);
- s_matrixEffectWidth = get4bytes(stream);
- s_matrixEffectHeight = get4bytes(stream);
- s_matrixEffectBase = get4bytes(stream);
+ s_matrixEffectDivide = stream->readUint32LE();
+ s_matrixEffectWidth = stream->readUint32LE();
+ s_matrixEffectHeight = stream->readUint32LE();
+ s_matrixEffectBase = stream->readUint32LE();
if (blur_allocateMemoryForEffect()) {
size_t bytes_read = stream->read(s_matrixEffectData, sizeof(int) * s_matrixEffectWidth * s_matrixEffectHeight);