mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-03 10:38:40 +00:00
Add support for motion recorder filetype
This commit is contained in:
parent
58a2bef549
commit
a9616618cf
2 changed files with 5 additions and 2 deletions
|
@ -21,6 +21,7 @@ public static class FileHelper
|
|||
|
||||
return file.FileType switch
|
||||
{
|
||||
LbpFileType.MotionRecording => true,
|
||||
LbpFileType.FileArchive => false,
|
||||
LbpFileType.Painting => true,
|
||||
LbpFileType.Unknown => false,
|
||||
|
@ -56,17 +57,18 @@ public static class FileHelper
|
|||
|
||||
return Encoding.ASCII.GetString(header) switch
|
||||
{
|
||||
"REC" => LbpFileType.MotionRecording,
|
||||
"PTG" => LbpFileType.Painting,
|
||||
"TEX" => LbpFileType.Texture,
|
||||
"FSH" => LbpFileType.Script,
|
||||
"VOP" => LbpFileType.Voice,
|
||||
"LVL" => LbpFileType.Level,
|
||||
"PLN" => LbpFileType.Plan,
|
||||
_ => determineFileTypePartTwoWeirdName(reader),
|
||||
_ => readAlternateHeader(reader),
|
||||
};
|
||||
}
|
||||
|
||||
private static LbpFileType determineFileTypePartTwoWeirdName(BinaryReader reader)
|
||||
private static LbpFileType readAlternateHeader(BinaryReader reader)
|
||||
{
|
||||
reader.BaseStream.Position = 0;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ public enum LbpFileType
|
|||
FileArchive, // .farc, (ends with FARC)
|
||||
Plan, // PLN, uploaded with levels
|
||||
Voice, // VOP, voice data
|
||||
MotionRecording, // used in LBP2+/V for the motion recorder
|
||||
Painting, // PTG, paintings
|
||||
Jpeg, // JFIF / FIF, used in sticker switches,
|
||||
Png, // used in LBP Vita
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue