BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Properties | List of all members
BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode Class Reference
Inheritance diagram for BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode:
BrawlLib.SSBB.ResourceNodes.ARCEntryNode BrawlLib.SSBB.ResourceNodes.U8EntryNode BrawlLib.SSBB.ResourceNodes.ResourceNode

Public Member Functions

override void OnPopulate ()
 
override bool OnInitialize ()
 
override int OnCalculateSize (bool force)
 
override void OnRebuild (VoidPtr address, int length, bool force)
 
- Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.ARCEntryNode
bool isModelData ()
 
bool isTextureData ()
 
void UpdateName ()
 
override void Initialize (ResourceNode parent, DataSource origSource, DataSource uncompSource)
 
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 ()
 

Protected Member Functions

override string GetName ()
 
- Protected Member Functions inherited from BrawlLib.SSBB.ResourceNodes.ARCEntryNode
virtual string GetName ()
 
virtual string GetName (string fileType)
 
- Protected Member Functions inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
void ForceReplacedEvent ()
 
virtual void MergeInternal ()
 

Properties

override Type[] AllowedChildTypes [get]
 
float MinX [get]
 
float MinY [get]
 
float MinZ [get]
 
float MaxX [get]
 
float MaxY [get]
 
float MaxZ [get]
 
- Properties inherited from BrawlLib.SSBB.ResourceNodes.ARCEntryNode
override ResourceType ResourceFileType [get]
 
override string Compression [get, set]
 
ARCFileType FileType [get, set]
 
short FileIndex [get, set]
 
byte GroupID [get, set]
 
int AbsoluteIndex [get]
 
short RedirectIndex [get, set]
 
string RedirectTargetName [get]
 
string RedirectTarget [get, set]
 
ResourceNode RedirectNode [get]
 
- Properties inherited from BrawlLib.SSBB.ResourceNodes.U8EntryNode
int ParentIndex [get]
 
int ChildEndIndex [get]
 
int Type [get]
 
int ID [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)
 
- Public Attributes inherited from BrawlLib.SSBB.ResourceNodes.ARCEntryNode
ResourceType _resourceType = ResourceType.ARCEntry
 
- Public Attributes inherited from BrawlLib.SSBB.ResourceNodes.U8EntryNode
int _u8Parent
 
int _u8FirstNotChild
 
int _u8Type
 
int _u8Index
 
- 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
 
- Protected Attributes inherited from BrawlLib.SSBB.ResourceNodes.ARCEntryNode
ResourceNode redirectTargetNode
 
- Events inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
SelectEventHandler SelectChild
 
EventHandler UpdateProps
 
MoveEventHandler MovedUp
 
ResourceEventHandler Disposing
 
ResourceChildEventHandler ChildAdded
 
ResourceChildInsertEventHandler ChildInserted
 

Member Function Documentation

◆ GetName()

override string BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode.GetName ( )
inlineprotectedvirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ARCEntryNode.

61 {
62 return base.GetName("Pathing Data");
63 }

◆ OnCalculateSize()

override int BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode.OnCalculateSize ( bool  force)
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

46 {
47 int size = (int) Header->_headerSize;
48 foreach (ResourceNode n in Children.Where(n => n.HasChildren))
49 {
50 size += n.OnCalculateSize(true);
51 foreach (ResourceNode c in n.Children)
52 {
53 size += c.OnCalculateSize(true);
54 }
55 }
56
57 return size;
58 }
List< ResourceNode > Children
Definition: ResourceNode.cs:262
buint _headerSize
Definition: PathingMiscData.cs:13

◆ OnInitialize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.U8EntryNode.

41 {
42 return Header->_count > 0;
43 }
buint _count
Definition: PathingMiscData.cs:12

◆ OnPopulate()

override void BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode.OnPopulate ( )
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

31 {
32 for (int i = 0; i < Header->_count; i++)
33 {
34 DataSource source = new DataSource((*Header)[i], (int) PathingMiscDataEntry.Size);
35 new PathingMiscDataEntryNode().Initialize(this, source);
36 Children.Last().Populate();
37 }
38 }
Definition: PathingMiscData.cs:47
static readonly uint Size
Definition: PathingMiscData.cs:48

◆ OnRebuild()

override void BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode.OnRebuild ( VoidPtr  address,
int  length,
bool  force 
)
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

68 {
69 curDataOffset = (uint) (Header->_headerSize + Children.Count * PathingMiscDataEntry.Size);
70 uint headerSize = Header->_headerSize;
71 PathingMiscData* header = (PathingMiscData*) address;
72 *header = new PathingMiscData();
73 header->_count = (uint) Children.Count;
74 header->_headerSize = headerSize;
75 header->_minX = MinX;
76 header->_minY = MinY;
77 header->_minZ = MinZ;
78 header->_maxX = MaxX;
79 header->_maxY = MaxY;
80 header->_maxZ = MaxZ;
81 uint offset = headerSize;
82 ResourceNode[] validChildren = Children.Where(n => n.HasChildren).ToArray();
83 foreach (ResourceNode n in validChildren)
84 {
85 int size = n.CalculateSize(true);
86 n.Rebuild(address + offset, size, true);
87 offset += (uint) size;
88 }
89
90 foreach (ResourceNode n in validChildren)
91 {
92 foreach (ResourceNode c in n.Children)
93 {
94 int size = c.CalculateSize(true);
95 c.Rebuild(address + offset, size, true);
96 offset += (uint)size;
97 }
98 }
99 }
float MinX
Definition: PathingMiscDataNode.cs:17
float MinY
Definition: PathingMiscDataNode.cs:19
float MaxX
Definition: PathingMiscDataNode.cs:24
float MaxZ
Definition: PathingMiscDataNode.cs:28
float MinZ
Definition: PathingMiscDataNode.cs:21
float MaxY
Definition: PathingMiscDataNode.cs:26
Definition: PathingMiscData.cs:9
bfloat _minZ
Definition: PathingMiscData.cs:16
bfloat _maxY
Definition: PathingMiscData.cs:18
bfloat _minX
Definition: PathingMiscData.cs:14
bfloat _maxX
Definition: PathingMiscData.cs:17
bfloat _minY
Definition: PathingMiscData.cs:15
bfloat _maxZ
Definition: PathingMiscData.cs:19

Property Documentation

◆ AllowedChildTypes

override Type [] BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode.AllowedChildTypes
get

◆ MaxX

float BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode.MaxX
get

◆ MaxY

float BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode.MaxY
get

◆ MaxZ

float BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode.MaxZ
get

◆ MinX

float BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode.MinX
get

◆ MinY

float BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode.MinY
get

◆ MinZ

float BrawlLib.SSBB.ResourceNodes.PathingMiscDataNode.MinZ
get

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