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

Public Types

enum  StatusEnum : byte
 

Public Member Functions

override bool OnInitialize ()
 
override void OnPopulate ()
 
override void OnRebuild (VoidPtr address, int length, bool force)
 
override int OnCalculateSize (bool force)
 
string GenerateName ()
 
- 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 ()
 

Properties

byte FighterID [get, set]
 
StatusEnum Status [get, set]
 
byte Unknown02 [get, set]
 
byte Unknown03 [get, set]
 
float Scale [get, set]
 
byte Team [get, set]
 
byte Unknown09 [get, set]
 
byte Unknown0a [get, set]
 
byte Unknown0b [get, set]
 
- 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.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 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 Enumeration Documentation

◆ StatusEnum

137 {
138 Normal = 0,
139 Metal = 1,
140 Clear = 2,
141 PMTurbo = 3
142 }

Member Function Documentation

◆ GenerateName()

string BrawlLib.SSBB.ResourceNodes.EventMatchFighterNode.GenerateName ( )
inline
300 {
301 string newName = "";
302
303 if (Scale > 1.0f)
304 {
305 newName += "Giant ";
306 }
307 else if (Scale < 1.0f)
308 {
309 newName += "Tiny ";
310 }
311
312 if (Status == StatusEnum.Metal)
313 {
314 newName += "Metal ";
315 }
316 else if (Status == StatusEnum.Clear)
317 {
318 newName += "Clear ";
319 }
320
321 if (FighterID == 0x3E)
322 {
323 if (Index == 0 || Parent != null && Parent.Name.EndsWith("_2p") && Index == 1)
324 {
325 newName += "Select Character";
326 }
327 else
328 {
329 return "None";
330 }
331 }
332 else
333 {
335 }
336
337 newName += $" (Team {Team})";
338
339 return newName;
340 }
Definition: CustomLists.cs:11
static readonly int slotIDIndex
Definition: CustomLists.cs:25
static string FromID(int id, int idOffset, string flagToIgnore)
Definition: CustomLists.cs:35
float Scale
Definition: EventMatchNode.cs:192
StatusEnum Status
Definition: EventMatchNode.cs:159
byte FighterID
Definition: EventMatchNode.cs:148
StatusEnum
Definition: EventMatchNode.cs:137
ResourceNode Parent
Definition: ResourceNode.cs:245
int Index
Definition: ResourceNode.cs:301
virtual string Name
Definition: ResourceNode.cs:223

◆ OnCalculateSize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

294 {
295 // Constant size (48 bytes)
296 return sizeof(EventMatchFighterData);
297 }
Definition: EventMatch.cs:81

◆ OnInitialize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

246 {
247 base.OnInitialize();
248
250 {
251 throw new Exception("Wrong size for EventMatchFighterNode");
252 }
253
254 // Copy the data from the address
256
257 if (_name == null)
258 {
260 }
261
262 return true;
263 }
string GenerateName()
Definition: EventMatchNode.cs:299
string _name
Definition: ResourceNode.cs:139
DataSource WorkingUncompressed
Definition: ResourceNode.cs:183
int Length
Definition: ResourceNode.cs:32
VoidPtr Address
Definition: ResourceNode.cs:31

◆ OnPopulate()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

266 {
267 VoidPtr ptr = WorkingUncompressed.Address + sizeof(EventMatchFighterHeader);
268 foreach (string s in new string[] {"Easy", "Normal", "Hard"})
269 {
270 DataSource source = new DataSource(ptr, sizeof(EventMatchDifficultyData));
271 EventMatchDifficultyNode node = new EventMatchDifficultyNode();
272 node.Initialize(this, source);
273 node.Name = s;
274 node.IsDirty = false;
275 ptr += sizeof(EventMatchDifficultyData);
276 }
277 }
Definition: VoidPtr.cs:9

◆ OnRebuild()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

280 {
281 // Copy the data back to the address
282 *(EventMatchFighterHeader*) address = data;
283
284 // Rebuild children using new address
285 VoidPtr ptr = address + sizeof(EventMatchFighterHeader);
286 for (int i = 0; i < Children.Count; i++)
287 {
288 Children[i].Rebuild(ptr, sizeof(EventMatchDifficultyData), true);
289 ptr += sizeof(EventMatchDifficultyData);
290 }
291 }
List< ResourceNode > Children
Definition: ResourceNode.cs:262

Property Documentation

◆ FighterID

byte BrawlLib.SSBB.ResourceNodes.EventMatchFighterNode.FighterID
getset
148 {
149 get => data._fighterID;
150 set
151 {
152 data._fighterID = value;
153 Name = GenerateName();
155 }
156 }
virtual void SignalPropertyChange()
Definition: ResourceNode.cs:313
byte _fighterID
Definition: EventMatch.cs:94

◆ Scale

float BrawlLib.SSBB.ResourceNodes.EventMatchFighterNode.Scale
getset
192 {
193 get => data._scale;
194 set
195 {
196 data._scale = value;
197 Name = GenerateName();
199 }
200 }
bfloat _scale
Definition: EventMatch.cs:98

◆ Status

StatusEnum BrawlLib.SSBB.ResourceNodes.EventMatchFighterNode.Status
getset
159 {
160 get => (StatusEnum) data._status;
161 set
162 {
163 data._status = (byte) value;
164 Name = GenerateName();
166 }
167 }
byte _status
Definition: EventMatch.cs:95

◆ Team

byte BrawlLib.SSBB.ResourceNodes.EventMatchFighterNode.Team
getset
203 {
204 get => data._team;
205 set
206 {
207 data._team = value;
209 }
210 }
byte _team
Definition: EventMatch.cs:99

◆ Unknown02

byte BrawlLib.SSBB.ResourceNodes.EventMatchFighterNode.Unknown02
getset
171 {
172 get => data._unknown02;
173 set
174 {
175 data._unknown02 = value;
177 }
178 }
byte _unknown02
Definition: EventMatch.cs:96

◆ Unknown03

byte BrawlLib.SSBB.ResourceNodes.EventMatchFighterNode.Unknown03
getset
182 {
183 get => data._unknown03;
184 set
185 {
186 data._unknown03 = value;
188 }
189 }
byte _unknown03
Definition: EventMatch.cs:97

◆ Unknown09

byte BrawlLib.SSBB.ResourceNodes.EventMatchFighterNode.Unknown09
getset
214 {
215 get => data._unknown09;
216 set
217 {
218 data._unknown09 = value;
220 }
221 }
byte _unknown09
Definition: EventMatch.cs:100

◆ Unknown0a

byte BrawlLib.SSBB.ResourceNodes.EventMatchFighterNode.Unknown0a
getset
225 {
226 get => data._unknown0a;
227 set
228 {
229 data._unknown0a = value;
231 }
232 }
byte _unknown0a
Definition: EventMatch.cs:101

◆ Unknown0b

byte BrawlLib.SSBB.ResourceNodes.EventMatchFighterNode.Unknown0b
getset
236 {
237 get => data._unknown0b;
238 set
239 {
240 data._unknown0b = value;
242 }
243 }
byte _unknown0b
Definition: EventMatch.cs:102

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