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

Public Member Functions

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

Public Attributes

uint _songID
 
- 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
 

Static Public Attributes

static readonly Dictionary< uint, string > BrawlBRSTMs
 

Properties

override bool AllowNullNames [get]
 
override bool AllowDuplicateNames [get]
 
string rstmPath [get]
 
bool IsLooped [get]
 
uint SongID [get, set]
 
short SongDelay [get, set]
 
byte Volume [get, set]
 
byte Frequency [get, set]
 
string SongFileName [get, set]
 
ushort SongSwitch [get, set]
 
bool DisableStockPinch [get, set]
 
bool HiddenFromTracklist [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]
 
- Properties inherited from BrawlLib.Internal.Audio.IAudioSource
bool IsLooped [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

◆ CreateStreams()

IAudioStream[] BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.CreateStreams ( )
inline

Implements BrawlLib.Internal.Audio.IAudioSource.

110 {
111 return linkedNode?.CreateStreams();
112 }
IAudioStream[] CreateStreams()
Definition: RSTMNode.cs:57

◆ OnCalculateSize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

249 {
250 return (int) TLSTEntry.Size;
251 }
Definition: TLST.cs:32
static readonly uint Size
Definition: TLST.cs:33

◆ OnInitialize()

override bool BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.OnInitialize ( )
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

286 {
287 if (Header->_title != 0xFFFF)
288 {
289 _name = Parent.WorkingUncompressed.Address.GetUTF8String((uint)(((TLSTNode)Parent).Header->_nameOffset + Header->_title));
290 }
291
292 if (Header->_fileName != 0xFFFF)
293 {
294 _fileName = Parent.WorkingUncompressed.Address.GetUTF8String((uint)((TLSTNode)Parent).Header->_nameOffset + Header->_fileName);
295 }
296
297 _songID = Header->_songID;
298
299 if (File.Exists(rstmPath))
300 {
301 try
302 {
303 linkedNode = (RSTMNode) NodeFactory.FromFile(null, rstmPath, typeof(RSTMNode));
304 }
305 catch
306 {
307 // ignore
308 }
309 }
310
311 _songDelay = Header->_songDelay;
312 _songVolume = Header->_songVolume;
313 _songFrequency = Header->_songFrequency;
314 _songSwitch = Header->_songSwitch;
315 _disableStockPinch = Header->_disableStockPinch != 0;
316 _disableTracklistInclusion = Header->_disableTracklistInclusion != 0;
317 return false;
318 }
string rstmPath
Definition: TLSTNode.cs:107
uint _songID
Definition: TLSTNode.cs:116
string _name
Definition: ResourceNode.cs:139
ResourceNode Parent
Definition: ResourceNode.cs:245
DataSource WorkingUncompressed
Definition: ResourceNode.cs:183
string GetUTF8String()
Definition: VoidPtr.cs:210
VoidPtr Address
Definition: ResourceNode.cs:31
byte _songVolume
Definition: TLST.cs:36
byte _disableTracklistInclusion
Definition: TLST.cs:42
bushort _title
Definition: TLST.cs:39
byte _songFrequency
Definition: TLST.cs:37
bushort _songSwitch
Definition: TLST.cs:40
bushort _fileName
Definition: TLST.cs:38
bshort _songDelay
Definition: TLST.cs:35
byte _disableStockPinch
Definition: TLST.cs:41
buint _songID
Definition: TLST.cs:34

◆ OnRebuild()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

254 {
255 TLSTEntry* header = (TLSTEntry*) address;
256 *header = new TLSTEntry();
257 if (string.IsNullOrEmpty(_fileName))
258 {
259 header->_fileName = 0xFFFF;
260 }
261 else
262 {
263 header->_fileName = ((TLSTNode) Parent).strOffset;
264 ((TLSTNode) Parent).strOffset += (ushort) (_fileName.UTF8Length() + 1);
265 }
266 if (string.IsNullOrEmpty(_name) || _name == "<null>")
267 {
268 header->_title = 0xFFFF;
269 }
270 else
271 {
272 header->_title = ((TLSTNode) Parent).strOffset;
273 ((TLSTNode) Parent).strOffset += (ushort) (_name.UTF8Length() + 1);
274 }
275
276 header->_songID = _songID;
277 header->_songDelay = _songDelay;
278 header->_songVolume = _songVolume;
279 header->_songFrequency = _songFrequency;
280 header->_songSwitch = _songSwitch;
281 header->_disableStockPinch = (byte) (_disableStockPinch ? 1 : 0);
282 header->_disableTracklistInclusion = (byte) (_disableTracklistInclusion ? 1 : 0);
283 }

Member Data Documentation

◆ _songID

uint BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode._songID

◆ BrawlBRSTMs

readonly Dictionary<uint, string> BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.BrawlBRSTMs
static

Property Documentation

◆ AllowDuplicateNames

override bool BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.AllowDuplicateNames
get

◆ AllowNullNames

override bool BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.AllowNullNames
get

◆ DisableStockPinch

bool BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.DisableStockPinch
getset
225 {
226 get => _disableStockPinch;
227 set
228 {
229 _disableStockPinch = value;
231 }
232 }
virtual void SignalPropertyChange()
Definition: ResourceNode.cs:313

◆ Frequency

byte BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.Frequency
getset
163 {
164 get => _songFrequency;
165 set
166 {
167 _songFrequency = value;
169 }
170 }

◆ HiddenFromTracklist

bool BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.HiddenFromTracklist
getset
239 {
240 get => _disableTracklistInclusion;
241 set
242 {
243 _disableTracklistInclusion = value;
245 }
246 }

◆ IsLooped

bool BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.IsLooped
get

◆ rstmPath

string BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.rstmPath
get

◆ SongDelay

short BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.SongDelay
getset
137 {
138 get => _songDelay;
139 set
140 {
141 _songDelay = value;
143 }
144 }

◆ SongFileName

string BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.SongFileName
getset
176 {
177 get => _fileName;
178 set
179 {
180 _fileName = value;
181
182 updateBRSTM();
183
185 }
186 }

◆ SongID

uint BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.SongID
getset
121 {
122 get => _songID;
123 set
124 {
125 _songID = value;
126
127 updateBRSTM();
128
130 }
131 }

◆ SongSwitch

ushort BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.SongSwitch
getset
212 {
213 get => _songSwitch;
214 set
215 {
216 _songSwitch = value;
218 }
219 }

◆ Volume

byte BrawlLib.SSBB.ResourceNodes.ProjectPlus.TLSTEntryNode.Volume
getset
150 {
151 get => _songVolume;
152 set
153 {
154 _songVolume = value;
156 }
157 }

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