BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Properties | List of all members
BrawlLib.SSBB.ResourceNodes.RSARExtFileNode Class Reference
Inheritance diagram for BrawlLib.SSBB.ResourceNodes.RSARExtFileNode:
BrawlLib.SSBB.ResourceNodes.RSARFileNode BrawlLib.SSBB.ResourceNodes.NW4RNode BrawlLib.SSBB.ResourceNodes.ResourceNode

Public Member Functions

void GetExtSize ()
 
override bool OnInitialize ()
 
void RemoveBankRef (RSARBankNode n)
 
- Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.RSARFileNode
virtual void GetName ()
 
void AddSoundRef (RSARSoundNode n)
 
void RemoveSoundRef (RSARSoundNode n)
 
override bool OnInitialize ()
 
override void Export (string outPath)
 
override bool OnInitialize ()
 
- Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
void OnRenamed ()
 
List< ResourceNodeGetChildrenRecursive ()
 Used primarily to get bone lists. Kept for all resource nodes for utility. More...
 
virtual void SignalPropertyChange ()
 
virtual void Dispose ()
 
void SelectChildAtIndex (int index)
 
void UpdateProperties ()
 
void UpdateCurrentControl ()
 
virtual bool MoveUp ()
 
virtual bool MoveDown ()
 
virtual void OnMoved ()
 
virtual void DoMoveDown ()
 
virtual void DoMoveDown (bool select)
 
virtual void DoMoveUp ()
 
virtual void DoMoveUp (bool select)
 
virtual bool AddUp ()
 
virtual bool AddDown ()
 
virtual bool ToParent ()
 
void Populate (int levels=-1)
 
virtual void OnPopulate ()
 
void Initialize (ResourceNode parent, FileMap source)
 
void Initialize (ResourceNode parent, VoidPtr address, int length)
 
void Initialize (ResourceNode parent, DataSource origSource)
 
virtual void Initialize (ResourceNode parent, DataSource origSource, DataSource uncompSource)
 
virtual bool OnInitialize ()
 
virtual void Restore ()
 
virtual void Remove ()
 
virtual void RemoveChild (ResourceNode child)
 
virtual void AddChild (ResourceNode child)
 
virtual void AddChild (ResourceNode child, bool change)
 
virtual void InsertChild (ResourceNode child, int index)
 
virtual void InsertChild (ResourceNode child, bool change, int index)
 
void SetSizeInternal (int size)
 
virtual void Replace (string fileName)
 
virtual void Replace (ResourceNode node)
 
virtual void Replace (string fileName, FileMapProtect prot, FileOptions options)
 
virtual void ReplaceRaw (VoidPtr address, int length)
 
virtual void ReplaceRaw (FileMap map)
 
virtual void Export (string outPath)
 
void Export (FileStream outStream)
 
virtual void ExportUncompressed (string outPath)
 
void ExportUncompressed (FileStream outStream)
 
virtual void Rebuild ()
 
virtual void Rebuild (bool force)
 
virtual void Rebuild (VoidPtr address, int length, bool force)
 
virtual void OnRebuild (VoidPtr address, int length, bool force)
 
virtual int CalculateSize (bool force)
 
virtual int OnCalculateSize (bool force)
 
void Merge ()
 
void Merge (bool forceBuild)
 
ResourceNode FindChildByType (string path, bool searchChildren, params ResourceType[] types)
 
ResourceNode FindChildByType (string path, bool searchChildren, StringComparison compare, params ResourceType[] types)
 
ResourceNode FindChild (string path)
 
ResourceNode FindChild (string path, bool searchChildren)
 
ResourceNode FindChild (string path, StringComparison compare)
 
ResourceNode FindChild (string path, bool searchChildren, StringComparison compare)
 
ResourceNode[] FindChildrenByClassType (string path, Type type)
 
ResourceNode[] FindChildrenByType (string path, ResourceType type)
 
ResourceNode[] FindChildrenByTypeInGroup (string path, ResourceType type, byte group)
 
ResourceNode[] FindChildrenByName (string name)
 
unsafe string FindName (string name)
 
ResourceNode FindEmbeddedIndex (int index)
 
virtual unsafe byte[] MD5 ()
 Find the MD5 checksum of this node's data. If this node doesn't have any data (BRESGroupNode, for example), this method will return null. More...
 
string MD5Str ()
 Get the result of the MD5() function as a string of hexadecimal digits. If MD5() returns null, this method will return an empty string. More...
 
ResourceNode PrevSibling ()
 
ResourceNode NextSibling ()
 
override string ToString ()
 
virtual void SortChildren ()
 

Public Attributes

uint _extFileSize
 
List< RSARBankNode_rsarBankEntries = new List<RSARBankNode>()
 
- Public Attributes inherited from BrawlLib.SSBB.ResourceNodes.RSARFileNode
DataSource _audioSource
 
List< RSARGroupNode_groupRefs = new List<RSARGroupNode>()
 
List< string > _references = new List<string>()
 
List< RSARSoundNode_rsarSoundEntries = new List<RSARSoundNode>()
 
VoidPtr _infoHdr
 
VoidPtr _rebuildAudioAddr = null
 
int _headerLen = 0
 
int _audioLen = 0
 
- Public Attributes inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
Form _mainForm
 
string _name
 
string _origPath
 
ResourceNode _parent
 
List< ResourceNode_children = new List<ResourceNode>()
 
int _calcSize
 
EventHandler UpdateControl
 
MoveEventHandler MovedDown
 
ResourceEventHandler Renamed
 
ResourceEventHandler PropertyChanged
 
ResourceEventHandler Replaced
 
ResourceEventHandler Restored
 
ResourceChildEventHandler ChildRemoved
 
bool _isPopulating
 
bool _replaced
 

Properties

override string DataOffset [get]
 
override string InfoHeaderOffset [get]
 
string ExtPath [get, set]
 
string FullExtPath [get, set]
 
FileInfo ExternalFileInfo [get]
 
- Properties inherited from BrawlLib.SSBB.ResourceNodes.RSARFileNode
string ClosestMatching [get]
 
RSARGroupNode[] GroupRefNodes [get]
 
virtual string[] GroupRefs [get]
 
virtual string[] EntryRefs [get]
 
RSARSoundNode[] Sounds [get]
 
virtual int FileNodeIndex [get]
 
int EntryNumber [get]
 
virtual string InfoHeaderOffset [get]
 
virtual string AudioLength [get]
 
virtual string AudioOffset [get]
 
virtual string DataLength [get]
 
virtual string DataOffset [get]
 
- Properties inherited from BrawlLib.SSBB.ResourceNodes.NW4RNode
byte VersionMajor [get]
 
byte VersionMinor [get]
 
- Properties inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
string FilePath [get]
 
string FileName [get]
 
string DirectoryName [get]
 
ResourceNode RootNode [get]
 
DataSource OriginalSource [get]
 
DataSource UncompressedSource [get]
 
DataSource WorkingSource [get]
 
DataSource WorkingUncompressed [get]
 
virtual bool HasChildren [get]
 
virtual ResourceType ResourceFileType [get]
 
string NodeType [get]
 
virtual string TreePathAbsolute [get]
 
virtual string TreePath [get]
 
virtual int Level [get]
 
virtual int MaxNameLength [get]
 
virtual bool AllowDuplicateNames [get]
 
virtual bool AllowNullNames [get]
 
virtual string Name [get, set]
 
ResourceNode Parent [get, set]
 
List< ResourceNodeChildren [get]
 
int Index [get]
 
int HexIndex [get]
 
bool IsCompressed [get]
 
bool HasChanged [get, set]
 
bool IsBranch [get]
 
bool HasMerged [get]
 
virtual bool AllowSaving [get, set]
 
virtual bool IsDirty [get, set]
 
virtual uint UncompressedSize [get]
 
virtual Type[] AllowedChildTypes [get]
 
virtual string Compression [get, set]
 
virtual bool RetainChildrenOnReplace [get]
 
virtual bool supportsCompression [get]
 
static MD5CryptoServiceProvider MD5Provider [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
static ResourceNode[] FindAllSubNodes (ResourceNode root)
 
static ResourceNode FindNode (ResourceNode root, string path, bool searchChildren, StringComparison compare)
 
- Protected Member Functions inherited from BrawlLib.SSBB.ResourceNodes.RSARFileNode
virtual void GetStrings (LabelBuilder builder)
 
- Protected Member Functions inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
void ForceReplacedEvent ()
 
virtual void MergeInternal ()
 
- Events inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
SelectEventHandler SelectChild
 
EventHandler UpdateProps
 
MoveEventHandler MovedUp
 
ResourceEventHandler Disposing
 
ResourceChildEventHandler ChildAdded
 
ResourceChildInsertEventHandler ChildInserted
 

Member Function Documentation

◆ GetExtSize()

void BrawlLib.SSBB.ResourceNodes.RSARExtFileNode.GetExtSize ( )
inline
73 {
74 if (ExternalFileInfo.Exists)
75 {
76 _extFileSize = (uint) ExternalFileInfo.Length;
77 }
78 }
uint _extFileSize
Definition: RSARExtFileNode.cs:30
FileInfo ExternalFileInfo
Definition: RSARExtFileNode.cs:70

◆ OnInitialize()

override bool BrawlLib.SSBB.ResourceNodes.RSARExtFileNode.OnInitialize ( )
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.NW4RNode.

81 {
82 RSARNode parent = RSARNode;
83 _extPath = Header->GetPath(&RSARNode.Header->INFOBlock->_collection);
84 if (_name == null)
85 {
86 _name = $"[{_fileIndex}] {_extPath}";
87 }
88
89 _extFileSize = Header->_headerLen;
90 return false;
91 }
string _name
Definition: ResourceNode.cs:139

◆ RemoveBankRef()

void BrawlLib.SSBB.ResourceNodes.RSARExtFileNode.RemoveBankRef ( RSARBankNode  n)
inline
105 {
106 if (_rsarBankEntries.Contains(n))
107 {
108 _rsarBankEntries.Remove(n);
109 _references.Remove(n.TreePath);
110 }
111 }
List< RSARBankNode > _rsarBankEntries
Definition: RSARExtFileNode.cs:93
List< string > _references
Definition: RSARFileNode.cs:72

Member Data Documentation

◆ _extFileSize

uint BrawlLib.SSBB.ResourceNodes.RSARExtFileNode._extFileSize

◆ _rsarBankEntries

List<RSARBankNode> BrawlLib.SSBB.ResourceNodes.RSARExtFileNode._rsarBankEntries = new List<RSARBankNode>()

Property Documentation

◆ DataOffset

override string BrawlLib.SSBB.ResourceNodes.RSARExtFileNode.DataOffset
get

◆ ExternalFileInfo

FileInfo BrawlLib.SSBB.ResourceNodes.RSARExtFileNode.ExternalFileInfo
get

◆ ExtPath

string BrawlLib.SSBB.ResourceNodes.RSARExtFileNode.ExtPath
getset
35 {
36 get => _extPath;
37 set
38 {
39 _extPath = value;
41 }
42 }
virtual void SignalPropertyChange()
Definition: ResourceNode.cs:313

◆ FullExtPath

string BrawlLib.SSBB.ResourceNodes.RSARExtFileNode.FullExtPath
getset
46 {
47 get => ExtPath == null
48 ? null
49 : RootNode._origPath.Substring(0, RootNode._origPath.LastIndexOf('\\')) + "\\" +
50 ExtPath.Replace('/', '\\');
51 set
52 {
53 if (!value.Contains(".") || !value.Contains("\\"))
54 {
55 _extPath = "";
56 }
57 else
58 {
59 _extPath = value
60 .Substring(RootNode._origPath.Substring(0, RootNode._origPath.LastIndexOf('\\')).Length +
61 1).Replace('\\', '/');
62 }
63
65 }
66 }
string ExtPath
Definition: RSARExtFileNode.cs:35
string _origPath
Definition: ResourceNode.cs:139
ResourceNode RootNode
Definition: ResourceNode.cs:175

◆ InfoHeaderOffset

override string BrawlLib.SSBB.ResourceNodes.RSARExtFileNode.InfoHeaderOffset
get
18 {
19 get
20 {
21 if (RSARNode != null && Header != null)
22 {
23 return ((uint) (Header - (VoidPtr) RSARNode.Header)).ToString("X");
24 }
25
26 return "0";
27 }
28 }
Definition: VoidPtr.cs:9

The documentation for this class was generated from the following file: