Merge pull request #177 from jdflyer/master

Shiftability
This commit is contained in:
TakaRikka
2022-01-18 22:05:13 -08:00
committed by GitHub
56 changed files with 1886 additions and 1665 deletions
+68
View File
@@ -2,5 +2,73 @@
#define DYNAMICLINK_H
#include "dolphin/types.h"
#include "dolphin/os/OSLink.h"
#include "m_Do/m_Do_dvd_thread.h"
#include "JSystem/JKernel/JKRFileCache.h"
struct DynamicModuleControlBase {
/* 0x00 */u16 mLinkCount;
/* 0x02 */u16 mDoLinkCount;
/* 0x04 */DynamicModuleControlBase* mPrev;
/* 0x08 */DynamicModuleControlBase* mNext;
/* 0x0C */ /*vtable*/
/* 802621CC */ virtual ~DynamicModuleControlBase();
/* 800188DC */ virtual const char* getModuleName() const;
/* 80263210 */ virtual int getModuleSize() const;
/* 80263200 */ virtual const char* getModuleTypeString() const;
/* 80262470 */ virtual void dump();
/* 802631FC */ virtual void dump2();
/* 802631DC */ virtual bool do_load();
/* 802631F4 */ virtual bool do_load_async();
/* 802631E4 */ virtual bool do_unload();
/* 802631D4 */ virtual BOOL do_link();
/* 802631EC */ virtual bool do_unlink();
/* 80262284 */ DynamicModuleControlBase();
/* 802622D0 */ bool link();
/* 80262364 */ bool unlink();
/* 802623EC */ bool load_async();
/* 8026242C */ bool force_unlink();
static inline DynamicModuleControlBase* getFirstClass() {return mFirst;}
inline DynamicModuleControlBase* getNextClass() {return mNext;}
static DynamicModuleControlBase* mFirst;
static DynamicModuleControlBase* mLast;
};
struct DynamicModuleControl : DynamicModuleControlBase {
/* 800188E4 */ virtual ~DynamicModuleControl();
/* 80263218 */ virtual const char* getModuleName() const;
/* 80263000 */ virtual int getModuleSize() const;
/* 80263070 */ virtual const char* getModuleTypeString() const;
virtual void dump() = 0;
/* 80262C0C */ virtual void dump2();
/* 802627E8 */ virtual bool do_load();
/* 80262AFC */ virtual bool do_load_async();
/* 80262BC4 */ virtual bool do_unload();
/* 80262C5C */ virtual BOOL do_link();
/* 80262F28 */ virtual bool do_unlink();
/* 80262660 */ DynamicModuleControl(char const*);
/* 802626D0 */ static JKRArchive* mountCallback(void*);
/* 8026275C */ bool initialize();
/* 80262794 */ static void* callback(void*);
/* 0x10 */OSModuleInfo* mModule;
/* 0x14 */void* mBss;
/* 0x18 */u32 unk_24;
/* 0x1c */const char* mName;
/* 0x20 */u8 mResourceType;
/* 0x21 */u8 unk_33;
/* 0x22 */u16 mChecksum;
/* 0x24 */s32 mSize;
/* 0x28 */mDoDvdThd_callback_c* mAsyncLoadCallback;
static u32 sAllocBytes;
static JKRArchive* sArchive;
static JKRFileCache* sFileCache;
};
#endif /* DYNAMICLINK_H */
+4
View File
@@ -221,4 +221,8 @@ inline JKRHeap* JKRGetCurrentHeap() {
return JKRHeap::getCurrentHeap();
}
inline u32 JKRGetMemBlockSize(JKRHeap* heap,void* block) {
return JKRHeap::getSize(block,heap);
}
#endif /* JKRHEAP_H */
+7 -10
View File
@@ -126,15 +126,12 @@ private:
/* 0x10 */ JUTConsole* mDirectConsole;
}; // Size: 0x14
extern "C" {
void JUTSetReportConsole(JUTConsole*);
void JUTSetWarningConsole(JUTConsole*);
};
void JUTConsole_print_f_va_(JUTConsole*, const char*, va_list);
JUTConsole* JUTGetReportConsole();
JUTConsole* JUTGetWarningConsole();
void JUTReportConsole_f_va(const char*, va_list);
void JUTReportConsole_f(const char*, ...);
extern "C" void JUTConsole_print_f_va_(JUTConsole*, const char*, va_list);
extern "C" void JUTSetReportConsole(JUTConsole*);
extern "C" JUTConsole* JUTGetReportConsole();
extern "C" void JUTSetWarningConsole(JUTConsole*);
extern "C" JUTConsole* JUTGetWarningConsole();
extern "C" void JUTReportConsole_f_va(const char*, va_list);
extern "C" void JUTReportConsole_f(const char*, ...);
#endif /* JUTCONSOLE_H */
+10 -4
View File
@@ -6,7 +6,13 @@
class dDrawPath_c : public dDlst_base_c {
public:
struct line_class {};
struct line_class {
/* 0x00 */ u8 unk0;
/* 0x01 */ u8 unk1;
/* 0x02 */ u8 unk2;
/* 0x03 */ u8 unk3;
/* 0x04 */ u16* unk4;
};
struct poly_class {};
@@ -52,7 +58,7 @@ public:
virtual void isDrawPath() = 0;
virtual void preRenderingMap() = 0;
virtual void postRenderingMap() = 0;
virtual void getBackColor() const = 0;
virtual GXColor* getBackColor() const = 0;
};
class dRenderingFDAmap_c : public dRenderingMap_c {
@@ -65,8 +71,8 @@ public:
/* 8002ABF8 */ virtual ~dRenderingFDAmap_c();
/* 8003D188 */ virtual void preRenderingMap();
/* 8003D320 */ virtual void postRenderingMap();
/* 8003D68C */ virtual void getDecoLineColor(int, int);
/* 8003D6B8 */ virtual void getDecorationLineWidth(int);
/* 8003D68C */ virtual GXColor* getDecoLineColor(int, int);
/* 8003D6B8 */ virtual s32 getDecorationLineWidth(int);
private:
/* 0x04 */ int field_0x4;
+1 -1
View File
@@ -78,7 +78,7 @@ public:
/* 8003FF14 */ virtual void preDrawPath();
/* 8003FFC4 */ virtual void postDrawPath();
/* 800402C0 */ virtual void isDrawPath();
/* 8003FE4C */ virtual void getBackColor() const;
/* 8003FE4C */ virtual GXColor* getBackColor() const;
/* 800402E0 */ virtual bool getFirstDrawLayerNo();
/* 800402E8 */ virtual void getNextDrawLayerNo(int);
/* 800409E0 */ virtual void isDrawIconSingle(dTres_c::data_s const*, int, int, bool, bool,
+2 -2
View File
@@ -1,8 +1,8 @@
#ifndef D_SAVE_D_SAVE_H
#define D_SAVE_D_SAVE_H
#include "MSL_C.PPCEABI.bare.H/MSL_Common/src/printf.h"
#include "MSL_C.PPCEABI.bare.H/MSL_Common/src/string.h"
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/printf.h"
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/string.h"
#include "SSystem/SComponent/c_xyz.h"
#include "dolphin/types.h"
+4
View File
@@ -990,6 +990,10 @@ inline void GXPosition2u16(u16 x, u16 y) {
GFX_FIFO(u16) = y;
}
inline void GXPosition1x16(u16 x) {
GFX_FIFO(u16) = x;
}
inline void GXEnd() {}
};
+1
View File
@@ -9,6 +9,7 @@ typedef float Mtx[3][4];
typedef float Mtx33[3][3];
typedef float Mtx23[2][3];
typedef f32 (*MtxP)[4];
typedef const f32 (*CMtxP)[4]; //Change name later?
extern "C" {
void PSMTXIdentity(Mtx matrix);
+32 -26
View File
@@ -3,34 +3,40 @@
#include "dolphin/types.h"
struct OSModuleInfo {
u32 id;
OSModuleInfo* next;
OSModuleInfo* prev;
u32 num_sections;
u32 section_info_offset;
u32 name_offset;
u32 name_size;
u32 version;
u32 bss_size;
u32 rel_offset;
u32 imp_offset;
u32 imp_size;
u8 prolog_section;
u8 epilog_section;
u8 unresolved_section;
u8 bss_section;
u32 prolog;
u32 epilog;
u32 unresolved;
u32 align;
u32 bss_align;
u32 fix_size;
struct OSSectionInfo {
u32 mOffset;
u32 mSize;
};
struct OSSectionInfo {
u32 offset;
u32 size;
struct OSModuleInfo {
u32 mId;
OSModuleInfo* mNext;
OSModuleInfo* mPrev;
u32 mNumSections;
struct { //Needed to get an assert correct; very likely bigger
u32 sectionInfoOffset;
} info;
u32 mModuleNameOffset;
u32 mModuleNameSize;
u32 mModuleVersion;
u32 mBssSize;
u32 mRelocationTableOffset;
u32 mImportTableOffset;
u32 mImportTableSize;
u8 mPrologSection;
u8 mEpilogSection;
u8 mUnresolvedSection;
u8 mBssSection;
u32 (*prolog)();
void(*epilog)();
u32 mUnresolvedFuncOffset;
u32 mModuleAlignment;
u32 mBssAlignment;
u32 fixSize;
};
extern "C" BOOL OSLink(OSModuleInfo*);
extern "C" BOOL OSLinkFixed(OSModuleInfo*,u32);
extern "C" BOOL OSUnlink(OSModuleInfo*);
#endif /* OSLINK_H */
+2
View File
@@ -16,6 +16,8 @@ public:
public:
/* 800158FC */ virtual ~mDoDvdThd_command_c();
/* 80015B74 */ mDoDvdThd_command_c();
inline s32 sync() {return mIsDone;}
inline void destroy() {delete this;}
virtual s32 execute() = 0;
}; // Size = 0x14
+3 -3
View File
@@ -1,8 +1,8 @@
#ifndef M_DO_M_DO_MTX_H
#define M_DO_M_DO_MTX_H
#include "SSystem/SComponent/c_Xyz.h"
#include "SSystem/SComponent/c_sXyz.h"
#include "SSystem/SComponent/c_xyz.h"
#include "SSystem/SComponent/c_sxyz.h"
#include "dolphin/mtx/mtx.h"
#include "dolphin/mtx/quat.h"
#include "dolphin/types.h"
@@ -15,7 +15,7 @@ void mDoMtx_ZrotS(Mtx, s16);
void mDoMtx_YrotS(Mtx, s16);
void mDoMtx_XrotS(Mtx, s16);
void mDoMtx_YrotM(Mtx, s16);
void mDoMtx_MtxToRot(MtxP, csXyz*);
void mDoMtx_MtxToRot(CMtxP, csXyz*);
class mDoMtx_stack_c {
public: