From a72e4e4bbfcabe0d2d961fe61d6c2d14ec88b826 Mon Sep 17 00:00:00 2001 From: Sean Miller Date: Tue, 14 Apr 2026 14:51:17 +0100 Subject: Rename eggUnk.cpp to eggThreadMonitor.cpp --- include/egg/core/eggThreadMonitor.h | 65 +++++++++++++++++++++++++++++++++++++ include/egg/core/eggUnk.h | 65 ------------------------------------- 2 files changed, 65 insertions(+), 65 deletions(-) create mode 100644 include/egg/core/eggThreadMonitor.h delete mode 100644 include/egg/core/eggUnk.h (limited to 'include') diff --git a/include/egg/core/eggThreadMonitor.h b/include/egg/core/eggThreadMonitor.h new file mode 100644 index 00000000..4d2eaaa4 --- /dev/null +++ b/include/egg/core/eggThreadMonitor.h @@ -0,0 +1,65 @@ +#ifndef EGG_UNK_H +#define EGG_UNK_H + +#include "common.h" + +#include "rvl/OS.h" // IWYU pragma: export + +// This is seen in Animal Crossing: City Folk also. Idk where it belongs + +// Seen between EGG::Thread and EGG::ConfigurationData (eggThread and eggSystem) +// dSysNandThread (or NandRequestThread ) inherits from eggThread, +// with part of that thread referencing tsome of these funcs + +namespace EGG { + +// Color? Tag? +struct UnknownStruct { + u8 _00; + u8 _01; + u8 _02; + u8 _03; +}; + +struct ThreadInfo { + OSThread *mThread; + UnknownStruct _04; + bool _08; + char _09[32]; // Buffer for name? + u32 _2C; +}; + +// This is a complete guess +class ThreadMonitor { +public: + void registerThread(OSThread *thread, UnknownStruct); + + static ThreadMonitor *getInstance() { + return sInstance; + } + +private: + s32 getThreadIndex(OSThread *thread); + s32 doRegisterThread(OSThread *thread); + void sortByPriority(); + +private: + u8 _placeholder_00[0x8]; + /* 0x08 */ s32 mMaxThreads; + u8 _placeholder_0C[0x3C - 0xC]; + /* 0x3C */ ThreadInfo *mThreadList; + u8 _placeholder_40[0x44 - 0x40]; + /* 0x44 */ s32 mThreadCount; + u8 _placeholder_48[0xEC - 0x48]; + /* 0xEC */ UnknownStruct _EC; // Default color/tag? + u8 _placeholder_F0[0xF4 - 0xF0]; + /* 0xF4 */ u32 _F4; + /* 0xF8 */ bool mSortEnabled; + // size unsure, but this is the limit seen + + static ThreadMonitor *sInstance; +}; + +} // namespace EGG + +#endif diff --git a/include/egg/core/eggUnk.h b/include/egg/core/eggUnk.h deleted file mode 100644 index 4d2eaaa4..00000000 --- a/include/egg/core/eggUnk.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef EGG_UNK_H -#define EGG_UNK_H - -#include "common.h" - -#include "rvl/OS.h" // IWYU pragma: export - -// This is seen in Animal Crossing: City Folk also. Idk where it belongs - -// Seen between EGG::Thread and EGG::ConfigurationData (eggThread and eggSystem) -// dSysNandThread (or NandRequestThread ) inherits from eggThread, -// with part of that thread referencing tsome of these funcs - -namespace EGG { - -// Color? Tag? -struct UnknownStruct { - u8 _00; - u8 _01; - u8 _02; - u8 _03; -}; - -struct ThreadInfo { - OSThread *mThread; - UnknownStruct _04; - bool _08; - char _09[32]; // Buffer for name? - u32 _2C; -}; - -// This is a complete guess -class ThreadMonitor { -public: - void registerThread(OSThread *thread, UnknownStruct); - - static ThreadMonitor *getInstance() { - return sInstance; - } - -private: - s32 getThreadIndex(OSThread *thread); - s32 doRegisterThread(OSThread *thread); - void sortByPriority(); - -private: - u8 _placeholder_00[0x8]; - /* 0x08 */ s32 mMaxThreads; - u8 _placeholder_0C[0x3C - 0xC]; - /* 0x3C */ ThreadInfo *mThreadList; - u8 _placeholder_40[0x44 - 0x40]; - /* 0x44 */ s32 mThreadCount; - u8 _placeholder_48[0xEC - 0x48]; - /* 0xEC */ UnknownStruct _EC; // Default color/tag? - u8 _placeholder_F0[0xF4 - 0xF0]; - /* 0xF4 */ u32 _F4; - /* 0xF8 */ bool mSortEnabled; - // size unsure, but this is the limit seen - - static ThreadMonitor *sInstance; -}; - -} // namespace EGG - -#endif -- cgit v1.2.3