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

Public Member Functions

override int OnCalculateSize (bool force)
 
string Serialize ()
 
void NewChildren ()
 
MoveDefEntryNode NewParam (int i, int value, int typeOverride)
 
override bool OnInitialize ()
 
override string ToString ()
 
override void Remove ()
 
- Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.MoveDefEntryNode
override void Rebuild (bool force)
 
override bool OnInitialize ()
 
ActionEventInfo GetEventInfo (long id)
 
override void SortChildren ()
 
ResourceNode FindNode (int offset)
 
ResourceNode GetByOffsetID (int id)
 
virtual void PostProcess ()
 
- 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 ()
 

Static Public Member Functions

static MoveDefEventNode Deserialize (string s, MoveDefNode node)
 
- Static Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.MoveDefEntryNode
static int Compare (ResourceNode n1, ResourceNode n2)
 
static int ActionCompare (ResourceNode n1, ResourceNode n2)
 
- 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

uint _event
 
uint argOffset
 
- Public Attributes inherited from BrawlLib.SSBB.ResourceNodes.MoveDefEntryNode
int _lookupCount
 
List< int > _lookupOffsets = new List<int>()
 
VoidPtr _entryOffset = 0
 
int _entryLength
 
int _childLength
 
MoveDefExternalNode _extNode
 
bool _extOverride = false
 
int offsetID
 
bool isExtra = false
 
- 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]
 
ActionEventInfo EventInfo [get]
 
uint EventID [get, set]
 
Event EventData [get]
 
byte NameSpace [get]
 
byte ID [get]
 
byte NumArguments [get]
 
byte Unknown [get, set]
 
uint ArgumentOffset [get]
 
ArgVarType[] Type [get]
 
int[] Value [get]
 
List< FDefEventArgumentArguments [get, set]
 
- Properties inherited from BrawlLib.SSBB.ResourceNodes.MoveDefEntryNode
VoidPtr _rebuildBase [get]
 
int _rebuildOffset [get]
 
VoidPtr Data [get]
 
VoidPtr BaseAddress [get]
 
MDL0Node Model [get]
 
MoveDefNode Root [get]
 
int IntOffset [get]
 
int _offset [get]
 
string HexOffset [get]
 
int Size [get]
 
bool External [get]
 
override ResourceType ResourceFileType [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

- 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

◆ Deserialize()

static MoveDefEventNode BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.Deserialize ( string  s,
MoveDefNode  node 
)
inlinestatic
123 {
124 if (string.IsNullOrEmpty(s))
125 {
126 return null;
127 }
128
129 try
130 {
131 string[] lines = s.Split('|');
132
133 if (lines[0].Length != 8)
134 {
135 return null;
136 }
137
138 MoveDefEventNode newEv = new MoveDefEventNode {_parent = node};
139
140 string id = lines[0];
141 uint idNumber = Convert.ToUInt32(id, 16);
142
143 newEv.EventID = idNumber;
144
145 uint _event = newEv.EventID;
146 ActionEventInfo info = newEv.EventInfo;
147
148 for (int i = 0; i < newEv.numArguments; i++)
149 {
150 string[] pLines = lines[i + 1].Split('\\');
151
152 int type = int.Parse(pLines[0]);
153
154 if (type == 2) //Offset
155 {
156 string[] oLines = pLines[1].Split(',');
157 int list = int.Parse(oLines[0]), type2 = int.Parse(oLines[1]), index = int.Parse(oLines[2]);
158 MoveDefEventOffsetNode o = (MoveDefEventOffsetNode) newEv.NewParam(i, 0, 2);
159 o.action = node.GetAction(list, type2, index);
160 o.list = list;
161 o.type = type2;
162 o.index = index;
163 }
164 else
165 {
166 int value = int.Parse(pLines[1]);
167 newEv.NewParam(i, value, type);
168 }
169 }
170
171 newEv._parent = null;
172 return newEv;
173 }
174 catch
175 {
176 return null;
177 }
178 }
Definition: ActionEventInfo.cs:7
uint _event
Definition: ActionEventNode.cs:52
ResourceNode _parent
Definition: ResourceNode.cs:142

◆ NewChildren()

void BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.NewChildren ( )
inline
181 {
182 while (Children.Count > 0)
183 {
185 }
186
187 for (int i = 0; i < numArguments; i++)
188 {
189 NewParam(i, 0, -1);
190 }
191 }
MoveDefEntryNode NewParam(int i, int value, int typeOverride)
Definition: ActionEventNode.cs:193
List< ResourceNode > Children
Definition: ResourceNode.cs:262
virtual void RemoveChild(ResourceNode child)
Definition: ResourceNode.cs:746

◆ NewParam()

MoveDefEntryNode BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.NewParam ( int  i,
int  value,
int  typeOverride 
)
inline
194 {
195 MoveDefEntryNode child = null;
197 ArgVarType type = ArgVarType.Value;
198 if (typeOverride >= 0)
199 {
200 type = (ArgVarType) typeOverride;
201 }
202 else if (info != null)
203 {
204 type = (ArgVarType) info.GetDfltParameter(i);
205 }
206
207 if ((ArgVarType) (int) type == ArgVarType.Value)
208 {
209 if ((_event == 0x06000D00 || _event == 0x06150F00 || _event == 0x062B0D00) && i == 12)
210 {
211 child = new HitboxFlagsNode(info != null && i < info.Params.Length ? info.Params[i] : "Value")
212 {_value = value, val = new HitboxFlags {data = value}};
213 (child as HitboxFlagsNode).GetFlags();
214 }
215 else if ((_event == 0x06000D00 || _event == 0x06150F00 || _event == 0x062B0D00) &&
216 (i == 0 || i == 3 || i == 4))
217 {
218 child = new MoveDefEventValue2HalfNode(info != null && i < info.Params.Length
219 ? info.Params[i]
220 : "Value") {_value = value};
221 }
222 else if ((_event == 0x11150300 || _event == 0x11001000 || _event == 0x11010A00 ||
223 _event == 0x11020A00) && i == 0)
224 {
225 child = new MoveDefEventValue2HalfGFXNode(info != null && i < info.Params.Length
226 ? info.Params[i]
227 : "Value") {_value = value};
228 }
229 else if (i == 14 && _event == 0x06150F00)
230 {
231 child =
232 new SpecialHitboxFlagsNode(info != null && i < info.Params.Length ? info.Params[i] : "Value")
233 {_value = value, val = new SpecialHitboxFlags {data = value}};
234 (child as SpecialHitboxFlagsNode).GetFlags();
235 }
236 else //Not a special value
237 {
238 if (EventInfo?.Enums != null && EventInfo.Enums.ContainsKey(i))
239 {
240 child = new MoveDefEventValueEnumNode(info != null && i < info.Params.Length
241 ? info.Params[i]
242 : "Value") {Enums = EventInfo.Enums[i].ToArray()};
243 }
244 else
245 {
246 child = new MoveDefEventValueNode(info != null && i < info.Params.Length
247 ? info.Params[i]
248 : "Value") {_value = value};
249 }
250 }
251 }
252 else if ((ArgVarType) (int) type == ArgVarType.Scalar)
253 {
254 child = new MoveDefEventScalarNode(info != null && i < info.Params.Length ? info.Params[i] : "Scalar")
255 {_value = value};
256 }
257 else if ((ArgVarType) (int) type == ArgVarType.Boolean)
258 {
259 child = new MoveDefEventBoolNode(info != null && i < info.Params.Length ? info.Params[i] : "Boolean")
260 {_value = value};
261 }
262 else if ((ArgVarType) (int) type == ArgVarType.Unknown)
263 {
264 child = new MoveDefEventUnkNode(info != null && i < info.Params.Length ? info.Params[i] : "Unknown")
265 {_value = value};
266 }
267 else if ((ArgVarType) (int) type == ArgVarType.Requirement)
268 {
269 MoveDefEventRequirementNode r =
270 new MoveDefEventRequirementNode(info != null && i < info.Params.Length
271 ? info.Params[i]
272 : "Requirement") {_value = value};
273 child = r;
274 r._parent = Root;
275 r.val = r.GetRequirement(r._value);
276 }
277 else if ((ArgVarType) (int) type == ArgVarType.Variable)
278 {
279 MoveDefEventVariableNode v =
280 new MoveDefEventVariableNode(info != null && i < info.Params.Length ? info.Params[i] : "Variable")
281 {_value = value};
282 child = v;
283 v._parent = Root;
284 v.val = v.ResolveVariable(v._value);
285 }
286 else if ((ArgVarType) (int) type == ArgVarType.Offset)
287 {
288 child = new MoveDefEventOffsetNode(info != null && i < info.Params.Length ? info.Params[i] : "Offset")
289 {_value = value};
290 }
291
292 child._parent = null;
293 if (i == Children.Count)
294 {
295 AddChild(child);
296 }
297 else
298 {
299 InsertChild(child, true, i);
300 }
301
302 return child;
303 }
string[] Params
Definition: ActionEventInfo.cs:85
Dictionary< int, List< string > > Enums
Definition: ActionEventInfo.cs:90
long GetDfltParameter(int i)
Definition: ActionEventInfo.cs:60
MoveDefNode Root
Definition: MoveDefNode.cs:48
ActionEventInfo EventInfo
Definition: ActionEventNode.cs:35
virtual void InsertChild(ResourceNode child, int index)
Definition: ResourceNode.cs:774
virtual void AddChild(ResourceNode child)
Definition: ResourceNode.cs:757
ArgVarType
Definition: FighterDefEnums.cs:6

◆ OnCalculateSize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

21 {
22 int size = 8;
23 _lookupCount = Children.Count > 0 ? 1 : 0;
24 foreach (MoveDefEventParameterNode p in Children)
25 {
26 size += p.CalculateSize(true);
27 _lookupCount += p._lookupCount;
28 }
29
30 return size;
31 }
int _lookupCount
Definition: MoveDefNode.cs:20

◆ OnInitialize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

363 {
364 if ((int) Header == (int) BaseAddress)
365 {
366 return false;
367 }
368
369 argOffset = Header->_argumentOffset;
370
371 nameSpace = Header->_nameSpace;
372 id = Header->_id;
373 numArguments = Header->_numArguments;
374 unk1 = Header->_unk1;
375
376 //Merge values to create ID and match with events to get name
377 _event = uint.Parse($"{nameSpace:X02}{id:X02}{numArguments:X02}{unk1:X02}",
378 System.Globalization.NumberStyles.HexNumber);
379 if (MoveDefNode.EventDictionary.ContainsKey(_event))
380 {
381 _name = MoveDefNode.EventDictionary[_event]._name;
382 }
383 else
384 {
385 if (unk1 > 0)
386 {
387 uint temp = uint.Parse(
388 $"{nameSpace:X02}{id:X02}{numArguments:X02}{0:X02}",
389 System.Globalization.NumberStyles.HexNumber);
390 if (MoveDefNode.EventDictionary.ContainsKey(temp))
391 {
392 _name = MoveDefNode.EventDictionary[temp]._name + " (Unknown == " + unk1 + ")";
393 _event = temp;
394 }
395 else
396 {
398 }
399 }
400 else
401 {
403 }
404 }
405
406 _extOverride = Index == 0;
407 base.OnInitialize();
408
409 if (!Root._events.ContainsKey(_event))
410 {
411 Root._events.Add(_event, new List<MoveDefEventNode> {this});
412 }
413 else
414 {
415 Root._events[_event].Add(this);
416 }
417
418 if (_name == "FADEF00D" || _name == "FADE0D8A")
419 {
420 Remove();
421 return false;
422 }
423
424 for (int i = 0; i < numArguments; i++)
425 {
427 FDefEventArgument* header = &ArgumentHeader[i];
428 arguments.Add(e = *header);
429
430 string param = null;
431 if (EventInfo?.Params != null && EventInfo.Params.Length != 0 && EventInfo.Params.Length > i)
432 {
433 param = string.IsNullOrEmpty(EventInfo.Params[i]) ? null : EventInfo.Params[i];
434 }
435
436 if ((_event == 0x06000D00 || _event == 0x06150F00 || _event == 0x062B0D00) && i == 12)
437 {
438 new HitboxFlagsNode(param).Initialize(this, header, 8);
439 }
440 else if ((_event == 0x06000D00 || _event == 0x06150F00 || _event == 0x062B0D00) &&
441 (i == 0 || i == 3 || i == 4))
442 {
443 new MoveDefEventValue2HalfNode(param).Initialize(this, header, 8);
444 }
445 else if ((_event == 0x11150300 || _event == 0x11001000 || _event == 0x11010A00 ||
446 _event == 0x11020A00) && i == 0)
447 {
448 new MoveDefEventValue2HalfGFXNode(param).Initialize(this, header, 8);
449 }
450 else if (i == 14 && _event == 0x06150F00)
451 {
452 new SpecialHitboxFlagsNode(param).Initialize(this, header, 8);
453 }
454 else if ((ArgVarType) (int) e._type == ArgVarType.Value)
455 {
456 if (EventInfo?.Enums != null && EventInfo.Enums.ContainsKey(i))
457 {
458 new MoveDefEventValueEnumNode(param) {Enums = EventInfo.Enums[i].ToArray()}.Initialize(this,
459 header, 8);
460 }
461 else
462 {
463 new MoveDefEventValueNode(param).Initialize(this, header, 8);
464 }
465 }
466 else if ((ArgVarType) (int) e._type == ArgVarType.Unknown)
467 {
468 new MoveDefEventUnkNode(param).Initialize(this, header, 8);
469 }
470 else if ((ArgVarType) (int) e._type == ArgVarType.Scalar)
471 {
472 new MoveDefEventScalarNode(param).Initialize(this, header, 8);
473 }
474 else if ((ArgVarType) (int) e._type == ArgVarType.Boolean)
475 {
476 new MoveDefEventBoolNode(param).Initialize(this, header, 8);
477 }
478 else if ((ArgVarType) (int) e._type == ArgVarType.Requirement)
479 {
480 new MoveDefEventRequirementNode(param).Initialize(this, header, 8);
481 }
482 else if ((ArgVarType) (int) e._type == ArgVarType.Variable)
483 {
484 new MoveDefEventVariableNode(param).Initialize(this, header, 8);
485 }
486 else if ((ArgVarType) (int) e._type == ArgVarType.Offset)
487 {
488 int offset = -1;
489 MoveDefExternalNode ext;
490 int paramOffset = e._data;
491
492 if (paramOffset == -1)
493 {
494 ext = Root.IsExternal((int) ArgumentOffset + i * 8 + 4);
495 }
496 else
497 {
498 ext = Root.IsExternal(paramOffset);
499 }
500
501 if (ext == null)
502 {
503 offset = e._data;
504 }
505
506 if (offset > 0)
507 {
508 MoveDefActionNode a;
509 int list, index, type;
510 Root.GetLocation(offset, out list, out type, out index);
511
512 if (list == 4) //Offset not found in existing nodes
513 {
514 Root._subRoutines[offset] =
515 a = new MoveDefActionNode("SubRoutine" + Root._subRoutineList.Count, false, null);
516 a.Initialize(Root._subRoutineGroup, new DataSource((sbyte*) BaseAddress + offset, 8));
517 //if (offset != (Parent as MoveDefEntryNode)._offset)
518 // a.Populate();
519 a._actionRefs.Add(this);
520 }
521 else
522 {
523 MoveDefActionNode n = Root.GetAction(list, type, index);
524 n?._actionRefs.Add(this);
525 }
526 }
527
528 //Add ID node
529 if (ext != null)
530 {
531 MoveDefEventOffsetNode x = new MoveDefEventOffsetNode(param)
532 {_name = ext.Name, _extNode = ext, _extOverride = true};
533 x.Initialize(this, header, 8);
534 ext._refs.Add(x);
535 }
536 else
537 {
538 new MoveDefEventOffsetNode(param).Initialize(this, header, 8);
539 }
540 }
541 }
542
543 return arguments.Count > 0;
544 }
Definition: Helpers.cs:7
static string Hex8(int val)
Definition: Helpers.cs:33
List< ResourceNode > _actionRefs
Definition: MoveDefActionNode.cs:84
MoveDefExternalNode _extNode
Definition: MoveDefNode.cs:130
bool _extOverride
Definition: MoveDefNode.cs:131
VoidPtr BaseAddress
Definition: MoveDefNode.cs:32
override void Remove()
Definition: ActionEventNode.cs:557
uint argOffset
Definition: ActionEventNode.cs:333
uint ArgumentOffset
Definition: ActionEventNode.cs:331
List< ResourceNode > _subRoutineList
Definition: MoveDefNode.cs:3449
Dictionary< uint, List< MoveDefEventNode > > _events
Definition: MoveDefNode.cs:3433
MoveDefActionNode GetAction(int offset)
Definition: MoveDefNode.cs:3160
MoveDefExternalNode IsExternal(int offset)
Definition: MoveDefNode.cs:3112
SortedDictionary< int, MoveDefActionNode > _subRoutines
Definition: MoveDefNode.cs:3448
ResourceNode _subRoutineGroup
Definition: MoveDefNode.cs:3450
void GetLocation(int offset, out int list, out int type, out int index)
Definition: MoveDefNode.cs:3247
string _name
Definition: ResourceNode.cs:139
int Index
Definition: ResourceNode.cs:301
int Value
Definition: BigEndianTypes.cs:49
Definition: FighterDefinition.cs:725
bint _type
Definition: FighterDefinition.cs:726
bint _data
Definition: FighterDefinition.cs:727
buint _argumentOffset
Definition: FighterDefinition.cs:709
byte _unk1
Definition: FighterDefinition.cs:708
byte _nameSpace
Definition: FighterDefinition.cs:705
byte _numArguments
Definition: FighterDefinition.cs:707
byte _id
Definition: FighterDefinition.cs:706

◆ Remove()

override void BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.Remove ( )
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

558 {
559 foreach (MoveDefEventParameterNode p in Children)
560 {
561 if (p.External)
562 {
563 p._extNode._refs.Remove(p);
564 }
565 }
566
567 base.Remove();
568 }

◆ Serialize()

string BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.Serialize ( )
inline
100 {
101 string s = "";
102 s += Helpers.Hex8(EventID) + "|";
103 foreach (MoveDefEventParameterNode p in Children)
104 {
105 s += (int) p._type + "\\";
106 if (p._type == ArgVarType.Offset)
107 {
108 MoveDefEventOffsetNode o = p as MoveDefEventOffsetNode;
109 s += o.list + "," + o.type + "," + o.index;
110 }
111 else
112 {
113 s += p._value;
114 }
115
116 s += "|";
117 }
118
119 return s;
120 }
uint EventID
Definition: ActionEventNode.cs:56

◆ ToString()

override string BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.ToString ( )
inline
547 {
548 if (Children.Count > 0 && (Children[0] is MoveDefEventOffsetNode ||
549 EventID == 0x0D000200 && Children[1] is MoveDefEventOffsetNode))
550 {
551 return TreePath;
552 }
553
554 return base.ToString();
555 }
virtual string TreePath
Definition: ResourceNode.cs:202

Member Data Documentation

◆ _event

uint BrawlLib.SSBB.ResourceNodes.MoveDefEventNode._event

◆ argOffset

uint BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.argOffset

Property Documentation

◆ ArgumentOffset

uint BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.ArgumentOffset
get

◆ Arguments

List<FDefEventArgument> BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.Arguments
getset
357 {
358 get => arguments;
359 set => arguments = value;
360 }

◆ EventData

Event BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.EventData
get
79 {
80 get
81 {
82 Event e = new Event();
84 e.pParameters = ArgumentOffset;
85 int i = 0;
86 foreach (ResourceNode r in Children)
87 {
88 if (r is MoveDefEventParameterNode)
89 {
90 e.parameters[i]._type = (r as MoveDefEventParameterNode)._type;
91 e.parameters[i++]._data = (r as MoveDefEventParameterNode)._value;
92 }
93 }
94
95 return e;
96 }
97 }
Definition: Event.cs:7
Param[] parameters
Definition: Event.cs:42
void SetEventEvent(long v)
Definition: Event.cs:8
ArgVarType _type
Definition: Event.cs:48
long _data
Definition: Event.cs:49

◆ EventID

uint BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.EventID
getset
56 {
57 get => _event;
58 set
59 {
60 _event = value;
61 string ev = Helpers.Hex8(_event);
62 nameSpace = byte.Parse(ev.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
63 id = byte.Parse(ev.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
64 numArguments = byte.Parse(ev.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
65 unk1 = byte.Parse(ev.Substring(6, 2), System.Globalization.NumberStyles.HexNumber);
66 if (MoveDefNode.EventDictionary.ContainsKey(_event))
67 {
68 Name = MoveDefNode.EventDictionary[_event]._name;
69 }
70 else
71 {
72 Name = ev;
73 }
74 }
75 }
virtual string Name
Definition: ResourceNode.cs:223

◆ EventInfo

ActionEventInfo BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.EventInfo
get
35 {
36 get
37 {
38 if (MoveDefNode.EventDictionary == null)
39 {
40 MoveDefNode.LoadEventDictionary();
41 }
42
43 if (MoveDefNode.EventDictionary.ContainsKey(_event))
44 {
45 return MoveDefNode.EventDictionary[_event];
46 }
47
48 return null;
49 }
50 }

◆ ID

byte BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.ID
get

◆ NameSpace

byte BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.NameSpace
get

◆ NumArguments

byte BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.NumArguments
get

◆ ResourceFileType

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

◆ Type

ArgVarType [] BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.Type
get
337 {
338 get
339 {
340 IEnumerable<ArgVarType> array = from x in arguments select (ArgVarType) (int) x._type;
341 return array.ToArray();
342 }
343 }

◆ Unknown

byte BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.Unknown
getset
322 {
323 get => unk1;
324 set
325 {
326 unk1 = value;
328 }
329 }
virtual void SignalPropertyChange()
Definition: ResourceNode.cs:313

◆ Value

int [] BrawlLib.SSBB.ResourceNodes.MoveDefEventNode.Value
get
347 {
348 get
349 {
350 IEnumerable<int> array = from x in arguments select (int) x._data;
351 return array.ToArray();
352 }
353 }

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