diff options
author | Eugene Sandulenko | 2004-05-04 03:33:03 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-05-04 03:33:03 +0000 |
commit | 8de181f4f0b6f974016eaee6ec238bbdfb5ded2f (patch) | |
tree | 0079332b27bf2ca641387f8a6f2a0bb02db339de /saga/image.cpp | |
parent | b9ebd68022f5614b0db6b30d8494062e911a8cc5 (diff) | |
download | scummvm-rg350-8de181f4f0b6f974016eaee6ec238bbdfb5ded2f.tar.gz scummvm-rg350-8de181f4f0b6f974016eaee6ec238bbdfb5ded2f.tar.bz2 scummvm-rg350-8de181f4f0b6f974016eaee6ec238bbdfb5ded2f.zip |
Move from ys_binread.cpp and ys_binwrite.cpp to MemoryReadStream.
In fact there were no binary writes at all.
svn-id: r13773
Diffstat (limited to 'saga/image.cpp')
-rw-r--r-- | saga/image.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/saga/image.cpp b/saga/image.cpp index 1db32b7bcc..9b6200dbaa 100644 --- a/saga/image.cpp +++ b/saga/image.cpp @@ -62,17 +62,18 @@ int IMG_DecodeBGImage(const byte * image_data, size_t image_size, size_t decode_buf_len; byte *out_buf; size_t out_buf_len; - const byte *read_p = image_data; if (image_size <= SAGA_IMAGE_DATA_OFFSET) { /* Image size is way too small */ return R_FAILURE; } - hdr.width = ys_read_u16_le(read_p, &read_p); - hdr.height = ys_read_u16_le(read_p, &read_p); - hdr.unknown4 = ys_read_u16_le(read_p, &read_p); - hdr.unknown6 = ys_read_u16_le(read_p, &read_p); + MemoryReadStream *readS = new MemoryReadStream(image_data, image_size); + + hdr.width = readS->readUint16LE(); + hdr.height = readS->readUint16LE(); + hdr.unknown4 = readS->readUint16LE(); + hdr.unknown6 = readS->readUint16LE(); RLE_data_ptr = image_data + SAGA_IMAGE_DATA_OFFSET; RLE_data_len = image_size - SAGA_IMAGE_DATA_OFFSET; |