refactor: Simplify FriendRegistry (#42)

This commit is contained in:
Yimura 2022-10-06 11:50:28 +01:00 committed by GitHub
parent 36a7681d8b
commit 6fe9355e1a

View File

@ -4,20 +4,18 @@
#include <cstdint>
class FriendList
{
public:
class FriendInfo m_data[250]; //0x0000
}; //Size: 0x17700
static_assert(sizeof(FriendList) == 0x17700);
#pragma pack(push, 4)
class FriendRegistry
{
public:
uint32_t m_friend_count; //0x0000
char pad_0004[8]; //0x0004
class FriendList *m_friends_list; //0x000C
FriendInfo (*m_friends)[250]; //0x000C
inline FriendInfo* get(std::uint32_t idx)
{
return &(*m_friends)[idx];
}
}; //Size: 0x0014
static_assert(sizeof(FriendRegistry) == 0x14);
#pragma pack(pop)