Thierry Crozat
31c1d49762
AGS: fixed skip_rle_bitmap8() made no sense whatsoever
...
This fixes loading pre 2.55 games.
From upstream 3df6b7185685bcd6a2d6cbdb7b5c3b62ea5dc9b0
2022-12-17 22:10:55 +01:00
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
Thierry Crozat
7d88a52275
AGS: Engine: fixed restoring a legacy savegame
...
From upstream 9776df3c8403f252e981f5518c48eace2e83d373
2022-12-15 22:40:17 +01:00
Vladimir Serbinenko
db09df7d14
AGS: Support files coming from SearchMan
2022-11-18 01:22:59 +01:00
Vladimir Serbinenko
9caa5324bc
AGS: Switch from getFSNode to getFile to hide whether file comes from an archive
2022-11-18 01:22:59 +01:00
Le Philousophe
1f2c78adfe
ALL: Make sure str.h is included when using String
...
Fix all cases working because str.h is included in util.h
2022-10-30 18:37:16 +01:00
Hubert Maier
491d8b0c6e
AGS: Correct spelling mistake
...
accomodate -> accommodate
2022-10-27 15:56:07 +02:00
Hubert Maier
86a8279c59
AGS: Correct spelling mistake
...
loose -> lose
2022-10-27 15:56:07 +02:00
Le Philousophe
ab0854d81a
AGS: Don't use unsafe sprintf and vsprintf
2022-10-23 22:46:19 +02:00
Donovan Watteau
a82501b638
AGS: Fix ReadEncInt32() on big-endian systems
...
Fixes kq1agdi crashing on big-endian systems, since it tried to allocate
a gigantic amount of memory from MFLUtil::ReadV21() because of the
misread values.
From upstream 5e29a339fc83bf5c06a3a9a3b1c65a2fc4b4e72c
Also includes upstream 427752da015fd93549deef1a31d5e533e5c9319e
2022-10-03 18:42:58 +01:00
Thierry Crozat
e90fb00412
AGS: Replaced more strcpy with snprintf, for safety
...
From upstream 1b6cf053ebbe85e7ba6c5828e2582d757503bc16
2022-06-19 20:50:24 +01:00
Thierry Crozat
884048108d
AGS: Replaced freadstring/fwritestring with safer StrUtil functions
...
From upstream 73af6bafd2e590956b7a248cf3615c3b6df8dcd2
2022-06-19 20:50:24 +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
Thierry Crozat
370e939ad7
AGS: Fixes for MemoryStream: proper seek support for writing mode
...
From upstream 80a17c94f6fc44955dcee5c559247ea73a8c0a76
2022-06-13 00:30:21 +01:00
Paul Gilbert
2e726fa214
AGS: Removed deprecated globals
2022-05-30 15:23:20 -07:00
Paul Gilbert
f93e757aff
AGS: Fix global constructor/destructor warnings
2022-05-29 15:44:45 -07:00
Donovan Watteau
5b1ec56f96
JANITORIAL: Fix some lost or outdated URLs in comments
2022-05-19 07:57:31 +03:00
Paul Gilbert
23f8e4f87c
AGS: Avoid copying PfnWriteExtBlock in data_ext
...
From upstream df40976317787b919d2e15a9042e495a911aaa23
2022-05-10 21:18:00 -07: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
Paul Gilbert
a476850123
AGS: Calculate visible graphic size of gui controls for textures
...
From upstream a91bec5f3fa7f37187a084cabd0ab2289e609a6e
2022-05-01 17:23:19 -07:00
Paul Gilbert
d6cf666e42
AGS: Fixed StrUtil::StringToFloat()
...
From upstream 6942e5dde0cbc82e7870d7652c3f49095f4c641b
2022-04-27 20:52:45 -07:00
Paul Gilbert
68e5184afa
AGS: Replaced some (v)sprintfs with sNprintf counterparts
...
From upstream a34bd392249f87a152dc470d90c67a7d193a28d8
2022-04-27 20:51:30 -07:00
Paul Gilbert
23a2e8c709
AGS: More config parse helpers: reading boolean ints, min-max range
...
From upstream 9737cabb8e7562122f8c471793bd994685d72bfe
2022-04-27 20:38:38 -07:00
Paul Gilbert
7b0bfee7cc
AGS: Renamed and moved INIread/write functions for proper org&style
...
From upstream 18398a7d695e81575218380e1bba28010c239fdc
2022-04-27 20:25:31 -07:00
D G Turner
f6acfd3894
AGS: Fix Remaining Signed vs. Unsigned Comparison GCC Compiler Warning
2022-04-27 23:16:38 +01:00
D G Turner
ead607938b
AGS: Fix Various Signed vs. Unsigned Comparison GCC Warnings
2022-04-27 12:25:46 +01:00
Paul Gilbert
7b13f47d04
AGS: Fixing unimplemented cases in switches
...
From upstream 55345ca2b19598aeac2362d726fcaf15adf698fd
2022-04-25 19:37:00 -07:00
Paul Gilbert
f2399dc15c
AGS: Fixing various "unused variable/arg" warnings
...
From upstream 4b3c27c1a2b39d6c6b089adee111c6889d19ad0e
2022-04-25 19:17:26 -07:00
Paul Gilbert
250190e997
AGS: Fixing various type-cast warnings
...
From upstream 82e89d3c3dccfa0aba0b18c1aa544130ac7e6902
2022-04-25 18:47:12 -07:00
Paul Gilbert
07e74fdd72
AGS: Typecast warning fixes in data serialization
...
From upstream efed621fda5adabac8937b8d0ca64e537fabdfeb
2022-04-25 18:47:08 -07:00
Paul Gilbert
78312259b7
AGS: Typecast warning fixes in (de)compression functions
...
From upstream ba8dae7788e764516d07511b00b36f904131b327
2022-04-24 16:00:06 -07:00
Paul Gilbert
14cffd13e7
AGS: Use String::NoIndex instead of -1 where necessary
...
From upstream 56275cb1f58f630082f3f51ab8e2c0ab5b021b16
2022-04-24 16:00:04 -07:00
Paul Gilbert
4cab476394
AGS: in String use constant NoIndex instead of nps
...
From upstream aca0285937f96002b76d61f4c1cc6f3a11242c2c
2022-04-24 16:00:04 -07:00
Paul Gilbert
1ec52936d2
AGS: Added utf8->wcstr conversions to StrUtils
...
From upstream 4c2bb8ba25fa651175a854b7f0117bfb37a76d4e
2022-04-13 21:55:19 -07:00
Paul Gilbert
596ddd0be6
AGS: Added some utf-8 utils and moved ConvertUtf8ToAscii to StrUtil
...
From upstream 307d40d4b6808ed906e918dd6dcc0332b1d6baa2
2022-04-13 21:55:19 -07:00
Paul Gilbert
ee7d590335
AGS: Fixed weird implementation of TextStreamReader::ReadChar()
...
From upstream 83cbb21e0fee15b081306cc710d882fec7e21a79
2022-04-12 22:27:57 -07:00
Paul Gilbert
645124bb45
AGS: RLE decompressing: Redefined char as int8
...
From upstream 22797ccdf6746767cbc5bf99ef9cbad7702d8140
2022-04-10 19:39:09 -07:00
Paul Gilbert
2d63a71b22
AGS: Fixed formatting of soff_t values
...
From upstream 80a01b51d66f8ca3c17670527ffc1c661ff47c81
2022-04-10 19:39:09 -07:00
Paul Gilbert
787d68277b
AGS: Cleanup some unused code/comments
...
From upstream 585ab2b826ad4f319c660c1a898ec3eb009b20c5
2022-04-10 19:39:08 -07:00
Paul Gilbert
54fae0267d
AGS: Adding comments to stream class methods
2022-04-10 19:39:04 -07:00
Paul Gilbert
662e9794ad
AGS: Remove excessive validity checks in stream classes
...
From upstream 3ed254586a28e2f8ebe0e81b7a44270f3736efd6
2022-04-08 22:17:52 -07:00
Paul Gilbert
0a819e0c8b
AGS: Fixed MemoryStream's second ctor not initializing one member
...
From upstream a542048fd940e450db99522e9b67ec198a83b643
2022-04-08 22:17:51 -07:00
Paul Gilbert
81bb88f99e
AGS: Fixed AlignedStream::Read/WriteByte() returning wrong type
...
From upstream 5453cdfdd6c680c2da7206a240a96d90bae9ffd8
2022-04-08 22:17:51 -07:00
Paul Gilbert
81ea142e4f
AGS: Little code cleanup in room_file.cpp
...
From upstream d3ae5106d0e0ca43b3fb8b397a9faabff77f54b2
2022-04-08 22:17:50 -07:00