ByamlArrayIter.o progress

This commit is contained in:
shibbo 2024-07-22 14:10:41 -04:00
parent a19fdc8c36
commit 31eefc4f8b
5 changed files with 53 additions and 7 deletions

View File

@ -54954,13 +54954,13 @@ _ZNK2al20ByamlStringTableIter13getEndAddressEv=00000071008D69B0=0000001C=true
_ZNK2al20ByamlStringTableIter9getStringEi=00000071008D69D0=00000014=true
_ZNK2al20ByamlStringTableIter13getStringSizeEi=00000071008D69F0=00000018=true
_ZNK2al20ByamlStringTableIter15findStringIndexEPKc=00000071008D6A10=00000098=true
_ZN2al14ByamlArrayIterC2Ev=00000071008D6AB0=00000008=false
_ZN2al14ByamlArrayIterC1EPKh=00000071008D6AC0=00000008=false
_ZNK2al14ByamlArrayIter7getSizeEv=00000071008D6AD0=00000010=false
_ZNK2al14ByamlArrayIter12getTypeTableEv=00000071008D6AE0=0000000C=false
_ZNK2al14ByamlArrayIter12getDataTableEv=00000071008D6AF0=00000020=false
_ZN2al14ByamlArrayIterC2Ev=00000071008D6AB0=00000008=true
_ZN2al14ByamlArrayIterC1EPKh=00000071008D6AC0=00000008=true
_ZNK2al14ByamlArrayIter7getSizeEv=00000071008D6AD0=00000010=true
_ZNK2al14ByamlArrayIter12getTypeTableEv=00000071008D6AE0=0000000C=true
_ZNK2al14ByamlArrayIter12getDataTableEv=00000071008D6AF0=00000020=true
_ZNK2al14ByamlArrayIter14getDataByIndexEPNS_9ByamlDataEi=00000071008D6B10=0000005C=false
_ZNK2al14ByamlArrayIter13getOffsetDataEj=00000071008D6B70=0000000C=false
_ZNK2al14ByamlArrayIter13getOffsetDataEj=00000071008D6B70=0000000C=true
_ZN16alByamlLocalUtil17getDataTypeStringEi=00000071008D6B80=000000B4=false
_ZN16alByamlLocalUtil11verifiByamlEPKh=00000071008D6C40=00000280=false
_ZN16alByamlLocalUtil17verifiByamlHeaderEPKh=00000071008D6EC0=0000002C=false

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "decompiled",
"message": "0.09%",
"message": "0.0908%",
"color": "blue"
}

View File

@ -0,0 +1,21 @@
#pragma once
#include <types.hpp>
namespace al {
class ByamlData;
class ByamlArrayIter {
public:
ByamlArrayIter();
ByamlArrayIter(const u8* );
u32 getSize() const;
const u8* getTypeTable() const;
const u32* getDataTable() const;
bool getDataByIndex(ByamlData *, s32) const;
const u8* getOffsetData(u32) const;
const u8* mData = nullptr; // 0x00
};
}

View File

@ -0,0 +1,25 @@
#include "Library/Yaml/ByamlArrayIter.hpp"
namespace al {
ByamlArrayIter::ByamlArrayIter() = default;
ByamlArrayIter::ByamlArrayIter(const u8* pData) : mData(pData) { }
u32 ByamlArrayIter::getSize() const {
return *reinterpret_cast<const u32*>(mData) >> 8;
}
const u8* ByamlArrayIter::getTypeTable() const {
return mData + 4;
}
const u32* ByamlArrayIter::getDataTable() const {
return reinterpret_cast<const u32*>(getOffsetData((getSize() + 3) & 0x1FFFFFC)) + 4;
}
// al::ByamlArrayIter::getDataByIndex
const u8* ByamlArrayIter::getOffsetData(u32 offs) const {
return &mData[offs];
}
};