copy dolsdk2004 to tp / b_bh + e_mb done (#2299)

* move dolsdk2004 over

* cleanup some temp work

* finish and cleanup gf

* b_bh done

* d_a_e_mb done
This commit is contained in:
TakaRikka
2025-02-10 11:20:42 -08:00
committed by GitHub
parent a38e2bfeee
commit eda175afc8
540 changed files with 68042 additions and 22075 deletions
+2 -2
View File
@@ -451,7 +451,7 @@ int daAlink_c::jointControll(int param_0) {
mDoMtx_stack_c::inverse();
cMtx_concat(temp_r26, mDoMtx_stack_c::get(), J3DSys::mCurrentMtx);
MTXQuat(temp_r26, (PSQuaternion*)spC);
MTXQuat(temp_r26, spC);
temp_r26[0][3] = var_r25->mTranslate.x;
temp_r26[1][3] = var_r25->mTranslate.y;
@@ -478,7 +478,7 @@ void daAlink_c::setUpperFront() {
Quaternion sp8;
JMAEulerToQuat(sp18.mRotation.x, sp18.mRotation.y, sp18.mRotation.z, &sp8);
MTXQuat(temp_r28, (PSQuaternion*)&sp8);
MTXQuat(temp_r28, &sp8);
cMtx_concat(mpLinkModel->getBaseTRMtx(), temp_r28, J3DSys::mCurrentMtx);
J3DSys::mCurrentMtx[0][3] = mRootMtx[0][3];
+1 -1
View File
@@ -1857,7 +1857,7 @@ void daAlink_blur_c::draw() {
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV);
GXLoadPosMtxImm(j3dSys.getViewMtx(), GX_PNMTX0);
GXSetCurrentMtx(0);
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA, GX_LO_SET);
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_SET);
GXSetCullMode(GX_CULL_NONE);
GXSetZMode(GX_ENABLE, GX_LEQUAL, GX_DISABLE);
GXSetAlphaCompare(GX_GREATER, 0, GX_AOP_OR, GX_GREATER, 0);
+1575 -1162
View File
File diff suppressed because it is too large Load Diff
+744 -1003
View File
File diff suppressed because it is too large Load Diff
-4
View File
@@ -65,8 +65,6 @@ struct dPa_levelEcallBack {};
struct csXyz {};
struct _GXColor {};
struct dPa_control_c {
/* 8004CA90 */ void set(u8, u16, cXyz const*, dKy_tevstr_c const*, csXyz const*, cXyz const*,
u8, dPa_levelEcallBack*, s8, _GXColor const*, _GXColor const*,
@@ -144,8 +142,6 @@ struct cBgS {
/* 800744A0 */ void GroundCross(cBgS_GndChk*);
};
struct _GXTexObj {};
struct LIGHT_INFLUENCE {};
struct J3DUClipper {
+1
View File
@@ -10,6 +10,7 @@
#include "dol2asm.h"
#include "m_Do/m_Do_lib.h"
#include "string.h"
#include <dolphin/gd.h>
//
// Forward References:
+1 -1
View File
@@ -456,7 +456,7 @@ int daHorse_c::modelCallBack(int i_jntNo) {
MtxP m = m_model->getAnmMtx(i_jntNo);
cMtx_concat(m, mDoMtx_stack_c::get(), J3DSys::mCurrentMtx);
MTXQuat(m, (PSQuaternion*)&sp20);
MTXQuat(m, &sp20);
m[0][3] = var_r27->mTranslate.x;
m[1][3] = var_r27->mTranslate.y;
m[2][3] = var_r27->mTranslate.z;
+1 -1
View File
@@ -98,7 +98,7 @@ void dMirror_packet_c::mirrorZdraw(f32* param_0, f32* param_1, f32 param_2, f32
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_A0);
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GXSetZCompLoc(GX_TRUE);
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA, GX_LO_OR);
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_OR);
GXSetAlphaCompare(GX_GREATER, 0, GX_AOP_OR, GX_GREATER, 0);
GXSetFog(GX_FOG_NONE, 0.0f, 0.0f, 0.0f, 0.0f, g_clearColor);
GXSetFogRangeAdj(0, 0, NULL);
+10 -10
View File
@@ -2735,7 +2735,7 @@ static BOOL daMP_VideoDecodeThreadCreated;
/* 80875B18-80875BC8 003438 00B0+00 1/1 0/0 0/0 .text daMP_CreateReadThread__Fl */
static BOOL daMP_CreateReadThread(s32 param_0) {
// NONMATCHING
if (!OSCreateThread(&daMP_ReadThread, daMP_Reader, 0, daMP_ReadThreadStack + sizeof(daMP_ReadThreadStack), sizeof(daMP_ReadThreadStack), param_0, 1)) {
if (!OSCreateThread(&daMP_ReadThread, (void*(*)(void*))daMP_Reader, 0, daMP_ReadThreadStack + sizeof(daMP_ReadThreadStack), sizeof(daMP_ReadThreadStack), param_0, 1)) {
OSReport("Can't create read thread\n");
return 0;
}
@@ -2817,12 +2817,12 @@ static void daMP_VideoDecoderForOnMemory(void* param_0) {
*/
static int daMP_CreateVideoDecodeThread(s32 param_0, u8* param_1) {
if (param_1 != NULL) {
if (!OSCreateThread(&daMP_VideoDecodeThread, daMP_VideoDecoderForOnMemory, param_1, daMP_VideoDecodeThreadStack + sizeof(daMP_VideoDecodeThreadStack), sizeof(daMP_VideoDecodeThreadStack), param_0, 1)) {
if (!OSCreateThread(&daMP_VideoDecodeThread, (void*(*)(void*))daMP_VideoDecoderForOnMemory, param_1, daMP_VideoDecodeThreadStack + sizeof(daMP_VideoDecodeThreadStack), sizeof(daMP_VideoDecodeThreadStack), param_0, 1)) {
OSReport("Can't create video decode thread\n");
return 0;
}
} else {
if (!OSCreateThread(&daMP_VideoDecodeThread, daMP_VideoDecoder, NULL, daMP_VideoDecodeThreadStack + sizeof(daMP_VideoDecodeThreadStack), sizeof(daMP_VideoDecodeThreadStack), param_0, 1)) {
if (!OSCreateThread(&daMP_VideoDecodeThread, (void*(*)(void*))daMP_VideoDecoder, NULL, daMP_VideoDecodeThreadStack + sizeof(daMP_VideoDecodeThreadStack), sizeof(daMP_VideoDecodeThreadStack), param_0, 1)) {
OSReport("Can't create video decode thread\n");
return 0;
}
@@ -2924,11 +2924,11 @@ static OSMessage daMP_DecodedAudioBufferMessage[3];
*/
static int daMP_CreateAudioDecodeThread(s32 param_0, u8* param_1) {
if (param_1 != NULL) {
if (!OSCreateThread(&daMP_AudioDecodeThread, daMP_AudioDecoderForOnMemory, param_1, daMP_AudioDecodeThreadStack + sizeof(daMP_AudioDecodeThreadStack), sizeof(daMP_AudioDecodeThreadStack), param_0, 1)) {
if (!OSCreateThread(&daMP_AudioDecodeThread, (void*(*)(void*))daMP_AudioDecoderForOnMemory, param_1, daMP_AudioDecodeThreadStack + sizeof(daMP_AudioDecodeThreadStack), sizeof(daMP_AudioDecodeThreadStack), param_0, 1)) {
return 0;
}
} else {
if (!OSCreateThread(&daMP_AudioDecodeThread, daMP_AudioDecoder, NULL, daMP_AudioDecodeThreadStack + sizeof(daMP_AudioDecodeThreadStack), sizeof(daMP_AudioDecodeThreadStack), param_0, 1)) {
if (!OSCreateThread(&daMP_AudioDecodeThread, (void*(*)(void*))daMP_AudioDecoder, NULL, daMP_AudioDecodeThreadStack + sizeof(daMP_AudioDecodeThreadStack), sizeof(daMP_AudioDecodeThreadStack), param_0, 1)) {
OSReport("Can't create audio decode thread\n");
return 0;
}
@@ -2985,8 +2985,8 @@ static f32 dummyLiteral() {
* daMP_THPGXYuv2RgbSetup__FPC16_GXRenderModeObj */
// NONMATCHING - stack slightly too small
static void daMP_THPGXYuv2RgbSetup(GXRenderModeObj const* param_0) {
int width = param_0->fb_width;
int height = param_0->efb_height;
int width = param_0->fbWidth;
int height = param_0->efbHeight;
f32 var_f31 = 0.0f;
Mtx sp50;
Mtx sp20;
@@ -3452,7 +3452,7 @@ static void daMP_THPPlayerStop() {
VISetPostRetraceCallback(daMP_OldVIPostCallback);
if (daMP_ActivePlayer.field_0xb0 == 0) {
DVDCancel(&daMP_ActivePlayer.mFileInfo.block);
DVDCancel(&daMP_ActivePlayer.mFileInfo.cb);
daMP_ReadThreadCancel();
}
@@ -3557,8 +3557,8 @@ static BOOL daMP_ActivePlayer_Init(char const* moviePath) {
daMP_THPPlayerGetVideoInfo(&daMP_videoInfo);
daMP_THPPlayerGetAudioInfo(&daMP_audioInfo);
u16 var_r31 = JUTVideo::getManager()->getRenderMode()->fb_width;
u16 temp_r4 = JUTVideo::getManager()->getRenderMode()->efb_height;
u16 var_r31 = JUTVideo::getManager()->getRenderMode()->fbWidth;
u16 temp_r4 = JUTVideo::getManager()->getRenderMode()->efbHeight;
daMP_DrawPosX = (var_r31 - daMP_videoInfo.field_0x0) >> 1;
daMP_DrawPosY = (temp_r4 - daMP_videoInfo.field_0x4) >> 1;
-1
View File
@@ -66,7 +66,6 @@ extern "C" void __construct_array();
extern "C" void __cvt_fp2unsigned();
extern "C" void _savegpr_26();
extern "C" void _restgpr_26();
extern "C" void sprintf();
extern "C" u8 now__14mDoMtx_stack_c[48];
extern "C" extern u8 g_dComIfG_gameInfo[122384];
extern "C" u8 mCurrentMtx__6J3DSys[48];
-1
View File
@@ -109,7 +109,6 @@ extern "C" void _restgpr_23();
extern "C" void _restgpr_26();
extern "C" void _restgpr_28();
extern "C" void _restgpr_29();
extern "C" void sprintf();
extern "C" extern void* __vt__8dCcD_Sph[36];
extern "C" extern void* __vt__8dCcD_Cyl[36];
extern "C" extern void* __vt__9dCcD_Stts[11];
-1
View File
@@ -88,7 +88,6 @@ extern "C" void _restgpr_26();
extern "C" void _restgpr_27();
extern "C" void _restgpr_28();
extern "C" void _restgpr_29();
extern "C" void sprintf();
extern "C" extern void* __vt__8dCcD_Sph[36];
extern "C" extern void* __vt__9dCcD_Stts[11];
extern "C" extern void* __vt__12cCcD_SphAttr[25];
+1 -1
View File
@@ -87,7 +87,7 @@ int daTag_ShopItem_c::Delete() {
/* 80D60E04-80D61024 000304 0220+00 1/1 0/0 0/0 .text Execute__16daTag_ShopItem_cFv */
int daTag_ShopItem_c::Execute() {
if (mProcessID == UINT32_MAX) {
if (mProcessID == fpcM_ERROR_PROCESS_ID_e) {
if (mCreateTimer == 0) {
mProcessID =
fopAcM_create(PROC_ShopItem, (getType() & 0xFF) | (getGroupID() << 0x1C),
+15 -15
View File
@@ -22,19 +22,19 @@ inline daYkgr_HIO_c::daYkgr_HIO_c() {
}
inline dPa_YkgrPcallBack::dPa_YkgrPcallBack() {
field_0x4 = 0.5f;
field_0x8 = 0.0f;
field_0xc = 0.0f;
field_0x10 = 0.0f;
field_0x14 = 0.5f;
field_0x18 = 0.0f;
field_0x4[0][0] = 0.5f;
field_0x4[0][1] = 0.0f;
field_0x4[0][2] = 0.0f;
field_0x4[1][0] = 0.0f;
field_0x4[1][1] = 0.5f;
field_0x4[1][2] = 0.0f;
field_0x1c = 1;
}
/* 805A848C-805A84D4 0000EC 0048+00 1/0 0/0 0/0 .text
* draw__17dPa_YkgrPcallBackFP14JPABaseEmitterP15JPABaseParticle */
void dPa_YkgrPcallBack::draw(JPABaseEmitter* param_0, JPABaseParticle* param_1) {
GXSetIndTexMtx(GX_ITM_0, &field_0x4, field_0x1c);
GXSetIndTexMtx(GX_ITM_0, field_0x4, field_0x1c);
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_A0);
}
@@ -44,19 +44,19 @@ void dPa_YkgrPcallBack::setParam(f32 param_1) {
if (param_1 >= 0.0f) {
field_0x1c = param_1;
f32 fVar1 = (param_1 - field_0x1c) * 0.5f + 0.5f;
field_0x14 = fVar1;
field_0x4 = fVar1;
field_0x4[1][1] = fVar1;
field_0x4[0][0] = fVar1;
} else {
f32 x = param_1 - 1.0f;
field_0x1c = x;
f32 fVar1 = (x - field_0x1c) * 0.5f + 1.0f;
field_0x14 = fVar1;
field_0x4 = fVar1;
field_0x4[1][1] = fVar1;
field_0x4[0][0] = fVar1;
}
field_0x8 = 0.0f;
field_0xc = 0.0f;
field_0x10 = 0.0f;
field_0x18 = 0.0f;
field_0x4[0][1] = 0.0f;
field_0x4[0][2] = 0.0f;
field_0x4[1][0] = 0.0f;
field_0x4[1][2] = 0.0f;
}
}