The remaining consider the FFVII case for convenience sake, but the
problem is not limited to it.
Today, file path convention considers that game data are located in a
subdirectory named "data/" located at the same place where q-gears is
run (from ffvii/kernel/Kernel.cpp: BinGZipFile("data/INIT/KERNEL.BIN"); ).
As it may be true for a FFVII PC full installation, it is not
appropriate when reading game data directly from PSX CDs.
A solution to this problem could be to use the part of the file path
that is common to PC and PSX version (e.g. "INIT/KERNEL.BIN") and let
the FFVII's GameFileSystem instance prepends the correct basename
("data/", "C:/Program Files/Squaresoft/FFVII/data", "E:/",
"/dev/cdrom/" or whatever, at user's discretion) (*). But for
non-original files (savemaps, etc.), we must use a file system
featuring read/write access and potentially using a different root
basename.
Let me describe the current implementation model:
- ffvii file types (LzsFile, DatFile, etc.) inherits from the class
ffvii/filesystem/File;
- ffvii/filesystem/File class uses FFVII's GameFileSystem instance
to perform all its file access.
The problem is that following the considered file, we want to access
the GameFileSystem (hard drive or CD drive, read only) or the
RealFileSystem (hard drive, read and write). Hence I think the "only
one file driver" approach used today is not valid, and that we need a
sligthly different paradigm for file access.
I have several ideas, but first of all: was I clear?
Do you agree with the analysis? Do you have any questions?
Do you have any solutions?
(*) I delivered this into the SVN repository some weeks ago, but it
seems to have been reverted lately in a wrong way, making q-gears
searching for "KERNEL.BIN" in "data/data/INIT/". So right now file
paths are totally wrong; I will remove the "data/" prefix addition
ASAP to stabilize the situation.