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

Public Member Functions

override bool OnInitialize ()
 
override void OnPopulate ()
 
override int OnCalculateSize (bool force)
 
override void OnRebuild (VoidPtr address, int length, bool force)
 
void ReplaceCamera (STPMNode external)
 
void ReplaceGameplayVariables (STPMNode external)
 
void ReplaceCosmeticVariables (STPMNode external)
 
- 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 ResourceType ResourceFileType [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.STPMNode.GetName ( )
inlineprotectedvirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ARCEntryNode.

21 {
22 return base.GetName("Stage Parameters");
23 }

◆ OnCalculateSize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

36 {
37 return 0x10 + Children.Count * 4 + Children.Count * _entrySize;
38 }

◆ OnInitialize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.U8EntryNode.

14 {
15 base.OnInitialize();
16
17 return Header->_count > 0;
18 }
bint _count
Definition: Parameters.cs:15

◆ OnPopulate()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

28 {
29 for (int i = 0; i < Header->_count; i++)
30 {
31 new STPMEntryNode().Initialize(this, new DataSource((*Header)[i], _entrySize));
32 }
33 }

◆ OnRebuild()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

41 {
42 Parameter* header = (Parameter*) address;
43 *header = new Parameter(Parameter.TagSTPM, Children.Count);
44 uint offset = (uint) (0x10 + Children.Count * 4);
45 for (int i = 0; i < Children.Count; i++)
46 {
47 ResourceNode r = Children[i];
48 *(buint*) (address + 0x10 + i * 4) = offset;
49 r.Rebuild(address + offset, _entrySize, true);
50 offset += _entrySize;
51 }
52 }
List< ResourceNode > Children
Definition: ResourceNode.cs:262
Definition: BigEndianTypes.cs:59
Definition: Parameters.cs:8
const string TagSTPM
Definition: Parameters.cs:9

◆ ReplaceCamera()

void BrawlLib.SSBB.ResourceNodes.STPMNode.ReplaceCamera ( STPMNode  external)
inline
60 {
61 for (int i = 0; i < Children.Count && i < external.Children.Count; i++)
62 {
63 if (!(external.Children[i] is STPMEntryNode ext) || !(Children[i] is STPMEntryNode cur))
64 {
65 continue;
66 }
67
68 // In-game camera
69 cur.CameraFOV = ext.CameraFOV;
70
71 cur.MinimumZ = ext.MinimumZ;
72 cur.MaximumZ = ext.MaximumZ;
73
74 cur.MinimumTilt = ext.MinimumTilt;
75 cur.MaximumTilt = ext.MaximumTilt;
76
77 cur.HorizontalRotationFactor = ext.HorizontalRotationFactor;
78 cur.VerticalRotationFactor = ext.VerticalRotationFactor;
79
80 cur.CharacterBubbleBufferMultiplier = ext.CharacterBubbleBufferMultiplier;
81
82 cur.CameraSpeed = ext.CameraSpeed;
83
84 cur.StarKOCamTilt = ext.StarKOCamTilt;
85 cur.FinalSmashCamTilt = ext.FinalSmashCamTilt;
86
87 cur.CameraRight = ext.CameraRight;
88 cur.CameraLeft = ext.CameraLeft;
89
90 // Pause camera
91 cur.PauseCamX = ext.PauseCamX;
92 cur.PauseCamY = ext.PauseCamY;
93 cur.PauseCamZ = ext.PauseCamZ;
94 cur.PauseCamAngle = ext.PauseCamAngle;
95
96 cur.PauseCamZoomIn = ext.PauseCamZoomIn;
97 cur.PauseCamZoomOut = ext.PauseCamZoomOut;
98 cur.PauseCamZoomDefault = ext.PauseCamZoomDefault;
99
100 cur.PauseCamRotYMin = ext.PauseCamRotYMin;
101 cur.PauseCamRotYMax = ext.PauseCamRotYMax;
102 cur.PauseCamRotXMin = ext.PauseCamRotXMin;
103 cur.PauseCamRotXMax = ext.PauseCamRotXMax;
104
105 // Fixed camera
106 cur.FixedCamX = ext.FixedCamX;
107 cur.FixedCamY = ext.FixedCamY;
108 cur.FixedCamZ = ext.FixedCamZ;
109 cur.FixedCamFOV = ext.FixedCamFOV;
110 cur.FixedHorizontalAngle = ext.FixedHorizontalAngle;
111 cur.FixedVerticalAngle = ext.FixedVerticalAngle;
112 }
113 }

◆ ReplaceCosmeticVariables()

void BrawlLib.SSBB.ResourceNodes.STPMNode.ReplaceCosmeticVariables ( STPMNode  external)
inline
167 {
168 for (int i = 0; i < Children.Count && i < external.Children.Count; i++)
169 {
170 if (!(external.Children[i] is STPMEntryNode ext) || !(Children[i] is STPMEntryNode cur))
171 {
172 continue;
173 }
174
175 cur.Id1 = ext.Id1;
176 cur.Id2 = ext.Id2;
177 cur.Value1 = ext.Value1;
178 cur.Value2 = ext.Value2;
179 cur.Value3 = ext.Value3;
180 cur.Value4 = ext.Value4;
181 cur.MusicVolume = ext.MusicVolume;
182 cur.SoundVolume = ext.SoundVolume;
183 cur.Value5c = ext.Value5c;
184 cur.Value5d = ext.Value5d;
185 cur.ShadowPitch = ext.ShadowPitch;
186 cur.ShadowYaw = ext.ShadowYaw;
187 cur.Value8 = ext.Value8;
188 cur.Value9 = ext.Value9;
189 cur.StageWindEnabled = ext.StageWindEnabled;
190 cur.CharacterWindEnabled = ext.CharacterWindEnabled;
191 cur.Value50c = ext.Value50c;
192 cur.Value50d = ext.Value50d;
193 cur.WindStrength = ext.WindStrength;
194 cur.HorizontalWindRotation = ext.HorizontalWindRotation;
195 cur.VerticalWindRotation = ext.VerticalWindRotation;
196 cur.Value54 = ext.Value54;
197 cur.Value55 = ext.Value55;
198 cur.Value56 = ext.Value56;
199 cur.EchoDepth = ext.EchoDepth;
200 cur.EchoDepthRemoval = ext.EchoDepthRemoval;
201 cur.EchoRepeats1 = ext.EchoRepeats1;
202 cur.EchoRepeats2 = ext.EchoRepeats2;
203 cur.Value61 = ext.Value61;
204 cur.Value62 = ext.Value62;
205 cur.Value63 = ext.Value63;
206 cur.Value64 = ext.Value64;
207 }
208 }

◆ ReplaceGameplayVariables()

void BrawlLib.SSBB.ResourceNodes.STPMNode.ReplaceGameplayVariables ( STPMNode  external)
inline
116 {
117 for (int i = 0; i < Children.Count && i < external.Children.Count; i++)
118 {
119 if (!(external.Children[i] is STPMEntryNode ext) || !(Children[i] is STPMEntryNode cur))
120 {
121 continue;
122 }
123
124 cur.MinimumZ = ext.MinimumZ;
125 cur.MaximumZ = ext.MaximumZ;
126 cur.MinimumTilt = ext.MinimumTilt;
127 cur.MaximumTilt = ext.MaximumTilt;
128 cur.HorizontalRotationFactor = ext.HorizontalRotationFactor;
129 cur.VerticalRotationFactor = ext.VerticalRotationFactor;
130 cur.CharacterBubbleBufferMultiplier = ext.CharacterBubbleBufferMultiplier;
131 cur.Value18 = ext.Value18;
132 cur.CameraSpeed = ext.CameraSpeed;
133 cur.StarKOCamTilt = ext.StarKOCamTilt;
134 cur.FinalSmashCamTilt = ext.FinalSmashCamTilt;
135 cur.CameraRight = ext.CameraRight;
136 cur.CameraLeft = ext.CameraLeft;
137 cur.PauseCamX = ext.PauseCamX;
138 cur.PauseCamY = ext.PauseCamY;
139 cur.PauseCamZ = ext.PauseCamZ;
140 cur.PauseCamAngle = ext.PauseCamAngle;
141 cur.PauseCamZoomIn = ext.PauseCamZoomIn;
142 cur.PauseCamZoomDefault = ext.PauseCamZoomDefault;
143 cur.PauseCamZoomOut = ext.PauseCamZoomOut;
144 cur.PauseCamRotYMin = ext.PauseCamRotYMin;
145 cur.PauseCamRotYMax = ext.PauseCamRotYMax;
146 cur.PauseCamRotXMin = ext.PauseCamRotXMin;
147 cur.PauseCamRotXMax = ext.PauseCamRotXMax;
148 cur.FixedCamX = ext.FixedCamX;
149 cur.FixedCamY = ext.FixedCamY;
150 cur.FixedCamZ = ext.FixedCamZ;
151 cur.FixedCamFOV = ext.FixedCamFOV;
152 cur.FixedHorizontalAngle = ext.FixedHorizontalAngle;
153 cur.FixedVerticalAngle = ext.FixedVerticalAngle;
154 cur.Value41 = ext.Value41;
155 cur.OlimarFinalCamAngle = ext.OlimarFinalCamAngle;
156 cur.IceClimbersFinalPosX = ext.IceClimbersFinalPosX;
157 cur.IceClimbersFinalPosY = ext.IceClimbersFinalPosY;
158 cur.IceClimbersFinalPosZ = ext.IceClimbersFinalPosZ;
159 cur.IceClimbersFinalScaleX = ext.IceClimbersFinalScaleX;
160 cur.IceClimbersFinalScaleY = ext.IceClimbersFinalScaleY;
161 cur.PitFinalPalutenaScale = ext.PitFinalPalutenaScale;
162 cur.Value49 = ext.Value49;
163 }
164 }

Property Documentation

◆ ResourceFileType

override ResourceType BrawlLib.SSBB.ResourceNodes.STPMNode.ResourceFileType
get

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