[Scummvm-devel] SCI file handling revamp

Willem Jan Palenstijn wjp at usecode.org
Fri Feb 27 13:42:12 CET 2009


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:
> 
> [...]
> 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.

-Willem Jan




More information about the Scummvm-devel mailing list