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

Public Member Functions

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

List< int > Entries = new List<int>()
 
- 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 ResourceType ResourceFileType [get]
 
sbyte Type [get, set]
 
int NumEntries [get]
 
int EntrySize [get]
 
float[] Parameters [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)
 
- 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

◆ OnCalculateSize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

517 {
518 return EntrySize;
519 }
int EntrySize
Definition: CENode.cs:422

◆ OnInitialize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

488 {
489 if (_name == null || _name == "")
490 {
491 _name = "Event " + ((int) Header->_type).ToString("X");
492 }
493
494 for (int i = 0; i < Header->_numEntries; i++)
495 {
496 Entries.Add(Header->Entries[i]);
497 }
498
499 type = Header->_type;
500 return false;
501 }
List< int > Entries
Definition: CENode.cs:403
string _name
Definition: ResourceNode.cs:139
sbyte _numEntries
Definition: AI.cs:113
bint * Entries
Definition: AI.cs:127
sbyte _type
Definition: AI.cs:112

◆ OnRebuild()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

505 {
506 CEEvent* e = (CEEvent*) address;
507 e->_entrySize = (short) EntrySize;
508 e->_numEntries = (sbyte) Entries.Count;
509 e->_type = type;
510 for (int i = 0; i < Entries.Count; i++)
511 {
512 e->Entries[i] = Entries[i];
513 }
514 }
Definition: AI.cs:111
bshort _entrySize
Definition: AI.cs:114

Member Data Documentation

◆ Entries

List<int> BrawlLib.SSBB.ResourceNodes.CEEventNode.Entries = new List<int>()

Property Documentation

◆ EntrySize

int BrawlLib.SSBB.ResourceNodes.CEEventNode.EntrySize
get

◆ NumEntries

int BrawlLib.SSBB.ResourceNodes.CEEventNode.NumEntries
get

◆ Parameters

float [] BrawlLib.SSBB.ResourceNodes.CEEventNode.Parameters
getset
426 {
427 get
428 {
429 param.Clear();
430 foreach (int i in Entries)
431 {
432 if (i >= 0x2000)
433 {
434 param.Add(((CEEntryNode) Parent).GetPart2(i) ?? 0);
435 }
436 }
437
438 return param.ToArray();
439 }
440 set
441 {
442 param.Clear();
443 foreach (float f in value)
444 {
445 param.Add(f);
446 }
447
448 for (int i = 0x1ffE + ((CEEntryNode) Parent).Part2Entries.Count, j = 0, k = 0; k < param.Count; j++)
449 {
450 Action function = () => //sorry for bad code...
451 {
452 if (i >= 0x2000)
453 {
454 if (j < Entries.Count)
455 {
456 Entries[j] = ((CEEntryNode) Parent).SetPart2(param[k], i);
457 k++;
458 }
459 else
460 {
461 Entries.Add(((CEEntryNode) Parent).SetPart2(param[k], i));
462 k++;
463 }
464 }
465 };
466
467 if (j < Entries.Count)
468 {
469 if (Entries[j] >= 0x2000)
470 {
471 i = Entries[j];
472 function();
473 }
474 }
475 else
476 {
477 i++;
478 function();
479 }
480 }
481
483 }
484 }
virtual void SignalPropertyChange()
Definition: ResourceNode.cs:313
ResourceNode Parent
Definition: ResourceNode.cs:245

◆ ResourceFileType

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

◆ Type

sbyte BrawlLib.SSBB.ResourceNodes.CEEventNode.Type
getset
412 {
413 get => type;
414 set
415 {
416 type = value;
418 }
419 }

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