mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-04 02:58:37 +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
|
return file.FileType switch
|
||||||
{
|
{
|
||||||
|
LbpFileType.MotionRecording => true,
|
||||||
LbpFileType.FileArchive => false,
|
LbpFileType.FileArchive => false,
|
||||||
LbpFileType.Painting => true,
|
LbpFileType.Painting => true,
|
||||||
LbpFileType.Unknown => false,
|
LbpFileType.Unknown => false,
|
||||||
|
@ -56,17 +57,18 @@ public static class FileHelper
|
||||||
|
|
||||||
return Encoding.ASCII.GetString(header) switch
|
return Encoding.ASCII.GetString(header) switch
|
||||||
{
|
{
|
||||||
|
"REC" => LbpFileType.MotionRecording,
|
||||||
"PTG" => LbpFileType.Painting,
|
"PTG" => LbpFileType.Painting,
|
||||||
"TEX" => LbpFileType.Texture,
|
"TEX" => LbpFileType.Texture,
|
||||||
"FSH" => LbpFileType.Script,
|
"FSH" => LbpFileType.Script,
|
||||||
"VOP" => LbpFileType.Voice,
|
"VOP" => LbpFileType.Voice,
|
||||||
"LVL" => LbpFileType.Level,
|
"LVL" => LbpFileType.Level,
|
||||||
"PLN" => LbpFileType.Plan,
|
"PLN" => LbpFileType.Plan,
|
||||||
_ => determineFileTypePartTwoWeirdName(reader),
|
_ => readAlternateHeader(reader),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static LbpFileType determineFileTypePartTwoWeirdName(BinaryReader reader)
|
private static LbpFileType readAlternateHeader(BinaryReader reader)
|
||||||
{
|
{
|
||||||
reader.BaseStream.Position = 0;
|
reader.BaseStream.Position = 0;
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ public enum LbpFileType
|
||||||
FileArchive, // .farc, (ends with FARC)
|
FileArchive, // .farc, (ends with FARC)
|
||||||
Plan, // PLN, uploaded with levels
|
Plan, // PLN, uploaded with levels
|
||||||
Voice, // VOP, voice data
|
Voice, // VOP, voice data
|
||||||
|
MotionRecording, // used in LBP2+/V for the motion recorder
|
||||||
Painting, // PTG, paintings
|
Painting, // PTG, paintings
|
||||||
Jpeg, // JFIF / FIF, used in sticker switches,
|
Jpeg, // JFIF / FIF, used in sticker switches,
|
||||||
Png, // used in LBP Vita
|
Png, // used in LBP Vita
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue