Hi,
In my application I need to access the name of all the waypoints in the current world. I only found a method to access them by name, but no method to access them by index (and to get the number of waypoints).
Therefore I decided to search directly in the folder structure, all the waypoints are stored in the [Game.World.gameDir()]/Waypoint.
This works fine as long as I use folder, but for Android I have to use paks, so I tried to do the same thing with paks.
However, it doesn't work.
Code:
Memb<Str> waypoints;
// Search for waypoints:
Str dir = S+Game::World.gameDir()+"Waypoint"; // The directory of all the waypoints
// Check if dir exists:
DEBUG_ASSERT(FExist(dir), "Directory doesn't exist!");
for(FileFind ff(dir); ff();)
{
if(ff.type == FSTD_FILE)
{
waypoints.add(ff.name);
}
}
Well, the directory is found by the application but it seems like FileFind ignores all the paks, because the Memb is empty after the loop has finished...
But there definitely is something in the Waypoint folder. When I do this, the application also detects that the file exists:
Code:
Str file= S+Game::World.gameDir()+"Waypoint/Route1";
DEBUG_ASSERT(FExist(file), "Waypoint file doesn't exist!");
Is this a bug or is that a limitiation of the FileFinder? How do I search for files in pak containers?
Or did I do something wrong?
Thanks in advance.