sneakyevil / IL2CPP_Resolver

A run-time API resolver for IL2CPP Unity.
https://sneakyevil.gitbook.io/il2cpp-resolver/
The Unlicense
323 stars 65 forks source link

Dictionary class?) #6

Closed fork1488 closed 1 year ago

fork1488 commented 2 years ago

image

`template<typename T, typename N>
    struct il2cppDictionary : il2cppObject
    {
        void* buckets;
        void* entries;
        int32_t count;
        int32_t version;
        int32_t freeList;
        int32_t freeCount;
        void* comparer;
        void* keys;
        void* values;
        int32_t _syncRoot;
    };`
sorry not full, go sleeping
extremeblackliu commented 2 years ago

currently we are working on it

fork1488 commented 2 years ago

currently we are working on it

image C# HashSet

`

  <Element Offset="40" Vartype="Pointer" Bytesize="8" OffsetHex="00000028" Description="entities" DisplayMethod="Unsigned Integer">
    <Structure Name="Autocreated from 1C9CCA13FA0" AutoFill="0" AutoCreate="1" DefaultHex="0" AutoDestroy="0" DoNotSaveLocal="0" RLECompression="1" AutoCreateStructsize="4096">
      <Elements>
        <Element Offset="16" Vartype="Pointer" Bytesize="8" OffsetHex="00000010" Description="_buckets" DisplayMethod="Unsigned Integer"/>
        <Element Offset="24" Vartype="Pointer" Bytesize="8" OffsetHex="00000018" Description="_slots" DisplayMethod="Unsigned Integer"/>
        <Element Offset="32" Vartype="4 Bytes" Bytesize="4" OffsetHex="00000020" Description="_count" DisplayMethod="Unsigned Integer"/>
        <Element Offset="36" Vartype="4 Bytes" Bytesize="4" OffsetHex="00000024" Description="_lastIndex" DisplayMethod="Unsigned Integer"/>
        <Element Offset="40" Vartype="4 Bytes" Bytesize="4" OffsetHex="00000028" Description="_freeList" DisplayMethod="Unsigned Integer"/>
        <Element Offset="48" Vartype="Pointer" Bytesize="8" OffsetHex="00000030" Description="_comparer" DisplayMethod="Unsigned Integer"/>
        <Element Offset="56" Vartype="4 Bytes" Bytesize="4" OffsetHex="00000038" Description="_version" DisplayMethod="Unsigned Integer"/>
        <Element Offset="64" Vartype="Pointer" Bytesize="8" OffsetHex="00000040" Description="_siInfo" DisplayMethod="Unsigned Integer"/>
      </Elements>
    </Structure>
  </Element>
</Elements>

`

S3eeD2 commented 2 years ago
template <typename T>
struct Il2CppArray
{
    void* klass;
    void* monitor;
    void* bounds;
    int   max_length;
    void* vector [1];
    int getLength()
    {
        return max_length;
    }
    T getPointer()
    {
        return (T)vector;
    }
};

template<typename K, typename V> 
struct Il2CppDictionary {
    void* klass;
    void *unk1;
    Il2CppArray<int **> *table;
    Il2CppArray<void **> *linkSlots;
    Il2CppArray<K> *keys;
    Il2CppArray<V> *values;
    int touchedSlots;
    int emptySlot;
    int size;

    K *getKeys() {

Rename everything and put it here as yours without giving credit to whoever wrote it, very bad behavior.

This struct written by caoyin, this link to the original file.

Rednick16 commented 1 year ago
```c++
template <typename T>
struct Il2CppArray
{
    void* klass;
    void* monitor;
    void* bounds;
    int   max_length;
    void* vector [1];
    int getLength()
    {
        return max_length;
    }
    T getPointer()
    {
        return (T)vector;
    }
};

template<typename K, typename V> 
struct Il2CppDictionary {
    void* klass;
    void *unk1;
    Il2CppArray<int **> *table;
    Il2CppArray<void **> *linkSlots;
    Il2CppArray<K> *keys;
    Il2CppArray<V> *values;
    int touchedSlots;
    int emptySlot;
    int size;

    K *getKeys() {

Rename everything and put it here as yours without giving credit to whoever wrote it, very bad behavior. This struct written by caoyin, this link to the original file.

that wasn't made by me here's my own: https://github.com/Rednick16/IL2Cpp-Dictionary

extremeblackliu commented 1 year ago

its been 1 year,thank you all, added to pr, close later

sneakyevil commented 1 year ago

Added in latest commit: 3967263271f5616b4ba97bf9d01e594cf7112194