Changes

Jump to navigation Jump to search

FF9/IMGSubDir

241 bytes added, 01:39, 7 May 2006
no edit summary
==File Size information==
This is determined expostfacto. It is not included with the file list. First you load the file directory structure (1 + sectors). The next step is to find the file you wish to know the size of (IE 0 to FileCount-1 in the file structure array). Take the first sector of the next file in the array (only if it's not the last file) and subtract the first sector of the file you wish the size of, the result is the number of sectors the file ocupies within the image. The last file is a bit different you need the sector of the next sub directory file list and subtract from that the first sector of the file you wish the size of.
 
==Source Code==
<pre>typedef struct
{
unsigned int Flags;
unsigned int FirstSector;
}
FF9_SubDirectoryFileInfo;
 
unsigned int FileSize(void *FileData, int FileN, int FileCount)
{
if(FileN < (FileCount-1))
{
}
}
</pre>
Anonymous user

Navigation menu