summaryrefslogtreecommitdiff
path: root/src/d/actor
diff options
context:
space:
mode:
Diffstat (limited to 'src/d/actor')
-rw-r--r--src/d/actor/d_a_alink.cpp2
-rw-r--r--src/d/actor/d_a_b_dr.cpp2
-rw-r--r--src/d/actor/d_a_b_zant.cpp2
-rw-r--r--src/d/actor/d_a_coach_fire.cpp6
-rw-r--r--src/d/actor/d_a_cow.cpp4
-rw-r--r--src/d/actor/d_a_e_tk_ball.cpp2
-rw-r--r--src/d/actor/d_a_e_ym.cpp6
-rw-r--r--src/d/actor/d_a_ep.cpp4
-rw-r--r--src/d/actor/d_a_horse.cpp4
-rw-r--r--src/d/actor/d_a_hozelda.cpp2
-rw-r--r--src/d/actor/d_a_npc.cpp42
-rw-r--r--src/d/actor/d_a_npc4.cpp34
-rw-r--r--src/d/actor/d_a_npc_fairy_seirei.cpp8
-rw-r--r--src/d/actor/d_a_npc_ks.cpp2
-rw-r--r--src/d/actor/d_a_npc_seib.cpp8
-rw-r--r--src/d/actor/d_a_npc_seic.cpp8
-rw-r--r--src/d/actor/d_a_npc_seid.cpp8
-rw-r--r--src/d/actor/d_a_npc_uri.cpp4
-rw-r--r--src/d/actor/d_a_obj_gra_rock.cpp6
-rw-r--r--src/d/actor/d_a_obj_master_sword.cpp8
-rw-r--r--src/d/actor/d_a_obj_sakuita_rope.cpp693
-rw-r--r--src/d/actor/d_a_tag_Lv8Gate.cpp8
22 files changed, 415 insertions, 448 deletions
diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp
index f985187a8e..70b527ed48 100644
--- a/src/d/actor/d_a_alink.cpp
+++ b/src/d/actor/d_a_alink.cpp
@@ -4694,7 +4694,7 @@ int daAlink_c::create() {
return cPhs_ERROR_e;
}
- mAttention = &dComIfGp_getAttention();
+ mAttention = dComIfGp_getAttention();
field_0x317c = dComIfGp_getPlayerCameraID(0);
playerInit();
diff --git a/src/d/actor/d_a_b_dr.cpp b/src/d/actor/d_a_b_dr.cpp
index b6131e7cc6..c3d5cbe376 100644
--- a/src/d/actor/d_a_b_dr.cpp
+++ b/src/d/actor/d_a_b_dr.cpp
@@ -2327,7 +2327,7 @@ void daB_DR_c::executeBreathAttack() {
attention_info.flags &= ~0x4;
} else {
mWeekCc.OnTgSetBit();
- if (mTarget != 0 || (dComIfGp_getAttention().GetLockonList(0) != NULL && dComIfGp_getAttention().LockonTruth() && dComIfGp_getAttention().GetLockonList(0)->getActor() == this)) {
+ if (mTarget != 0 || (dComIfGp_getAttention()->GetLockonList(0) != NULL && dComIfGp_getAttention()->LockonTruth() && dComIfGp_getAttention()->GetLockonList(0)->getActor() == this)) {
mTarget = 0;
} else {
attention_info.flags &= ~0x4;
diff --git a/src/d/actor/d_a_b_zant.cpp b/src/d/actor/d_a_b_zant.cpp
index c346d48229..4a322ca21e 100644
--- a/src/d/actor/d_a_b_zant.cpp
+++ b/src/d/actor/d_a_b_zant.cpp
@@ -5411,7 +5411,7 @@ void daB_ZANT_c::cc_ice_set() {
cXyz sp40;
if (mAction == ACT_ICE_STEP || mAction == ACT_ICE_JUMP) {
- if (!dComIfGp_getAttention().LockonTruth() || dComIfGp_getAttention().LockonTarget(0) != this) {
+ if (!dComIfGp_getAttention()->LockonTruth() || dComIfGp_getAttention()->LockonTarget(0) != this) {
mDoMtx_stack_c::copy(mpModelMorf->getModel()->getAnmMtx(JNT_FOOT_L));
mDoMtx_stack_c::transM(20.0f, 0.0f, 0.0f);
mDoMtx_stack_c::multVecZero(&sp34);
diff --git a/src/d/actor/d_a_coach_fire.cpp b/src/d/actor/d_a_coach_fire.cpp
index 071b760468..85804887b2 100644
--- a/src/d/actor/d_a_coach_fire.cpp
+++ b/src/d/actor/d_a_coach_fire.cpp
@@ -121,9 +121,9 @@ int daCoachFire_c::execute() {
setNoHitTimer();
}
if (coach != NULL && coach->checkCoachBlazing()) {
- dAttention_c& attn = dComIfGp_getAttention();
- if (attn.LockonTruth()) {
- if (attn.LockonTarget(0) != this) {
+ dAttention_c* attn = dComIfGp_getAttention();
+ if (attn->LockonTruth()) {
+ if (attn->LockonTarget(0) != this) {
if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != NULL) {
fopAcM_delete(this);
}
diff --git a/src/d/actor/d_a_cow.cpp b/src/d/actor/d_a_cow.cpp
index 3bf4f7d5cf..e62afcaea6 100644
--- a/src/d/actor/d_a_cow.cpp
+++ b/src/d/actor/d_a_cow.cpp
@@ -1827,8 +1827,8 @@ void daCow_c::action_angry() {
}
int lockedOn = false;
- if (mRunDuration && mForgetCowPTimer && dComIfGp_getAttention().LockonTruth() &&
- (dComIfGp_getAttention().LockonTarget(0) == this) &&
+ if (mRunDuration && mForgetCowPTimer && dComIfGp_getAttention()->LockonTruth() &&
+ (dComIfGp_getAttention()->LockonTarget(0) == this) &&
(s16)cLib_distanceAngleS(playerAngle, mSavedAngle.y) < 0x800)
{
mTargetAngle = playerAngle;
diff --git a/src/d/actor/d_a_e_tk_ball.cpp b/src/d/actor/d_a_e_tk_ball.cpp
index 9c5cbb641a..d69a953064 100644
--- a/src/d/actor/d_a_e_tk_ball.cpp
+++ b/src/d/actor/d_a_e_tk_ball.cpp
@@ -138,7 +138,7 @@ static void e_tk_ball_move(e_tk_ball_class* i_this) {
s8 actor_lockon = false;
fopAc_ac_c* parent_actor = fopAcM_SearchByID(actor->parentActorID);
if (parent_actor != NULL) {
- dAttention_c* attention = &dComIfGp_getAttention();
+ dAttention_c* attention = dComIfGp_getAttention();
if (attention->Lockon() && parent_actor == attention->LockonTarget(0)) {
actor_lockon = true;
parent_actor->attention_info.flags |= 0x200000;
diff --git a/src/d/actor/d_a_e_ym.cpp b/src/d/actor/d_a_e_ym.cpp
index 3c0e472d8a..6f81433559 100644
--- a/src/d/actor/d_a_e_ym.cpp
+++ b/src/d/actor/d_a_e_ym.cpp
@@ -348,9 +348,9 @@ u8 daE_YM_c::checkSurpriseLock() {
return 0;
}
if (mAction != 8) {
- bool truth = dComIfGp_getAttention().LockonTruth();
+ bool truth = dComIfGp_getAttention()->LockonTruth();
if (truth) {
- fopAc_ac_c* tgt = dComIfGp_getAttention().LockonTarget(0);
+ fopAc_ac_c* tgt = dComIfGp_getAttention()->LockonTarget(0);
if (tgt == this && mType == 0) {
cXyz my_vec_0 = current.pos - mPrevPos;
cXyz my_vec_1 = player->current.pos - mPrevPos;
@@ -1499,7 +1499,7 @@ void daE_YM_c::executeAttack() {
field_0x6a5 = 0;
break;
case 1:
- if (field_0x6d4 && (dComIfGp_getAttention().LockonTruth() == 0 || dComIfGp_getAttention().LockonTarget(0) != this)) {
+ if (field_0x6d4 && (dComIfGp_getAttention()->LockonTruth() == 0 || dComIfGp_getAttention()->LockonTarget(0) != this)) {
if (checkSurpriseNear()) {
return;
}
diff --git a/src/d/actor/d_a_ep.cpp b/src/d/actor/d_a_ep.cpp
index 9e4dd91b8d..813db2d408 100644
--- a/src/d/actor/d_a_ep.cpp
+++ b/src/d/actor/d_a_ep.cpp
@@ -224,10 +224,10 @@ static void hahen_carry(ep_class* i_this, ep_hahen_s* hahen_s) {
hahen_s->field_0x28.x = 0;
hahen_s->field_0x28.z = 0x4000;
hahen_s->field_0x28.y = player->shape_angle.y;
- if (dComIfGp_getAttention().Lockon()) {
+ if (dComIfGp_getAttention()->Lockon()) {
hahen_s->field_0x30 = 80.0f;
- fopAc_ac_c* lockOnTarget = dComIfGp_getAttention().LockonTarget(0);
+ fopAc_ac_c* lockOnTarget = dComIfGp_getAttention()->LockonTarget(0);
if (lockOnTarget) {
cXyz local_34, cStack_28;
local_34 = lockOnTarget->current.pos - hahen_s->field_0x4;
diff --git a/src/d/actor/d_a_horse.cpp b/src/d/actor/d_a_horse.cpp
index fd03f065cb..8a2a483e5c 100644
--- a/src/d/actor/d_a_horse.cpp
+++ b/src/d/actor/d_a_horse.cpp
@@ -1942,7 +1942,7 @@ int daHorse_c::setSpeedAndAngle() {
}
if (checkStateFlg0(FLG0_UNK_1)) {
- dAttention_c* attention = &dComIfGp_getAttention();
+ dAttention_c* attention = dComIfGp_getAttention();
if (attention->GetLockonList(0) != NULL && attention->LockonTruth() && fopAcM_searchActorDistanceXZ2(this, attention->GetLockonList(0)->getActor()) > 1000000.0f) {
cLib_addCalcAngleS(&current.angle.y, fopAcM_searchActorAngleY(this, attention->GetLockonList(0)->getActor()), 5, field_0x16c2, daHorse_hio_c0::m.min_turn);
if (!checkStateFlg0(daHorse_FLG0(FLG0_UNK_100000 | FLG0_UNK_200000))) {
@@ -3099,7 +3099,7 @@ BOOL daHorse_c::checkServiceWaitAnime() {
/* 80840844-808408F0 008A04 00AC+00 2/2 0/0 0/0 .text checkTurnInput__9daHorse_cFv */
BOOL daHorse_c::checkTurnInput() {
- return m_padStickValue > 0.9f && (!dComIfGp_getAttention().Lockon() || daAlink_getAlinkActorClass()->getAtnActor() != NULL);
+ return m_padStickValue > 0.9f && (!dComIfGp_getAttention()->Lockon() || daAlink_getAlinkActorClass()->getAtnActor() != NULL);
}
/* 808408F0-808409C0 008AB0 00D0+00 2/2 0/0 0/0 .text checkTgHitTurn__9daHorse_cFv */
diff --git a/src/d/actor/d_a_hozelda.cpp b/src/d/actor/d_a_hozelda.cpp
index dc2728f390..7eecc9f4f2 100644
--- a/src/d/actor/d_a_hozelda.cpp
+++ b/src/d/actor/d_a_hozelda.cpp
@@ -481,7 +481,7 @@ void daHoZelda_c::setAnm() {
}
BOOL gnd_lockon;
- if (dComIfGp_getAttention().GetLockonList(0) != NULL && dComIfGp_getAttention().LockonTruth() && dComIfGp_getAttention().GetLockonList(0)->getActor() == gnd_actor) {
+ if (dComIfGp_getAttention()->GetLockonList(0) != NULL && dComIfGp_getAttention()->LockonTruth() && dComIfGp_getAttention()->GetLockonList(0)->getActor() == gnd_actor) {
gnd_lockon = TRUE;
} else {
gnd_lockon = FALSE;
diff --git a/src/d/actor/d_a_npc.cpp b/src/d/actor/d_a_npc.cpp
index a8550feba9..66f853cacc 100644
--- a/src/d/actor/d_a_npc.cpp
+++ b/src/d/actor/d_a_npc.cpp
@@ -2234,11 +2234,11 @@ BOOL daNpcT_c::chkFindActor(fopAc_ac_c* i_actor, BOOL i_release, s16 i_angleY) {
int dist_index = i_release == FALSE ? attention_info.distances[fopAc_attn_SPEAK_e]
: attention_info.distances[fopAc_attn_TALK_e];
- f32 dist_max = i_release == FALSE ? dComIfGp_getAttention().getDistTable(dist_index).mDistMax
- : dComIfGp_getAttention().getDistTable(dist_index).mDistMaxRelease;
- f32 lower_y = dComIfGp_getAttention().getDistTable(dist_index).mLowerY * -1.0f;
- f32 upper_y = dComIfGp_getAttention().getDistTable(dist_index).mUpperY * -1.0f;
- u32 angle_select = dComIfGp_getAttention().getDistTable(dist_index).mAngleSelect;
+ f32 dist_max = i_release == FALSE ? dComIfGp_getAttention()->getDistTable(dist_index).mDistMax
+ : dComIfGp_getAttention()->getDistTable(dist_index).mDistMaxRelease;
+ f32 lower_y = dComIfGp_getAttention()->getDistTable(dist_index).mLowerY * -1.0f;
+ f32 upper_y = dComIfGp_getAttention()->getDistTable(dist_index).mUpperY * -1.0f;
+ u32 angle_select = dComIfGp_getAttention()->getDistTable(dist_index).mAngleSelect;
f32 fov = 180.0f;
if (angle_select & 8) {
@@ -2286,17 +2286,17 @@ BOOL daNpcT_c::chkFindWolf(s16 i_angleY, int i_distIndex, int param_2, f32 i_bou
return TRUE;
}
- f32 dist_max = dComIfGp_getAttention().getDistTable(i_distIndex).mDistMax;
- f32 upper_y = dComIfGp_getAttention().getDistTable(i_distIndex).mUpperY;
- f32 lower_y = dComIfGp_getAttention().getDistTable(i_distIndex).mLowerY;
+ f32 dist_max = dComIfGp_getAttention()->getDistTable(i_distIndex).mDistMax;
+ f32 upper_y = dComIfGp_getAttention()->getDistTable(i_distIndex).mUpperY;
+ f32 lower_y = dComIfGp_getAttention()->getDistTable(i_distIndex).mLowerY;
if (chkPointInArea(attn_pos, attention_info.position, dist_max, upper_y, lower_y, 0)) {
return TRUE;
}
int dist_index = attention_info.distances[fopAc_attn_TALK_e];
- dist_max = dComIfGp_getAttention().getDistTable(dist_index).mDistMax;
- upper_y = dComIfGp_getAttention().getDistTable(dist_index).mUpperY;
- lower_y = dComIfGp_getAttention().getDistTable(dist_index).mLowerY;
+ dist_max = dComIfGp_getAttention()->getDistTable(dist_index).mDistMax;
+ upper_y = dComIfGp_getAttention()->getDistTable(dist_index).mUpperY;
+ lower_y = dComIfGp_getAttention()->getDistTable(dist_index).mLowerY;
if (chkPointInArea(attn_pos, attention_info.position, dist_max, upper_y, lower_y, 0)
&& param_2 < 2 && param_7 && chkWolfAction())
{
@@ -2437,8 +2437,8 @@ void daNpcT_c::calcSpeedAndAngle(cXyz i_target, BOOL i_stop, s16 i_angleScale, s
*/
int daNpcT_c::getActorDistance(fopAc_ac_c* i_actor, int i_distIndex1, int i_distIndex2) {
int ret = 0;
- f32 dist1 = dComIfGp_getAttention().getDistTable(i_distIndex1).mDistMax;
- f32 dist2 = dComIfGp_getAttention().getDistTable(i_distIndex2).mDistMax;
+ f32 dist1 = dComIfGp_getAttention()->getDistTable(i_distIndex1).mDistMax;
+ f32 dist2 = dComIfGp_getAttention()->getDistTable(i_distIndex2).mDistMax;
f32 actor_dist = fopAcM_searchActorDistanceXZ(this, i_actor);
if (actor_dist < dist1) {
@@ -2697,19 +2697,19 @@ BOOL daNpcT_chkDoBtnIsSpeak(fopAc_ac_c* i_actor_p) {
if (daPy_getPlayerActorClass()->checkPriActorOwn(i_actor_p)) {
JUT_ASSERT(4965, 0 != dComIfGp_getAttention());
- for (int i = 0; i < dComIfGp_getAttention().GetActionCount(); i++) {
- if (dComIfGp_getAttention().ActionTarget(i) == i_actor_p &&
- dComIfGp_getAttention().getActionBtnB() != NULL &&
- dComIfGp_getAttention().getActionBtnB()->mType == 3)
+ for (int i = 0; i < dComIfGp_getAttention()->GetActionCount(); i++) {
+ if (dComIfGp_getAttention()->ActionTarget(i) == i_actor_p &&
+ dComIfGp_getAttention()->getActionBtnB() != NULL &&
+ dComIfGp_getAttention()->getActionBtnB()->mType == 3)
{
ret = TRUE;
}
}
- for (int i = 0; i < dComIfGp_getAttention().GetLockonCount(); i++) {
- if (dComIfGp_getAttention().LockonTarget(i) == i_actor_p &&
- dComIfGp_getAttention().getActionBtnB() != NULL &&
- dComIfGp_getAttention().getActionBtnB()->mType == 1)
+ for (int i = 0; i < dComIfGp_getAttention()->GetLockonCount(); i++) {
+ if (dComIfGp_getAttention()->LockonTarget(i) == i_actor_p &&
+ dComIfGp_getAttention()->getActionBtnB() != NULL &&
+ dComIfGp_getAttention()->getActionBtnB()->mType == 1)
{
ret = TRUE;
}
diff --git a/src/d/actor/d_a_npc4.cpp b/src/d/actor/d_a_npc4.cpp
index 6786d1f37a..9c8e05983c 100644
--- a/src/d/actor/d_a_npc4.cpp
+++ b/src/d/actor/d_a_npc4.cpp
@@ -1358,14 +1358,14 @@ BOOL daNpcF_c::chkActorInArea(fopAc_ac_c* i_actor, cXyz i_center, cXyz i_bounds,
BOOL daNpcF_c::chkActorInAttnArea(fopAc_ac_c* i_actorCheck, fopAc_ac_c* i_actorAttn,
int i_distIndex) {
BOOL ret = false;
- f32 neg_lower_y = dComIfGp_getAttention().getDistTable(i_distIndex).mLowerY * -1.0f;
- f32 neg_upper_y = dComIfGp_getAttention().getDistTable(i_distIndex).mUpperY * -1.0f;
+ f32 neg_lower_y = dComIfGp_getAttention()->getDistTable(i_distIndex).mLowerY * -1.0f;
+ f32 neg_upper_y = dComIfGp_getAttention()->getDistTable(i_distIndex).mUpperY * -1.0f;
cXyz center = i_actorAttn->current.pos;
cXyz bounds;
- bounds.x = dComIfGp_getAttention().getDistTable(i_distIndex).mDistMax;
+ bounds.x = dComIfGp_getAttention()->getDistTable(i_distIndex).mDistMax;
bounds.y = (fabsf(neg_lower_y) + fabsf(neg_upper_y)) / 2.0f;
- bounds.z = dComIfGp_getAttention().getDistTable(i_distIndex).mDistMax;
+ bounds.z = dComIfGp_getAttention()->getDistTable(i_distIndex).mDistMax;
center.y = bounds.y + (center.y + neg_upper_y);
if (chkActorInArea(i_actorCheck, center, bounds, i_actorAttn->shape_angle.y)) {
@@ -1681,11 +1681,11 @@ BOOL daNpcF_c::chkFindPlayer2(BOOL i_hasAttn, s16 i_angle) {
cXyz attn_pos = getAttentionPos(daPy_getPlayerActorClass());
int attn_no = i_hasAttn == false ? attention_info.distances[fopAc_attn_SPEAK_e]
: attention_info.distances[fopAc_attn_TALK_e];
- f32 dist_max = i_hasAttn == false ? dComIfGp_getAttention().getDistTable(attn_no).mDistMax
- : dComIfGp_getAttention().getDistTable(attn_no).mDistMaxRelease;
- f32 lower_y = dComIfGp_getAttention().getDistTable(attn_no).mLowerY * -1.0f;
- f32 upper_y = dComIfGp_getAttention().getDistTable(attn_no).mUpperY * -1.0f;
- u32 angle_select = dComIfGp_getAttention().getDistTable(attn_no).mAngleSelect;
+ f32 dist_max = i_hasAttn == false ? dComIfGp_getAttention()->getDistTable(attn_no).mDistMax
+ : dComIfGp_getAttention()->getDistTable(attn_no).mDistMaxRelease;
+ f32 lower_y = dComIfGp_getAttention()->getDistTable(attn_no).mLowerY * -1.0f;
+ f32 upper_y = dComIfGp_getAttention()->getDistTable(attn_no).mUpperY * -1.0f;
+ u32 angle_select = dComIfGp_getAttention()->getDistTable(attn_no).mAngleSelect;
f32 fovy = 180.0f;
if (angle_select & 8) {
@@ -1911,19 +1911,19 @@ bool daNpcF_chkDoBtnEqSpeak(fopAc_ac_c* i_actor_p) {
bool ret = FALSE;
if (daPy_getPlayerActorClass()->checkPriActorOwn(i_actor_p)) {
- for (int i = 0; i < dComIfGp_getAttention().GetActionCount(); i++) {
- if (dComIfGp_getAttention().ActionTarget(i) == i_actor_p &&
- dComIfGp_getAttention().getActionBtnB() &&
- dComIfGp_getAttention().getActionBtnB()->mType == 3)
+ for (int i = 0; i < dComIfGp_getAttention()->GetActionCount(); i++) {
+ if (dComIfGp_getAttention()->ActionTarget(i) == i_actor_p &&
+ dComIfGp_getAttention()->getActionBtnB() &&
+ dComIfGp_getAttention()->getActionBtnB()->mType == 3)
{
ret = TRUE;
}
}
- for (int i = 0; i < dComIfGp_getAttention().GetLockonCount(); i++) {
- if (dComIfGp_getAttention().LockonTarget(i) == i_actor_p &&
- dComIfGp_getAttention().getActionBtnB() &&
- dComIfGp_getAttention().getActionBtnB()->mType == 1)
+ for (int i = 0; i < dComIfGp_getAttention()->GetLockonCount(); i++) {
+ if (dComIfGp_getAttention()->LockonTarget(i) == i_actor_p &&
+ dComIfGp_getAttention()->getActionBtnB() &&
+ dComIfGp_getAttention()->getActionBtnB()->mType == 1)
{
ret = TRUE;
}
diff --git a/src/d/actor/d_a_npc_fairy_seirei.cpp b/src/d/actor/d_a_npc_fairy_seirei.cpp
index 06349e39a7..1275fc05c1 100644
--- a/src/d/actor/d_a_npc_fairy_seirei.cpp
+++ b/src/d/actor/d_a_npc_fairy_seirei.cpp
@@ -163,10 +163,10 @@ void daNpc_FairySeirei_c::reset() {
void daNpc_FairySeirei_c::setParam() {
selectAction();
srchActors();
- dComIfGp_getAttention().getDistTable(0x28).mDistMax = daNpc_FairySeirei_Param_c::m[36];
- dComIfGp_getAttention().getDistTable(0x28).mDistMaxRelease = daNpc_FairySeirei_Param_c::m[36];
- dComIfGp_getAttention().getDistTable(0x27).mDistMax = daNpc_FairySeirei_Param_c::m[36];
- dComIfGp_getAttention().getDistTable(0x27).mDistMaxRelease = daNpc_FairySeirei_Param_c::m[36];
+ dComIfGp_getAttention()->getDistTable(0x28).mDistMax = daNpc_FairySeirei_Param_c::m[36];
+ dComIfGp_getAttention()->getDistTable(0x28).mDistMaxRelease = daNpc_FairySeirei_Param_c::m[36];
+ dComIfGp_getAttention()->getDistTable(0x27).mDistMax = daNpc_FairySeirei_Param_c::m[36];
+ dComIfGp_getAttention()->getDistTable(0x27).mDistMaxRelease = daNpc_FairySeirei_Param_c::m[36];
attention_info.distances[fopAc_attn_LOCK_e] = 0x27;
attention_info.distances[fopAc_attn_TALK_e] = 0x27;
attention_info.distances[fopAc_attn_SPEAK_e] = 0x27;
diff --git a/src/d/actor/d_a_npc_ks.cpp b/src/d/actor/d_a_npc_ks.cpp
index 4342ffb55f..9c2a704427 100644
--- a/src/d/actor/d_a_npc_ks.cpp
+++ b/src/d/actor/d_a_npc_ks.cpp
@@ -1625,7 +1625,7 @@ static int npc_ks_demo_02(npc_ks_class* i_this) {
a_this->attention_info.distances[3] = 2;
}
- if (i_this == (npc_ks_class*)dComIfGp_getAttention().LockonTarget(0) && i_this->mTimers[2] == 0
+ if (i_this == (npc_ks_class*)dComIfGp_getAttention()->LockonTarget(0) && i_this->mTimers[2] == 0
&& mDoCPd_c::getTrigA(PAD_1) != 0) {
i_this->mMode = 17;
anm_init(i_this, 25, 2.0f, 0, 1.0f);
diff --git a/src/d/actor/d_a_npc_seib.cpp b/src/d/actor/d_a_npc_seib.cpp
index 1bc4e08590..6b139284a6 100644
--- a/src/d/actor/d_a_npc_seib.cpp
+++ b/src/d/actor/d_a_npc_seib.cpp
@@ -252,10 +252,10 @@ void daNpc_seiB_c::setParam() {
selectAction();
srchActors();
- dComIfGp_getAttention().getDistTable(0x28).mDistMax = mpParam->m.mDist;
- dComIfGp_getAttention().getDistTable(0x28).mDistMaxRelease = mpParam->m.mDist;
- dComIfGp_getAttention().getDistTable(0x27).mDistMax = mpParam->m.mDist;
- dComIfGp_getAttention().getDistTable(0x27).mDistMaxRelease = mpParam->m.mDist;
+ dComIfGp_getAttention()->getDistTable(0x28).mDistMax = mpParam->m.mDist;
+ dComIfGp_getAttention()->getDistTable(0x28).mDistMaxRelease = mpParam->m.mDist;
+ dComIfGp_getAttention()->getDistTable(0x27).mDistMax = mpParam->m.mDist;
+ dComIfGp_getAttention()->getDistTable(0x27).mDistMaxRelease = mpParam->m.mDist;
attention_info.distances[0] = 39;
attention_info.distances[1] = 39;
diff --git a/src/d/actor/d_a_npc_seic.cpp b/src/d/actor/d_a_npc_seic.cpp
index b76a99890c..ef0cb1034f 100644
--- a/src/d/actor/d_a_npc_seic.cpp
+++ b/src/d/actor/d_a_npc_seic.cpp
@@ -273,11 +273,11 @@ void daNpc_seiC_c::setParam() {
selectAction();
srchActors();
- dComIfGp_getAttention().getDistTable(0x28).mDistMax = daNpc_seiC_Param_c::m.field_0x90;
- dComIfGp_getAttention().getDistTable(0x28).mDistMaxRelease = daNpc_seiC_Param_c::m.field_0x90;
+ dComIfGp_getAttention()->getDistTable(0x28).mDistMax = daNpc_seiC_Param_c::m.field_0x90;
+ dComIfGp_getAttention()->getDistTable(0x28).mDistMaxRelease = daNpc_seiC_Param_c::m.field_0x90;
- dComIfGp_getAttention().getDistTable(0x27).mDistMax = daNpc_seiC_Param_c::m.field_0x90;
- dComIfGp_getAttention().getDistTable(0x27).mDistMaxRelease = daNpc_seiC_Param_c::m.field_0x90;
+ dComIfGp_getAttention()->getDistTable(0x27).mDistMax = daNpc_seiC_Param_c::m.field_0x90;
+ dComIfGp_getAttention()->getDistTable(0x27).mDistMaxRelease = daNpc_seiC_Param_c::m.field_0x90;
attention_info.distances[0] = 39;
attention_info.distances[1] = 39;
diff --git a/src/d/actor/d_a_npc_seid.cpp b/src/d/actor/d_a_npc_seid.cpp
index 825e6b0796..845c837893 100644
--- a/src/d/actor/d_a_npc_seid.cpp
+++ b/src/d/actor/d_a_npc_seid.cpp
@@ -273,10 +273,10 @@ void daNpc_seiD_c::setParam() {
selectAction();
srchActors();
- dComIfGp_getAttention().getDistTable(0x28).mDistMax = daNpc_seiD_Param_c::m.field_0x90;
- dComIfGp_getAttention().getDistTable(0x28).mDistMaxRelease = daNpc_seiD_Param_c::m.field_0x90;
- dComIfGp_getAttention().getDistTable(0x27).mDistMax = daNpc_seiD_Param_c::m.field_0x90;
- dComIfGp_getAttention().getDistTable(0x27).mDistMaxRelease = daNpc_seiD_Param_c::m.field_0x90;
+ dComIfGp_getAttention()->getDistTable(0x28).mDistMax = daNpc_seiD_Param_c::m.field_0x90;
+ dComIfGp_getAttention()->getDistTable(0x28).mDistMaxRelease = daNpc_seiD_Param_c::m.field_0x90;
+ dComIfGp_getAttention()->getDistTable(0x27).mDistMax = daNpc_seiD_Param_c::m.field_0x90;
+ dComIfGp_getAttention()->getDistTable(0x27).mDistMaxRelease = daNpc_seiD_Param_c::m.field_0x90;
attention_info.distances[0] = 39;
attention_info.distances[1] = 39;
diff --git a/src/d/actor/d_a_npc_uri.cpp b/src/d/actor/d_a_npc_uri.cpp
index af8c132716..1f58e5a295 100644
--- a/src/d/actor/d_a_npc_uri.cpp
+++ b/src/d/actor/d_a_npc_uri.cpp
@@ -1486,8 +1486,8 @@ int daNpc_Uri_c::wait(void* param_0) {
if (!daNpcT_chkEvtBit(0x1e) && !daNpcT_chkEvtBit(0x92)) {
cXyz acStack_70 = getAttnPos(daPy_getPlayerActorClass());
int dist_index = attention_info.distances[1];
- f32 fVar2 = dComIfGp_getAttention().getDistTable(dist_index).mLowerY * -1.0f;
- f32 fVar3 = dComIfGp_getAttention().getDistTable(dist_index).mUpperY * -1.0f;
+ f32 fVar2 = dComIfGp_getAttention()->getDistTable(dist_index).mLowerY * -1.0f;
+ f32 fVar3 = dComIfGp_getAttention()->getDistTable(dist_index).mUpperY * -1.0f;
if (chkPointInArea(acStack_70, attention_info.position, 200.0f, fVar2, fVar3,
0))
{
diff --git a/src/d/actor/d_a_obj_gra_rock.cpp b/src/d/actor/d_a_obj_gra_rock.cpp
index d18bfa3682..540d1cfe80 100644
--- a/src/d/actor/d_a_obj_gra_rock.cpp
+++ b/src/d/actor/d_a_obj_gra_rock.cpp
@@ -36,9 +36,9 @@ void daObjGraRock_c::setAttnPos() {
attention_info.position += current.pos;
attention_info.distances[0] = daNpcF_getDistTableIdx(8, 5);
attention_info.flags = 1;
- dAttention_c& attention = dComIfGp_getAttention();
- if (attention.LockonTruth()) {
- if (attention.LockonTarget(0) == this && field_0x9bc == 0 && field_0x9b6 == 0) {
+ dAttention_c* attention = dComIfGp_getAttention();
+ if (attention->LockonTruth()) {
+ if (attention->LockonTarget(0) == this && field_0x9bc == 0 && field_0x9b6 == 0) {
field_0x9b6 = 90;
field_0x9bd = 3;
s16 sVar4 = cLib_getRndValue(0, 0x10000);
diff --git a/src/d/actor/d_a_obj_master_sword.cpp b/src/d/actor/d_a_obj_master_sword.cpp
index 2335734dff..362db86751 100644
--- a/src/d/actor/d_a_obj_master_sword.cpp
+++ b/src/d/actor/d_a_obj_master_sword.cpp
@@ -37,10 +37,10 @@ void daObjMasterSword_c::initWait() {
*/
void daObjMasterSword_c::executeWait() {
if (daPy_getPlayerActorClass()->checkPriActorOwn(this)) {
- for (int i = 0; i < dComIfGp_getAttention().GetActionCount(); i++) {
- if (dComIfGp_getAttention().ActionTarget(i) == this) {
- if (dComIfGp_getAttention().getActionBtnB() != NULL &&
- dComIfGp_getAttention().getActionBtnB()->mType == 4)
+ for (int i = 0; i < dComIfGp_getAttention()->GetActionCount(); i++) {
+ if (dComIfGp_getAttention()->ActionTarget(i) == this) {
+ if (dComIfGp_getAttention()->getActionBtnB() != NULL &&
+ dComIfGp_getAttention()->getActionBtnB()->mType == 4)
{
dComIfGp_setDoStatusForce(8, 0);
}
diff --git a/src/d/actor/d_a_obj_sakuita_rope.cpp b/src/d/actor/d_a_obj_sakuita_rope.cpp
index e46763af36..a77c1e20de 100644
--- a/src/d/actor/d_a_obj_sakuita_rope.cpp
+++ b/src/d/actor/d_a_obj_sakuita_rope.cpp
@@ -4,401 +4,410 @@
*/
#include "d/actor/d_a_obj_sakuita_rope.h"
-#include "dol2asm.h"
-
-
-//
-// Forward References:
-//
-
-extern "C" void setModelData__9Sakuita_cFP12J3DModelData();
-extern "C" void create__9Sakuita_cFP4cXyzsSc();
-extern "C" void execute__9Sakuita_cFP4cXyzs();
-extern "C" void draw__9Sakuita_cFv();
-extern "C" void initBaseMtx__9Sakuita_cFv();
-extern "C" void setBaseMtx__9Sakuita_cFv();
-extern "C" void setPlatePos__9Sakuita_cFP4cXyz();
-extern "C" void calcAngle__9Sakuita_cFv();
-extern "C" void create_init__14daObjItaRope_cFv();
-extern "C" void initBaseMtx__14daObjItaRope_cFv();
-extern "C" void setBaseMtx__14daObjItaRope_cFv();
-extern "C" void setNormalRopePos__14daObjItaRope_cFv();
-extern "C" static void createSolidHeap__FP10fopAc_ac_c();
-extern "C" void __dt__9Sakuita_cFv();
-extern "C" void __ct__9Sakuita_cFv();
-extern "C" void __dt__10RopeWork_cFv();
-extern "C" void __ct__10RopeWork_cFv();
-extern "C" static void daObjItaRope_Draw__FP14daObjItaRope_c();
-extern "C" static void daObjItaRope_Execute__FP14daObjItaRope_c();
-extern "C" static bool daObjItaRope_IsDelete__FP14daObjItaRope_c();
-extern "C" static void daObjItaRope_Delete__FP14daObjItaRope_c();
-extern "C" static void daObjItaRope_Create__FP10fopAc_ac_c();
-extern "C" void __dt__10dCcD_GSttsFv();
-extern "C" void __dt__10cCcD_GSttsFv();
-extern "C" u8 const M_attr__14daObjItaRope_c[20];
-extern "C" extern char const* const d_a_obj_sakuita_rope__stringBase0;
-
-//
-// External References:
-//
-
-extern "C" void mDoMtx_ZXYrotM__FPA4_fsss();
-extern "C" void mDoMtx_XrotM__FPA4_fs();
-extern "C" void mDoMtx_YrotM__FPA4_fs();
-extern "C" void mDoMtx_ZrotM__FPA4_fs();
-extern "C" void init__19mDoExt_3DlineMat1_cFUsUsP7ResTIMGi();
-extern "C" void update__19mDoExt_3DlineMat1_cFiR8_GXColorP12dKy_tevstr_c();
-extern "C" void setMat__26mDoExt_3DlineMatSortPacketFP18mDoExt_3DlineMat_c();
-extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
-extern "C" void __ct__10fopAc_ac_cFv();
-extern "C" void __dt__10fopAc_ac_cFv();
-extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl();
-extern "C" void fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff();
-extern "C" void addSimpleModel__14dComIfG_play_cFP12J3DModelDataiUc();
-extern "C" void removeSimpleModel__14dComIfG_play_cFP12J3DModelDatai();
-extern "C" void entrySimpleModel__14dComIfG_play_cFP8J3DModeli();
-extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc();
-extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc();
-extern "C" void getRes__14dRes_control_cFPCcPCcP11dRes_info_ci();
-extern "C" void dPath_GetRoomPath__Fii();
-extern "C" void dKyw_get_AllWind_vecpow__FP4cXyz();
-extern "C" void __ct__10dCcD_GSttsFv();
-extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c();
-extern "C" void __pl__4cXyzCFRC3Vec();
-extern "C" void __mi__4cXyzCFRC3Vec();
-extern "C" void __ml__4cXyzCFf();
-extern "C" void normalizeZP__4cXyzFv();
-extern "C" void cM_atan2s__Fff();
-extern "C" void cM_rnd__Fv();
-extern "C" void cLib_chaseF__FPfff();
-extern "C" void cLib_targetAngleY__FPC3VecPC3Vec();
-extern "C" void* __nwa__FUl();
-extern "C" void __dl__FPv();
-extern "C" void __destroy_new_array();
-extern "C" void __construct_new_array();
-extern "C" void _savegpr_26();
-extern "C" void _savegpr_27();
-extern "C" void _savegpr_28();
-extern "C" void _savegpr_29();
-extern "C" void _restgpr_26();
-extern "C" void _restgpr_27();
-extern "C" void _restgpr_28();
-extern "C" void _restgpr_29();
-extern "C" extern void* __vt__19mDoExt_3DlineMat1_c[5];
-extern "C" extern void* __vt__9dCcD_Stts[11];
-extern "C" extern void* __vt__9cCcD_Stts[8];
-extern "C" u8 now__14mDoMtx_stack_c[48];
-extern "C" extern u8 g_dComIfG_gameInfo[122384];
-extern "C" u8 sincosTable___5JMath[65536];
-
-//
-// Declarations:
-//
+#include "d/d_com_inf_game.h"
+#include "d/d_path.h"
+
+#ifdef DEBUG
+#include "d\d_a_obj.h"
+
+class daObjItaRope_Hio_c : public JORReflexible {
+public:
+ daObjItaRope_Hio_c();
+ void genMessage(JORMContext*);
+ void ct();
+ void dt();
+
+ void default_set() {
+ mAttr = daObjItaRope_c::M_attr;
+ }
+
+ /* 0x4 */ int field_0x4;
+ /* 0x8 */ daObjItaRope_Attr_c mAttr;
+};
+
+daObjItaRope_Hio_c::daObjItaRope_Hio_c() {
+ field_0x4 = 0;
+ default_set();
+}
+
+void daObjItaRope_Hio_c::ct() {
+ if (field_0x4++ == 0) {
+ daObj::HioVarious_c::init(this, "牧場のカラカラ板用紐");
+ }
+}
+
+void daObjItaRope_Hio_c::dt() {
+ if (--field_0x4 == 0) {
+ daObj::HioVarious_c::clean(this);
+ }
+}
+
+void daObjItaRope_Hio_c::genMessage(JORMContext* ctx) {
+ ctx->genLabel("§ 牧場のカラカラ板用紐パラメータ設定 §\n", 0, 0, NULL, 0xffff, 0xffff, 0x200,
+ 0x18);
+ ctx->genSlider("重力", &mAttr.mGravity, -200.0f, 0.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
+ ctx->genSlider("紐の重さ", &mAttr.mStringWeight, 0, 0xff, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
+ ctx->genSlider("windRate", &mAttr.mWindRate, 0.0f, 1.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
+ ctx->genSlider("speedRate", &mAttr.mSpeedRate, 0.0f, 1.0f, 0, NULL, 0xffff, 0xffff, 0x200,
+ 0x18);
+ ctx->genSlider("offsetRate", &mAttr.mOffsetRate, -5.0f, 1.0f, 0, NULL, 0xffff, 0xffff, 0x200,
+ 0x18);
+}
+
+#endif
/* 80CC5238-80CC527C 000078 0044+00 1/1 0/0 0/0 .text setModelData__9Sakuita_cFP12J3DModelData */
-void Sakuita_c::setModelData(J3DModelData* param_0) {
- // NONMATCHING
+int Sakuita_c::setModelData(J3DModelData* i_modelData) {
+ mModel = mDoExt_J3DModel__create(i_modelData, 0x20000, 0x11000084);
+ JUT_ASSERT(140, mModel != 0);
+ return 1;
}
-/* ############################################################################################## */
/* 80CC68F0-80CC6904 000000 0014+00 4/4 0/0 0/0 .rodata M_attr__14daObjItaRope_c */
-SECTION_RODATA u8 const daObjItaRope_c::M_attr[20] = {
- 0xC0, 0xA0, 0x00, 0x00, 0x3E, 0x4C, 0xCC, 0xCD, 0x3F, 0x00,
- 0x00, 0x00, 0x3F, 0x4C, 0xCC, 0xCD, 0x00, 0x00, 0x00, 0x00,
+daObjItaRope_Attr_c const daObjItaRope_c::M_attr = {
+ -5.0f, 0.2f, 0.5f, 0.8f, 0.0f,
};
-COMPILER_STRIP_GATE(0x80CC68F0, &daObjItaRope_c::M_attr);
-
-/* 80CC6904-80CC6908 000014 0004+00 1/2 0/0 0/0 .rodata @3634 */
-SECTION_RODATA static f32 const lit_3634 = 75.0f;
-COMPILER_STRIP_GATE(0x80CC6904, &lit_3634);
-
-/* 80CC6908-80CC690C 000018 0004+00 1/4 0/0 0/0 .rodata @3635 */
-SECTION_RODATA static u8 const lit_3635[4] = {
- 0x00,
- 0x00,
- 0x00,
- 0x00,
-};
-COMPILER_STRIP_GATE(0x80CC6908, &lit_3635);
/* 80CC527C-80CC5314 0000BC 0098+00 1/1 0/0 0/0 .text create__9Sakuita_cFP4cXyzsSc */
-void Sakuita_c::create(cXyz* param_0, s16 param_1, s8 param_2) {
- // NONMATCHING
+void Sakuita_c::create(cXyz* param_1, s16 param_2, s8 param_3) {
+ field_0x04 = param_1;
+ field_0x36 = param_2;
+ field_0x3a = param_3;
+ field_0x08.set(*param_1);
+ field_0x08.y -= 75.0f;
+ field_0x14 = field_0x08;
+ field_0x20.zero();
+ calcAngle();
+ initBaseMtx();
}
/* 80CC5314-80CC5354 000154 0040+00 1/1 0/0 0/0 .text execute__9Sakuita_cFP4cXyzs */
-void Sakuita_c::execute(cXyz* param_0, s16 param_1) {
- // NONMATCHING
+void Sakuita_c::execute(cXyz* param_1, s16 param_2) {
+ field_0x36 = param_2;
+ setPlatePos(param_1);
+ calcAngle();
+ setBaseMtx();
}
/* 80CC5354-80CC5390 000194 003C+00 1/1 0/0 0/0 .text draw__9Sakuita_cFv */
void Sakuita_c::draw() {
- // NONMATCHING
+ dComIfGp_entrySimpleModel(mModel, field_0x3a);
}
/* 80CC5390-80CC53B0 0001D0 0020+00 1/1 0/0 0/0 .text initBaseMtx__9Sakuita_cFv */
void Sakuita_c::initBaseMtx() {
- // NONMATCHING
+ setBaseMtx();
}
-/* ############################################################################################## */
-/* 80CC690C-80CC6910 00001C 0004+00 1/1 0/0 0/0 .rodata @3669 */
-SECTION_RODATA static f32 const lit_3669 = 6.0f;
-COMPILER_STRIP_GATE(0x80CC690C, &lit_3669);
-
/* 80CC53B0-80CC5444 0001F0 0094+00 2/2 0/0 0/0 .text setBaseMtx__9Sakuita_cFv */
void Sakuita_c::setBaseMtx() {
- // NONMATCHING
+ mDoMtx_stack_c::transS(field_0x04->x, field_0x04->y - 6.0f, field_0x04->z);
+ mDoMtx_stack_c::ZrotM(mRotation.z);
+ mDoMtx_stack_c::XrotM(mRotation.x);
+ mDoMtx_stack_c::YrotM(mRotation.y);
+ mModel->setBaseTRMtx(mDoMtx_stack_c::get());
}
-/* ############################################################################################## */
-/* 80CC6910-80CC6918 000020 0008+00 0/2 0/0 0/0 .rodata @3746 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_3746[8] = {
- 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80CC6910, &lit_3746);
-#pragma pop
-
-/* 80CC6918-80CC6920 000028 0008+00 0/2 0/0 0/0 .rodata @3747 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_3747[8] = {
- 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80CC6918, &lit_3747);
-#pragma pop
-
-/* 80CC6920-80CC6928 000030 0008+00 0/2 0/0 0/0 .rodata @3748 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_3748[8] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80CC6920, &lit_3748);
-#pragma pop
-
-/* 80CC6928-80CC692C 000038 0004+00 0/2 0/0 0/0 .rodata @3749 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3749 = 1.0f / 10.0f;
-COMPILER_STRIP_GATE(0x80CC6928, &lit_3749);
-#pragma pop
-
-/* 80CC692C-80CC6930 00003C 0004+00 0/1 0/0 0/0 .rodata @3750 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3750 = -60.0f;
-COMPILER_STRIP_GATE(0x80CC692C, &lit_3750);
-#pragma pop
-
-/* 80CC6930-80CC6934 000040 0004+00 0/1 0/0 0/0 .rodata @3751 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3751 = 15.0f;
-COMPILER_STRIP_GATE(0x80CC6930, &lit_3751);
-#pragma pop
-
-/* 80CC6934-80CC6938 000044 0004+00 0/1 0/0 0/0 .rodata @3752 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3752 = 100.0f;
-COMPILER_STRIP_GATE(0x80CC6934, &lit_3752);
-#pragma pop
-
-/* 80CC6938-80CC693C 000048 0004+00 0/1 0/0 0/0 .rodata @3753 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3753 = 2.0f / 5.0f;
-COMPILER_STRIP_GATE(0x80CC6938, &lit_3753);
-#pragma pop
-
-/* 80CC693C-80CC6940 00004C 0004+00 0/1 0/0 0/0 .rodata @3754 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3754 = 8192.0f;
-COMPILER_STRIP_GATE(0x80CC693C, &lit_3754);
-#pragma pop
-
-/* 80CC6940-80CC6944 000050 0004+00 0/1 0/0 0/0 .rodata @3755 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3755 = 900.0f;
-COMPILER_STRIP_GATE(0x80CC6940, &lit_3755);
-#pragma pop
-
-/* 80CC6944-80CC6948 000054 0004+00 0/2 0/0 0/0 .rodata @3756 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3756 = -75.0f;
-COMPILER_STRIP_GATE(0x80CC6944, &lit_3756);
-#pragma pop
-
-/* 80CC6948-80CC6950 000058 0004+04 0/2 0/0 0/0 .rodata @3757 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3757[1 + 1 /* padding */] = {
- 0.5f,
- /* padding */
- 0.0f,
-};
-COMPILER_STRIP_GATE(0x80CC6948, &lit_3757);
-#pragma pop
-
/* 80CC5444-80CC5720 000284 02DC+00 1/1 0/0 0/0 .text setPlatePos__9Sakuita_cFP4cXyz */
-void Sakuita_c::setPlatePos(cXyz* param_0) {
- // NONMATCHING
+void Sakuita_c::setPlatePos(cXyz* param_1) {
+ cXyz acStack_34(*param_1);
+ f32 dVar5 = param_1->abs();
+ if (cM_rnd() < 0.1f) {
+ acStack_34 *= -60.0f;
+ } else {
+ acStack_34.zero();
+ }
+ cXyz cStack_40 = *field_0x04 - field_0x08;
+ cStack_40.y += 15.0f;
+ field_0x38 += 0x1400;
+ if (cLib_chaseF(&field_0x2c, 0.0f, 100.0f) != 0) {
+ field_0x38 = 0;
+ }
+ cStack_40 += field_0x20;
+ if (cM_rnd() < 0.4f) {
+ cStack_40 += acStack_34;
+ if (field_0x2c < 8192.0f) {
+ field_0x2c += dVar5 * 900.0f;
+ }
+ }
+ cStack_40.normalizeZP();
+ field_0x08 = *field_0x04 + cStack_40 * -75.0f;
+ field_0x20 = (field_0x20 + (field_0x14 - field_0x08)) * 0.5f;
+ field_0x14 = field_0x08;
}
-/* ############################################################################################## */
-/* 80CC6950-80CC6958 000060 0008+00 1/2 0/0 0/0 .rodata @3776 */
-SECTION_RODATA static u8 const lit_3776[8] = {
- 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80CC6950, &lit_3776);
-
/* 80CC5720-80CC57E4 000560 00C4+00 2/2 0/0 0/0 .text calcAngle__9Sakuita_cFv */
void Sakuita_c::calcAngle() {
- // NONMATCHING
+ cXyz local_28 = *field_0x04 - field_0x08;
+ mRotation.x = cM_atan2s(local_28.z, local_28.y);
+ mRotation.y = field_0x36 + field_0x2c * cM_scos(field_0x38);
+ mRotation.z = -cM_atan2s(local_28.x, local_28.y);
}
-/* ############################################################################################## */
-/* 80CC6958-80CC695C 000068 0004+00 0/1 0/0 0/0 .rodata @3953 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3953 = 1.0f;
-COMPILER_STRIP_GATE(0x80CC6958, &lit_3953);
-#pragma pop
-
-/* 80CC695C-80CC6960 00006C 0004+00 0/1 0/0 0/0 .rodata @3954 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3954 = 3.0f;
-COMPILER_STRIP_GATE(0x80CC695C, &lit_3954);
-#pragma pop
-
-/* 80CC6960-80CC6964 000070 0004+00 0/1 0/0 0/0 .rodata @3955 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3955 = -140.0f;
-COMPILER_STRIP_GATE(0x80CC6960, &lit_3955);
-#pragma pop
-
-/* 80CC6964-80CC6968 000074 0004+00 0/1 0/0 0/0 .rodata @3956 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3956 = 20.0f;
-COMPILER_STRIP_GATE(0x80CC6964, &lit_3956);
-#pragma pop
-
-/* 80CC6970-80CC6970 000080 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
-#pragma push
-#pragma force_active on
-SECTION_DEAD static char const* const stringBase_80CC6970 = "A_Sakuita";
-SECTION_DEAD static char const* const stringBase_80CC697A = "A_Sakuita.bmd";
-#pragma pop
-
/* 80CC6998-80CC699C -00001 0004+00 4/4 0/0 0/0 .data l_arcName */
-SECTION_DATA static void* l_arcName = (void*)&d_a_obj_sakuita_rope__stringBase0;
+static char* l_arcName = "A_Sakuita";
+
+#ifdef DEBUG
+daObjItaRope_Hio_c M_hio;
+#endif
+
+inline daObjItaRope_c::~daObjItaRope_c() {
+#ifdef DEBUG
+ M_hio.dt();
+#endif
+ delete [] mRopes;
+ delete [] mSakuitas;
+
+ if (field_0x636 != 0) {
+ J3DModelData* modelData = (J3DModelData*) dComIfG_getObjectRes(l_arcName, "A_Sakuita.bmd");
+ JUT_ASSERT(320, modelData != 0);
+ dComIfGp_removeSimpleModel(modelData, fopAcM_GetRoomNo(this));
+ }
+ dComIfG_resDelete(&mPhase, l_arcName);
+}
/* 80CC57E4-80CC5E48 000624 0664+00 1/1 0/0 0/0 .text create_init__14daObjItaRope_cFv */
void daObjItaRope_c::create_init() {
- // NONMATCHING
+ gravity = attr().mGravity;
+ JUT_ASSERT(359, getPathID() != 0xff);
+ dPath* path = dPath_GetRoomPath(getPathID(), fopAcM_GetRoomNo(this));
+ JUT_ASSERT(361, path != 0 && (path->m_num == 2));
+ cXyz cStack_60(path->m_points[0].m_position);
+ cXyz cStack_6c(path->m_points[1].m_position);
+ current.pos = (cStack_60 + cStack_6c) * 0.5f;
+ field_0x620 = cStack_6c - cStack_60;
+ if (fabsf(field_0x620.x) > fabsf(field_0x620.z)) {
+ field_0x62c = 1.0f / field_0x620.x;
+ field_0x634 = 1;
+ } else {
+ field_0x62c = 1.0f / field_0x620.z;
+ field_0x634 = 0;
+ }
+ shape_angle.y = cM_atan2s(field_0x620.x, field_0x620.z);
+ shape_angle.x = cM_atan2s(-field_0x620.y, field_0x620.absXZ());
+ f32 zCull = field_0x620.absXZ() * 0.5f + 3.0f;
+ fopAcM_setCullSizeBox(this, -75.0f, -140.0f, -zCull, 75.0f, 20.0f, zCull);
+ f32 dVar16 = field_0x620.abs();
+ field_0x630 = dVar16 * (1.0f / (field_0x635 - 1));
+ cXyz cStack_78 = field_0x620 * (field_0x630 / dVar16);
+ cXyz* pPos = mLineMat.getPos(0);
+ RopeWork_c* pRope = mRopes;
+ *pPos = cStack_60;
+ int i = 1;
+ pPos++;
+ for (; i < field_0x635 - 1; i++, pPos++, pRope++) {
+ pPos[0] = pPos[-1] + cStack_78;
+ pRope->field_0x0c = pPos[0];
+ pRope->field_0x00.zero();
+ }
+ *pPos = cStack_6c;
+ setNormalRopePos();
+ initBaseMtx();
+ J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, "A_Sakuita.bmd");
+ JUT_ASSERT(420, modelData != 0);
+ if (dComIfGp_addSimpleModel(modelData, fopAcM_GetRoomNo(this), 0) == -1) {
+ OS_REPORT("\x1b[43;30mカラカラ板:シンプルモデル登録失敗しました。\n\x1b[m");
+ }
+ field_0x636 = 1;
+ pPos = mLineMat.getPos( 0) + 1;
+ Sakuita_c* pSakuita = mSakuitas;
+ for (int i = 0; i < field_0x635 - 2; i++, pPos++, pSakuita++) {
+ s16 sVar12 = cLib_targetAngleY(pPos, pPos + 1) + 0x4000;
+ pSakuita->create(pPos, sVar12, fopAcM_GetRoomNo(this));
+ }
+
+ #ifdef DEBUG
+ M_hio.ct();
+ #endif
}
/* 80CC5E48-80CC5E7C 000C88 0034+00 1/1 0/0 0/0 .text initBaseMtx__14daObjItaRope_cFv */
void daObjItaRope_c::initBaseMtx() {
- // NONMATCHING
+ setBaseMtx();
+ fopAcM_SetMtx(this, mMtx);
}
/* 80CC5E7C-80CC5ECC 000CBC 0050+00 1/1 0/0 0/0 .text setBaseMtx__14daObjItaRope_cFv */
void daObjItaRope_c::setBaseMtx() {
- // NONMATCHING
+ mDoMtx_trans(mMtx, current.pos.x, current.pos.y, current.pos.z);
+ mDoMtx_ZXYrotM(mMtx, shape_angle.x, shape_angle.y, 0);
}
-/* ############################################################################################## */
-/* 80CC6968-80CC696C 000078 0004+00 0/1 0/0 0/0 .rodata @4094 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4094 = 3.0f / 5.0f;
-COMPILER_STRIP_GATE(0x80CC6968, &lit_4094);
-#pragma pop
-
/* 80CC5ECC-80CC622C 000D0C 0360+00 2/2 0/0 0/0 .text setNormalRopePos__14daObjItaRope_cFv */
void daObjItaRope_c::setNormalRopePos() {
- // NONMATCHING
+ cXyz* pPos = mLineMat.getPos(0) + 1;
+ RopeWork_c* pRope = mRopes;
+ int i;
+ cXyz cStack_34;
+ cXyz cStack_40 = dKyw_get_AllWind_vecpow(&current.pos);
+ if (cM_rnd() < 0.1f) {
+ cStack_40 *= field_0x630 * attr().mWindRate;
+ } else {
+ cStack_40.zero();
+ }
+
+ for (i = 1; i < field_0x635 - 1; i++, pPos++, pRope++) {
+ pPos[0].y = pRope->field_0x0c.y;
+ cStack_34 = pPos[0] - pPos[-1];
+ cStack_34.y += gravity;
+ cStack_34 += pRope->field_0x00;
+ if (cM_rnd() < 0.6f) {
+ cStack_34 += cStack_40;
+ }
+ cStack_34.normalizeZP();
+ pPos[0] = pPos[-1] + (cStack_34 * field_0x630);
+ }
+
+ pPos = mLineMat.getPos(0) + field_0x635 - 2;
+ pRope = mRopes + field_0x635 - 3;
+ for (i = field_0x635 - 2; i > 0; i--, pPos--, pRope--) {
+ cStack_34 = pPos[0] - pPos[1];
+ cStack_34.y += gravity;
+ cStack_34 += pRope->field_0x00;
+ cStack_34.normalizeZP();
+ pPos[0] = pPos[1] + (cStack_34 * field_0x630);
+ }
+
+ pPos = mLineMat.getPos(0) + 1;
+ pRope = mRopes;
+ cXyz* startPos = mLineMat.getPos(0);
+ for (i = 1; i < field_0x635 - 1; i++, pPos++, pRope++) {
+ f32 dVar10 = startPos->y + (field_0x620.y * getStartRate(pPos));
+ pRope->field_0x00 = (*pPos - pRope->field_0x0c) * attr().mSpeedRate;
+ pRope->field_0x0c = *pPos;
+ pPos->y += (dVar10 - pPos->y) * attr().mOffsetRate;
+ }
+ mLineMat.getPos(0);
}
-/* ############################################################################################## */
-/* 80CC696C-80CC6970 00007C 0004+00 1/1 0/0 0/0 .rodata @4149 */
-SECTION_RODATA static f32 const lit_4149 = 2.0f;
-COMPILER_STRIP_GATE(0x80CC696C, &lit_4149);
-
-/* 80CC6970-80CC6970 000080 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
-#pragma push
-#pragma force_active on
-SECTION_DEAD static char const* const stringBase_80CC6988 = "Obj_Rope.bti";
-#pragma pop
+inline int daObjItaRope_c::createHeap() {
+ mRopes = NULL;
+ mRopes = new RopeWork_c[field_0x635 - 2];
+ if (mRopes == NULL) {
+ return 0;
+ }
+
+ mSakuitas = NULL;
+ mSakuitas = new Sakuita_c[field_0x635 - 2];
+ if (mSakuitas == NULL) {
+ return 0;
+ }
+
+ if (mLineMat.init(1, field_0x635, (ResTIMG*)dComIfG_getObjectRes(l_arcName, "Obj_Rope.bti"), 1) == 0) {
+ return 0;
+ }
+
+ f32* pSize = mLineMat.getSize(0);
+ for (int i = 0; i < field_0x635; i++, pSize++) {
+ *pSize = 2.0f;
+ }
+
+ J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, "A_Sakuita.bmd");
+ JUT_ASSERT(585, modelData != 0);
+
+ Sakuita_c* pSakuita = mSakuitas;
+ for (int i = 0; i < field_0x635 - 2; i++, pSakuita++) {
+ pSakuita->setModelData(modelData);
+ }
+ return 1;
+}
/* 80CC622C-80CC63E4 00106C 01B8+00 1/1 0/0 0/0 .text createSolidHeap__FP10fopAc_ac_c */
-static void createSolidHeap(fopAc_ac_c* param_0) {
- // NONMATCHING
+static int createSolidHeap(fopAc_ac_c* i_actor) {
+ daObjItaRope_c* i_this = static_cast<daObjItaRope_c*>(i_actor);
+ return i_this->createHeap();
}
/* 80CC63E4-80CC6420 001224 003C+00 2/2 0/0 0/0 .text __dt__9Sakuita_cFv */
-Sakuita_c::~Sakuita_c() {
- // NONMATCHING
-}
+Sakuita_c::~Sakuita_c() {}
/* 80CC6420-80CC6424 001260 0004+00 1/1 0/0 0/0 .text __ct__9Sakuita_cFv */
-Sakuita_c::Sakuita_c() {
- /* empty function */
-}
+Sakuita_c::Sakuita_c() {}
/* 80CC6424-80CC6460 001264 003C+00 2/2 0/0 0/0 .text __dt__10RopeWork_cFv */
-RopeWork_c::~RopeWork_c() {
- // NONMATCHING
-}
+RopeWork_c::~RopeWork_c() {}
/* 80CC6460-80CC6464 0012A0 0004+00 1/1 0/0 0/0 .text __ct__10RopeWork_cFv */
-RopeWork_c::RopeWork_c() {
- /* empty function */
+RopeWork_c::RopeWork_c() {}
+
+int daObjItaRope_c::draw() {
+ static GXColor l_color = {0x14, 0xF, 0x0, 0xFF};
+ g_env_light.settingTevStruct(0x10, &current.pos, &tevStr);
+ mLineMat.update(field_0x635, l_color, &tevStr);
+ dComIfGd_set3DlineMat(&mLineMat);
+ Sakuita_c* pSakuita = mSakuitas;
+ for (int i = 0; i < field_0x635 - 2; i++, pSakuita++) {
+ pSakuita->draw();
+ }
+ return 1;
}
-/* ############################################################################################## */
-/* 80CC699C-80CC69A0 000004 0004+00 1/1 0/0 0/0 .data
- * l_color$localstatic3$draw__14daObjItaRope_cFv */
-SECTION_DATA static u8 data_80CC699C[4] = {
- 0x14,
- 0x0F,
- 0x00,
- 0xFF,
-};
-
/* 80CC6464-80CC652C 0012A4 00C8+00 1/0 0/0 0/0 .text daObjItaRope_Draw__FP14daObjItaRope_c */
-static void daObjItaRope_Draw(daObjItaRope_c* param_0) {
- // NONMATCHING
+static int daObjItaRope_Draw(daObjItaRope_c* i_this) {
+ return i_this->draw();
+}
+
+int daObjItaRope_c::execute() {
+ gravity = attr().mGravity;
+ setNormalRopePos();
+ cXyz cStack_2c = dKyw_get_AllWind_vecpow(&current.pos);
+ cXyz* pPos = mLineMat.getPos(0) + 1;
+ Sakuita_c* pSakuita = mSakuitas;
+ for (int i = 1; i < field_0x635 - 1; i++, pPos++, pSakuita++) {
+ cXyz cStack_38 = pPos[1] - pPos[0];
+ s16 angle = cLib_targetAngleY(pPos, pPos + 1) + 0x4000;
+ pSakuita->execute(&cStack_2c, angle);
+ }
+ return 1;
}
/* 80CC652C-80CC6610 00136C 00E4+00 1/0 0/0 0/0 .text daObjItaRope_Execute__FP14daObjItaRope_c */
-static void daObjItaRope_Execute(daObjItaRope_c* param_0) {
- // NONMATCHING
+static int daObjItaRope_Execute(daObjItaRope_c* i_this) {
+ return i_this->execute();
}
/* 80CC6610-80CC6618 001450 0008+00 1/0 0/0 0/0 .text daObjItaRope_IsDelete__FP14daObjItaRope_c */
-static bool daObjItaRope_IsDelete(daObjItaRope_c* param_0) {
- return true;
+static int daObjItaRope_IsDelete(daObjItaRope_c* i_this) {
+ return 1;
+}
+
+/* 80CC6618-80CC6738 001458 0120+00 1/0 0/0 0/0 .text daObjItaRope_Delete__FP14daObjItaRope_c */
+static int daObjItaRope_Delete(daObjItaRope_c* i_this) {
+ fopAcM_RegisterDeleteID(i_this, "Obj_ItaRope");
+ i_this->~daObjItaRope_c();
+ return 1;
+}
+
+int daObjItaRope_c::create() {
+ fopAcM_SetupActor(this, daObjItaRope_c);
+ int rv = dComIfG_resLoad(&mPhase, l_arcName);
+ if (rv == cPhs_COMPLEATE_e) {
+ field_0x635 = getJointNum() + 2;
+ if (field_0x635 < 3) {
+ field_0x635 = 3;
+ }
+ if (fopAcM_entrySolidHeap(this, createSolidHeap, 0x1420) == 0) {
+ return cPhs_ERROR_e;
+ }
+ create_init();
+ }
+ return rv;
+}
+
+/* 80CC6738-80CC6844 001578 010C+00 1/0 0/0 0/0 .text daObjItaRope_Create__FP10fopAc_ac_c
+ */
+static int daObjItaRope_Create(fopAc_ac_c* i_actor) {
+ fopAcM_RegisterCreateID(daObjItaRope_c, i_actor, "Obj_ItaRope");
+ return static_cast<daObjItaRope_c*>(i_actor)->create();
}
-/* ############################################################################################## */
/* 80CC69A0-80CC69C0 -00001 0020+00 1/0 0/0 0/0 .data l_daObjItaRope_Method */
static actor_method_class l_daObjItaRope_Method = {
- (process_method_func)daObjItaRope_Create__FP10fopAc_ac_c,
- (process_method_func)daObjItaRope_Delete__FP14daObjItaRope_c,
- (process_method_func)daObjItaRope_Execute__FP14daObjItaRope_c,
- (process_method_func)daObjItaRope_IsDelete__FP14daObjItaRope_c,
- (process_method_func)daObjItaRope_Draw__FP14daObjItaRope_c,
+ (process_method_func)daObjItaRope_Create,
+ (process_method_func)daObjItaRope_Delete,
+ (process_method_func)daObjItaRope_Execute,
+ (process_method_func)daObjItaRope_IsDelete,
+ (process_method_func)daObjItaRope_Draw,
};
/* 80CC69C0-80CC69F0 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_ItaRope */
@@ -419,46 +428,4 @@ extern actor_process_profile_definition g_profile_Obj_ItaRope = {
fopAc_CULLBOX_CUSTOM_e, // cullType
};
-/* 80CC69F0-80CC6A04 000058 0014+00 1/1 0/0 0/0 .data __vt__18mDoExt_3DlineMat_c */
-SECTION_DATA extern void* __vt__18mDoExt_3DlineMat_c[5] = {
- (void*)NULL /* RTTI */, (void*)NULL, (void*)NULL, (void*)NULL, (void*)NULL,
-};
-
-/* 80CC6A04-80CC6A10 00006C 000C+00 3/3 0/0 0/0 .data __vt__10cCcD_GStts */
-SECTION_DATA extern void* __vt__10cCcD_GStts[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__10cCcD_GSttsFv,
-};
-
-/* 80CC6A10-80CC6A1C 000078 000C+00 2/2 0/0 0/0 .data __vt__10dCcD_GStts */
-SECTION_DATA extern void* __vt__10dCcD_GStts[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__10dCcD_GSttsFv,
-};
-
-/* 80CC6618-80CC6738 001458 0120+00 1/0 0/0 0/0 .text daObjItaRope_Delete__FP14daObjItaRope_c */
-static void daObjItaRope_Delete(daObjItaRope_c* param_0) {
- // NONMATCHING
-}
-
-/* 80CC6738-80CC6844 001578 010C+00 1/0 0/0 0/0 .text daObjItaRope_Create__FP10fopAc_ac_c
- */
-static void daObjItaRope_Create(fopAc_ac_c* param_0) {
- // NONMATCHING
-}
-
-/* 80CC6844-80CC68A0 001684 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */
-// dCcD_GStts::~dCcD_GStts() {
-extern "C" void __dt__10dCcD_GSttsFv() {
- // NONMATCHING
-}
-
-/* 80CC68A0-80CC68E8 0016E0 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */
-// cCcD_GStts::~cCcD_GStts() {
-extern "C" void __dt__10cCcD_GSttsFv() {
- // NONMATCHING
-}
-
/* 80CC6970-80CC6970 000080 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
diff --git a/src/d/actor/d_a_tag_Lv8Gate.cpp b/src/d/actor/d_a_tag_Lv8Gate.cpp
index 72fabec1a1..e1d3cb9c51 100644
--- a/src/d/actor/d_a_tag_Lv8Gate.cpp
+++ b/src/d/actor/d_a_tag_Lv8Gate.cpp
@@ -173,10 +173,10 @@ int daTagLv8Gate_c::execute() {
}
} else {
if (daPy_getPlayerActorClass()->checkPriActorOwn(this)) {
- for (int i = 0; i < dComIfGp_getAttention().GetActionCount(); i++) {
- if (dComIfGp_getAttention().ActionTarget(i) == this) {
- if (dComIfGp_getAttention().getActionBtnB() != NULL &&
- dComIfGp_getAttention().getActionBtnB()->mType == 4)
+ for (int i = 0; i < dComIfGp_getAttention()->GetActionCount(); i++) {
+ if (dComIfGp_getAttention()->ActionTarget(i) == this) {
+ if (dComIfGp_getAttention()->getActionBtnB() != NULL &&
+ dComIfGp_getAttention()->getActionBtnB()->mType == 4)
{
dComIfGp_setDoStatusForce(7, 0);
}