[Scummvm-devel] SCI file handling revamp
Max Horn
max at quendi.de
Fri Feb 27 18:11:09 CET 2009
Am 27.02.2009 um 07:42 schrieb Willem Jan Palenstijn:
> On Fri, Feb 27, 2009 at 01:26:32PM +0100, Andre Heider wrote:
>> On Thu, Feb 26, 2009 at 5:50 PM, Max Horn <max at quendi.de> wrote:
>>
>>> Actually, I might change the current warning that is produced when
>>> trying to write to a file opened in read-mode, and vice versa, to an
>>> error, to ensure I get plenty of reports quickly *ggg*.
>>
>> Nice plan, here's the first:
>>
>> starting LSL3 with "LARRY3.DRV" and "RESOURCE.LL3" removed from the
>> gamedir:
Thanks. Did this work before my changes, though? Does it work with
Sierra's SCI (SSCI)?
Same question for the "version" file, does it contain any valid data?
>>
>> [...]
>> Attempt to use invalid/unused file handle 65535!
>>
>> Then its game over because of the error() in getFileFromHandle() ;)
>>
>> [...]
>>
>> When checking for 0xffff in getFileFromHandle() (with just a warning
>> instead of an error) it works out fine for both games, but i'm not
>> sure what handle zero is supposed to be in the 1st place. Maybe this
>> is an inconsistency?
>
> I'd simply behave the same as FreeSCI here: in the two special cases
> in
> getFileFromHandle ('Attempt to use file handle 0' and 'Attempt to use
> invalid/unused file handle'), just report a warning and return 0.
Well, I changed these to errors for now on purpose -- the rationale
being that these errors are likely to be caused by problems in the
rest of our file code. Of course, they can be caused by sloppy script
coding, too, and if that's the case, we can return them to being
warnings (or even just debug() messages), with a comment explaining
which games cause these warnings.
Cheers,
Max
More information about the Scummvm-devel
mailing list