mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-22 15:02:54 +08:00
commit
e81b716dd1
2700
CodeWalker.Core/GameFiles/FileTypes/MrfFile.cs
Normal file
2700
CodeWalker.Core/GameFiles/FileTypes/MrfFile.cs
Normal file
File diff suppressed because it is too large
Load Diff
@ -82,6 +82,7 @@ namespace CodeWalker.GameFiles
|
||||
Yfd = 26,
|
||||
Heightmap = 27,
|
||||
Watermap = 28,
|
||||
Mrf = 29,
|
||||
}
|
||||
|
||||
|
||||
|
@ -197,6 +197,7 @@ namespace CodeWalker.GameFiles
|
||||
//TestYpts();
|
||||
//TestYnvs();
|
||||
//TestYmaps();
|
||||
//TestMrfs();
|
||||
//TestPlacements();
|
||||
//TestDrawables();
|
||||
//TestHeightmaps();
|
||||
@ -4179,6 +4180,29 @@ namespace CodeWalker.GameFiles
|
||||
}
|
||||
}
|
||||
}
|
||||
public void TestMrfs()
|
||||
{
|
||||
foreach (RpfFile file in AllRpfs)
|
||||
{
|
||||
foreach (RpfEntry entry in file.AllEntries)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (entry.NameLower.EndsWith(".mrf"))
|
||||
{
|
||||
UpdateStatus(string.Format(entry.Path));
|
||||
MrfFile mrffile = RpfMan.GetFile<MrfFile>(entry);
|
||||
if (mrffile != null)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
UpdateStatus("Error! " + ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void TestPlacements()
|
||||
{
|
||||
//int totplacements = 0;
|
||||
|
@ -297,7 +297,7 @@ namespace CodeWalker
|
||||
InitFileType(".png", "Portable Network Graphics", 16);
|
||||
InitFileType(".dds", "DirectDraw Surface", 16);
|
||||
InitFileType(".ytd", "Texture Dictionary", 16, FileTypeAction.ViewYtd, true);
|
||||
InitFileType(".mrf", "MRF File", 18);
|
||||
InitFileType(".mrf", "Move Network File", 18, FileTypeAction.ViewMrf);
|
||||
InitFileType(".ycd", "Clip Dictionary", 18, FileTypeAction.ViewYcd, true);
|
||||
InitFileType(".ypt", "Particle Effect", 18, FileTypeAction.ViewModel, true);
|
||||
InitFileType(".ybn", "Static Collisions", 19, FileTypeAction.ViewModel, true);
|
||||
@ -1401,6 +1401,7 @@ namespace CodeWalker
|
||||
case FileTypeAction.ViewYld:
|
||||
case FileTypeAction.ViewYfd:
|
||||
case FileTypeAction.ViewHeightmap:
|
||||
case FileTypeAction.ViewMrf:
|
||||
return true;
|
||||
case FileTypeAction.ViewHex:
|
||||
default:
|
||||
@ -1530,6 +1531,9 @@ namespace CodeWalker
|
||||
case FileTypeAction.ViewHeightmap:
|
||||
ViewHeightmap(name, path, data, fe);
|
||||
break;
|
||||
case FileTypeAction.ViewMrf:
|
||||
ViewMrf(name, path, data, fe);
|
||||
break;
|
||||
case FileTypeAction.ViewHex:
|
||||
default:
|
||||
ViewHex(name, path, data);
|
||||
@ -1771,7 +1775,13 @@ namespace CodeWalker
|
||||
f.Show();
|
||||
f.LoadMeta(heightmap);
|
||||
}
|
||||
|
||||
private void ViewMrf(string name, string path, byte[] data, RpfFileEntry e)
|
||||
{
|
||||
var mrf = RpfFile.GetFile<MrfFile>(e, data);
|
||||
GenericForm f = new GenericForm(this);
|
||||
f.Show();
|
||||
f.LoadFile(mrf, mrf.RpfFileEntry);
|
||||
}
|
||||
private RpfFileEntry CreateFileEntry(string name, string path, ref byte[] data)
|
||||
{
|
||||
//this should only really be used when loading a file from the filesystem.
|
||||
@ -4693,6 +4703,7 @@ namespace CodeWalker
|
||||
ViewYld = 21,
|
||||
ViewYfd = 22,
|
||||
ViewHeightmap = 23,
|
||||
ViewMrf = 24,
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user