[Scummvm-devel] File API

Max Horn max at quendi.de
Fri Feb 6 06:32:04 CET 2004


Am 06.02.2004 um 15:03 schrieb Marcus Comstedt:

[...]

>> * We need to browse the filesystem / contents of a directory:
>>    1) For listing savegames - this is essentially what SaveFileManager
>>    does right now
>
> The savegame listing might require some additional thought.  Right
> now, a single directory is used on UNIX for storing savegames, and on
> the Dreamcast a kind of virtual directory is used which is actually
> the union of the directories on all the memory cards.  Maybe some
> subdirectory scheme could be employed here to provide the user with
> finer control over where to save the savegames, like which memory card
> to save on.  Or maybe this would just complicate the GUI, I dunno...
>
Well we would have to write new GUI code for it. For each engine, that 
is, we would have to, since they all have their own way to write save 
games... :-)

> Btw, some mechanism to communicate error messages from the filesystem
> layer to the engine would be nice too, e.g. when a save fails the
> engine can get a string back to show to the user somehow.

Sure. Our current class File already provides these:
  	bool ioFailed() const;
	void clearIOFailed();
Adding an "error string" here would be trivial. But of course, 
virtually no code checks for ioFailed() <sigh>

Anyway, maybe I'll get a chance to sketch a draft for the new File and 
FileManager classes (maybe even a rough prototype). I'd then send this 
around here for comments.


Cheers,

Max





More information about the Scummvm-devel mailing list