◆ Add()
void BrawlLib.SSBB.LabelBuilder.Add |
( |
uint |
tag, |
|
|
string |
str |
|
) |
| |
|
inline |
19 {
20 _labels.Add(new LabelItem {Tag = tag, String = str});
21 }
◆ Clear()
void BrawlLib.SSBB.LabelBuilder.Clear |
( |
| ) |
|
|
inline |
14 {
15 _labels.Clear();
16 }
◆ GetSize()
int BrawlLib.SSBB.LabelBuilder.GetSize |
( |
| ) |
|
|
inline |
24 {
25 int len = 12;
26 foreach (LabelItem label in _labels)
27 {
28 len += label.DataLen + 4;
29 }
30
31 return len.Align(0x20);
32 }
◆ Write()
void BrawlLib.SSBB.LabelBuilder.Write |
( |
VoidPtr |
address | ) |
|
|
inline |
35 {
36 LABLHeader* header = (LABLHeader*) address;
37 int count = _labels.Count;
38 VoidPtr dataAddr = address + 12 + count * 4;
40 LabelItem label;
41 int size;
42 byte* pad;
43
44 for (int i = 0; i < count;)
45 {
46 label = _labels[i++];
47 list[i] = (int) dataAddr - (int) list;
48 ((LABLEntry*) dataAddr)->Set(label.Tag, label.String);
49 dataAddr += label.DataLen;
50 }
51
52 pad = (byte*) dataAddr;
53 for (size = dataAddr - address; (size & 0x1F) != 0; size++)
54 {
55 *pad++ = 0;
56 }
57
58 header->Set(size, count);
59 }
Definition: BigEndianTypes.cs:9
◆ Count
int BrawlLib.SSBB.LabelBuilder.Count |
|
get |
The documentation for this class was generated from the following file:
- BrawlLib/SSBB/LabelBuilder.cs