summaryrefslogtreecommitdiff
path: root/src/f_pc/f_pc_layer_iter.cpp
blob: ad6208942f8ee7df55b562d2770e818312d3a6cf (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
//
// Generated By: dol2asm
// Translation Unit: f_pc/f_pc_layer_iter
//

#include "f_pc/f_pc_layer_iter.h"
#include "SSystem/SComponent/c_node_iter.h"
#include "SSystem/SComponent/c_tag_iter.h"
#include "SSystem/SComponent/c_tree_iter.h"
#include "dol2asm.h"
#include "dolphin/types.h"

//
// Declarations:
//

/* 80021B88-80021BC0 0038+00 s=1 e=4 z=0  None .text fpcLyIt_OnlyHere__FP11layer_classPFPvPv_iPv
 */
s32 fpcLyIt_OnlyHere(layer_class* pLayer, fpcLyIt_OnlyHereFunc pFunc, void* pUserData) {
    layer_iter lIter;
    lIter.mpFunc = pFunc;
    lIter.mpUserData = pUserData;
    return cTrIt_Method(&pLayer->mNodeListTree, (cNdIt_MethodFunc)cTgIt_MethodCall, &lIter);
}

/* 80021BC0-80021C28 0068+00 s=0 e=1 z=0  None .text fpcLyIt_OnlyHereLY__FP11layer_classPFPvPv_iPv
 */
s32 fpcLyIt_OnlyHereLY(layer_class* pLayer, fpcLyIt_OnlyHereFunc pFunc, void* pUserData) {
    s32 result;
    layer_class* currentLayer = fpcLy_CurrentLayer();
    fpcLy_SetCurrentLayer(pLayer);
    result = fpcLyIt_OnlyHere(pLayer, pFunc, pUserData);
    fpcLy_SetCurrentLayer(currentLayer);
    return result;
}

/* 80021C28-80021C60 0038+00 s=0 e=3 z=0  None .text      fpcLyIt_Judge__FP11layer_classPFPvPv_PvPv
 */
void* fpcLyIt_Judge(layer_class* pLayer, fpcLyIt_JudgeFunc pFunc, void* pUserData) {
    layer_iter lIter;
    lIter.mpFunc = pFunc;
    lIter.mpUserData = pUserData;
    return cTrIt_Judge(&pLayer->mNodeListTree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &lIter);
}

/* 80021C60-80021CD4 0074+00 s=0 e=1 z=4  None .text      fpcLyIt_AllJudge__FPFPvPv_PvPv */
void* fpcLyIt_AllJudge(fpcLyIt_JudgeFunc pFunc, void* pUserData) {
    layer_iter lIter;
    layer_class* current;
    lIter.mpFunc = pFunc;
    lIter.mpUserData = pUserData;

    current = fpcLy_RootLayer();
    while (current != NULL) {
        void* result =
            cTrIt_Judge(&current->mNodeListTree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &lIter);
        if (result != NULL) {
            return result;
        }
        current = (layer_class*)current->mNode.mpNextNode;
    }
    return NULL;
}