d_camera / m_Do_ext / d_particle + minor various wip (#210)

This commit is contained in:
TakaRikka
2022-10-03 15:26:26 -07:00
committed by GitHub
parent 0309490521
commit 4913395dbd
267 changed files with 5153 additions and 8112 deletions
+10 -10
View File
@@ -885,30 +885,30 @@ static BOOL cDyl_Initialized;
/* 800185C0-80018688 012F00 00C8+00 1/1 1/1 0/0 .text cDyl_LinkASync__Fs */
int cDyl_LinkASync(s16 i_ProfName) {
if (cDyl_Initialized == false) {
return 0;
return cPhs_ZERO_e;
}
if (i_ProfName >= ARRAY_SIZE(DMC)) {
OSReport_Error("cDyl_Link i_ProfName=%d\n", i_ProfName);
return 5;
return cPhs_ERROR_e;
}
DynamicModuleControl* d = DMC[i_ProfName];
if (d != NULL) {
if (d->load_async()) {
if (d->link()) {
return 4;
return cPhs_COMPLEATE_e;
} else {
// "cDyl_LinkASync: Link failed. Returning\n"
OSReport_Error("cDyl_LinkASync: リンクに失敗しました。諦めます\n");
return 5;
return cPhs_ERROR_e;
}
} else {
return 0;
return cPhs_ZERO_e;
}
}
return 4;
return cPhs_COMPLEATE_e;
}
/* 80018688-80018764 012FC8 00DC+00 1/1 0/0 0/0 .text cDyl_InitCallback__FPv */
@@ -981,8 +981,8 @@ int cDylPhs::Link(request_of_phase_process_class* i_phase, s16 param_1) {
static int (*l_method[3])(void*) = {cDylPhs::phase_01, (int (*)(void*))cDylPhs::phase_02,
cDylPhs::phase_03};
if (i_phase->mPhaseStep == 2) {
return 4;
if (i_phase->id == cPhs_TWO_e) {
return cPhs_COMPLEATE_e;
}
return dComLbG_PhaseHandler(i_phase, l_method, &param_1);
@@ -993,9 +993,9 @@ int cDylPhs::Link(request_of_phase_process_class* i_phase, s16 param_1) {
int cDylPhs::Unlink(request_of_phase_process_class* i_phase, s16 i_ProfName) {
int ret;
if (i_phase->mPhaseStep == 2) {
if (i_phase->id == cPhs_TWO_e) {
ret = cDyl_Unlink(i_ProfName);
i_phase->mPhaseStep = 0;
i_phase->id = cPhs_ZERO_e;
} else {
ret = 0;
}
+195 -160
View File
@@ -99,17 +99,6 @@ struct dDemo_c {
static u8 m_object[4];
};
struct dCamera_c {
/* 80088A7C */ void StartEventCamera(int, int, ...);
/* 80088BBC */ void EndEventCamera(int);
/* 801614AC */ void Start();
/* 801614D0 */ void Stop();
/* 801614F4 */ void ChangeModeOK(s32);
/* 80163028 */ void SetTrimTypeForce(s32);
/* 80164B64 */ void GetCameraTypeFromCameraName(char const*);
/* 80181500 */ void GetForceLockOnActor();
};
struct JASKernel {
/* 80290B08 */ void getAramHeap();
};
@@ -3296,7 +3285,7 @@ void daAlink_c::tgHitCallback(fopAc_ac_c* param_0, dCcD_GObjInf* param_1, dCcD_G
for (int i = 0; i < 3; i++) {
if (param_1 == &field_0x850[i]) {
field_0x2fb8 |= (1 << i);
field_0x36b4 = param_0->mCurrent.mPosition;
field_0x36b4 = param_0->current.pos;
return;
}
}
@@ -3417,14 +3406,18 @@ asm bool daAlink_c::modelCallBack(int param_0) {
/* 8009EC28-8009ECA0 099568 0078+00 1/1 0/0 0/0 .text daAlink_modelCallBack__FP8J3DJointi
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void daAlink_modelCallBack(J3DJoint* param_0, int param_1) {
nofralloc
#include "asm/d/a/d_a_alink/daAlink_modelCallBack__FP8J3DJointi.s"
static int daAlink_modelCallBack(J3DJoint* p_joint, int param_1) {
int jntNo = p_joint->getJntNo();
daAlink_c* alink = (daAlink_c*)j3dSys.getModel()->getUserArea();
if (param_1 == 0) {
alink->modelCallBack(jntNo);
} else if (param_1 == 1 && alink->checkResetRootMtx(jntNo)) {
alink->resetRootMtx();
}
return 1;
}
#pragma pop
/* ############################################################################################## */
/* 80452CC4-80452CC8 0012C4 0004+00 137/137 0/0 0/0 .sdata2 @6109 */
@@ -4111,11 +4104,9 @@ SECTION_SDATA2 static f32 lit_32832 = -1.0f / 100.0f;
SECTION_SDATA2 static f32 lit_32833 = 16777215.0f;
/* 80453020-80453024 001620 0004+00 1/1 0/0 0/0 .sdata2 grassWhistleIdx$33097 */
SECTION_SDATA2 static u8 grassWhistleIdx[4] = {
0x00,
0x03,
0x00,
0x03,
SECTION_SDATA2 static u16 grassWhistleIdx[2] = {
3,
3,
};
/* 80453024-80453028 001624 0004+00 1/1 0/0 0/0 .sdata2 @33587 */
@@ -4607,14 +4598,16 @@ asm void daAlink_c::setHairAngle(cXyz* param_0, f32 param_1, f32 param_2) {
#pragma pop
/* 800A0744-800A07D8 09B084 0094+00 0/0 1/1 0/0 .text setLookPosFromOut__9daAlink_cFP4cXyz */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void daAlink_c::setLookPosFromOut(cXyz* param_0) {
nofralloc
#include "asm/d/a/d_a_alink/setLookPosFromOut__9daAlink_cFP4cXyz.s"
void daAlink_c::setLookPosFromOut(cXyz* p_pos) {
if (i_checkEndResetFlg0(ERFLG0_UNK_4)) {
if (current.pos.abs2(mLookPosFromOut) < current.pos.abs2(*p_pos)) {
return;
}
}
i_onEndResetFlg0(ERFLG0_UNK_4);
mLookPosFromOut = *p_pos;
}
#pragma pop
/* ############################################################################################## */
/* 8038D658-8038D664 019CB8 000C+00 69/69 0/0 0/0 .rodata @3757 */
@@ -4626,14 +4619,21 @@ COMPILER_STRIP_GATE(0x8038D658, &lit_3757);
#include "d/a/d_a_alink_HIO_data.inc"
/* 800A07D8-800A0868 09B118 0090+00 2/2 0/0 0/0 .text checkAttentionPosAngle__9daAlink_cFP4cXyz */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void daAlink_c::checkAttentionPosAngle(cXyz* param_0) {
nofralloc
#include "asm/d/a/d_a_alink/checkAttentionPosAngle__9daAlink_cFP4cXyz.s"
bool daAlink_c::checkAttentionPosAngle(cXyz* param_0) {
if (i_checkNoResetFlg1(FLG1_UNK_4)) {
return true;
}
int tmp;
if (i_checkModeFlg(MODE_RIDING) || i_checkEndResetFlg0(ERFLG0_UNK_400)) {
tmp = daAlinkHIO_horse_c0::m.field_0x52;
} else {
tmp = 0x6000;
}
s16 targetY = cLib_targetAngleY(&field_0x34e0, param_0);
return cLib_distanceAngleS(targetY, field_0x2fe6) <= tmp;
}
#pragma pop
/* 800A0868-800A093C 09B1A8 00D4+00 1/1 0/0 0/0 .text
* checkActorPosAngle__9daAlink_cFP10fopAc_ac_cPP4cXyz */
@@ -4729,7 +4729,7 @@ s16 daAlink_c::getMoveBGActorName(cBgS_PolyInfo& param_0, int param_1) {
dComIfG_Bgsp().ChkMoveBG_NoDABg(param_0) && dComIfG_Bgsp().GetActorPointer(param_0)) {
return fopAcM_GetName(dComIfG_Bgsp().GetActorPointer(param_0));
}
return 0xFD;
return PROC_ALINK;
}
/* 800A2280-800A22E8 09CBC0 0068+00 2/2 0/0 0/0 .text checkGoronRide__9daAlink_cFv */
@@ -6491,56 +6491,91 @@ asm void* daAlink_c::getAnimeResource(daPy_anmHeap_c* param_0, u16 param_1, u32
/* 800A3D7C-800A3E30 09E6BC 00B4+00 16/16 0/0 0/0 .text initModel__9daAlink_cFP12J3DModelDataUlUl
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm J3DModel* daAlink_c::initModel(J3DModelData* param_0, u32 param_1, u32 param_2) {
nofralloc
#include "asm/d/a/d_a_alink/initModel__9daAlink_cFP12J3DModelDataUlUl.s"
J3DModel* daAlink_c::initModel(J3DModelData* i_modelData, u32 mdlFlags, u32 diffFlags) {
J3DTexture* tex = i_modelData->getTexture();
int texNo = tex->getNum() - 1;
int warpMaterial = false;
if (texNo >= 0) {
ResTIMG* timg = tex->getResTIMG(texNo);
if (mpWarpTexData == (u32)timg + timg->imageOffset) {
warpMaterial = true;
}
}
if (warpMaterial) {
dRes_info_c::onWarpMaterial(i_modelData);
diffFlags |= 0x2000400;
}
J3DModel* model = mDoExt_J3DModel__create(i_modelData, mdlFlags, diffFlags | 0x11000084);
if (warpMaterial) {
dRes_info_c::offWarpMaterial(i_modelData);
}
return model;
}
#pragma pop
/* 800A3E30-800A3E98 09E770 0068+00 1/1 0/0 0/0 .text initModel__9daAlink_cFUsUl */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void daAlink_c::initModel(u16 param_0, u32 param_1) {
nofralloc
#include "asm/d/a/d_a_alink/initModel__9daAlink_cFUsUl.s"
J3DModel* daAlink_c::initModel(u16 param_0, u32 param_1) {
return initModel((J3DModelData*)dComIfG_getObjectRes(l_arcName, param_0), param_1);
}
#pragma pop
/* 800A3E98-800A3F00 09E7D8 0068+00 1/1 0/0 0/0 .text initModelEnv__9daAlink_cFUsUl */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void daAlink_c::initModelEnv(u16 param_0, u32 param_1) {
nofralloc
#include "asm/d/a/d_a_alink/initModelEnv__9daAlink_cFUsUl.s"
J3DModel* daAlink_c::initModelEnv(u16 param_0, u32 param_1) {
return initModelEnv((J3DModelData*)dComIfG_getObjectRes(l_arcName, param_0), param_1);
}
#pragma pop
/* 800A3F00-800A3F98 09E840 0098+00 1/1 0/0 0/0 .text initDemoModel__9daAlink_cFPP8J3DModelPCcUl
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void daAlink_c::initDemoModel(J3DModel** param_0, char const* param_1, u32 param_2) {
nofralloc
#include "asm/d/a/d_a_alink/initDemoModel__9daAlink_cFPP8J3DModelPCcUl.s"
int daAlink_c::initDemoModel(J3DModel** p_model, char const* resName, u32 param_2) {
*p_model = NULL;
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(dStage_roomControl_c::getDemoArcName(), resName);
if (modelData != NULL) {
*p_model = initModel(modelData, param_2);
if (*p_model == NULL) {
return 0;
}
}
return 1;
}
#pragma pop
/* 800A3F98-800A4068 09E8D8 00D0+00 1/1 0/0 1/1 .text initDemoBck__9daAlink_cFPP13mDoExt_bckAnmPCc
*/
// matches with literals
#ifdef NONMATCHING
int daAlink_c::initDemoBck(mDoExt_bckAnm** p_bck, char const* resName) {
J3DAnmTransform* res = (J3DAnmTransform*)dComIfG_getObjectRes(dStage_roomControl_c::getDemoArcName(), resName);
if (res != NULL) {
*p_bck = new mDoExt_bckAnm();
if (*p_bck == NULL) {
return 0;
}
if ((*p_bck)->init(res, 1, 2, 1.0f, 0, -1, false)) {
return 0;
}
}
return 1;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void daAlink_c::initDemoBck(mDoExt_bckAnm** param_0, char const* param_1) {
asm int daAlink_c::initDemoBck(mDoExt_bckAnm** param_0, char const* param_1) {
nofralloc
#include "asm/d/a/d_a_alink/initDemoBck__9daAlink_cFPP13mDoExt_bckAnmPCc.s"
}
#pragma pop
#endif
/* ############################################################################################## */
/* 80392094-80392094 01E6F4 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
@@ -12170,17 +12205,17 @@ void daAlink_c::setSelectEquipItem(int param_0) {
J3DModel* temp = mSwordModel;
if (checkWoodSwordEquip()) {
mSwordModel = field_0x0670;
field_0x06bc = field_0x066c;
mSwordModel = mWoodSwordModel;
mSheathModel = mpSwMSheathModel;
} else if (checkMasterSwordEquip()) {
mSwordModel = field_0x0668;
field_0x06bc = field_0x066c;
mSwordModel = mpSwMModel;
mSheathModel = mpSwMSheathModel;
} else {
if (!i_checkSwordGet()) {
mSwordChangeWaitTimer = 100;
}
mSwordModel = field_0x0660;
field_0x06bc = field_0x0664;
mSwordModel = mpSwAModel;
mSheathModel = mpSwASheathModel;
}
if (!i_checkSwordGet() || checkWoodSwordEquip() || i_checkNoResetFlg3(FLG3_UNK_1000000)) {
@@ -12212,11 +12247,11 @@ void daAlink_c::setSelectEquipItem(int param_0) {
}
}
} else if (checkMasterSwordEquip()) {
mSwordModel = field_0x0668;
field_0x06bc = field_0x066c;
mSwordModel = mpSwMModel;
mSheathModel = mpSwMSheathModel;
} else {
mSwordModel = field_0x0660;
field_0x06bc = field_0x0664;
mSwordModel = mpSwAModel;
mSheathModel = mpSwASheathModel;
}
if (mClothesChangeWaitTimer == 0) {
@@ -12284,7 +12319,7 @@ void daAlink_c::playerInit() {
field_0x850[1].SetH(lit_14955);
field_0xFB8.Set(*(dCcD_SrcSph*)l_sphSrc);
field_0xFB8.SetStts(&field_0x814);
field_0xFB8.StartCAt(mCurrent.mPosition);
field_0xFB8.StartCAt(current.pos);
mAnmHeap3.setBufferSize(0x20000);
mAnmHeap3.createHeap(daPy_anmHeap_c::HEAP_TYPE_4);
@@ -12299,8 +12334,8 @@ void daAlink_c::playerInit() {
mAnmHeap4.createHeap(daPy_anmHeap_c::HEAP_TYPE_4);
setShieldModel();
mSwordModel = field_0x0660;
field_0x06bc = field_0x0664;
mSwordModel = mpSwAModel;
mSheathModel = mpSwASheathModel;
field_0x814.Init(120, 0xFF, this);
field_0x306c = mCollisionRot.y + field_0x59e;
@@ -12309,12 +12344,12 @@ void daAlink_c::playerInit() {
field_0x122C[i].Set(*(dCcD_SrcCps*)l_atCpsSrc);
field_0x122C[i].SetStts(&field_0x814);
}
field_0x15F8.Set(*(dCcD_SrcCps*)l_atCpsSrc);
field_0x15F8.SetStts(&field_0x814);
field_0x15F8.SetAtType(0x10);
field_0x15F8.OnAtNoHitMark();
field_0x15F8.SetAtHitMark(0);
field_0x15F8.SetAtAtp(0);
mGuardAttackAtCps.Set(*(dCcD_SrcCps*)l_atCpsSrc);
mGuardAttackAtCps.SetStts(&field_0x814);
mGuardAttackAtCps.SetAtType(AT_TYPE_SHIELD_ATTACK);
mGuardAttackAtCps.OnAtNoHitMark();
mGuardAttackAtCps.SetAtHitMark(0);
mGuardAttackAtCps.SetAtAtp(0);
field_0x10F0.Set(*(dCcD_SrcCyl*)l_atCylSrc);
field_0x10F0.SetStts(&field_0x814);
@@ -12356,19 +12391,19 @@ void daAlink_c::playerInit() {
mAnmHeap9.createHeap(daPy_anmHeap_c::HEAP_TYPE_3);
resetBasAnime();
mZ2Link.init(&mCurrent.mPosition, &mEyePos, &field_0x3720);
mZ2Link.init(&current.pos, &mEyePos, &field_0x3720);
mZ2Link.initKantera(&field_0x360c);
mZ2Link.setKanteraState(0);
mProcID = 0x160;
m_swordBlur.m_blurTex = (void*)dComIfG_getObjectRes(l_arcName, 0x59); // blur.bti
J3DModelData* modelData = field_0x0660->getModelData();
J3DModelData* modelData = mpSwAModel->getModelData();
m_nSwordBtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 0x44); // al_swa.btk
m_nSwordBtk->searchUpdateMaterialID(modelData);
modelData->entryTexMtxAnimator(m_nSwordBtk);
J3DModelData* modelData2 = field_0x0668->getModelData();
J3DModelData* modelData2 = mpSwMModel->getModelData();
m_mSwordBtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 0x45); // al_swm.btk
m_mSwordBtk->searchUpdateMaterialID(modelData2);
modelData2->entryTexMtxAnimator(m_mSwordBtk);
@@ -12453,7 +12488,7 @@ void daAlink_c::playerInit() {
field_0x2f20.setOldPosP(&field_0x3624, &field_0x3630);
field_0x2fc3 = 10;
field_0x2f5c.mPosition = mCurrent.mPosition;
field_0x2f5c.mPosition = current.pos;
field_0x2f5c.mColor.r = 80;
field_0x2f5c.mColor.g = 80;
field_0x2f5c.mColor.b = 200;
@@ -12538,7 +12573,7 @@ int daAlink_c::create() {
BOOL enteringCity = false;
// Stage: City Room: Entrance Layer: 0
if (checkStageName("D_MN07") && dComIfGp_roomControl_getStayNo() == 0 &&
dComIfG_play_c::getLayerNo(0) == 0 && mCurrent.mPosition.y > 7500.0f) {
dComIfG_play_c::getLayerNo(0) == 0 && current.pos.y > 7500.0f) {
enteringCity = true;
}
@@ -12557,42 +12592,42 @@ int daAlink_c::create() {
fopAcM_setStageLayer(this);
if (sceneMode == 7) {
mCurrent.mPosition = dComIfGs_getTurnRestartPos();
current.pos = dComIfGs_getTurnRestartPos();
mCollisionRot.y = dComIfGs_getTurnRestartAngleY();
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
}
if ((!checkBossOctaIealRoom() && dComIfGs_Wolf_Change_Check() == 1) || startPoint == -4 ||
sceneMode == 9) {
mAttentionInfo.mPosition.set(mCurrent.mPosition.x + cM_ssin(mCollisionRot.y) * 70.0f,
mCurrent.mPosition.y + 80.0f,
mCurrent.mPosition.z + cM_scos(mCollisionRot.y) * 70.0f);
mAttentionInfo.mPosition.set(current.pos.x + cM_ssin(mCollisionRot.y) * 70.0f,
current.pos.y + 80.0f,
current.pos.z + cM_scos(mCollisionRot.y) * 70.0f);
i_onNoResetFlg1(0x2000000);
} else if (horseStart) {
mAttentionInfo.mPosition.y = mCurrent.mPosition.y + 150.0f;
mAttentionInfo.mPosition.y = current.pos.y + 150.0f;
} else {
mAttentionInfo.mPosition.y = mCurrent.mPosition.y + 275.0f;
mAttentionInfo.mPosition.y = current.pos.y + 275.0f;
}
mAttentionInfo.mFlags = -1;
if (!i_dComIfGp_getEventManager().dataLoaded()) {
return 0;
return cPhs_ZERO_e;
}
setArcName(i_checkWolf());
setOriginalHeap(&field_0x0638, 0xA2800);
if (dComIfG_resLoad(&mPhaseReq, mArcName, field_0x0638) != 4) {
return 0;
if (dComIfG_resLoad(&mPhaseReq, mArcName, field_0x0638) != cPhs_COMPLEATE_e) {
return cPhs_ZERO_e;
}
setShieldArcName();
setOriginalHeap(&field_0x0648, 0x7000);
if (dComIfG_resLoad(&mShieldPhaseReq, mShieldArcName, field_0x0648) != 4) {
return 0;
if (dComIfG_resLoad(&mShieldPhaseReq, mShieldArcName, field_0x0648) != cPhs_COMPLEATE_e) {
return cPhs_ZERO_e;
}
if (!fopAcM_entrySolidHeap(this, daAlink_createHeap, 0xC003E930)) {
return 5;
return cPhs_ERROR_e;
}
mAttention = &dComIfGp_getAttention();
@@ -12602,10 +12637,10 @@ int daAlink_c::create() {
bgWaitFlg = 1;
if (checkCanoeStart()) {
field_0x2900 = fopAcM_create(PROC_CANOE, 0, &mCurrent.mPosition, fopAcM_GetRoomNo(this),
field_0x2900 = fopAcM_create(PROC_CANOE, 0, &current.pos, fopAcM_GetRoomNo(this),
&mCollisionRot, NULL, -1);
} else if (sceneMode == 11) {
field_0x2900 = fopAcM_create(PROC_Obj_IceLeaf, 0x1FFFF, &mCurrent.mPosition,
field_0x2900 = fopAcM_create(PROC_Obj_IceLeaf, 0x1FFFF, &current.pos,
fopAcM_GetRoomNo(this), &mCollisionRot, NULL, -1);
} else {
field_0x2900 = -1;
@@ -12618,16 +12653,16 @@ int daAlink_c::create() {
if (mLinkAcch.GetGroundH() == lit_9138 ||
(startMode == 14 && !dComIfG_Bgsp().ChkMoveBG(mLinkAcch.m_gnd)) ||
(startPoint == -4 &&
fopAcIt_Judge((fopAcIt_JudgeFunc)daAlink_searchPortal, &mCurrent.mPosition) == NULL) ||
fopAcIt_Judge((fopAcIt_JudgeFunc)daAlink_searchPortal, &current.pos) == NULL) ||
(field_0x2900 != -1 && !fopAcM_SearchByID(field_0x2900)) ||
(checkCanoeStart() && !fopAcIt_Judge((fopAcIt_JudgeFunc)daAlink_searchCanoe, NULL)) ||
(checkBoarStart() && !fopAcIt_Judge((fopAcIt_JudgeFunc)daAlink_searchBoar, NULL)) ||
(startMode == 13 &&
(!mLinkAcch.ChkWaterHit() || mLinkAcch.m_wtr.GetHeight() < mCurrent.mPosition.y)) ||
(!mLinkAcch.ChkWaterHit() || mLinkAcch.m_wtr.GetHeight() < current.pos.y)) ||
((checkCarryStartLightBallA() || checkCarryStartLightBallB()) &&
!fopAcIt_Judge((fopAcIt_JudgeFunc)daAlink_searchLightBall, NULL)) ||
(horseStart && i_dComIfGp_getHorseActor() == NULL)) {
return 0;
return cPhs_ZERO_e;
}
if (var_r24) {
@@ -12636,8 +12671,8 @@ int daAlink_c::create() {
bgWaitFlg = 0;
dComIfGs_setRestartRoom(mCurrent.mPosition, mCollisionRot.y, getStartRoomNo());
field_0x3780 = mCurrent.mPosition;
dComIfGs_setRestartRoom(current.pos, mCollisionRot.y, getStartRoomNo());
field_0x3780 = current.pos;
mLinkAcch.ClrGndThinCellingOff();
fopAcM_SetRoomNo(this, dComIfG_Bgsp().GetRoomId(mLinkAcch.m_gnd) + 1);
setRoomInfo();
@@ -12666,7 +12701,7 @@ int daAlink_c::create() {
setSelectEquipItem(0);
setMatrix();
allAnimePlay();
field_0x0650->calc();
mpLinkModel->calc();
playFaceTextureAnime();
if (!i_checkWolf()) {
@@ -12678,7 +12713,7 @@ int daAlink_c::create() {
setBodyPartPos();
setHangWaterY();
field_0x850[0].SetC(mCurrent.mPosition);
field_0x850[0].SetC(current.pos);
field_0x3454 = field_0x3834.y;
setAttentionPos();
setItemActor();
@@ -12698,9 +12733,9 @@ int daAlink_c::create() {
1, 1);
}
fopAcM_create(PROC_MIDNA, prm, &mCurrent.mPosition, fopAcM_GetRoomNo(this), &mCollisionRot,
fopAcM_create(PROC_MIDNA, prm, &current.pos, fopAcM_GetRoomNo(this), &mCollisionRot,
NULL, -1);
checkSetNpcTks(&mCurrent.mPosition, fopAcM_GetRoomNo(this), 1);
checkSetNpcTks(&current.pos, fopAcM_GetRoomNo(this), 1);
if (startPoint == -4 && dComIfGp_TargetWarpPt_get() != -1 && !dComIfGp_TransportWarp_check()) {
daTagMhint_c::createPortalWarpMissTag(fopAcM_GetID(this), fopAcM_GetRoomNo(this));
@@ -12715,7 +12750,7 @@ int daAlink_c::create() {
}
}
return 4;
return cPhs_COMPLEATE_e;
}
#else
#pragma push
@@ -13977,7 +14012,7 @@ void dBgS_RoofChk::SetPos(cXyz const& pos) {
/* 800B1488-800B14B4 0ABDC8 002C+00 4/4 0/0 0/0 .text checkWaterPolygonUnder__9daAlink_cFv */
BOOL daAlink_c::checkWaterPolygonUnder() {
return i_checkModeFlg(MODE_SWIMMING) || mCurrent.mPosition.y < mWaterY;
return i_checkModeFlg(MODE_SWIMMING) || current.pos.y < mWaterY;
}
/* 800B14B4-800B154C 0ABDF4 0098+00 2/2 0/0 0/0 .text setWaterY__9daAlink_cFv */
@@ -14100,9 +14135,9 @@ BOOL daAlink_c::checkSlope() const {
void daAlink_c::setPlayerPosAndAngle(cXyz const* p_pos, s16 param_1, int param_2) {
if (checkEventRun() || param_2 != 0 || mSpecialMode != 0) {
if (p_pos != NULL) {
mCurrent.mPosition = *p_pos;
mNext.mPosition = mCurrent.mPosition;
field_0x3798 = mCurrent.mPosition;
current.pos = *p_pos;
next.pos = current.pos;
field_0x3798 = current.pos;
i_onEndResetFlg0(ERFLG0_UNK_800000);
i_onEndResetFlg2(ERFLG2_UNK_100);
if (mDemo.getDemoMode() != 0x59) {
@@ -14111,12 +14146,12 @@ void daAlink_c::setPlayerPosAndAngle(cXyz const* p_pos, s16 param_1, int param_2
}
mCollisionRot.y = param_1;
mCurrent.mAngle.y = param_1;
current.angle.y = param_1;
field_0x2fe6 = mCollisionRot.y;
if ((mProcID == PROC_TALK || mProcID == PROC_TRADE_ITEM_OUT) && !i_checkWolf()) {
if (field_0x3198 != 0) {
field_0x37c8.x = mCurrent.mPosition.x;
field_0x37c8.z = mCurrent.mPosition.z;
field_0x37c8.x = current.pos.x;
field_0x37c8.z = current.pos.z;
}
}
@@ -14126,12 +14161,12 @@ void daAlink_c::setPlayerPosAndAngle(cXyz const* p_pos, s16 param_1, int param_2
if (checkHorseRide() || checkSpinnerRide()) {
fopAc_ac_c* rideAc = mRideAcKeep.getActor();
rideAc->mCurrent.mPosition = mCurrent.mPosition;
rideAc->current.pos = current.pos;
rideAc->mCollisionRot.y = mCollisionRot.y;
rideAc->mCurrent.mAngle.y = mCollisionRot.y;
rideAc->current.angle.y = mCollisionRot.y;
rideAc->mSpeed.y = FLOAT_LABEL(lit_6108);
} else {
i_dComIfGp_getHorseActor()->setHorsePosAndAngle(&mCurrent.mPosition, mCollisionRot.y);
i_dComIfGp_getHorseActor()->setHorsePosAndAngle(&current.pos, mCollisionRot.y);
}
field_0x814.ClrCcMove();
@@ -14153,9 +14188,9 @@ asm void daAlink_c::setPlayerPosAndAngle(cXyz const* param_0, s16 param_1, int p
void daAlink_c::setPlayerPosAndAngle(cXyz const* p_pos, csXyz const* p_angle) {
if (checkEventRun() || mSpecialMode != 0) {
if (p_pos != NULL) {
mCurrent.mPosition = *p_pos;
mNext.mPosition = mCurrent.mPosition;
field_0x3798 = mCurrent.mPosition;
current.pos = *p_pos;
next.pos = current.pos;
field_0x3798 = current.pos;
i_onEndResetFlg0(ERFLG0_UNK_800000);
i_onEndResetFlg2(ERFLG2_UNK_100);
mSpeed.y = FLOAT_LABEL(lit_6108);
@@ -14163,7 +14198,7 @@ void daAlink_c::setPlayerPosAndAngle(cXyz const* p_pos, csXyz const* p_angle) {
if (p_angle != NULL) {
mCollisionRot = *p_angle;
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
field_0x2fe6 = mCollisionRot.y;
}
@@ -14174,15 +14209,15 @@ void daAlink_c::setPlayerPosAndAngle(cXyz const* p_pos, csXyz const* p_angle) {
/* 800B24F4-800B25CC 0ACE34 00D8+00 1/0 0/0 0/0 .text setPlayerPosAndAngle__9daAlink_cFPA4_f */
void daAlink_c::setPlayerPosAndAngle(Mtx param_0) {
if (checkEventRun() || mSpecialMode != 0) {
mCurrent.mPosition.x = param_0[0][3];
mCurrent.mPosition.y = param_0[1][3];
mCurrent.mPosition.z = param_0[2][3];
mNext.mPosition = mCurrent.mPosition;
field_0x3798 = mCurrent.mPosition;
current.pos.x = param_0[0][3];
current.pos.y = param_0[1][3];
current.pos.z = param_0[2][3];
next.pos = current.pos;
field_0x3798 = current.pos;
i_onEndResetFlg0(ERFLG0_UNK_800000);
i_onEndResetFlg2(ERFLG2_UNK_100);
mDoMtx_MtxToRot(param_0, &mCollisionRot);
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
field_0x2fe6 = mCollisionRot.y;
mSpeed.y = FLOAT_LABEL(lit_6108);
field_0x814.ClrCcMove();
@@ -14634,7 +14669,7 @@ asm void daAlink_c::checkServiceWaitMode() {
/* 800B48D0-800B4908 0AF210 0038+00 18/18 0/0 0/0 .text setJumpMode__9daAlink_cFv */
void daAlink_c::setJumpMode() {
onModeFlg(MODE_JUMP);
mLastJumpPos = mCurrent.mPosition;
mLastJumpPos = current.pos;
mFallHeight = mLastJumpPos.y;
field_0x33c8 = mLastJumpPos.y;
}
@@ -14732,7 +14767,7 @@ asm BOOL daAlink_c::checkWaitAction() {
/* 800B5BC0-800B5C34 0B0500 0074+00 3/3 0/0 0/0 .text setFallVoice__9daAlink_cFv */
void daAlink_c::setFallVoice() {
if (mFallVoiceInit == 0 && lit_8782 * (mFallHeight - mCurrent.mPosition.y) > lit_8676) {
if (mFallVoiceInit == 0 && lit_8782 * (mFallHeight - current.pos.y) > lit_8676) {
voiceStart(Z2SE_AL_V_FALL);
mFallVoiceInit = 1;
}
@@ -14934,7 +14969,7 @@ asm void daAlink_c::checkUpperItemAction() {
/* 800B7B7C-800B7BF8 0B24BC 007C+00 1/1 0/0 0/0 .text orderPeep__9daAlink_cFv */
void daAlink_c::orderPeep() {
field_0x2fad = field_0x27f4->getSceneListID();
field_0x2fad = ((kytag05_class*)field_0x27f4)->getSceneListID();
field_0x2ff2 = 20;
fopAcM_orderOtherEvent(this, field_0x27f4, l_peepEventName, 0xFFFF, 1, 0);
if (i_checkWolf()) {
@@ -15049,7 +15084,7 @@ BOOL daAlink_c::checkSideRollAction(int param_0) {
} else {
if (mTargetedActor != NULL) {
if (checkEnemyGroup(mTargetedActor) &&
mTargetedActor->mCurrent.mPosition.abs2XZ(mCurrent.mPosition) <= lit_6237) {
mTargetedActor->current.pos.abs2XZ(current.pos) <= lit_6237) {
return procSideRollInit(param_0);
} else {
return procTurnMoveInit(param_0);
@@ -15570,7 +15605,7 @@ int daAlink_c::checkSceneChange(int exitID) {
((exitID != 0x3F || mExitID != 0x3F) &&
(i_checkModeFlg(0x40000) || i_checkModeFlg(0x400) || mLinkAcch.ChkGroundHit() ||
mProcID == PROC_DOOR_OPEN || mProcID == PROC_WARP || mProcID == PROC_WOLF_DIG_THROUGH ||
(field_0x3174 == 5 && field_0x33c8 - mCurrent.mPosition.y > 500.0f))) ||
(field_0x3174 == 5 && field_0x33c8 - current.pos.y > 500.0f))) ||
(mExitID & 0x8000 && i_checkModeFlg(2))) {
if (field_0x3174 == 5 || (mExitID & 0x8000 && mExitDirection == 0xFF)) {
mLinkAcch.i_ClrGroundHit();
@@ -15588,7 +15623,7 @@ int daAlink_c::checkSceneChange(int exitID) {
cXyz sp8;
for (; hStop != NULL; hStop = hStop->getNext()) {
if (hStop->getActiveFlg()) {
fpoAcM_relativePos(hStop, &mCurrent.mPosition, &sp8);
fpoAcM_relativePos(hStop, &current.pos, &sp8);
if (sp8.y >= -200.0f && sp8.y <= hStop->mScale.y + 600.0f &&
fabsf(sp8.x) <= hStop->mScale.x && fabsf(sp8.z) <= hStop->mScale.z) {
@@ -15855,12 +15890,12 @@ asm void daAlink_c::setMetamorphoseModel(int param_0) {
/* 800BF854-800BF884 0BA194 0030+00 10/10 0/0 0/0 .text keepItemData__9daAlink_cFv */
void daAlink_c::keepItemData() {
field_0x30ce = mEquipItem;
deleteEquipItem(0, 0);
deleteEquipItem(FALSE, FALSE);
}
/* 800BF884-800BF8D0 0BA1C4 004C+00 8/8 0/0 0/0 .text returnKeepItemData__9daAlink_cFv */
void daAlink_c::returnKeepItemData() {
deleteEquipItem(0, 0);
deleteEquipItem(FALSE, FALSE);
mEquipItem = field_0x30ce;
field_0x30ce = NO_ITEM;
makeItemType();
@@ -15917,10 +15952,10 @@ BOOL daAlink_c::setItemModel() {
#ifdef NONMATCHING
BOOL daAlink_c::setItemActor() {
if (mEquipItem == BOOMERANG) {
fopAc_ac_c* actor = (fopAc_ac_c*)fopAcM_fastCreate(PROC_BOOMERANG, 0, &mCurrent.mPosition,
fopAc_ac_c* actor = (fopAc_ac_c*)fopAcM_fastCreate(PROC_BOOMERANG, 0, &current.pos,
-1, NULL, NULL, -1, NULL, NULL);
if (actor == NULL) {
deleteEquipItem(0, 0);
deleteEquipItem(FALSE, FALSE);
return 0;
}
@@ -15930,10 +15965,10 @@ BOOL daAlink_c::setItemActor() {
}
if (mEquipItem == COPY_ROD) {
fopAc_ac_c* actor = (fopAc_ac_c*)fopAcM_fastCreate(PROC_CROD, 0, &mCurrent.mPosition, -1,
fopAc_ac_c* actor = (fopAc_ac_c*)fopAcM_fastCreate(PROC_CROD, 0, &current.pos, -1,
NULL, NULL, -1, NULL, NULL);
if (actor == NULL) {
deleteEquipItem(0, 0);
deleteEquipItem(FALSE, FALSE);
return 0;
}
@@ -15949,7 +15984,7 @@ BOOL daAlink_c::setItemActor() {
if (checkIronBallWaitAnime()) {
resetUpperAnime(UPPER_NOW, -1.0f);
}
deleteEquipItem(0, 0);
deleteEquipItem(FALSE, FALSE);
return 0;
}
@@ -16350,9 +16385,9 @@ asm void daAlink_c::setFrontRollCrashShock(u8 param_0) {
/* 800C1DAC-800C1DE0 0BC6EC 0034+00 1/0 0/0 0/0 .text getModelJointMtx__9daAlink_cFUs */
MtxP daAlink_c::getModelJointMtx(u16 param_0) {
if (param_0 >= field_0x30c6) {
return field_0x0650->mBaseTransformMtx;
return mpLinkModel->mBaseTransformMtx;
}
return field_0x0650->i_getAnmMtx(param_0);
return mpLinkModel->i_getAnmMtx(param_0);
}
/* 800C1DE0-800C1E0C 0BC720 002C+00 1/0 0/0 0/0 .text onFrollCrashFlg__9daAlink_cFUci */
@@ -16689,10 +16724,10 @@ int daAlink_c::loadModelDVD() {
if (mClothesChangeWaitTimer == 2) {
mEyeHL1.remove();
mEyeHL2.remove();
field_0x79c = 0;
field_0x7a0 = 0;
field_0x7a4 = 0;
field_0x7a8 = 0;
field_0x79c = NULL;
mpWlMidnaHatModel = NULL;
field_0x7a4 = NULL;
mpWlMidnaHairModel = NULL;
if (!i_checkNoResetFlg2(FLG2_UNK_280000)) {
dComIfG_resDelete(&mPhaseReq, mArcName);
@@ -16710,7 +16745,7 @@ int daAlink_c::loadModelDVD() {
mClothesChangeWaitTimer = 0;
changeLink(1);
} else {
if (dComIfG_resLoad(&mPhaseReq, mArcName, field_0x0638) == 4) {
if (dComIfG_resLoad(&mPhaseReq, mArcName, field_0x0638) == cPhs_COMPLEATE_e) {
mClothesChangeWaitTimer = 0;
if (mProcID == PROC_METAMORPHOSE || mProcID == PROC_METAMORPHOSE_ONLY) {
@@ -16755,7 +16790,7 @@ int daAlink_c::loadShieldModelDVD() {
field_0x0648->freeAll();
setShieldArcName();
} else if (mShieldChangeWaitTimer == 1) {
if (dComIfG_resLoad(&mShieldPhaseReq, mShieldArcName, field_0x0648) == 4) {
if (dComIfG_resLoad(&mShieldPhaseReq, mShieldArcName, field_0x0648) == cPhs_COMPLEATE_e) {
mShieldChangeWaitTimer = 0;
setShieldModel();
} else {
@@ -17316,7 +17351,7 @@ MtxP daPy_py_c::getInvMtx() {
/* 8014151C-80141524 13BE5C 0008+00 1/0 0/0 0/0 .text getShadowTalkAtnPos__9daPy_py_cFv
*/
cXyz* daPy_py_c::getShadowTalkAtnPos() {
return &mCurrent.mPosition;
return &current.pos;
}
/* 80141524-8014152C 13BE64 0008+00 1/0 0/0 0/0 .text getLeftItemMatrix__9daPy_py_cFv */
@@ -17816,7 +17851,7 @@ cXyz* daPy_py_c::getMagneHitPos() {
/* 801417C0-801417C8 13C100 0008+00 1/0 0/0 0/0 .text getMagneBootsTopVec__9daPy_py_cFv
*/
cXyz* daPy_py_c::getMagneBootsTopVec() {
return &mCurrent.mPosition;
return &current.pos;
}
/* 801417C8-801417D0 13C108 0008+00 1/0 0/0 0/0 .text checkUseKandelaar__9daPy_py_cFi */
+1 -1
View File
@@ -128,7 +128,7 @@ void daAlink_c::setCopyRodModel() {
field_0x122C[0].OnAtSetBit();
field_0x122C[0].SetAtHitCallback(NULL);
field_0x122C[0].SetAtMtrl(0);
mHeldItemModel->i_setBaseTRMtx(field_0x0650->i_getAnmMtx(field_0x30c0));
mHeldItemModel->i_setBaseTRMtx(mpLinkModel->i_getAnmMtx(field_0x30c0));
mHeldItemModel->calc();
}
+11 -11
View File
@@ -81,7 +81,7 @@ asm bool daAlink_c::checkCutFinishJumpUp() {
/* 800D1088-800D10E0 0CB9C8 0058+00 2/2 0/0 0/0 .text changeCutFast__9daAlink_cFv */
void daAlink_c::changeCutFast() {
deleteEquipItem(0, 0);
deleteEquipItem(FALSE, FALSE);
setSwordModel();
mComboCutCount = 3;
checkCutAction();
@@ -117,10 +117,10 @@ void daAlink_c::setSwordModel() {
void daAlink_c::offSwordModel() {
mDoAud_bgmSetSwordUsing(0);
if (mSwordModel == field_0x0668 || mSwordModel == field_0x0660) {
if (mSwordModel == mpSwMModel || mSwordModel == mpSwAModel) {
mSwordModel->getModelData()->getMaterialNodePointer(0)->getShape()->hide();
} else if (mSwordModel == field_0x0670) {
field_0x0670->getModelData()->getMaterialNodePointer(1)->getShape()->show();
} else if (mSwordModel == mWoodSwordModel) {
mWoodSwordModel->getModelData()->getMaterialNodePointer(1)->getShape()->show();
}
}
@@ -486,7 +486,7 @@ void daAlink_c::setCutJumpSpeed(int cut_type) {
// cut_type 0 = standing jump attack
if (mTargetedActor != NULL && cut_type == 0) {
mCollisionRot.y = cLib_targetAngleY(&mCurrent.mPosition, &mTargetedActor->mEyePos);
mCollisionRot.y = cLib_targetAngleY(&current.pos, &mTargetedActor->mEyePos);
cXyz targetPos(mTargetedActor->mEyePos.x - (cM_ssin(mCollisionRot.y) * 70.0f),
mTargetedActor->mEyePos.y + 50.0f,
mTargetedActor->mEyePos.z - (cM_scos(mCollisionRot.y) * 70.0f));
@@ -499,14 +499,14 @@ void daAlink_c::setCutJumpSpeed(int cut_type) {
f32 dvar12 = mSpeed.y + mGravity;
f32 dvar10 = 1.0f / mGravity;
f32 fvar1 = targetPos.y - (mCurrent.mPosition.y - (dvar10 * (dvar12 * dvar12) * 0.5f));
f32 fvar1 = targetPos.y - (current.pos.y - (dvar10 * (dvar12 * dvar12) * 0.5f));
if (fvar1 > 0.0f) {
fvar1 = 0.0f;
}
f32 sqrt = JMAFastSqrt(fvar1 * 2.0f * dvar10);
f32 speedDiv = sqrt - (dvar12 * dvar10);
f32 squareDist = mCurrent.mPosition.absXZ(targetPos);
f32 squareDist = current.pos.absXZ(targetPos);
if (squareDist > 500.0f) {
squareDist = 500.0f;
@@ -639,7 +639,7 @@ bool daAlink_c::procCutJumpInit(int jump_type) {
mSpeed.y = daAlinkHIO_cutJump_c0::m.mBaseJumpSpeedV;
}
setCutJumpSpeed(jump_type);
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
setSwordAtParam(dCcG_At_Spl_UNK_01, 3, 1, 3, daAlinkHIO_cut_c0::m.mSwordLength,
daAlinkHIO_cut_c0::m.mSwordRadius);
setCutType(TYPE_CUT_JUMP);
@@ -652,12 +652,12 @@ bool daAlink_c::procCutJumpInit(int jump_type) {
/* 800D43F8-800D452C 0CED38 0134+00 1/0 0/0 0/0 .text procCutJump__9daAlink_cFv */
#ifdef NONMATCHING
bool daAlink_c::procCutJump() {
if (mCurrent.mAngle.y == mCollisionRot.y && changeCutReverseProc(ANM_CUT_JUMP)) {
mCurrent.mAngle.y += 0x8000;
if (current.angle.y == mCollisionRot.y && changeCutReverseProc(ANM_CUT_JUMP)) {
current.angle.y += 0x8000;
mNormalSpeed = 27.0f;
cXyz xyz(0.0f, 1.0f, 0.0f);
dComIfGp_getVibration().StartShock(5, 31, xyz);
} else if (mCurrent.mAngle.y != mCollisionRot.y) {
} else if (current.angle.y != mCollisionRot.y) {
cLib_chaseF(&mNormalSpeed, 5.0f, 1.0f);
}
+9 -9
View File
@@ -1103,7 +1103,7 @@ asm void daAlink_c::procGanonFinishInit() {
/* 8011EA78-8011EAE8 1193B8 0070+00 1/0 0/0 0/0 .text procGanonFinish__9daAlink_cFv */
bool daAlink_c::procGanonFinish() {
i_onEndResetFlg1(GANON_FINISH);
mCurrent.mPosition = field_0x37c8;
current.pos = field_0x37c8;
if (mFrameCtrl1[0].checkAnmEnd()) {
setSingleAnimeBaseMorf(ANM_GANON_FINISH, lit_6041);
}
@@ -1140,7 +1140,7 @@ int daAlink_c::procMasterSwordStickInit() {
setSingleAnimeBase(ANM_MASTER_SWORD_STICK_INIT);
voiceStart(Z2SE_AL_V_MSTR_SW_STICK);
mNormalSpeed = FLOAT_LABEL(lit_6108);
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
mCommonCounter = 0;
return 1;
@@ -1202,9 +1202,9 @@ int daAlink_c::procDungeonWarpReadyInit() {
u32 id;
if (checkItemSetButton(DUNGEON_EXIT) != 2) {
id = fopAcM_create(PROC_OBJ_TKS, 0, &mCurrent.mPosition, fopAcM_GetRoomNo(this), &mCollisionRot, NULL, -1);
id = fopAcM_create(PROC_OBJ_TKS, 0, &current.pos, fopAcM_GetRoomNo(this), &mCollisionRot, NULL, -1);
} else {
id = fopAcM_create(PROC_NPC_TKC, 2, &mCurrent.mPosition, fopAcM_GetRoomNo(this), &mCollisionRot, NULL, -1);
id = fopAcM_create(PROC_NPC_TKC, 2, &current.pos, fopAcM_GetRoomNo(this), &mCollisionRot, NULL, -1);
}
if (id == -1) {
@@ -1215,7 +1215,7 @@ int daAlink_c::procDungeonWarpReadyInit() {
commonProcInit(PROC_DUNGEON_WARP_READY);
setSingleAnimeBase(ANM_DUNGEON_WARP_READY_INIT);
mNormalSpeed = FLOAT_LABEL(lit_6108);
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
field_0x32cc = id;
mCommonCounter = 0;
keepItemData();
@@ -1268,7 +1268,7 @@ int daAlink_c::procDungeonWarp() {
if (mCommonCounter > 0x4000) {
mCommonCounter = 0x4000;
} else {
mCurrent.mPosition.y += 1.0f;
current.pos.y += 1.0f;
}
f32 sin = cM_ssin(mCommonCounter);
@@ -1280,7 +1280,7 @@ int daAlink_c::procDungeonWarp() {
} else {
if (mCommonCounter == 0x4000) {
if (field_0x3010 == 0) {
dComIfGp_particle_set(0xA61, &mCurrent.mPosition, &mTevStr, NULL, NULL);
dComIfGp_particle_set(0xA61, &current.pos, &mTevStr, NULL, NULL);
field_0x3010 = 1;
}
@@ -1300,14 +1300,14 @@ int daAlink_c::procDungeonWarp() {
field_0x3012 = 1;
}
mCurrent.mPosition.y += 5.0f;
current.pos.y += 5.0f;
field_0x2b98 = (1.0f - mScale.y) * 100.0f;
} else if (mCommonCounter >= 0x2000) {
cLib_chaseF(&mScale.x, 0.8f, 0.01f);
}
mScale.z = mScale.x;
field_0x0650->setBaseScale(mScale);
mpLinkModel->setBaseScale(mScale);
}
return 1;
+3 -3
View File
@@ -73,8 +73,8 @@ bool daAlink_c::exchangeGrabActor(fopAc_ac_c* p_actor) {
actor->mCollisionRot.z = 0;
actor->mCollisionRot.x = 0;
if (checkGrabCarryActor()) {
actor->mCurrent.mAngle.z = 0;
actor->mCurrent.mAngle.x = 0;
actor->current.angle.z = 0;
actor->current.angle.x = 0;
}
setGrabItemActor(p_actor);
return true;
@@ -87,7 +87,7 @@ bool daAlink_c::setForceGrab(fopAc_ac_c* p_actor, int param_1, int param_2) {
((i_checkModeFlg(MODE_UNK_10000000) &&
(checkHorseNoUpperAnime() || checkHorseTurnAnime())) ||
param_2 != 0 && checkHookshotAnime()))) {
deleteEquipItem(1, 0);
deleteEquipItem(TRUE, FALSE);
setGrabItemActor(p_actor);
field_0x33e4 = lit_8785;
setGrabUpperAnime(daAlinkHIO_basic_c0::m.mAnmBlendFactor);
+1 -1
View File
@@ -236,7 +236,7 @@ void daAlink_c::setHookshotModel() {
field_0x122C[0].SetAtAtp(0);
field_0x122C[0].SetR(lit_7808);
field_0x122C[0].SetAtSe(8);
field_0x122C[0].SetAtType(0x4000);
field_0x122C[0].SetAtType(AT_TYPE_HOOKSHOT);
field_0x122C[0].SetAtHitMark(1);
field_0x122C[0].OnAtSetBit();
field_0x122C[0].SetAtHitCallback(daAlink_hookshotAtHitCallBack);
+38 -38
View File
@@ -1,7 +1,7 @@
/* 800C2DDC-800C2EAC 0BD71C 00D0+00 17/17 0/0 0/0 .text
* procPreActionUnequipInit__9daAlink_cFiP10fopAc_ac_c */
#ifdef NONMATCHING
void daAlink_c::procPreActionUnequipInit(int param_0, fopAc_ac_c* param_1) {
int daAlink_c::procPreActionUnequipInit(int param_0, fopAc_ac_c* param_1) {
commonProcInit(ACT_PROC_PREACTION_UNEQUIP);
mNormalSpeed = 0.0f;
setBlendMoveAnime(4.0f);
@@ -31,7 +31,7 @@ void daAlink_c::procPreActionUnequipInit(int param_0, fopAc_ac_c* param_1) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void daAlink_c::procPreActionUnequipInit(int param_0, fopAc_ac_c* param_1) {
asm int daAlink_c::procPreActionUnequipInit(int param_0, fopAc_ac_c* param_1) {
nofralloc
#include "asm/d/a/d_a_alink/procPreActionUnequipInit__9daAlink_cFiP10fopAc_ac_c.s"
}
@@ -55,7 +55,7 @@ int daAlink_c::procServiceWaitInit() {
commonProcInit(PROC_SERVICE_WAIT);
setSingleAnimeBase(ANM_SERVICE_WAIT);
mNormalSpeed = FLOAT_LABEL(lit_6108);
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
field_0x2f98 = 4;
return 1;
}
@@ -249,7 +249,7 @@ int daAlink_c::procWaitTurnInit() {
mNormalSpeed = FLOAT_LABEL(lit_6108);
}
field_0x300e = field_0x2fe2;
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
return 1;
}
@@ -263,7 +263,7 @@ int daAlink_c::procWaitTurn() {
return procFloorDownReboundInit();
} else {
s16 angle = cLib_addCalcAngleS(&mCollisionRot.y, field_0x300e, 30, 0x3CDF, 8000);
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
if (checkNextActionFromButton()) {
return 1;
} else {
@@ -297,7 +297,7 @@ int daAlink_c::procMoveTurnInit(int param_0) {
field_0x300e = (daAlinkHIO_move_c0::m.mMaxTurnAngle << 2) + 19030;
field_0x3010 = daAlinkHIO_move_c0::m.mMaxTurnAngle << 1;
field_0x300a = 2;
mCurrent.mAngle.y = field_0x2fe2;
current.angle.y = field_0x2fe2;
mNormalSpeed *= lit_5943;
} else {
field_0x300e = daAlinkHIO_move_c0::m.mMaxTurnAngle << 1;
@@ -312,7 +312,7 @@ int daAlink_c::procMoveTurnInit(int param_0) {
/* 800C3D38-800C3DA0 0BE678 0068+00 1/0 0/0 0/0 .text procMoveTurn__9daAlink_cFv */
int daAlink_c::procMoveTurn() {
setSpeedAndAngleNormal();
cLib_addCalcAngleS(&mCollisionRot.y, mCurrent.mAngle.y, field_0x300a, field_0x300e,
cLib_addCalcAngleS(&mCollisionRot.y, current.angle.y, field_0x300a, field_0x300e,
field_0x3010);
if (!checkNextAction(0)) {
@@ -331,7 +331,7 @@ int daAlink_c::procSideStepInit(int jump_type) {
field_0x2f98 = jump_type;
if (field_0x2f98 == 1) {
mCurrent.mAngle.y = mCollisionRot.y + 0x8000;
current.angle.y = mCollisionRot.y + 0x8000;
setSingleAnimeParam(ANM_BACK_JUMP, &daAlinkHIO_sideStep_c0::m.mBackJumpAnm);
mNormalSpeed = daAlinkHIO_sideStep_c0::m.mBackJumpSpeedH;
mSpeed.y = daAlinkHIO_sideStep_c0::m.mBackJumpSpeedV;
@@ -340,10 +340,10 @@ int daAlink_c::procSideStepInit(int jump_type) {
daAlink_ANM anm_id;
if (field_0x2f98 == 2) {
anm_id = ANM_SIDE_STEP_LEFT;
mCurrent.mAngle.y = mCollisionRot.y + 0x4000;
current.angle.y = mCollisionRot.y + 0x4000;
} else {
anm_id = ANM_SIDE_STEP_RIGHT;
mCurrent.mAngle.y = mCollisionRot.y - 0x4000;
current.angle.y = mCollisionRot.y - 0x4000;
}
setSingleAnimeParam(anm_id, &daAlinkHIO_sideStep_c0::m.mSideJumpAnm);
mNormalSpeed = daAlinkHIO_sideStep_c0::m.mSideJumpSpeedH;
@@ -367,9 +367,9 @@ int daAlink_c::procSideStep() {
s16 actor_angle = fopAcM_searchActorAngleY(this, mTargetedActor);
cLib_addCalcAngleS(&mCollisionRot.y, actor_angle, 5, 0x5E8, 0x13C);
if (field_0x2f98 == 2) {
mCurrent.mAngle.y = mCollisionRot.y + 0x4000;
current.angle.y = mCollisionRot.y + 0x4000;
} else {
mCurrent.mAngle.y = mCollisionRot.y - 0x4000;
current.angle.y = mCollisionRot.y - 0x4000;
}
}
if (doTrigger() && field_0x300a != 0) {
@@ -387,7 +387,7 @@ int daAlink_c::procSideStep() {
} else if (checkNoUpperAnime() && checkForceSwordSwing()) {
setCutDash(1, 0);
} else if (mDemo.getDemoMode() != 16 &&
mCurrent.mPosition.y < mLastJumpPos.y - daAlinkHIO_sideStep_c0::m.mFallHeight) {
current.pos.y < mLastJumpPos.y - daAlinkHIO_sideStep_c0::m.mFallHeight) {
return procFallInit(2, daAlinkHIO_sideStep_c0::m.mFallInterpolation);
}
@@ -433,7 +433,7 @@ int daAlink_c::procSideStepLandInit() {
i_onResetFlg1(0x30);
mNormalSpeed = FLOAT_LABEL(lit_6108);
mCommonCounter = 0;
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
setStepLandVibration();
return 1;
}
@@ -472,7 +472,7 @@ int daAlink_c::procSlideInit(s16 param_0) {
field_0x814.SetWeight(255);
field_0x3090 = 8;
mCurrent.mAngle.y = param_0;
current.angle.y = param_0;
if (getMoveBGActorName(mLinkAcch.m_gnd, 0) == 0xD4) {
field_0x300e = 1;
@@ -550,14 +550,14 @@ int daAlink_c::procSlideLand() {
}
if (ctrl->checkAnmEnd()) {
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
checkNextAction(0);
} else {
if (ctrl->getFrame() > field_0x3478) {
s16 tmp_angle = mCurrent.mAngle.y;
mCurrent.mAngle.y = mCollisionRot.y;
s16 tmp_angle = current.angle.y;
current.angle.y = mCollisionRot.y;
if (!checkNextAction(1)) {
mCurrent.mAngle.y = tmp_angle;
current.angle.y = tmp_angle;
}
}
}
@@ -599,7 +599,7 @@ int daAlink_c::procFrontRollInit() {
} else {
mNormalSpeed *= daAlinkHIO_magneBoots_c0::m.mWaterVelocityX;
}
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
voiceStart(Z2SE_AL_V_BACKTEN);
mCommonCounter = 0;
setFootEffectProcType(0);
@@ -607,7 +607,7 @@ int daAlink_c::procFrontRollInit() {
i_onNoResetFlg0(2);
}
if (i_checkEquipHeavyBoots()) {
field_0xFB8.SetAtType(0x200000);
field_0xFB8.SetAtType(AT_TYPE_HEAVY_BOOTS);
field_0xFB8.SetAtHitMark(1);
field_0xFB8.SetAtSe(9);
field_0xFB8.SetAtAtp(2);
@@ -1016,7 +1016,7 @@ int daAlink_c::procCoMetamorphoseInit() {
mCommonCounter = mCollisionRot.x;
}
} else {
deleteEquipItem(0, 1);
deleteEquipItem(FALSE, TRUE);
if (i_checkEndResetFlg0(ERFLG0_UNK_2) && checkStageName("D_MN08")) {
field_0x3010 = 1;
@@ -1046,22 +1046,22 @@ int daAlink_c::procCoMetamorphoseInit() {
field_0x3588 = l_waitBaseAnime;
field_0x3480 = daAlinkHIO_basic_c0::m.mLinkWolfTransformSpeed;
cXyz pos(mCurrent.mPosition.x + (cM_ssin(mCollisionRot.y) * 100.0f),
mCurrent.mPosition.y + 300.0f,
mCurrent.mPosition.z + (cM_scos(mCollisionRot.y) * 100.0f));
cXyz pos(current.pos.x + (cM_ssin(mCollisionRot.y) * 100.0f),
current.pos.y + 300.0f,
current.pos.z + (cM_scos(mCollisionRot.y) * 100.0f));
mLinkGndChk.SetPos(&pos);
f32 gnd_cross = dComIfG_Bgsp().GroundCross(&mLinkGndChk);
if (gnd_cross != -1000000000.0f) {
pos.y = -1000000000.0f;
cXyz tmp_4c = mCurrent.mPosition;
cXyz tmp_4c = current.pos;
cXyz tmp_58 = pos;
BOOL check = false;
for (int i = 0; i < 4; i++) {
if (i == 3) {
tmp_4c.y = gnd_cross + 5.0f;
} else {
tmp_4c.y = mCurrent.mPosition.y + field_0x18B0[i].GetWallH();
tmp_4c.y = current.pos.y + field_0x18B0[i].GetWallH();
}
tmp_58.y = tmp_4c.y;
@@ -1076,7 +1076,7 @@ int daAlink_c::procCoMetamorphoseInit() {
if (check) {
mCommonCounter = field_0x2ff0;
} else {
pos -= mCurrent.mPosition;
pos -= current.pos;
pos.atan2sY_XZ();
mCommonCounter = svar8;
@@ -1093,7 +1093,7 @@ int daAlink_c::procCoMetamorphoseInit() {
field_0x3012 = 0;
}
field_0x3484 = mCurrent.mPosition.y;
field_0x3484 = current.pos.y;
return 1;
}
#else
@@ -1671,7 +1671,7 @@ u32 daAlink_c::checkHorseRide() const {
/* 800CF298-800CF2B4 0C9BD8 001C+00 1/0 0/0 0/0 .text getLeftItemMatrix__9daAlink_cFv */
MtxP daAlink_c::getLeftItemMatrix() {
return field_0x0650->i_getAnmMtx(field_0x30c0);
return mpLinkModel->i_getAnmMtx(field_0x30c0);
}
/* 800CF2B4-800CF2C8 0C9BF4 0014+00 1/0 0/0 0/0 .text checkBoarRide__9daAlink_cCFv */
@@ -1686,12 +1686,12 @@ u32 daAlink_c::checkSpinnerRide() const {
/* 800CF2DC-800CF2F8 0C9C1C 001C+00 1/0 0/0 0/0 .text getLeftHandMatrix__9daAlink_cFv */
MtxP daAlink_c::getLeftHandMatrix() {
return field_0x0650->i_getAnmMtx(field_0x30b8);
return mpLinkModel->i_getAnmMtx(field_0x30b8);
}
/* 800CF2F8-800CF314 0C9C38 001C+00 1/0 0/0 0/0 .text getRightHandMatrix__9daAlink_cFv */
MtxP daAlink_c::getRightHandMatrix() {
return field_0x0650->i_getAnmMtx(field_0x30ba);
return mpLinkModel->i_getAnmMtx(field_0x30ba);
}
/* 800CF314-800CF328 0C9C54 0014+00 1/0 0/0 0/0 .text
@@ -1704,7 +1704,7 @@ void daAlink_c::onSceneChangeArea(u8 exitID, u8 exitDirection, fopAc_ac_c* scexA
/* 800CF328-800CF344 0C9C68 001C+00 1/0 0/0 0/0 .text getRightItemMatrix__9daAlink_cFv */
MtxP daAlink_c::getRightItemMatrix() {
return field_0x0650->i_getAnmMtx(field_0x30c2);
return mpLinkModel->i_getAnmMtx(field_0x30c2);
}
/* 800CF344-800CF380 0C9C84 003C+00 1/0 0/0 0/0 .text checkPlayerNoDraw__9daAlink_cFv */
@@ -1995,7 +1995,7 @@ void daAlink_c::setMidnaMsgNum(fopAc_ac_c* param_0, u16 pMsgNum) {
/* 800D0290-800D029C 0CABD0 000C+00 1/0 0/0 0/0 .text getModelMtx__9daAlink_cFv */
MtxP daAlink_c::getModelMtx() {
return field_0x0650->getBaseTRMtx();
return mpLinkModel->getBaseTRMtx();
}
/* 800D029C-800D02A4 0CABDC 0008+00 1/0 0/0 0/0 .text getInvMtx__9daAlink_cFv */
@@ -2005,17 +2005,17 @@ MtxP daAlink_c::getInvMtx() {
/* 800D02A4-800D02B8 0CABE4 0014+00 1/0 0/0 0/0 .text getLinkBackBone1Matrix__9daAlink_cFv */
MtxP daAlink_c::getLinkBackBone1Matrix() {
return field_0x0650->i_getAnmMtx(1);
return mpLinkModel->i_getAnmMtx(1);
}
/* 800D02B8-800D02CC 0CABF8 0014+00 1/0 0/0 0/0 .text getWolfMouthMatrix__9daAlink_cFv */
MtxP daAlink_c::getWolfMouthMatrix() {
return field_0x0650->i_getAnmMtx(13);
return mpLinkModel->i_getAnmMtx(13);
}
/* 800D02CC-800D02E0 0CAC0C 0014+00 1/0 0/0 0/0 .text getWolfBackbone2Matrix__9daAlink_cFv */
MtxP daAlink_c::getWolfBackbone2Matrix() {
return field_0x0650->i_getAnmMtx(2);
return mpLinkModel->i_getAnmMtx(2);
}
/* 800D02E0-800D0334 0CAC20 0054+00 1/0 0/0 0/0 .text getBottleMtx__9daAlink_cFv */
@@ -2029,7 +2029,7 @@ MtxP daAlink_c::getBottleMtx() {
/* 800D0334-800D0350 0CAC74 001C+00 1/0 0/0 0/0 .text getHeadMtx__9daAlink_cFv */
MtxP daAlink_c::getHeadMtx() {
return field_0x0650->i_getAnmMtx(field_0x30b4);
return mpLinkModel->i_getAnmMtx(field_0x30b4);
}
/* 800D0350-800D0358 0CAC90 0008+00 1/0 0/0 0/0 .text getGroundY__9daAlink_cFv */
+17 -17
View File
@@ -111,11 +111,11 @@ asm bool daAlink_c::checkSpinnerTriggerAttack() {
void daAlink_c::setSpinnerSyncPos() {
daSpinner_c* spinner = (daSpinner_c*)mRideAcKeep.getActor();
mDoMtx_multVecZero(spinner->getModelMtx(), &mCurrent.mPosition);
mDoMtx_multVecZero(spinner->getModelMtx(), &current.pos);
mDoMtx_stack_c::ZXYrotS(spinner->mCollisionRot);
mDoMtx_stack_c::YrotM(mCollisionRot.y - spinner->mCollisionRot.y);
mDoMtx_MtxToRot(mDoMtx_stack_c::get(), &mCollisionRot);
field_0x37a4 = spinner->mCurrent.mPosition;
field_0x37a4 = spinner->current.pos;
}
/* 8010DC64-8010DDCC 1085A4 0168+00 1/1 0/0 0/0 .text procSpinnerReadyInit__9daAlink_cFv
@@ -124,7 +124,7 @@ void daAlink_c::setSpinnerSyncPos() {
#ifdef NONMATCHING
int daAlink_c::procSpinnerReadyInit() {
fopAc_ac_c* spinner = (fopAc_ac_c*)fopAcM_fastCreate(
PROC_SPINNER, daSpinner_c::getWaitArg(), &mCurrent.mPosition, fopAcM_GetRoomNo(this),
PROC_SPINNER, daSpinner_c::getWaitArg(), &current.pos, fopAcM_GetRoomNo(this),
&mCollisionRot, NULL, -1, NULL, NULL);
if (spinner == NULL) {
@@ -144,9 +144,9 @@ int daAlink_c::procSpinnerReadyInit() {
seStartOnlyReverb(Z2SE_AL_SPINNER_START);
field_0x2f99 = 15;
deleteEquipItem(1, 1);
deleteEquipItem(TRUE, TRUE);
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
field_0x3588 = l_waitBaseAnime;
field_0x33b0 = field_0x3588.y;
field_0x34d4 = l_waitBaseAnime;
@@ -173,15 +173,15 @@ int daAlink_c::procSpinnerReady() {
return checkNextAction(0);
}
mCurrent.mPosition.x = spinner->mCurrent.mPosition.x;
mCurrent.mPosition.z = spinner->mCurrent.mPosition.z;
current.pos.x = spinner->current.pos.x;
current.pos.z = spinner->current.pos.z;
mCommonCounter--;
field_0x2f99 = 15;
if ((mCommonCounter < 0 && mCurrent.mPosition.y <= spinner->getModelMtx()[1][3]) ||
if ((mCommonCounter < 0 && current.pos.y <= spinner->getModelMtx()[1][3]) ||
mCommonCounter < -30) {
mCurrent.mPosition.y = spinner->getModelMtx()[1][3];
current.pos.y = spinner->getModelMtx()[1][3];
procSpinnerWaitInit();
}
@@ -216,7 +216,7 @@ int daAlink_c::procSpinnerWaitInit() {
field_0x3198 = ANM_SPINNER_RIDE;
field_0x33b0 = 70.0f;
field_0x3012 = 0;
field_0x37a4 = mRideAcKeep.getActor()->mCurrent.mPosition;
field_0x37a4 = mRideAcKeep.getActor()->current.pos;
return 1;
}
@@ -264,7 +264,7 @@ int daAlink_c::procSpinnerWait() {
mCollisionRot.y -= angle;
}
mCurrent.mAngle.y = mCollisionRot.y;
current.angle.y = mCollisionRot.y;
field_0x300e = mCollisionRot.y;
}
} else {
@@ -282,18 +282,18 @@ int daAlink_c::procSpinnerWait() {
if (spinner->checkPathMoveNow() == NULL) {
seStartOnlyReverbLevel(Z2SE_AL_SPINNER_RIDE);
setSpinnerStatus(ACTION_STR_ATTACK, 0);
setSpinnerStatus(ACTION_STR_ATTACK, ACTION_FLG_DEFAULT);
} else {
seStartOnlyReverbLevel(Z2SE_AL_SPINNER_RAIL);
setSpinnerStatus(ACTION_STR_JUMP2, 0);
setSpinnerStatus(ACTION_STR_JUMP2, ACTION_FLG_DEFAULT);
}
mNormalSpeed = spinner->mSpeedF;
mCurrent.mAngle.y = spinner->mCurrent.mAngle.y;
current.angle.y = spinner->current.angle.y;
if (spinner->checkSpinnerTagIntoIncRot()) {
field_0x3012 = 1;
setSpinnerStatus(ACTION_STR_SPIN, 4);
setSpinnerStatus(ACTION_STR_SPIN, ACTION_FLG_CONTINUATION);
if (field_0x3198 != ANM_SPINNER_PUSH && field_0x2060->getOldFrameRate() < 0.01f) {
setSingleAnimeBaseSpeed(ANM_SPINNER_RIDE, daAlinkHIO_board_c0::m.mSitAnmSpeed,
@@ -303,9 +303,9 @@ int daAlink_c::procSpinnerWait() {
}
} else if (spinner->checkSpinnerTagInto()) {
if (field_0x3012 != 0) {
setSpinnerStatus(ACTION_STR_SPIN, 4);
setSpinnerStatus(ACTION_STR_SPIN, ACTION_FLG_CONTINUATION);
} else {
setSpinnerStatus(ACTION_STR_SPIN, 0);
setSpinnerStatus(ACTION_STR_SPIN, ACTION_FLG_DEFAULT);
}
if ((field_0x3198 == ANM_SPINNER_PUSH && field_0x2060->getOldFrameRate() < 0.01f) ||
+1 -1
View File
@@ -22,7 +22,7 @@ void daAlink_c::sumouPunchTrigger() {
/* 800EA92C-800EA950 0E526C 0024+00 5/5 0/0 0/0 .text setSumouPunchStatus__9daAlink_cFv
*/
void daAlink_c::setSumouPunchStatus() {
setBStatus(0x44);
setBStatus(ACTION_STR_SLAP);
}
/* 800EA950-800EAA28 0E5290 00D8+00 4/4 0/0 0/0 .text procSumouReadyInit__9daAlink_cFv */
+8 -8
View File
@@ -23,10 +23,10 @@ void daAlink_c::statusWindowExecute(cXyz const* param_0, s16 param_1) {
mDoMtx_stack_c::transS(*param_0);
mDoMtx_stack_c::YrotM(param_1);
field_0x0650->i_setBaseTRMtx(mDoMtx_stack_c::get());
mpLinkModel->i_setBaseTRMtx(mDoMtx_stack_c::get());
m_sWindowBck->play();
m_sWindowBck->entry(field_0x064C);
field_0x0650->calc();
mpLinkModel->calc();
if (i_checkWolf()) {
setWolfItemMatrix();
@@ -39,7 +39,7 @@ void daAlink_c::statusWindowExecute(cXyz const* param_0, s16 param_1) {
/* 80140984-80140AC8 13B2C4 0144+00 0/0 1/1 0/0 .text statusWindowDraw__9daAlink_cFv */
void daAlink_c::statusWindowDraw() {
if (mClothesChangeWaitTimer == 0) {
g_env_light.settingTevStruct(12, &mCurrent.mPosition, &mTevStr);
g_env_light.settingTevStruct(12, &current.pos, &mTevStr);
initTevCustomColor();
if (!i_checkWolf()) {
@@ -47,12 +47,12 @@ void daAlink_c::statusWindowDraw() {
setDrawHand();
}
basicModelDraw(field_0x0650);
basicModelDraw(mpLinkModel);
if (!i_checkWolf()) {
basicModelDraw(field_0x065c);
basicModelDraw(field_0x0658);
basicModelDraw(field_0x0654);
basicModelDraw(mpLinkHatModel);
basicModelDraw(mpLinkFaceModel);
if (i_checkEquipHeavyBoots()) {
for (int i = 0; i < 2; i++) {
@@ -64,7 +64,7 @@ void daAlink_c::statusWindowDraw() {
if (checkSwordDraw()) {
basicModelDraw(mSwordModel);
if (!checkWoodSwordEquip()) {
basicModelDraw(field_0x06bc);
basicModelDraw(mSheathModel);
}
}
@@ -85,7 +85,7 @@ void daAlink_c::resetStatusWindow() {
}
setMatrix();
field_0x0650->calc();
mpLinkModel->calc();
i_onNoResetFlg2(0x400000);
setSelectEquipItem(0);
+82 -43
View File
@@ -1,72 +1,111 @@
#include "rel/d/a/obj/d_a_obj_yobikusa/d_a_obj_yobikusa.h"
/* 8011174C-80111770 10C08C 0024+00 1/1 0/0 0/0 .text daAlink_searchWhistle__FP10fopAc_ac_cPv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void daAlink_searchWhistle(fopAc_ac_c* param_0, void* param_1) {
nofralloc
#include "asm/d/a/d_a_alink/daAlink_searchWhistle__FP10fopAc_ac_cPv.s"
static fopAc_ac_c* daAlink_searchWhistle(fopAc_ac_c* p_actor, void*) {
if (daAlink_getAlinkActorClass()->getGrassHowlEventActor() == fopAcM_GetName(p_actor)) {
return p_actor;
}
return NULL;
}
#pragma pop
/* 80111770-80111784 10C0B0 0014+00 1/1 0/0 0/0 .text daAlink_searchHawk__FP10fopAc_ac_cPv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void daAlink_searchHawk(fopAc_ac_c* param_0, void* param_1) {
nofralloc
#include "asm/d/a/d_a_alink/daAlink_searchHawk__FP10fopAc_ac_cPv.s"
}
#pragma pop
static fopAc_ac_c* daAlink_searchHawk(fopAc_ac_c* p_actor, void*) {
if (fopAcM_GetName(p_actor) == PROC_NPC_TK) {
return p_actor;
}
/* ############################################################################################## */
/* 8045069C-804506A4 -00001 0008+00 1/1 0/0 0/0 .sdata grassWhistleArcName$33096 */
SECTION_SDATA static void* grassWhistleArcName[2] = {
(void*)(((char*)&d_a_d_a_alink__stringBase0) + 0xAD),
(void*)(((char*)&d_a_d_a_alink__stringBase0) + 0xB4),
};
return NULL;
}
/* 80111784-8011181C 10C0C4 0098+00 1/1 0/0 0/0 .text setGrassWhistleModel__9daAlink_cFi
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void daAlink_c::setGrassWhistleModel(int param_0) {
nofralloc
#include "asm/d/a/d_a_alink/setGrassWhistleModel__9daAlink_cFi.s"
void daAlink_c::setGrassWhistleModel(int modelType) {
static const char* grassWhistleArcName[2] = {
"J_Tobi",
"J_Umak",
};
JKRHeap* heap = setItemHeap();
J3DModelData* modeldata = (J3DModelData*)dComIfG_getObjectRes(grassWhistleArcName[modelType],
grassWhistleIdx[modelType]);
mHeldItemModel = mDoExt_J3DModel__create(modeldata, 0x80000, 0x11000084);
mDoExt_setCurrentHeap(heap);
mEquipItem = 0x104;
field_0x2f94 = 2;
}
#pragma pop
/* 8011181C-80111894 10C15C 0078+00 1/1 0/0 0/0 .text setHorseWhistleModel__9daAlink_cFv
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void daAlink_c::setHorseWhistleModel() {
nofralloc
#include "asm/d/a/d_a_alink/setHorseWhistleModel__9daAlink_cFv.s"
void daAlink_c::setHorseWhistleModel() {
JKRHeap* heap = setItemHeap();
mHeldItemModel = initModel(loadAramBmd(0x31A, 0x3000), 0);
mDoExt_setCurrentHeap(heap);
mEquipItem = HORSE_FLUTE;
field_0x2f94 = 2;
}
#pragma pop
/* 80111894-801119D8 10C1D4 0144+00 2/2 0/0 0/0 .text procGrassWhistleGetInit__9daAlink_cFv */
// matches with literals
#ifdef NONMATCHING
int daAlink_c::procGrassWhistleGetInit() {
if (mEquipItem != NO_ITEM) {
return procPreActionUnequipInit(PROC_GRASS_WHISTLE_GET, field_0x27f4);
}
commonProcInit(PROC_GRASS_WHISTLE_GET);
mNormalSpeed = 0.0f;
current.angle.y = mCollisionRot.y;
field_0x2f98 = 4;
setSingleAnimeParam(ANM_GRASS_WHISTLE_GRAB, &daAlinkHIO_bottle_c0::m.field_0x50);
field_0x2f92 = 0xFE;
field_0x280c.setData(field_0x27f4);
daObjYobikusa_c* yobikusa = (daObjYobikusa_c*)field_0x27f4;
mCommonCounter = yobikusa->getType();
field_0x300e = yobikusa->getPathID();
field_0x3010 = yobikusa->isPlayerCorrect();
field_0x3012 = yobikusa->mCollisionRot.y + 0x8000;
field_0x37c8.set(yobikusa->current.pos.x + cM_ssin(yobikusa->mCollisionRot.y) * 50.0f,
yobikusa->current.pos.y + 50.0f,
yobikusa->current.pos.z + cM_scos(yobikusa->mCollisionRot.y) * 50.0f);
voiceStart(Z2SE_AL_V_SWING_BOTTLE);
return 1;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void daAlink_c::procGrassWhistleGetInit() {
asm int daAlink_c::procGrassWhistleGetInit() {
nofralloc
#include "asm/d/a/d_a_alink/procGrassWhistleGetInit__9daAlink_cFv.s"
}
#pragma pop
#endif
/* 801119D8-80111A9C 10C318 00C4+00 1/0 0/0 0/0 .text procGrassWhistleGet__9daAlink_cFv
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void daAlink_c::procGrassWhistleGet() {
nofralloc
#include "asm/d/a/d_a_alink/procGrassWhistleGet__9daAlink_cFv.s"
int daAlink_c::procGrassWhistleGet() {
daPy_frameCtrl_c* frameCtrl = mFrameCtrl1;
if (frameCtrl->checkAnmEnd()) {
procGrassWhistleWaitInit(mCommonCounter, field_0x300e, field_0x3010, field_0x3012, &field_0x37c8);
} else if (mEquipItem == NO_ITEM && frameCtrl->getFrame() >= lit_7710) {
setGrassWhistleModel(mCommonCounter);
if (field_0x280c.getActor() != NULL) {
fopAcM_setCarryNow(field_0x280c.getActor(), 0);
seStartOnlyReverb(Z2SE_AL_PICKUP_GRASS);
}
}
return 1;
}
#pragma pop
/* 80111A9C-80111CA4 10C3DC 0208+00 2/2 0/0 0/0 .text
* procGrassWhistleWaitInit__9daAlink_cFiiisP4cXyz */
+4 -4
View File
@@ -166,7 +166,7 @@ void daItemBase_c::settingBeforeDraw() {
/* 80144D18-80144D70 13F658 0058+00 1/0 0/0 8/0 .text setTevStr__12daItemBase_cFv */
void daItemBase_c::setTevStr() {
g_env_light.settingTevStruct(0, &mCurrent.mPosition, &mTevStr);
g_env_light.settingTevStruct(0, &current.pos, &mTevStr);
g_env_light.setLightTevColorType_MAJI(mpModel, &mTevStr);
}
@@ -176,7 +176,7 @@ void daItemBase_c::setShadow() {
if (!chkFlag(0x10)) {
if (getShadowSize() != 0.0f) {
dComIfGd_setSimpleShadow(&mCurrent.mPosition, mAcch.GetGroundH(), scale,
dComIfGd_setSimpleShadow(&current.pos, mAcch.GetGroundH(), scale,
mAcch.m_gnd, 0, 1.0f,
dDlst_shadowControl_c::getSimpleTex());
}
@@ -187,8 +187,8 @@ void daItemBase_c::setShadow() {
}
field_0x91c =
dComIfGd_setShadow(field_0x91c, 3, mpModel, &mCurrent.mPosition, shadowSize, 0.0f,
mCurrent.mPosition.y, mAcch.GetGroundH(), mAcch.m_gnd,
dComIfGd_setShadow(field_0x91c, 3, mpModel, &current.pos, shadowSize, 0.0f,
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd,
&mTevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
}
}
+19 -19
View File
@@ -1665,12 +1665,12 @@ int daNpcT_c::loadRes(s8 const* resNoList, char const** resNameList) {
return cPhs_COMPLEATE_e;
}
int status = dComIfG_resLoad(&field_0x8e0[i], resNameList[resNoList[i]]);
if (status == cPhs_COMPLEATE_e) {
int phase_state = dComIfG_resLoad(&field_0x8e0[i], resNameList[resNoList[i]]);
if (phase_state == cPhs_COMPLEATE_e) {
resLoad_cnt++;
}
if (status == cPhs_ERROR_e || status == 3) {
if (phase_state == cPhs_ERROR_e || phase_state == cPhs_UNK3_e) {
return cPhs_ERROR_e;
}
}
@@ -1702,7 +1702,7 @@ int daNpcT_c::execute() {
fopAcM_posMoveF(this, field_0x864.GetCCMoveP());
field_0x68c.CrrPos(dComIfG_Bgsp());
field_0x930 = field_0x68c.m_gnd;
field_0xdca = fopAcM_getPolygonAngle(field_0x930, mCurrent.mAngle.y);
field_0xdca = fopAcM_getPolygonAngle(field_0x930, current.angle.y);
field_0xdf4 = field_0x68c.GetGroundH();
if (field_0xdf4 != -1000000000.0f) {
field_0xda8 = dKy_pol_sound_get(&field_0x68c.m_gnd);
@@ -1819,13 +1819,13 @@ int daNpcT_c::draw(int param_0, int param_1, f32 param_2, GXColorS10* color, f32
if (param_5 != 0) {
drawGhost();
} else if (field_0xa89 != 0) {
g_env_light.settingTevStruct(4, &mCurrent.mPosition, &mTevStr);
g_env_light.settingTevStruct(4, &current.pos, &mTevStr);
g_env_light.setLightTevColorType_MAJI(modelData, &mTevStr);
dComIfGd_setListDark();
mMcaMorfAnm[0]->entryDL();
dComIfGd_setList();
} else {
g_env_light.settingTevStruct(0, &mCurrent.mPosition, &mTevStr);
g_env_light.settingTevStruct(0, &current.pos, &mTevStr);
g_env_light.setLightTevColorType_MAJI(modelData, &mTevStr);
mMcaMorfAnm[0]->entryDL();
}
@@ -1849,10 +1849,10 @@ int daNpcT_c::draw(int param_0, int param_1, f32 param_2, GXColorS10* color, f32
if (param_6 == 0) {
if (param_7 == 0) {
field_0xd94 = dComIfGd_setShadow(
field_0xd94, 1, model, &mCurrent.mPosition, param_2, param_4, mCurrent.mPosition.y,
field_0xd94, 1, model, &current.pos, param_2, param_4, current.pos.y,
field_0xdf4, field_0x930, &mTevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
} else {
dComIfGd_setSimpleShadow(&mCurrent.mPosition, field_0xdf4, param_4, field_0x930, 0,
dComIfGd_setSimpleShadow(&current.pos, field_0xdf4, param_4, field_0x930, 0,
1.0f, dDlst_shadowControl_c::getSimpleTex());
}
}
@@ -1931,7 +1931,7 @@ void daNpcT_c::setMtx() {
J3DModel* model = mMcaMorfAnm[0]->getModel();
J3DModelData* modelData = model->getModelData();
mDoMtx_stack_c::transS(mCurrent.mPosition);
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::ZXYrotM(field_0xd78);
mDoMtx_stack_c::scaleM(mScale);
@@ -2102,26 +2102,26 @@ void daNpcT_c::setPos(cXyz i_pos) {
field_0x930.SetPos(&i_pos);
i_pos.y = dComIfG_Bgsp().GroundCross(&field_0x930);
mCurrent.mPosition = i_pos;
mNext.mPosition = mCurrent.mPosition;
current.pos = i_pos;
next.pos = current.pos;
}
/* 8014A99C-8014AA18 1452DC 007C+00 0/0 0/0 29/29 .text setAngle__8daNpcT_cF5csXyz */
void daNpcT_c::setAngle(csXyz i_angle) {
mCurrent.mAngle = i_angle;
mCollisionRot = mCurrent.mAngle;
field_0xd78 = mCurrent.mAngle;
current.angle = i_angle;
mCollisionRot = current.angle;
field_0xd78 = current.angle;
field_0xd7e = field_0xd78;
mNext.mAngle = mCurrent.mAngle;
next.angle = current.angle;
}
/* 8014AA18-8014AA40 145358 0028+00 0/0 0/0 138/138 .text setAngle__8daNpcT_cFs */
void daNpcT_c::setAngle(s16 i_angle) {
mCurrent.mAngle.y = i_angle;
mCollisionRot.y = mCurrent.mAngle.y;
field_0xd78.y = mCurrent.mAngle.y;
current.angle.y = i_angle;
mCollisionRot.y = current.angle.y;
field_0xd78.y = current.angle.y;
field_0xd7e.y = field_0xd78.y;
mNext.mAngle.y = mCurrent.mAngle.y;
next.angle.y = current.angle.y;
}
/* 8014AA40-8014AAD0 145380 0090+00 0/0 0/0 33/33 .text hitChk__8daNpcT_cFP12dCcD_GObjInfUl */
+33 -33
View File
@@ -283,7 +283,7 @@ void daItem_c::setBaseMtx() {
/* 8015B190-8015B1C8 155AD0 0038+00 1/1 0/0 0/0 .text setBaseMtx_0__8daItem_cFv */
void daItem_c::setBaseMtx_0() {
mDoMtx_stack_c::transS(mCurrent.mPosition);
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::ZXYrotM(mCollisionRot);
}
@@ -298,7 +298,7 @@ void daItem_c::setBaseMtx_1() {
f32 max_y = mpModel->getModelData()->getJointNodePointer(0)->getMax()->y;
f32 y = max_y * 0.5f * mScale.y;
mDoMtx_stack_c::transS(mCurrent.mPosition);
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::transM(0.0f, y, 0.0f);
mDoMtx_stack_c::ZXYrotM(mCollisionRot);
@@ -641,12 +641,12 @@ int daItem_c::_daItem_create() {
}
if (!field_0x95d) {
field_0x92c = mOrig.mAngle.x;
field_0x92e = mOrig.mAngle.z;
mOrig.mAngle.z = 0;
mOrig.mAngle.x = 0;
mCurrent.mAngle.z = 0;
mCurrent.mAngle.x = 0;
field_0x92c = orig.angle.x;
field_0x92e = orig.angle.z;
orig.angle.z = 0;
orig.angle.x = 0;
current.angle.z = 0;
current.angle.x = 0;
mCollisionRot.z = 0;
mCollisionRot.x = 0;
@@ -658,25 +658,25 @@ int daItem_c::_daItem_create() {
field_0x920 = daItem_prm::getItemBitNo(this);
if (fopAcM_isItem(this, field_0x920)) {
return 5;
return cPhs_ERROR_e;
} else {
int ret = 4;
int phase_state = cPhs_COMPLEATE_e;
if (flag) {
CreateInit();
} else {
ret = dComIfG_resLoad(&mPhase, dItem_data::getFieldArc(m_itemNo));
phase_state = dComIfG_resLoad(&mPhase, dItem_data::getFieldArc(m_itemNo));
if (ret == 4) {
if (phase_state == cPhs_COMPLEATE_e) {
if (!fopAcM_entrySolidHeap(this, (heapCallbackFunc)CheckFieldItemCreateHeap, dItem_data::getFieldHeapSize(m_itemNo))) {
return 5;
return cPhs_ERROR_e;
} else {
CreateInit();
}
}
}
return ret;
return phase_state;
}
}
#else
@@ -714,10 +714,10 @@ int daItem_c::_daItem_execute() {
field_0x950 = mSpeed;
CountTimer();
mEyePos = mCurrent.mPosition;
mEyePos = current.pos;
mEyePos.y += (f32)dItem_data::getH(m_itemNo) * 0.5f;
mAttentionInfo.mPosition = mCurrent.mPosition;
mAttentionInfo.mPosition = current.pos;
if (mCollider.ChkTgHit()) {
cCcD_Obj* hitObj = mCollider.GetTgHitObj();
@@ -737,13 +737,13 @@ int daItem_c::_daItem_execute() {
}
if (fopAcM_checkHookCarryNow(this)) {
cXyz carry_pos = mCurrent.mPosition;
cXyz carry_pos = current.pos;
if (mpModel != NULL) {
carry_pos.y += 0.5f * mpModel->getModelData()->getJointNodePointer(0)->getMax()->y;
}
mDoMtx_stack_c::transS(mCurrent.mPosition);
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::ZXYrotM(mCollisionRot);
mDoMtx_stack_c::inverse();
mDoMtx_stack_c::multVec(&carry_pos, &carry_pos);
@@ -755,11 +755,11 @@ int daItem_c::_daItem_execute() {
setBaseMtx();
field_0x978.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
field_0x96c = mCurrent.mPosition;
field_0x96c = current.pos;
field_0x95f = (fopAcM_checkHookCarryNow(this) >> 0x14) & 1;
if (m_itemNo == ORANGE_RUPEE || m_itemNo == SILVER_RUPEE) {
field_0x9ac = mCurrent.mPosition;
field_0x9ac = current.pos;
field_0x9ac.y += 18.0f;
}
@@ -832,7 +832,7 @@ void daItem_c::procMainNormal() {
}
}
mCollider.SetC(mCurrent.mPosition);
mCollider.SetC(current.pos);
dComIfG_Ccsp()->Set(&mCollider);
}
@@ -863,8 +863,8 @@ SECTION_SDATA2 static f32 lit_4404 = 15.0f;
// literals / addi in wrong place
#ifdef NONMATCHING
void daItem_c::procInitSimpleGetDemo() {
mCurrent.mPosition = daPy_getPlayerActorClass()->getItemPos();
mCurrent.mPosition.y += 15.0f;
current.pos = daPy_getPlayerActorClass()->getItemPos();
current.pos.y += 15.0f;
mCollisionRot.z = 0;
mCollisionRot.x = 0;
mScale = field_0x930;
@@ -910,7 +910,7 @@ void daItem_c::procInitGetDemoEvent() {
fopAcM_orderItemEvent(this, 0, 0);
mEvtInfo.i_onCondition(8);
m_item_id = fopAcM_createItemForTrBoxDemo(&mCurrent.mPosition, m_itemNo, -1, fopAcM_GetRoomNo(this), NULL, NULL);
m_item_id = fopAcM_createItemForTrBoxDemo(&current.pos, m_itemNo, -1, fopAcM_GetRoomNo(this), NULL, NULL);
setStatus(3);
}
@@ -1006,7 +1006,7 @@ void daItem_c::procMainSwOnWait() {
if (i_fopAcM_isSwitch(this, field_0x93c)) {
mAcch.CrrPos(dComIfG_Bgsp());
if (mAcch.ChkWaterHit() && mAcch.m_wtr.GetHeight() > lit_4070[0] + mOrig.mPosition.y) {
if (mAcch.ChkWaterHit() && mAcch.m_wtr.GetHeight() > lit_4070[0] + orig.pos.y) {
field_0x9c0 = 1;
}
@@ -1115,7 +1115,7 @@ void daItem_c::mode_wait() {
break;
}
if (field_0x9c0 == 0 && mAcch.ChkWaterHit() && mAcch.m_wtr.GetHeight() > mCurrent.mPosition.y) {
if (field_0x9c0 == 0 && mAcch.ChkWaterHit() && mAcch.m_wtr.GetHeight() > current.pos.y) {
mode_water_init();
}
@@ -1132,10 +1132,10 @@ SECTION_SDATA2 static f32 lit_4781 = 1.0f / 10.0f;
void daItem_c::mode_water() {
mAcch.CrrPos(dComIfG_Bgsp());
if (!mAcch.ChkWaterHit() || mAcch.m_wtr.GetHeight() < mCurrent.mPosition.y) {
if (!mAcch.ChkWaterHit() || mAcch.m_wtr.GetHeight() < current.pos.y) {
mode_wait_init();
} else {
mCurrent.mPosition.y = mAcch.m_wtr.GetHeight();
current.pos.y = mAcch.m_wtr.GetHeight();
}
f32 var_f1 = 1.0f;
@@ -1160,7 +1160,7 @@ void daItem_c::mode_water() {
break;
}
fopAcM_effHamonSet(&field_0x9b8, &mCurrent.mPosition, var_f1, 0.1f);
fopAcM_effHamonSet(&field_0x9b8, &current.pos, var_f1, 0.1f);
RotateYBase();
}
#else
@@ -1176,7 +1176,7 @@ asm void daItem_c::mode_water() {
/* 8015CE94-8015CEEC 1577D4 0058+00 1/0 0/0 0/0 .text setTevStr__8daItem_cFv */
void daItem_c::setTevStr() {
g_env_light.settingTevStruct(0, &mCurrent.mPosition, &mTevStr);
g_env_light.settingTevStruct(0, &current.pos, &mTevStr);
g_env_light.setLightTevColorType_MAJI(mpModel, &mTevStr);
}
@@ -1323,7 +1323,7 @@ bool daItem_c::checkPlayerGet() {
// matches with literals
#ifdef NONMATCHING
void daItem_c::checkYogan() {
if (mAcch.ChkWaterHit() && mAcch.m_wtr.GetHeight() > mCurrent.mPosition.y + 100.0f) {
if (mAcch.ChkWaterHit() && mAcch.m_wtr.GetHeight() > current.pos.y + 100.0f) {
if (dComIfG_Bgsp().GetPolyAtt0(mAcch.m_wtr) == 6) {
deleteItem();
}
@@ -1528,8 +1528,8 @@ asm void daItem_c::initSpeed(int param_0) {
/* 8015DE38-8015DE50 158778 0018+00 1/1 0/0 0/0 .text initAngle__8daItem_cFv */
void daItem_c::initAngle() {
mCurrent.mAngle.z = 0;
mCurrent.mAngle.x = 0;
current.angle.z = 0;
current.angle.x = 0;
mCollisionRot.z = 0;
mCollisionRot.x = 0;
}
+5 -5
View File
@@ -269,10 +269,10 @@ SECTION_SDATA2 static u8 lit_4381[8] = {
void daPy_boomerangMove_c::bgCheckAfterOffset(cXyz const* param_0) {
daBoomerang_c* boomerang = daPy_py_c::getThrowBoomerangActor();
if (boomerang != NULL) {
field_0x4 = param_0->y - boomerang->mCurrent.mPosition.y;
field_0x8 = boomerang->mCurrent.mPosition.absXZ(*param_0);
field_0x2 = cM_atan2s(param_0->x - boomerang->mCurrent.mPosition.x,
param_0->z - boomerang->mCurrent.mPosition.z);
field_0x4 = param_0->y - boomerang->current.pos.y;
field_0x8 = boomerang->current.pos.absXZ(*param_0);
field_0x2 = cM_atan2s(param_0->x - boomerang->current.pos.x,
param_0->z - boomerang->current.pos.z);
}
}
#else
@@ -606,7 +606,7 @@ asm void daPy_sightPacket_c::setSight() {
* setSightImage__18daPy_sightPacket_cFP7ResTIMG */
void daPy_sightPacket_c::setSightImage(ResTIMG* p_img) {
mpImg = p_img;
mpData = (u8*)p_img + p_img->texDataOffset;
mpData = (u8*)p_img + p_img->imageOffset;
}
/* 8015F398-8015F3C4 159CD8 002C+00 0/0 8/8 10/10 .text checkMasterSwordEquip__9daPy_py_cFv */
+2 -2
View File
@@ -29,12 +29,12 @@ extern "C" void CreateItemHeap__12daItemBase_cFPCcsssssss();
/* 80037C14-80037C1C 032554 0008+00 0/0 1/1 0/0 .text getRotateP__12daShopItem_cFv */
csXyz* daShopItem_c::getRotateP() {
return &mCurrent.mAngle;
return &current.angle;
}
/* 80037C1C-80037C24 03255C 0008+00 0/0 2/2 0/0 .text getPosP__12daShopItem_cFv */
cXyz* daShopItem_c::getPosP() {
return &mCurrent.mPosition;
return &current.pos;
}
/* 803792E8-80379738 -00001 0450+00 1/1 0/0 9/9 .rodata mData__12daShopItem_c */
+2 -2
View File
@@ -169,7 +169,7 @@ int dBgS_MoveBgActor::MoveBGCreateHeap() {
int dBgS_MoveBgActor::MoveBGCreate(char const* p_name, int dzb_id, MoveBGActor_SetFunc set_func,
u32 param_3, Mtx* param_4) {
if (param_4 == NULL) {
mDoMtx_stack_c::transS(mCurrent.mPosition.x, mCurrent.mPosition.y, mCurrent.mPosition.z);
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
mDoMtx_stack_c::YrotM(mCollisionRot.y);
mDoMtx_stack_c::scaleM(mScale.x, mScale.y, mScale.z);
PSMTXCopy(mDoMtx_stack_c::get(), field_0x56c);
@@ -219,7 +219,7 @@ bool dBgS_MoveBgActor::MoveBGExecute() {
bool ret = Execute(&tmp);
if (tmp == NULL) {
mDoMtx_stack_c::transS(mCurrent.mPosition.x, mCurrent.mPosition.y, mCurrent.mPosition.z);
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
mDoMtx_stack_c::YrotM(mCollisionRot.y);
mDoMtx_stack_c::scaleM(mScale.x, mScale.y, mScale.z);
PSMTXCopy(mDoMtx_stack_c::get(), field_0x56c);
+1 -1
View File
@@ -428,7 +428,7 @@ cBgW::cBgW() {
pm_node_tree = NULL;
pm_grp = NULL;
pm_vtx_tbl = NULL;
pm_base_mtx = NULL;
pm_base = NULL;
PSMTXIdentity(m_inv_mtx);
PSMTXIdentity(field_0x4c);
+1 -1
View File
@@ -160,7 +160,7 @@ u32 dCcMassS_Mng::Chk(cXyz* p_xyz, fopAc_ac_c** p_actor, dCcMassS_HitInf* p_hitI
if (field_0x200 & 0x10) {
Vec vec;
PSVECSubtract(&(*p_actor)->mCurrent.mPosition, p_xyz, &vec);
PSVECSubtract(&(*p_actor)->current.pos, p_xyz, &vec);
vec.y = 0;
f32 vecMag = PSVECMag(&vec);
if (cM3d_IsZero(vecMag)) {
+4 -4
View File
@@ -454,12 +454,12 @@ fopAc_ac_c* cc_at_check(fopAc_ac_c* p_enemy, dCcU_AtInfo* p_info) {
p_info->mHitDirection = cM_atan2s(-x, -z) + (s16)cM_rndFX(4000.0f);
} else {
if (fopAcM_GetName(p_info->mpActor) == PROC_BOOMERANG) {
f32 x_diff = p_enemy->mCurrent.mPosition.x - link->mCurrent.mPosition.x;
f32 z_diff = p_enemy->mCurrent.mPosition.z - link->mCurrent.mPosition.z;
f32 x_diff = p_enemy->current.pos.x - link->current.pos.x;
f32 z_diff = p_enemy->current.pos.z - link->current.pos.z;
p_info->mHitDirection = cM_atan2s(-x_diff, -z_diff) + (s16)cM_rndFX(10000.0f);
} else {
f32 x_diff = p_enemy->mCurrent.mPosition.x - p_info->mpActor->mCurrent.mPosition.x;
f32 z_diff = p_enemy->mCurrent.mPosition.z - p_info->mpActor->mCurrent.mPosition.z;
f32 x_diff = p_enemy->current.pos.x - p_info->mpActor->current.pos.x;
f32 z_diff = p_enemy->current.pos.z - p_info->mpActor->current.pos.z;
p_info->mHitDirection = cM_atan2s(-x_diff, -z_diff);
}
}
+18 -18
View File
@@ -1314,10 +1314,10 @@ BOOL dComIfG_resetToOpening(scene_class* scene) {
static int phase_1(char* arc_name) {
if (!dComIfG_setObjectRes(arc_name, 0, NULL)) {
OSReport_Error("%s.arc Read Error !!\n", arc_name);
return 5;
return cPhs_ERROR_e;
}
return 2;
return cPhs_TWO_e;
}
/* 8002CE38-8002CEB4 027778 007C+00 1/0 0/0 0/0 .text phase_2__FPc */
@@ -1326,7 +1326,7 @@ static int phase_2(char* arc_name) {
if (syncStatus < 0) {
OSReport_Error("%s.arc Sync Read Error !!\n", arc_name);
return 5;
return cPhs_ERROR_e;
} else {
return syncStatus > 0 ? 0 : 2;
}
@@ -1334,7 +1334,7 @@ static int phase_2(char* arc_name) {
/* 8002CEB4-8002CEBC 0277F4 0008+00 1/0 0/0 0/0 .text phase_3__FPc */
static int phase_3(char*) {
return 4;
return cPhs_COMPLEATE_e;
}
/* 8002CEBC-8002CEFC 0277FC 0040+00 0/0 7/7 550/550 .text
@@ -1343,8 +1343,8 @@ int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* arc_nam
static int (*l_method[3])(void*) = {(int (*)(void*))phase_1, (int (*)(void*))phase_2,
(int (*)(void*))phase_3};
if (i_phase->mPhaseStep == 2) {
return 4;
if (i_phase->id == cPhs_TWO_e) {
return cPhs_COMPLEATE_e;
}
return dComLbG_PhaseHandler(i_phase, l_method, (void*)arc_name);
@@ -1380,8 +1380,8 @@ int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* resName
static int (*l_method[3])(void*) = {(int (*)(void*))phase_01, (int (*)(void*))phase_02,
(int (*)(void*))phase_03};
if (i_phase->mPhaseStep == 2) {
return 4;
if (i_phase->id == cPhs_TWO_e) {
return cPhs_COMPLEATE_e;
}
phaseParam_c param(resName, heap);
@@ -1391,12 +1391,12 @@ int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* resName
/* 8002D008-8002D06C 027948 0064+00 1/1 10/10 540/540 .text
* dComIfG_resDelete__FP30request_of_phase_process_classPCc */
int dComIfG_resDelete(request_of_phase_process_class* i_phase, char const* resName) {
if (i_phase->mPhaseStep != 2) {
if (i_phase->id != cPhs_TWO_e) {
return 0;
}
dComIfG_deleteObjectResMain(resName);
i_phase->mPhaseStep = 0;
i_phase->id = cPhs_ZERO_e;
return 1;
}
@@ -1471,7 +1471,7 @@ void dComIfGp_setNextStage(char const* stage, s16 point, s8 roomNo, s8 layer, f3
if (dComIfGs_isPlayerFieldLastStayFieldDataExistFlag() &&
daPy_getLinkPlayerActorClass() != NULL) {
s8 curPoint = (s8)daPy_getLinkPlayerActorClass()->mCurrent.mRoomNo;
s8 curPoint = (s8)daPy_getLinkPlayerActorClass()->current.mRoomNo;
cXyz pos = dMapInfo_n::getMapPlayerPos();
s16 angle = daPy_getLinkPlayerActorClass()->mCollisionRot.y;
u8 level = dComIfGp_getNowLevel();
@@ -2235,7 +2235,7 @@ void dComIfGs_setWarpMarkFlag(u8) {
/* 8002F314-8002F328 029C54 0014+00 0/0 0/0 1/1 .text __ct__19dComIfG_resLoader_cFv */
dComIfG_resLoader_c::dComIfG_resLoader_c() {
field_0x0 = NULL;
field_0x4.mPhaseStep = 0;
field_0x4.id = cPhs_ZERO_e;
field_0xc = 0;
}
@@ -2244,7 +2244,7 @@ dComIfG_resLoader_c::~dComIfG_resLoader_c() {
if (field_0x0 != NULL) {
for (int i = field_0xc; i >= 0; i--) {
dComIfG_resDelete(&field_0x4, field_0x0[i]);
field_0x4.mPhaseStep = 2;
field_0x4.id = cPhs_TWO_e;
}
}
}
@@ -2253,16 +2253,16 @@ dComIfG_resLoader_c::~dComIfG_resLoader_c() {
int dComIfG_resLoader_c::load(char const** param_0, JKRHeap* heap) {
field_0x0 = param_0;
int ret = dComIfG_resLoad(&field_0x4, field_0x0[field_0xc], heap);
if (ret == 4) {
int phase_state = dComIfG_resLoad(&field_0x4, field_0x0[field_0xc], heap);
if (phase_state == cPhs_COMPLEATE_e) {
if (field_0x0[field_0xc + 1][0] != 0) {
field_0xc++;
field_0x4.mPhaseStep = 0;
ret = 0;
field_0x4.id = cPhs_ZERO_e;
phase_state = cPhs_ZERO_e;
}
}
return ret;
return phase_state;
}
/* 8002F434-8002F478 029D74 0044+00 0/0 12/12 12/12 .text dComIfG_getStageRes__FPCc */
+7 -63
View File
@@ -6,63 +6,7 @@
#include "d/d_cam_param.h"
#include "dol2asm.h"
#include "dolphin/types.h"
//
// Types:
//
struct dRes_info_c {};
struct dRes_control_c {
/* 8003C37C */ void getRes(char const*, char const*, dRes_info_c*, int);
};
struct dCstick_c {
/* 80088434 */ dCstick_c();
/* 8008845C */ bool Shift(u32);
/* 800889B0 */ ~dCstick_c();
};
struct dCamera_c {
/* 80180A40 */ void EventRecoverNotime();
};
struct dCamSetup_c {
/* 80088668 */ dCamSetup_c();
/* 800888B8 */ ~dCamSetup_c();
/* 80088918 */ void CheckLatitudeRange(s16*);
/* 80088988 */ void PlayerHideDist();
};
struct dCamParam_c {
/* 800884F0 */ dCamParam_c(s32);
/* 8008858C */ ~dCamParam_c();
/* 800885D4 */ void Change(s32);
/* 80088620 */ void SearchStyle(u32);
};
struct cSAngle {};
struct cXyz {};
struct dCamMath {
/* 8008813C */ void rationalBezierRatio(f32, f32);
/* 80088284 */ void zoomFovy(f32, f32);
/* 8008831C */ void xyzRotateX(cXyz&, cSAngle);
/* 80088384 */ void xyzRotateY(cXyz&, cSAngle);
/* 800883EC */ void xyzHorizontalDistance(cXyz&, cXyz&);
};
struct dCamBGChk_c {
/* 80088464 */ dCamBGChk_c();
};
struct cDegree {
/* 800882E0 */ ~cDegree();
/* 8027134C */ cDegree(f32);
/* 802713F0 */ void Sin() const;
/* 80271418 */ void Cos() const;
};
#include "d/com/d_com_inf_game.h"
//
// Forward References:
@@ -102,9 +46,6 @@ extern "C" void __ct__7cDegreeFf();
extern "C" void Sin__7cDegreeCFv();
extern "C" void Cos__7cDegreeCFv();
extern "C" void __dl__FPv();
extern "C" void PSMTXMultVec();
extern "C" void sqrt();
extern "C" extern u8 g_dComIfG_gameInfo[122384];
//
// Declarations:
@@ -176,7 +117,8 @@ asm void dCamMath::zoomFovy(f32 param_0, f32 param_1) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm cDegree::~cDegree() {
// asm cDegree::~cDegree() {
extern "C" asm void __dt__7cDegreeFv() {
nofralloc
#include "asm/d/d_cam_param/__dt__7cDegreeFv.s"
}
@@ -334,7 +276,8 @@ asm dCamParam_c::dCamParam_c(s32 param_0) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dCamParam_c::~dCamParam_c() {
// asm dCamParam_c::~dCamParam_c() {
extern "C" asm void __dt__11dCamParam_cFv() {
nofralloc
#include "asm/d/d_cam_param/__dt__11dCamParam_cFv.s"
}
@@ -444,7 +387,8 @@ asm dCamSetup_c::dCamSetup_c() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dCamSetup_c::~dCamSetup_c() {
// asm dCamSetup_c::~dCamSetup_c() {
extern "C" asm void __dt__11dCamSetup_cFv() {
nofralloc
#include "asm/d/d_cam_param/__dt__11dCamSetup_cFv.s"
}
+19 -244
View File
@@ -7,6 +7,7 @@
#include "dol2asm.h"
#include "dolphin/types.h"
#include "SSystem/SComponent/c_m3d_g_pla.h"
#include "d/com/d_com_inf_game.h"
//
// Types:
@@ -17,29 +18,10 @@ namespace std {
/* 80182D10 */ void fabs(f32);
}; // namespace std
struct mDoMtx_stack_c {
/* 8000CD9C */ void transM(f32, f32, f32);
/* 8000CE70 */ void scaleM(cXyz const&);
static u8 now[48];
};
struct mDoLib_clipper {
/* 8001528C */ void setup(f32, f32, f32, f32);
};
struct mDoGph_gInf_c {
/* 80008078 */ void onBlure();
/* 800080A0 */ void onBlure(f32 const (*)[4]);
};
struct mDoCPd_c {
/* 8016C314 */ void getHoldA(u32);
/* 80182BF8 */ void getTrigA(u32);
static u8 m_cpadInfo[256];
};
struct daTagMwait_c {
/* 80182D9C */ void checkEndMessage();
};
@@ -52,75 +34,12 @@ struct daTagMhint_c {
/* 80182D78 */ void checkNoAttention() const;
};
struct daPy_py_c {
/* 801414CC */ void checkMagneBootsOn() const;
/* 8015DFF4 */ void getLeftHandPos() const;
/* 8015F8D0 */ void getThrowBoomerangActor();
/* 801829E0 */ void checkThrowDamage() const;
/* 80182A10 */ void checkGoronSideMove() const;
/* 80182AAC */ void getRightFootPosP();
/* 80182AB4 */ void getLeftFootPosP();
/* 80182ABC */ u32 getMidnaActor();
/* 80182AC4 */ void checkCopyRodThrowAfter() const;
/* 80182AD8 */ void checkRide() const;
/* 80182B9C */ void getRightHandPos() const;
static u8 m_midnaActor[4];
};
struct daHorse_c {
/* 80182D04 */ void getLashDashStart() const;
/* 80182D1C */ void checkTurnStandCamera() const;
/* 80182D48 */ void checkJump() const;
};
struct daAlink_c {
/* 8009D87C */ bool getE3Zhint();
/* 800D2ABC */ void checkCutLargeTurnState() const;
/* 800DE884 */ void checkBowCameraArrowPosP(s16*, s16*);
/* 800E1390 */ void getCopyRodCameraActor();
/* 800F3CF8 */ void checkCanoeRideTandem();
/* 80112474 */ void checkIronBallThrowMode() const;
/* 801124B4 */ void checkIronBallThrowReturnMode() const;
/* 80133EF0 */ void checkMidnaLockJumpPoint() const;
/* 8018280C */ void getChainGrabActor();
/* 80182814 */ void checkCokkoGlide() const;
/* 8018283C */ void checkCameraLargeDamage() const;
/* 80182870 */ void getHsSubChainTopPos() const;
/* 80182888 */ void checkCutHeadProc() const;
/* 8018289C */ void getRideActor();
};
struct dVibration_c {
/* 8006FA24 */ void StartShock(int, int, cXyz);
};
struct dRes_info_c {};
struct dRes_control_c {
/* 8003C37C */ void getRes(char const*, char const*, dRes_info_c*, int);
};
struct dEvt_control_c {
/* 800434D8 */ void searchMapEventData(u8);
};
struct dEvent_manager_c {
/* 80047B1C */ void getMyStaffId(char const*, fopAc_ac_c*, int);
/* 80047D4C */ void getIsAddvance(int);
/* 80047E10 */ void getMyActIdx(int, char const* const*, int, int, int);
/* 8004817C */ void cutEnd(int);
};
struct dDlst_window_c {
/* 80051AC0 */ void setViewPort(f32, f32, f32, f32, f32, f32);
/* 80051ADC */ void setScissor(f32, f32, f32, f32);
};
struct dDlst_effectLine_c {
/* 800541F4 */ void update(cXyz&, _GXColor&, u16, u16, u16, u16, f32, f32, f32, f32);
};
struct dDemo_object_c {
/* 80039128 */ void getActiveCamera();
};
@@ -129,158 +48,10 @@ struct dDemo_c {
static u8 m_object[4];
};
struct dCstick_c {
/* 8008845C */ bool Shift(u32);
};
struct cCcD_ShapeAttr {
struct Shape {
/* 80167BBC */ ~Shape();
};
};
struct dCcS {
/* 80086D8C */ void ChkCamera(cXyz&, cXyz&, f32, fopAc_ac_c*, fopAc_ac_c*, fopAc_ac_c*);
/* 80086FBC */ void chkCameraPoint(cXyz const&, cCcD_ShapeAttr::Shape*, fopAc_ac_c*,
fopAc_ac_c*);
};
struct cM3dGCps {
/* 8026EF88 */ cM3dGCps();
/* 8026EFA4 */ ~cM3dGCps();
/* 8026F000 */ void Set(cXyz const&, cXyz const&, f32);
};
struct dCcMassS_Mng {
/* 80085E6C */ void SetCam(cM3dGCps const&);
/* 80085EB0 */ void GetResultCam() const;
/* 80085EB8 */ void GetCamTopPos(Vec*);
};
struct dCamSetup_c {
/* 80088668 */ dCamSetup_c();
/* 800888B8 */ ~dCamSetup_c();
/* 80088918 */ void CheckLatitudeRange(s16*);
/* 80088988 */ void PlayerHideDist();
/* 80182BB8 */ void CheckFlag2(u16);
/* 80182BD0 */ void CheckFlag(u16);
/* 80182BE8 */ void WaitRollSpeed();
/* 80182BF0 */ void WaitRollTimer();
/* 80182C1C */ void ThrowTimer();
/* 80182C24 */ void ThrowCushion();
/* 80182C2C */ void ThrowVAngle();
/* 80182C34 */ void ThrowCtrAdjust();
/* 80182CEC */ void ChargeBRatio();
/* 80182CF4 */ void ChargeTimer();
/* 80182CFC */ void ChargeLatitude();
};
struct dCamParam_c {
/* 800884F0 */ dCamParam_c(s32);
/* 8008858C */ ~dCamParam_c();
/* 800885D4 */ void Change(s32);
/* 80088620 */ void SearchStyle(u32);
/* 80182C60 */ void Arg2(s16);
/* 80182C3C */ void Arg2();
/* 80182C48 */ void Arg1();
/* 80182C6C */ void Arg1(u8);
/* 80182C50 */ void Arg0();
/* 80182C74 */ void Arg0(u8);
/* 80182C7C */ void Fovy(u8);
/* 80182C58 */ void Fovy();
/* 80182C8C */ void Flag(s32, u16);
/* 80182CB4 */ void CheckFlag(u16);
/* 80182CD0 */ void Val(s32, int);
};
struct dCamMath {
/* 8008813C */ void rationalBezierRatio(f32, f32);
/* 80088284 */ void zoomFovy(f32, f32);
/* 8008831C */ void xyzRotateX(cXyz&, cSAngle);
/* 80088384 */ void xyzRotateY(cXyz&, cSAngle);
/* 800883EC */ void xyzHorizontalDistance(cXyz&, cXyz&);
};
struct dCamForcusLine {
/* 801824C8 */ void Init();
/* 80182560 */ void Draw();
/* 801825E4 */ void Off();
};
struct dBgS_SphChk {
/* 80078A14 */ dBgS_SphChk();
/* 80078AC0 */ ~dBgS_SphChk();
};
struct dBgS_RoofChk {
/* 80078FF4 */ dBgS_RoofChk();
/* 80079090 */ ~dBgS_RoofChk();
};
struct dBgS_GndChk {
/* 8007757C */ dBgS_GndChk();
/* 800775F0 */ ~dBgS_GndChk();
};
struct dBgS_CamSphChk {
/* 80165E74 */ ~dBgS_CamSphChk();
};
struct cBgD_Vtx_t;
struct dBgS_CamGndChk_Wtr {
/* 80077A00 */ dBgS_CamGndChk_Wtr();
/* 80077A98 */ ~dBgS_CamGndChk_Wtr();
};
struct dBgS_CamGndChk {
/* 80077988 */ ~dBgS_CamGndChk();
};
struct dBgS {
/* 80074ABC */ void ChkMoveBG(cBgS_PolyInfo const&);
/* 80074EF0 */ void GetGroundCode(cBgS_PolyInfo const&);
/* 80074F40 */ void GetCamMoveBG(cBgS_PolyInfo const&);
/* 80074F90 */ void GetRoomCamId(cBgS_PolyInfo const&);
/* 80075080 */ void GetGrpSoundId(cBgS_PolyInfo const&);
/* 800750D0 */ void ChkGrpInf(cBgS_PolyInfo const&, u32);
/* 8007549C */ void RoofChk(dBgS_RoofChk*);
/* 80075688 */ void SphChk(dBgS_SphChk*, void*);
/* 8007595C */ void MoveBgMatrixCrrPos(cBgS_PolyInfo const&, bool, cXyz*, csXyz*, csXyz*);
};
struct dAttention_c {
/* 8007353C */ void LockonTarget(s32);
/* 800735DC */ void LockonReleaseDistanse();
/* 80073734 */ void ActionTarget(s32);
/* 8007378C */ void CheckObjectTarget(s32);
/* 800737E4 */ void LockonTruth();
/* 8016E424 */ void LockEdge();
/* 80182994 */ void GetCheckObjectCount();
/* 80182AD0 */ void keepLock(int);
};
struct d2DBSplinePath {
/* 80097878 */ void Init(s32, s32);
/* 80097B68 */ void Spot(f32*, f32);
/* 801828D4 */ ~d2DBSplinePath();
};
struct camera_process_class {};
struct cM_rnd_c {
/* 80053CDC */ void init(int, int, int);
};
struct cM3dGSph {
/* 8026F664 */ void Set(cXyz const&, f32);
};
struct cM3dGCyl {
/* 80030E3C */ ~cM3dGCyl();
/* 8026F0A8 */ cM3dGCyl(cXyz const*, f32, f32);
};
//
// Forward References:
//
@@ -800,7 +571,6 @@ extern "C" void _restgpr_27();
extern "C" void _restgpr_28();
extern "C" void _restgpr_29();
extern "C" u8 const tempBitLabels__20dSv_event_tmp_flag_c[370 + 2 /* padding */];
extern "C" extern u8 g_mDoMtx_identity[48 + 24 /* padding */];
extern "C" extern void* __vt__8cM3dGPla[3];
extern "C" extern void* g_fopCam_Method[5 + 1 /* padding */];
extern "C" extern void* g_fopVw_Method[5 + 1 /* padding */];
@@ -811,12 +581,10 @@ extern "C" extern void* __vt__18dDlst_effectLine_c[3];
extern "C" extern void* __vt__14dBgS_CamGndChk[12];
extern "C" u8 m_cpadInfo__8mDoCPd_c[256];
extern "C" u8 now__14mDoMtx_stack_c[48];
extern "C" extern u8 g_dComIfG_gameInfo[122384];
extern "C" f32 Zero__4cXyz[3];
extern "C" u8 BaseY__4cXyz[12];
extern "C" extern u8 g_dComIfGoat_gameInfo[4 + 4 /* padding */];
extern "C" extern u8 data_80450B44[4];
extern "C" extern u8 mBlureFlag__13mDoGph_gInf_c[4];
extern "C" u8 stopStatus__10fopAc_ac_c[4];
extern "C" u8 m_object__7dDemo_c[4];
extern "C" u8 m_midnaActor__9daPy_py_c[4];
@@ -1854,10 +1622,10 @@ asm dCamera_c::~dCamera_c() {
/* ############################################################################################## */
/* 8042C8F8-8042C9A0 059618 00A8+00 12/12 0/0 0/0 .bss specialType__22@unnamed@d_camera_cpp@ */
static u8 data_8042C8F8[168];
static int data_8042C8F8[42];
/* 80451020-80451024 000520 0004+00 4/4 0/0 0/0 .sbss Stage__22@unnamed@d_camera_cpp@ */
static u8 data_80451020[4];
static int data_80451020;
/* 804536A0-804536A4 001CA0 0004+00 39/39 0/0 0/0 .sdata2 @5656 */
SECTION_SDATA2 static u8 lit_5656[4] = {
@@ -2854,7 +2622,8 @@ static asm void func_8016C2D4() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void mDoCPd_c::getHoldA(u32 param_0) {
// asm void mDoCPd_c::getHoldA(u32 param_0) {
extern "C" asm void getHoldA__8mDoCPd_cFUl() {
nofralloc
#include "asm/d/d_camera/getHoldA__8mDoCPd_cFUl.s"
}
@@ -4077,7 +3846,8 @@ asm void daAlink_c::getHsSubChainTopPos() const {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void daAlink_getAlinkActorClass() {
// static asm void daAlink_getAlinkActorClass() {
extern "C" asm void daAlink_getAlinkActorClass__Fv() {
nofralloc
#include "asm/d/d_camera/daAlink_getAlinkActorClass__Fv.s"
}
@@ -4107,7 +3877,8 @@ asm void daAlink_c::getRideActor() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dComIfGs_isTmpBit(u16 param_0) {
// static asm void dComIfGs_isTmpBit(u16 param_0) {
extern "C" asm void dComIfGs_isTmpBit__FUs() {
nofralloc
#include "asm/d/d_camera/dComIfGs_isTmpBit__FUs.s"
}
@@ -4117,7 +3888,8 @@ static asm void dComIfGs_isTmpBit(u16 param_0) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm d2DBSplinePath::~d2DBSplinePath() {
// asm d2DBSplinePath::~d2DBSplinePath() {
extern "C" asm void __dt__14d2DBSplinePathFv() {
nofralloc
#include "asm/d/d_camera/__dt__14d2DBSplinePathFv.s"
}
@@ -4192,7 +3964,8 @@ asm void dAttention_c::GetCheckObjectCount() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dComIfGp_getAttention() {
// static asm void dComIfGp_getAttention() {
extern "C" asm void dComIfGp_getAttention__Fv() {
nofralloc
#include "asm/d/d_camera/dComIfGp_getAttention__Fv.s"
}
@@ -4237,7 +4010,8 @@ asm void cBgS_LinChk::GetCross() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dComIfG_Bgsp() {
// static asm void dComIfG_Bgsp() {
extern "C" asm void dComIfG_Bgsp__Fv() {
nofralloc
#include "asm/d/d_camera/dComIfG_Bgsp__Fv.s"
}
@@ -4366,8 +4140,8 @@ asm void daPy_py_c::getLeftFootPosP() {
#pragma pop
/* 80182ABC-80182AC4 -00001 0008+00 0/0 0/0 0/0 .text getMidnaActor__9daPy_py_cFv */
u32 daPy_py_c::getMidnaActor() {
return *(u32*)(&daPy_py_c::m_midnaActor);
extern "C" u32 getMidnaActor__9daPy_py_cFv() {
return *(u32*)(m_midnaActor__9daPy_py_c);
}
/* 80182AC4-80182AD0 17D404 000C+00 1/1 0/0 0/0 .text checkCopyRodThrowAfter__9daPy_py_cCFv */
@@ -4449,7 +4223,8 @@ asm void dCamSetup_c::WaitRollTimer() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void mDoCPd_c::getTrigA(u32 param_0) {
// asm void mDoCPd_c::getTrigA(u32 param_0) {
extern "C" asm void getTrigA__8mDoCPd_cFUl() {
nofralloc
#include "asm/d/d_camera/getTrigA__8mDoCPd_cFUl.s"
}
+2 -6
View File
@@ -18,11 +18,6 @@
// Types:
//
struct dDlst_effectLine_c {
/* 80053E9C */ void draw();
/* 800541F4 */ void update(cXyz&, _GXColor&, u16, u16, u16, u16, f32, f32, f32, f32);
};
struct dDlst_blo_c {
/* 80053B64 */ void draw();
};
@@ -2259,7 +2254,8 @@ SECTION_SDATA2 static f32 lit_4876 = 32767.0f;
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dDlst_effectLine_c::draw() {
// asm void dDlst_effectLine_c::draw() {
extern "C" asm void draw__18dDlst_effectLine_cFv() {
nofralloc
#include "asm/d/d_drawlist/draw__18dDlst_effectLine_cFv.s"
}
+1 -1
View File
@@ -116,7 +116,7 @@ static int dKyeff_Create(kankyo_class* kankyo) {
g_env_light.mWind.pow = 0.7f;
g_env_light.mDaytime = time.hours * 15.0f;
}
return 4;
return cPhs_COMPLEATE_e;
}
#else
#pragma push
+1 -1
View File
@@ -66,7 +66,7 @@ static bool dKyeff2_Delete(dKyeff2_c* ptr) {
static int dKyeff2_Create(kankyo_class* ptr) {
dKyw_wether_init2();
return 4;
return cPhs_COMPLEATE_e;
}
/* ############################################################################################## */
+93 -86
View File
@@ -6,103 +6,110 @@
#include "d/d_path.h"
#include "dol2asm.h"
#include "dolphin/types.h"
//
// Types:
//
struct dSv_info_c {
/* 80035360 */ void isSwitch(int, int) const;
};
struct dStage_roomControl_c {
/* 80024384 */ void getStatusRoomDt(int);
};
struct dPath {};
struct cBgS_PolyInfo {};
struct dBgS {
/* 80074FE0 */ void GetRoomPathId(cBgS_PolyInfo const&);
/* 80075030 */ void GetRoomPathPntNo(cBgS_PolyInfo const&);
/* 80075100 */ void GetRoomId(cBgS_PolyInfo const&);
};
struct cXyz {};
//
// Forward References:
//
extern "C" void dPath_GetPnt__FPC5dPathi();
extern "C" void dPath_GetRoomPath__Fii();
extern "C" void dPath_GetNextRoomPath__FPC5dPathi();
extern "C" void dPath_GetPolyRoomPathVec__FRC13cBgS_PolyInfoP4cXyzPi();
//
// External References:
//
extern "C" void getStatusRoomDt__20dStage_roomControl_cFi();
extern "C" void isSwitch__10dSv_info_cCFii();
extern "C" void GetRoomPathId__4dBgSFRC13cBgS_PolyInfo();
extern "C" void GetRoomPathPntNo__4dBgSFRC13cBgS_PolyInfo();
extern "C" void GetRoomId__4dBgSFRC13cBgS_PolyInfo();
extern "C" void _savegpr_26();
extern "C" void _restgpr_26();
extern "C" extern u8 g_dComIfG_gameInfo[122384];
//
// Declarations:
//
#include "d/com/d_com_inf_game.h"
/* 800517B0-800517EC 04C0F0 003C+00 0/0 7/7 63/63 .text dPath_GetPnt__FPC5dPathi */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPath_GetPnt(dPath const* param_0, int param_1) {
nofralloc
#include "asm/d/d_path/dPath_GetPnt__FPC5dPathi.s"
dStage_dPnt_c* dPath_GetPnt(dPath const* path, int pnt_index) {
if (path == NULL || path->m_points == NULL || pnt_index < 0 || pnt_index >= path->m_num) {
return NULL;
}
return &path->m_points[pnt_index];
}
#pragma pop
/* 800517EC-80051898 04C12C 00AC+00 1/1 12/12 82/82 .text dPath_GetRoomPath__Fii */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm u16* dPath_GetRoomPath(int param_0, int param_1) {
nofralloc
#include "asm/d/d_path/dPath_GetRoomPath__Fii.s"
dPath* dPath_GetRoomPath(int path_index, int room_no) {
dStage_dPath_c* path;
if (room_no == -1) {
path = i_dComIfGp_getStage()->getPath2Inf();
} else {
dStage_roomStatus_c* roomSt = dComIfGp_roomControl_getStatusRoomDt(room_no);
if (roomSt == NULL) {
return NULL;
}
path = roomSt->mRoomDt.getPath2Inf();
}
if (path == NULL || path_index < 0 || path_index >= path->m_num) {
return NULL;
}
return &path->m_path[path_index];
}
#pragma pop
/* 80051898-8005195C 04C1D8 00C4+00 0/0 1/1 3/3 .text dPath_GetNextRoomPath__FPC5dPathi
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPath_GetNextRoomPath(dPath const* param_0, int param_1) {
nofralloc
#include "asm/d/d_path/dPath_GetNextRoomPath__FPC5dPathi.s"
}
#pragma pop
dPath* dPath_GetNextRoomPath(dPath const* p_path, int room_no) {
dStage_dPath_c* path;
/* ############################################################################################## */
/* 80452000-80452008 000600 0004+04 1/1 0/0 0/0 .sdata2 @3685 */
SECTION_SDATA2 static f32 lit_3685[1 + 1 /* padding */] = {
0.0f,
/* padding */
0.0f,
};
if (room_no == -1) {
path = i_dComIfGp_getStage()->getPath2Inf();
} else {
dStage_roomStatus_c* roomSt = dComIfGp_roomControl_getStatusRoomDt(room_no);
if (roomSt == NULL) {
return NULL;
}
path = roomSt->mRoomDt.getPath2Inf();
}
int next_id = p_path->m_nextID;
if (path == NULL || next_id == 0xFFFF) {
return NULL;
}
if (next_id < 0 || next_id >= path->m_num) {
return NULL;
}
return &path->m_path[next_id];
}
/* 8005195C-80051AC0 04C29C 0164+00 0/0 1/1 4/4 .text
* dPath_GetPolyRoomPathVec__FRC13cBgS_PolyInfoP4cXyzPi */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPath_GetPolyRoomPathVec(cBgS_PolyInfo const& param_0, cXyz* param_1, int* param_2) {
nofralloc
#include "asm/d/d_path/dPath_GetPolyRoomPathVec__FRC13cBgS_PolyInfoP4cXyzPi.s"
int dPath_GetPolyRoomPathVec(cBgS_PolyInfo const& poly, cXyz* p_pathVec, int* param_2) {
int roomId = dComIfG_Bgsp().GetRoomId(poly);
int roomPathId = dComIfG_Bgsp().GetRoomPathId(poly);
p_pathVec->x = 0.0f;
p_pathVec->y = 0.0f;
p_pathVec->z = 0.0f;
*param_2 = 0;
if (roomId == -1) {
return 0;
}
dPath* path = dPath_GetRoomPath(roomPathId, roomId);
if (path == NULL) {
return 0;
}
if (path->field_0x6 != 0xFF && dComIfGs_isSwitch(path->field_0x6, roomId)) {
return 0;
}
int pnt_no = dComIfG_Bgsp().GetRoomPathPntNo(poly);
if (pnt_no == 0xFF || pnt_no < 0 || pnt_no >= path->m_num) {
return 0;
}
dStage_dPnt_c* pnt_start = path->m_points;
dStage_dPnt_c* pnt_end = &pnt_start[pnt_no];
dStage_dPnt_c* pnt_begin;
if (pnt_no == path->m_num - 1) {
pnt_begin = pnt_start;
} else {
pnt_begin = &pnt_start[pnt_no + 1];
}
p_pathVec->x = pnt_begin->m_position.x - pnt_end->m_position.x;
p_pathVec->y = pnt_begin->m_position.y - pnt_end->m_position.y;
p_pathVec->z = pnt_begin->m_position.z - pnt_end->m_position.z;
*param_2 = path->field_0x4;
return 1;
}
#pragma pop
+14
View File
@@ -2492,6 +2492,20 @@ static asm int dStage_pathInfoInit(dStage_dt_c* param_0, void* param_1, int para
}
#pragma pop
/* static int dStage_pathInfoInit(dStage_dt_c* stageDt, void* i_data, int entryNum, void* param_3) {
dStage_dPath_c* path_c = ((char*)i_data + 4);
dPath* path = path_c->m_path;
stageDt->setPathInfo(path_c);
for (int i = 0; i < path_c->m_num; i++) {
if ((u32)path->m_points < 0x80000000) {
path->m_points += path_c->m_num
}
path++;
}
} */
/* 80025F44-80025F78 020884 0034+00 2/0 0/0 0/0 .text dStage_rppnInfoInit__FP11dStage_dt_cPviPv */
static int dStage_rppnInfoInit(dStage_dt_c* stageDt, void* i_data, int entryNum, void* param_3) {
stageDt->setPnt2Info((dStage_dPnt_c*)((char*)i_data + 4));
+1 -1
View File
@@ -909,7 +909,7 @@ void dEvDtStaff_c::specialProcCreate() {
cXyz* posP = dComIfGp_evmng_getMyXyzP(staffId, "POS");
if (posP == NULL) {
pos = ((fopAc_ac_c*)dComIfGp_getPlayer(0))->getPosition();
pos = dComIfGp_getPlayer(0)->getPosition();
} else {
pos = *posP;
}
+5 -5
View File
@@ -506,7 +506,7 @@ void dEvent_manager_c::Sequencer() {
if (iVar5 && cutType != 1) {
bVar1 = true;
cXyz attentionPos(
((fopAc_ac_c*)dComIfGp_getPlayer(0))->mAttentionInfo.mPosition);
dComIfGp_getPlayer(0)->mAttentionInfo.mPosition);
cXyz camCenter = dCam_getBody()->Center();
f32 distance = cXyz((attentionPos - camCenter)).abs();
@@ -1149,7 +1149,7 @@ static fopAc_ac_c* findShutterCallBack(fopAc_ac_c* pActor, void* param_1) {
return NULL;
}
cXyz diff = pActor->mOrig.mPosition - prms->mActor->mOrig.mPosition;
cXyz diff = pActor->orig.pos - prms->mActor->orig.pos;
if (diff.x < 10 && diff.x > -10 && diff.y < 10 && diff.y > -10 && diff.z < 10 && diff.z > -10) {
return pActor;
}
@@ -1161,13 +1161,13 @@ static fopAc_ac_c* findShutterCallBack(fopAc_ac_c* pActor, void* param_1) {
fopAc_ac_c* dEvent_manager_c::specialCast_Shutter(s16 bsTypeId, int param_1) {
FindShtrCbPrms prms;
prms.mBsTypeId = bsTypeId;
prms.mActor = (fopAc_ac_c*)dComIfGp_getPlayer(0);
prms.mActor = dComIfGp_getPlayer(0);
fopAc_ac_c* shutterActor =
(fopAc_ac_c*)fopAcIt_Judge((fopAcIt_JudgeFunc)findShutterCallBack, &prms);
if (shutterActor != NULL && param_1 != 0) {
cXyz goal(shutterActor->mOrig.mPosition);
s16 angle = prms.mActor->mOrig.mAngle.y + 0x8000;
cXyz goal(shutterActor->orig.pos);
s16 angle = prms.mActor->orig.angle.y + 0x8000;
goal.x += cM_ssin(angle) * 100;
goal.z += cM_scos(angle) * 100;
setGoal(&goal);
+280 -81
View File
@@ -5,14 +5,14 @@
#include "d/kankyo/d_kankyo.h"
#include "MSL_C/MSL_Common/Src/mem.h"
#include "SSystem/SComponent/c_counter.h"
#include "SSystem/SComponent/c_math.h"
#include "d/com/d_com_inf_game.h"
#include "d/kankyo/d_kankyo_data.h"
#include "d/msg/d_msg_object.h"
#include "dol2asm.h"
#include "dolphin/types.h"
#include "m_Do/m_Do_audio.h"
#include "SSystem/SComponent/c_math.h"
#include "SSystem/SComponent/c_counter.h"
//
// Types:
@@ -20,8 +20,6 @@
struct sub_kankyo__class {};
struct color_RGB_class {};
//
// Forward References:
//
@@ -835,6 +833,52 @@ SECTION_SDATA2 static f32 lit_4529 = 0.5f;
/* 8019D44C-8019D520 197D8C 00D4+00 2/2 0/0 0/0 .text
* dKy_GXInitLightDistAttn__FP12J3DLightInfoffUc */
// matches with literals
#ifdef NONMATCHING
static void dKy_GXInitLightDistAttn(J3DLightInfo* i_info, f32 param_1, f32 param_2, u8 param_3) {
f32 temp_f3;
f32 var_f0;
f32 var_f4;
f32 var_f5;
if (param_1 < 0.0f) {
param_3 = 0;
}
if (param_2 <= 0.0f || param_2 >= 1.0f) {
param_3 = 0;
}
switch (param_3) { /* irregular */
case 1:
var_f4 = 1.0f;
var_f5 = (1.0f - param_2) / (param_2 * param_1);
var_f0 = 0.0f;
break;
case 2:
var_f4 = 1.0f;
temp_f3 = (1.0f - param_2) * 0.5f;
var_f5 = temp_f3 / (param_2 * param_1);
var_f0 = temp_f3 / (param_1 * param_2 * param_1);
break;
case 3:
var_f4 = 1.0f;
var_f5 = 0.0f;
var_f0 = (1.0f - param_2) / (param_1 * (param_2 * param_1));
break;
default:
case 0:
var_f4 = 1.0f;
var_f5 = 0.0f;
var_f0 = var_f5;
break;
}
i_info->mDistAtten.x = var_f4;
i_info->mDistAtten.y = var_f5;
i_info->mDistAtten.z = var_f0;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -844,48 +888,79 @@ static asm void dKy_GXInitLightDistAttn(J3DLightInfo* param_0, f32 param_1, f32
#include "asm/d/kankyo/d_kankyo/dKy_GXInitLightDistAttn__FP12J3DLightInfoffUc.s"
}
#pragma pop
#endif
/* 8019D520-8019D56C 197E60 004C+00 1/1 0/0 0/0 .text u8_data_ratio_set__FUcUcf */
// matches with literals
#ifdef NONMATCHING
static s16 u8_data_ratio_set(u8 param_0, u8 param_1, f32 param_2) {
return param_0 + (int)(param_2 * (param_1 - param_0));
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void u8_data_ratio_set(u8 param_0, u8 param_1, f32 param_2) {
static asm s16 u8_data_ratio_set(u8 param_0, u8 param_1, f32 param_2) {
nofralloc
#include "asm/d/kankyo/d_kankyo/u8_data_ratio_set__FUcUcf.s"
}
#pragma pop
#endif
/* 8019D56C-8019D5BC 197EAC 0050+00 1/1 0/0 0/0 .text s16_data_ratio_set__Fssf */
// matches with literals
#ifdef NONMATCHING
static s16 s16_data_ratio_set(s16 param_0, s16 param_1, f32 param_2) {
return param_0 + (s16)(param_2 * (param_1 - param_0));
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void s16_data_ratio_set(s16 param_0, s16 param_1, f32 param_2) {
static asm s16 s16_data_ratio_set(s16 param_0, s16 param_1, f32 param_2) {
nofralloc
#include "asm/d/kankyo/d_kankyo/s16_data_ratio_set__Fssf.s"
}
#pragma pop
#endif
/* 8019D5BC-8019D61C 197EFC 0060+00 1/1 0/0 0/0 .text kankyo_color_ratio_calc_common__Fsf
*/
// matches with literals
#ifdef NONMATCHING
static u8 kankyo_color_ratio_calc_common(s16 param_0, f32 param_1) {
s16 color = param_0 * param_1;
if (color < 0) {
color = 0;
} else if (color > 255) {
color = 255;
}
return color;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void kankyo_color_ratio_calc_common(s16 param_0, f32 param_1) {
static asm u8 kankyo_color_ratio_calc_common(s16 param_0, f32 param_1) {
nofralloc
#include "asm/d/kankyo/d_kankyo/kankyo_color_ratio_calc_common__Fsf.s"
}
#pragma pop
#endif
/* 8019D61C-8019D68C 197F5C 0070+00 1/1 0/0 0/0 .text
* kankyo_color_ratio_calc__FP8_GXColor11_GXColorS10f */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void kankyo_color_ratio_calc(_GXColor* param_0, _GXColorS10 param_1, f32 param_2) {
nofralloc
#include "asm/d/kankyo/d_kankyo/kankyo_color_ratio_calc__FP8_GXColor11_GXColorS10f.s"
static void kankyo_color_ratio_calc(GXColor* o_color, GXColorS10 param_1, f32 param_2) {
f32 ratio = param_2;
s16 g = param_1.g;
s16 b = param_1.b;
o_color->r = kankyo_color_ratio_calc_common(param_1.r, ratio);
o_color->g = kankyo_color_ratio_calc_common(g, ratio);
o_color->b = kankyo_color_ratio_calc_common(b, ratio);
}
#pragma pop
/* 8019D68C-8019D790 197FCC 0104+00 2/2 0/0 0/0 .text kankyo_color_ratio_set__FUcUcfUcUcfsf */
#pragma push
@@ -899,27 +974,38 @@ static asm void kankyo_color_ratio_set(u8 param_0, u8 param_1, f32 param_2, u8 p
#pragma pop
/* 8019D790-8019D7A0 1980D0 0010+00 1/1 0/0 0/0 .text fl_data_ratio_set__Ffff */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void fl_data_ratio_set(f32 param_0, f32 param_1, f32 param_2) {
nofralloc
#include "asm/d/kankyo/d_kankyo/fl_data_ratio_set__Ffff.s"
static f32 fl_data_ratio_set(f32 param_0, f32 param_1, f32 param_2) {
return param_0 + param_2 * (param_1 - param_0);
}
#pragma pop
/* 8019D7A0-8019D878 1980E0 00D8+00 3/3 0/0 0/0 .text float_kankyo_color_ratio_set__Fffffffff */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void float_kankyo_color_ratio_set(f32 param_0, f32 param_1, f32 param_2, f32 param_3,
f32 param_4, f32 param_5, f32 param_6, f32 param_7) {
nofralloc
#include "asm/d/kankyo/d_kankyo/float_kankyo_color_ratio_set__Fffffffff.s"
static f32 float_kankyo_color_ratio_set(f32 param_0, f32 param_1, f32 param_2, f32 param_3,
f32 param_4, f32 param_5, f32 param_6, f32 param_7) {
f32 temp_f1;
f32 temp_f31;
temp_f31 = fl_data_ratio_set(param_0, param_1, param_2);
temp_f1 = fl_data_ratio_set(temp_f31, fl_data_ratio_set(param_3, param_4, param_2), param_5);
return temp_f1 + (param_7 * (param_6 - temp_f1));
}
#pragma pop
/* 8019D878-8019D8AC 1981B8 0034+00 3/3 0/0 0/0 .text get_parcent__Ffff */
// matches with literals
#ifdef NONMATCHING
static f32 get_parcent(f32 param_0, f32 param_1, f32 param_2) {
f32 temp_f1;
f32 temp_f2;
f32 temp_f4 = param_0 - param_1;
if (0.0f != temp_f4) {
temp_f1 = 1.0f - (param_0 - param_2) / temp_f4;
if (!(temp_f1 >= 1.0f)) {
return temp_f1;
}
}
return 1.0f;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -928,6 +1014,7 @@ static asm f32 get_parcent(f32 param_0, f32 param_1, f32 param_2) {
#include "asm/d/kankyo/d_kankyo/get_parcent__Ffff.s"
}
#pragma pop
#endif
/* 8019D8AC-8019D8CC 1981EC 0020+00 0/0 1/1 1/1 .text dKy_get_parcent__Ffff */
f32 dKy_get_parcent(f32 param_0, f32 param_1, f32 param_2) {
@@ -1086,6 +1173,15 @@ static asm void plight_set() {
#pragma pop
/* 8019E854-8019E874 199194 0020+00 1/1 0/0 0/0 .text bgparts_activelight_init__Fv */
#ifdef NONMATCHING
static void bgparts_activelight_init() {
dScnKy_env_light_c* light = i_dKy_getEnvlight();
for (int i = 0; i < 2; i++) {
}
light->mBGpartsActiveLight[0].mIndex = 0;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -1094,6 +1190,7 @@ static asm void bgparts_activelight_init() {
#include "asm/d/kankyo/d_kankyo/bgparts_activelight_init__Fv.s"
}
#pragma pop
#endif
/* ############################################################################################## */
/* 803BBF58-803BBFB8 019078 0060+00 1/1 0/0 0/0 .data test_pos_tbl$5126 */
@@ -1221,7 +1318,7 @@ static void envcolor_init() {
g_env_light.mInitAnmTimer = 1;
g_env_light.mSchBit = 0;
g_env_light.mSchbitTimer = 0;
g_env_light.mVrboxInvisible = false;
g_env_light.mContrastFlag = 0;
g_env_light.mFogAdjEnable = true;
@@ -1294,7 +1391,8 @@ static void envcolor_init() {
g_env_light.mColpatWeather = 0;
g_env_light.field_0xecc = 0.0f;
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") || !strcmp(dComIfGp_getStartStageName(), "R_SP127")) {
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") ||
!strcmp(dComIfGp_getStartStageName(), "R_SP127")) {
if (g_env_light.field_0x12cc >= 7) {
g_env_light.mColpatWeather = 2;
} else if (g_env_light.field_0x12cc != 0) {
@@ -1313,7 +1411,8 @@ static void envcolor_init() {
g_env_light.mRainCountOrig = 0;
g_env_light.field_0x12a0 = 0;
g_env_light.mDiceWeatherMode = 0;
g_env_light.mDiceWeatherChangeTime = dComIfGs_getTime() + (cM_rndF(g_Counter.mCounter0 & 0x1F) * 15.0f);
g_env_light.mDiceWeatherChangeTime =
dComIfGs_getTime() + (cM_rndF(g_Counter.mCounter0 & 0x1F) * 15.0f);
if (g_env_light.mDiceWeatherChangeTime >= 360.0f) {
g_env_light.mDiceWeatherChangeTime -= 360.0f;
}
@@ -1417,7 +1516,7 @@ void dKy_clear_game_init() {
g_env_light.mNexttime = -1.0f;
g_env_light.mTime = -1.0f;
g_env_light.mDarkDaytime = 120.0f;
g_env_light.mDarktimeWeek = 0;
g_env_light.field_0x12fe = 0;
g_env_light.field_0x130a = 0;
@@ -2472,7 +2571,7 @@ static int dKy_Create(void*) {
}
g_env_light.mNexttime = -1.0f;
return 4;
return cPhs_COMPLEATE_e;
}
#else
#pragma push
@@ -2825,6 +2924,23 @@ SECTION_DEAD static char const* const stringBase_80394E90 =
#pragma pop
/* 801A80D0-801A8168 1A2A10 0098+00 1/1 0/0 2/2 .text dKy_fog_startendz_set__Ffff */
// matches with literals
#ifdef NONMATCHING
void dKy_fog_startendz_set(f32 param_0, f32 param_1, f32 ratio) {
if (ratio < 0.0f || ratio > 1.0f) {
OSReport_Warning("\ndKy_fog_startendz_set ratio error!\n");
ratio = 0.0f;
}
if (ratio < 9.999999747378752e-05f) {
ratio = 0.0f;
}
g_env_light.field_0x11ec = param_0;
g_env_light.field_0x11f0 = param_1;
g_env_light.field_0x11f4 = ratio;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -2833,6 +2949,7 @@ asm void dKy_fog_startendz_set(f32 param_0, f32 param_1, f32 param_2) {
#include "asm/d/kankyo/d_kankyo/dKy_fog_startendz_set__Ffff.s"
}
#pragma pop
#endif
/* 801A8168-801A8190 1A2AA8 0028+00 0/0 1/1 0/0 .text dKy_Itemgetcol_chg_on__Fv */
void dKy_Itemgetcol_chg_on() {
@@ -2870,6 +2987,23 @@ SND_INFLUENCE* dKy_Sound_get() {
}
/* 801A8484-801A8538 1A2DC4 00B4+00 0/0 2/2 0/0 .text dKy_SordFlush_set__F4cXyzi */
// matches with literals
#ifdef NONMATCHING
void dKy_SordFlush_set(cXyz param_0, int param_1) {
dScnKy_env_light_c* light = i_dKy_getEnvlight();
if (!dKy_darkworld_check() &&
(light->mThunderEff.mStateTimer >= 10 || light->mThunderEff.field_0x8 <= 0.0f)) {
if (g_env_light.mSwordLight.mState == 0) {
g_env_light.mSwordLight.mState = 1;
g_env_light.mSwordLight.mLightType = param_1;
g_env_light.mSwordLight.field_0x8.mPosition = param_0;
} else if (g_env_light.mSwordLight.mState == 2) {
g_env_light.mSwordLight.mState = 4;
}
}
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -2878,6 +3012,7 @@ asm void dKy_SordFlush_set(cXyz param_0, int param_1) {
#include "asm/d/kankyo/d_kankyo/dKy_SordFlush_set__F4cXyzi.s"
}
#pragma pop
#endif
/* ############################################################################################## */
/* 80453DA8-80453DAC 0023A8 0004+00 3/3 0/0 0/0 .sdata2 @8647 */
@@ -2894,24 +3029,20 @@ static asm void GxFogSet_Sub(_GXColor* param_0) {
#pragma pop
/* 801A85E8-801A862C 1A2F28 0044+00 1/1 0/0 0/0 .text GxFog_set__Fv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void GxFog_set() {
nofralloc
#include "asm/d/kankyo/d_kankyo/GxFog_set__Fv.s"
static void GxFog_set() {
GXColor color;
color.r = g_env_light.mFogColor.r;
color.g = g_env_light.mFogColor.g;
color.b = g_env_light.mFogColor.b;
GxFogSet_Sub(&color);
}
#pragma pop
/* 801A862C-801A8650 1A2F6C 0024+00 0/0 7/7 2/2 .text dKy_GxFog_set__Fv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dKy_GxFog_set() {
nofralloc
#include "asm/d/kankyo/d_kankyo/dKy_GxFog_set__Fv.s"
void dKy_GxFog_set() {
GxFog_set();
GxXFog_set();
}
#pragma pop
/* 801A8650-801A86F8 1A2F90 00A8+00 0/0 3/3 6/6 .text dKy_GxFog_tevstr_set__FP12dKy_tevstr_c */
#pragma push
@@ -2934,14 +3065,11 @@ asm void dKy_GfFog_tevstr_set(dKy_tevstr_c* param_0) {
#pragma pop
/* 801A87A0-801A87E4 1A30E0 0044+00 3/3 0/0 0/0 .text GxXFog_set__Fv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void GxXFog_set() {
nofralloc
#include "asm/d/kankyo/d_kankyo/GxXFog_set__Fv.s"
static void GxXFog_set() {
dKyd_xfog_table_set(g_env_light.mFogAdjTableType);
GXSetFogRangeAdj((GXBool)g_env_light.mFogAdjEnable, g_env_light.mFogAdjCenter,
&g_env_light.mXFogTbl);
}
#pragma pop
/* 801A87E4-801A880C 1A3124 0028+00 0/0 0/0 52/52 .text dKy_change_colpat__FUc */
void dKy_change_colpat(u8 colpat) {
@@ -3136,7 +3264,7 @@ void dKy_instant_rainchg() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void NewAmbColGet(_GXColorS10* param_0) {
static asm GXColor NewAmbColGet(_GXColorS10* param_0) {
nofralloc
#include "asm/d/kankyo/d_kankyo/NewAmbColGet__FP11_GXColorS10.s"
}
@@ -3185,29 +3313,26 @@ static asm void dKy_ParticleColor_get_base(cXyz* param_0, dKy_tevstr_c* param_1,
/* 801A9BE4-801A9CBC 1A4524 00D8+00 0/0 3/3 0/0 .text
* dKy_ParticleColor_get_actor__FP4cXyzP12dKy_tevstr_cP8_GXColorP8_GXColorP8_GXColorP8_GXColorf */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dKy_ParticleColor_get_actor(cXyz* param_0, dKy_tevstr_c* param_1, _GXColor* param_2,
_GXColor* param_3, _GXColor* param_4, _GXColor* param_5,
f32 param_6) {
nofralloc
#include "asm/d/kankyo/d_kankyo/dKy_ParticleColor_get_actor__FP4cXyzP12dKy_tevstr_cP8_GXColorP8_GXColorP8_GXColorP8_GXColorf.s"
void dKy_ParticleColor_get_actor(cXyz* param_0, dKy_tevstr_c* param_1, _GXColor* param_2,
_GXColor* param_3, _GXColor* param_4, _GXColor* param_5,
f32 param_6) {
if (param_1 != NULL) {
*param_2 = NewAmbColGet(&param_1->mColorC0);
} else {
*param_2 = NewAmbColGet(&g_env_light.mActorAmbience);
}
dKy_ParticleColor_get_base(param_0, param_1, param_2, param_3, param_4, param_5, param_6);
}
#pragma pop
/* 801A9CBC-801A9D60 1A45FC 00A4+00 0/0 6/6 0/0 .text
* dKy_ParticleColor_get_bg__FP4cXyzP12dKy_tevstr_cP8_GXColorP8_GXColorP8_GXColorP8_GXColorf */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dKy_ParticleColor_get_bg(cXyz* param_0, dKy_tevstr_c* param_1, _GXColor* param_2,
_GXColor* param_3, _GXColor* param_4, _GXColor* param_5,
f32 param_6) {
nofralloc
#include "asm/d/kankyo/d_kankyo/dKy_ParticleColor_get_bg__FP4cXyzP12dKy_tevstr_cP8_GXColorP8_GXColorP8_GXColorP8_GXColorf.s"
void dKy_ParticleColor_get_bg(cXyz* param_0, dKy_tevstr_c* param_1, _GXColor* param_2,
_GXColor* param_3, _GXColor* param_4, _GXColor* param_5,
f32 param_6) {
*param_2 = NewAmbColGet(&g_env_light.mTerrainAmbienceBG0);
dKy_ParticleColor_get_base(param_0, param_1, param_2, param_3, param_4, param_5, param_6);
}
#pragma pop
/* ############################################################################################## */
/* 80394C6C-80394C6C 0212CC 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
@@ -3247,6 +3372,60 @@ SECTION_SDATA2 static f32 lit_9677 = 1.5f;
/* 801AAC5C-801AAD50 1A559C 00F4+00 0/0 1/1 0/0 .text
* dKy_WolfEyeLight_set__FP4cXyzfffP8_GXColorfUcUc */
// matches with literals
#ifdef NONMATCHING
int dKy_WolfEyeLight_set(cXyz* param_0, f32 param_1, f32 param_2, f32 param_3, GXColor* param_4,
f32 param_5, u8 param_6, u8 param_7) {
dScnKy_env_light_c* light = i_dKy_getEnvlight();
light->field_0x0c18[0].mPos = *param_0;
light->field_0x0c18[0].mColor.r = param_4->r;
light->field_0x0c18[0].mColor.g = param_4->g;
light->field_0x0c18[0].mColor.b = param_4->b;
light->field_0x0c18[0].mColor.a = 255;
light->field_0x0c18[0].field_0x10 = param_5;
light->field_0x0c18[0].field_0x14 = 0.99f;
light->field_0x0c18[0].field_0x18 = param_3;
light->field_0x0c18[0].field_0x1c = param_1;
light->field_0x0c18[0].field_0x20 = param_2 + 90.0f;
light->field_0x0c18[0].field_0x24 = param_6;
light->field_0x0c18[0].field_0x25 = param_7;
f32 fvar0;
f32 fvar1;
f32 fvar2;
switch (light->field_0x1309) {
case 0:
fvar0 = 50.0f;
fvar1 = 1.0f;
fvar2 = 0.9f;
break;
case 1:
fvar0 = 200.0f;
fvar1 = 1.0f;
fvar2 = fvar1;
break;
case 2:
fvar0 = 350.0f;
fvar1 = 1.5f;
fvar2 = fvar1;
break;
case 3:
default:
fvar0 = 1500.0f;
fvar1 = 4.0f;
fvar2 = 1.5f;
}
light->field_0x127c = fvar0;
light->field_0x0c18[0].field_0x10 *= fvar1;
light->field_0x0c18[0].field_0x18 *= fvar2;
light->field_0x0c18[0].field_0x26 = 1;
return 1;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -3256,6 +3435,7 @@ asm void dKy_WolfEyeLight_set(cXyz* param_0, f32 param_1, f32 param_2, f32 param
#include "asm/d/kankyo/d_kankyo/dKy_WolfEyeLight_set__FP4cXyzfffP8_GXColorfUcUc.s"
}
#pragma pop
#endif
/* ############################################################################################## */
/* 80453DD0-80453DD4 0023D0 0004+00 3/3 0/0 0/0 .sdata2 @9722 */
@@ -3355,14 +3535,33 @@ asm void dKy_pol_efftype2_get(cBgS_PolyInfo const* param_0) {
#pragma pop
/* 801AB4C0-801AB59C 1A5E00 00DC+00 0/0 9/9 21/21 .text dKy_pol_sound_get__FPC13cBgS_PolyInfo */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm u8 dKy_pol_sound_get(cBgS_PolyInfo const* param_0) {
nofralloc
#include "asm/d/kankyo/d_kankyo/dKy_pol_sound_get__FPC13cBgS_PolyInfo.s"
u8 dKy_pol_sound_get(cBgS_PolyInfo const* p_poly) {
dScnKy_env_light_c* envLight = i_dKy_getEnvlight();
if (p_poly == NULL || &dComIfG_Bgsp() == NULL) {
return 0;
}
int att0 = dComIfG_Bgsp().GetPolyAtt0(*p_poly);
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") && g_env_light.field_0x12fe == 4 &&
att0 == 4) {
att0 = 13;
}
int att1 = dComIfG_Bgsp().GetPolyAtt1(*p_poly);
u8 uvar3;
if (envLight->mResPolSound != NULL) {
uvar3 = envLight->mResPolSound[att0].data[att1];
} else {
uvar3 = 0;
}
if (uvar3 == 0xFF) {
uvar3 = 0;
}
return uvar3;
}
#pragma pop
/* 801AB59C-801AB668 1A5EDC 00CC+00 0/0 5/5 0/0 .text dKy_pol_argument_get__FPC13cBgS_PolyInfo */
u8 dKy_pol_argument_get(cBgS_PolyInfo const* p_poly) {
+341 -110
View File
@@ -4,6 +4,7 @@
//
#include "d/kankyo/d_kankyo_data.h"
#include "d/d_stage.h"
#include "dol2asm.h"
#include "dolphin/gx/GX.h"
#include "dolphin/types.h"
@@ -12,31 +13,12 @@
// Types:
//
// Invented name. TODO: this should be renamed and probably moved to the header
// file once l_field_data is looked into more. Looks like it might be related to
// color palettes based off of dKyd_dmpalet_getp function name?
struct dKyd_l_field_data_struct {
u8 data[52];
};
// Invented name. TODO: this should be renamed and probably moved to the header
// file once l_envr_default is looked into more.
struct dKyd_l_envr_default_struct {
u8 data[65];
};
// Invented name. TODO: this should be renamed and probably moved to the header
// file once l_vr_box_data is looked into more.
struct dKyd_l_vr_box_data_struct {
u8 data[21];
};
// Invented name. TODO: this should be renamed and probably moved to the header
// file once l_pselect_default is looked into more.
struct dKyd_l_pselect_default_struct {
u8 data[12];
};
//
// Forward References:
//
@@ -55,12 +37,6 @@ extern "C" void dKyd_light_tw_size_tbl_getp__Fv();
extern "C" void dKyd_BloomInf_tbl_getp__Fi();
extern "C" extern char const* const d_kankyo_d_kankyo_data__stringBase0;
//
// External References:
//
extern "C" extern u8 g_env_light[4880];
//
// Declarations:
//
@@ -285,71 +261,311 @@ static dKyd_lightSchejule l_time_attribute_boss[11] = {
};
/* 803A953C-803A987C 00665C 0340+00 1/1 0/0 0/0 .data l_field_data */
static dKyd_l_field_data_struct l_field_data[16] = {
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xC5, 0x9C, 0x40,
0x00, 0x46, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
static stage_palette_info_class l_field_data[16] = {
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
};
/* 800569DC-800569E8 05131C 000C+00 0/0 1/1 0/0 .text dKyd_dmpalet_getp__Fv */
@@ -359,9 +575,16 @@ void* dKyd_dmpalet_getp() {
/* ############################################################################################## */
/* 803A987C-803A9894 00699C 0018+00 1/1 0/0 0/0 .data l_pselect_default */
static dKyd_l_pselect_default_struct l_pselect_default[2] = {
{{0x00, 0x00, 0x01, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x04, 0x04, 0x05, 0x06, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}};
static stage_pselect_info_class l_pselect_default[2] = {
{
{0x00, 0x00, 0x01, 0x02, 0x02, 0x03, 0x00, 0x00},
0.0f,
},
{
{0x04, 0x04, 0x05, 0x06, 0x06, 0x07, 0x00, 0x00},
0.0f,
},
};
/* 800569E8-800569F4 051328 000C+00 0/0 1/1 0/0 .text dKyd_dmpselect_getp__Fv */
void* dKyd_dmpselect_getp() {
@@ -370,17 +593,22 @@ void* dKyd_dmpselect_getp() {
/* ############################################################################################## */
/* 803A9894-803A9918 0069B4 0082+02 1/1 0/0 0/0 .data l_envr_default */
static dKyd_l_envr_default_struct l_envr_default[2] = {
{{0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
{{0x04, 0x05, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}};
static stage_envr_info_class l_envr_default[2] = {
{
{0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
{
{0x04, 0x05, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
},
};
/* 800569F4-80056A00 051334 000C+00 0/0 1/1 0/0 .text dKyd_dmenvr_getp__Fv */
void* dKyd_dmenvr_getp() {
@@ -444,17 +672,20 @@ dKyd_lightSchejule* dKyd_schejule_boss_getp() {
}
/* 803A9A94-803A9AC0 006BB4 0028+04 1/1 0/0 0/0 .data S_xfog_table_data */
static GXFogAdjTable S_xfog_table_data[2] = {{{260, 260, 270, 280, 290, 300, 310, 320, 330, 340}},
{{250, 260, 280, 320, 350, 400, 480, 550, 600, 800}}};
static GXFogAdjTable S_xfog_table_data[2] = {
{
{260, 260, 270, 280, 290, 300, 310, 320, 330, 340},
},
{
{250, 260, 280, 320, 350, 400, 480, 550, 600, 800},
},
};
// tblIdx must be 0 or 1. Not sure when 1 is used, and didn't see a visible difference when manually
// set it.
/* 80056A24-80056A64 051364 0040+00 0/0 2/2 0/0 .text dKyd_xfog_table_set__FUc */
void dKyd_xfog_table_set(u8 tblIdx) {
for (int i = 0; i < 10; i++) {
u16 fogAdjTableEntry = S_xfog_table_data[tblIdx & 0xff].r[i];
((u16*)g_env_light)[0x856 + i] = fogAdjTableEntry;
// TODO: update this cast once g_env_light is broken up.
g_env_light.mXFogTbl.r[i] = fogAdjTableEntry;
}
}
+192 -314
View File
@@ -4,163 +4,12 @@
//
#include "d/kankyo/d_kankyo_rain.h"
#include "MSL_C/math.h"
#include "d/com/d_com_inf_game.h"
#include "d/d_demo.h"
#include "dol2asm.h"
#include "dolphin/types.h"
//
// Types:
//
struct mDoMtx_stack_c {
static u8 now[48];
};
struct mDoGph_gInf_c {
static u8 mFrameBufferTimg[4];
};
struct daPy_py_c {
/* 8006F160 */ bool getKandelaarFlamePos();
/* 8015F424 */ void checkNowWolfEyeUp();
};
struct dSv_memBit_c {
/* 80034934 */ void isDungeonItem(int) const;
};
struct dStage_roomControl_c {
/* 80024384 */ void getStatusRoomDt(int);
};
struct dScnKy_env_light_c {
/* 8019FA08 */ void getDaytime();
};
struct dRes_info_c {};
struct dRes_control_c {
/* 8003C2EC */ void getRes(char const*, s32, dRes_info_c*, int);
};
struct dPa_levelEcallBack {};
struct dKy_tevstr_c {};
struct csXyz {
/* 80018BD0 */ ~csXyz();
/* 802673F4 */ csXyz(s16, s16, s16);
};
struct _GXColor {};
struct Vec {};
struct cXyz {
/* 80009184 */ ~cXyz();
/* 80266AE4 */ void operator+(Vec const&) const;
};
struct dPa_control_c {
/* 8004D4CC */ void set(u32, u8, u16, cXyz const*, dKy_tevstr_c const*, csXyz const*,
cXyz const*, u8, dPa_levelEcallBack*, s8, _GXColor const*,
_GXColor const*, cXyz const*, f32);
};
struct dKankyo_rain_Packet {};
struct dEvent_manager_c {
/* 800483E8 */ void getRunEventName();
};
struct dDlst_peekZ_c {
/* 80056018 */ void newData(s16, s16, u32*);
};
struct dDemo_c {
static u8 m_mode[4];
};
struct dComIfG_play_c {
/* 8002C97C */ void getLayerNo(int);
};
struct dCcMassS_Mng {
/* 80085690 */ void Prepare();
};
struct dBgS_RoofChk {
/* 80078FF4 */ dBgS_RoofChk();
/* 80079090 */ ~dBgS_RoofChk();
};
struct dBgS_PolyPassChk {
/* 80078E68 */ void SetObj();
};
struct dBgS_ObjGndChk_All {
/* 800778E8 */ ~dBgS_ObjGndChk_All();
};
struct dBgS_GndChk {
/* 8007757C */ dBgS_GndChk();
/* 800775F0 */ ~dBgS_GndChk();
};
struct dBgS_CamGndChk_Wtr {
/* 80077A00 */ dBgS_CamGndChk_Wtr();
/* 80077A98 */ ~dBgS_CamGndChk_Wtr();
};
struct dBgS {
/* 8007549C */ void RoofChk(dBgS_RoofChk*);
};
struct camera_class {};
struct cBgS_GndChk {
/* 80267D28 */ void SetPos(cXyz const*);
};
struct cBgS {
/* 800744A0 */ void GroundCross(cBgS_GndChk*);
};
struct _GXTexObj {};
struct _GXTexMapID {};
struct Z2EnvSeMgr {
/* 802C7CF4 */ void startNearThunderSe(s8);
};
struct STAR_EFF {
/* 80056DC8 */ ~STAR_EFF();
/* 80056E04 */ STAR_EFF();
};
struct SNOW_EFF {
/* 80056D58 */ ~SNOW_EFF();
/* 80056D94 */ SNOW_EFF();
};
struct ResTIMG {};
struct LIGHT_INFLUENCE {};
struct JMath {
static u8 sincosTable_[65536];
};
struct J3DSys {
/* 8031073C */ void reinitGX();
};
struct J3DShape {
static u8 sOldVcdVatCmd[4];
};
struct DOUBLE_POS {};
//
// Forward References:
//
@@ -292,45 +141,6 @@ extern "C" void cLib_addCalc__FPfffff();
extern "C" void startNearThunderSe__10Z2EnvSeMgrFSc();
extern "C" void* __nw__FUli();
extern "C" void reinitGX__6J3DSysFv();
extern "C" void PSMTXConcat();
extern "C" void PSMTXInverse();
extern "C" void PSMTXRotRad();
extern "C" void PSMTXTrans();
extern "C" void C_MTXLightPerspective();
extern "C" void PSMTXMultVec();
extern "C" void PSVECAdd();
extern "C" void PSVECSquareMag();
extern "C" void PSVECSquareDistance();
extern "C" void GXSetVtxDesc();
extern "C" void GXClearVtxDesc();
extern "C" void GXSetVtxAttrFmt();
extern "C" void GXSetTexCoordGen2();
extern "C" void GXSetNumTexGens();
extern "C" void GXBegin();
extern "C" void GXSetCullMode();
extern "C" void GXSetNumChans();
extern "C" void GXSetChanCtrl();
extern "C" void GXInitTexObj();
extern "C" void GXInitTexObjLOD();
extern "C" void GXLoadTexObj();
extern "C" void GXSetNumIndStages();
extern "C" void GXSetTevColorIn();
extern "C" void GXSetTevAlphaIn();
extern "C" void GXSetTevColorOp();
extern "C" void GXSetTevAlphaOp();
extern "C" void GXSetTevColor();
extern "C" void GXSetAlphaCompare();
extern "C" void GXSetTevOrder();
extern "C" void GXSetNumTevStages();
extern "C" void GXSetFog();
extern "C" void GXSetBlendMode();
extern "C" void GXSetColorUpdate();
extern "C" void GXSetZMode();
extern "C" void GXSetZCompLoc();
extern "C" void GXLoadPosMtxImm();
extern "C" void GXSetCurrentMtx();
extern "C" void GXLoadTexMtxImm();
extern "C" void GXSetClipMode();
extern "C" void __register_global_object();
extern "C" void __construct_array();
extern "C" void __save_gpr();
@@ -360,26 +170,15 @@ extern "C" void _restgpr_27();
extern "C" void _restgpr_28();
extern "C" void _restgpr_29();
extern "C" void memcmp();
extern "C" void strcmp();
extern "C" void cos();
extern "C" void sin();
extern "C" void atan2();
extern "C" void sqrt();
extern "C" extern void* __vt__14dBgS_ObjGndChk[12 + 1 /* padding */];
extern "C" extern void* __vt__19dKankyo_star_Packet[5];
extern "C" extern void* __vt__19dKankyo_snow_Packet[5];
extern "C" extern void* __vt__18dBgS_ObjGndChk_All[12];
extern "C" extern void* __vt__9J3DPacket[5];
extern "C" u8 now__14mDoMtx_stack_c[48];
extern "C" extern u8 g_dComIfG_gameInfo[122384];
extern "C" extern u8 g_env_light[4880];
extern "C" extern u8 g_mEnvSeMgr[780];
extern "C" extern u8 g_Counter[12 + 4 /* padding */];
extern "C" extern u8 j3dSys[284];
extern "C" u8 sincosTable___5JMath[65536];
extern "C" extern u32 __float_nan;
extern "C" u8 mFrameBufferTimg__13mDoGph_gInf_c[4];
extern "C" extern u8 mStayNo__20dStage_roomControl_c[4];
extern "C" u8 m_mode__7dDemo_c[4];
extern "C" u8 sOldVcdVatCmd__8J3DShape[4];
@@ -403,6 +202,22 @@ SECTION_SDATA2 static u8 lit_3954[4] = {
/* 8005B660-8005B708 055FA0 00A8+00 3/3 0/0 0/0 .text vectle_calc__FP10DOUBLE_POSP4cXyz
*/
// matches with literals
#ifdef NONMATCHING
static void vectle_calc(DOUBLE_POS* i_pos, cXyz* o_out) {
double s = sqrt(i_pos->x * i_pos->x + i_pos->y * i_pos->y + i_pos->z * i_pos->z);
if (s != 0.0) {
o_out->x = i_pos->x / s;
o_out->y = i_pos->y / s;
o_out->z = i_pos->z / s;
} else {
o_out->x = 0.0;
o_out->y = 0.0;
o_out->z = 0.0;
}
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -411,27 +226,23 @@ static asm void vectle_calc(DOUBLE_POS* param_0, cXyz* param_1) {
#include "asm/d/kankyo/d_kankyo_rain/vectle_calc__FP10DOUBLE_POSP4cXyz.s"
}
#pragma pop
#endif
/* 8005B708-8005B760 056048 0058+00 7/7 0/0 0/0 .text get_vectle_calc__FP4cXyzP4cXyzP4cXyz */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void get_vectle_calc(cXyz* param_0, cXyz* param_1, cXyz* param_2) {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/get_vectle_calc__FP4cXyzP4cXyzP4cXyz.s"
static void get_vectle_calc(cXyz* param_0, cXyz* param_1, cXyz* param_2) {
DOUBLE_POS pos;
pos.x = param_1->x - param_0->x;
pos.y = param_1->y - param_0->y;
pos.z = param_1->z - param_0->z;
vectle_calc(&pos, param_2);
}
#pragma pop
/* 8005B760-8005B780 0560A0 0020+00 8/8 7/7 11/11 .text dKyr_get_vectle_calc__FP4cXyzP4cXyzP4cXyz
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dKyr_get_vectle_calc(cXyz* param_0, cXyz* param_1, cXyz* param_2) {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/dKyr_get_vectle_calc__FP4cXyzP4cXyzP4cXyz.s"
void dKyr_get_vectle_calc(cXyz* param_0, cXyz* param_1, cXyz* param_2) {
get_vectle_calc(param_0, param_1, param_2);
}
#pragma pop
/* ############################################################################################## */
/* 804521BC-804521C0 0007BC 0004+00 4/4 0/0 0/0 .sdata2 @3970 */
@@ -439,18 +250,41 @@ SECTION_SDATA2 static f32 lit_3970 = 200.0f;
/* 8005B780-8005B830 0560C0 00B0+00 2/2 0/0 0/0 .text
* dKy_set_eyevect_calc__FP12camera_classP3Vecff */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dKy_set_eyevect_calc(camera_class* param_0, Vec* param_1, f32 param_2,
f32 param_3) {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/dKy_set_eyevect_calc__FP12camera_classP3Vecff.s"
static void dKy_set_eyevect_calc(camera_class* i_camera, Vec* param_1, f32 param_2, f32 param_3) {
cXyz tmp;
get_vectle_calc(&i_camera->mLookat.mEye, &i_camera->mLookat.mCenter, &tmp);
param_1->x = i_camera->mLookat.mEye.x + tmp.x * param_2;
param_1->y = (i_camera->mLookat.mEye.y + tmp.y * param_3) - lit_3970;
param_1->z = i_camera->mLookat.mEye.z + tmp.z * param_2;
}
#pragma pop
/* 8005B830-8005B92C 056170 00FC+00 6/6 0/0 0/0 .text
* dKy_set_eyevect_calc2__FP12camera_classP3Vecff */
// matches with literals
#ifdef NONMATCHING
static void dKy_set_eyevect_calc2(camera_class* i_camera, Vec* param_1, f32 param_2, f32 param_3) {
cXyz tmp;
DOUBLE_POS pos;
pos.x = i_camera->mLookat.mCenter.x - i_camera->mLookat.mEye.x;
if (param_3 != 0.0f) {
pos.y = i_camera->mLookat.mCenter.y - i_camera->mLookat.mEye.y;
} else {
pos.y = 0.0f;
}
pos.z = i_camera->mLookat.mCenter.z - i_camera->mLookat.mEye.z;
vectle_calc(&pos, &tmp);
param_1->x = i_camera->mLookat.mEye.x + tmp.x * param_2;
param_1->y = i_camera->mLookat.mEye.y + tmp.y * param_3;
param_1->z = i_camera->mLookat.mEye.z + tmp.z * param_2;
if (param_3 == 0.0f) {
param_1->y = 0.0f;
}
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -460,6 +294,7 @@ static asm void dKy_set_eyevect_calc2(camera_class* param_0, Vec* param_1, f32 p
#include "asm/d/kankyo/d_kankyo_rain/dKy_set_eyevect_calc2__FP12camera_classP3Vecff.s"
}
#pragma pop
#endif
/* ############################################################################################## */
/* 804521C0-804521C4 0007C0 0004+00 1/1 0/0 0/0 .sdata2 @3992 */
@@ -473,24 +308,35 @@ SECTION_SDATA2 static f64 lit_3995 = 4503601774854144.0 /* cast s32 to float */;
/* 8005B92C-8005BA24 05626C 00F8+00 5/5 0/0 0/0 .text
* dKyr_set_btitex_common__FP9_GXTexObjP7ResTIMG11_GXTexMapID */
// matches with literals
#ifdef NONMATCHING
static void dKyr_set_btitex_common(GXTexObj* i_obj, ResTIMG* i_img, GXTexMapID i_mapID) {
GXInitTexObj(i_obj, (&i_img->format + i_img->imageOffset), i_img->width, i_img->height,
(GXTexFmt)i_img->format, (GXTexWrapMode)i_img->wrapS, (GXTexWrapMode)i_img->wrapT,
(GXBool)(i_img->mipmapCount > 1));
GXInitTexObjLOD(i_obj, (GXTexFilter)i_img->minFilter, (GXTexFilter)i_img->magFilter,
i_img->minLOD * 0.125f, i_img->maxLOD * 0.125f, i_img->LODBias * 0.01f,
(GXBool)i_img->biasClamp, (GXBool)i_img->doEdgeLOD,
(GXAnisotropy)i_img->maxAnisotropy);
GXLoadTexObj(i_obj, i_mapID);
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dKyr_set_btitex_common(_GXTexObj* param_0, ResTIMG* param_1, _GXTexMapID param_2) {
static asm void dKyr_set_btitex_common(GXTexObj* param_0, ResTIMG* param_1, GXTexMapID param_2) {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/dKyr_set_btitex_common__FP9_GXTexObjP7ResTIMG11_GXTexMapID.s"
}
#pragma pop
#endif
/* 8005BA24-8005BA48 056364 0024+00 12/12 0/0 0/0 .text dKyr_set_btitex__FP9_GXTexObjP7ResTIMG */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dKyr_set_btitex(_GXTexObj* param_0, ResTIMG* param_1) {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/dKyr_set_btitex__FP9_GXTexObjP7ResTIMG.s"
static void dKyr_set_btitex(GXTexObj* i_obj, ResTIMG* i_img) {
dKyr_set_btitex_common(i_obj, i_img, GX_TEXMAP0);
}
#pragma pop
/* ############################################################################################## */
/* 804521D0-804521D4 0007D0 0004+00 4/4 0/0 0/0 .sdata2 @4103 */
@@ -543,25 +389,15 @@ asm void dKyr_lenzflare_move() {
/* 80452208-8045220C 000808 0004+00 3/3 0/0 0/0 .sdata2 @4126 */
SECTION_SDATA2 static f32 lit_4126 = 285.0f;
/* 8045220C-80452210 00080C 0004+00 1/1 0/0 0/0 .sdata2 @4127 */
SECTION_SDATA2 static f32 lit_4127 = 67.5f;
/* 8005BED8-8005BF08 056818 0030+00 1/1 0/0 0/0 .text dKyr_moon_arrival_check__Fv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dKyr_moon_arrival_check() {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/dKyr_moon_arrival_check__Fv.s"
static bool dKyr_moon_arrival_check() {
return g_env_light.mDaytime > lit_4126 || g_env_light.mDaytime < 67.5f;
}
#pragma pop
/* ############################################################################################## */
/* 8037A4C0-8037A4E8 006B20 0028+00 1/1 0/0 0/0 .rodata sun_chkpnt$4155 */
SECTION_RODATA static u8 const sun_chkpnt[40] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x20, 0x00, 0x00, 0xC1, 0xA0,
0x00, 0x00, 0x41, 0x20, 0x00, 0x00, 0x41, 0xA0, 0x00, 0x00, 0xC1, 0xA0, 0x00, 0x00,
0x41, 0x20, 0x00, 0x00, 0x41, 0xA0, 0x00, 0x00, 0xC1, 0x20, 0x00, 0x00,
SECTION_RODATA static f32 const sun_chkpnt[10] = {
0.0f, 0.0f, -10.0f, -20.0f, 10.0f, 20.0f, -20.0f, 10.0f, 20.0f, -10.0f,
};
COMPILER_STRIP_GATE(0x8037A4C0, &sun_chkpnt);
@@ -573,13 +409,17 @@ SECTION_DEAD static char const* const stringBase_8037A580 = "D_MN09B";
#pragma pop
/* 803A9BA0-803A9BAC 006CC0 000C+00 1/1 0/0 0/0 .data sun_color$4213 */
SECTION_DATA static u8 sun_color[12] = {
0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF,
SECTION_DATA static GXColor sun_color[3] = {
{255, 255, 253, 255},
{255, 255, 255, 255},
{255, 255, 253, 255},
};
/* 803A9BAC-803A9BB8 006CCC 000C+00 1/1 0/0 0/0 .data sun_color2$4214 */
SECTION_DATA static u8 sun_color2[12] = {
0xFF, 0x6E, 0x2B, 0xFF, 0x9C, 0x79, 0x5C, 0xFF, 0xFF, 0x4E, 0x00, 0xFF,
SECTION_DATA static GXColor sun_color2[3] = {
{255, 110, 43, 255},
{156, 121, 92, 255},
{255, 78, 0, 255},
};
/* 80450EE8-80450EEC 0003E8 0004+00 1/1 0/0 0/0 .sbss S_parcent_bak$4131 */
@@ -692,19 +532,10 @@ asm void dKyr_rain_init() {
}
#pragma pop
/* ############################################################################################## */
/* 80452278-8045227C 000878 0004+00 1/1 0/0 0/0 .sdata2 @4430 */
SECTION_SDATA2 static f32 lit_4430 = -800.0f;
/* 8005CDA8-8005CDD0 0576E8 0028+00 1/1 0/0 0/0 .text rain_bg_chk__FP19dKankyo_rain_Packeti */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void rain_bg_chk(dKankyo_rain_Packet* param_0, int param_1) {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/rain_bg_chk__FP19dKankyo_rain_Packeti.s"
static void rain_bg_chk(dKankyo_rain_Packet* i_packet, int i_idx) {
i_packet->mRainEff[i_idx].field_0x30 = dComIfGp_getCamera(0)->mLookat.mCenter.y + -800.0f;
}
#pragma pop
/* ############################################################################################## */
/* 8037A578-8037A578 006BD8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
@@ -720,6 +551,37 @@ SECTION_SDATA2 static f32 lit_4467 = 50.0f;
SECTION_SDATA2 static f32 lit_4468 = 10000.0f;
/* 8005CDD0-8005CF78 057710 01A8+00 1/1 0/0 0/0 .text overhead_bg_chk__Fv */
// matches with literals
#ifdef NONMATCHING
static bool overhead_bg_chk() {
camera_class* camera = dComIfGp_getCamera(0);
bool chk = false;
dBgS_ObjGndChk_All gndchk;
dBgS_RoofChk roofchk;
cXyz chkPos = camera->mLookat.mEye;
chkPos.y += 50.0f;
roofchk.i_SetPos(chkPos);
if (dComIfG_Bgsp().RoofChk(&roofchk) != lit_4361) {
chk = true;
// Outside East Castle Town
if (!strcmp(dComIfGp_getStartStageName(), "F_SP122") &&
dStage_roomControl_c::getStayNo() == 17) {
return false;
}
}
chkPos.y += 10000.0f;
gndchk.SetPos(&chkPos);
if (dComIfG_Bgsp().GroundCross(&gndchk) > camera->mLookat.mEye.y + 50.0f) {
chk = true;
}
return chk;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -728,6 +590,7 @@ static asm void overhead_bg_chk() {
#include "asm/d/kankyo/d_kankyo_rain/overhead_bg_chk__Fv.s"
}
#pragma pop
#endif
/* 8005CF78-8005D18C 0578B8 0214+00 1/1 0/0 0/0 .text forward_overhead_bg_chk__FP4cXyzf
*/
@@ -879,14 +742,14 @@ asm void dKyr_rain_move() {
#pragma pop
/* 8005E8B0-8005E8F8 0591F0 0048+00 1/1 0/0 0/0 .text d_krain_cut_turn_check__Fv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void d_krain_cut_turn_check() {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/d_krain_cut_turn_check__Fv.s"
static bool d_krain_cut_turn_check() {
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
return player != NULL && (player->getCutType() == daPy_py_c::TYPE_CUT_TURN_RIGHT ||
player->getCutType() == daPy_py_c::TYPE_CUT_TURN_LEFT ||
player->getCutType() == daPy_py_c::TYPE_CUT_LARGE_TURN_LEFT ||
player->getCutType() == daPy_py_c::TYPE_CUT_LARGE_TURN_RIGHT);
}
#pragma pop
/* ############################################################################################## */
/* 8037A578-8037A578 006BD8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
@@ -1088,14 +951,14 @@ asm void dKyr_star_init() {
#pragma pop
/* 8006140C-80061438 05BD4C 002C+00 0/0 1/1 0/0 .text dKyr_star_move__Fv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dKyr_star_move() {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/dKyr_star_move__Fv.s"
void dKyr_star_move() {
dKankyo_star_Packet* packet = g_env_light.mpStarPacket;
packet->mEffectNum = g_env_light.mStarCount;
if (packet->mEffectNum != 0) {
packet->mEffect[0].field_0x28 = lit_4354;
}
}
#pragma pop
/* ############################################################################################## */
/* 8037A578-8037A578 006BD8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
@@ -1214,14 +1077,14 @@ asm void vrkumo_move() {
#pragma pop
/* 80062ADC-80062B4C 05D41C 0070+00 7/7 0/0 0/0 .text dKr_cullVtx_Set__Fv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dKr_cullVtx_Set() {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/dKr_cullVtx_Set__Fv.s"
static void dKr_cullVtx_Set() {
GXSetCullMode(GX_CULL_NONE);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGBA4, 8);
GXClearVtxDesc();
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
}
#pragma pop
/* ############################################################################################## */
/* 8037A4E8-8037A508 006B48 0020+00 1/1 0/0 0/0 .rodata @6991 */
@@ -1873,14 +1736,10 @@ asm void drawVrkumo(f32 (*param_0)[4], _GXColor& param_1, u8** param_2) {
#pragma pop
/* 8006B190-8006B1A8 065AD0 0018+00 0/0 1/1 0/0 .text dKyr_thunder_init__Fv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dKyr_thunder_init() {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/dKyr_thunder_init__Fv.s"
void dKyr_thunder_init() {
g_env_light.mThunderEff.mStateTimer = 0;
g_env_light.mThunderEff.field_0x2 = 0;
}
#pragma pop
/* ############################################################################################## */
/* 8037A578-8037A578 006BD8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
@@ -1978,6 +1837,25 @@ asm void dKyr_odour_draw(f32 (*param_0)[4], u8** param_1) {
#pragma pop
/* 8006C790-8006C85C 0670D0 00CC+00 0/0 1/1 0/0 .text dKyr_mud_init__Fv */
// matches with literals
#ifdef NONMATCHING
void dKyr_mud_init() {
dScnKy_env_light_c* light = i_dKy_getEnvlight();
light->mpMudPacket->mpMoyaRes = (u8*)dComIfG_getObjectRes("Always", 0x53);
for (int i = 0; i < 100; i++) {
light->mpMudPacket->mEffect[i].mStatus = 0;
}
light->mpMudPacket->mEffectNum = 0;
if (!dComIfGs_isStageBossEnemy()) {
light->mpMudPacket->field_0x1c3c = 1.0f;
} else {
light->mpMudPacket->field_0x1c3c = 0.0f;
}
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -1986,6 +1864,7 @@ asm void dKyr_mud_init() {
#include "asm/d/kankyo/d_kankyo_rain/dKyr_mud_init__Fv.s"
}
#pragma pop
#endif
/* ############################################################################################## */
/* 804525D4-804525D8 000BD4 0004+00 1/1 0/0 0/0 .sdata2 @11302 */
@@ -2024,34 +1903,33 @@ asm void dKyr_mud_draw(f32 (*param_0)[4], u8** param_1) {
}
#pragma pop
/* ############################################################################################## */
/* 8037A578-8037A578 006BD8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
#pragma force_active on
SECTION_DEAD static char const* const stringBase_8037A60C = "F_kumolight_01.bti";
/* @stringBase0 padding */
SECTION_DEAD static char const* const pad_8037A61F = "";
#pragma pop
/* 8006D914-8006DA04 068254 00F0+00 0/0 1/1 1/1 .text dKyr_evil_init__Fv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dKyr_evil_init() {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/dKyr_evil_init__Fv.s"
void dKyr_evil_init() {
if (g_env_light.mpEvilPacket != NULL) {
g_env_light.mpEvilPacket->mpMoyaRes = (u8*)dComIfG_getObjectRes("Always", 0x53);
g_env_light.mpEvilPacket->mpKumoLightRes = (u8*)dComIfG_getStageRes("F_kumolight_01.bti");
if (g_env_light.mpEvilPacket->mpKumoLightRes == NULL) {
g_env_light.mpEvilPacket->mpKumoLightRes = (u8*)dComIfG_getObjectRes("Always", 0x53);
}
for (int i = 0; i < 2000; i++) {
g_env_light.mpEvilPacket->mEffect[i].mStatus = 0;
}
g_env_light.mpEvilPacket->mEffectNum = 0;
}
}
#pragma pop
/* 8006DA04-8006DA7C 068344 0078+00 0/0 1/1 0/0 .text dKyr_evil_move__Fv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dKyr_evil_move() {
nofralloc
#include "asm/d/kankyo/d_kankyo_rain/dKyr_evil_move__Fv.s"
void dKyr_evil_move() {
dKankyo_evil_Packet* packet = g_env_light.mpEvilPacket;
cXyz vec = dKyw_get_wind_vecpow();
dBgS_GndChk gndchk;
for (int i = 0; i < packet->mEffectNum; i++) {
}
}
#pragma pop
/* ############################################################################################## */
/* 80450F40-80450F44 000440 0004+00 1/1 0/0 0/0 .sbss rot$11586 */
+4 -4
View File
@@ -381,7 +381,7 @@ EF_MUD_EFF::EF_MUD_EFF() {
/* 8005703C-8005706C 05197C 0030+00 1/0 0/0 0/0 .text draw__18dKankyo_mud_PacketFv */
void dKankyo_mud_Packet::draw() {
dKyr_mud_draw(j3dSys.getViewMtx(), &field_0x14);
dKyr_mud_draw(j3dSys.getViewMtx(), &mpMoyaRes);
}
/* 8005706C-800570A8 0519AC 003C+00 2/2 0/0 0/0 .text __dt__11EF_EVIL_EFFFv */
@@ -394,7 +394,7 @@ EF_EVIL_EFF::EF_EVIL_EFF() {
/* 800570AC-800570DC 0519EC 0030+00 1/0 0/0 0/0 .text draw__19dKankyo_evil_PacketFv */
void dKankyo_evil_Packet::draw() {
dKyr_evil_draw(j3dSys.getViewMtx(), &field_0x14);
dKyr_evil_draw(j3dSys.getViewMtx(), &mpMoyaRes);
}
/* 800570DC-8005710C 051A1C 0030+00 1/1 0/0 0/0 .text dKyw_drawSun__Fi */
@@ -1352,7 +1352,7 @@ static void wether_move_mud() {
case 1:
dKyr_mud_move();
if (g_env_light.field_0x1048 == 0 && g_env_light.mpMudPacket->field_0x10 == 0) {
if (g_env_light.field_0x1048 == 0 && g_env_light.mpMudPacket->mEffectNum == 0) {
g_env_light.mMudInitialized = 0;
delete g_env_light.mpMudPacket;
@@ -1379,7 +1379,7 @@ static void wether_move_evil() {
case 1:
dKyr_evil_move();
if (g_env_light.field_0x1054 == 0 && g_env_light.mpEvilPacket->field_0x10 == 0) {
if (g_env_light.field_0x1054 == 0 && g_env_light.mpEvilPacket->mEffectNum == 0) {
g_env_light.mEvilInitialized = 0;
delete g_env_light.mpEvilPacket;
+4 -4
View File
@@ -196,9 +196,9 @@ void dRenderingMap_c::makeResTIMG(ResTIMG* p_image, u16 width, u16 height, u8* p
p_image->height = height;
p_image->wrapS = GX_CLAMP;
p_image->wrapT = GX_CLAMP;
p_image->palettesEnabled = true;
p_image->paletteFormat = 2;
p_image->paletteCount = param_5 * 4;
p_image->indexTexture = true;
p_image->colorFormat = 2;
p_image->numColors = param_5 * 4;
p_image->paletteOffset = p_palette - (u8*)p_image;
p_image->mipmapEnabled = false;
p_image->doEdgeLOD = false;
@@ -210,7 +210,7 @@ void dRenderingMap_c::makeResTIMG(ResTIMG* p_image, u16 width, u16 height, u8* p
p_image->maxLOD = 0;
p_image->mipmapCount = 1;
p_image->LODBias = 0;
p_image->texDataOffset = p_data - (u8*)p_image;
p_image->imageOffset = p_data - (u8*)p_image;
}
/* 8003CDAC-8003CE78 0376EC 00CC+00 0/0 2/2 0/0 .text renderingMap__15dRenderingMap_cFv
+1 -1
View File
@@ -245,7 +245,7 @@ Vec dMapInfo_n::getMapPlayerPos() {
Vec pos;
fopAc_ac_c* player = daPy_getPlayerActorClass();
if (player != NULL) {
pos = player->mCurrent.mPosition;
pos = player->current.pos;
} else {
f32 tmp = FLOAT_LABEL(lit_3796);
pos.x = tmp;
+2 -2
View File
@@ -1020,7 +1020,7 @@ asm void dMenu_Letter_c::screenSetShadow() {
/* ############################################################################################## */
/* 80396D10-80396D70 023370 0060+00 1/1 0/0 0/0 .rodata line_tag$4914 */
SECTION_RODATA static u8 const line_tag[96] = {
SECTION_RODATA static u8 const line_tag4914[96] = {
0x00, 0x00, 0x6C, 0x69, 0x6E, 0x65, 0x30, 0x39, 0x00, 0x00, 0x6C, 0x69, 0x6E, 0x65, 0x31, 0x30,
0x00, 0x00, 0x6C, 0x69, 0x6E, 0x65, 0x31, 0x31, 0x00, 0x00, 0x6C, 0x69, 0x6E, 0x65, 0x31, 0x32,
0x00, 0x00, 0x6C, 0x69, 0x6E, 0x65, 0x31, 0x33, 0x00, 0x00, 0x6C, 0x69, 0x6E, 0x65, 0x31, 0x34,
@@ -1028,7 +1028,7 @@ SECTION_RODATA static u8 const line_tag[96] = {
0x00, 0x00, 0x6C, 0x69, 0x6E, 0x65, 0x31, 0x37, 0x00, 0x00, 0x6C, 0x69, 0x6E, 0x65, 0x31, 0x38,
0x00, 0x00, 0x6C, 0x69, 0x6E, 0x65, 0x31, 0x39, 0x00, 0x00, 0x6C, 0x69, 0x6E, 0x65, 0x32, 0x30,
};
COMPILER_STRIP_GATE(0x80396D10, &line_tag);
COMPILER_STRIP_GATE(0x80396D10, &line_tag4914);
/* 80396DC0-80396DC0 023420 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
+1 -1
View File
@@ -2489,7 +2489,7 @@ int dMw_c::_create() {
field_0x144 = 3;
dMeter2Info_setWindowStatus(0);
return 4;
return cPhs_COMPLEATE_e;
}
/* 801FD2D8-801FD450 1F7C18 0178+00 1/1 0/0 0/0 .text _execute__5dMw_cFv */
+1 -5
View File
@@ -29,10 +29,6 @@ struct dDemo_c {
static u8 m_mode[4];
};
struct dCamera_c {
/* 80174EA4 */ bool CalcSubjectAngle(s16*, s16*);
};
//
// Forward References:
//
@@ -484,7 +480,7 @@ int dMeter2_c::_create() {
mpHeap->getTotalFreeSize();
field_0x11c = NULL;
mDoExt_setCurrentHeap(heap);
return 4;
return cPhs_COMPLEATE_e;
}
/* 8021F128-8021F370 219A68 0248+00 1/1 0/0 0/0 .text _execute__9dMeter2_cFv */
+3 -3
View File
@@ -1806,10 +1806,10 @@ int dMsgFlow_c::event018(mesg_flow_node_event* flow_node, fopAc_ac_c* actor) {
if (actor != NULL) {
int stayNo = dComIfGp_roomControl_getStayNo();
if (stayNo != 0) {
mDoAud_messageSePlay(field_0x45, &actor->mCurrent.mPosition,
mDoAud_messageSePlay(field_0x45, &actor->current.pos,
dComIfGp_getReverb(stayNo));
} else {
mDoAud_messageSePlay(field_0x45, &actor->mCurrent.mPosition, 0);
mDoAud_messageSePlay(field_0x45, &actor->current.pos, 0);
}
} else {
int stayNo = dComIfGp_roomControl_getStayNo();
@@ -1839,7 +1839,7 @@ int dMsgFlow_c::event020(mesg_flow_node_event* flow_node, fopAc_ac_c* actor) {
for (int i = 0; i < room->mRoomDt.getPlayerNum(); i++, actor_data++) {
if ((u8)actor_data->mAngle.z == prm0) {
player->setPlayerPosAndAngle(&actor_data->mSpawnPos, player->mCurrent.mAngle.y, 0);
player->setPlayerPosAndAngle(&actor_data->mSpawnPos, player->current.angle.y, 0);
break;
}
}
+298 -362
View File
@@ -4,172 +4,10 @@
//
#include "d/particle/d_particle.h"
#include "d/com/d_com_inf_game.h"
#include "dol2asm.h"
#include "dolphin/types.h"
//
// Types:
//
struct mDoLib_clipper {
static u8 mClipper[92];
};
struct mDoGph_gInf_c {
static u8 mFrameBufferTimg[4];
};
struct mDoDvdThd_toMainRam_c {
/* 80016394 */ void create(char const*, u8, JKRHeap*);
};
struct fopAcM_wt_c {
/* 8001DD84 */ void waterCheck(cXyz const*);
static f32 mWaterY[1 + 1 /* padding */];
};
struct daPy_py_c {
/* 8015F424 */ void checkNowWolfEyeUp();
};
struct dPa_windPcallBack {
/* 8004B4E0 */ void execute(JPABaseEmitter*, JPABaseParticle*);
/* 8004FF2C */ ~dPa_windPcallBack();
};
struct dPa_wbPcallBack_c {
/* 8004DC28 */ void execute(JPABaseEmitter*, JPABaseParticle*);
/* 8004FECC */ ~dPa_wbPcallBack_c();
};
struct dPa_simpleData_c {
/* 8004B024 */ ~dPa_simpleData_c();
/* 8004B060 */ dPa_simpleData_c();
};
struct dPa_setColorEcallBack {
/* 800502B0 */ void draw(JPABaseEmitter*);
/* 800502E0 */ void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8);
/* 800502E4 */ ~dPa_setColorEcallBack();
};
struct dPa_selectTexEcallBack {
/* 8004ADC4 */ void draw(JPABaseEmitter*);
/* 8004FF8C */ ~dPa_selectTexEcallBack();
/* 80050010 */ void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8);
};
struct dPa_particleTracePcallBack_c {
/* 8004FAD4 */ void execute(JPABaseEmitter*, JPABaseParticle*);
/* 8004FC68 */ ~dPa_particleTracePcallBack_c();
};
struct dPa_name {
static u8 j_o_id[10 + 2 /* padding */];
static u8 s_o_id[28];
};
struct dPa_modelPcallBack {
/* 8004A460 */ void draw(JPABaseEmitter*, JPABaseParticle*);
/* 80050038 */ ~dPa_modelPcallBack();
};
struct dPa_modelEcallBack {
struct model_c {
/* 8004A608 */ void set(J3DModelData*, dKy_tevstr_c const&, u8, void*, u8, u8);
/* 8004A7AC */ void setup();
/* 8004A88C */ void cleanup();
/* 8004A8DC */ void draw(f32 (*)[4]);
/* 8004AB88 */ ~model_c();
/* 8004FB90 */ model_c();
};
/* 8004AA34 */ void draw(JPABaseEmitter*);
/* 8004AAA8 */ void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8);
/* 8004AB1C */ void create(u8);
/* 8004ABC4 */ void remove();
/* 8004AC00 */ void setModel(JPABaseEmitter*, J3DModelData*, dKy_tevstr_c const&, u8, void*, u8,
u8);
/* 8004AC90 */ void resetModel(JPABaseEmitter*);
/* 8004ACC0 */ void setupModel(JPABaseEmitter*);
/* 8004ACEC */ void drawModel(JPABaseEmitter*, f32 (*)[4]);
/* 8004AD28 */ void cleanupModel(JPABaseEmitter*);
/* 8004AD58 */ void getModel(JPABaseEmitter*);
/* 8004AD90 */ void getRotAxis(JPABaseEmitter*);
/* 80050014 */ void drawAfter(JPABaseEmitter*);
/* 80050378 */ ~dPa_modelEcallBack();
static u8 mEcallback[4];
static u8 mPcallback[4];
static u8 mModel[4];
};
struct dPa_light8PcallBack {
/* 8004DD10 */ void execute(JPABaseEmitter*, JPABaseParticle*);
/* 8004DD1C */ void draw(JPABaseEmitter*, JPABaseParticle*);
/* 8004FE0C */ ~dPa_light8PcallBack();
};
struct dPa_light8EcallBack {
/* 8004979C */ void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8);
/* 8004A340 */ void draw(JPABaseEmitter*);
/* 8005015C */ ~dPa_light8EcallBack();
/* 800501E0 */ void drawAfter(JPABaseEmitter*);
};
struct dPa_gen_d_light8PcallBack {
/* 8004DD18 */ void execute(JPABaseEmitter*, JPABaseParticle*);
/* 8004ED44 */ void draw(JPABaseEmitter*, JPABaseParticle*);
/* 8004FD4C */ ~dPa_gen_d_light8PcallBack();
};
struct dPa_gen_d_light8EcallBack {
/* 800497CC */ void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8);
/* 8004A388 */ void draw(JPABaseEmitter*);
/* 80050098 */ void drawAfter(JPABaseEmitter*);
/* 800503FC */ ~dPa_gen_d_light8EcallBack();
};
struct dPa_gen_b_light8PcallBack {
/* 8004DD14 */ void execute(JPABaseEmitter*, JPABaseParticle*);
/* 8004E6A8 */ void draw(JPABaseEmitter*, JPABaseParticle*);
/* 8004FDAC */ ~dPa_gen_b_light8PcallBack();
};
struct dPa_gen_b_light8EcallBack {
/* 800497B0 */ void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8);
/* 8004A364 */ void draw(JPABaseEmitter*);
/* 800500B8 */ ~dPa_gen_b_light8EcallBack();
/* 8005013C */ void drawAfter(JPABaseEmitter*);
};
struct dPa_fsenthPcallBack {
/* 8004DCA0 */ void execute(JPABaseEmitter*, JPABaseParticle*);
/* 8004DD0C */ void draw(JPABaseEmitter*, JPABaseParticle*);
/* 8004FE6C */ ~dPa_fsenthPcallBack();
};
struct cBgS_PolyInfo {};
struct dJntCol_c {
/* 80036C44 */ void getHitmarkPosAndAngle(cXyz const*, csXyz const*, cXyz*, csXyz*, int) const;
};
struct dBgS {
/* 80074E50 */ void GetPolyAtt0(cBgS_PolyInfo const&);
};
struct cM3dGPla {};
struct cBgS {
/* 80074660 */ void ChkPolySafe(cBgS_PolyInfo const&);
/* 80074744 */ void GetTriPla(cBgS_PolyInfo const&, cM3dGPla*) const;
};
struct J3DUClipper {
/* 802738FC */ void clip(f32 const (*)[4], Vec, f32) const;
};
#include "m_Do/m_Do_lib.h"
//
// Forward References:
@@ -340,6 +178,7 @@ extern "C" u8 m_b_Light8PcallBack__13dPa_control_c[4];
extern "C" u8 m_d_Light8EcallBack__13dPa_control_c[4];
extern "C" u8 m_d_Light8PcallBack__13dPa_control_c[4];
extern "C" u8 mParticleTracePCB__13dPa_control_c[4 + 4 /* padding */];
extern "C" u8 mStatus__13dPa_control_c;
//
// External References:
@@ -457,19 +296,15 @@ 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__19JPAParticleCallBack[5];
extern "C" extern void* __vt__8cM3dGPla[3];
extern "C" u8 j_o_id__8dPa_name[10 + 2 /* padding */];
extern "C" u8 s_o_id__8dPa_name[28];
extern "C" u8 mClipper__14mDoLib_clipper[92];
extern "C" extern u8 g_dComIfG_gameInfo[122384];
extern "C" u8 sincosTable___5JMath[65536];
extern "C" extern u32 g_whiteColor;
extern "C" u8 mFrameBufferTimg__13mDoGph_gInf_c[4];
extern "C" extern u8 JPTracePCB4[4];
extern "C" f32 mWaterY__11fopAcM_wt_c[1 + 1 /* padding */];
extern "C" extern u8 mStayNo__20dStage_roomControl_c[4];
extern "C" u8 sOldVcdVatCmd__8J3DShape[4];
//
@@ -477,14 +312,28 @@ extern "C" u8 sOldVcdVatCmd__8J3DShape[4];
//
/* 80049420-80049580 043D60 0160+00 4/4 0/0 0/0 .text dPa_cleanupGX__Fv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
static asm void dPa_cleanupGX() {
nofralloc
#include "asm/d/particle/d_particle/dPa_cleanupGX__Fv.s"
static void dPa_cleanupGX() {
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GXEnableTexOffsets(GX_TEXCOORD0, GX_ENABLE, GX_ENABLE);
GXEnableTexOffsets(GX_TEXCOORD1, GX_ENABLE, GX_ENABLE);
GXEnableTexOffsets(GX_TEXCOORD2, GX_ENABLE, GX_ENABLE);
GXSetCullMode(GX_CULL_NONE);
GXSetCoPlanar(GX_FALSE);
GXClearVtxDesc();
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_RGB8, 0);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGB8, 0);
GXSetVtxAttrFmt(GX_VTXFMT1, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
GXSetVtxAttrFmt(GX_VTXFMT1, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
GXSetCurrentMtx(0);
GXSetChanCtrl(GX_COLOR0A0, GX_FALSE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT_NULL, GX_DF_NONE,
GX_AF_NONE);
GXSetChanCtrl(GX_COLOR1A1, GX_FALSE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT_NULL, GX_DF_NONE,
GX_AF_NONE);
GXSetNumChans(0);
}
#pragma pop
/* ############################################################################################## */
/* 803A8308-803A8314 005428 000C+00 1/1 0/0 0/0 .data l_lifeBallColor */
@@ -720,14 +569,12 @@ SECTION_DATA extern void* __vt__18JPAEmitterCallBack[7] = {
};
/* 80049580-800495BC 043EC0 003C+00 0/0 1/1 8/8 .text __ct__19dPa_followEcallBackFUcUc */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_followEcallBack::dPa_followEcallBack(u8 param_0, u8 param_1) {
nofralloc
#include "asm/d/particle/d_particle/__ct__19dPa_followEcallBackFUcUc.s"
dPa_followEcallBack::dPa_followEcallBack(u8 param_0, u8 param_1) {
field_0x11 = param_0;
field_0x12 = param_1;
field_0x13 = 0;
mpEmitter = NULL;
}
#pragma pop
/* 800495BC-800496B0 043EFC 00F4+00 1/0 0/0 0/0 .text
* execute__19dPa_followEcallBackFP14JPABaseEmitter */
@@ -742,31 +589,39 @@ asm void dPa_followEcallBack::execute(JPABaseEmitter* param_0) {
/* 800496B0-800496B4 043FF0 0004+00 1/0 0/0 0/0 .text
* draw__19dPa_followEcallBackFP14JPABaseEmitter */
void dPa_followEcallBack::draw(JPABaseEmitter* param_0) {
/* empty function */
}
void dPa_followEcallBack::draw(JPABaseEmitter*) {}
/* 800496B4-8004974C 043FF4 0098+00 1/0 0/0 0/0 .text
* setup__19dPa_followEcallBackFP14JPABaseEmitterPC4cXyzPC5csXyzSc */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_followEcallBack::setup(JPABaseEmitter* param_0, cXyz const* param_1,
csXyz const* param_2, s8 param_3) {
nofralloc
#include "asm/d/particle/d_particle/setup__19dPa_followEcallBackFP14JPABaseEmitterPC4cXyzPC5csXyzSc.s"
void dPa_followEcallBack::setup(JPABaseEmitter* i_emitter, cXyz const* param_1,
csXyz const* param_2, s8) {
remove();
if (field_0x13 == 0) {
mpEmitter = i_emitter;
i_emitter->becomeImmortalEmitter();
}
if (field_0x12 == 0) {
if (field_0x11 != 0) {
i_emitter->becomeContinuousParticle();
}
field_0x8 = param_1;
field_0xc = param_2;
field_0x10 = 0;
}
}
#pragma pop
/* 8004974C-8004979C 04408C 0050+00 1/0 0/0 0/0 .text end__19dPa_followEcallBackFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_followEcallBack::end() {
nofralloc
#include "asm/d/particle/d_particle/end__19dPa_followEcallBackFv.s"
void dPa_followEcallBack::end() {
if (mpEmitter != NULL) {
mpEmitter->becomeInvalidEmitter();
mpEmitter->quitImmortalEmitter();
mpEmitter->setEmitterCallBackPtr(NULL);
field_0x10 |= 1;
mpEmitter = NULL;
}
}
#pragma pop
/* ############################################################################################## */
/* 80450E90-80450E94 000390 0004+00 2/2 1/1 11/11 .sbss mEcallback__18dPa_modelEcallBack
@@ -777,7 +632,7 @@ u8 dPa_modelEcallBack::mEcallback[4];
u8 dPa_modelEcallBack::mPcallback[4];
/* 80450E98-80450E9C 000398 0004+00 5/5 0/0 0/0 .sbss mModel__18dPa_modelEcallBack */
u8 dPa_modelEcallBack::mModel[4];
J3DModel* dPa_modelEcallBack::mModel;
/* 80450E9C-80450EA0 -00001 0004+00 3/3 0/0 0/0 .sbss None */
/* 80450E9C 0001+00 data_80450E9C None */
@@ -786,7 +641,7 @@ u8 dPa_modelEcallBack::mModel[4];
static u8 struct_80450E9C[4];
/* 80450EA0-80450EA4 0003A0 0004+00 14/14 1/1 0/0 .sbss mEmitterMng__13dPa_control_c */
u8 dPa_control_c::mEmitterMng[4];
JPAEmitterManager* dPa_control_c::mEmitterMng;
/* 80450EA4-80450EA8 0003A4 0004+00 1/1 1/1 0/0 .sbss mWaterBubblePcallBack__13dPa_control_c */
u8 dPa_control_c::mWaterBubblePcallBack[4];
@@ -1369,30 +1224,33 @@ asm void dPa_windPcallBack::execute(JPABaseEmitter* param_0, JPABaseParticle* pa
/* 8004B504-8004B544 045E44 0040+00 3/3 0/0 0/0 .text
* onActive__Q313dPa_control_c7level_c9emitter_cFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::level_c::emitter_c::onActive() {
nofralloc
#include "asm/d/particle/d_particle/onActive__Q313dPa_control_c7level_c9emitter_cFv.s"
void dPa_control_c::level_c::emitter_c::onActive() {
mStatus |= 1;
if (i_dComIfGp_event_runCheck()) {
onEventMove();
} else {
offEventMove();
}
}
#pragma pop
/* 8004B544-8004B5AC 045E84 0068+00 1/1 0/0 0/0 .text
* entry__Q313dPa_control_c7level_c9emitter_cFUlUsP14JPABaseEmitterP18dPa_levelEcallBack */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::level_c::emitter_c::entry(u32 param_0, u16 param_1, JPABaseEmitter* param_2,
dPa_levelEcallBack* param_3) {
nofralloc
#include "asm/d/particle/d_particle/entry__Q313dPa_control_c7level_c9emitter_cFUlUsP14JPABaseEmitterP18dPa_levelEcallBack.s"
void dPa_control_c::level_c::emitter_c::entry(u32 id, u16 name, JPABaseEmitter* i_emitter,
dPa_levelEcallBack* p_callback) {
mId = id;
mNameId = name;
onActive();
mEmitter = i_emitter;
mCallback = p_callback;
mPre = NULL;
mNext = NULL;
mEmitter->becomeImmortalEmitter();
}
#pragma pop
/* ############################################################################################## */
/* 80450EC4-80450EC8 0003C4 0004+00 1/1 2/2 0/0 .sbss None */
u8 data_80450EC4;
u8 dPa_control_c::mStatus;
/* 80450EC8-80450ED0 0003C8 0004+04 2/2 1/1 17/17 .sbss mParticleTracePCB__13dPa_control_c */
u8 dPa_control_c::mParticleTracePCB[4 + 4 /* padding */];
@@ -1407,126 +1265,180 @@ asm void dPa_control_c::level_c::emitter_c::cleanup() {
#include "asm/d/particle/d_particle/cleanup__Q313dPa_control_c7level_c9emitter_cFv.s"
}
#pragma pop
/*
void dPa_control_c::level_c::emitter_c::cleanup() {
JPAEmitterCallBack* callback = mEmitter->getEmitterCallBackPtr();
if (mCallback != NULL) {
mCallback->cleanup();
}
} */
/* 8004B688-8004B6F8 045FC8 0070+00 1/1 0/0 0/0 .text __ct__Q213dPa_control_c7level_cFv
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_control_c::level_c::level_c() {
nofralloc
#include "asm/d/particle/d_particle/__ct__Q213dPa_control_c7level_cFv.s"
dPa_control_c::level_c::level_c() {
field_0x0 = 0;
mFreeNo = 0;
for (int i = 0; i < 0x100; i++) {
mTable[i] = NULL;
}
}
#pragma pop
/* 8004B6F8-8004B7A8 046038 00B0+00 1/1 0/0 0/0 .text
* execute__Q213dPa_control_c7level_cFPQ313dPa_control_c7level_c9emitter_c */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::level_c::execute(dPa_control_c::level_c::emitter_c* param_0) {
nofralloc
#include "asm/d/particle/d_particle/execute__Q213dPa_control_c7level_cFPQ313dPa_control_c7level_c9emitter_c.s"
void dPa_control_c::level_c::execute(dPa_control_c::level_c::emitter_c* i_emitter) {
if (!i_emitter->isActive()) {
if (i_emitter->isEventMove() || !i_dComIfGp_event_runCheck()) {
i_emitter->getEmitter()->playCalcEmitter();
cutTable(i_emitter);
mFreeNo = ((i_emitter - mEmitter) / sizeof(emitter_c));
} else {
i_emitter->getEmitter()->stopCalcEmitter();
}
} else {
i_emitter->offActive();
}
}
#pragma pop
/* 8004B7A8-8004B808 0460E8 0060+00 1/1 0/0 0/0 .text execute__Q213dPa_control_c7level_cFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::level_c::execute() {
nofralloc
#include "asm/d/particle/d_particle/execute__Q213dPa_control_c7level_cFv.s"
void dPa_control_c::level_c::execute() {
emitter_c* emitter = mEmitter;
for (int i = 0; i < EMITTER_MAX; i++) {
if (emitter->getId() != 0) {
execute(emitter);
}
emitter++;
}
}
#pragma pop
/* 8004B808-8004B874 046148 006C+00 2/2 0/0 0/0 .text cleanup__Q213dPa_control_c7level_cFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::level_c::cleanup() {
nofralloc
#include "asm/d/particle/d_particle/cleanup__Q213dPa_control_c7level_cFv.s"
void dPa_control_c::level_c::cleanup() {
emitter_c* emitter = mEmitter;
for (int i = 0; i < EMITTER_MAX; i++) {
if (emitter->getId() != 0) {
emitter->clearStatus();
cutTable(emitter);
mFreeNo = i;
}
emitter++;
}
}
#pragma pop
/* 8004B874-8004B8B4 0461B4 0040+00 4/4 0/0 0/0 .text get__Q213dPa_control_c7level_cFUl
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::level_c::get(u32 param_0) {
nofralloc
#include "asm/d/particle/d_particle/get__Q213dPa_control_c7level_cFUl.s"
dPa_control_c::level_c::emitter_c* dPa_control_c::level_c::get(u32 id) {
if (id == 0) {
return NULL;
}
for (emitter_c* emitter = mTable[id & 0xFF]; emitter != NULL; emitter = emitter->getNext()) {
if (id == emitter->getId()) {
return emitter;
}
}
return NULL;
}
#pragma pop
/* 8004B8B4-8004B8E8 0461F4 0034+00 1/1 5/5 40/40 .text
* forceOnEventMove__Q213dPa_control_c7level_cFUl */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::level_c::forceOnEventMove(u32 param_0) {
nofralloc
#include "asm/d/particle/d_particle/forceOnEventMove__Q213dPa_control_c7level_cFUl.s"
void dPa_control_c::level_c::forceOnEventMove(u32 id) {
emitter_c* emitter = get(id);
if (emitter != NULL) {
emitter->onEventMove();
}
}
#pragma pop
/* 8004B8E8-8004B918 046228 0030+00 0/0 1/1 0/0 .text
* allForceOnEventMove__Q213dPa_control_c7level_cFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::level_c::allForceOnEventMove() {
nofralloc
#include "asm/d/particle/d_particle/allForceOnEventMove__Q213dPa_control_c7level_cFv.s"
void dPa_control_c::level_c::allForceOnEventMove() {
emitter_c* emitter = mEmitter;
for (int i = 0; i < EMITTER_MAX; i++) {
if (emitter->getId() != 0) {
emitter->onEventMove();
}
emitter++;
}
}
#pragma pop
/* 8004B918-8004B94C 046258 0034+00 1/1 22/22 181/181 .text
* getEmitter__Q213dPa_control_c7level_cFUl */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm JPABaseEmitter* dPa_control_c::level_c::getEmitter(u32 param_0) {
nofralloc
#include "asm/d/particle/d_particle/getEmitter__Q213dPa_control_c7level_cFUl.s"
JPABaseEmitter* dPa_control_c::level_c::getEmitter(u32 id) {
emitter_c* emitter = get(id);
if (emitter == NULL) {
return NULL;
}
return emitter->getEmitter();
}
#pragma pop
/* 8004B94C-8004BA40 04628C 00F4+00 1/1 0/0 0/0 .text
* entry__Q213dPa_control_c7level_cFUsP14JPABaseEmitterP18dPa_levelEcallBack */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::level_c::entry(u16 param_0, JPABaseEmitter* param_1,
dPa_levelEcallBack* param_2) {
nofralloc
#include "asm/d/particle/d_particle/entry__Q213dPa_control_c7level_cFUsP14JPABaseEmitterP18dPa_levelEcallBack.s"
u32 dPa_control_c::level_c::entry(u16 i_name, JPABaseEmitter* i_emitter,
dPa_levelEcallBack* i_callback) {
for (int i = 0; i < EMITTER_MAX; i++) {
if (mEmitter[mFreeNo].getId() == 0) {
u32 uvar1 = field_0x0 + 1;
field_0x0 = uvar1;
if (uvar1 == 0) {
field_0x0++;
}
mEmitter[mFreeNo].entry(field_0x0, i_name, i_emitter, i_callback);
addTable(&mEmitter[mFreeNo]);
return field_0x0;
}
mFreeNo = (mFreeNo + 1) % EMITTER_MAX;
}
i_emitter->becomeInvalidEmitter();
i_emitter->quitImmortalEmitter();
return 0;
}
#pragma pop
/* 8004BA40-8004BA74 046380 0034+00 1/1 0/0 0/0 .text
* addTable__Q213dPa_control_c7level_cFPQ313dPa_control_c7level_c9emitter_c */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::level_c::addTable(dPa_control_c::level_c::emitter_c* param_0) {
nofralloc
#include "asm/d/particle/d_particle/addTable__Q213dPa_control_c7level_cFPQ313dPa_control_c7level_c9emitter_c.s"
void dPa_control_c::level_c::addTable(dPa_control_c::level_c::emitter_c* i_emitter) {
u32 id = i_emitter->getId() & 0xFF;
if (mTable[id] == NULL) {
mTable[id] = i_emitter;
return;
}
mTable[id]->setPre(i_emitter);
i_emitter->setNext(mTable[id]);
mTable[id] = i_emitter;
}
#pragma pop
/* 8004BA74-8004BACC 0463B4 0058+00 3/3 0/0 0/0 .text
* cutTable__Q213dPa_control_c7level_cFPQ313dPa_control_c7level_c9emitter_c */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::level_c::cutTable(dPa_control_c::level_c::emitter_c* param_0) {
nofralloc
#include "asm/d/particle/d_particle/cutTable__Q213dPa_control_c7level_cFPQ313dPa_control_c7level_c9emitter_c.s"
void dPa_control_c::level_c::cutTable(dPa_control_c::level_c::emitter_c* i_emitter) {
emitter_c* pre = i_emitter->getPre();
emitter_c* next = i_emitter->getNext();
if (pre == NULL) {
mTable[i_emitter->getId() & 0xFF] = next;
} else {
pre->setNext(next);
}
if (next != NULL) {
next->setPre(pre);
}
i_emitter->cleanup();
}
#pragma pop
/* ############################################################################################## */
/* 80424734-80424740 051454 000C+00 0/1 0/0 0/0 .bss @4723 */
@@ -1580,6 +1492,17 @@ static u8 lit_4730[12];
/* 80424794-804247D4 0514B4 0040+00 0/1 1/1 1/1 .bss mTsubo__13dPa_control_c */
u8 dPa_control_c::mTsubo[64];
/* dPa_selectTexEcallBack dPa_control_c::mTsubo[] = {
dPa_selectTexEcallBack(0),
dPa_selectTexEcallBack(1),
dPa_selectTexEcallBack(2),
dPa_selectTexEcallBack(3),
dPa_selectTexEcallBack(4),
dPa_selectTexEcallBack(5),
dPa_selectTexEcallBack(6),
dPa_selectTexEcallBack(7),
}; */
/* 804247D4-804247E0 0514F4 000C+00 0/1 0/0 0/0 .bss @4731 */
#pragma push
#pragma force_active on
@@ -1653,27 +1576,27 @@ static u8 lit_4741[12];
#pragma pop
/* 80424870-804248A0 051590 0030+00 1/1 0/0 0/0 .bss mWindViewMatrix__13dPa_control_c */
u8 dPa_control_c::mWindViewMatrix[48];
Mtx dPa_control_c::mWindViewMatrix;
/* 8004BACC-8004BB70 04640C 00A4+00 0/0 1/1 0/0 .text __ct__13dPa_control_cFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_control_c::dPa_control_c() {
nofralloc
#include "asm/d/particle/d_particle/__ct__13dPa_control_cFv.s"
dPa_control_c::dPa_control_c() {
m_resHeap = JKRCreateExpHeap(0x96000, mDoExt_getArchiveHeap(), false);
mHeap = NULL;
m_sceneHeap = NULL;
field_0x18 = 0xFF;
mEmitterMng = NULL;
field_0x19 = 0;
mCommonResMng = NULL;
mSceneResMng = NULL;
m_sceneRes = NULL;
PSMTXIdentity(mWindViewMatrix);
}
#pragma pop
/* 8004BB70-8004BB78 0464B0 0008+00 4/4 0/0 0/0 .text getRM_ID__13dPa_control_cFUs */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::getRM_ID(u16 param_0) {
nofralloc
#include "asm/d/particle/d_particle/getRM_ID__13dPa_control_cFUs.s"
bool dPa_control_c::getRM_ID(u16 param_0) {
return param_0 & 0x8000;
}
#pragma pop
/* ############################################################################################## */
/* 8037A12C-8037A12C 00678C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
@@ -1763,54 +1686,54 @@ asm void dPa_control_c::removeScene(bool param_0) {
#pragma pop
/* 8004C054-8004C078 046994 0024+00 0/0 2/2 0/0 .text cleanup__13dPa_control_cFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::cleanup() {
nofralloc
#include "asm/d/particle/d_particle/cleanup__13dPa_control_cFv.s"
void dPa_control_c::cleanup() {
field_0x210.cleanup();
}
#pragma pop
/* 8004C078-8004C0EC 0469B8 0074+00 0/0 1/1 0/0 .text calc3D__13dPa_control_cFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::calc3D() {
nofralloc
#include "asm/d/particle/d_particle/calc3D__13dPa_control_cFv.s"
void dPa_control_c::calc3D() {
if (isStatus(2)) {
offStatus(2);
} else {
for (u8 i = 0; i <= 13; i++) {
mEmitterMng->calc(i);
}
field_0x210.execute();
}
}
#pragma pop
/* 8004C0EC-8004C134 046A2C 0048+00 0/0 1/1 0/0 .text calc2D__13dPa_control_cFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::calc2D() {
nofralloc
#include "asm/d/particle/d_particle/calc2D__13dPa_control_cFv.s"
void dPa_control_c::calc2D() {
for (u8 i = 14; i <= 16; i++) {
mEmitterMng->calc(i);
}
}
#pragma pop
/* 8004C134-8004C188 046A74 0054+00 0/0 1/1 0/0 .text calcMenu__13dPa_control_cFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::calcMenu() {
nofralloc
#include "asm/d/particle/d_particle/calcMenu__13dPa_control_cFv.s"
void dPa_control_c::calcMenu() {
if (mEmitterMng != NULL) {
for (u8 i = 17; i <= 18; i++) {
mEmitterMng->calc(i);
}
}
}
#pragma pop
/* 8004C188-8004C218 046AC8 0090+00 0/0 1/1 0/0 .text draw__13dPa_control_cFP11JPADrawInfoUc */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dPa_control_c::draw(JPADrawInfo* param_0, u8 param_1) {
nofralloc
#include "asm/d/particle/d_particle/draw__13dPa_control_cFP11JPADrawInfoUc.s"
void dPa_control_c::draw(JPADrawInfo* param_0, u8 param_1) {
if (mEmitterMng != NULL) {
j3dSys.reinitGX();
dKy_setLight_again();
if (param_1 >= 6 && param_1 <= 11) {
dKy_GxFog_set();
}
mEmitterMng->draw(param_0, param_1);
GXSetAlphaUpdate(GX_FALSE);
GXSetNumIndStages(0);
GXSetClipMode(GX_CLIP_ENABLE);
}
}
#pragma pop
/* ############################################################################################## */
/* 80451F8C-80451F90 00058C 0004+00 5/5 0/0 0/0 .sdata2 @5066 */
@@ -2287,7 +2210,8 @@ extern "C" asm void __dt__19dPa_simpleEcallBackFv() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_particleTracePcallBack_c::~dPa_particleTracePcallBack_c() {
// asm dPa_particleTracePcallBack_c::~dPa_particleTracePcallBack_c() {
extern "C" asm void __dt__28dPa_particleTracePcallBack_cFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__28dPa_particleTracePcallBack_cFv.s"
}
@@ -2309,7 +2233,8 @@ extern "C" asm void __dt__22dPa_hermiteEcallBack_cFv() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_gen_d_light8PcallBack::~dPa_gen_d_light8PcallBack() {
// asm dPa_gen_d_light8PcallBack::~dPa_gen_d_light8PcallBack() {
extern "C" asm void __dt__25dPa_gen_d_light8PcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__25dPa_gen_d_light8PcallBackFv.s"
}
@@ -2320,7 +2245,8 @@ asm dPa_gen_d_light8PcallBack::~dPa_gen_d_light8PcallBack() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_gen_b_light8PcallBack::~dPa_gen_b_light8PcallBack() {
// asm dPa_gen_b_light8PcallBack::~dPa_gen_b_light8PcallBack() {
extern "C" asm void __dt__25dPa_gen_b_light8PcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__25dPa_gen_b_light8PcallBackFv.s"
}
@@ -2330,7 +2256,8 @@ asm dPa_gen_b_light8PcallBack::~dPa_gen_b_light8PcallBack() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_light8PcallBack::~dPa_light8PcallBack() {
// asm dPa_light8PcallBack::~dPa_light8PcallBack() {
extern "C" asm void __dt__19dPa_light8PcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__19dPa_light8PcallBackFv.s"
}
@@ -2340,7 +2267,8 @@ asm dPa_light8PcallBack::~dPa_light8PcallBack() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_fsenthPcallBack::~dPa_fsenthPcallBack() {
// asm dPa_fsenthPcallBack::~dPa_fsenthPcallBack() {
extern "C" asm void __dt__19dPa_fsenthPcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__19dPa_fsenthPcallBackFv.s"
}
@@ -2350,7 +2278,8 @@ asm dPa_fsenthPcallBack::~dPa_fsenthPcallBack() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_wbPcallBack_c::~dPa_wbPcallBack_c() {
// asm dPa_wbPcallBack_c::~dPa_wbPcallBack_c() {
extern "C" asm void __dt__17dPa_wbPcallBack_cFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__17dPa_wbPcallBack_cFv.s"
}
@@ -2360,7 +2289,8 @@ asm dPa_wbPcallBack_c::~dPa_wbPcallBack_c() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_windPcallBack::~dPa_windPcallBack() {
// asm dPa_windPcallBack::~dPa_windPcallBack() {
extern "C" asm void __dt__17dPa_windPcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__17dPa_windPcallBackFv.s"
}
@@ -2370,7 +2300,8 @@ asm dPa_windPcallBack::~dPa_windPcallBack() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_selectTexEcallBack::~dPa_selectTexEcallBack() {
// asm dPa_selectTexEcallBack::~dPa_selectTexEcallBack() {
extern "C" asm void __dt__22dPa_selectTexEcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__22dPa_selectTexEcallBackFv.s"
}
@@ -2398,7 +2329,8 @@ asm void dPa_modelEcallBack::drawAfter(JPABaseEmitter* param_0) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_modelPcallBack::~dPa_modelPcallBack() {
// asm dPa_modelPcallBack::~dPa_modelPcallBack() {
extern "C" asm void __dt__18dPa_modelPcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__18dPa_modelPcallBackFv.s"
}
@@ -2420,7 +2352,8 @@ asm void dPa_gen_d_light8EcallBack::drawAfter(JPABaseEmitter* param_0) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_gen_b_light8EcallBack::~dPa_gen_b_light8EcallBack() {
// asm dPa_gen_b_light8EcallBack::~dPa_gen_b_light8EcallBack() {
extern "C" asm void __dt__25dPa_gen_b_light8EcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__25dPa_gen_b_light8EcallBackFv.s"
}
@@ -2441,7 +2374,8 @@ asm void dPa_gen_b_light8EcallBack::drawAfter(JPABaseEmitter* param_0) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_light8EcallBack::~dPa_light8EcallBack() {
// asm dPa_light8EcallBack::~dPa_light8EcallBack() {
extern "C" asm void __dt__19dPa_light8EcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__19dPa_light8EcallBackFv.s"
}
@@ -2522,7 +2456,8 @@ SECTION_DATA extern void* __vt__21dPa_setColorEcallBack[9 + 6 /* padding */] = {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_setColorEcallBack::~dPa_setColorEcallBack() {
// asm dPa_setColorEcallBack::~dPa_setColorEcallBack() {
extern "C" asm void __dt__21dPa_setColorEcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__21dPa_setColorEcallBackFv.s"
}
@@ -2556,7 +2491,8 @@ void JPAEmitterCallBack::executeAfter(JPABaseEmitter* param_0) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_modelEcallBack::~dPa_modelEcallBack() {
// asm dPa_modelEcallBack::~dPa_modelEcallBack() {
extern "C" asm void __dt__18dPa_modelEcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__18dPa_modelEcallBackFv.s"
}
@@ -2567,7 +2503,8 @@ asm dPa_modelEcallBack::~dPa_modelEcallBack() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm dPa_gen_d_light8EcallBack::~dPa_gen_d_light8EcallBack() {
// asm dPa_gen_d_light8EcallBack::~dPa_gen_d_light8EcallBack() {
extern "C" asm void __dt__25dPa_gen_d_light8EcallBackFv() {
nofralloc
#include "asm/d/particle/d_particle/__dt__25dPa_gen_d_light8EcallBackFv.s"
}
@@ -2577,8 +2514,7 @@ asm dPa_gen_d_light8EcallBack::~dPa_gen_d_light8EcallBack() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void __sinit_d_particle_cpp() {
nofralloc
asm void __sinit_d_particle_cpp(){nofralloc
#include "asm/d/particle/d_particle/__sinit_d_particle_cpp.s"
}
#pragma pop
+5 -41
View File
@@ -7,50 +7,14 @@
#include "dol2asm.h"
#include "dolphin/types.h"
//
// Types:
//
struct dPa_name {
static u8 j_o_id[10 + 2 /* padding */];
static u8 s_o_id[28];
};
//
// Forward References:
//
extern "C" u8 j_o_id__8dPa_name[10 + 2 /* padding */];
extern "C" u8 s_o_id__8dPa_name[28];
//
// External References:
//
//
// Declarations:
//
/* ############################################################################################## */
/* 803A85D0-803A85DC 0056F0 000A+02 0/0 1/1 0/0 .data j_o_id__8dPa_name */
SECTION_DATA u8 dPa_name::j_o_id[10 + 2 /* padding */] = {
0x07,
0x0F,
0x07,
0x3D,
0x01,
0x00,
0x01,
0x01,
0x01,
0x03,
/* padding */
0x00,
0x00,
SECTION_DATA u16 dPa_name::j_o_id[5] = {
0x070F, 0x073D, 0x0100, 0x0101, 0x0103,
};
/* 803A85DC-803A85F8 0056FC 001C+00 0/0 1/1 0/0 .data s_o_id__8dPa_name */
SECTION_DATA u8 dPa_name::s_o_id[28] = {
0x81, 0x10, 0x81, 0x11, 0x81, 0x12, 0x89, 0xD6, 0x89, 0xD7, 0x89, 0xD8, 0x83, 0xA6,
0x83, 0xA7, 0x81, 0x04, 0x81, 0x05, 0x81, 0x06, 0x81, 0x74, 0x81, 0x75, 0x81, 0x76,
SECTION_DATA u16 dPa_name::s_o_id[14] = {
0x8110, 0x8111, 0x8112, 0x89D6, 0x89D7, 0x89D8, 0x83A6,
0x83A7, 0x8104, 0x8105, 0x8106, 0x8174, 0x8175, 0x8176,
};
+13 -13
View File
@@ -26,7 +26,7 @@ public:
/* 0x5 */ u8 mFileSelWaitTime;
};
class dScnName_camera_c : public camera_class {
class dScnName_camera_c : public camera_process_class {
public:
dScnName_camera_c() { field_0x22f = 84; }
/* 80259294 */ virtual ~dScnName_camera_c() {}
@@ -313,8 +313,8 @@ SECTION_SDATA2 static f64 lit_3930 = 4503599627370496.0 /* cast u32 to float */;
/* 802588A0-80258B2C 2531E0 028C+00 1/1 0/0 0/0 .text create__10dScnName_cFv */
#ifdef NONMATCHING
s32 dScnName_c::create() {
int loadStat = resLoad(&field_0x1c4, "fileSel");
if (loadStat == 4) {
int phase_state = resLoad(&field_0x1c4, "fileSel");
if (phase_state == cPhs_COMPLEATE_e) {
mHeap = JKRExpHeap::create(0x180000, mDoExt_getGameHeap(), false);
JKRExpHeap* heap = mHeap;
mDoExt_setCurrentHeap(heap);
@@ -371,7 +371,7 @@ s32 dScnName_c::create() {
mDoGph_gInf_c::setTickRate((OS_BUS_CLOCK / 4) / 30);
dComIfGp_getVibration().Init();
}
return loadStat;
return phase_state;
}
#else
#pragma push
@@ -386,18 +386,18 @@ asm s32 dScnName_c::create() {
/* 80258B2C-80258BC8 25346C 009C+00 1/1 0/0 0/0 .text setView__10dScnName_cFv */
void dScnName_c::setView() {
C_MTXPerspective(mCamera.field_0x100, mCamera.mFovy, mCamera.mAspect, mCamera.mNear,
C_MTXPerspective(mCamera.mProjMtx, mCamera.mFovy, mCamera.mAspect, mCamera.mNear,
mCamera.mFar);
mDoMtx_lookAt(mCamera.field_0x140, &mCamera.field_0xd8.mEye, &mCamera.field_0xd8.mCenter,
mDoMtx_lookAt(mCamera.mViewMtx, &mCamera.mLookat.mEye, &mCamera.mLookat.mCenter,
mCamera.mBank);
PSMTXInverse(mCamera.field_0x140, mCamera.field_0x170);
PSMTXCopy(mCamera.field_0x140, mCamera.field_0x1e0);
PSMTXInverse(mCamera.mViewMtx, mCamera.mInvViewMtx);
PSMTXCopy(mCamera.mViewMtx, mCamera.mViewMtxNoTrans);
f32 tmp_0 = FLOAT_LABEL(lit_3923);
mCamera.field_0x1e0[0][3] = tmp_0;
mCamera.field_0x1e0[1][3] = tmp_0;
mCamera.field_0x1e0[2][3] = tmp_0;
PSMTXCopy(mCamera.field_0x140, j3dSys.mViewMtx);
mDoMtx_concatProjView(mCamera.field_0x100, mCamera.field_0x140, mCamera.field_0x1a0);
mCamera.mViewMtxNoTrans[0][3] = tmp_0;
mCamera.mViewMtxNoTrans[1][3] = tmp_0;
mCamera.mViewMtxNoTrans[2][3] = tmp_0;
PSMTXCopy(mCamera.mViewMtx, j3dSys.mViewMtx);
mDoMtx_concatProjView(mCamera.mProjMtx, mCamera.mViewMtx, mCamera.field_0x1a0);
}
/* 80258BC8-80258C5C 253508 0094+00 1/1 0/0 0/0 .text execute__10dScnName_cFv */
+24 -20
View File
@@ -203,6 +203,7 @@ extern "C" u8 sManager__10JFWDisplay[4];
extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
extern "C" u8 sCallback__Q210JUTGamePad13C3ButtonReset[4];
extern "C" u8 sCallbackArg__Q210JUTGamePad13C3ButtonReset[4 + 4 /* padding */];
extern "C" u8 mStatus__13dPa_control_c;
//
// Declarations:
@@ -586,10 +587,10 @@ void dScnPly_c::offReset() {
/* 80259C70-80259CAC 2545B0 003C+00 1/0 0/0 0/0 .text phase_00__FP9dScnPly_c */
static int phase_00(dScnPly_c* scn) {
if (!scn->resetGame()) {
return 0;
return cPhs_ZERO_e;
} else {
mDoGph_gInf_c::offBlure();
return 2;
return cPhs_TWO_e;
}
}
@@ -612,15 +613,15 @@ static int phase_01(dScnPly_c* scn) {
mDoAud_setSceneName(dComIfGp_getStartStageName(), start_room, layer);
if (!mDoAud_load1stDynamicWave()) {
return 0;
return cPhs_ZERO_e;
} else {
return 2;
return cPhs_TWO_e;
}
}
/* 80259D7C-80259D84 2546BC 0008+00 1/0 0/0 0/0 .text phase_0__FP9dScnPly_c */
static int phase_0(dScnPly_c* param_0) {
return 2;
return cPhs_TWO_e;
}
/* 80259D84-8025A438 2546C4 06B4+00 1/0 0/0 0/0 .text phase_1__FP9dScnPly_c */
@@ -755,19 +756,19 @@ static int phase_1(dScnPly_c* scn) {
if (dComIfG_syncStageRes("Stg_00") < 0) {
dComIfG_setStageRes("Stg_00", NULL);
}
return 2;
return cPhs_TWO_e;
}
/* 8025A438-8025A4F8 254D78 00C0+00 1/0 0/0 0/0 .text phase_1_0__FP9dScnPly_c */
static int phase_1_0(dScnPly_c* param_0) {
if (dComIfG_syncStageRes("Stg_00")) {
return 0;
return cPhs_ZERO_e;
} else {
dStage_infoCreate();
dComIfG_setObjectRes("Event", 0, NULL);
dComIfGp_setCameraParamFileName(0, camparamarc);
dComIfG_setObjectRes("CamParam", 0, NULL);
return 2;
return cPhs_TWO_e;
}
}
@@ -777,7 +778,7 @@ static int phase_1_0(dScnPly_c* param_0) {
static int phase_2(dScnPly_c* scn) {
int tmp = dComIfG_syncAllObjectRes();
if (tmp >= 0 && tmp != 0) {
return 0;
return cPhs_ZERO_e;
}
int layer = dComIfG_play_c::getLayerNo(0);
stage_stag_info_class* stag_info = i_dComIfGp_getStage()->getStagInfo();
@@ -789,7 +790,7 @@ static int phase_2(dScnPly_c* scn) {
dComIfGp_particle_readScene(particle_no, &scn->sceneCommand);
dMsgObject_readMessageGroup(&scn->field_0x1d0);
return 2;
return cPhs_TWO_e;
}
#else
#pragma push
@@ -805,11 +806,11 @@ static asm int phase_2(dScnPly_c* param_0) {
/* 8025A5D4-8025A654 254F14 0080+00 1/0 0/0 0/0 .text phase_3__FP9dScnPly_c */
static int phase_3(dScnPly_c* scn) {
if ((scn->sceneCommand != NULL && !scn->sceneCommand->sync()) || mDoAud_check1stDynamicWave()) {
return 0;
return cPhs_ZERO_e;
} else if (!scn->field_0x1d0 == NULL && !scn->field_0x1d0->sync()) {
return 0;
return cPhs_ZERO_e;
} else {
return 2;
return cPhs_TWO_e;
}
}
@@ -850,12 +851,15 @@ class daYkgr_c {
public:
static void init() {
m_emitter = 0;
*struct_80450D8C = 0;
*(struct_80450D8C + 1) = 1;
*(struct_80450D8C + 2) = 0xFF;
m_flag = false;
m_alpha_flag = true;
m_alpha = 255;
}
static u32 m_emitter;
static bool m_flag;
static bool m_alpha_flag;
static u8 m_alpha;
};
/* 8025A654-8025A9F4 254F94 03A0+00 1/0 0/0 0/0 .text phase_4__FP9dScnPly_c */
@@ -916,7 +920,7 @@ static int phase_4(dScnPly_c* i_this) {
mDoGph_gInf_c::setTickRate((OS_BUS_CLOCK / 4) / 30);
g_envHIO[4] = -1;
g_save_bit_HIO.field_0x4 = -1;
new (&dComIfGp_getAttention()) dAttention_c((fopAc_ac_c*)dComIfGp_getPlayer(0), 0);
new (&dComIfGp_getAttention()) dAttention_c(dComIfGp_getPlayer(0), 0);
dComIfGp_getVibration().Init();
daYkgr_c::init();
@@ -932,11 +936,11 @@ static int phase_4(dScnPly_c* i_this) {
}
if (preLoadNo < 0) {
return 4;
return cPhs_COMPLEATE_e;
}
resPreLoadTime0 = OSGetTime();
return 2;
return cPhs_TWO_e;
}
#else
#pragma push
@@ -971,7 +975,7 @@ static asm void phase_6(dScnPly_c* param_0) {
/* 8025AB8C-8025AB94 2554CC 0008+00 1/0 0/0 0/0 .text phase_compleate__FPv */
static int phase_compleate(void* param_0) {
return 4;
return cPhs_COMPLEATE_e;
}
/* 8025AB94-8025ABC4 2554D4 0030+00 1/0 0/0 0/0 .text dScnPly_Create__FP11scene_class */
+3 -3
View File
@@ -68,7 +68,7 @@ cXyz dShopItemCtrl_c::getCurrentPos(int item_index) {
if (mItemIndex[item_index] != -1) {
fopAc_ac_c* item = fopAcM_SearchByID(mItemIndex[item_index]);
if (item != NULL) {
item_pos.set(item->mCurrent.mPosition);
item_pos.set(item->current.pos);
}
}
@@ -81,7 +81,7 @@ bool dShopItemCtrl_c::isHomePos(int item_index) {
daShopItem_c* item = (daShopItem_c*)fopAcM_SearchByID(mItemIndex[item_index]);
if (item != NULL) {
cXyz* item_pos = item->getPosP();
cXyz item_home = item->mOrig.mPosition;
cXyz item_home = item->orig.pos;
if (item_pos->x == item_home.x && item_pos->y == item_home.y &&
item_pos->z == item_home.z) {
@@ -105,7 +105,7 @@ void dShopItemCtrl_c::setRotateAnime(int item_index) {
if (i == item_index - 1) {
item_rot->y += 0x200;
} else {
cLib_addCalcAngleS(&item_rot->y, item->mOrig.mAngle.y, 4, 0x800, 0x80);
cLib_addCalcAngleS(&item_rot->y, item->orig.angle.y, 4, 0x800, 0x80);
}
}
}
+24 -24
View File
@@ -234,8 +234,8 @@ static int dShopSystem_searchItemActor(void* param_0, void* param_1) {
dShopSystem_itemActor[2] != param_0 && dShopSystem_itemActor[3] != param_0 &&
dShopSystem_itemActor[4] != param_0 && dShopSystem_itemActor[5] != param_0 &&
dShopSystem_itemActor[6] != param_0) {
u8 sw = static_cast<fopAc_ac_c*>(param_0)->mOrig.mAngle.z;
u8 sw2 = static_cast<fopAc_ac_c*>(param_0)->mOrig.mAngle.z >> 8;
u8 sw = static_cast<fopAc_ac_c*>(param_0)->orig.angle.z;
u8 sw2 = static_cast<fopAc_ac_c*>(param_0)->orig.angle.z >> 8;
u8 item_no = param;
if ((sw == 0xFF || !dComIfGs_isSaveSwitch(sw)) &&
@@ -1443,36 +1443,36 @@ int dShopSystem_c::itemZoom(cXyz* param_0) {
if (dShopSystem_itemActor[1] != NULL && dShopSystem_cameraActor[1] != NULL) {
cXyz local_40;
local_40.set(dShopSystem_itemActor[1]->mOrig.mPosition);
local_40.set(dShopSystem_itemActor[1]->orig.pos);
f32 tmp_05 = 0.5f;
if (data_80451058 == 4) {
if (dShopSystem_itemActor[2] != NULL) {
f32 tmp = (dShopSystem_itemActor[2]->mOrig.mPosition.x +
dShopSystem_itemActor[1]->mOrig.mPosition.x);
f32 tmp = (dShopSystem_itemActor[2]->orig.pos.x +
dShopSystem_itemActor[1]->orig.pos.x);
local_40.x = tmp * tmp_05;
f32 tmp2 = (dShopSystem_itemActor[2]->mOrig.mPosition.y +
dShopSystem_itemActor[1]->mOrig.mPosition.y);
f32 tmp2 = (dShopSystem_itemActor[2]->orig.pos.y +
dShopSystem_itemActor[1]->orig.pos.y);
local_40.y = tmp2 * tmp_05;
f32 tmp3 = (dShopSystem_itemActor[2]->mOrig.mPosition.z +
dShopSystem_itemActor[1]->mOrig.mPosition.z);
f32 tmp3 = (dShopSystem_itemActor[2]->orig.pos.z +
dShopSystem_itemActor[1]->orig.pos.z);
local_40.z = tmp3 * tmp_05;
}
} else if (data_80451058 == 5) {
f32 tmp = (dShopSystem_itemActor[2]->mOrig.mPosition.x +
dShopSystem_itemActor[3]->mOrig.mPosition.x);
f32 tmp = (dShopSystem_itemActor[2]->orig.pos.x +
dShopSystem_itemActor[3]->orig.pos.x);
local_40.x = tmp * tmp_05;
local_40.y = dShopSystem_itemActor[0]->mOrig.mPosition.y;
local_40.y = dShopSystem_itemActor[0]->orig.pos.y;
f32 tmp3 = (dShopSystem_itemActor[2]->mOrig.mPosition.z +
dShopSystem_itemActor[3]->mOrig.mPosition.z);
f32 tmp3 = (dShopSystem_itemActor[2]->orig.pos.z +
dShopSystem_itemActor[3]->orig.pos.z);
local_40.z = tmp3 * tmp_05;
}
cXyz local_4c = local_40 - dShopSystem_cameraActor[1]->mCurrent.mPosition;
cXyz local_4c = local_40 - dShopSystem_cameraActor[1]->current.pos;
s16 atan = cM_atan2s(local_4c.x, local_4c.z);
if (!strcmp("R_SP01", dComIfGp_getStartStageName())) {
@@ -1500,7 +1500,7 @@ int dShopSystem_c::itemZoom(cXyz* param_0) {
}
}
cLib_offsetPos(&local_28, &dShopSystem_cameraActor[1]->mCurrent.mPosition, atan,
cLib_offsetPos(&local_28, &dShopSystem_cameraActor[1]->current.pos, atan,
&local_34);
if (data_80451058 == 6 || data_80451058 == 5) {
param_0->y += 15.0f;
@@ -1634,7 +1634,7 @@ int dShopSystem_c::seq_start(fopAc_ac_c* actor, dMsgFlow_c* p_flow) {
int itemNo;
if (mFlow.getEventId(&itemNo) == 1) {
if (field_0xd90 == -1) {
field_0xd90 = fopAcM_createItemForPresentDemo(&mCurrent.mPosition, itemNo,
field_0xd90 = fopAcM_createItemForPresentDemo(&current.pos, itemNo,
0, -1, -1, NULL, NULL);
}
@@ -1995,7 +1995,7 @@ int dShopSystem_c::seq_decide_yes(fopAc_ac_c* actor, dMsgFlow_c* p_flow) {
if (mFlow.getEventId(&itemNo) == 1) {
if (p_flow->doFlow(actor, NULL, 0)) {
if (field_0xd90 == -1) {
field_0xd90 = fopAcM_createItemForPresentDemo(&mCurrent.mPosition, itemNo, 0, -1,
field_0xd90 = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1,
-1, NULL, NULL);
}
@@ -2113,13 +2113,13 @@ void dShopSystem_c::createShopItem(int itemType) {
for (int i = 0; i < 3; i++) {
u8* itemTbl = item_no + (itemType * 3);
pos.x = shop_item_pos_data_tbl->mItemPos[i].x + mCurrent.mPosition.x;
pos.y = shop_item_pos_data_tbl->mItemPos[i].y + mCurrent.mPosition.y;
pos.z = shop_item_pos_data_tbl->mItemPos[i].z + mCurrent.mPosition.z;
pos.x = shop_item_pos_data_tbl->mItemPos[i].x + current.pos.x;
pos.y = shop_item_pos_data_tbl->mItemPos[i].y + current.pos.y;
pos.z = shop_item_pos_data_tbl->mItemPos[i].z + current.pos.z;
if (itemTbl[i] != NO_ITEM) {
u32 index = fopAcM_create(PROC_ShopItem, itemTbl[i], &pos, fopAcM_GetRoomNo(this),
&mCurrent.mAngle, NULL, -1);
&current.angle, NULL, -1);
mItemCtrl.setItemIndex(i, index);
offFlag(i);
} else {
@@ -2146,7 +2146,7 @@ void dShopSystem_c::setSoldOutFlag() {
void dShopSystem_c::setSoldOut() {
if (mSoldOutFlag != 0xFF) {
if (field_0xf60 < 0) {
u8 sw = (u8)dShopSystem_itemActor[mSoldOutFlag]->mOrig.mAngle.z & 0xFF;
u8 sw = (u8)dShopSystem_itemActor[mSoldOutFlag]->orig.angle.z & 0xFF;
if (sw != 0xFF && !dComIfGs_isSaveSwitch(sw)) {
dComIfGs_onSaveSwitch(sw);
}
@@ -2249,7 +2249,7 @@ asm void dShopSystem_c::searchItemActor() {
/* 8019AB00-8019AB1C 195440 001C+00 1/1 0/0 0/0 .text getFlowNodeNum__13dShopSystem_cFv
*/
int dShopSystem_c::getFlowNodeNum() {
u16 num = mOrig.mAngle.x;
u16 num = orig.angle.x;
if (num == 0xFFFF) {
return -1;
}
+16 -16
View File
@@ -212,19 +212,19 @@ static int fopAc_Execute(void* actor) {
if (!fopAcM_checkStatus(ac, 0x20000000) && (move == 2 || (move != 0 && !fopAcM_checkStatus(ac, fopAc_ac_c::stopStatus) && (!fopAcM_checkStatus(ac, 0x80) || !fopAcM_CheckCondition(ac, 4))))) {
fopAcM_OffCondition(ac, 2);
ac->mNext = ac->mCurrent;
ac->next = ac->current;
ret = fpcMtd_Execute((process_method_class*)ac->mSubMtd, ac);
} else {
ac->mEvtInfo.suspendProc(ac);
fopAcM_OnCondition(ac, 2);
}
if (fopAcM_checkStatus(ac, 0x20) && ac->mOrig.mPosition.y - ac->mCurrent.mPosition.y > 5000.0f) {
if (fopAcM_checkStatus(ac, 0x20) && ac->orig.pos.y - ac->current.pos.y > 5000.0f) {
fopAcM_delete(ac);
}
if (ac->mCurrent.mPosition.y < -9.999999848243207e+30f) {
ac->mCurrent.mPosition.y = -9.999999848243207e+30f;
if (ac->current.pos.y < -9.999999848243207e+30f) {
ac->current.pos.y = -9.999999848243207e+30f;
}
dKy_depth_dist_set(ac);
@@ -308,19 +308,19 @@ static int fopAc_Create(void* actor) {
fopAcM_prm_class* append = fopAcM_GetAppend(ac);
if (append != NULL) {
fopAcM_SetParam(ac, append->mParameter);
ac->mOrig.mPosition = append->mPos;
ac->mOrig.mAngle = append->mAngle;
ac->orig.pos = append->mPos;
ac->orig.angle = append->mAngle;
ac->mCollisionRot = append->mAngle;
ac->mParentPcId = append->mParentPId;
ac->mSubtype = append->mSubtype;
ac->mScale.set(append->mScale[0] * 0.1f, append->mScale[1] * 0.1f, append->mScale[2] * 0.1f);
ac->mSetID = append->mEnemyNo;
ac->mOrig.mRoomNo = append->mRoomNo;
ac->orig.mRoomNo = append->mRoomNo;
}
ac->mNext = ac->mOrig;
ac->mCurrent = ac->mOrig;
ac->mEyePos = ac->mOrig.mPosition;
ac->next = ac->orig;
ac->current = ac->orig;
ac->mEyePos = ac->orig.pos;
ac->mMaxFallSpeed = -100.0f;
ac->mAttentionInfo.field_0x0[0] = 1;
ac->mAttentionInfo.field_0x0[1] = 2;
@@ -331,9 +331,9 @@ static int fopAc_Create(void* actor) {
ac->mAttentionInfo.field_0x4[1] = 15;
ac->mAttentionInfo.field_0x4[2] = 15;
ac->mAttentionInfo.field_0x8[0] = 51;
ac->mAttentionInfo.mPosition = ac->mOrig.mPosition;
ac->mAttentionInfo.mPosition = ac->orig.pos;
ac->mAttentionInfo.field_0xa = 30;
dKy_tevstr_init(&ac->mTevStr, ac->mOrig.mRoomNo, -1);
dKy_tevstr_init(&ac->mTevStr, ac->orig.mRoomNo, -1);
int roomNo = dComIfGp_roomControl_getStayNo();
if (roomNo >= 0) {
@@ -341,19 +341,19 @@ static int fopAc_Create(void* actor) {
}
dStage_FileList_dt_c* filelist = NULL;
if (ac->mOrig.mRoomNo >= 0) {
filelist = dComIfGp_roomControl_getStatusRoomDt(ac->mOrig.mRoomNo)->mRoomDt.getFileListInfo();
if (ac->orig.mRoomNo >= 0) {
filelist = dComIfGp_roomControl_getStatusRoomDt(ac->orig.mRoomNo)->mRoomDt.getFileListInfo();
}
if (filelist != NULL) {
if (!dStage_FileList_dt_GetEnemyAppear1Flag(filelist)) {
u32 sw = dStage_FileList_dt_GetBitSw(filelist);
if (sw != 0xFF && dComIfGs_isSwitch(sw, ac->mOrig.mRoomNo) && profile->field_0x2c == 2) {
if (sw != 0xFF && dComIfGs_isSwitch(sw, ac->orig.mRoomNo) && profile->field_0x2c == 2) {
return 5;
}
} else {
u32 sw = dStage_FileList_dt_GetBitSw(filelist);
if (sw != 0xFF && !dComIfGs_isSwitch(sw, ac->mOrig.mRoomNo) && profile->field_0x2c == 2) {
if (sw != 0xFF && !dComIfGs_isSwitch(sw, ac->orig.mRoomNo) && profile->field_0x2c == 2) {
return 5;
}
}
+30 -30
View File
@@ -494,7 +494,7 @@ s32 fopAcM_createChildFromOffset(s16 procName, unsigned int parentProcID, u32 ac
const cXyz* p_pos, int roomNo, const csXyz* p_angle,
const cXyz* p_scale, s8 subType, createFunc p_createFunc) {
fopAc_ac_c* parentActor = fopAcM_SearchByID(parentProcID);
s16 parent_angleY = parentActor->mCurrent.mAngle.y;
s16 parent_angleY = parentActor->current.angle.y;
cXyz tmpPos;
if (p_pos == NULL) {
@@ -509,7 +509,7 @@ s32 fopAcM_createChildFromOffset(s16 procName, unsigned int parentProcID, u32 ac
} else {
tmpRot = *p_angle;
}
cXyz parentPos = parentActor->mCurrent.mPosition;
cXyz parentPos = parentActor->current.pos;
csXyz newAngle(tmpRot);
newAngle.y += parent_angleY;
@@ -752,9 +752,9 @@ void fopAcM_calcSpeed(fopAc_ac_c* p_actor) {
/* 8001A660-8001A6CC 014FA0 006C+00 1/1 1/1 17/17 .text fopAcM_posMove__FP10fopAc_ac_cPC4cXyz */
void fopAcM_posMove(fopAc_ac_c* p_actor, const cXyz* p_movePos) {
p_actor->mCurrent.mPosition += p_actor->mSpeed;
p_actor->current.pos += p_actor->mSpeed;
if (p_movePos != NULL) {
p_actor->mCurrent.mPosition += *p_movePos;
p_actor->current.pos += *p_movePos;
}
}
@@ -768,7 +768,7 @@ void fopAcM_posMoveF(fopAc_ac_c* p_actor, const cXyz* p_movePos) {
/* 8001A710-8001A738 015050 0028+00 1/1 26/26 596/596 .text
* fopAcM_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c */
s16 fopAcM_searchActorAngleY(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) {
return cLib_targetAngleY(&p_actorA->mCurrent.mPosition, &p_actorB->mCurrent.mPosition);
return cLib_targetAngleY(&p_actorA->current.pos, &p_actorB->current.pos);
}
/* ############################################################################################## */
@@ -793,7 +793,7 @@ inline f32 square(f32 f) {
/* 8001A738-8001A79C 015078 0064+00 0/0 0/0 13/13 .text
* fopAcM_searchActorAngleX__FPC10fopAc_ac_cPC10fopAc_ac_c */
#ifdef NON_MATCHING
#ifdef NONMATCHING
s16 fopAcM_searchActorAngleX(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) {
const cXyz& posA = fopAcM_GetPosition_p(p_actorA);
const cXyz& posB = fopAcM_GetPosition_p(p_actorB);
@@ -815,7 +815,7 @@ asm s16 fopAcM_searchActorAngleX(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p
* fopAcM_seenActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c */
s32 fopAcM_seenActorAngleY(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) {
return abs(static_cast<s16>(
cLib_targetAngleY(&p_actorA->mCurrent.mPosition, &p_actorB->mCurrent.mPosition) -
cLib_targetAngleY(&p_actorA->current.pos, &p_actorB->current.pos) -
p_actorA->mCollisionRot.y));
}
@@ -849,20 +849,20 @@ inline f32 local_sqrtf(f32 mag) {
/* 8001A7E0-8001A914 015120 0134+00 0/0 5/5 188/188 .text
* fopAcM_searchActorDistance__FPC10fopAc_ac_cPC10fopAc_ac_c */
f32 fopAcM_searchActorDistance(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) {
cXyz tmp = (p_actorB->mCurrent.mPosition - p_actorA->mCurrent.mPosition);
cXyz tmp = (p_actorB->current.pos - p_actorA->current.pos);
return local_sqrtf(tmp.abs2());
}
/* 8001A914-8001A964 015254 0050+00 0/0 0/0 2/2 .text
* fopAcM_searchActorDistance2__FPC10fopAc_ac_cPC10fopAc_ac_c */
f32 fopAcM_searchActorDistance2(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) {
cXyz tmp = (p_actorB->mCurrent.mPosition - p_actorA->mCurrent.mPosition);
cXyz tmp = (p_actorB->current.pos - p_actorA->current.pos);
return tmp.abs2();
}
/* 8001A964-8001AA94 0152A4 0130+00 0/0 3/3 125/125 .text
* fopAcM_searchActorDistanceXZ__FPC10fopAc_ac_cPC10fopAc_ac_c */
#ifdef NON_MATCHING
#ifdef NONMATCHING
// matches besides data
f32 fopAcM_searchActorDistanceXZ(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) {
const cXyz& posA = fopAcM_GetPosition_p(p_actorA);
@@ -882,7 +882,7 @@ asm f32 fopAcM_searchActorDistanceXZ(const fopAc_ac_c* p_actorA, const fopAc_ac_
/* 8001AA94-8001AAE0 0153D4 004C+00 1/1 4/4 30/30 .text
* fopAcM_searchActorDistanceXZ2__FPC10fopAc_ac_cPC10fopAc_ac_c */
#ifdef NON_MATCHING
#ifdef NONMATCHING
// matches besides data
f32 fopAcM_searchActorDistanceXZ2(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) {
const cXyz& posA = fopAcM_GetPosition_p(p_actorA);
@@ -925,7 +925,7 @@ s32 fopAcM_rollPlayerCrash(fopAc_ac_c const* actor, f32 param_1, u32 param_2, f3
(player->checkFrontRoll() || player->checkWolfDash()) &&
fopAcM_searchPlayerDistanceXZ2(actor) < (tmp * tmp)) {
if (cM_scos(player->mCurrent.mAngle.y - fopAcM_searchPlayerAngleY(actor)) < param_6) {
if (cM_scos(player->current.angle.y - fopAcM_searchPlayerAngleY(actor)) < param_6) {
player->onFrollCrashFlg(param_2, param_5);
return 1;
}
@@ -1626,7 +1626,7 @@ SECTION_SDATA2 static f32 lit_5812 = 1.0f / 5.0f;
/* 8001C5B0-8001C870 016EF0 02C0+00 3/3 0/0 4/4 .text
* fopAcM_fastCreateItem__FPC4cXyziiPC5csXyzPC4cXyzPfPfiiPFPv_i */
// issue with makeItemParams
#ifdef NON_MATCHING
#ifdef NONMATCHING
void* fopAcM_fastCreateItem(const cXyz* p_pos, int i_itemNo, int i_roomNo, const csXyz* p_angle,
const cXyz* p_scale, f32* p_speedF, f32* p_speedY, int param_8,
int param_9, createFunc p_createFunc) {
@@ -1775,9 +1775,9 @@ asm void fopAcM_myRoomSearchEnemy(s8 param_0) {
* fopAcM_createDisappear__FPC10fopAc_ac_cPC4cXyzUcUcUc */
s32 fopAcM_createDisappear(const fopAc_ac_c* p_actor, const cXyz* p_pos, u8 param_3, u8 param_4,
u8 param_5) {
s8 roomNo = p_actor->mCurrent.mRoomNo;
s8 roomNo = p_actor->current.mRoomNo;
return fopAcM_GetID(fopAcM_fastCreate(PROC_DISAPPEAR, (param_5 << 0x10) | (param_3 << 0x8) | param_4,
p_pos, roomNo, &p_actor->mCurrent.mAngle, NULL, 0xFF, NULL,
p_pos, roomNo, &p_actor->current.angle, NULL, 0xFF, NULL,
NULL));
}
@@ -1824,7 +1824,7 @@ s32 fopAcM_otoCheck(fopAc_ac_c const* p_actor, f32 param_1) {
SND_INFLUENCE* sound = dKy_Sound_get();
if (sound->field_0x14 != -1 && fopAcM_GetID(p_actor) != sound->field_0x14) {
cXyz tmp = sound->field_0x0 - p_actor->mCurrent.mPosition;
cXyz tmp = sound->field_0x0 - p_actor->current.pos;
if (tmp.abs() < param_1) {
return sound->field_0xc;
@@ -1855,10 +1855,10 @@ s32 fopAcM_otherBgCheck(fopAc_ac_c const* param_0, fopAc_ac_c const* param_1) {
cXyz tmp1;
cXyz tmp0;
tmp0 = param_1->mCurrent.mPosition;
tmp0 = param_1->current.pos;
tmp0.y += lit_6035;
tmp1 = param_0->mCurrent.mPosition;
tmp1 = param_0->current.pos;
tmp1.y = param_0->mEyePos.y;
linChk.Set(&tmp1, &tmp0, param_0);
@@ -1877,7 +1877,7 @@ s32 fopAcM_wayBgCheck(fopAc_ac_c const* param_0, f32 param_1, f32 param_2) {
cXyz tmp0;
cXyz tmp2;
tmp0 = param_0->mCurrent.mPosition;
tmp0 = param_0->current.pos;
tmp0.y += param_2;
mDoMtx_YrotS((MtxP)calc_mtx, param_0->mCollisionRot.y);
@@ -1886,7 +1886,7 @@ s32 fopAcM_wayBgCheck(fopAc_ac_c const* param_0, f32 param_1, f32 param_2) {
tmp1.z = param_1;
MtxPosition(&tmp1, &tmp2);
PSVECAdd(&tmp2, &param_0->mCurrent.mPosition, &tmp2);
PSVECAdd(&tmp2, &param_0->current.pos, &tmp2);
linChk.Set(&tmp0, &tmp2, param_0);
@@ -1899,7 +1899,7 @@ s32 fopAcM_wayBgCheck(fopAc_ac_c const* param_0, f32 param_1, f32 param_2) {
/* 8001CFD8-8001D020 017918 0048+00 0/0 0/0 2/2 .text fopAcM_plAngleCheck__FPC10fopAc_ac_cs */
s32 fopAcM_plAngleCheck(fopAc_ac_c const* p_actor, s16 i_angle) {
s16 angle = p_actor->mCollisionRot.y - ((fopAc_ac_c*)dComIfGp_getPlayer(0))->mCollisionRot.y;
s16 angle = p_actor->mCollisionRot.y - dComIfGp_getPlayer(0)->mCollisionRot.y;
if (angle <= i_angle && angle >= (s16)-i_angle) {
return 0;
}
@@ -2013,29 +2013,29 @@ s32 fopAcM_riverStream(cXyz* param_0, s16* param_1, f32* param_2, f32 param_3) {
/* 8001D1FC-8001D32C 017B3C 0130+00 0/0 0/0 12/12 .text fopAcM_carryOffRevise__FP10fopAc_ac_c */
s32 fopAcM_carryOffRevise(fopAc_ac_c* param_0) {
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
fopAc_ac_c* player = dComIfGp_getPlayer(0);
dBgS_LinChk linChk;
cXyz tmp1;
cXyz tmp0;
cXyz tmp2;
tmp0 = player->mCurrent.mPosition;
tmp0.y = param_0->mCurrent.mPosition.y;
tmp0 = player->current.pos;
tmp0.y = param_0->current.pos.y;
mDoMtx_YrotS((MtxP)calc_mtx, player->mCollisionRot.y);
tmp1.x = FLOAT_LABEL(lit_4645);
tmp1.y = param_0->mCurrent.mPosition.y - player->mCurrent.mPosition.y;
tmp1.y = param_0->current.pos.y - player->current.pos.y;
tmp1.z = 150.0f;
MtxPosition(&tmp1, &tmp2);
PSVECAdd(&tmp2, &player->mCurrent.mPosition, &tmp2);
PSVECAdd(&tmp2, &player->current.pos, &tmp2);
linChk.Set(&tmp0, &tmp2, param_0);
if (dComIfG_Bgsp().LineCross(&linChk)) {
param_0->mCurrent.mPosition.x = player->mCurrent.mPosition.x;
param_0->mCurrent.mPosition.z = player->mCurrent.mPosition.z;
param_0->mNext.mPosition = param_0->mCurrent.mPosition;
param_0->current.pos.x = player->current.pos.x;
param_0->current.pos.z = player->current.pos.z;
param_0->next.pos = param_0->current.pos;
param_0->mSpeedF = FLOAT_LABEL(lit_4645);
return 1;
}
@@ -2230,7 +2230,7 @@ asm s32 fopAcM_getWaterY(cXyz const* param_0, f32* param_1) {
* fpoAcM_relativePos__FPC10fopAc_ac_cPC4cXyzP4cXyz */
void fpoAcM_relativePos(fopAc_ac_c const* actor, cXyz const* p_inPos, cXyz* p_outPos) {
s16 angle = -actor->mCollisionRot.y;
cXyz pos = *p_inPos - actor->mCurrent.mPosition;
cXyz pos = *p_inPos - actor->current.pos;
p_outPos->x = (pos.z * cM_ssin(angle)) + (pos.x * cM_scos(angle));
p_outPos->y = pos.y;
+6 -6
View File
@@ -45,7 +45,7 @@ static s32 fopCam_Draw(camera_class* pCamera) {
s32 cam_proc = 1;
if (!dComIfGp_isPauseFlag()) {
cam_proc = fpcLf_DrawMethod(pCamera->pMthd, pCamera);
cam_proc = fpcLf_DrawMethod(pCamera->mpMtd, pCamera);
}
return cam_proc;
}
@@ -55,7 +55,7 @@ static s32 fopCam_Draw(camera_class* pCamera) {
#ifdef NONMATCHING
static void fopCam_Execute(camera_class* pCamera) {
if (!dComIfGp_isPauseFlag() && dScnPly_c::isPause()) {
fpcMtd_Execute((process_method_class*)pCamera->pMthd, pCamera);
fpcMtd_Execute((process_method_class*)pCamera->mpMtd, pCamera);
}
}
#else
@@ -72,9 +72,9 @@ static asm void fopCam_Execute(camera_class* param_0) {
/* 8001E1C8-8001E21C 018B08 0054+00 1/0 0/0 0/0 .text fopCam_IsDelete__FP12camera_class
*/
int fopCam_IsDelete(camera_class* pCamera) {
int delete_stat = fpcMtd_IsDelete((process_method_class*)pCamera->pMthd, pCamera);
int delete_stat = fpcMtd_IsDelete((process_method_class*)pCamera->mpMtd, pCamera);
if (delete_stat == 1) {
fopDwTg_DrawQTo(&pCamera->pCreateTag);
fopDwTg_DrawQTo(&pCamera->mCreateTag);
}
return delete_stat;
@@ -82,9 +82,9 @@ int fopCam_IsDelete(camera_class* pCamera) {
/* 8001E21C-8001E270 018B5C 0054+00 1/0 0/0 0/0 .text fopCam_Delete__FP12camera_class */
int fopCam_Delete(camera_class* pCamera) {
int delete_stat = fpcMtd_Delete((process_method_class*)pCamera->pMthd, pCamera);
int delete_stat = fpcMtd_Delete((process_method_class*)pCamera->mpMtd, pCamera);
if (delete_stat == 1) {
fopDwTg_DrawQTo(&pCamera->pCreateTag);
fopDwTg_DrawQTo(&pCamera->mCreateTag);
}
return delete_stat;
+14 -13
View File
@@ -132,21 +132,22 @@ request_base_class* fopOvlpReq_Request(overlap_request_class* pOvlpReq, s16 para
/* 8001E9F0-8001EA88 019330 0098+00 0/0 1/1 0/0 .text
* fopOvlpReq_Handler__FP21overlap_request_class */
int fopOvlpReq_Handler(overlap_request_class* pOvlpReq) {
int phsDo = cPhs_Do(&pOvlpReq->field_0x18, pOvlpReq);
switch (phsDo) {
case 2:
int phase_state = cPhs_Do(&pOvlpReq->field_0x18, pOvlpReq);
switch (phase_state) {
case cPhs_TWO_e:
return fopOvlpReq_Handler(pOvlpReq);
case 0:
return 0;
case 1:
return 0;
case 4:
return 4;
case 3:
case 5:
return 5;
case cPhs_ZERO_e:
return cPhs_ZERO_e;
case cPhs_ONE_e:
return cPhs_ZERO_e;
case cPhs_COMPLEATE_e:
return cPhs_COMPLEATE_e;
case cPhs_UNK3_e:
case cPhs_ERROR_e:
return cPhs_ERROR_e;
default:
return 5;
return cPhs_ERROR_e;
}
}
+4 -4
View File
@@ -17,7 +17,7 @@
* fopScnRq_phase_ClearOverlap__FP19scene_request_class */
static cPhs__Step fopScnRq_phase_ClearOverlap(scene_request_class* param_0) {
if (fopOvlpM_ClearOfReq() == 1) {
return cPhs_UNK_2;
return cPhs_TWO_e;
} else {
return cPhs_ZERO_e;
}
@@ -33,7 +33,7 @@ static cPhs__Step fopScnRq_phase_Execute(scene_request_class* param_0) {
* fopScnRq_phase_IsDoingOverlap__FP19scene_request_class */
static cPhs__Step fopScnRq_phase_IsDoingOverlap(scene_request_class* param_0) {
if (fopOvlpM_IsDoingReq() == 1) {
return cPhs_UNK_2;
return cPhs_TWO_e;
} else {
return cPhs_ZERO_e;
}
@@ -43,7 +43,7 @@ static cPhs__Step fopScnRq_phase_IsDoingOverlap(scene_request_class* param_0) {
* fopScnRq_phase_IsDoneOverlap__FP19scene_request_class */
static cPhs__Step fopScnRq_phase_IsDoneOverlap(scene_request_class* param_0) {
if (fopOvlpM_IsDone() == 1) {
return cPhs_UNK_2;
return cPhs_TWO_e;
} else {
return cPhs_ZERO_e;
}
@@ -60,7 +60,7 @@ static cPhs__Step fopScnRq_phase_Done(scene_request_class* pScnRq) {
fopScnPause_Disable((scene_class*)fpcEx_SearchByID(pScnRq->mCrtReq.mCreatingID));
}
l_fopScnRq_IsUsingOfOverlap = 0;
return cPhs_UNK_2;
return cPhs_TWO_e;
}
/* 8001EF24-8001EF6C 019864 0048+00 1/0 0/0 0/0 .text fopScnRq_Execute__FP19scene_request_class */
+9 -8
View File
@@ -82,16 +82,17 @@ s32 fpcSCtRq_phase_Done(standard_create_request_class* param_0) {
/* 80023D14-80023D84 0070+00 s=1 e=0 z=2 None .text
* fpcSCtRq_Handler__FP29standard_create_request_class */
s32 fpcSCtRq_Handler(standard_create_request_class* pStdCreateReq) {
s32 result = cPhs_Do(&pStdCreateReq->unk_0x48, pStdCreateReq);
switch (result) {
case 2:
s32 phase_state = cPhs_Do(&pStdCreateReq->unk_0x48, pStdCreateReq);
switch (phase_state) {
case cPhs_TWO_e:
return fpcSCtRq_Handler(pStdCreateReq);
case 4:
return 4;
case 1:
case 5:
case cPhs_COMPLEATE_e:
return cPhs_COMPLEATE_e;
case cPhs_ONE_e:
case cPhs_ERROR_e:
default:
return result;
return phase_state;
}
}
+8 -8
View File
@@ -120,14 +120,14 @@ static void mDoMemCdRWm_BuildHeader(mDoMemCdRWm_HeaderData* header) {
ResTIMG* icon_data =
(ResTIMG*)g_dComIfG_gameInfo.play.mCardIconResArchive->getResource("zelda2_gc_icon.bti");
memcpy(header->mBannerTexData, (u8*)banner_data + banner_data->texDataOffset,
(banner_data->paletteCount * 2) + 0xC00);
memcpy(header->mIconTexData0, (u8*)icon_data + icon_data->texDataOffset, 0x400);
memcpy(header->mIconTexData1, (u8*)icon_data + icon_data->texDataOffset, 0x400);
memcpy(header->mIconTexData2, (u8*)icon_data + icon_data->texDataOffset, 0x400);
memcpy(header->mIconTexData3, (u8*)icon_data + icon_data->texDataOffset, 0x400);
memcpy(header->mIconTexData4, (u8*)icon_data + icon_data->texDataOffset,
(icon_data->paletteCount * 2) + 0x400);
memcpy(header->mBannerTexData, (u8*)banner_data + banner_data->imageOffset,
(banner_data->numColors * 2) + 0xC00);
memcpy(header->mIconTexData0, (u8*)icon_data + icon_data->imageOffset, 0x400);
memcpy(header->mIconTexData1, (u8*)icon_data + icon_data->imageOffset, 0x400);
memcpy(header->mIconTexData2, (u8*)icon_data + icon_data->imageOffset, 0x400);
memcpy(header->mIconTexData3, (u8*)icon_data + icon_data->imageOffset, 0x400);
memcpy(header->mIconTexData4, (u8*)icon_data + icon_data->imageOffset,
(icon_data->numColors * 2) + 0x400);
g_dComIfG_gameInfo.play.mCardIconResArchive->removeResourceAll();
}
+743 -439
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -176,7 +176,7 @@ static ResTIMG* createTimg(u16 width, u16 height, u32 format) {
timg->minFilter = GX_LINEAR;
timg->magFilter = GX_LINEAR;
timg->mipmapCount = 1;
timg->texDataOffset = 0x20;
timg->imageOffset = 0x20;
}
return timg;
}
+6 -6
View File
@@ -56,14 +56,14 @@ SECTION_SDATA2 static f64 lit_3638 = 4503601774854144.0 /* cast s32 to float */;
#ifdef NONMATCHING
bool mDoLib_setResTimgObj(ResTIMG const* res, _GXTexObj* o_texObj, u32 param_2,
_GXTlutObj* o_tlutObj) {
if (res->palettesEnabled) {
GXInitTlutObj(o_tlutObj, (void*)(res + res->paletteOffset), (GXTlutFmt)res->paletteFormat,
res->paletteCount);
GXInitTexObjCI(o_texObj, (void*)(res + res->texDataOffset), res->width, res->height,
if (res->indexTexture) {
GXInitTlutObj(o_tlutObj, (void*)(res + res->paletteOffset), (GXTlutFmt)res->colorFormat,
res->numColors);
GXInitTexObjCI(o_texObj, (void*)(res + res->imageOffset), res->width, res->height,
(GXCITexFmt)res->format, (GXTexWrapMode)res->wrapS,
(GXTexWrapMode)res->wrapT, 1 - res->mipmapCount, param_2);
} else {
GXInitTexObj(o_texObj, (void*)(res + res->texDataOffset), res->width, res->height,
GXInitTexObj(o_texObj, (void*)(res + res->imageOffset), res->width, res->height,
(GXTexFmt)res->format, (GXTexWrapMode)res->wrapS, (GXTexWrapMode)res->wrapT,
(s32)1 - res->mipmapCount);
}
@@ -71,7 +71,7 @@ bool mDoLib_setResTimgObj(ResTIMG const* res, _GXTexObj* o_texObj, u32 param_2,
(f32)res->minLOD * 0.125f, (f32)res->maxLOD * 0.125f, (f32)res->LODBias * 0.01f,
(s32)res->biasClamp, (s32)res->doEdgeLOD, (GXAnisotropy)res->maxAnisotropy);
return res->palettesEnabled;
return res->indexTexture;
}
#else
#pragma push