mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
Types and functions for JKRThread, JKRFile, JKRDvdFile, JKRFileCache... (#17)
* Added JSUListIterator and decompiled JKRHeap::dispose_subroutine * JKRDisposer! * only 4 functions not OK in JKRHeap * JKRThread asm functions * more JKRThread * JKRThreadSwitch * JKRThread::JKRThread * More JKRTHread functions and vtable * fixed bad merge * update JKRThread and JKRThreadSwitch to use new virtual inheritance * save before asmsplit.py script * JKRFile * JKRDvdFile * JKRFileCache * JKRFileFinder * JKRFileLoader * JKRAssertHeap * JKRExpHeap * JKRSolidHeap * fixed type and functions definitions * JKRArchive (Pub) * missed file * JKRArchive * forgot obj_files.mk * fixed merge error and class members * class members * removed unused asm files * added names to global variables * class members for JKRHeap, JKRExpHeap, JKRSolidHeap, and JKRFileCache.
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
#ifndef __JKRTHREAD_H__
|
||||
#define __JKRTHREAD_H__
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "JSystem/JKernel/JKRDisposer/JKRDisposer.h"
|
||||
|
||||
struct OSThread {
|
||||
u8 unkn[0x318];
|
||||
};
|
||||
|
||||
struct OSMessageQueue {
|
||||
u8 unkn[0x20];
|
||||
};
|
||||
|
||||
typedef void* OSMessage;
|
||||
|
||||
class JKRThread;
|
||||
extern JSUList<JKRThread> lbl_8043428C; // JSUList<JKRThread> JKRThread::sThreadList
|
||||
|
||||
class JKRThreadName_;
|
||||
class JUTConsole;
|
||||
class JKRHeap;
|
||||
class JKRThread : JKRDisposer {
|
||||
public:
|
||||
JKRThread(u32 stack_size, int message_count, int param_3);
|
||||
JKRThread(JKRHeap* heap, u32 stack_size, int message_count, int param_4);
|
||||
JKRThread(OSThread* thread, int message_count);
|
||||
virtual ~JKRThread();
|
||||
|
||||
void setCommon_mesgQueue(JKRHeap* heap, int message_count);
|
||||
void setCommon_heapSpecified(JKRHeap* heap, u32 stack_size, int param_3);
|
||||
|
||||
OSThread* getThreadRecord() {
|
||||
return this->mOsThread;
|
||||
}
|
||||
|
||||
static void* start(void* param_1);
|
||||
static JKRThread* searchThread(OSThread* thread);
|
||||
static JSUList<JKRThread>* getList() {
|
||||
return &lbl_8043428C;
|
||||
}
|
||||
|
||||
virtual void* run();
|
||||
|
||||
public:
|
||||
JSULink<JKRThread> mThreadListLink;
|
||||
JKRHeap* mHeap;
|
||||
OSThread* mOsThread;
|
||||
OSMessageQueue mQueue;
|
||||
OSMessage* mMessages;
|
||||
int mMessageCount;
|
||||
void* mStackPtr;
|
||||
u32 mStackSize;
|
||||
u8 field_0x60;
|
||||
u8 padding_0x61[3];
|
||||
u32 mCost;
|
||||
u32 mSwitchCount;
|
||||
u32 field_0x6c;
|
||||
u32 field_0x70;
|
||||
JKRHeap* field_0x74;
|
||||
JKRHeap* field_0x78;
|
||||
};
|
||||
|
||||
class JKRThreadSwitch {
|
||||
public:
|
||||
JKRThreadSwitch(JKRHeap*);
|
||||
virtual ~JKRThreadSwitch();
|
||||
|
||||
static JKRThreadSwitch* createManager(JKRHeap* heap);
|
||||
|
||||
JKRThread* enter(JKRThread* param_1, int param_2);
|
||||
static void callback(OSThread* param_1, OSThread* param_2);
|
||||
void draw(JKRThreadName_* param_1, JUTConsole* param_2);
|
||||
void draw(JKRThreadName_* param_1);
|
||||
|
||||
public:
|
||||
JKRHeap* heap;
|
||||
u8 field_0x8[4];
|
||||
u32 field_0xC[2];
|
||||
u8 field_0x14[4];
|
||||
u32 field_0x18;
|
||||
u32 field_0x1C;
|
||||
u32 field_0x20;
|
||||
u32 field_0x24;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user