Commit Graph
14 Commits
Author SHA1 Message Date
Thierry Crozat 9a14045e0e AGS: Common: fixed linker error at BufferedStream::BufferSize
From upstream 919f14226d1391bdee7ea50ac4825414b4dd5e95
2022-12-15 22:40:17 +01:00
Thierry Crozat 5c8287dfec AGS: Common: fixed BufferedSectionStream not preventing read past end
There have been this stupid oversight all along since the introduction
of the class: while it reported Length and EOS correctly, it still
allowed to read past the end.

This can cause issues if the user code relies, for example, on Read()
or ReadByte() return value.

For upstream code, in practice this fixes MP3 streaming, where the length
of data is not always possible to precalculate. In ScummVM we used a
different code for MP3, but this may fix other cases as well.

From upstream 6f02bedc65b902ce41858b7e92970662020a11cf
2022-12-15 22:40:17 +01:00
D G Turner 8af2dc3a8c AGS: Fix Remaining Compiler Warnings 2022-06-17 12:19:37 +01:00
Thierry Crozat 9789a32bac AGS: In BufferedStream skip buffering if reading large chunk at once
From upstream 8137918c209a479edf5127bb7c21d29470b8c40e
2022-06-16 23:16:20 +01:00
Thierry Crozat 98bb288bbe AGS: Fixed BufferedStream may overwrite dest with clear buffer
From upstream 39c8f628575eeabff1ed583b43bd6c58530c6b24
2022-06-15 22:13:02 +01:00
Thierry Crozat 56154c8065 AGS: Made BufferedStream work as expected in writing mode
From upstream 97eebe7b91010ad9e507de5c8b9c2515bb8d6cfd
2022-06-15 02:22:03 +01:00
Thierry Crozat 01dd8d5abf AGS: Clean BufferedStream code
Part of upstream 82a928cb07970acc5918905c5836c39ce11b7f32
(Tests: added BufferedStream tests)

This commit has no functional change but allows to keep the code
in ScummVM close to upstream code.
2022-06-15 02:22:03 +01:00
Paul Gilbert eb7421400c AGS: Use empty() to check for emptiness in vector
From upstream 166803dd6cb99851e424f9eb9d150169cd3909fe
2022-05-10 21:18:00 -07:00
Paul Gilbert b1649597d7 AGS: Replaced Math/std Min/Max with ScummVM macros
Inspired by 6dee5ee6f271c600e30879d892295ea6069e8cc9
2022-05-05 22:41:10 -07:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paul Gilbert 3f215aa374 AGS: Added BufferedSectionStream, limited to an offset range
From upstream e7d6d4927a073f405012ca0c97361e7d519637a8
2021-07-31 14:34:08 -07:00
Paul Gilbert e584f41a4c AGS: fixed BufferedStream was not closing file handle on error
From upstream 399371a7fafcb5560a2836186f23090acf92d263
2021-06-13 21:09:07 -07:00
Paul Gilbert b104d78888 AGS: Enabling disabled blocks, and making ScummVM needed changes 2021-06-13 21:08:50 -07:00
Paul Gilbert 701396361c AGS: Import of fresh codebase 2021-06-13 21:08:44 -07:00