少年修仙传客户端基础资源
hch
2024-04-11 4c71d74b77c9eb62a0323698c9a0db3b641a917e
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
#include "il2cpp-config.h"
 
#include "PerformanceCounterUtils.h"
#include "il2cpp-object-internals.h"
#include "utils/Memory.h"
#include "utils/StringUtils.h"
#include "vm/String.h"
#include "vm-utils/VmStringUtils.h"
 
namespace il2cpp
{
namespace icalls
{
namespace System
{
namespace System
{
namespace Diagnostics
{
    ImplVtable* create_vtable(void *arg, SampleFunc sample, UpdateFunc update)
    {
        ImplVtable* vtable = (ImplVtable*)IL2CPP_MALLOC_ZERO(sizeof(ImplVtable));
        vtable->arg = arg;
        vtable->sample = sample;
        vtable->update = update;
        return vtable;
    }
 
    const CategoryDesc* find_category(Il2CppString *category)
    {
        for (int i = 0; i < NUM_CATEGORIES; ++i)
        {
            if (utils::VmStringUtils::CaseInsensitiveEquals(category, predef_categories[i].name))
                return &predef_categories[i];
        }
        return NULL;
    }
 
    const CounterDesc* get_counter_in_category(const CategoryDesc *desc, Il2CppString *counter)
    {
        const CounterDesc *cdesc = &predef_counters[desc->first_counter];
        const CounterDesc *end = &predef_counters[desc[1].first_counter];
        for (; cdesc < end; ++cdesc)
        {
            if (utils::VmStringUtils::CaseInsensitiveEquals(counter, cdesc->name))
                return cdesc;
        }
        return NULL;
    }
} /* namespace Diagnostics */
} /* namespace System */
} /* namespace System */
} /* namespace icalls */
} /* namespace il2cpp */