blob: 3068efe1b16a26532fa717288fc5ed729954d8e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#include "f/f_base.h"
#include "f/f_list_mg.h"
#include "f/f_list_mg_ptmf.h"
/* 802e2680 */
void fLiMgPTMF_c::addNode(fLiNdPrio_c *add) {
fLiNdPrio_c *node = getFirst();
if (add == nullptr) {
return;
}
if (node == nullptr) {
append(add);
return;
}
if (node->getOrder() > add->getOrder()) {
insertAfter(add, nullptr);
return;
}
while (node->getNext() != nullptr && node->getNext()->getOrder() <= add->getOrder()) {
node = node->getNext();
}
insertAfter(add, node);
}
/* 802e26e0 */
bool fLiMgPTMF_c::walkPack() {
if (mpProcFunc == nullptr) {
return true;
}
fLiNdBa_c *node = getFirst();
while (node != nullptr) {
fLiNdBa_c *next_node = node->getNext();
(node->p_owner->*mpProcFunc)();
node = next_node;
}
return true;
}
/* 802e2760 */
const fLiNdBa_c *fLiMgBa_c::searchNodeByID(fBaseID_e id) const {
fLiNdBa_c *node = getFirst();
while (node != nullptr) {
if (node->p_owner->mID == id) {
return node;
}
node = node->getNext();
}
return nullptr;
}
/* 802e2790 */
const fLiNdBa_c *fLiMgBa_c::searchNodeByProfName(ProfileName name, fLiNdBa_c *start) const {
fLiNdBa_c *node = start != nullptr ? start->getNext() : getFirst();
while (node != nullptr) {
if (node->p_owner->mProfileName == name) {
return node;
}
node = node->getNext();
}
return nullptr;
}
/* 802e27d0 */
void fLiNdBa_c::link(fBase_c *link) {
if (p_owner != nullptr) {
unlink();
}
if (link != nullptr) {
p_owner = link;
link->mActorList.append(this);
}
}
/* 802e2830 */
void fLiNdBa_c::unlink() {
if (p_owner != nullptr) {
p_owner->mActorList.remove(this);
p_owner = nullptr;
}
}
|