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

Public Member Functions

override bool OnInitialize ()
 
void AttachNodes ()
 
override int OnCalculateSize (bool force)
 
override void OnRebuild (VoidPtr address, int length, bool force)
 
- Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.SCN0EntryNode
override bool OnInitialize ()
 
override void OnRebuild (VoidPtr address, int length, bool force)
 
IColorSource FindColorMatch (bool constant, int frameCount, int id)
 
int WriteColors (ref int flags, int bit, RGBAPixel solidColor, List< RGBAPixel > colors, bool constant, int frameCount, VoidPtr valueAddr, ref VoidPtr thisMatchAddr, VoidPtr thatMatchAddr, RGBAPixel *dataAddr)
 
void DecodeKeyframes (KeyframeArray kf, VoidPtr dataAddr, int flags, int fixedBit)
 Reads keyframes from an address and sets them in the keyframe array provided. More...
 
- 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

SCN0LightNode[] _lights = new SCN0LightNode[8]
 
SCN0AmbientLightNode _ambient
 
- Public Attributes inherited from BrawlLib.SSBB.ResourceNodes.SCN0EntryNode
int[] _dataLengths = {0, 0, 0}
 
VoidPtr[] _dataAddrs = new VoidPtr[3]
 
- 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]
 
string Ambience [get, set]
 
string Light0 [get, set]
 
string Light1 [get, set]
 
string Light2 [get, set]
 
string Light3 [get, set]
 
string Light4 [get, set]
 
string Light5 [get, set]
 
string Light6 [get, set]
 
string Light7 [get, set]
 
- Properties inherited from BrawlLib.SSBB.ResourceNodes.SCN0EntryNode
override bool AllowNullNames [get]
 
SCN0Node Scene [get]
 
int NodeIndex [get]
 
int RealIndex [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.SCN0EntryNode
static void DecodeKeyframes (KeyframeArray kf, VoidPtr dataAddr)
 Reads keyframes at an address, starting with the keyframe array header. More...
 
static int EncodeKeyframes (KeyframeArray kf, VoidPtr dataAddr, VoidPtr offset, ref int flags, int fixedBit)
 
static int EncodeKeyframes (KeyframeArray kf, VoidPtr dataAddr, VoidPtr offset)
 
static int EncodeKeyframes (KeyframeArray kf, VoidPtr dataAddr)
 
- 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.SCN0EntryNode
void ReadColors (uint flags, uint bit, ref RGBAPixel solidColor, ref List< RGBAPixel > colors, int frameCount, VoidPtr address, ref bool constant, ref int numEntries)
 
void CalcKeyLen (KeyframeArray keyframes)
 
- 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

◆ AttachNodes()

void BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode.AttachNodes ( )
inline
173 {
174 SCN0Node node = (SCN0Node) Parent.Parent;
175 SCN0GroupNode g = node.GetFolder<SCN0LightNode>();
176 bint* strings = Data->StringOffsets;
177 if (g != null && !_replaced)
178 {
179 for (int i = 0; i < Data->_numLights && i < 8; i++)
180 {
181 _lights[i] = g.FindChild(new string((sbyte*) strings + strings[i]), false) as SCN0LightNode;
182 }
183 }
184
185 g = node.GetFolder<SCN0AmbientLightNode>();
186 if (g != null && Data->_ambNameOffset != 0 && !_replaced)
187 {
188 _ambient = g.FindChild(Data->AmbientString, false) as SCN0AmbientLightNode;
189 }
190 }
bool _replaced
Definition: ResourceNode.cs:827
ResourceNode Parent
Definition: ResourceNode.cs:245
ResourceNode FindChild(string path)
Definition: ResourceNode.cs:1342
SCN0LightNode[] _lights
Definition: SCN0LightSetNode.cs:12
SCN0AmbientLightNode _ambient
Definition: SCN0LightSetNode.cs:13
Definition: BigEndianTypes.cs:9
byte _numLights
Definition: SCN0.cs:259
string AmbientString
Definition: SCN0.cs:286
bint * StringOffsets
Definition: SCN0.cs:294
bint _ambNameOffset
Definition: SCN0.cs:257

◆ OnCalculateSize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

218 {
219 return SCN0LightSet.Size;
220 }
Definition: SCN0.cs:252
const int Size
Definition: SCN0.cs:253

◆ OnInitialize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.SCN0EntryNode.

164 {
165 base.OnInitialize();
166
167 numLights = Data->_numLights;
168
169 return false;
170 }

◆ OnRebuild()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.SCN0EntryNode.

223 {
224 base.OnRebuild(address, length, force);
225
226 SCN0LightSet* header = (SCN0LightSet*) address;
227
228 int x = 0;
229 for (int i = 0; i < 8; i++)
230 {
231 if (!string.IsNullOrEmpty(GetLightName(i)))
232 {
233 x++;
234 }
235 }
236
237 header->_pad = 0;
238 header->_id = -1;
239 header->_numLights = (byte) x;
240 bshort* ids = header->IDs;
241 int e = 0;
242 while (e < 8)
243 {
244 ids[e++] = -1;
245 }
246 }
Definition: BigEndianTypes.cs:148
bshort * IDs
Definition: SCN0.cs:295
byte _pad
Definition: SCN0.cs:260
bshort _id
Definition: SCN0.cs:258

Member Data Documentation

◆ _ambient

SCN0AmbientLightNode BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode._ambient

◆ _lights

SCN0LightNode [] BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode._lights = new SCN0LightNode[8]

Property Documentation

◆ Ambience

string BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode.Ambience
getset
88 {
89 get => _ambient != null ? _ambient.Name : null;
90 set
91 {
92 _ambient =
93 ((SCN0Node) Parent.Parent).GetFolder<SCN0AmbientLightNode>().FindChild(value, false) as
94 SCN0AmbientLightNode;
96 }
97 }
virtual void SignalPropertyChange()
Definition: ResourceNode.cs:313

◆ Light0

string BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode.Light0
getset
102 {
103 get => GetLightName(0);
104 set => SetLight(0, value);
105 }

◆ Light1

string BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode.Light1
getset
110 {
111 get => GetLightName(1);
112 set => SetLight(1, value);
113 }

◆ Light2

string BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode.Light2
getset
118 {
119 get => GetLightName(2);
120 set => SetLight(2, value);
121 }

◆ Light3

string BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode.Light3
getset
126 {
127 get => GetLightName(3);
128 set => SetLight(3, value);
129 }

◆ Light4

string BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode.Light4
getset
134 {
135 get => GetLightName(4);
136 set => SetLight(4, value);
137 }

◆ Light5

string BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode.Light5
getset
142 {
143 get => GetLightName(5);
144 set => SetLight(5, value);
145 }

◆ Light6

string BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode.Light6
getset
150 {
151 get => GetLightName(6);
152 set => SetLight(6, value);
153 }

◆ Light7

string BrawlLib.SSBB.ResourceNodes.SCN0LightSetNode.Light7
getset
158 {
159 get => GetLightName(7);
160 set => SetLight(7, value);
161 }

◆ ResourceFileType

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

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