diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2022-01-25 12:24:14 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-25 21:24:14 +0100 |
| commit | 612f26c132280da43ecfa5fa8c8cc32966f06eb6 (patch) | |
| tree | ac20d071712cf830ec526222c98d340d90721f77 /include/m_Do | |
| parent | 6f4d068f1d7c5a9f25f1920e64e5b10dc29aea07 (diff) | |
d_kankyo_wether / d_eye_hl (#178)
* d_eye_hl / d_kankyo_wether wip
* more d_kankyo_wether + format
* remove asm
* some d_kankyo wip
* fix dccs vtable
* some m_Do_graphic / d_meter2_draw work
Diffstat (limited to 'include/m_Do')
| -rw-r--r-- | include/m_Do/m_Do_audio.h | 12 | ||||
| -rw-r--r-- | include/m_Do/m_Do_controller_pad.h | 2 | ||||
| -rw-r--r-- | include/m_Do/m_Do_dvd_thread.h | 4 | ||||
| -rw-r--r-- | include/m_Do/m_Do_ext.h | 15 | ||||
| -rw-r--r-- | include/m_Do/m_Do_graphic.h | 50 | ||||
| -rw-r--r-- | include/m_Do/m_Do_machine.h | 7 | ||||
| -rw-r--r-- | include/m_Do/m_Do_mtx.h | 6 |
7 files changed, 73 insertions, 23 deletions
diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h index aebbcd2b20..9def12106e 100644 --- a/include/m_Do/m_Do_audio.h +++ b/include/m_Do/m_Do_audio.h @@ -35,4 +35,16 @@ inline void mDoAud_bgmSetSwordUsing(s32 id) { Z2AudioMgr::getInterface()->mSeqMgr.bgmSetSwordUsing(id); } +inline void mDoAud_setHour(s32 hour) { + Z2AudioMgr::getInterface()->mStatusMgr.setHour(hour); +} + +inline void mDoAud_setMinute(s32 min) { + Z2AudioMgr::getInterface()->mStatusMgr.setMinute(min); +} + +inline void mDoAud_setWeekday(s32 day) { + Z2AudioMgr::getInterface()->mStatusMgr.setWeekday(day); +} + #endif /* M_DO_M_DO_AUDIO_H */ diff --git a/include/m_Do/m_Do_controller_pad.h b/include/m_Do/m_Do_controller_pad.h index d35d6852c9..f95e8a05a4 100644 --- a/include/m_Do/m_Do_controller_pad.h +++ b/include/m_Do/m_Do_controller_pad.h @@ -8,6 +8,7 @@ class mDoCPd_c { public: + // Controller Ports 1 - 4 enum { PAD_0, PAD_1, PAD_2, PAD_3 }; static void create(); @@ -57,6 +58,7 @@ public: static s16 getSubStickAngle(u32 pad) { return getCpadInfo(pad).mCStickAngle; } static f32 getAnalogR(u32 pad) { return getCpadInfo(pad).mTriggerRight; } static f32 getAnalogL(u32 pad) { return getCpadInfo(pad).mTriggerLeft; } + static BOOL isConnect(u32 pad) { return JUTGamePad::getPortStatus(pad) == 0; } static JUTGamePad* m_gamePad[4]; static interface_of_controller_pad m_cpadInfo[4]; diff --git a/include/m_Do/m_Do_dvd_thread.h b/include/m_Do/m_Do_dvd_thread.h index 39dc87c492..8d8097ad98 100644 --- a/include/m_Do/m_Do_dvd_thread.h +++ b/include/m_Do/m_Do_dvd_thread.h @@ -16,8 +16,8 @@ public: public: /* 800158FC */ virtual ~mDoDvdThd_command_c(); /* 80015B74 */ mDoDvdThd_command_c(); - inline s32 sync() {return mIsDone;} - inline void destroy() {delete this;} + inline s32 sync() { return mIsDone; } + inline void destroy() { delete this; } virtual s32 execute() = 0; }; // Size = 0x14 diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index 3755eddd10..e1a927cdc8 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -14,6 +14,9 @@ public: /* 8000D320 */ void initPlay(s16, int, f32, s16, s16); /* 8000D428 */ void play(); + void setPlaySpeed(f32 speed) { mFrameCtrl.setRate(speed); } + f32 getFrame() { return mFrameCtrl.getFrame(); } + private: /* 0x0 */ J3DFrameCtrl mFrameCtrl; }; // Size: 0x14 @@ -33,6 +36,13 @@ public: /* 8000D63C */ void init(J3DMaterialTable*, J3DAnmTextureSRTKey*, int, int, f32, s16, s16); /* 8000D6D8 */ void entry(J3DMaterialTable*, f32); + void entry(J3DModelData* data) { entry(data, getFrame()); } + void entry(J3DModelData* data, f32 frame) { entry(&data->getMaterialTable(), frame); } + void init(J3DModelData* data, J3DAnmTextureSRTKey* key, int param_2, int param_3, f32 param_4, + s16 param_5, s16 param_6) { + init(&data->getMaterialTable(), key, param_2, param_3, param_4, param_5, param_6); + } + private: /* 0x14 */ u32 mBtkAnm; }; // Size: 0x18 @@ -177,6 +187,11 @@ JKRSolidHeap* mDoExt_createSolidHeapFromGameToCurrent(u32, u32); JKRSolidHeap* mDoExt_createSolidHeapFromGameToCurrent(JKRHeap**, u32, u32); JKRHeap* mDoExt_getCurrentHeap(); void mDoExt_removeMesgFont(); +void mDoExt_modelUpdateDL(J3DModel*); +J3DModel* mDoExt_J3DModel__create(J3DModelData*, u32, u32); + +struct JUTFont; +JUTFont* mDoExt_getMesgFont(); extern JKRExpHeap* zeldaHeap; extern JKRExpHeap* gameHeap; diff --git a/include/m_Do/m_Do_graphic.h b/include/m_Do/m_Do_graphic.h index c5048a9af5..49ac6fb6e3 100644 --- a/include/m_Do/m_Do_graphic.h +++ b/include/m_Do/m_Do_graphic.h @@ -6,42 +6,54 @@ #include "dolphin/gx/GX.h" #include "dolphin/types.h" -void mDoGph_Create(); +int mDoGph_Create(); +struct ResTIMG; class mDoGph_gInf_c { public: class bloom_c { public: + // bloom_c() { m_buffer = NULL; } matches sinit /* 80009544 */ void create(); /* 800095F8 */ void remove(); /* 80009650 */ void draw(); + + /* 0x00 */ GXColor mBlendColor; + /* 0x04 */ GXColor mMonoColor; + /* 0x08 */ u8 mEnable; + /* 0x09 */ u8 mMode; + /* 0x0A */ u8 mPoint; + /* 0x0B */ u8 mBlureSize; + /* 0x0C */ u8 mBlureRatio; + /* 0x10 */ void* m_buffer; }; - /* 80007E44 */ void create(); - /* 80007F90 */ void beginRender(); - /* 800080D0 */ void fadeOut(f32); - /* 80007FD8 */ void fadeOut(f32, _GXColor&); - /* 80008028 */ void fadeOut_f(f32, _GXColor&); - /* 800080A0 */ void onBlure(f32 const (*)[4]); - /* 80008078 */ void onBlure(); - /* 80008330 */ void calcFade(); + /* 80007E44 */ static void create(); + /* 80007F90 */ static void beginRender(); + /* 800080D0 */ static void fadeOut(f32); + /* 80007FD8 */ static void fadeOut(f32, _GXColor&); + /* 80008028 */ static void fadeOut_f(f32, _GXColor&); + /* 800080A0 */ static void onBlure(const Mtx); + /* 80008078 */ static void onBlure(); + /* 80008330 */ static void calcFade(); static JUTFader* getFader() { return mFader; } static int startFadeOut(int param_0) { return JFWDisplay::getManager()->startFadeOut(param_0); } static int startFadeIn(int param_0) { return JFWDisplay::getManager()->startFadeIn(param_0); } static void setFadeColor(JUtility::TColor color) { mFader->setColor(color); } + static void endFrame() { JFWDisplay::getManager()->endFrame(); } - static u8 mFrameBufferTexObj[32]; - static u8 mZbufferTexObj[32]; - static u8 m_bloom[20]; - static u8 mBlureMtx[48 + 4 /* padding */]; - static u8 mBackColor[4]; - static u8 mFadeColor[4]; + static GXTexObj mFrameBufferTexObj; + static GXTexObj mZbufferTexObj; + static bloom_c m_bloom; + static Mtx mBlureMtx; + static GXColor mBackColor; + static GXColor mFadeColor; static JUTFader* mFader; - static u8 mFrameBufferTimg[4]; - static u8 mFrameBufferTex[4]; - static u8 mZbufferTimg[4]; - static u8 mZbufferTex[4]; + static ResTIMG* mFrameBufferTimg; + static void* mFrameBufferTex; + static ResTIMG* mZbufferTimg; + static void* mZbufferTex; static f32 mFadeRate; static f32 mFadeSpeed; }; diff --git a/include/m_Do/m_Do_machine.h b/include/m_Do/m_Do_machine.h index 806c14ca0e..4a54d8b5de 100644 --- a/include/m_Do/m_Do_machine.h +++ b/include/m_Do/m_Do_machine.h @@ -15,4 +15,11 @@ void exceptionRestart(); void myExceptionCallback(u16, OSContext*, u32, u32); void my_SysPrintHeap(char const*, void*, u32); +class mDoMch_render_c { +public: + static GXRenderModeObj* getRenderModeObj() { return mRenderModeObj; } + + static GXRenderModeObj* mRenderModeObj; +}; + #endif /* M_DO_M_DO_MACHINE_H */ diff --git a/include/m_Do/m_Do_mtx.h b/include/m_Do/m_Do_mtx.h index 22ebf7c826..6dea80b75c 100644 --- a/include/m_Do/m_Do_mtx.h +++ b/include/m_Do/m_Do_mtx.h @@ -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 "dolphin/mtx/mtx.h" #include "dolphin/mtx/quat.h" #include "dolphin/types.h" @@ -34,7 +34,7 @@ public: /* 8000CF7C */ static void quatM(Quaternion const*); /* 8000D070 */ ~mDoMtx_stack_c(); // inline - static Mtx* get() { return &now; } + static MtxP get() { return now; } static void transS(f32 x, f32 y, f32 z) { PSMTXTrans(now, x, y, z); } static void scaleS(f32 x, f32 y, f32 z) { PSMTXScale(now, x, y, z); } static void XYZrotS(s16 x, s16 y, s16 z) { mDoMtx_XYZrotS(now, x, y, z); } @@ -49,6 +49,8 @@ public: static Mtx* end; }; +extern Mtx g_mDoMtx_identity; + class mDoMtx_quatStack_c { public: ~mDoMtx_quatStack_c(); // inline |
