mirror of
https://github.com/zeldaret/tww.git
synced 2026-05-23 06:54:16 -04:00
Cleanup
This commit is contained in:
@@ -29,7 +29,7 @@ typedef struct create_request {
|
||||
layer_class* mpLayer;
|
||||
} create_request; // Size: 0x48
|
||||
|
||||
bool fpcCtRq_isCreatingByID(create_tag* pTag, fpc_ProcID* pId);
|
||||
BOOL fpcCtRq_isCreatingByID(create_tag* pTag, fpc_ProcID* pId);
|
||||
BOOL fpcCtRq_IsCreatingByID(fpc_ProcID id);
|
||||
void fpcCtRq_CreateQTo(create_request* pReq);
|
||||
void fpcCtRq_ToCreateQ(create_request* pReq);
|
||||
|
||||
@@ -1330,8 +1330,8 @@ int JASystem::TTrack::writePortAppDirect(u32 port, u16 value) {
|
||||
if (port == 0 || port == 1) {
|
||||
TIntrMgr& intrMgr = mIntrMgr;
|
||||
|
||||
u32 mIntrParam = port == 0 ? REQUEST_UNK_3 : REQUEST_UNK_4;
|
||||
intrMgr.request(mIntrParam);
|
||||
u32 intrParam = port == 0 ? REQUEST_UNK_3 : REQUEST_UNK_4;
|
||||
intrMgr.request(intrParam);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
+29
-29
@@ -354,7 +354,7 @@ void spinattack(fganon_class* i_this) {
|
||||
fopAc_ac_c* a_this = &i_this->actor;
|
||||
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
|
||||
dBgS_LinChk linChk;
|
||||
int mFrame = i_this->mpMorf->getFrame();
|
||||
int frame = i_this->mpMorf->getFrame();
|
||||
switch(i_this->mMode) {
|
||||
case 0: {
|
||||
a_this->shape_angle.y = player->shape_angle.y;
|
||||
@@ -394,17 +394,17 @@ void spinattack(fganon_class* i_this) {
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
if (mFrame == 14) {
|
||||
if (frame == 14) {
|
||||
fopAcM_seStart(a_this, JA_SE_CM_PG_SWING_L, 0);
|
||||
}
|
||||
i_this->m685 = 1;
|
||||
i_this->mWeponSph.SetAtAtp(8);
|
||||
if (mFrame == l_HIO.m3E) {
|
||||
if (frame == l_HIO.m3E) {
|
||||
i_this->m6AC = l_HIO.m40 - l_HIO.m3E;
|
||||
}
|
||||
float fVar9;
|
||||
float fVar10;
|
||||
if ((mFrame >= 13) && (mFrame <= 24)) {
|
||||
if ((frame >= 13) && (frame <= 24)) {
|
||||
fVar9 = 20.0f;
|
||||
fVar10 = 4.0f;
|
||||
}
|
||||
@@ -582,7 +582,7 @@ void shot2(fganon_class* i_this) {
|
||||
fopAc_ac_c* a_this = &i_this->actor;
|
||||
|
||||
cLib_addCalcAngleS2(&a_this->shape_angle.y, fopAcM_searchPlayerAngleY(a_this), 10, 0x400);
|
||||
int mFrame = i_this->mpMorf->getFrame();
|
||||
int frame = i_this->mpMorf->getFrame();
|
||||
switch(i_this->mMode) {
|
||||
case 0: {
|
||||
anm_init(i_this, FGANON_BCK_TAME_S1, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
|
||||
@@ -618,7 +618,7 @@ void shot2(fganon_class* i_this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mFrame == 28) {
|
||||
if (frame == 28) {
|
||||
i_this->m671 = 1;
|
||||
i_this->m680 = 0.0f;
|
||||
}
|
||||
@@ -636,17 +636,17 @@ void shot2(fganon_class* i_this) {
|
||||
// Fall-through
|
||||
}
|
||||
case 3: {
|
||||
if (mFrame == REG8_S(5) + 15) {
|
||||
if (frame == REG8_S(5) + 15) {
|
||||
fopAcM_monsSeStart(&i_this->actor, JA_SE_CV_PG_EBALL_FIRE_L, 0);
|
||||
fopAcM_seStart(a_this, JA_SE_CM_PG_EBALL_FIRE_L, 0);
|
||||
}
|
||||
if (mFrame >= REG8_S(5) + 15) {
|
||||
if (frame >= REG8_S(5) + 15) {
|
||||
cLib_addCalc2(&i_this->m680, REG8_F(6) + 250.0f, 1.0f, REG8_F(7) + 50.0f);
|
||||
if (mFrame == REG8_S(6) + 16) {
|
||||
if (frame == REG8_S(6) + 16) {
|
||||
i_this->m671 = 3;
|
||||
}
|
||||
|
||||
if (mFrame == REG8_S(7) + 16) {
|
||||
if (frame == REG8_S(7) + 16) {
|
||||
mahou_set(i_this);
|
||||
}
|
||||
}
|
||||
@@ -692,7 +692,7 @@ void spinattack2(fganon_class* i_this) {
|
||||
fopAc_ac_c* a_this = &i_this->actor;
|
||||
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
|
||||
dBgS_LinChk linChk;
|
||||
int mFrame = i_this->mpMorf->getFrame();
|
||||
int frame = i_this->mpMorf->getFrame();
|
||||
switch(i_this->mMode) {
|
||||
case 0: {
|
||||
a_this->shape_angle.y = player->shape_angle.y + i_this->m68F * 0x3333;
|
||||
@@ -733,12 +733,12 @@ void spinattack2(fganon_class* i_this) {
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
if (mFrame == 14) {
|
||||
if (frame == 14) {
|
||||
fopAcM_seStart(a_this, JA_SE_CM_PG_SWING_L, 0);
|
||||
}
|
||||
i_this->m685 = 1;
|
||||
i_this->mWeponSph.SetAtAtp(8);
|
||||
if (mFrame == l_HIO.m3E) {
|
||||
if (frame == l_HIO.m3E) {
|
||||
i_this->m6AC = l_HIO.m40 - l_HIO.m3E;
|
||||
}
|
||||
if (i_this->mpMorf->isStop()) {
|
||||
@@ -794,8 +794,8 @@ void down(fganon_class* i_this) {
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
int mFrame = i_this->mpMorf->getFrame();
|
||||
if (mFrame == 2) {
|
||||
int frame = i_this->mpMorf->getFrame();
|
||||
if (frame == 2) {
|
||||
fopAcM_monsSeStart(a_this, JA_SE_CV_PG_TIRED, 0);
|
||||
}
|
||||
break;
|
||||
@@ -1176,7 +1176,7 @@ void end(fganon_class* i_this) {
|
||||
i_this->m3AE = 3;
|
||||
fopAcM_OffStatus(a_this, 0);
|
||||
a_this->attention_info.flags = 0;
|
||||
s32 mFrame = i_this->mpMorf->getFrame();
|
||||
int frame = i_this->mpMorf->getFrame();
|
||||
switch(i_this->mMode) {
|
||||
case 0: {
|
||||
i_this->mMode = 1;
|
||||
@@ -1185,7 +1185,7 @@ void end(fganon_class* i_this) {
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::UNK_3F20); // PG_DEFEATED? It appears further down in `energy_ball_move`
|
||||
break;
|
||||
case 1: {
|
||||
if (mFrame == 104) {
|
||||
if (frame == 104) {
|
||||
kieru_brk(i_this, 0);
|
||||
}
|
||||
break;
|
||||
@@ -1210,10 +1210,10 @@ void end(fganon_class* i_this) {
|
||||
if (a_this->speed.y > REG8_F(9) + 20.0f) {
|
||||
a_this->speed.y = REG8_F(9) + 20.0f;
|
||||
}
|
||||
if (mFrame == 28) {
|
||||
if (frame == 28) {
|
||||
kieru_brk2(i_this);
|
||||
}
|
||||
if (mFrame == 48) {
|
||||
if (frame == 48) {
|
||||
i_this->mMode = 6;
|
||||
}
|
||||
}
|
||||
@@ -1322,7 +1322,7 @@ void damage_check(fganon_class* i_this) {
|
||||
cXyz local_44;
|
||||
cXyz local_80;
|
||||
cXyz local_98;
|
||||
JPABaseEmitter* mEmitter;
|
||||
JPABaseEmitter* emitter;
|
||||
float distXZ;
|
||||
|
||||
fopAc_ac_c* a_this = &i_this->actor;
|
||||
@@ -1366,14 +1366,14 @@ void damage_check(fganon_class* i_this) {
|
||||
|
||||
fopAcM_seStart(a_this, JA_SE_CM_L_ARROW_SHRINK, 0);
|
||||
|
||||
mEmitter = dComIfGp_particle_set(dPa_name::ID_AK_SN_BPGLIGHTARROW00, &a_this->current.pos, NULL);
|
||||
if (mEmitter != NULL) {
|
||||
mEmitter->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(10));
|
||||
emitter = dComIfGp_particle_set(dPa_name::ID_AK_SN_BPGLIGHTARROW00, &a_this->current.pos, NULL);
|
||||
if (emitter != NULL) {
|
||||
emitter->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(10));
|
||||
}
|
||||
|
||||
mEmitter = dComIfGp_particle_set(dPa_name::ID_AK_SN_BPGLIGHTARROW01, &a_this->current.pos, NULL);
|
||||
if (mEmitter != NULL) {
|
||||
mEmitter->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(10));
|
||||
emitter = dComIfGp_particle_set(dPa_name::ID_AK_SN_BPGLIGHTARROW01, &a_this->current.pos, NULL);
|
||||
if (emitter != NULL) {
|
||||
emitter->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(10));
|
||||
}
|
||||
|
||||
a_this->speedF = 0.0f;
|
||||
@@ -1442,9 +1442,9 @@ void damage_check(fganon_class* i_this) {
|
||||
}
|
||||
if (i_this->m68F) {
|
||||
if ((i_this->mCyl.ChkTgHit()) || (master->mAction == 8)) {
|
||||
mEmitter = dComIfGp_particle_set(dPa_name::ID_AK_SN_BPGVANISHSMOKE00, &a_this->current.pos, NULL);
|
||||
if (mEmitter != NULL) {
|
||||
mEmitter->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(0));
|
||||
emitter = dComIfGp_particle_set(dPa_name::ID_AK_SN_BPGVANISHSMOKE00, &a_this->current.pos, NULL);
|
||||
if (emitter != NULL) {
|
||||
emitter->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(0));
|
||||
}
|
||||
fopAcM_delete(a_this);
|
||||
}
|
||||
|
||||
@@ -138,12 +138,12 @@ cPhs_State daIkari_c::_create() {
|
||||
} else {
|
||||
setMtx();
|
||||
|
||||
f32 mScaleX = scale.x;
|
||||
f32 scaleX = scale.x;
|
||||
|
||||
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
|
||||
fopAcM_setCullSizeBox(this,
|
||||
-160.0f * mScaleX, -2500.0f * mScaleX, -600.0f * mScaleX,
|
||||
160.0f * mScaleX, 100.0f * mScaleX, 600.0f * mScaleX);
|
||||
-160.0f * scaleX, -2500.0f * scaleX, -600.0f * scaleX,
|
||||
160.0f * scaleX, 100.0f * scaleX, 600.0f * scaleX);
|
||||
fopAcM_setCullSizeFar(this, 10.0f);
|
||||
|
||||
mTimer = (short)(int)cM_rndF(32768.0f);
|
||||
|
||||
+49
-30
@@ -186,10 +186,9 @@ BOOL tyaku_check(ks_class* i_this) {
|
||||
|
||||
/* 00000788-0000087C .text ks_kuttuki_check__FP8ks_class */
|
||||
BOOL ks_kuttuki_check(ks_class* i_this) {
|
||||
fopAc_ac_c* mAtHitAc;
|
||||
if (i_this->mSph.ChkAtHit() && !i_this->mSph.ChkAtShieldHit()) {
|
||||
mAtHitAc = i_this->mSph.GetAtHitAc();
|
||||
if (mAtHitAc && mAtHitAc == dComIfGp_getLinkPlayer() && KUTTUKU_ALL_COUNT >= 0 && KUTTUKU_ALL_COUNT < 20 && GORON_COUNT == 0) {
|
||||
fopAc_ac_c* hit_actor = i_this->mSph.GetAtHitAc();
|
||||
if (hit_actor && hit_actor == daPy_getPlayerLinkActorClass() && KUTTUKU_ALL_COUNT >= 0 && KUTTUKU_ALL_COUNT < 20 && GORON_COUNT == 0) {
|
||||
i_this->mSph.OffTgSetBit();
|
||||
i_this->mSph.ClrCoSet();
|
||||
i_this->mSph.ClrTgHit();
|
||||
@@ -225,16 +224,16 @@ BOOL shock_damage_check(ks_class* i_this) {
|
||||
daPy_lk_c* link = daPy_getPlayerLinkActorClass();
|
||||
|
||||
if (link->checkHammerQuake()) {
|
||||
cXyz mSwordTopPos = link->getSwordTopPos();
|
||||
cXyz swordTopPos = link->getSwordTopPos();
|
||||
|
||||
mSwordTopPos.x -= actor->current.pos.x;
|
||||
mSwordTopPos.y -= actor->current.pos.y;
|
||||
mSwordTopPos.z -= actor->current.pos.z;
|
||||
swordTopPos.x -= actor->current.pos.x;
|
||||
swordTopPos.y -= actor->current.pos.y;
|
||||
swordTopPos.z -= actor->current.pos.z;
|
||||
|
||||
f32 distXZ = std::sqrtf(SQUARE(mSwordTopPos.x) + SQUARE(mSwordTopPos.z));
|
||||
f32 distXZ = std::sqrtf(SQUARE(swordTopPos.x) + SQUARE(swordTopPos.z));
|
||||
|
||||
if (distXZ < 200.0f) {
|
||||
if (std::sqrtf(SQUARE(mSwordTopPos.y)) < 40.0f) {
|
||||
if (std::sqrtf(SQUARE(swordTopPos.y)) < 40.0f) {
|
||||
i_this->mAction = 3;
|
||||
i_this->mMode = 32;
|
||||
|
||||
@@ -249,19 +248,17 @@ BOOL shock_damage_check(ks_class* i_this) {
|
||||
BOOL body_atari_check(ks_class* i_this) {
|
||||
fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor;
|
||||
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||
cXyz mTgHitPos;
|
||||
cXyz mParticleScale;
|
||||
|
||||
i_this->mStts.Move();
|
||||
|
||||
if (i_this->mSph.ChkTgHit()) {
|
||||
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
|
||||
|
||||
cCcD_Obj* mTgHitObj = i_this->mSph.GetTgHitObj();
|
||||
cCcD_Obj* hitObj = i_this->mSph.GetTgHitObj();
|
||||
|
||||
mTgHitPos = *i_this->mSph.GetTgHitPosP();
|
||||
cXyz hitPos = *i_this->mSph.GetTgHitPosP();
|
||||
|
||||
if (!mTgHitObj) {
|
||||
if (!hitObj) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -269,9 +266,10 @@ BOOL body_atari_check(ks_class* i_this) {
|
||||
|
||||
i_this->mAction = 3;
|
||||
|
||||
switch (mTgHitObj->GetAtType()) {
|
||||
cXyz particleScale;
|
||||
switch (hitObj->GetAtType()) {
|
||||
case AT_TYPE_WIND: {
|
||||
actor->current.angle.y = cM_atan2s(actor->current.pos.x - mTgHitPos.x, actor->current.pos.z - mTgHitPos.z);
|
||||
actor->current.angle.y = cM_atan2s(actor->current.pos.x - hitPos.x, actor->current.pos.z - hitPos.z);
|
||||
|
||||
i_this->mAction = 2;
|
||||
i_this->mMode = 20;
|
||||
@@ -297,8 +295,8 @@ BOOL body_atari_check(ks_class* i_this) {
|
||||
#endif
|
||||
}
|
||||
|
||||
mParticleScale.setall(REG8_F(0) + 0.8f);
|
||||
dComIfGp_particle_set(dPa_name::ID_AK_JN_OK, &mTgHitPos, &player->shape_angle, &mParticleScale);
|
||||
particleScale.setall(REG8_F(0) + 0.8f);
|
||||
dComIfGp_particle_set(dPa_name::ID_AK_JN_OK, &hitPos, &player->shape_angle, &particleScale);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -351,8 +349,8 @@ BOOL body_atari_check(ks_class* i_this) {
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
mParticleScale.setall(REG8_F(0) + 0.8f);
|
||||
dComIfGp_particle_set(dPa_name::ID_AK_JN_OK, &mTgHitPos, &player->shape_angle, &mParticleScale);
|
||||
particleScale.setall(REG8_F(0) + 0.8f);
|
||||
dComIfGp_particle_set(dPa_name::ID_AK_JN_OK, &hitPos, &player->shape_angle, &particleScale);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -651,6 +649,7 @@ void action_kaze_move(ks_class* i_this) {
|
||||
|
||||
static u8 item_tbl[4] = {0xA, 0xB, 0xC, 0xA};
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
/* 00001874-00001A14 .text dead_eff_set__FP8ks_classP4cXyz */
|
||||
void dead_eff_set(ks_class* i_this, cXyz* i_pos) {
|
||||
fopAc_ac_c* actor = (fopAc_ac_c*)i_this;
|
||||
@@ -689,6 +688,7 @@ void dead_eff_set(ks_class* i_this, cXyz* i_pos) {
|
||||
|
||||
fopAcM_delete(actor);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 00001A14-00001C5C .text action_dead_move__FP8ks_class */
|
||||
void action_dead_move(ks_class* i_this) {
|
||||
@@ -738,7 +738,14 @@ void action_dead_move(ks_class* i_this) {
|
||||
case 2:
|
||||
local_28 = actor->current.pos;
|
||||
local_28.y += 20.0f;
|
||||
#if VERSION == VERSION_DEMO
|
||||
fopAcM_seStart(actor, JA_SE_CM_KS_DIE, 0);
|
||||
dComIfGp_particle_setSimple(dPa_name::ID_IT_SN_O_KUROBOU_SIBOU00, &local_28);
|
||||
gm_birth_delet(i_this);
|
||||
fopAcM_delete(actor);
|
||||
#else
|
||||
dead_eff_set(i_this, &local_28);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -747,7 +754,14 @@ void action_dead_move(ks_class* i_this) {
|
||||
case 32: {
|
||||
local_28 = actor->current.pos;
|
||||
local_28.y += 45.0f;
|
||||
#if VERSION == VERSION_DEMO
|
||||
fopAcM_seStart(actor, JA_SE_CM_KS_DIE, 0);
|
||||
dComIfGp_particle_setSimple(dPa_name::ID_IT_SN_O_KUROBOU_SIBOU00, &local_28);
|
||||
gm_birth_delet(i_this);
|
||||
fopAcM_delete(actor);
|
||||
#else
|
||||
dead_eff_set(i_this, &local_28);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -791,6 +805,7 @@ void action_omoi(ks_class* i_this) {
|
||||
|
||||
switch (i_this->mMode) {
|
||||
case 40: {
|
||||
#if VERSION > VERSION_DEMO
|
||||
i_this->m52C.remove();
|
||||
|
||||
actor->speedF = 0.0f;
|
||||
@@ -806,6 +821,7 @@ void action_omoi(ks_class* i_this) {
|
||||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
i_this->m2F0[i] = 0;
|
||||
@@ -815,12 +831,14 @@ void action_omoi(ks_class* i_this) {
|
||||
i_this->m300 = 0x13;
|
||||
}
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
if (KUTTUKU_ALL_COUNT < 0) {
|
||||
i_this->m300 = 0;
|
||||
}
|
||||
else {
|
||||
i_this->m300 = KUTTUKU_ALL_COUNT;
|
||||
}
|
||||
#endif
|
||||
|
||||
i_this->m528 = link->getModelJointMtx(pl_harituki_joint_dt[i_this->m300]);
|
||||
|
||||
@@ -1271,8 +1289,7 @@ static BOOL daKS_Execute(ks_class* i_this) {
|
||||
}
|
||||
else {
|
||||
if (i_this->mMode != 43) {
|
||||
daPy_py_c* link = (daPy_py_c*)daPy_getPlayerLinkActorClass();
|
||||
link->offHeavyState();
|
||||
daPy_getPlayerLinkActorClass()->offHeavyState();
|
||||
|
||||
HEAVY_IN = FALSE;
|
||||
GORON_COUNT = 0;
|
||||
@@ -1390,8 +1407,7 @@ static BOOL daKS_Delete(ks_class* i_this) {
|
||||
|
||||
KS_ALL_COUNT--;
|
||||
if (KS_ALL_COUNT == 0) {
|
||||
daPy_lk_c* link = daPy_getPlayerLinkActorClass();
|
||||
link->offHeavyState();
|
||||
daPy_getPlayerLinkActorClass()->offHeavyState();
|
||||
|
||||
KUTTUKU_ALL_COUNT = 0;
|
||||
HEAVY_IN = FALSE;
|
||||
@@ -1505,13 +1521,16 @@ static f32 fire_sc[10] = {
|
||||
|
||||
/* 000034F8-00003A94 .text daKS_Create__FP10fopAc_ac_c */
|
||||
static cPhs_State daKS_Create(fopAc_ac_c* i_this) {
|
||||
#if VERSION > VERSION_DEMO
|
||||
fopAcM_SetupActor(i_this, ks_class);
|
||||
#endif
|
||||
ks_class* a_this = (ks_class*)i_this;
|
||||
|
||||
cPhs_State res;
|
||||
u32 parameters;
|
||||
res = dComIfG_resLoad(&a_this->mPhs, "KS");
|
||||
cPhs_State res = dComIfG_resLoad(&a_this->mPhs, "KS");
|
||||
if (res == cPhs_COMPLEATE_e) {
|
||||
#if VERSION == VERSION_DEMO
|
||||
fopAcM_SetupActor(i_this, ks_class);
|
||||
#endif
|
||||
if (!fopAcM_entrySolidHeap(i_this, useHeapInit, 0x1060)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
@@ -1535,9 +1554,9 @@ static cPhs_State daKS_Create(fopAc_ac_c* i_this) {
|
||||
a_this->m318 = a_this->m2CA * 10.0f;
|
||||
|
||||
if (a_this->m2C8 <= 1) {
|
||||
parameters = 2;
|
||||
u32 param = 2;
|
||||
if (a_this->m2C8 == 0) {
|
||||
parameters = 3;
|
||||
param = 3;
|
||||
}
|
||||
|
||||
for (int i = 0; i < a_this->m2C9; i++) {
|
||||
@@ -1558,7 +1577,7 @@ static cPhs_State daKS_Create(fopAc_ac_c* i_this) {
|
||||
i_this->shape_angle = i_this->current.angle;
|
||||
i_this->shape_angle.x = 0;
|
||||
|
||||
fopAcM_create(PROC_KS, parameters, &local_4c, fopAcM_GetRoomNo(i_this), &i_this->shape_angle, &i_this->scale, 0);
|
||||
fopAcM_create(PROC_KS, param, &local_4c, fopAcM_GetRoomNo(i_this), &i_this->shape_angle, &i_this->scale, 0);
|
||||
}
|
||||
|
||||
return cPhs_ERROR_e;
|
||||
|
||||
@@ -316,7 +316,7 @@ void daPy_lk_c::setSwimTimerStartStop() {
|
||||
|
||||
/* 8013D814-8013DA18 .text procSwimUp_init__9daPy_lk_cFi */
|
||||
BOOL daPy_lk_c::procSwimUp_init(BOOL param_1) {
|
||||
JPABaseEmitter* mEmitter;
|
||||
JPABaseEmitter* emitter;
|
||||
|
||||
static JGeometry::TVec3<f32> splash_scale(0.4f, 0.4f, 0.4f);
|
||||
static JGeometry::TVec3<f32> ripple_scale(0.3f, 0.3f, 0.3f);
|
||||
@@ -337,19 +337,19 @@ BOOL daPy_lk_c::procSwimUp_init(BOOL param_1) {
|
||||
onNoResetFlg0(daPyFlg0_UNK100);
|
||||
|
||||
if (param_1) {
|
||||
mEmitter = dComIfGp_particle_setP1(dPa_name::ID_IT_JN_WP_SHIBUKI, ¤t.pos);
|
||||
emitter = dComIfGp_particle_setP1(dPa_name::ID_IT_JN_WP_SHIBUKI, ¤t.pos);
|
||||
|
||||
if (mEmitter) {
|
||||
mEmitter->setRate(15.0f);
|
||||
mEmitter->setGlobalDynamicsScale(splash_scale);
|
||||
mEmitter->setGlobalParticleScale(splash_scale);
|
||||
if (emitter) {
|
||||
emitter->setRate(15.0f);
|
||||
emitter->setGlobalDynamicsScale(splash_scale);
|
||||
emitter->setGlobalParticleScale(splash_scale);
|
||||
}
|
||||
|
||||
mEmitter = dComIfGp_particle_setShipTail(dPa_name::ID_IT_JN_WP_HAMON01, ¤t.pos, NULL, NULL, 0xFF, &dPa_control_c::mSingleRippleEcallBack);
|
||||
emitter = dComIfGp_particle_setShipTail(dPa_name::ID_IT_JN_WP_HAMON01, ¤t.pos, NULL, NULL, 0xFF, &dPa_control_c::mSingleRippleEcallBack);
|
||||
|
||||
if (mEmitter) {
|
||||
mEmitter->setGlobalDynamicsScale(ripple_scale);
|
||||
mEmitter->setGlobalParticleScale(ripple_scale);
|
||||
if (emitter) {
|
||||
emitter->setGlobalDynamicsScale(ripple_scale);
|
||||
emitter->setGlobalParticleScale(ripple_scale);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,22 +359,22 @@ BOOL daPy_lk_c::procSwimUp_init(BOOL param_1) {
|
||||
|
||||
/* 8013DA18-8013DB24 .text procSwimUp__9daPy_lk_cFv */
|
||||
BOOL daPy_lk_c::procSwimUp() {
|
||||
J3DFrameCtrl* mFrameCtrl = mFrameCtrlUnder;
|
||||
J3DFrameCtrl* frameCtrl = mFrameCtrlUnder;
|
||||
|
||||
setSpeedAndAngleSwim();
|
||||
|
||||
if (!changeSwimOutProc()) {
|
||||
if (mFrameCtrl->getRate() < 0.01f) {
|
||||
if (frameCtrl->getRate() < 0.01f) {
|
||||
procSwimWait_init(FALSE);
|
||||
}
|
||||
else {
|
||||
if (mFrameCtrl->getFrame() > m_HIO->mSwim.m.field_0x34) {
|
||||
if (frameCtrl->getFrame() > m_HIO->mSwim.m.field_0x34) {
|
||||
if (mStickDistance > 0.05f) {
|
||||
procSwimMove_init(FALSE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (mFrameCtrl->checkPass(4.0f)) {
|
||||
if (frameCtrl->checkPass(4.0f)) {
|
||||
voiceStart(0x1A);
|
||||
seStartOnlyReverb(JA_SE_LK_WALK_IN_WATER);
|
||||
seStartOnlyReverb(JA_SE_LK_SWIM);
|
||||
@@ -394,12 +394,12 @@ BOOL daPy_lk_c::procSwimUp() {
|
||||
BOOL daPy_lk_c::procSwimWait_init(BOOL param_1) {
|
||||
float fVar2;
|
||||
|
||||
J3DFrameCtrl* mFrameCtrl = mFrameCtrlUnder;
|
||||
J3DFrameCtrl* frameCtrl = mFrameCtrlUnder;
|
||||
|
||||
commonProcInit(daPyProc_SWIM_WAIT_e);
|
||||
|
||||
if (param_1) {
|
||||
fVar2 = mFrameCtrl->getFrame() / (float)mFrameCtrl->getEnd();
|
||||
fVar2 = frameCtrl->getFrame() / (float)frameCtrl->getEnd();
|
||||
mVelocity = speedF * (1.0f - m_HIO->mSwim.m.field_0x60) + speedF * std::fabsf(cM_fcos(fVar2 * M_PI)) * m_HIO->mSwim.m.field_0x60;
|
||||
}
|
||||
else {
|
||||
@@ -408,8 +408,8 @@ BOOL daPy_lk_c::procSwimWait_init(BOOL param_1) {
|
||||
|
||||
gravity = 0.0f;
|
||||
setSingleMoveAnime(ANM_SWIMWAIT, (float)(getSwimTimerRate() * m_HIO->mSwim.m.field_0x70) + m_HIO->mSwim.m.field_0x40, 0.0f, -1, m_HIO->mSwim.m.field_0x44);
|
||||
mFrameCtrl->setFrame(fVar2 * mFrameCtrl->getEnd());
|
||||
mAnmRatioUnder[UNDER_MOVE0_e].getAnmTransform()->setFrame(mFrameCtrl->getFrame());
|
||||
frameCtrl->setFrame(fVar2 * frameCtrl->getEnd());
|
||||
mAnmRatioUnder[UNDER_MOVE0_e].getAnmTransform()->setFrame(frameCtrl->getFrame());
|
||||
dComIfGp_setPlayerStatus0(0, daPyStts0_SWIM_e);
|
||||
|
||||
if (checkNoResetFlg0(daPyFlg0_UNK100)) {
|
||||
@@ -508,7 +508,7 @@ BOOL daPy_lk_c::procSwimMove() {
|
||||
|
||||
setSpeedAndAngleSwim();
|
||||
|
||||
J3DFrameCtrl* mFrameCtrl = mFrameCtrlUnder;
|
||||
J3DFrameCtrl* frameCtrl = mFrameCtrlUnder;
|
||||
|
||||
int direction;
|
||||
if (!checkAttentionLock()) {
|
||||
@@ -558,11 +558,11 @@ BOOL daPy_lk_c::procSwimMove() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
mFrameCtrl[0].setRate((std::fabsf(mVelocity) * (m_HIO->mSwim.m.field_0x54 - m_HIO->mSwim.m.field_0x50)) / mMaxNormalSpeed + m_HIO->mSwim.m.field_0x50 + (float)(getSwimTimerRate() * m_HIO->mSwim.m.field_0x74));
|
||||
frameCtrl[0].setRate((std::fabsf(mVelocity) * (m_HIO->mSwim.m.field_0x54 - m_HIO->mSwim.m.field_0x50)) / mMaxNormalSpeed + m_HIO->mSwim.m.field_0x50 + (float)(getSwimTimerRate() * m_HIO->mSwim.m.field_0x74));
|
||||
}
|
||||
|
||||
if (mDirection == DIR_BACKWARD) {
|
||||
mFrameCtrl[0].setRate(mFrameCtrl[0].getRate() * 0.5f);
|
||||
frameCtrl[0].setRate(frameCtrl[0].getRate() * 0.5f);
|
||||
}
|
||||
|
||||
if (changeSwimOutProc()) {
|
||||
@@ -591,7 +591,7 @@ BOOL daPy_lk_c::procSwimMove() {
|
||||
if (mStickDistance <= 0.05f) {
|
||||
procSwimWait_init(TRUE);
|
||||
}
|
||||
else if ((mDirection == DIR_FORWARD && mFrameCtrl->checkPass(20.0f)) || (mDirection != DIR_FORWARD && mFrameCtrl->checkPass(0.0f))) {
|
||||
else if ((mDirection == DIR_FORWARD && frameCtrl->checkPass(20.0f)) || (mDirection != DIR_FORWARD && frameCtrl->checkPass(0.0f))) {
|
||||
seStartOnlyReverb(JA_SE_LK_SWIM);
|
||||
}
|
||||
|
||||
|
||||
+20
-20
@@ -2964,7 +2964,7 @@ void daShip_c::setEffectData(float param_1, short param_2) {
|
||||
float fVar1;
|
||||
float fVar2;
|
||||
float fVar3;
|
||||
JPABaseEmitter* mEmitter;
|
||||
JPABaseEmitter* emitter;
|
||||
GXColor amb;
|
||||
GXColor diff;
|
||||
|
||||
@@ -2990,17 +2990,17 @@ void daShip_c::setEffectData(float param_1, short param_2) {
|
||||
if (std::fabsf(speedF) > 3.0f && mFwdVel * speedF > 0.0f) {
|
||||
if (mFwdVel > 11.0f) {
|
||||
if (mWaveL.getEmitter() == NULL) {
|
||||
mEmitter = dComIfGp_particle_set(dPa_name::ID_AK_JN_SHIPWAVE00, &mEffPos, &shape_angle, NULL, 0xFF, &mWaveL);
|
||||
emitter = dComIfGp_particle_set(dPa_name::ID_AK_JN_SHIPWAVE00, &mEffPos, &shape_angle, NULL, 0xFF, &mWaveL);
|
||||
mWaveL.setTimer(20);
|
||||
if (mEmitter) {
|
||||
mEmitter->setDirection(wave_l_direction);
|
||||
if (emitter) {
|
||||
emitter->setDirection(wave_l_direction);
|
||||
}
|
||||
}
|
||||
if (mWaveR.getEmitter() == NULL) {
|
||||
mEmitter = dComIfGp_particle_set(dPa_name::ID_AK_JN_SHIPWAVE00, &mEffPos, &shape_angle, NULL, 0xFF, &mWaveR);
|
||||
emitter = dComIfGp_particle_set(dPa_name::ID_AK_JN_SHIPWAVE00, &mEffPos, &shape_angle, NULL, 0xFF, &mWaveR);
|
||||
mWaveR.setTimer(20);
|
||||
if (mEmitter) {
|
||||
mEmitter->setDirection(wave_r_direction);
|
||||
if (emitter) {
|
||||
emitter->setDirection(wave_r_direction);
|
||||
}
|
||||
}
|
||||
if (mSplash.getEmitter() == NULL) {
|
||||
@@ -3012,8 +3012,8 @@ void daShip_c::setEffectData(float param_1, short param_2) {
|
||||
}
|
||||
if (checkStateFlg((daSHIP_SFLG)(daSFLG_FLY_e | daSFLG_LAND_e))) {
|
||||
dKy_get_seacolor(&amb, &diff);
|
||||
mEmitter = dComIfGp_particle_set(dPa_name::ID_AK_JN_SHIPIMPACT00, &mEffPos, &shape_angle, NULL, 0xFF, NULL, -1, &amb);
|
||||
if (mEmitter) {
|
||||
emitter = dComIfGp_particle_set(dPa_name::ID_AK_JN_SHIPIMPACT00, &mEffPos, &shape_angle, NULL, 0xFF, NULL, -1, &amb);
|
||||
if (emitter) {
|
||||
fVar1 = 10.0f;
|
||||
fVar2 = (-(speed.y - -15.0f) / 30.0f) * 50.0f + 10.0f;
|
||||
if (fVar2 < 10.0f) {
|
||||
@@ -3022,7 +3022,7 @@ void daShip_c::setEffectData(float param_1, short param_2) {
|
||||
else if (fVar2 > 60.0f) {
|
||||
fVar2 = 60.0f;
|
||||
}
|
||||
mEmitter->setRate(fVar2);
|
||||
emitter->setRate(fVar2);
|
||||
}
|
||||
seStart(JA_SE_SHIP_JUMP_ALIGHT, ¤t.pos);
|
||||
}
|
||||
@@ -3976,17 +3976,17 @@ BOOL daShip_c::execute() {
|
||||
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, shape_angle.z);
|
||||
|
||||
J3DModel* mModel1;
|
||||
J3DModel* mModel2;
|
||||
mModel1 = mpBodyAnm->getModel();
|
||||
mModel2 = mpHeadAnm->getModel();
|
||||
J3DModel* model1;
|
||||
J3DModel* model2;
|
||||
model1 = mpBodyAnm->getModel();
|
||||
model2 = mpHeadAnm->getModel();
|
||||
|
||||
mModel1->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
model1->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mpBodyAnm->calc();
|
||||
|
||||
setHeadAnm();
|
||||
|
||||
mModel2->setBaseTRMtx(mModel1->getAnmMtx(4));
|
||||
model2->setBaseTRMtx(model1->getAnmMtx(4));
|
||||
mpHeadAnm->calc();
|
||||
|
||||
if (mPart == PART_CRANE_e) {
|
||||
@@ -4059,10 +4059,10 @@ BOOL daShip_c::execute() {
|
||||
}
|
||||
}
|
||||
|
||||
cMtx_multVec(mModel1->getAnmMtx(10), &l_tiller_top_offset, &mTillerTopPos);
|
||||
cMtx_multVec(model1->getAnmMtx(10), &l_tiller_top_offset, &mTillerTopPos);
|
||||
|
||||
daGrid_c* grid;
|
||||
MtxP mMtx = mModel1->getAnmMtx(7);
|
||||
MtxP mMtx = model1->getAnmMtx(7);
|
||||
|
||||
m0444.x = mMtx[0][3];
|
||||
m0444.y = mMtx[1][3];
|
||||
@@ -4080,7 +4080,7 @@ BOOL daShip_c::execute() {
|
||||
cMtx_multVecSR(mMtx, &top_offset, &spD8);
|
||||
mpGrid->scale.y = spD8.abs() / 365.0f;
|
||||
|
||||
cMtx_multVecSR(mModel1->getAnmMtx(8), &XZ_top_offset, &spD8);
|
||||
cMtx_multVecSR(model1->getAnmMtx(8), &XZ_top_offset, &spD8);
|
||||
grid->m2200 = 1.0f - (spD8.abs() / 265.0f); // No idea why this is generating an extra lwz instruction for loading mpGrid when the instructions above don't
|
||||
|
||||
if (mTornadoActor) {
|
||||
@@ -4119,7 +4119,7 @@ BOOL daShip_c::execute() {
|
||||
// This should probably use the mDoMtx_multVecZero inline, but it's not getting inlined
|
||||
// mDoMtx_multVecZero(mModel2->getAnmMtx(16), &eyePos);
|
||||
MtxP jnt_mtx;
|
||||
jnt_mtx = mModel2->getAnmMtx(16);
|
||||
jnt_mtx = model2->getAnmMtx(16);
|
||||
eyePos.x = jnt_mtx[0][3];
|
||||
eyePos.y = jnt_mtx[1][3];
|
||||
eyePos.z = jnt_mtx[2][3];
|
||||
|
||||
+12
-12
@@ -4639,27 +4639,27 @@ void store(camera_process_class* i_this) {
|
||||
cSAngle bank = fopCamM_GetBank(a_this);
|
||||
f32 fovy = fopCamM_GetFovy(a_this);
|
||||
|
||||
dDemo_camera_c* mDemoCamera = dComIfGp_demo_getCamera();
|
||||
dDemo_camera_c* demoCamera = dComIfGp_demo_getCamera();
|
||||
|
||||
if (mDemoCamera) {
|
||||
if (mDemoCamera->checkEnable(0x40)) {
|
||||
oldCenter = mDemoCamera->getTarget();
|
||||
if (demoCamera) {
|
||||
if (demoCamera->checkEnable(0x40)) {
|
||||
oldCenter = demoCamera->getTarget();
|
||||
}
|
||||
|
||||
if (mDemoCamera->checkEnable(0x10)) {
|
||||
oldEye = mDemoCamera->getTrans();
|
||||
if (demoCamera->checkEnable(0x10)) {
|
||||
oldEye = demoCamera->getTrans();
|
||||
}
|
||||
|
||||
if (mDemoCamera->checkEnable(0x20)) {
|
||||
oldUp = mDemoCamera->getUp();
|
||||
if (demoCamera->checkEnable(0x20)) {
|
||||
oldUp = demoCamera->getUp();
|
||||
}
|
||||
|
||||
if (mDemoCamera->checkEnable(0x80)) {
|
||||
bank = cAngle::d2s(-mDemoCamera->getRoll());
|
||||
if (demoCamera->checkEnable(0x80)) {
|
||||
bank = cAngle::d2s(-demoCamera->getRoll());
|
||||
}
|
||||
|
||||
if (mDemoCamera->checkEnable(4)) {
|
||||
fovy = mDemoCamera->getFovy();
|
||||
if (demoCamera->checkEnable(4)) {
|
||||
fovy = demoCamera->getFovy();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -13,9 +13,13 @@
|
||||
#include "f_pc/f_pc_layer_iter.h"
|
||||
|
||||
/* 8003CD0C-8003CD28 .text fpcCtRq_isCreatingByID__FP10create_tagPUi */
|
||||
bool fpcCtRq_isCreatingByID(create_tag* i_createTag, fpc_ProcID* i_procID) {
|
||||
BOOL fpcCtRq_isCreatingByID(create_tag* i_createTag, fpc_ProcID* i_procID) {
|
||||
create_request* pReq = static_cast<create_request*>(i_createTag->base.mpTagData);
|
||||
return pReq->mBsPcId == *i_procID;
|
||||
if (pReq->mBsPcId == *i_procID) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* 8003CD28-8003CD60 .text fpcCtRq_IsCreatingByID__FUi */
|
||||
|
||||
Reference in New Issue
Block a user