[Scummvm-devel] [Scummvm-cvs-logs] SF.net SVN: scummvm: [23511] scummvm/trunk/engines/kyra/resource.cpp
Max Horn
max at quendi.de
Thu Jul 20 23:16:30 CEST 2006
Am 20.07.2006 um 22:49 schrieb lordhoto at users.sourceforge.net:
> Revision: 23511
> http://svn.sourceforge.net/scummvm/?rev=23511&view=rev
> Author: lordhoto
> Date: 2006-07-15 13:30:36 -0700 (Sat, 15 Jul 2006)
>
> Log Message:
> -----------
> Use the FS Api to load all .PAK and .APK files. (I just made a few
> quick tests, but before this should be integrated to branch-0-9-0
> there should be a test for it on *every* platform, since I'm not
> quite sure if FilesystemNode::displayName is useable for this...)
>
> Modified Paths:
> --------------
> scummvm/trunk/engines/kyra/resource.cpp
[...]
> + for (FSList::const_iterator file = fslist.begin(); file !=
> fslist.end(); ++file) {
> + if (file->displayName().hasSuffix("PAK") || file->displayName
> ().hasSuffix("APK")) {
> + assert(loadPakFile(file->displayName()));
> + }
> }
> }
[...]
No, that is not a valid use of displayName() (although it works now
by chance). The display name really is there as a "human readable"
name of the file, to be displayed to the user. It would be valid for
me to add a "###" prefix to the result of displayName, and code must
continue to work correctly.
You really should be using path() here instead.
Granted, though, FilesystemNode and File do not mesh quite perfectly
right now (to put it nicely, I could find harsher words... *g*). I
never got quite around completing the transition away from paths to
FilesystemNode objects... ideally, there should be a File::open
variant which takes a FilesystemNode object.
Cheers,
Max
More information about the Scummvm-devel
mailing list