mirror of
https://github.com/zeldaret/ss
synced 2026-09-10 11:55:29 -04:00
Merge pull request #308 from bgsamm/d_state
Matches for d_state.cpp, m_state.cpp, m_thread.cpp, eggSystem.cpp, and eggUnk.cpp
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
|
||||
namespace dMain {
|
||||
|
||||
bool isStopFlagSet(u32 val);
|
||||
void setStopFlag(u32 val);
|
||||
void clearStopFlag(u32 val);
|
||||
|
||||
void Create();
|
||||
void Execute();
|
||||
void *main01(void *arg);
|
||||
|
||||
+1
-1
@@ -8,6 +8,6 @@ void fn_80062E50();
|
||||
void fn_80062EB0();
|
||||
bool fn_80062EC0();
|
||||
|
||||
}
|
||||
} // namespace dState
|
||||
|
||||
#endif // D_STATE_H
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef EGG_PERF_H
|
||||
#define EGG_PERF_H
|
||||
|
||||
#include "egg/core/eggThread.h"
|
||||
|
||||
namespace EGG {
|
||||
|
||||
class PerformanceView {
|
||||
public:
|
||||
// vtable at 0x0
|
||||
/* 0x08 */ virtual void measureBeginFrame() = 0;
|
||||
/* 0x0C */ virtual void measureEndFrame() = 0;
|
||||
/* 0x10 */ virtual void measureBeginRender() = 0;
|
||||
/* 0x14 */ virtual void measureEndRender() = 0;
|
||||
/* 0x18 */ virtual void callbackDrawSync(u16 token) = 0;
|
||||
/* 0x1C */ virtual void unused() = 0;
|
||||
/* 0x20 */ virtual void draw() = 0;
|
||||
/* 0x24 */ virtual void setVisible(bool visible) = 0;
|
||||
/* 0x28 */ virtual bool isVisible() = 0;
|
||||
};
|
||||
|
||||
}; // namespace EGG
|
||||
|
||||
#endif // EGG_PERF_H
|
||||
@@ -1,14 +1,13 @@
|
||||
#ifndef EGG_PROCESS_METER_H
|
||||
#define EGG_PROCESS_METER_H
|
||||
|
||||
#include "egg/core/eggPerf.h"
|
||||
#include "egg/core/eggThread.h"
|
||||
|
||||
namespace EGG {
|
||||
|
||||
class PerformanceView {};
|
||||
|
||||
class ProcessMeter : public Thread, public PerformanceView {};
|
||||
|
||||
};
|
||||
}; // namespace EGG
|
||||
|
||||
#endif // EGG_PROCESS_METER_H
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef EGG_SCENE_MANAGER_H
|
||||
#define EGG_SCENE_MANAGER_H
|
||||
|
||||
namespace EGG {
|
||||
|
||||
class SceneManager {
|
||||
public:
|
||||
// vtable at 0x0
|
||||
/* 0x08 */ virtual void calc();
|
||||
/* 0x0C */ virtual void draw();
|
||||
/* 0x10 */ virtual void calcCurrentScene();
|
||||
/* 0x14 */ virtual void calcCurrentFader();
|
||||
/* 0x18 */ virtual void drawCurrentScene();
|
||||
/* 0x1C */ virtual void drawCurrentFader();
|
||||
/* 0x20 */ virtual void createDefaultFader();
|
||||
};
|
||||
|
||||
} // namespace EGG
|
||||
|
||||
#endif // EGG_SCENE_MANAGER_H
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "common.h"
|
||||
#include "egg/core/eggVideo.h"
|
||||
|
||||
struct OSBootInfo;
|
||||
|
||||
namespace EGG {
|
||||
|
||||
class Display;
|
||||
@@ -35,18 +37,18 @@ public:
|
||||
/* vt 0x38 */ virtual void initialize() = 0;
|
||||
|
||||
public:
|
||||
/* 0x04 */ u32 mRoot1HeapStart;
|
||||
/* 0x08 */ u32 mRoot1HeapEnd;
|
||||
/* 0x0C */ u32 mRoot2HeapStart;
|
||||
/* 0x10 */ u32 mRoot2HeapEnd;
|
||||
/* 0x04 */ void *mRoot1HeapStart;
|
||||
/* 0x08 */ void *mRoot1HeapEnd;
|
||||
/* 0x0C */ void *mRoot2HeapStart;
|
||||
/* 0x10 */ void *mRoot2HeapEnd;
|
||||
/* 0x14 */ u32 mMemSize;
|
||||
/* 0x18 */ Heap *mRootHeapMem1;
|
||||
/* 0x1C */ Heap *mRootHeapMem2;
|
||||
/* 0x20 */ Heap *mRootHeapDebug;
|
||||
/* 0x24 */ Heap *mSystemHeap;
|
||||
/* 0x28 */ Thread *mSystemThread;
|
||||
/* 0x2C */ u32 field_0x2C;
|
||||
/* 0x30 */ u32 mSystemHeapStart;
|
||||
/* 0x2C */ OSBootInfo *mBootInfo;
|
||||
/* 0x30 */ void *mSystemHeapStart;
|
||||
/* 0x34 */ u32 mSystemHeapSize;
|
||||
};
|
||||
class BaseSystem {
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
#ifndef EGG_THREAD_MGR_H
|
||||
#define EGG_THREAD_MGR_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 ThreadMgr {
|
||||
public:
|
||||
void registerThread(OSThread *thread, UnknownStruct);
|
||||
|
||||
static ThreadMgr *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 ThreadMgr *sInstance;
|
||||
};
|
||||
|
||||
} // namespace EGG
|
||||
|
||||
#endif // EGG_THREAD_MGR_H
|
||||
@@ -1,25 +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 {
|
||||
class Unknown {
|
||||
public:
|
||||
u8 _[0xfC - 0x00]; // size unsure, but this is the limit seen
|
||||
void fn_80496de0(OSThread *);
|
||||
void fn_80496e30(OSThread *);
|
||||
void fn_80496f10();
|
||||
void fn_804970e0(OSThread *, u8 *);
|
||||
};
|
||||
} // namespace EGG
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef M3D_M_STATE_H
|
||||
#define M3D_M_STATE_H
|
||||
|
||||
namespace m3d {
|
||||
|
||||
namespace mState {
|
||||
|
||||
void unkStub1();
|
||||
void unkStub2();
|
||||
void unkStub3();
|
||||
bool unkAlwaysTrue();
|
||||
|
||||
} // namespace mState
|
||||
|
||||
} // namespace m3d
|
||||
|
||||
#endif // M3D_M_STATE_H
|
||||
@@ -3,4 +3,12 @@
|
||||
|
||||
// This file is a complete guess
|
||||
|
||||
struct OSThread;
|
||||
|
||||
namespace mThread {
|
||||
|
||||
void registerThread(OSThread *thread, void *threadArg);
|
||||
|
||||
} // namespace mThread
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user