Merge branch 'master' of github.com:alcexhim/UniversalEditor
This commit is contained in:
commit
5ad9a6296d
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Advanced Stream Redirector">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.asx</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String"><?xml</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.Multimedia.Playlist.PlaylistObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.Multimedia.Playlist.ASXDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Compact Disc Digital Audio">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.cda</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">RIFF</MagicByte>
|
||||
<MagicByte Type="None" Length="4" />
|
||||
<MagicByte Type="String">CDDA</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.Multimedia.Playlist.PlaylistObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.Multimedia.Playlist.CDDA.CDDADataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="HTML playlist">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.html</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String"><?xml</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.Multimedia.Playlist.PlaylistObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.Multimedia.Playlist.HTMLPlaylistDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Notepad++ session">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>session.xml</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String"><?xml</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.Multimedia.Playlist.PlaylistObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.Multimedia.Playlist.NotepadPlusPlaylistDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="PLS playlist">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.pls</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">[playlist</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.Multimedia.Playlist.PlaylistObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.Multimedia.Playlist.PLSDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="SMIL/Windows Media/Zune playlist">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.wpl</FileNameFilter>
|
||||
<FileNameFilter>*.zpl</FileNameFilter>
|
||||
<FileNameFilter>*.smil</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String"><?xml</MagicByte>
|
||||
<MagicByte Type="String"><?zpl</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.Multimedia.Playlist.PlaylistObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.Multimedia.Playlist.SMILDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="SEA ARC archive">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.arc</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="HexString">1A</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.ARC.ARCDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Archive by Robert Jung">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.arj</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="HexString">60EA</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.ARJ.ARJDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Eugene Roshal WinRAR archive">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.rar</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">Rar!</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.WinRAR.RARDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Yamazaki ZIPPER/DeepFreezer archive">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.yz1</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">yz010600</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.YZ1.YZ1DataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Alien Nations GD archive">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.gd</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.AlienNations.GD.GDDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Compressed Hunks of Data">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.chd</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">MComprHD</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.CHD.CHDDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="DOOM WAD archive">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.gd</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">IWAD</MagicByte>
|
||||
</MagicByteSequence>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">PWAD</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.WAD.WADDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Dreamfall PAK archive">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.pak</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">tlj_pack0001</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.Dreamfall.PAKDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Homeworld VCE/WXD archive">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.vce</FileNameFilter>
|
||||
<FileNameFilter>*.wxd</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">VCE0</MagicByte>
|
||||
</MagicByteSequence>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">WXD1</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.Homeworld.HomeworldDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Jack Orlando PAK archive">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.pak</FileNameFilter>
|
||||
<FileNameFilter>*.phk</FileNameFilter>
|
||||
<FileNameFilter>*.ph2</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">PAK\0</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.JackOrlando.JackOrlandoDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Centauri Production / Memento Mori RES archive">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.res</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">C\0e\0n\0t\0a\0u\0r\0i\0 \0P\0r\0o\0d\0u\0c\0t\0i\0o\0n\0 \0R\0e\0s\0o\0u\0r\0c\0e\0 \0F\0i\0l\0e\0 \03\0.\01\00\0\xa\0\xa\0</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.MementoMori.RESDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="PlayStation Network package">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.pkg</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="HexString">7F</MagicByte>
|
||||
<MagicByte Type="String">PKG</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.PKG.PKGDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Princess Waltz ARC">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.arc</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.PrincessWaltz.ARC.ARCDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Unreal Engine package">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.u</FileNameFilter>
|
||||
<FileNameFilter>*.utx</FileNameFilter>
|
||||
<FileNameFilter>*.upk</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="HexString">C1832A9E</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.UnrealEngine.UnrealPackageObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.UnrealEngine.Package.UnrealPackageDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Unreal Engine UMOD installer">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.umod</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="HexString" Offset="-20">A3C5E39F</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.UnrealEngine.Installer.UMODDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Adobe color palette">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.aco</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">GIMP Palette</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.Multimedia.Palette.PaletteObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.Multimedia.Palette.Adobe.ACODataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="Adobe Swatch Exchange color palette">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.ase</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">ASEF</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.Multimedia.Palette.PaletteObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.Multimedia.Palette.Adobe.ASEDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="GIMP color palette">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.gpl</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">GIMP Palette</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.Multimedia.Palette.PaletteObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.Multimedia.Palette.GIMP.GPLDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter Title="JASC Paint Shop color palette">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.pal</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">JASC-PAL</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.Multimedia.Palette.PaletteObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.Multimedia.Palette.PaintShop.PaintShopPaletteDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -52,9 +52,29 @@
|
||||
<Content Include="Associations\FileSystem.xml" />
|
||||
<Content Include="Editors\UniversalEditor.UserInterface.WindowsForms.Editors.FileSystemEditor\Commands.xml" />
|
||||
<Content Include="Editors\UniversalEditor.UserInterface.WindowsForms.Editors.FileSystemEditor\KeyBindings.xml" />
|
||||
<Content Include="Extensions\AudioWorkstation\Associations\Playlist\ASX.xml" />
|
||||
<Content Include="Extensions\AudioWorkstation\Associations\Playlist\CompactDisc.xml" />
|
||||
<Content Include="Extensions\AudioWorkstation\Associations\Playlist\SMIL.xml" />
|
||||
<Content Include="Extensions\AudioWorkstation\Associations\Playlist\HTML.xml" />
|
||||
<Content Include="Extensions\AudioWorkstation\Associations\Playlist\PLS.xml" />
|
||||
<Content Include="Extensions\AudioWorkstation\Associations\Playlist\Notepad++.xml" />
|
||||
<Content Include="Extensions\AudioWorkstation\Associations\Playlist\M3U.xml" />
|
||||
<Content Include="Extensions\AudioWorkstation\Associations\Project\LMMS.xml" />
|
||||
<Content Include="Extensions\AudioWorkstation\Associations\SynthesizedAudio\Vocaloid.xml" />
|
||||
<Content Include="Extensions\AudioWorkstation\Associations\SynthesizedAudio\UST.xml" />
|
||||
<Content Include="Extensions\FileSystem\Associations\ARJ.xml" />
|
||||
<Content Include="Extensions\FileSystem\Associations\ARC.xml" />
|
||||
<Content Include="Extensions\FileSystem\Associations\WinRAR.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\FileSystem\AlienNationsGD.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\FileSystem\DoomWAD.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\FileSystem\DreamfallPAK.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\FileSystem\Homeworld.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\FileSystem\JackOrlandoPAK.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\FileSystem\PrincessWaltzARC.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\FileSystem\CompressedHunks.xml" />
|
||||
<Content Include="Extensions\FileSystem\Associations\YamazakiZipper.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\FileSystem\MementoMoriRES.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\FileSystem\PlayStation\PKG.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\SynthesizedAudio\SPC.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\SynthesizedAudio\PSF.xml" />
|
||||
<Content Include="Extensions\AudioWorkstation\Associations\SynthesizedAudio\NIFF.xml" />
|
||||
@ -80,6 +100,12 @@
|
||||
<Content Include="Extensions\GameDeveloper\Associations\AudioCollection\Synthesized\SPC2.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\IcarusScriptingEngine\IcarusTextDataFormatAssociation.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\IcarusScriptingEngine\IcarusBinaryDataFormatAssociation.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\UnrealPackage\UnrealUMOD.xml" />
|
||||
<Content Include="Extensions\GameDeveloper\Associations\UnrealPackage\UnrealPackage.xml" />
|
||||
<Content Include="Extensions\GraphicDesigner\Associations\Palette\Adobe\ACOColorPalette.xml" />
|
||||
<Content Include="Extensions\GraphicDesigner\Associations\Palette\Adobe\AdobeSwatchExchange.xml" />
|
||||
<Content Include="Extensions\GraphicDesigner\Associations\Palette\GIMPColorPalette.xml" />
|
||||
<Content Include="Extensions\GraphicDesigner\Associations\Palette\JASCPaintShopPro.xml" />
|
||||
<Content Include="Extensions\GraphicDesigner\Associations\VectorImage\ExpressionDesign.xml" />
|
||||
<Content Include="Extensions\VideoWorkstation\Associations\BluRay\MOBJ.xml" />
|
||||
<Content Include="Extensions\VideoWorkstation\Associations\BluRay\INDX.xml" />
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.FileSystem.ARC
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("SEA ARC archive", /* new byte?[][] { new byte?[] { 0x1A } }, */ new string[] { "*.arc" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.FileSystem.ARJ
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Archive by Robert Jung", new byte?[][] { new byte?[] { 0x60, 0xEA } }, new string[] { "*.arj" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.FileSystem.AlienNations.GD
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Alien Nations GD archive", new string[] { "*.gd" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -14,7 +14,6 @@ namespace UniversalEditor.DataFormats.FileSystem.CHD
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Compressed Hunks of Data", new byte?[][] { new byte?[] { (byte)'M', (byte)'C', (byte)'o', (byte)'m', (byte)'p', (byte)'r', (byte)'H', (byte)'D' } }, new string[] { "*.chd" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.FileSystem.Dreamfall
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Dreamfall PAK archive", new byte?[][] { new byte?[] { (byte)'t', (byte)'l', (byte)'j', (byte)'_', (byte)'p', (byte)'a', (byte)'c', (byte)'k', (byte)'0', (byte)'0', (byte)'0', (byte)'1' } }, new string[] { "*.pak" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.FileSystem.Homeworld
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Homeworld VCE/WXD archive", new byte?[][] { new byte?[] { (byte)'V', (byte)'C', (byte)'E', (byte)'0' }, new byte?[] { (byte)'W', (byte)'X', (byte)'D', (byte)'1' } }, new string[] { "*.wxd", "*.vce" });
|
||||
_dfr.ExportOptions.Add(new CustomOptionChoice("Version", "Format &version:", true,
|
||||
new CustomOptionFieldChoice("Version \"VCE0\"", (uint)0),
|
||||
new CustomOptionFieldChoice("Version \"WXD1\"", (uint)1)
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.FileSystem.JackOrlando
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Jack Orlando archive", new byte?[][] { new byte?[] { (byte)'P', (byte)'A', (byte)'K', (byte)0 } }, new string[] { "*.pak", "*.phk", "*.ph2" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -15,16 +15,6 @@ namespace UniversalEditor.DataFormats.FileSystem.MementoMori
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Centauri Production / Memento Mori RES archive", new byte?[][]
|
||||
{
|
||||
new byte?[] { (byte)'C', 0, (byte)'e', 0, (byte)'n', 0, (byte)'t', 0, (byte)'a', 0,
|
||||
(byte)'u', 0, (byte)'r', 0, (byte)'i', 0, (byte)' ', 0, (byte)'P', 0, (byte)'r', 0,
|
||||
(byte)'o', 0, (byte)'d', 0, (byte)'u', 0, (byte)'c', 0, (byte)'t', 0, (byte)'i', 0,
|
||||
(byte)'o', 0, (byte)'n', 0, (byte)' ', 0, (byte)'R', 0, (byte)'e', 0, (byte)'s', 0,
|
||||
(byte)'o', 0, (byte)'u', 0, (byte)'r', 0, (byte)'c', 0, (byte)'e', 0, (byte)' ', 0,
|
||||
(byte)'F', 0, (byte)'i', 0, (byte)'l', 0, (byte)'e', 0, (byte)' ', 0, (byte)'3', 0,
|
||||
(byte)'.', 0, (byte)'1', 0, (byte)'0', 0, 0x0A, 0, 0x0A, 0 }
|
||||
}, new string[] { "*.res" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -13,7 +13,6 @@ namespace UniversalEditor.DataFormats.FileSystem.PKG
|
||||
{
|
||||
if (_dfr == null) _dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("PlayStation Network package", new byte?[][] { new byte?[] { (byte)0x7F, (byte)'P', (byte)'K', (byte)'G' } }, new string[] { "*.pkg" });
|
||||
_dfr.ExportOptions.Add(new CustomOptionText("GameName", "Game &name:"));
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.FileSystem.PrincessWaltz.ARC
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Princess Waltz ARC", new string[] { "*.arc" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.FileSystem.WAD
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("DOOM WAD archive", new byte?[][] { new byte?[] { (byte)'I', (byte)'W', (byte)'A', (byte)'D' } }, new string[] { "*.wad" });
|
||||
_dfr.ExportOptions.Add(new CustomOptionBoolean("UserContent", "This archive contains public content (PWAD) rather than internal content (IWAD)"));
|
||||
}
|
||||
return _dfr;
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.FileSystem.WinRAR
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Eugene Roshal WinRAR archive", new byte?[][] { new byte?[] { (byte)'R', (byte)'a', (byte)'r', (byte)'!' } }, new string[] { "*.rar" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.FileSystem.YZ1
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Yamazaki ZIPPER/DeepFreezer archive", new byte?[][] { new byte?[] { (byte)'y', (byte)'z', (byte)'0', (byte)'1', (byte)'0', (byte)'6', (byte)'0', (byte)'0' } }, new string[] { "*.yz1" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.Multimedia.Palette.Adobe
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(PaletteObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Adobe color palette", new string[] { "*.aco" });
|
||||
_dfr.Sources.Add("http://www.nomodes.com/aco.html");
|
||||
_dfr.ExportOptions.Add(new CustomOptionNumber("Version", "&Version:", 1, 1, ushort.MaxValue));
|
||||
}
|
||||
|
||||
@ -18,7 +18,6 @@ namespace UniversalEditor.DataFormats.Multimedia.Palette.Adobe
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(PaletteObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Adobe Swatch Exchange color palette", new byte?[][] { new byte?[] { (byte)'A', (byte)'S', (byte)'E', (byte)'F' } }, new string[] { "*.ase" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.Multimedia.Palette.GIMP
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(PaletteObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("GIMP color palette", new byte?[][] { new byte?[] { (byte)'G', (byte)'I', (byte)'M', (byte)'P', (byte)' ', (byte)'P', (byte)'a', (byte)'l', (byte)'e', (byte)'t', (byte)'t', (byte)'e' } }, new string[] { "*.gpl" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ namespace UniversalEditor.DataFormats.Multimedia.Palette.PaintShop
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(PaletteObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("JASC Paint Shop color palette", new byte?[][] { new byte?[] { (byte)'J', (byte)'A', (byte)'S', (byte)'C', (byte)'-', (byte)'P', (byte)'A', (byte)'L' } }, new string[] { "*.pal" });
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
@ -11,8 +11,6 @@ namespace UniversalEditor.DataFormats.Multimedia.Playlist
|
||||
{
|
||||
DataFormatReference dfr = base.MakeReferenceInternal();
|
||||
dfr.Clear();
|
||||
|
||||
dfr.Filters.Add("Advanced Stream Redirector", new string[] { "*.asx" });
|
||||
dfr.Capabilities.Add(typeof(PlaylistObjectModel), DataFormatCapabilities.All);
|
||||
dfr.ContentTypes.Add("video/x-ms-asf");
|
||||
return dfr;
|
||||
|
||||
@ -16,8 +16,6 @@ namespace UniversalEditor.DataFormats.Multimedia.Playlist.CDDA
|
||||
{
|
||||
DataFormatReference dfr = base.MakeReferenceInternal();
|
||||
dfr.Clear();
|
||||
|
||||
dfr.Filters.Add("Compact Disc Digital Audio", new byte?[][] { new byte?[] { new byte?(82), new byte?(73), new byte?(70), new byte?(70), null, null, null, null, new byte?(67), new byte?(68), new byte?(68), new byte?(65) } }, new string[] { "*.cda" });
|
||||
dfr.Capabilities.Add(typeof(PlaylistObjectModel), DataFormatCapabilities.All);
|
||||
return dfr;
|
||||
}
|
||||
@ -28,7 +26,7 @@ namespace UniversalEditor.DataFormats.Multimedia.Playlist.CDDA
|
||||
PlaylistObjectModel pom = objectModels.Pop() as PlaylistObjectModel;
|
||||
RIFFDataChunk fmtChunk = new RIFFDataChunk();
|
||||
fmtChunk.ID = "fmt ";
|
||||
Accessors.MemoryAccessor ms = new Accessors.MemoryAccessor();
|
||||
Accessors.MemoryAccessor ms = new Accessors.MemoryAccessor();
|
||||
IO.Writer bw = new IO.Writer(ms);
|
||||
ushort CDAFileVersion = 1;
|
||||
ushort CDATrackNumber = 1;
|
||||
@ -66,7 +64,7 @@ namespace UniversalEditor.DataFormats.Multimedia.Playlist.CDDA
|
||||
CDATrackLengthRBFMinute,
|
||||
CDATrackLengthRBFUnused
|
||||
});
|
||||
ms.Close();
|
||||
ms.Close();
|
||||
|
||||
fmtChunk.Data = ms.ToArray();
|
||||
rom.Chunks.Add(fmtChunk);
|
||||
|
||||
@ -11,8 +11,6 @@ namespace UniversalEditor.DataFormats.Multimedia.Playlist
|
||||
{
|
||||
DataFormatReference dfr = base.MakeReferenceInternal();
|
||||
dfr.Clear();
|
||||
|
||||
dfr.Filters.Add("HTML playlist", new byte?[][] { new byte?[] { new byte?(60), new byte?(63), new byte?(120), new byte?(109), new byte?(108) } }, new string[] { "*.html" });
|
||||
dfr.Capabilities.Add(typeof(MarkupObjectModel), DataFormatCapabilities.Bootstrap);
|
||||
dfr.Capabilities.Add(typeof(PlaylistObjectModel), DataFormatCapabilities.All);
|
||||
return dfr;
|
||||
@ -38,15 +36,15 @@ namespace UniversalEditor.DataFormats.Multimedia.Playlist
|
||||
PlaylistObjectModel pom = objectModels.Pop() as PlaylistObjectModel;
|
||||
}
|
||||
|
||||
protected override void BeforeSaveInternal(Stack<ObjectModel> objectModels)
|
||||
{
|
||||
base.BeforeSaveInternal(objectModels);
|
||||
protected override void BeforeSaveInternal(Stack<ObjectModel> objectModels)
|
||||
{
|
||||
base.BeforeSaveInternal(objectModels);
|
||||
|
||||
PlaylistObjectModel pom = (objectModels.Pop() as PlaylistObjectModel);
|
||||
if (pom == null) throw new ObjectModelNotSupportedException();
|
||||
PlaylistObjectModel pom = (objectModels.Pop() as PlaylistObjectModel);
|
||||
if (pom == null) throw new ObjectModelNotSupportedException();
|
||||
|
||||
MarkupObjectModel mom = new MarkupObjectModel();
|
||||
objectModels.Push(mom);
|
||||
}
|
||||
MarkupObjectModel mom = new MarkupObjectModel();
|
||||
objectModels.Push(mom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,7 +10,6 @@ namespace UniversalEditor.DataFormats.Multimedia.Playlist
|
||||
protected override DataFormatReference MakeReferenceInternal()
|
||||
{
|
||||
DataFormatReference dfr = base.MakeReferenceInternal();
|
||||
dfr.Filters.Add("Notepad++ session", new byte?[][] { new byte?[] { new byte?(60), new byte?(63), new byte?(120), new byte?(109), new byte?(108) } }, new string[] { "session.xml" });
|
||||
dfr.Capabilities.Add(typeof(MarkupObjectModel), DataFormatCapabilities.Bootstrap);
|
||||
dfr.Capabilities.Add(typeof(PlaylistObjectModel), DataFormatCapabilities.All);
|
||||
return dfr;
|
||||
|
||||
@ -11,7 +11,6 @@ namespace UniversalEditor.DataFormats.Multimedia.Playlist
|
||||
protected override DataFormatReference MakeReferenceInternal()
|
||||
{
|
||||
DataFormatReference dfr = new DataFormatReference(GetType());
|
||||
dfr.Filters.Add("PLS playlist", new byte?[][] { new byte?[] { (byte)'[', (byte)'p', (byte)'l', (byte)'a', (byte)'y', (byte)'l', (byte)'i', (byte)'s', (byte)'t' } }, new string[] { "*.pls" });
|
||||
dfr.Capabilities.Add(typeof(PlaylistObjectModel), DataFormatCapabilities.All);
|
||||
dfr.ContentTypes.Add("audio/x-scpls");
|
||||
return dfr;
|
||||
|
||||
@ -14,7 +14,6 @@ namespace UniversalEditor.DataFormats.Multimedia.Playlist
|
||||
{
|
||||
DataFormatReference dfr = base.MakeReferenceInternal();
|
||||
dfr.Clear();
|
||||
dfr.Filters.Add("SMIL/Windows Media/Zune playlist", new byte?[][] { new byte?[] { new byte?(60), new byte?(63), new byte?(119), new byte?(112), new byte?(108) }, new byte?[] { new byte?(60), new byte?(63), new byte?(122), new byte?(112), new byte?(108) }, new byte?[] { new byte?(60), new byte?(63), new byte?(120), new byte?(109), new byte?(108) } }, new string[] { "*.wpl", "*.zpl", "*.smil" });
|
||||
dfr.Capabilities.Add(typeof(MarkupObjectModel), DataFormatCapabilities.Bootstrap);
|
||||
dfr.Capabilities.Add(typeof(PlaylistObjectModel), DataFormatCapabilities.All);
|
||||
dfr.ContentTypes.AddRange("application/smil+xml", "application/vnd.ms-wpl");
|
||||
|
||||
@ -9,177 +9,175 @@ using UniversalEditor.Plugins.UnrealEngine;
|
||||
|
||||
namespace UniversalEditor.DataFormats.UnrealEngine.Installer
|
||||
{
|
||||
public class UMODDataFormat : DataFormat
|
||||
{
|
||||
private static DataFormatReference _dfr = null;
|
||||
protected override DataFormatReference MakeReferenceInternal()
|
||||
{
|
||||
if (_dfr == null)
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Unreal Tournament UMOD installer", new byte?[][] { new byte?[] { 0xA3, 0xC5, 0xE3, 0x9F } }, new string[] { "*.umod" });
|
||||
_dfr.Filters[0].MagicByteOffsets = new int[] { -20 };
|
||||
public class UMODDataFormat : DataFormat
|
||||
{
|
||||
private static DataFormatReference _dfr = null;
|
||||
protected override DataFormatReference MakeReferenceInternal()
|
||||
{
|
||||
if (_dfr == null)
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(FileSystemObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Sources.Add("http://wiki.beyondunreal.com/Legacy:UMOD/File_Format");
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
protected override void LoadInternal(ref ObjectModel objectModel)
|
||||
{
|
||||
Reader br = base.Accessor.Reader;
|
||||
FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel);
|
||||
protected override void LoadInternal(ref ObjectModel objectModel)
|
||||
{
|
||||
Reader br = base.Accessor.Reader;
|
||||
FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel);
|
||||
|
||||
// The UMOD file "header" is 20 bytes long. The header is stored in the last 20 bytes of
|
||||
// the file (hence the quotes around the term "header").
|
||||
br.Accessor.Seek(-20, SeekOrigin.End);
|
||||
// The UMOD file "header" is 20 bytes long. The header is stored in the last 20 bytes of
|
||||
// the file (hence the quotes around the term "header").
|
||||
br.Accessor.Seek(-20, SeekOrigin.End);
|
||||
|
||||
// Magic number. Used to verify this file as a UMOD installer. Always 0x9FE3C5A3.
|
||||
uint magic = br.ReadUInt32();
|
||||
if (magic != 0x9FE3C5A3) throw new InvalidDataFormatException("Footer does not begin with 0x9FE3C5A3");
|
||||
// Magic number. Used to verify this file as a UMOD installer. Always 0x9FE3C5A3.
|
||||
uint magic = br.ReadUInt32();
|
||||
if (magic != 0x9FE3C5A3) throw new InvalidDataFormatException("Footer does not begin with 0x9FE3C5A3");
|
||||
|
||||
// Byte offset of file directory in the UMOD file. (See below.)
|
||||
uint fileDirectoryOffset = br.ReadUInt32();
|
||||
// Byte offset of file directory in the UMOD file. (See below.)
|
||||
uint fileDirectoryOffset = br.ReadUInt32();
|
||||
|
||||
// Total byte size of the UMOD file.
|
||||
uint fileSize = br.ReadUInt32();
|
||||
// Total byte size of the UMOD file.
|
||||
uint fileSize = br.ReadUInt32();
|
||||
|
||||
// UMOD file version.
|
||||
uint formatVersion = br.ReadUInt32();
|
||||
// UMOD file version.
|
||||
uint formatVersion = br.ReadUInt32();
|
||||
|
||||
// CRC32 checksum over the file content.
|
||||
uint checksum = br.ReadUInt32();
|
||||
// CRC32 checksum over the file content.
|
||||
uint checksum = br.ReadUInt32();
|
||||
|
||||
// The file directory describes the files stored in the first part of the UMOD file. Its
|
||||
// byte offset in the UMOD file is given in the file "header" (see above).
|
||||
br.Accessor.Seek(fileDirectoryOffset, SeekOrigin.Begin);
|
||||
// The file directory describes the files stored in the first part of the UMOD file. Its
|
||||
// byte offset in the UMOD file is given in the file "header" (see above).
|
||||
br.Accessor.Seek(fileDirectoryOffset, SeekOrigin.Begin);
|
||||
|
||||
// The directory consists of an index-type file count (the index data type is described
|
||||
// below), followed by variable-size records, each describing one file in the UMOD
|
||||
// installer.
|
||||
int fileCount = br.ReadINDEX();
|
||||
// The directory consists of an index-type file count (the index data type is described
|
||||
// below), followed by variable-size records, each describing one file in the UMOD
|
||||
// installer.
|
||||
int fileCount = br.ReadINDEX();
|
||||
|
||||
for (int i = 0; i < fileCount; i++)
|
||||
{
|
||||
// Length of file name (including trailing null byte).
|
||||
int fileNameLength = br.ReadINDEX();
|
||||
for (int i = 0; i < fileCount; i++)
|
||||
{
|
||||
// Length of file name (including trailing null byte).
|
||||
int fileNameLength = br.ReadINDEX();
|
||||
|
||||
// File name, with trailing null byte.
|
||||
string fileName = br.ReadNullTerminatedString();
|
||||
// File name, with trailing null byte.
|
||||
string fileName = br.ReadNullTerminatedString();
|
||||
|
||||
// Byte offset of file in UMOD file.
|
||||
uint offset = br.ReadUInt32();
|
||||
// Byte length of file.
|
||||
uint length = br.ReadUInt32();
|
||||
// Byte offset of file in UMOD file.
|
||||
uint offset = br.ReadUInt32();
|
||||
// Byte length of file.
|
||||
uint length = br.ReadUInt32();
|
||||
|
||||
|
||||
// Bit field describing file flags.
|
||||
// Bit field describing file flags.
|
||||
|
||||
// Mychaeel: Feel free to investigate and contribute information about the file flags.
|
||||
// (I know that they have to be set to 0x03 for Manifest.ini and Manifest.int to
|
||||
// prevent those files from being copied to the user's System directory, and set to
|
||||
// 0x00 for all other files.)
|
||||
UMODFileFlags flags = (UMODFileFlags)br.ReadUInt32();
|
||||
// Mychaeel: Feel free to investigate and contribute information about the file flags.
|
||||
// (I know that they have to be set to 0x03 for Manifest.ini and Manifest.int to
|
||||
// prevent those files from being copied to the user's System directory, and set to
|
||||
// 0x00 for all other files.)
|
||||
UMODFileFlags flags = (UMODFileFlags)br.ReadUInt32();
|
||||
|
||||
File file = new File();
|
||||
file.Name = fileName;
|
||||
file.Size = length;
|
||||
file.Properties.Add("offset", offset);
|
||||
file.Properties.Add("length", length);
|
||||
fsom.Files.Add(file);
|
||||
}
|
||||
}
|
||||
File file = new File();
|
||||
file.Name = fileName;
|
||||
file.Size = length;
|
||||
file.Properties.Add("offset", offset);
|
||||
file.Properties.Add("length", length);
|
||||
fsom.Files.Add(file);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SaveInternal(ObjectModel objectModel)
|
||||
{
|
||||
FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel);
|
||||
Writer bw = null;
|
||||
protected override void SaveInternal(ObjectModel objectModel)
|
||||
{
|
||||
FileSystemObjectModel fsom = (objectModel as FileSystemObjectModel);
|
||||
Writer bw = null;
|
||||
|
||||
#region File data
|
||||
MemoryAccessor msData = new MemoryAccessor();
|
||||
bw = new Writer(msData);
|
||||
foreach (File file in fsom.Files)
|
||||
{
|
||||
bw.WriteBytes(file.GetDataAsByteArray());
|
||||
}
|
||||
bw.Close();
|
||||
#region File data
|
||||
MemoryAccessor msData = new MemoryAccessor();
|
||||
bw = new Writer(msData);
|
||||
foreach (File file in fsom.Files)
|
||||
{
|
||||
bw.WriteBytes(file.GetDataAsByteArray());
|
||||
}
|
||||
bw.Close();
|
||||
|
||||
byte[] data = msData.ToArray();
|
||||
#endregion
|
||||
#region File records
|
||||
uint fileOffset = 0;
|
||||
byte[] data = msData.ToArray();
|
||||
#endregion
|
||||
#region File records
|
||||
uint fileOffset = 0;
|
||||
|
||||
MemoryAccessor msDirectory = new MemoryAccessor();
|
||||
bw = new Writer(msDirectory);
|
||||
// The directory consists of an index-type file count (the index data type is described
|
||||
// below), followed by variable-size records, each describing one file in the UMOD
|
||||
// installer.
|
||||
bw.WriteINDEX(fsom.Files.Count);
|
||||
foreach (File file in fsom.Files)
|
||||
{
|
||||
// Length of file name (including trailing null byte).
|
||||
bw.WriteINDEX(file.Name.Length);
|
||||
bw = new Writer(msDirectory);
|
||||
// The directory consists of an index-type file count (the index data type is described
|
||||
// below), followed by variable-size records, each describing one file in the UMOD
|
||||
// installer.
|
||||
bw.WriteINDEX(fsom.Files.Count);
|
||||
foreach (File file in fsom.Files)
|
||||
{
|
||||
// Length of file name (including trailing null byte).
|
||||
bw.WriteINDEX(file.Name.Length);
|
||||
|
||||
// File name, with trailing null byte.
|
||||
bw.WriteNullTerminatedString(file.Name);
|
||||
// File name, with trailing null byte.
|
||||
bw.WriteNullTerminatedString(file.Name);
|
||||
|
||||
// Byte offset of file in UMOD file.
|
||||
bw.WriteUInt32(fileOffset);
|
||||
// Byte length of file.
|
||||
bw.WriteUInt32((uint)file.Size);
|
||||
// Byte offset of file in UMOD file.
|
||||
bw.WriteUInt32(fileOffset);
|
||||
// Byte length of file.
|
||||
bw.WriteUInt32((uint)file.Size);
|
||||
|
||||
|
||||
// Bit field describing file flags.
|
||||
// Bit field describing file flags.
|
||||
|
||||
// Mychaeel: Feel free to investigate and contribute information about the file flags.
|
||||
// (I know that they have to be set to 0x03 for Manifest.ini and Manifest.int to
|
||||
// prevent those files from being copied to the user's System directory, and set to
|
||||
// 0x00 for all other files.)
|
||||
UMODFileFlags flags = UMODFileFlags.None;
|
||||
bw.WriteUInt32((uint)flags);
|
||||
fileOffset += (uint)file.Size;
|
||||
}
|
||||
bw.Close();
|
||||
// Mychaeel: Feel free to investigate and contribute information about the file flags.
|
||||
// (I know that they have to be set to 0x03 for Manifest.ini and Manifest.int to
|
||||
// prevent those files from being copied to the user's System directory, and set to
|
||||
// 0x00 for all other files.)
|
||||
UMODFileFlags flags = UMODFileFlags.None;
|
||||
bw.WriteUInt32((uint)flags);
|
||||
fileOffset += (uint)file.Size;
|
||||
}
|
||||
bw.Close();
|
||||
|
||||
byte[] directoryData = msDirectory.ToArray();
|
||||
#endregion
|
||||
#region Header data
|
||||
// The UMOD file "header" is 20 bytes long. The header is stored in the last 20 bytes of
|
||||
// the file (hence the quotes around the term "header").
|
||||
MemoryAccessor msHeader = new MemoryAccessor();
|
||||
bw = new Writer(msHeader);
|
||||
byte[] directoryData = msDirectory.ToArray();
|
||||
#endregion
|
||||
#region Header data
|
||||
// The UMOD file "header" is 20 bytes long. The header is stored in the last 20 bytes of
|
||||
// the file (hence the quotes around the term "header").
|
||||
MemoryAccessor msHeader = new MemoryAccessor();
|
||||
bw = new Writer(msHeader);
|
||||
|
||||
// Magic number. Used to verify this file as a UMOD installer. Always 0x9FE3C5A3.
|
||||
bw.WriteUInt32((uint)0x9FE3C5A3);
|
||||
// Magic number. Used to verify this file as a UMOD installer. Always 0x9FE3C5A3.
|
||||
bw.WriteUInt32((uint)0x9FE3C5A3);
|
||||
|
||||
// Byte offset of file directory in the UMOD file. (See below.)
|
||||
uint fileDirectoryOffset = (uint)data.Length;
|
||||
bw.WriteUInt32(fileDirectoryOffset);
|
||||
// Byte offset of file directory in the UMOD file. (See below.)
|
||||
uint fileDirectoryOffset = (uint)data.Length;
|
||||
bw.WriteUInt32(fileDirectoryOffset);
|
||||
|
||||
// Total byte size of the UMOD file.
|
||||
uint fileSize = 20;
|
||||
bw.WriteUInt32(fileSize);
|
||||
// Total byte size of the UMOD file.
|
||||
uint fileSize = 20;
|
||||
bw.WriteUInt32(fileSize);
|
||||
|
||||
// UMOD file version.
|
||||
uint formatVersion = 0;
|
||||
bw.WriteUInt32(formatVersion);
|
||||
// UMOD file version.
|
||||
uint formatVersion = 0;
|
||||
bw.WriteUInt32(formatVersion);
|
||||
|
||||
// CRC32 checksum over the file content.
|
||||
uint checksum = 0;
|
||||
bw.WriteUInt32(checksum);
|
||||
// CRC32 checksum over the file content.
|
||||
uint checksum = 0;
|
||||
bw.WriteUInt32(checksum);
|
||||
|
||||
bw.Flush();
|
||||
bw.Close();
|
||||
bw.Flush();
|
||||
bw.Close();
|
||||
|
||||
byte[] headerData = msHeader.ToArray();
|
||||
#endregion
|
||||
byte[] headerData = msHeader.ToArray();
|
||||
#endregion
|
||||
|
||||
bw = base.Accessor.Writer;
|
||||
bw = base.Accessor.Writer;
|
||||
|
||||
bw.WriteBytes(data);
|
||||
bw.WriteBytes(directoryData);
|
||||
bw.WriteBytes(headerData);
|
||||
bw.Flush();
|
||||
}
|
||||
}
|
||||
bw.WriteBytes(data);
|
||||
bw.WriteBytes(directoryData);
|
||||
bw.WriteBytes(headerData);
|
||||
bw.Flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,224 +8,223 @@ using UniversalEditor.Plugins.UnrealEngine;
|
||||
|
||||
namespace UniversalEditor.DataFormats.UnrealEngine.Package
|
||||
{
|
||||
public class UnrealPackageDataFormat : DataFormat
|
||||
{
|
||||
private static DataFormatReference _dfr = null;
|
||||
protected override DataFormatReference MakeReferenceInternal()
|
||||
{
|
||||
if (_dfr == null)
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(UnrealPackageObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Filters.Add("Unreal Engine package", new byte?[][] { new byte?[] { 0xC1, 0x83, 0x2A, 0x9E } }, new string[] { "*.u", "*.utx", "*.upk" });
|
||||
_dfr.ExportOptions.Add(new CustomOptionText("PackageName", "Package &name:"));
|
||||
_dfr.ExportOptions.Add(new CustomOptionNumber("PackageVersion", "Package &version:", 0, UInt16.MinValue, UInt16.MaxValue));
|
||||
public class UnrealPackageDataFormat : DataFormat
|
||||
{
|
||||
private static DataFormatReference _dfr = null;
|
||||
protected override DataFormatReference MakeReferenceInternal()
|
||||
{
|
||||
if (_dfr == null)
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(UnrealPackageObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.ExportOptions.Add(new CustomOptionText("PackageName", "Package &name:"));
|
||||
_dfr.ExportOptions.Add(new CustomOptionNumber("PackageVersion", "Package &version:", 0, UInt16.MinValue, UInt16.MaxValue));
|
||||
_dfr.Sources.Add("http://wiki.beyondunreal.com/Legacy:Package_File_Format");
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
private ushort mvarPackageVersion = 0;
|
||||
/// <summary>
|
||||
/// Version of the file-format; Unreal1 uses mostly 61-63, UT 67-69; However, note that
|
||||
/// quite a few packages are in use with UT that have Unreal1 versions.
|
||||
/// </summary>
|
||||
public ushort PackageVersion { get { return mvarPackageVersion; } set { mvarPackageVersion = value; } }
|
||||
|
||||
private string mvarPackageName = String.Empty;
|
||||
public string PackageName { get { return mvarPackageName; } set { mvarPackageName = value; } }
|
||||
private ushort mvarPackageVersion = 0;
|
||||
/// <summary>
|
||||
/// Version of the file-format; Unreal1 uses mostly 61-63, UT 67-69; However, note that
|
||||
/// quite a few packages are in use with UT that have Unreal1 versions.
|
||||
/// </summary>
|
||||
public ushort PackageVersion { get { return mvarPackageVersion; } set { mvarPackageVersion = value; } }
|
||||
|
||||
private string mvarPackageName = String.Empty;
|
||||
public string PackageName { get { return mvarPackageName; } set { mvarPackageName = value; } }
|
||||
|
||||
protected override void LoadInternal(ref ObjectModel objectModel)
|
||||
{
|
||||
Reader br = base.Accessor.Reader;
|
||||
|
||||
UnrealPackageObjectModel upk = (objectModel as UnrealPackageObjectModel);
|
||||
#region Header
|
||||
protected override void LoadInternal(ref ObjectModel objectModel)
|
||||
{
|
||||
Reader br = base.Accessor.Reader;
|
||||
|
||||
UnrealPackageObjectModel upk = (objectModel as UnrealPackageObjectModel);
|
||||
#region Header
|
||||
|
||||
// Always "0x9E2A83C1"; use this to verify that you indeed try to read an Unreal-Package
|
||||
uint signature = br.ReadUInt32();
|
||||
if (signature != 0x9E2A83C1) throw new InvalidDataFormatException("File does not begin with 0x9E2A83C1");
|
||||
// Always "0x9E2A83C1"; use this to verify that you indeed try to read an Unreal-Package
|
||||
uint signature = br.ReadUInt32();
|
||||
if (signature != 0x9E2A83C1) throw new InvalidDataFormatException("File does not begin with 0x9E2A83C1");
|
||||
|
||||
mvarPackageVersion = br.ReadUInt16();
|
||||
upk.LicenseeNumber = br.ReadUInt16();
|
||||
upk.PackageFlags = (PackageFlags)br.ReadUInt32(); // 1949392
|
||||
mvarPackageVersion = br.ReadUInt16();
|
||||
upk.LicenseeNumber = br.ReadUInt16();
|
||||
upk.PackageFlags = (PackageFlags)br.ReadUInt32(); // 1949392
|
||||
|
||||
if (mvarPackageVersion >= 512)
|
||||
{
|
||||
uint valueLength = br.ReadUInt32();
|
||||
mvarPackageName = br.ReadFixedLengthString(valueLength);
|
||||
mvarPackageName = mvarPackageName.TrimNull();
|
||||
if (mvarPackageVersion >= 512)
|
||||
{
|
||||
uint valueLength = br.ReadUInt32();
|
||||
mvarPackageName = br.ReadFixedLengthString(valueLength);
|
||||
mvarPackageName = mvarPackageName.TrimNull();
|
||||
|
||||
uint unknown1 = br.ReadUInt32();
|
||||
uint unknown2 = br.ReadUInt32();
|
||||
}
|
||||
uint unknown1 = br.ReadUInt32();
|
||||
uint unknown2 = br.ReadUInt32();
|
||||
}
|
||||
|
||||
// Number of entries in name-table
|
||||
uint nameTableEntryCount = br.ReadUInt32();
|
||||
// Offset of name-table within the file
|
||||
uint nameTableOffset = br.ReadUInt32();
|
||||
// Number of entries in name-table
|
||||
uint nameTableEntryCount = br.ReadUInt32();
|
||||
// Offset of name-table within the file
|
||||
uint nameTableOffset = br.ReadUInt32();
|
||||
|
||||
// Number of entries in export-table
|
||||
uint exportTableEntryCount = br.ReadUInt32();
|
||||
// Offset of export-table within the file
|
||||
uint exportTableOffset = br.ReadUInt32();
|
||||
// Number of entries in export-table
|
||||
uint exportTableEntryCount = br.ReadUInt32();
|
||||
// Offset of export-table within the file
|
||||
uint exportTableOffset = br.ReadUInt32();
|
||||
|
||||
// Number of entries in import-table
|
||||
uint importTableEntryCount = br.ReadUInt32();
|
||||
// Offset of import-table within the file
|
||||
uint importTableOffset = br.ReadUInt32();
|
||||
// Number of entries in import-table
|
||||
uint importTableEntryCount = br.ReadUInt32();
|
||||
// Offset of import-table within the file
|
||||
uint importTableOffset = br.ReadUInt32();
|
||||
|
||||
// After the ImportOffset, the header differs between the versions. The only interesting
|
||||
// fact, though, is that for fileformat versions => 68, a GUID has been introduced. It can
|
||||
// be found right after the ImportOffset:
|
||||
if (mvarPackageVersion < 68)
|
||||
{
|
||||
// number of values in the Heritage Table
|
||||
uint heritageTableEntryCount = br.ReadUInt32();
|
||||
// offset of the Heritage Table from the beginning of the file
|
||||
uint heritageTableOffset = br.ReadUInt32();
|
||||
// After the ImportOffset, the header differs between the versions. The only interesting
|
||||
// fact, though, is that for fileformat versions => 68, a GUID has been introduced. It can
|
||||
// be found right after the ImportOffset:
|
||||
if (mvarPackageVersion < 68)
|
||||
{
|
||||
// number of values in the Heritage Table
|
||||
uint heritageTableEntryCount = br.ReadUInt32();
|
||||
// offset of the Heritage Table from the beginning of the file
|
||||
uint heritageTableOffset = br.ReadUInt32();
|
||||
|
||||
long pos = br.Accessor.Position;
|
||||
br.Accessor.Position = heritageTableOffset;
|
||||
long pos = br.Accessor.Position;
|
||||
br.Accessor.Position = heritageTableOffset;
|
||||
|
||||
for (uint i = 0; i < heritageTableEntryCount; i++)
|
||||
{
|
||||
upk.PackageGUIDs.Add(br.ReadGuid());
|
||||
}
|
||||
for (uint i = 0; i < heritageTableEntryCount; i++)
|
||||
{
|
||||
upk.PackageGUIDs.Add(br.ReadGuid());
|
||||
}
|
||||
|
||||
br.Accessor.Position = pos;
|
||||
}
|
||||
else if (mvarPackageVersion >= 68)
|
||||
{
|
||||
upk.PackageGUIDs.Add(br.ReadGuid());
|
||||
br.Accessor.Position = pos;
|
||||
}
|
||||
else if (mvarPackageVersion >= 68)
|
||||
{
|
||||
upk.PackageGUIDs.Add(br.ReadGuid());
|
||||
|
||||
if (mvarPackageVersion < 512)
|
||||
{
|
||||
uint generationCount = br.ReadUInt32();
|
||||
for (uint i = 0; i < generationCount; i++)
|
||||
{
|
||||
Generation generation = new Generation();
|
||||
generation.ExportCount = br.ReadUInt32();
|
||||
generation.NameCount = br.ReadUInt32();
|
||||
upk.Generations.Add(generation);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mvarPackageVersion < 512)
|
||||
{
|
||||
uint generationCount = br.ReadUInt32();
|
||||
for (uint i = 0; i < generationCount; i++)
|
||||
{
|
||||
Generation generation = new Generation();
|
||||
generation.ExportCount = br.ReadUInt32();
|
||||
generation.NameCount = br.ReadUInt32();
|
||||
upk.Generations.Add(generation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Name table
|
||||
{
|
||||
// The Unreal-Engine introduces two new variable-types. The first one is a rather simple
|
||||
// string type, called NAME from now on. The second one is a bit more tricky, these
|
||||
// CompactIndices, or INDEX later on, compresses ordinary DWORDs downto one to five BYTEs.
|
||||
#region Name table
|
||||
{
|
||||
// The Unreal-Engine introduces two new variable-types. The first one is a rather simple
|
||||
// string type, called NAME from now on. The second one is a bit more tricky, these
|
||||
// CompactIndices, or INDEX later on, compresses ordinary DWORDs downto one to five BYTEs.
|
||||
|
||||
// The first and most simple one of the three tables is the name-table. The name-table can
|
||||
// be considered an index of all unique names used for objects and references within the
|
||||
// file. Later on, you'll often find indexes into this table instead of a string
|
||||
// containing the object-name.
|
||||
br.Accessor.Position = nameTableOffset;
|
||||
for (uint i = 0; i < nameTableEntryCount; i++)
|
||||
{
|
||||
string name = br.ReadNAME(mvarPackageVersion);
|
||||
if (mvarPackageVersion >= 512)
|
||||
{
|
||||
uint unknown = br.ReadUInt32();
|
||||
}
|
||||
NameTableEntryFlags flags = (NameTableEntryFlags)br.ReadInt32();
|
||||
upk.NameTableEntries.Add(name, flags);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
// The first and most simple one of the three tables is the name-table. The name-table can
|
||||
// be considered an index of all unique names used for objects and references within the
|
||||
// file. Later on, you'll often find indexes into this table instead of a string
|
||||
// containing the object-name.
|
||||
br.Accessor.Position = nameTableOffset;
|
||||
for (uint i = 0; i < nameTableEntryCount; i++)
|
||||
{
|
||||
string name = br.ReadNAME(mvarPackageVersion);
|
||||
if (mvarPackageVersion >= 512)
|
||||
{
|
||||
uint unknown = br.ReadUInt32();
|
||||
}
|
||||
NameTableEntryFlags flags = (NameTableEntryFlags)br.ReadInt32();
|
||||
upk.NameTableEntries.Add(name, flags);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Export table
|
||||
{
|
||||
// The export-table is an index for all objects within the package. Every object in
|
||||
// the body of the file has a corresponding entry in this table, with information like
|
||||
// offset within the file etc.
|
||||
br.Accessor.Position = exportTableOffset;
|
||||
for (uint i = 0; i < exportTableEntryCount; i++)
|
||||
{
|
||||
ExportTableEntry entry = new ExportTableEntry();
|
||||
#region Export table
|
||||
{
|
||||
// The export-table is an index for all objects within the package. Every object in
|
||||
// the body of the file has a corresponding entry in this table, with information like
|
||||
// offset within the file etc.
|
||||
br.Accessor.Position = exportTableOffset;
|
||||
for (uint i = 0; i < exportTableEntryCount; i++)
|
||||
{
|
||||
ExportTableEntry entry = new ExportTableEntry();
|
||||
|
||||
// Class of the object, i.e. "Texture" or "Palette" etc; stored as a
|
||||
// ObjectReference
|
||||
int classIndex = br.ReadINDEX();
|
||||
if (classIndex != 0) entry.ObjectClass = new ObjectReference(classIndex, upk);
|
||||
// Class of the object, i.e. "Texture" or "Palette" etc; stored as a
|
||||
// ObjectReference
|
||||
int classIndex = br.ReadINDEX();
|
||||
if (classIndex != 0) entry.ObjectClass = new ObjectReference(classIndex, upk);
|
||||
|
||||
// Object Parent; again a ObjectReference
|
||||
int objectParentIndex = br.ReadINDEX();
|
||||
if (objectParentIndex != 0) entry.ObjectParent = new ObjectReference(objectParentIndex, upk);
|
||||
// Object Parent; again a ObjectReference
|
||||
int objectParentIndex = br.ReadINDEX();
|
||||
if (objectParentIndex != 0) entry.ObjectParent = new ObjectReference(objectParentIndex, upk);
|
||||
|
||||
// Internal package/group of the object, i.e. ‘Floor’ for floor-textures;
|
||||
// ObjectReference
|
||||
int groupIndex = br.ReadInt32();
|
||||
if (groupIndex != 0) entry.Group = new ObjectReference(groupIndex, upk);
|
||||
// Internal package/group of the object, i.e. ‘Floor’ for floor-textures;
|
||||
// ObjectReference
|
||||
int groupIndex = br.ReadInt32();
|
||||
if (groupIndex != 0) entry.Group = new ObjectReference(groupIndex, upk);
|
||||
|
||||
// The name of the object; an index into the name-table
|
||||
int objectNameIndex = br.ReadINDEX();
|
||||
if (objectNameIndex >= 0 && objectNameIndex < upk.NameTableEntries.Count)
|
||||
{
|
||||
entry.Name = upk.NameTableEntries[objectNameIndex];
|
||||
}
|
||||
// The name of the object; an index into the name-table
|
||||
int objectNameIndex = br.ReadINDEX();
|
||||
if (objectNameIndex >= 0 && objectNameIndex < upk.NameTableEntries.Count)
|
||||
{
|
||||
entry.Name = upk.NameTableEntries[objectNameIndex];
|
||||
}
|
||||
|
||||
// Flags for the object; described in the appendix
|
||||
entry.Flags = (ObjectFlags)br.ReadInt32();
|
||||
// Flags for the object; described in the appendix
|
||||
entry.Flags = (ObjectFlags)br.ReadInt32();
|
||||
|
||||
// Total size of the object
|
||||
entry.Size = br.ReadINDEX();
|
||||
// Total size of the object
|
||||
entry.Size = br.ReadINDEX();
|
||||
|
||||
entry.DataRequest += entry_DataRequest;
|
||||
|
||||
if (entry.Size != 0)
|
||||
{
|
||||
// Offset of the object; this field only exists if the SerialSize is larger 0
|
||||
entry.Offset = br.ReadINDEX();
|
||||
}
|
||||
upk.ExportTableEntries.Add(entry);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
if (entry.Size != 0)
|
||||
{
|
||||
// Offset of the object; this field only exists if the SerialSize is larger 0
|
||||
entry.Offset = br.ReadINDEX();
|
||||
}
|
||||
upk.ExportTableEntries.Add(entry);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Import table
|
||||
{
|
||||
br.Accessor.Position = importTableOffset;
|
||||
for (uint i = 0; i < importTableEntryCount; i++)
|
||||
{
|
||||
// The third table holds references to objects in external packages. For example, a
|
||||
// texture might have a DetailTexture (which makes for the nice structure if have a
|
||||
// very close look at a texture). Now, these DetailTextures are all stored in a
|
||||
// single package (as they are used by many different textures in different package
|
||||
// files). The property of the texture object only needs to store an index into the
|
||||
// import-table then as the entry in the import-table already points to the
|
||||
// DetailTexture in the other package.
|
||||
ImportTableEntry entry = new ImportTableEntry();
|
||||
#region Import table
|
||||
{
|
||||
br.Accessor.Position = importTableOffset;
|
||||
for (uint i = 0; i < importTableEntryCount; i++)
|
||||
{
|
||||
// The third table holds references to objects in external packages. For example, a
|
||||
// texture might have a DetailTexture (which makes for the nice structure if have a
|
||||
// very close look at a texture). Now, these DetailTextures are all stored in a
|
||||
// single package (as they are used by many different textures in different package
|
||||
// files). The property of the texture object only needs to store an index into the
|
||||
// import-table then as the entry in the import-table already points to the
|
||||
// DetailTexture in the other package.
|
||||
ImportTableEntry entry = new ImportTableEntry();
|
||||
|
||||
int classPackageIndex = br.ReadINDEX();
|
||||
if (classPackageIndex >= 0 && classPackageIndex < upk.NameTableEntries.Count)
|
||||
{
|
||||
entry.PackageName = upk.NameTableEntries[classPackageIndex];
|
||||
}
|
||||
int classPackageIndex = br.ReadINDEX();
|
||||
if (classPackageIndex >= 0 && classPackageIndex < upk.NameTableEntries.Count)
|
||||
{
|
||||
entry.PackageName = upk.NameTableEntries[classPackageIndex];
|
||||
}
|
||||
|
||||
int classNameIndex = br.ReadINDEX();
|
||||
if (classNameIndex >= 0 && classNameIndex < upk.NameTableEntries.Count)
|
||||
{
|
||||
entry.ClassName = upk.NameTableEntries[classNameIndex];
|
||||
}
|
||||
int classNameIndex = br.ReadINDEX();
|
||||
if (classNameIndex >= 0 && classNameIndex < upk.NameTableEntries.Count)
|
||||
{
|
||||
entry.ClassName = upk.NameTableEntries[classNameIndex];
|
||||
}
|
||||
|
||||
int packageReference = br.ReadInt32();
|
||||
entry.Package = new ObjectReference(packageReference, upk);
|
||||
int packageReference = br.ReadInt32();
|
||||
entry.Package = new ObjectReference(packageReference, upk);
|
||||
|
||||
int objectNameIndex = br.ReadINDEX();
|
||||
if (objectNameIndex >= 0 && objectNameIndex < upk.NameTableEntries.Count)
|
||||
{
|
||||
entry.ObjectName = upk.NameTableEntries[objectNameIndex];
|
||||
}
|
||||
upk.ImportTableEntries.Add(entry);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
int objectNameIndex = br.ReadINDEX();
|
||||
if (objectNameIndex >= 0 && objectNameIndex < upk.NameTableEntries.Count)
|
||||
{
|
||||
entry.ObjectName = upk.NameTableEntries[objectNameIndex];
|
||||
}
|
||||
upk.ImportTableEntries.Add(entry);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
private void entry_DataRequest(object sender, ObjectModels.FileSystem.DataRequestEventArgs e)
|
||||
{
|
||||
@ -234,203 +233,203 @@ namespace UniversalEditor.DataFormats.UnrealEngine.Package
|
||||
e.Data = base.Accessor.Reader.ReadBytes(entry.Size);
|
||||
}
|
||||
|
||||
protected override void SaveInternal(ObjectModel objectModel)
|
||||
{
|
||||
Writer bw = base.Accessor.Writer;
|
||||
|
||||
UnrealPackageObjectModel upk = (objectModel as UnrealPackageObjectModel);
|
||||
#region Header
|
||||
protected override void SaveInternal(ObjectModel objectModel)
|
||||
{
|
||||
Writer bw = base.Accessor.Writer;
|
||||
|
||||
UnrealPackageObjectModel upk = (objectModel as UnrealPackageObjectModel);
|
||||
#region Header
|
||||
|
||||
// Always "0x9E2A83C1"; use this to verify that you indeed try to read an Unreal-Package
|
||||
bw.WriteUInt32((uint)0x9E2A83C1);
|
||||
|
||||
bw.WriteUInt16(mvarPackageVersion);
|
||||
bw.WriteUInt16(upk.LicenseeNumber);
|
||||
bw.WriteUInt32((uint)upk.PackageFlags); // 1949392
|
||||
// Always "0x9E2A83C1"; use this to verify that you indeed try to read an Unreal-Package
|
||||
bw.WriteUInt32((uint)0x9E2A83C1);
|
||||
|
||||
bw.WriteUInt16(mvarPackageVersion);
|
||||
bw.WriteUInt16(upk.LicenseeNumber);
|
||||
bw.WriteUInt32((uint)upk.PackageFlags); // 1949392
|
||||
|
||||
if (mvarPackageVersion >= 512)
|
||||
{
|
||||
bw.WriteUInt32((uint)mvarPackageName.Length);
|
||||
bw.WriteFixedLengthString(mvarPackageName);
|
||||
|
||||
uint unknown1 = 0;
|
||||
bw.WriteUInt32(unknown1);
|
||||
|
||||
uint unknown2 = 0;
|
||||
bw.WriteUInt32(unknown2);
|
||||
}
|
||||
if (mvarPackageVersion >= 512)
|
||||
{
|
||||
bw.WriteUInt32((uint)mvarPackageName.Length);
|
||||
bw.WriteFixedLengthString(mvarPackageName);
|
||||
|
||||
uint unknown1 = 0;
|
||||
bw.WriteUInt32(unknown1);
|
||||
|
||||
uint unknown2 = 0;
|
||||
bw.WriteUInt32(unknown2);
|
||||
}
|
||||
|
||||
// Number of entries in name-table
|
||||
bw.WriteUInt32((uint)upk.NameTableEntries.Count);
|
||||
// Offset of name-table within the file
|
||||
uint nameTableOffset = 0;
|
||||
bw.WriteUInt32(nameTableOffset);
|
||||
// Number of entries in name-table
|
||||
bw.WriteUInt32((uint)upk.NameTableEntries.Count);
|
||||
// Offset of name-table within the file
|
||||
uint nameTableOffset = 0;
|
||||
bw.WriteUInt32(nameTableOffset);
|
||||
|
||||
// Number of entries in export-table
|
||||
bw.WriteUInt32((uint)upk.ExportTableEntries.Count);
|
||||
// Offset of export-table within the file
|
||||
uint exportTableOffset = 0;
|
||||
bw.WriteUInt32(exportTableOffset);
|
||||
// Number of entries in export-table
|
||||
bw.WriteUInt32((uint)upk.ExportTableEntries.Count);
|
||||
// Offset of export-table within the file
|
||||
uint exportTableOffset = 0;
|
||||
bw.WriteUInt32(exportTableOffset);
|
||||
|
||||
// Number of entries in import-table
|
||||
bw.WriteUInt32((uint)upk.ImportTableEntries.Count);
|
||||
// Offset of import-table within the file
|
||||
uint importTableOffset = 0;
|
||||
bw.WriteUInt32(importTableOffset);
|
||||
// Number of entries in import-table
|
||||
bw.WriteUInt32((uint)upk.ImportTableEntries.Count);
|
||||
// Offset of import-table within the file
|
||||
uint importTableOffset = 0;
|
||||
bw.WriteUInt32(importTableOffset);
|
||||
|
||||
// After the ImportOffset, the header differs between the versions. The only interesting
|
||||
// fact, though, is that for fileformat versions => 68, a GUID has been introduced. It can
|
||||
// be found right after the ImportOffset:
|
||||
if (mvarPackageVersion < 68)
|
||||
{
|
||||
// number of values in the Heritage Table
|
||||
bw.WriteUInt32((uint)upk.PackageGUIDs.Count);
|
||||
// offset of the Heritage Table from the beginning of the file
|
||||
uint heritageTableOffset = 0;
|
||||
bw.WriteUInt32(heritageTableOffset);
|
||||
// After the ImportOffset, the header differs between the versions. The only interesting
|
||||
// fact, though, is that for fileformat versions => 68, a GUID has been introduced. It can
|
||||
// be found right after the ImportOffset:
|
||||
if (mvarPackageVersion < 68)
|
||||
{
|
||||
// number of values in the Heritage Table
|
||||
bw.WriteUInt32((uint)upk.PackageGUIDs.Count);
|
||||
// offset of the Heritage Table from the beginning of the file
|
||||
uint heritageTableOffset = 0;
|
||||
bw.WriteUInt32(heritageTableOffset);
|
||||
|
||||
// TODO: navigate to the heritageTableOffset to write the data
|
||||
for (uint i = 0; i < (uint)upk.PackageGUIDs.Count; i++)
|
||||
{
|
||||
bw.WriteGuid(upk.PackageGUIDs[(int)i]);
|
||||
}
|
||||
}
|
||||
else if (mvarPackageVersion >= 68)
|
||||
{
|
||||
if (upk.PackageGUIDs.Count > 0)
|
||||
{
|
||||
bw.WriteGuid(upk.PackageGUIDs[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Guid guid = Guid.NewGuid();
|
||||
upk.PackageGUIDs.Add(guid);
|
||||
bw.WriteGuid(guid);
|
||||
}
|
||||
|
||||
if (mvarPackageVersion < 512)
|
||||
{
|
||||
bw.WriteUInt32((uint)upk.Generations.Count);
|
||||
for (uint i = 0; i < upk.Generations.Count; i++)
|
||||
{
|
||||
Generation generation = upk.Generations[(int)i];
|
||||
bw.WriteUInt32(generation.ExportCount);
|
||||
bw.WriteUInt32(generation.NameCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO: navigate to the heritageTableOffset to write the data
|
||||
for (uint i = 0; i < (uint)upk.PackageGUIDs.Count; i++)
|
||||
{
|
||||
bw.WriteGuid(upk.PackageGUIDs[(int)i]);
|
||||
}
|
||||
}
|
||||
else if (mvarPackageVersion >= 68)
|
||||
{
|
||||
if (upk.PackageGUIDs.Count > 0)
|
||||
{
|
||||
bw.WriteGuid(upk.PackageGUIDs[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Guid guid = Guid.NewGuid();
|
||||
upk.PackageGUIDs.Add(guid);
|
||||
bw.WriteGuid(guid);
|
||||
}
|
||||
|
||||
if (mvarPackageVersion < 512)
|
||||
{
|
||||
bw.WriteUInt32((uint)upk.Generations.Count);
|
||||
for (uint i = 0; i < upk.Generations.Count; i++)
|
||||
{
|
||||
Generation generation = upk.Generations[(int)i];
|
||||
bw.WriteUInt32(generation.ExportCount);
|
||||
bw.WriteUInt32(generation.NameCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Name table
|
||||
{
|
||||
// The Unreal-Engine introduces two new variable-types. The first one is a rather simple
|
||||
// string type, called NAME from now on. The second one is a bit more tricky, these
|
||||
// CompactIndices, or INDEX later on, compresses ordinary DWORDs downto one to five BYTEs.
|
||||
#region Name table
|
||||
{
|
||||
// The Unreal-Engine introduces two new variable-types. The first one is a rather simple
|
||||
// string type, called NAME from now on. The second one is a bit more tricky, these
|
||||
// CompactIndices, or INDEX later on, compresses ordinary DWORDs downto one to five BYTEs.
|
||||
|
||||
// The first and most simple one of the three tables is the name-table. The name-table can
|
||||
// be considered an index of all unique names used for objects and references within the
|
||||
// file. Later on, you'll often find indexes into this table instead of a string
|
||||
// containing the object-name.
|
||||
|
||||
// TODO: navigate to the name table offset
|
||||
// br.BaseStream.Position = nameTableOffset;
|
||||
for (uint i = 0; i < upk.NameTableEntries.Count; i++)
|
||||
{
|
||||
bw.WriteNAME(upk.NameTableEntries[(int)i].Name, mvarPackageVersion);
|
||||
if (mvarPackageVersion >= 512)
|
||||
{
|
||||
uint unknown = 0;
|
||||
bw.WriteUInt32(unknown);
|
||||
}
|
||||
bw.WriteInt32((int)upk.NameTableEntries[(int)i].Flags);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
// The first and most simple one of the three tables is the name-table. The name-table can
|
||||
// be considered an index of all unique names used for objects and references within the
|
||||
// file. Later on, you'll often find indexes into this table instead of a string
|
||||
// containing the object-name.
|
||||
|
||||
// TODO: navigate to the name table offset
|
||||
// br.BaseStream.Position = nameTableOffset;
|
||||
for (uint i = 0; i < upk.NameTableEntries.Count; i++)
|
||||
{
|
||||
bw.WriteNAME(upk.NameTableEntries[(int)i].Name, mvarPackageVersion);
|
||||
if (mvarPackageVersion >= 512)
|
||||
{
|
||||
uint unknown = 0;
|
||||
bw.WriteUInt32(unknown);
|
||||
}
|
||||
bw.WriteInt32((int)upk.NameTableEntries[(int)i].Flags);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Export table
|
||||
{
|
||||
// The export-table is an index for all objects within the package. Every object in
|
||||
// the body of the file has a corresponding entry in this table, with information like
|
||||
// offset within the file etc.
|
||||
// br.BaseStream.Position = exportTableOffset;
|
||||
// TODO: navigate to export table offset
|
||||
|
||||
for (uint i = 0; i < upk.ExportTableEntries.Count; i++)
|
||||
{
|
||||
ExportTableEntry entry = upk.ExportTableEntries[(int)i];
|
||||
#region Export table
|
||||
{
|
||||
// The export-table is an index for all objects within the package. Every object in
|
||||
// the body of the file has a corresponding entry in this table, with information like
|
||||
// offset within the file etc.
|
||||
// br.BaseStream.Position = exportTableOffset;
|
||||
// TODO: navigate to export table offset
|
||||
|
||||
for (uint i = 0; i < upk.ExportTableEntries.Count; i++)
|
||||
{
|
||||
ExportTableEntry entry = upk.ExportTableEntries[(int)i];
|
||||
|
||||
// Class of the object, i.e. "Texture" or "Palette" etc; stored as a
|
||||
// ObjectReference
|
||||
if (entry.ObjectClass != null)
|
||||
{
|
||||
bw.WriteINDEX(entry.ObjectClass.IndexValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
bw.WriteINDEX(0);
|
||||
}
|
||||
// Class of the object, i.e. "Texture" or "Palette" etc; stored as a
|
||||
// ObjectReference
|
||||
if (entry.ObjectClass != null)
|
||||
{
|
||||
bw.WriteINDEX(entry.ObjectClass.IndexValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
bw.WriteINDEX(0);
|
||||
}
|
||||
|
||||
// Object Parent; again a ObjectReference
|
||||
if (entry.ObjectParent != null)
|
||||
{
|
||||
bw.WriteINDEX(entry.ObjectParent.IndexValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
bw.WriteINDEX(0);
|
||||
}
|
||||
// Object Parent; again a ObjectReference
|
||||
if (entry.ObjectParent != null)
|
||||
{
|
||||
bw.WriteINDEX(entry.ObjectParent.IndexValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
bw.WriteINDEX(0);
|
||||
}
|
||||
|
||||
// Internal package/group of the object, i.e. ‘Floor’ for floor-textures;
|
||||
// ObjectReference
|
||||
if (entry.Group != null)
|
||||
{
|
||||
bw.WriteInt32(entry.Group.IndexValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
bw.WriteInt32((int)0);
|
||||
}
|
||||
|
||||
// The name of the object; an index into the name-table
|
||||
bw.WriteINDEX(upk.NameTableEntries.IndexOf(entry.Name));
|
||||
|
||||
// Flags for the object; described in the appendix
|
||||
bw.WriteInt32((int)entry.Flags);
|
||||
// Internal package/group of the object, i.e. ‘Floor’ for floor-textures;
|
||||
// ObjectReference
|
||||
if (entry.Group != null)
|
||||
{
|
||||
bw.WriteInt32(entry.Group.IndexValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
bw.WriteInt32((int)0);
|
||||
}
|
||||
|
||||
// The name of the object; an index into the name-table
|
||||
bw.WriteINDEX(upk.NameTableEntries.IndexOf(entry.Name));
|
||||
|
||||
// Flags for the object; described in the appendix
|
||||
bw.WriteInt32((int)entry.Flags);
|
||||
|
||||
// Total size of the object
|
||||
bw.WriteINDEX(entry.Size);
|
||||
// Total size of the object
|
||||
bw.WriteINDEX(entry.Size);
|
||||
|
||||
if (entry.Size != 0)
|
||||
{
|
||||
// Offset of the object; this field only exists if the SerialSize is larger 0
|
||||
bw.WriteINDEX(entry.Offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
if (entry.Size != 0)
|
||||
{
|
||||
// Offset of the object; this field only exists if the SerialSize is larger 0
|
||||
bw.WriteINDEX(entry.Offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Import table
|
||||
{
|
||||
for (uint i = 0; i < upk.ImportTableEntries.Count; i++)
|
||||
{
|
||||
// The third table holds references to objects in external packages. For example, a
|
||||
// texture might have a DetailTexture (which makes for the nice structure if have a
|
||||
// very close look at a texture). Now, these DetailTextures are all stored in a
|
||||
// single package (as they are used by many different textures in different package
|
||||
// files). The property of the texture object only needs to store an index into the
|
||||
// import-table then as the entry in the import-table already points to the
|
||||
// DetailTexture in the other package.
|
||||
ImportTableEntry entry = upk.ImportTableEntries[(int)i];
|
||||
#region Import table
|
||||
{
|
||||
for (uint i = 0; i < upk.ImportTableEntries.Count; i++)
|
||||
{
|
||||
// The third table holds references to objects in external packages. For example, a
|
||||
// texture might have a DetailTexture (which makes for the nice structure if have a
|
||||
// very close look at a texture). Now, these DetailTextures are all stored in a
|
||||
// single package (as they are used by many different textures in different package
|
||||
// files). The property of the texture object only needs to store an index into the
|
||||
// import-table then as the entry in the import-table already points to the
|
||||
// DetailTexture in the other package.
|
||||
ImportTableEntry entry = upk.ImportTableEntries[(int)i];
|
||||
|
||||
bw.WriteINDEX(upk.NameTableEntries.IndexOf(entry.PackageName));
|
||||
bw.WriteINDEX(upk.NameTableEntries.IndexOf(entry.ClassName));
|
||||
bw.WriteInt32(entry.Package.IndexValue);
|
||||
bw.WriteINDEX(upk.NameTableEntries.IndexOf(entry.ObjectName));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
bw.Flush();
|
||||
}
|
||||
}
|
||||
bw.WriteINDEX(upk.NameTableEntries.IndexOf(entry.PackageName));
|
||||
bw.WriteINDEX(upk.NameTableEntries.IndexOf(entry.ClassName));
|
||||
bw.WriteInt32(entry.Package.IndexValue);
|
||||
bw.WriteINDEX(upk.NameTableEntries.IndexOf(entry.ObjectName));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
bw.Flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user