Line 626: |
Line 626: |
| <pre> | | <pre> |
| struct folder_entry { | | struct folder_entry { |
− | u32 parent_folder_index; // stores entry count for dummy folders; 0 for the root folder (entry[1]) | + | u32 parent_folder_index; // 0 for the root folder (the second entry) |
− | u8 filename[0x10]; // an unknown but consistent value for dummy folders; "" for the root folder (entry[1]) | + | u8 filename[0x10]; // "" for the root folder (the second entry) |
− | u32 next_folder_index; // 0 if the last folder, or a dummy folder | + | u32 next_folder_index; // 0 if the last folder |
− | u32 first_sub_folder_index; // 0 if has no sub folder, or a dummy folder | + | u32 first_sub_folder_index; // 0 if has no sub folder |
− | u32 first_sub_file_index; // 0 if has no sub file(?), or a dummy folder | + | u32 first_sub_file_index; // 0 if has no sub file(?) |
− | u32 unk; // flags? always 0? | + | u32 unk1; // flags? always 0? |
− | u32 next_dummy_folder_index; // 0 if the last dummy folder; unknown (often 0) if not a dummy folder | + | u32 unk2; // often 0? |
| + | } |
| + | struct dummy_folder_entry { |
| + | u32 total_entry_count; |
| + | u32 unk; // max_entry_count? FolderMapSize related? |
| + | u32 zero_padding[7]; |
| + | u32 next_dummy_folder_index; // 0 if the last dummy folder; |
| } | | } |
| </pre> | | </pre> |
Line 639: |
Line 645: |
| <pre> | | <pre> |
| struct file_entry { | | struct file_entry { |
− | u32 parent_folder_index; // stores entry count for dummy files | + | u32 parent_folder_index; |
− | u8 filename[0x10]; // an unknown but consistent value for dummy files | + | u8 filename[0x10]; |
− | u32 next_file_index; // 0 if the last file, or a dummy file | + | u32 next_file_index; // 0 if the last file |
− | u32 unk1; // looks like time stamp? 0 if a dummy file | + | u32 unk1; // looks like time stamp? |
− | u32 block_offset; // 0 if a dummy file | + | u32 block_offset; |
− | u64 file_size; // 0 if a dummy file | + | u64 file_size; |
| u32 unk2; // flags? | | u32 unk2; // flags? |
− | u32 next_dummy_file_index; // 0 if the last dummy file, unknown (always zero?) if not a dummy file | + | u32 zero; // ? |
| + | } |
| + | struct dummy_file_entry { |
| + | u32 total_entry_count; |
| + | u32 unk; // max_entry_count? FileMapSize related? |
| + | u32 zero_padding[9]; |
| + | u32 next_dummy_file_index; // 0 if the last dummy file; |
| } | | } |
| </pre> | | </pre> |
| | | |
− | Both table contains some "dummy" entries, which are probably left there when deleting files/folders, reserved for future use. The first entry of the two tables are always a dummy entry. | + | Both table contains some "dummy" entries, which are probably left there when deleting files/folders, reserved for future use. The first entry of the two tables are always a dummy entry (as the "first" dummy entry). |
| | | |
| Reading the files out is as simple as taking the file base offset and adding (block_offset * 0x200) to it. | | Reading the files out is as simple as taking the file base offset and adding (block_offset * 0x200) to it. |