summaryrefslogtreecommitdiff
path: root/src/f_pc/f_pc_layer_iter.cpp
blob: 558609499a2f7d29fc9e5b14746e2a091506eec9 (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
//
// Generated by dtk
// Translation Unit: f_pc_layer_iter.cpp
//

#include "f_pc/f_pc_layer_iter.h"
#include "SSystem/SComponent/c_tag_iter.h"
#include "SSystem/SComponent/c_tree_iter.h"
#include "f_pc/f_pc_layer.h"

/* 8003DE00-8003DE38       .text fpcLyIt_OnlyHere__FP11layer_classPFPvPv_iPv */
BOOL fpcLyIt_OnlyHere(layer_class* i_layer, fpcLyIt_OnlyHereFunc i_func, void* i_data) {
    method_filter filter;
    filter.mpMethodFunc = (cNdIt_MethodFunc)i_func;
    filter.mpUserData = i_data;
    return cTrIt_Method(&i_layer->mNodeListTree, (cNdIt_MethodFunc)cTgIt_MethodCall, &filter);
}

/* 8003DE38-8003DEA0       .text fpcLyIt_OnlyHereLY__FP11layer_classPFPvPv_iPv */
BOOL fpcLyIt_OnlyHereLY(layer_class* i_layer, fpcLyIt_OnlyHereFunc i_func, void* i_data) {
    BOOL result;
    layer_class* currentLayer = fpcLy_CurrentLayer();
    fpcLy_SetCurrentLayer(i_layer);
    result = fpcLyIt_OnlyHere(i_layer, i_func, i_data);
    fpcLy_SetCurrentLayer(currentLayer);
    return result;
}

/* 8003DEA0-8003DED8       .text fpcLyIt_Judge__FP11layer_classPFPvPv_PvPv */
void* fpcLyIt_Judge(layer_class* i_layer, fpcLyIt_JudgeFunc i_func, void* i_data) {
    judge_filter filter;
    filter.mpJudgeFunc = (cNdIt_JudgeFunc)i_func;
    filter.mpUserData = i_data;
    return cTrIt_Judge(&i_layer->mNodeListTree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &filter);
}

/* 8003DED8-8003DF4C       .text fpcLyIt_AllJudge__FPFPvPv_PvPv */
void* fpcLyIt_AllJudge(fpcLyIt_JudgeFunc i_func, void* i_data) {
    judge_filter filter;
    layer_class* current;
    filter.mpJudgeFunc = (cNdIt_JudgeFunc)i_func;
    filter.mpUserData = i_data;

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