Sakuita rope Matching (#2470)

* Change dComIfGp_getAttention to return a pointer

* d_a_obj_sakuita_rope Matching
This commit is contained in:
hatal175 2025-06-02 06:36:19 +03:00 committed by GitHub
parent 8e91607e55
commit 588b20679d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
32 changed files with 561 additions and 534 deletions

View File

@ -13,16 +13,16 @@ create_init__14daObjItaRope_cFv = .text:0x00000624; // type:function size:0x664
initBaseMtx__14daObjItaRope_cFv = .text:0x00000C88; // type:function size:0x34 scope:global
setBaseMtx__14daObjItaRope_cFv = .text:0x00000CBC; // type:function size:0x50 scope:global
setNormalRopePos__14daObjItaRope_cFv = .text:0x00000D0C; // type:function size:0x360 scope:global
createSolidHeap__FP10fopAc_ac_c = .text:0x0000106C; // type:function size:0x1B8 scope:global
createSolidHeap__FP10fopAc_ac_c = .text:0x0000106C; // type:function size:0x1B8 scope:local
__dt__9Sakuita_cFv = .text:0x00001224; // type:function size:0x3C scope:global
__ct__9Sakuita_cFv = .text:0x00001260; // type:function size:0x4 scope:global
__dt__10RopeWork_cFv = .text:0x00001264; // type:function size:0x3C scope:global
__ct__10RopeWork_cFv = .text:0x000012A0; // type:function size:0x4 scope:global
daObjItaRope_Draw__FP14daObjItaRope_c = .text:0x000012A4; // type:function size:0xC8 scope:global
daObjItaRope_Execute__FP14daObjItaRope_c = .text:0x0000136C; // type:function size:0xE4 scope:global
daObjItaRope_IsDelete__FP14daObjItaRope_c = .text:0x00001450; // type:function size:0x8 scope:global
daObjItaRope_Delete__FP14daObjItaRope_c = .text:0x00001458; // type:function size:0x120 scope:global
daObjItaRope_Create__FP10fopAc_ac_c = .text:0x00001578; // type:function size:0x10C scope:global
daObjItaRope_Draw__FP14daObjItaRope_c = .text:0x000012A4; // type:function size:0xC8 scope:local
daObjItaRope_Execute__FP14daObjItaRope_c = .text:0x0000136C; // type:function size:0xE4 scope:local
daObjItaRope_IsDelete__FP14daObjItaRope_c = .text:0x00001450; // type:function size:0x8 scope:local
daObjItaRope_Delete__FP14daObjItaRope_c = .text:0x00001458; // type:function size:0x120 scope:local
daObjItaRope_Create__FP10fopAc_ac_c = .text:0x00001578; // type:function size:0x10C scope:local
__dt__10dCcD_GSttsFv = .text:0x00001684; // type:function size:0x5C scope:global
__dt__10cCcD_GSttsFv = .text:0x000016E0; // type:function size:0x48 scope:global
_ctors = .ctors:0x00000000; // type:label scope:global
@ -52,9 +52,9 @@ M_attr__14daObjItaRope_c = .rodata:0x00000000; // type:object size:0x14 scope:gl
@4094 = .rodata:0x00000078; // type:object size:0x4 scope:local
@4149 = .rodata:0x0000007C; // type:object size:0x4 scope:local align:4 data:float
@stringBase0 = .rodata:0x00000080; // type:object size:0x25 scope:local data:string_table
l_arcName = .data:0x00000000; // type:object size:0x4 scope:global
l_arcName = .data:0x00000000; // type:object size:0x4 scope:local
l_color$localstatic3$draw__14daObjItaRope_cFv = .data:0x00000004; // type:object size:0x4 scope:local
l_daObjItaRope_Method = .data:0x00000008; // type:object size:0x20 scope:global
l_daObjItaRope_Method = .data:0x00000008; // type:object size:0x20 scope:local
g_profile_Obj_ItaRope = .data:0x00000028; // type:object size:0x30 scope:global
__vt__18mDoExt_3DlineMat_c = .data:0x00000058; // type:object size:0x14 scope:global
__vt__10cCcD_GStts = .data:0x0000006C; // type:object size:0xC scope:global

View File

@ -2075,7 +2075,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_obj_rw"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_saidan"),
ActorRel(NonMatching, "d_a_obj_sakuita"),
ActorRel(NonMatching, "d_a_obj_sakuita_rope"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_sakuita_rope"),
ActorRel(NonMatching, "d_a_obj_scannon"),
ActorRel(NonMatching, "d_a_obj_scannon_crs"),
ActorRel(NonMatching, "d_a_obj_scannon_ten"),

View File

@ -1,8 +1,52 @@
#ifndef D_A_OBJ_SAKUITA_ROPE_H
#define D_A_OBJ_SAKUITA_ROPE_H
#include "d/d_cc_d.h"
#include "f_op/f_op_actor_mng.h"
struct daObjItaRope_Attr_c {
/* 0x00 */ f32 mGravity;
/* 0x04 */ f32 mWindRate;
/* 0x08 */ f32 mSpeedRate;
/* 0x0C */ f32 mOffsetRate;
/* 0x10 */ u8 mStringWeight;
};
class Sakuita_c {
public:
/* 80CC5238 */ int setModelData(J3DModelData*);
/* 80CC527C */ void create(cXyz*, s16, s8);
/* 80CC5314 */ void execute(cXyz*, s16);
/* 80CC5354 */ void draw();
/* 80CC5390 */ void initBaseMtx();
/* 80CC53B0 */ void setBaseMtx();
/* 80CC5444 */ void setPlatePos(cXyz*);
/* 80CC5720 */ void calcAngle();
/* 80CC63E4 */ ~Sakuita_c();
/* 80CC6420 */ Sakuita_c();
/* 0x00 */ J3DModel* mModel;
/* 0x04 */ cXyz* field_0x04;
/* 0x08 */ cXyz field_0x08;
/* 0x14 */ cXyz field_0x14;
/* 0x20 */ cXyz field_0x20;
/* 0x2C */ f32 field_0x2c;
/* 0x30 */ csXyz mRotation;
/* 0x36 */ s16 field_0x36;
/* 0x38 */ s16 field_0x38;
/* 0x3A */ s8 field_0x3a;
};
class RopeWork_c {
public:
/* 80CC6424 */ ~RopeWork_c();
/* 80CC6460 */ RopeWork_c();
/* 0x00 */ cXyz field_0x00;
/* 0x0C */ cXyz field_0x0c;
/* 0x18 */ int field_0x18;
};
/**
* @ingroup actors-objects
* @class daObjItaRope_c
@ -18,34 +62,41 @@ public:
/* 80CC5E7C */ void setBaseMtx();
/* 80CC5ECC */ void setNormalRopePos();
static u8 const M_attr[20];
inline ~daObjItaRope_c();
inline int createHeap();
inline int draw();
inline int execute();
inline int create();
daObjItaRope_Attr_c const& attr() const { return M_attr; }
u8 getJointNum() { return fopAcM_GetParam(this) & 0xff; }
int getPathID() { return (fopAcM_GetParam(this) >> 8) & 0xff; }
cXyz* getRopeStartPos() { return mLineMat.getPos(0);}
f32 getStartRate(const cXyz* pos) {
if (field_0x634 != 0) {
return field_0x62c * (pos->x - getRopeStartPos()->x);
}
return field_0x62c * (pos->z - getRopeStartPos()->z);
}
static daObjItaRope_Attr_c const M_attr;
private:
/* 0x568 */ u8 field_0x568[0x638 - 0x568];
/* 0x570 */ mDoExt_3DlineMat1_c mLineMat;
/* 0x5A4 */ request_of_phase_process_class mPhase;
/* 0x5AC */ Mtx mMtx;
/* 0x5AC */ dCcD_Stts mStts;
/* 0x618 */ RopeWork_c* mRopes;
/* 0x61C */ Sakuita_c* mSakuitas;
/* 0x620 */ cXyz field_0x620;
/* 0x62C */ f32 field_0x62c;
/* 0x630 */ f32 field_0x630;
/* 0x634 */ u8 field_0x634;
/* 0x635 */ u8 field_0x635;
/* 0x636 */ u8 field_0x636;
};
STATIC_ASSERT(sizeof(daObjItaRope_c) == 0x638);
class Sakuita_c {
public:
/* 80CC5238 */ void setModelData(J3DModelData*);
/* 80CC527C */ void create(cXyz*, s16, s8);
/* 80CC5314 */ void execute(cXyz*, s16);
/* 80CC5354 */ void draw();
/* 80CC5390 */ void initBaseMtx();
/* 80CC53B0 */ void setBaseMtx();
/* 80CC5444 */ void setPlatePos(cXyz*);
/* 80CC5720 */ void calcAngle();
/* 80CC63E4 */ ~Sakuita_c();
/* 80CC6420 */ Sakuita_c();
};
class RopeWork_c {
public:
/* 80CC6424 */ ~RopeWork_c();
/* 80CC6460 */ RopeWork_c();
};
#endif /* D_A_OBJ_SAKUITA_ROPE_H */

View File

@ -21,6 +21,15 @@ int PrmAbstract(const fopAc_ac_c* i_actor, T i_prmA, T i_prmB) {
u32 param = fopAcM_GetParam(i_actor);
return ((1 << i_prmA) - 1) & (param >> i_prmB);
}
#ifdef DEBUG
class HioVarious_c {
public:
static void init(JORReflexible*, const char*);
static void clean(JORReflexible*);
};
#endif
}; // namespace daObj
#endif /* D_A_D_A_OBJ_H */

View File

@ -10,7 +10,7 @@
#include "d/d_stage.h"
#include "f_op/f_op_actor.h"
dAttention_c& dComIfGp_getAttention();
dAttention_c* dComIfGp_getAttention();
struct dCamMapToolData {
dCamMapToolData() { Clr(); }
@ -419,9 +419,9 @@ public:
}
void Att() {
dAttention_c& attn = dComIfGp_getAttention();
mpLockonTarget = attn.LockonTruth() ? attn.LockonTarget(0) : NULL;
attn.LockSoundOn();
dAttention_c* attn = dComIfGp_getAttention();
mpLockonTarget = attn->LockonTruth() ? attn->LockonTarget(0) : NULL;
attn->LockSoundOn();
}
void SetWindow(f32 param_0, f32 param_1) {

View File

@ -290,7 +290,7 @@ public:
fopAc_ac_c* getPlayer(int idx) { return (fopAc_ac_c*)mPlayer[idx * 2]; }
dPa_control_c* getParticle() { return mParticle; }
dEvent_manager_c& getEvtManager() { return mEvtManager; }
dAttention_c& getAttention() { return mAttention; }
dAttention_c* getAttention() { return &mAttention; }
dStage_startStage_c* getStartStage() { return &mStartStage; }
void setCurrentGrafPort(J2DOrthoGraph* i_graf) { mCurrentGrafPort = i_graf; }
@ -1792,8 +1792,8 @@ inline void dComIfGs_removeZone(int i_zoneNo) {
g_dComIfG_gameInfo.info.removeZone(i_zoneNo);
}
inline void dComIfGp_addSimpleModel(J3DModelData* i_modelData, int roomNo, u8 i_drawBG) {
g_dComIfG_gameInfo.play.addSimpleModel(i_modelData, roomNo, i_drawBG);
inline int dComIfGp_addSimpleModel(J3DModelData* i_modelData, int roomNo, u8 i_drawBG) {
return g_dComIfG_gameInfo.play.addSimpleModel(i_modelData, roomNo, i_drawBG);
}
inline void dComIfGp_removeSimpleModel(J3DModelData* i_modelData, int roomNo) {
@ -2157,40 +2157,40 @@ inline dEvent_manager_c* dComIfGp_getPEvtManager() {
return &g_dComIfG_gameInfo.play.getEvtManager();
}
inline dAttention_c& dComIfGp_getAttention() {
inline dAttention_c* dComIfGp_getAttention() {
return g_dComIfG_gameInfo.play.getAttention();
}
inline u8 dComIfGp_att_getCatchChgItem() {
return dComIfGp_getAttention().getCatchChgItem();
return dComIfGp_getAttention()->getCatchChgItem();
}
inline fopAc_ac_c* dComIfGp_att_getCatghTarget() {
return dComIfGp_getAttention().getCatghTarget();
return dComIfGp_getAttention()->getCatghTarget();
}
inline fopAc_ac_c* dComIfGp_att_getZHint() {
return dComIfGp_getAttention().getZHintTarget();
return dComIfGp_getAttention()->getZHintTarget();
}
inline int dComIfGp_att_ZHintRequest(fopAc_ac_c* param_1, int param_2) {
return dComIfGp_getAttention().ZHintRequest(param_1, param_2);
return dComIfGp_getAttention()->ZHintRequest(param_1, param_2);
}
inline void dComIfGp_att_LookRequest(fopAc_ac_c* param_0, f32 i_horizontalDist, f32 i_upDist,
f32 i_downDist, s16 i_angle, int param_5) {
dComIfGp_getAttention().LookRequest(param_0, i_horizontalDist, i_upDist, i_downDist, i_angle,
dComIfGp_getAttention()->LookRequest(param_0, i_horizontalDist, i_upDist, i_downDist, i_angle,
param_5);
}
inline void dComIfGp_att_CatchRequest(fopAc_ac_c* param_0, u8 param_1, f32 i_horizontalDist,
f32 i_upDist, f32 i_downDist, s16 i_angle, int param_5) {
dComIfGp_getAttention().CatchRequest(param_0, param_1, i_horizontalDist, i_upDist, i_downDist,
dComIfGp_getAttention()->CatchRequest(param_0, param_1, i_horizontalDist, i_upDist, i_downDist,
i_angle, param_5);
}
inline fopAc_ac_c* dComIfGp_att_getLookTarget() {
return dComIfGp_getAttention().getLookTarget();
return dComIfGp_getAttention()->getLookTarget();
}
inline J2DGrafContext* dComIfGp_getCurrentGrafPort() {

View File

@ -4694,7 +4694,7 @@ int daAlink_c::create() {
return cPhs_ERROR_e;
}
mAttention = &dComIfGp_getAttention();
mAttention = dComIfGp_getAttention();
field_0x317c = dComIfGp_getPlayerCameraID(0);
playerInit();

View File

@ -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;

View File

@ -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);

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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 */

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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))
{

View File

@ -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);

View File

@ -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);
}

View File

@ -4,401 +4,410 @@
*/
#include "d/actor/d_a_obj_sakuita_rope.h"
#include "dol2asm.h"
#include "d/d_com_inf_game.h"
#include "d/d_path.h"
#ifdef DEBUG
#include "d\d_a_obj.h"
//
// Forward References:
//
class daObjItaRope_Hio_c : public JORReflexible {
public:
daObjItaRope_Hio_c();
void genMessage(JORMContext*);
void ct();
void dt();
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;
void default_set() {
mAttr = daObjItaRope_c::M_attr;
}
//
// External References:
//
/* 0x4 */ int field_0x4;
/* 0x8 */ daObjItaRope_Attr_c mAttr;
};
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:
//
/* 80CC5238-80CC527C 000078 0044+00 1/1 0/0 0/0 .text setModelData__9Sakuita_cFP12J3DModelData */
void Sakuita_c::setModelData(J3DModelData* param_0) {
// NONMATCHING
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 */
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);
inline int daObjItaRope_c::createHeap() {
mRopes = NULL;
mRopes = new RopeWork_c[field_0x635 - 2];
if (mRopes == NULL) {
return 0;
}
/* 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
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 */

View File

@ -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);
}

View File

@ -1486,7 +1486,7 @@ bool dCamera_c::checkForceLockTarget() {
if (mLockOnActorID != -1) {
mpLockOnActor = GetForceLockOnActor();
if (mpLockOnActor != NULL) {
if (dComIfGp_getAttention().Lockon() || mForceLockTimer > mCamSetup.ForceLockOffTimer()
if (dComIfGp_getAttention()->Lockon() || mForceLockTimer > mCamSetup.ForceLockOffTimer()
|| cXyz(positionOf(mpLockOnActor) - positionOf(mpPlayerActor)).abs() > mCamSetup.ForceLockOffDist())
{
ret = false;
@ -1972,7 +1972,7 @@ void dCamera_c::setRoomMapToolData(dCamMapToolData* i_toolData, s32 param_1, s32
/* 801635E4-80163C38 15DF24 0654+00 1/1 0/0 0/0 .text nextMode__9dCamera_cFl */
s32 dCamera_c::nextMode(s32 i_curMode) {
dAttention_c& attn = dComIfGp_getAttention();
dAttention_c* attn = dComIfGp_getAttention();
s32 next_mode = i_curMode;
cXyz player_pos = positionOf(mpPlayerActor);
daAlink_c* link = daAlink_getAlinkActorClass();
@ -1985,14 +1985,14 @@ s32 dCamera_c::nextMode(s32 i_curMode) {
}
if (field_0x1ac != 11 && mCamTypeData[mCurType].field_0x18[mIsWolf][field_0x1ac] >= 0) {
next_mode = field_0x1ac;
} else if (check_owner_action(mPadID, 0x200000) && !attn.Lockon()) {
} else if (check_owner_action(mPadID, 0x200000) && !attn->Lockon()) {
if (check_owner_action(mPadID, 0x25040)) {
next_mode = 7;
} else {
next_mode = 0;
}
} else if (link->checkGoatThrow() && dComIfGoat_GetThrow() != NULL) {
dComIfGp_getAttention().LockSoundOff();
dComIfGp_getAttention()->LockSoundOff();
mpLockonTarget = dComIfGoat_GetThrow();
if (fopAcM_GetName(mpLockonTarget) == PROC_E_GOB) {
if (link->checkGoatThrowAfter()) {
@ -2006,7 +2006,7 @@ s32 dCamera_c::nextMode(s32 i_curMode) {
next_mode = 2;
}
} else if (link->checkGoronSideMove() || link->getSumouCameraMode()) {
dComIfGp_getAttention().LockSoundOff();
dComIfGp_getAttention()->LockSoundOff();
next_mode = 1;
} else if (link->checkFastShotTime()) {
field_0x610 = 1;
@ -2019,19 +2019,19 @@ s32 dCamera_c::nextMode(s32 i_curMode) {
next_mode = 6;
} else if (check_owner_action(mPadID, 6) && mpLockonTarget != NULL) {
next_mode = 5;
} else if (attn.LockonTruth() && mpLockonTarget != NULL
} else if (attn->LockonTruth() && mpLockonTarget != NULL
&& !check_owner_action(mPadID, 0xC000000)) {
next_mode = 2;
} else if (check_owner_action(mPadID, 0x12000)) {
next_mode = 4;
} else if (check_owner_action(mPadID, 0x25040) && !attn.Lockon()) {
} else if (check_owner_action(mPadID, 0x25040) && !attn->Lockon()) {
next_mode = 7;
} else if ((check_owner_action(mPadID, 0x80480) && !attn.Lockon())
} else if ((check_owner_action(mPadID, 0x80480) && !attn->Lockon())
|| link->checkHawkWait()) {
next_mode = 8;
} else if (check_owner_action(mPadID, 0x4000000) || link->checkChainBlockPushPull()) {
next_mode = 10;
} else if (attn.Lockon()) {
} else if (attn->Lockon()) {
next_mode = 1;
} else if ((check_owner_action(mPadID, 0x400000) || link->checkIronBallThrowMode()
|| link->checkBoomerangAtnKeep())
@ -2077,7 +2077,7 @@ s32 dCamera_c::nextMode(s32 i_curMode) {
switch (next_mode) {
case 4:
dComIfGp_getAttention().LockSoundOff();
dComIfGp_getAttention()->LockSoundOff();
break;
}
@ -2170,7 +2170,7 @@ s32 dCamera_c::nextType(s32 i_curType) {
}
if (check_owner_action(mPadID, 0x200000) && ChangeModeOK(4)
&& !dComIfGp_getAttention().Lockon()) {
&& !dComIfGp_getAttention()->Lockon()) {
next_type = specialType[CAM_TYPE_SCOPE];
} else if (iVar14 != 0xff && !(field_0x860.field_0x3a & 0x10)) {
next_type = iVar14;
@ -2254,7 +2254,7 @@ s32 dCamera_c::nextType(s32 i_curType) {
}
if (!ChangeModeOK(2)) {
dComIfGp_getAttention().LockSoundOff();
dComIfGp_getAttention()->LockSoundOff();
}
if (dComIfGp_evmng_cameraPlay() || chkFlag(0x20000000)) {
@ -2262,12 +2262,12 @@ s32 dCamera_c::nextType(s32 i_curType) {
mEventData.field_0xc = next_type;
}
next_type = specialType[CAM_TYPE_EVENT];
dComIfGp_getAttention().LockSoundOff();
dComIfGp_getAttention()->LockSoundOff();
} else {
clrFlag(0x40000000);
if (dComIfGp_getEvent().runCheck()) {
setComStat(4);
dComIfGp_getAttention().LockSoundOff();
dComIfGp_getAttention()->LockSoundOff();
}
}
@ -2408,11 +2408,11 @@ fopAc_ac_c* dCamera_c::getParamTargetActor(s32 param_0) {
switch (*(u32*)&mCamTypeData[param_0].name[16]) {
case '@LOC':
return dComIfGp_getAttention().LockonTarget(0);
return dComIfGp_getAttention()->LockonTarget(0);
case '@ACT':
return dComIfGp_getAttention().ActionTarget(0);
return dComIfGp_getAttention()->ActionTarget(0);
case '@CHK':
return dComIfGp_getAttention().CheckObjectTarget(0);
return dComIfGp_getAttention()->CheckObjectTarget(0);
case '@CPY':
return player->getCopyRodCameraActor();
}
@ -3595,8 +3595,8 @@ bool dCamera_c::chaseCamera(s32 param_0) {
daAlink_c* player = (daAlink_c*)mpPlayerActor;
daMidna_c* midna = daPy_py_c::getMidnaActor();
if (dComIfGp_getAttention().GetCheckObjectCount() != 0) {
field_0x188 = dComIfGp_getAttention().CheckObjectTarget(0);
if (dComIfGp_getAttention()->GetCheckObjectCount() != 0) {
field_0x188 = dComIfGp_getAttention()->CheckObjectTarget(0);
setFlag(2);
}
@ -3868,7 +3868,7 @@ bool dCamera_c::chaseCamera(s32 param_0) {
}
}
dAttention_c& attention = dComIfGp_getAttention();
dAttention_c* attention = dComIfGp_getAttention();
if (field_0x940 == 1 && !mCamParam.Flag(param_0, 0x20)) {
field_0x1b0 = cSAngle::_0;
@ -4228,7 +4228,7 @@ bool dCamera_c::chaseCamera(s32 param_0) {
if (player->checkThrowDamage()) {
mWork.chase.field_0x91 = true;
fopAc_ac_c* target = dComIfGp_getAttention().LockonTarget(0);
fopAc_ac_c* target = dComIfGp_getAttention()->LockonTarget(0);
if (target != NULL && fopAcM_GetName(target) == PROC_E_HZ) {
setFlag(0x2000);
field_0x188 = target;
@ -4329,7 +4329,7 @@ bool dCamera_c::chaseCamera(s32 param_0) {
} else if (mWork.chase.field_0x8c < mCamSetup.WaitRollTimer()) {
mWork.chase.field_0x8c++;
} else {
fopAc_ac_c* target = attention.LockonTarget(0);
fopAc_ac_c* target = attention->LockonTarget(0);
if (target != NULL) {
cXyz delta = positionOf(target) - positionOf(mpPlayerActor);
cSAngle ang = -field_0x5c.mDirection.U();
@ -4646,7 +4646,7 @@ bool dCamera_c::lockonCamera(s32 param_0) {
f32 val11 = mCamParam.Val(param_0, 11);
f32 val20 = mCamParam.Val(param_0, 20);
f32 val21 = mCamParam.Val(param_0, 21);
dAttention_c& attention = dComIfGp_getAttention();
dAttention_c* attention = dComIfGp_getAttention();
daAlink_c* player = (daAlink_c*)mpPlayerActor;
if (dComIfGp_evmng_cameraPlay()) {
@ -4721,9 +4721,9 @@ bool dCamera_c::lockonCamera(s32 param_0) {
if (player->checkCutHeadProc() && mWork.lockon.field_0x3c != fpcM_ERROR_PROCESS_ID_e) {
mpLockonTarget = fopAcM_SearchByID(mWork.lockon.field_0x3c);
if (mpLockonTarget != NULL) {
dComIfGp_getAttention().keepLock(30);
dComIfGp_getAttention()->keepLock(30);
} else {
dComIfGp_getAttention().keepLock(0);
dComIfGp_getAttention()->keepLock(0);
}
}
@ -4748,7 +4748,7 @@ bool dCamera_c::lockonCamera(s32 param_0) {
if (player->checkCopyRodThrowAfter()) {
mWork.lockon.field_0x28 = true;
} else if (!attention.LockonTruth() && check_owner_action(mPadID, 0x400000)) {
} else if (!attention->LockonTruth() && check_owner_action(mPadID, 0x400000)) {
mWork.lockon.field_0x28 = true;
} else {
mWork.lockon.field_0x28 = false;
@ -4807,14 +4807,14 @@ bool dCamera_c::lockonCamera(s32 param_0) {
bVar1 = true;
}
if (dComIfGp_getAttention().LockEdge()) {
if (dComIfGp_getAttention()->LockEdge()) {
mCurCamStyleTimer = 0;
field_0x160 = 0;
mWork.lockon.field_0x2a = false;
}
cSGlobe globe;
f32 lockon_release_distance = attention.LockonReleaseDistanse();
f32 lockon_release_distance = attention->LockonReleaseDistanse();
f32 fVar42;
if (mpLockonTarget != NULL) {
@ -5149,8 +5149,8 @@ bool dCamera_c::lockonCamera(s32 param_0) {
if (mpLockonTarget != NULL) {
setFlag(0x2000);
field_0x188 = mpLockonTarget;
if (attention.GetLockonCount() >= 2 && mCamParam.Flag(param_0, 0x1000)) {
field_0x18c = attention.LockonTarget(1);
if (attention->GetLockonCount() >= 2 && mCamParam.Flag(param_0, 0x1000)) {
field_0x18c = attention->LockonTarget(1);
}
}
@ -8561,7 +8561,7 @@ static int init_phase2(camera_class* i_this) {
i_this->mCamera.field_0xb0c = 1;
i_this->field_0x238 = 0;
dComIfGp_getAttention().Init(player, PAD_1);
dComIfGp_getAttention()->Init(player, PAD_1);
return cPhs_NEXT_e;
}

View File

@ -925,16 +925,16 @@ u16 dMsgFlow_c::query007(mesg_flow_node_branch* i_flowNode_p, fopAc_ac_c* i_spea
s16 attention_angle = sp10.U() - fopAcM_GetShapeAngle_p(daPy_getPlayerActorClass())->y;
u8 speak_dist = i_speaker_p->attention_info.distances[fopAc_attn_SPEAK_e];
f32 max_dist = dComIfGp_getAttention().getDistTable(speak_dist).mDistMaxRelease;
f32 max_dist = dComIfGp_getAttention()->getDistTable(speak_dist).mDistMaxRelease;
if (prm0 != 0) {
max_dist = prm0;
}
ret = dComIfGp_getAttention().checkDistance(
ret = dComIfGp_getAttention()->checkDistance(
&player_attention_pos, attention_angle, &i_speaker_p->attention_info.position, max_dist,
dComIfGp_getAttention().getDistTable(speak_dist).mDistanceAdjust,
dComIfGp_getAttention().getDistTable(speak_dist).mUpperY,
dComIfGp_getAttention().getDistTable(speak_dist).mLowerY);
dComIfGp_getAttention()->getDistTable(speak_dist).mDistanceAdjust,
dComIfGp_getAttention()->getDistTable(speak_dist).mUpperY,
dComIfGp_getAttention()->getDistTable(speak_dist).mLowerY);
if (param_2 != 0) {
// "Conversation Distance Branch"

View File

@ -170,7 +170,7 @@ static int dScnPly_Draw(dScnPly_c* i_this) {
if (!dComIfGp_isPauseFlag()) {
dEyeHL_mng_c::update();
dComIfG_Ccsp()->Draw();
dComIfGp_getAttention().Draw();
dComIfGp_getAttention()->Draw();
}
return 1;
@ -198,7 +198,7 @@ static int dScnPly_Execute(dScnPly_c* i_this) {
if (!dComIfGp_isPauseFlag()) {
dDemo_c::update();
dComIfGp_getEvent().Step();
dComIfGp_getAttention().Run();
dComIfGp_getAttention()->Run();
}
return 1;
}
@ -242,7 +242,7 @@ static int dScnPly_Delete(dScnPly_c* i_this) {
dMpath_c::remove();
dTres_c::remove();
dComIfGp_getAttention().~dAttention_c();
dComIfGp_getAttention()->~dAttention_c();
dComIfGp_getVibration().Remove();
dComIfG_Bgsp().Dt();
@ -641,7 +641,7 @@ static int phase_4(dScnPly_c* i_this) {
mDoGph_gInf_c::setTickRate((OS_BUS_CLOCK / 4) / 30);
g_envHIO.field_0x4 = -1;
g_save_bit_HIO.field_0x4 = -1;
new (&dComIfGp_getAttention()) dAttention_c(dComIfGp_getPlayer(0), 0);
new (dComIfGp_getAttention()) dAttention_c(dComIfGp_getPlayer(0), 0);
dComIfGp_getVibration().Init();
daYkgr_c::init();

View File

@ -347,10 +347,10 @@ static void drawDepth2(view_class* param_0, view_port_class* param_1, int param_
if (dCam_getBody()->Mode() != 4 && dCam_getBody()->Mode() != 7) {
camera_class* temp_r4 = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0));
dAttention_c& local_12c = dComIfGp_getAttention();
dAttention_c* attention = dComIfGp_getAttention();
f32 temp_f31 = 60.0f / (temp_r4 ? fopCamM_GetFovy(temp_r4) : 48.0f);
if (local_12c.LockonTruth()) {
if (attention->LockonTruth()) {
fopAc_ac_c* atn_actor =
fopAcM_SearchByID(daPy_getLinkPlayerActorClass()->getAtnActorID());