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

Public Member Functions

 SCN0Node ()
 
void ReplaceCamera (SCN0Node camNode)
 
override bool OnInitialize ()
 
override void OnPopulate ()
 
SCN0GroupNode GetOrCreateFolder< T > ()
 
SCN0GroupNode GetOrCreateFolder (SCN0GroupNode.GroupType type)
 
SCN0GroupNode GetFolder< T > ()
 
SCN0GroupNode GetFolder (SCN0GroupNode.GroupType type)
 
override int OnCalculateSize (bool force)
 
override void OnRebuild (VoidPtr address, int length, bool force)
 
CreateResource< T > (string name)
 
SCN0EntryNode CreateResource (SCN0GroupNode.GroupType type, string name)
 
- Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.BRESEntryNode
override bool OnInitialize ()
 
override void Export (string outPath)
 
override byte[] MD5 ()
 Find the MD5 checksum of this node's data. Before calculating the checksum, the data will be copied to a temporary area in memory and PostProcess will be run just as in Export(). 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

int _specLights
 
int _lightsets
 
int _amblights
 
int _lights
 
int _fogs
 
int _cameras
 
SCN0GroupNode[] _groups = new SCN0GroupNode[5]
 
- Public Attributes inherited from BrawlLib.SSBB.ResourceNodes.NW4RAnimationNode
int _numFrames = 1
 
bool _loop
 
- Public Attributes inherited from BrawlLib.SSBB.ResourceNodes.BRESEntryNode
int _version
 
string _originalPath
 
- 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

override void UpdateChildFrameLimits ()
 
virtual void UpdateChildFrameLimits ()
 
- Protected Member Functions inherited from BrawlLib.SSBB.ResourceNodes.BRESEntryNode
virtual void OnVersionChanged (int previousVersion)
 
- Protected Member Functions inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
void ForceReplacedEvent ()
 
virtual void MergeInternal ()
 

Properties

override ResourceType ResourceFileType [get]
 
override int[] SupportedVersions [get]
 
override string Tag [get]
 
SCN0GroupNode LightSetGroup [get, set]
 
SCN0GroupNode AmbientGroup [get, set]
 
SCN0GroupNode LightGroup [get, set]
 
SCN0GroupNode FogGroup [get, set]
 
SCN0GroupNode CameraGroup [get, set]
 
override int FrameCount [get, set]
 
override bool Loop [get, set]
 
- Properties inherited from BrawlLib.SSBB.ResourceNodes.NW4RAnimationNode
virtual int FrameCount [get, set]
 
virtual bool Loop [get, set]
 
- Properties inherited from BrawlLib.SSBB.ResourceNodes.BRESEntryNode
virtual int DataAlign [get]
 
BRRESNode BRESNode [get]
 
virtual int[] SupportedVersions [get]
 
virtual string Tag [get]
 
int Version [get, set]
 
string OriginalPath [get, set]
 
UserDataCollection UserEntries [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)
 
- Events inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
SelectEventHandler SelectChild
 
EventHandler UpdateProps
 
MoveEventHandler MovedUp
 
ResourceEventHandler Disposing
 
ResourceChildEventHandler ChildAdded
 
ResourceChildInsertEventHandler ChildInserted
 

Constructor & Destructor Documentation

◆ SCN0Node()

BrawlLib.SSBB.ResourceNodes.SCN0Node.SCN0Node ( )
inline
17 {
18 _version = 4;
19 }
int _version
Definition: BRRESNode.cs:1045

Member Function Documentation

◆ CreateResource()

SCN0EntryNode BrawlLib.SSBB.ResourceNodes.SCN0Node.CreateResource ( SCN0GroupNode.GroupType  type,
string  name 
)
inline
525 {
526 SCN0GroupNode group = GetOrCreateFolder(type);
527 if (group == null)
528 {
529 return null;
530 }
531
532 Type t = SCN0GroupNode._types[(int) type];
533 SCN0EntryNode n = Activator.CreateInstance(t) as SCN0EntryNode;
534 n.Name = group.FindName(name);
535 group.AddChild(n);
536
537 return n;
538 }
SCN0GroupNode GetOrCreateFolder(SCN0GroupNode.GroupType type)
Definition: SCN0Node.cs:231

◆ CreateResource< T >()

Type Constraints
T :SCN0EntryNode 
509 : SCN0EntryNode
510 {
511 SCN0GroupNode group = GetOrCreateFolder<T>();
512 if (group == null)
513 {
514 return null;
515 }
516
517 T n = Activator.CreateInstance<T>();
518 n.Name = group.FindName(name);
519 group.AddChild(n);
520
521 return n;
522 }
SCN0GroupNode GetOrCreateFolder< T >()
Definition: SCN0Node.cs:226

◆ GetFolder()

SCN0GroupNode BrawlLib.SSBB.ResourceNodes.SCN0Node.GetFolder ( SCN0GroupNode.GroupType  type)
inline
253 {
254 Populate(0);
255
256 int typeID = (int) type;
257 if (typeID < 0 || typeID >= 5)
258 {
259 return null;
260 }
261
262 return _groups[typeID];
263 }
void Populate(int levels=-1)
Definition: ResourceNode.cs:613
SCN0GroupNode[] _groups
Definition: SCN0Node.cs:33

◆ GetFolder< T >()

Type Constraints
T :SCN0EntryNode 
247 : SCN0EntryNode
248 {
249 return GetFolder((SCN0GroupNode.GroupType) SCN0GroupNode._types.IndexOf(typeof(T)));
250 }
SCN0GroupNode GetFolder(SCN0GroupNode.GroupType type)
Definition: SCN0Node.cs:252

◆ GetOrCreateFolder()

SCN0GroupNode BrawlLib.SSBB.ResourceNodes.SCN0Node.GetOrCreateFolder ( SCN0GroupNode.GroupType  type)
inline
232 {
233 int typeID = (int) type;
234 if (typeID < 0 || typeID >= 5)
235 {
236 return null;
237 }
238
239 if (_groups[typeID] == null)
240 {
241 AddChild(_groups[typeID] = new SCN0GroupNode(type));
242 }
243
244 return _groups[typeID];
245 }
virtual void AddChild(ResourceNode child)
Definition: ResourceNode.cs:757

◆ GetOrCreateFolder< T >()

Type Constraints
T :SCN0EntryNode 
226 : SCN0EntryNode
227 {
228 return GetOrCreateFolder((SCN0GroupNode.GroupType) SCN0GroupNode._types.IndexOf(typeof(T)));
229 }

◆ OnCalculateSize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

284 {
285 //Reset specular light count so it can be recounted
286 _specLights = 0;
287
288 //Add header and resource group size
289 int size = SCN0v4.Size + ResourceGroup.Size + Children.Count * ResourceEntry.Size;
290
291 //Add the size of each resource group, and headers and all data
292 foreach (SCN0GroupNode n in Children)
293 {
294 size += n.CalculateSize(true);
295 }
296
297 //Add size of user entries
298 if (_version == 5)
299 {
300 size += _userEntries.GetSize();
301 }
302
303 return size;
304 }
List< ResourceNode > Children
Definition: ResourceNode.cs:262
int _specLights
Definition: SCN0Node.cs:31
Definition: Common.cs:472
const int Size
Definition: Common.cs:473

◆ OnInitialize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.BRESEntryNode.

124 {
125 base.OnInitialize();
126 if (_version == 5)
127 {
128 SCN0v5* header = Header5;
129 if (_name == null && header->_stringOffset != 0)
130 {
131 _name = header->ResourceString;
132 }
133
134 _numFrames = header->_frameCount;
136 _loop = header->_loop != 0;
137 _lightsets = header->_lightSetCount;
138 _amblights = header->_ambientCount;
139 _lights = header->_lightCount;
140 _fogs = header->_fogCount;
141 _cameras = header->_cameraCount;
142
143 if (header->_origPathOffset > 0)
144 {
145 _originalPath = header->OrigPath;
146 }
147
148 (_userEntries = new UserDataCollection()).Read(header->UserData, WorkingUncompressed);
149
150 return header->Group->_numEntries > 0;
151 }
152 else
153 {
154 SCN0v4* header = Header4;
155 if (_name == null && header->_stringOffset != 0)
156 {
157 _name = header->ResourceString;
158 }
159
160 _numFrames = header->_frameCount;
162 _loop = header->_loop != 0;
163 _lightsets = header->_lightSetCount;
164 _amblights = header->_ambientCount;
165 _lights = header->_lightCount;
166 _fogs = header->_fogCount;
167 _cameras = header->_cameraCount;
168
169 if (header->_origPathOffset > 0)
170 {
171 _originalPath = header->OrigPath;
172 }
173
174 return header->Group->_numEntries > 0;
175 }
176 }
string _originalPath
Definition: BRRESNode.cs:1046
int _numFrames
Definition: BRRESNode.cs:994
bool _loop
Definition: BRRESNode.cs:995
string _name
Definition: ResourceNode.cs:139
DataSource WorkingUncompressed
Definition: ResourceNode.cs:183
int _fogs
Definition: SCN0Node.cs:31
int _cameras
Definition: SCN0Node.cs:31
int _amblights
Definition: SCN0Node.cs:31
int _lights
Definition: SCN0Node.cs:31
int _lightsets
Definition: SCN0Node.cs:31
bint _numEntries
Definition: Common.cs:384
Definition: SCN0.cs:10
bushort _specLightCount
Definition: SCN0.cs:24
bshort _cameraCount
Definition: SCN0.cs:30
bushort _frameCount
Definition: SCN0.cs:23
bshort _fogCount
Definition: SCN0.cs:29
string ResourceString
Definition: SCN0.cs:93
ResourceGroup * Group
Definition: SCN0.cs:85
bshort _lightSetCount
Definition: SCN0.cs:26
bshort _lightCount
Definition: SCN0.cs:28
bshort _ambientCount
Definition: SCN0.cs:27
bint _stringOffset
Definition: SCN0.cs:21
string OrigPath
Definition: SCN0.cs:101
bint _origPathOffset
Definition: SCN0.cs:22
bint _loop
Definition: SCN0.cs:25
Definition: SCN0.cs:112
bint _loop
Definition: SCN0.cs:128
bushort _specLightCount
Definition: SCN0.cs:127
bushort _frameCount
Definition: SCN0.cs:126
string ResourceString
Definition: SCN0.cs:202
bshort _cameraCount
Definition: SCN0.cs:133
bshort _ambientCount
Definition: SCN0.cs:130
ResourceGroup * Group
Definition: SCN0.cs:188
bshort _lightCount
Definition: SCN0.cs:131
bint _stringOffset
Definition: SCN0.cs:124
bshort _fogCount
Definition: SCN0.cs:132
bshort _lightSetCount
Definition: SCN0.cs:129
string OrigPath
Definition: SCN0.cs:210
VoidPtr UserData
Definition: SCN0.cs:191
bint _origPathOffset
Definition: SCN0.cs:125

◆ OnPopulate()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

179 {
180 ResourceGroup* group;
181 bint* offsets;
182 bshort* counts;
183 if (Header->_version == 5)
184 {
185 group = Header5->Group;
186 offsets = (bint*) Header5->_lightSetOffset.Address;
187 counts = (bshort*) Header5->_lightSetCount.Address;
188 }
189 else
190 {
191 group = Header4->Group;
192 offsets = (bint*) Header4->_lightSetOffset.Address;
193 counts = (bshort*) Header4->_lightSetCount.Address;
194 }
195
196 SCN0GroupNode g;
197 for (int i = 0; i < group->_numEntries; i++)
198 {
199 string name = group->First[i].GetName();
200 (g = new SCN0GroupNode(name)).Initialize(this, new DataSource(group->First[i].DataAddress, 0));
201
202 int typeID = (int) g._type;
203 _groups[typeID] = g;
204
205 Type t = SCN0GroupNode._types[typeID];
206
207 ResourceNode r;
208 VoidPtr entryAddr = (VoidPtr) Header + offsets[typeID];
209 for (int x = 0, offset = 0, size = 0; x < counts[typeID]; x++, offset += size)
210 {
211 r = Activator.CreateInstance(t) as ResourceNode;
212 size = *(bint*) (entryAddr + offset);
213 r.Initialize(g, new DataSource(entryAddr + offset, size));
214 }
215 }
216
217 if (LightSetGroup != null)
218 {
219 foreach (SCN0LightSetNode t in LightSetGroup.Children)
220 {
221 t.AttachNodes();
222 }
223 }
224 }
void Initialize(ResourceNode parent, FileMap source)
Definition: ResourceNode.cs:651
static readonly Type[] _types
Definition: SCN0GroupNode.cs:37
SCN0GroupNode LightSetGroup
Definition: SCN0Node.cs:37
Definition: VoidPtr.cs:9
Definition: BigEndianTypes.cs:9
VoidPtr Address
Definition: BigEndianTypes.cs:33
Definition: BigEndianTypes.cs:148
VoidPtr Address
Definition: BigEndianTypes.cs:172
VoidPtr DataAddress
Definition: Common.cs:524
string GetName()
Definition: Common.cs:547
Definition: Common.cs:380
ResourceEntry * First
Definition: Common.cs:405
bint _lightSetOffset
Definition: SCN0.cs:16
bint _lightSetOffset
Definition: SCN0.cs:118

◆ OnRebuild()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

307 {
308 //Create data lengths for each group
309 //group, lightset, ambient, light, fog, camera
310 int[] lengths = new int[6];
311
312 //Create entry counts for each group
313 //lightset, ambient, light, fog, camera
314 short[] counts = new short[5];
315
316 //Create addresses for all data sections
317 //group, entry, key, color, vis
318 VoidPtr[] dataAddrs = new VoidPtr[5];
319
320 //Write header and retrieve main resource group
321 ResourceGroup* group;
322 if (_version == 5)
323 {
324 SCN0v5* header = (SCN0v5*) address;
325
326 header->_origPathOffset = 0;
327 header->_frameCount = (ushort) _numFrames;
328 header->_specLightCount = (ushort) _specLights;
329 header->_loop = _loop ? 1 : 0;
330 header->_pad = 0;
331 header->_dataOffset = SCN0v5.Size;
332
333 group = header->Group;
334 }
335 else
336 {
337 SCN0v4* header = (SCN0v4*) address;
338
339 header->_origPathOffset = 0;
340 header->_frameCount = (ushort) _numFrames;
341 header->_specLightCount = (ushort) _specLights;
342 header->_loop = _loop ? 1 : 0;
343 header->_pad = 0;
344 header->_dataOffset = SCN0v4.Size;
345
346 group = header->Group;
347 }
348
349 //Create resource group
350 *group = new ResourceGroup(Children.Count);
351 lengths[0] = group->_totalSize;
352
353 //Get pointer to main resource entry buffer
354 ResourceEntry* entry = group->First;
355
356 //Get pointer to resource groups for each child group
357 dataAddrs[0] = group->EndAddress;
358
359 //Get pointer to the address for headers
360 for (int i = 0; i < 4; i++)
361 {
362 dataAddrs[i + 1] = dataAddrs[i];
363 foreach (SCN0GroupNode g in Children)
364 {
365 if (i == 0)
366 {
367 dataAddrs[i + 1] += g._dataLengths[i];
368 }
369 else
370 {
371 foreach (SCN0EntryNode e in g.Children)
372 {
373 dataAddrs[i + 1] += i == 1 ? e._calcSize : e._dataLengths[i - 2];
374 }
375 }
376 }
377 }
378
379 //Use an index array to remap and write groups in proper order.
380 int[] indices = new int[] {-1, -1, -1, -1, -1};
381
382 //Loop through groups and set index, length and count
383 foreach (SCN0GroupNode g in Children)
384 {
385 int i = (int) g._type;
386 indices[i] = g.Index;
387 lengths[i + 1] = g._dataLengths[1];
388 counts[i] = (short) g.Children.Count;
389 }
390
391 //Now loop through indices to get each group and write it
392 for (int i = 0; i < 5; i++)
393 {
394 //Make sure the group exists
395 SCN0GroupNode g = indices[i] >= 0 ? Children[indices[i]] as SCN0GroupNode : null;
396 if (g != null)
397 {
398 //Set offset to group in main resource group
399 (entry++)->_dataOffset = (int) dataAddrs[0] - (int) group;
400
401 //Set addresses for rebuild
402 for (int x = 0; x < 4; x++)
403 {
404 g._addrs[x] = dataAddrs[x + 1];
405 }
406
407 //Rebuild focusing on the resource group
408 g.Rebuild(dataAddrs[0], g._dataLengths[0], true);
409
410 //Increment addresses
411 lengths[0] += g._dataLengths[0];
412 for (int x = 0; x < 5; x++)
413 {
414 dataAddrs[x] += g._dataLengths[x];
415 }
416 }
417 }
418
419 //Set header values
420 if (_version == 5)
421 {
422 SCN0v5* header = (SCN0v5*) address;
423 header->_lightSetCount = counts[0];
424 header->_ambientCount = counts[1];
425 header->_lightCount = counts[2];
426 header->_fogCount = counts[3];
427 header->_cameraCount = counts[4];
428 header->Set(lengths[0], lengths[1], lengths[2], lengths[3], lengths[4], lengths[5]);
429
430 if (_userEntries.Count > 0)
431 {
432 _userEntries.Write(header->UserData = dataAddrs[4]);
433 }
434 }
435 else
436 {
437 SCN0v4* header = (SCN0v4*) address;
438 header->_lightSetCount = counts[0];
439 header->_ambientCount = counts[1];
440 header->_lightCount = counts[2];
441 header->_fogCount = counts[3];
442 header->_cameraCount = counts[4];
443 header->Set(lengths[0], lengths[1], lengths[2], lengths[3], lengths[4], lengths[5]);
444 }
445 }
bint _totalSize
Definition: Common.cs:383
VoidPtr EndAddress
Definition: Common.cs:406
bint _dataOffset
Definition: SCN0.cs:15
const int Size
Definition: SCN0.cs:12
void Set(int groupLen, int lightSetLen, int ambLightLen, int lightLen, int fogLen, int cameraLen)
Definition: SCN0.cs:33
bshort _pad
Definition: SCN0.cs:31
const int Size
Definition: SCN0.cs:114
void Set(int groupLen, int lightSetLen, int ambLightLen, int lightLen, int fogLen, int cameraLen)
Definition: SCN0.cs:136
bshort _pad
Definition: SCN0.cs:134
bint _dataOffset
Definition: SCN0.cs:117

◆ ReplaceCamera()

void BrawlLib.SSBB.ResourceNodes.SCN0Node.ReplaceCamera ( SCN0Node  camNode)
inline
22 {
23 CameraGroup.Children.Clear();
24 foreach (ResourceNode n in camNode.CameraGroup.Children)
25 {
27 }
28 }
SCN0GroupNode CameraGroup
Definition: SCN0Node.cs:65

◆ UpdateChildFrameLimits()

override void BrawlLib.SSBB.ResourceNodes.SCN0Node.UpdateChildFrameLimits ( )
inlineprotectedvirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.NW4RAnimationNode.

89 {
90 if (LightGroup != null)
91 {
92 foreach (SCN0LightNode l in LightGroup.Children)
93 {
94 l.SetSize(_numFrames, Loop);
95 }
96 }
97
98 if (AmbientGroup != null)
99 {
100 foreach (SCN0AmbientLightNode l in AmbientGroup.Children)
101 {
102 l.SetSize(_numFrames);
103 }
104 }
105
106 if (FogGroup != null)
107 {
108 foreach (SCN0FogNode l in FogGroup.Children)
109 {
110 l.SetSize(_numFrames, Loop);
111 }
112 }
113
114 if (CameraGroup != null)
115 {
116 foreach (SCN0CameraNode l in CameraGroup.Children)
117 {
118 l.SetSize(_numFrames, Loop);
119 }
120 }
121 }
SCN0GroupNode FogGroup
Definition: SCN0Node.cs:58
override bool Loop
Definition: SCN0Node.cs:79
SCN0GroupNode LightGroup
Definition: SCN0Node.cs:51
SCN0GroupNode AmbientGroup
Definition: SCN0Node.cs:44

Member Data Documentation

◆ _amblights

int BrawlLib.SSBB.ResourceNodes.SCN0Node._amblights

◆ _cameras

int BrawlLib.SSBB.ResourceNodes.SCN0Node._cameras

◆ _fogs

int BrawlLib.SSBB.ResourceNodes.SCN0Node._fogs

◆ _groups

SCN0GroupNode [] BrawlLib.SSBB.ResourceNodes.SCN0Node._groups = new SCN0GroupNode[5]

◆ _lights

int BrawlLib.SSBB.ResourceNodes.SCN0Node._lights

◆ _lightsets

int BrawlLib.SSBB.ResourceNodes.SCN0Node._lightsets

◆ _specLights

int BrawlLib.SSBB.ResourceNodes.SCN0Node._specLights

Property Documentation

◆ AmbientGroup

SCN0GroupNode BrawlLib.SSBB.ResourceNodes.SCN0Node.AmbientGroup
getset
44 {
45 get => _groups[1];
46 set => _groups[1] = value;
47 }

◆ CameraGroup

SCN0GroupNode BrawlLib.SSBB.ResourceNodes.SCN0Node.CameraGroup
getset
65 {
66 get => _groups[4];
67 set => _groups[4] = value;
68 }

◆ FogGroup

SCN0GroupNode BrawlLib.SSBB.ResourceNodes.SCN0Node.FogGroup
getset
58 {
59 get => _groups[3];
60 set => _groups[3] = value;
61 }

◆ FrameCount

override int BrawlLib.SSBB.ResourceNodes.SCN0Node.FrameCount
getset
72 {
73 get => base.FrameCount;
74 set => base.FrameCount = value;
75 }

◆ LightGroup

SCN0GroupNode BrawlLib.SSBB.ResourceNodes.SCN0Node.LightGroup
getset
51 {
52 get => _groups[2];
53 set => _groups[2] = value;
54 }

◆ LightSetGroup

SCN0GroupNode BrawlLib.SSBB.ResourceNodes.SCN0Node.LightSetGroup
getset
37 {
38 get => _groups[0];
39 set => _groups[0] = value;
40 }

◆ Loop

override bool BrawlLib.SSBB.ResourceNodes.SCN0Node.Loop
getset
79 {
80 get => base.Loop;
81 set
82 {
83 base.Loop = value;
85 }
86 }
override void UpdateChildFrameLimits()
Definition: SCN0Node.cs:88

◆ ResourceFileType

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

◆ SupportedVersions

override int [] BrawlLib.SSBB.ResourceNodes.SCN0Node.SupportedVersions
get

◆ Tag

override string BrawlLib.SSBB.ResourceNodes.SCN0Node.Tag
get

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