mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-19 21:33:07 -04:00
d-a-obj-swheavy (#704)
* start d-a-obj-swheavy * mostly finish d-a-obj-swheavy * renames and 100% * mark matching * address PR comments
This commit is contained in:
+1
-1
@@ -1488,7 +1488,7 @@ config.libs = [
|
||||
ActorRel(NonMatching, "d_a_obj_stair"),
|
||||
ActorRel(NonMatching, "d_a_obj_swflat"),
|
||||
ActorRel(Equivalent, "d_a_obj_swhammer"), # weak func order
|
||||
ActorRel(NonMatching, "d_a_obj_swheavy"),
|
||||
ActorRel(Matching, "d_a_obj_swheavy"),
|
||||
ActorRel(NonMatching, "d_a_obj_swlight"),
|
||||
ActorRel(NonMatching, "d_a_oq"),
|
||||
ActorRel(Equivalent, "d_a_pedestal", extra_cflags=['-pragma "nosyminline on"']), # weak func order
|
||||
|
||||
@@ -1,27 +1,54 @@
|
||||
#ifndef D_A_OBJ_SWHEAVY_H
|
||||
#define D_A_OBJ_SWHEAVY_H
|
||||
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "d/d_a_obj.h"
|
||||
#include "d/d_bg_w.h"
|
||||
|
||||
namespace daObjSwheavy {
|
||||
struct Attr_c {
|
||||
/* 0x00 */ u8 m00[0x4];
|
||||
/* 0x04 */ int mFlags;
|
||||
/* 0x08 */ float mVSpring;
|
||||
/* 0x0C */ float mVSpeedDecay;
|
||||
/* 0x10 */ float mPushVSpeed0;
|
||||
/* 0x14 */ short m14;
|
||||
/* 0x16 */ short mMiniPushDelay;
|
||||
/* 0x18 */ short mPushDelay;
|
||||
};
|
||||
|
||||
class Act_c : public fopAc_ac_c {
|
||||
public:
|
||||
void attr() const {}
|
||||
void is_switch() const {}
|
||||
void off_switch() const {}
|
||||
void on_switch() const {}
|
||||
void prm_get_swSave() const {}
|
||||
void prm_get_type() const {}
|
||||
void rev_switch() const {}
|
||||
const Attr_c& attr() const { return M_attr[mType]; }
|
||||
|
||||
enum Flag {
|
||||
FLAG_OBEY_SAVE = 0x1,
|
||||
FLAG_STAY_PRESSED = 0x2,
|
||||
FLAG_IS_TOGGLE = 0x4,
|
||||
FLAG_REQ_HEAVY = 0x8,
|
||||
};
|
||||
|
||||
enum Prm_e {
|
||||
PRM_TYPE_W = 0x3,
|
||||
PRM_TYPE_S = 0x18,
|
||||
|
||||
PRM_SWSAVE_W = 0x8,
|
||||
PRM_SWSAVE_S = 0x8,
|
||||
};
|
||||
|
||||
BOOL is_switch() const { return fopAcM_isSwitch(const_cast<Act_c*>(this), prm_get_swSave()); }
|
||||
void off_switch() const { fopAcM_offSwitch(const_cast<Act_c*>(this), prm_get_swSave()); }
|
||||
void on_switch() const { fopAcM_onSwitch(const_cast<Act_c*>(this), prm_get_swSave()); }
|
||||
s32 prm_get_swSave() const { return daObj::PrmAbstract(this, PRM_SWSAVE_W, PRM_SWSAVE_S); }
|
||||
int prm_get_type() const { return daObj::PrmAbstract(this, PRM_TYPE_W, PRM_TYPE_S); }
|
||||
void rev_switch() const { fopAcM_revSwitch(const_cast<Act_c*>(this), prm_get_swSave()); }
|
||||
|
||||
void solidHeapCB(fopAc_ac_c*);
|
||||
void create_heap();
|
||||
static BOOL solidHeapCB(fopAc_ac_c*);
|
||||
BOOL create_heap();
|
||||
s32 _create();
|
||||
bool _delete();
|
||||
void set_mtx();
|
||||
void init_mtx();
|
||||
void rideCB(dBgW*, fopAc_ac_c*, fopAc_ac_c*);
|
||||
static void rideCB(dBgW*, fopAc_ac_c*, fopAc_ac_c*);
|
||||
void calc_top_pos();
|
||||
void top_bg_aim_req(float, short);
|
||||
void set_push_flag();
|
||||
@@ -35,10 +62,41 @@ namespace daObjSwheavy {
|
||||
void mode_l_u();
|
||||
bool _execute();
|
||||
bool _draw();
|
||||
|
||||
|
||||
static const char M_arcname[6];
|
||||
static const Attr_c M_attr[4];
|
||||
|
||||
public:
|
||||
/* Place member variables here */
|
||||
};
|
||||
/* 0x290 */ request_of_phase_process_class mPhs;
|
||||
/* 0x298 */ J3DModel* mpModel1;
|
||||
/* 0x29c */ J3DModel* mpModel2;
|
||||
/* 0x2A0 */ dBgW* mpBgW1;
|
||||
/* 0x2A4 */ dBgW* mpBgW2;
|
||||
/* 0x2A8 */ Mtx mMtx1;
|
||||
/* 0x2D8 */ Mtx mMtx2;
|
||||
/* 0x308 */ int mType;
|
||||
/* 0x30C */ int mMode;
|
||||
/* 0x310 */ bool mRiding;
|
||||
/* 0x311 */ bool mPrevRiding;
|
||||
/* 0x312 */ short mMiniPushTimer;
|
||||
/* 0x314 */ bool mMiniPushFlg;
|
||||
/* 0x315 */ bool mHeavyRiding;
|
||||
/* 0x316 */ bool mPrevHeavyRiding;
|
||||
/* 0x318 */ short mPushTimer;
|
||||
/* 0x31A */ bool mPushFlg;
|
||||
/* 0x31B */ bool mChangingState;
|
||||
/* 0x31C */ float mTargetHFrac;
|
||||
/* 0x320 */ float mCurHFrac;
|
||||
/* 0x324 */ float mVSpeed;
|
||||
/* 0x328 */ float m328;
|
||||
/* 0x32C */ float m32C;
|
||||
/* 0x330 */ short m330;
|
||||
/* 0x334 */ float m334;
|
||||
/* 0x338 */ float m338;
|
||||
/* 0x33C */ float mTopPos;
|
||||
}; /* Size: 0x340 */
|
||||
|
||||
STATIC_ASSERT(sizeof(Act_c) == 0x340);
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_SWHEAVY_H */
|
||||
|
||||
@@ -363,6 +363,7 @@ inline cXyz* fopAcM_getCullSizeBoxMin(fopAc_ac_c* actor) {
|
||||
inline void dComIfGs_onSwitch(int i_no, int i_roomNo);
|
||||
inline void dComIfGs_offSwitch(int i_no, int i_roomNo);
|
||||
inline BOOL dComIfGs_isSwitch(int i_no, int i_roomNo);
|
||||
inline void dComIfGs_revSwitch(int i_no, int i_roomNo);
|
||||
inline void dComIfGs_offActor(int i_no, int i_roomNo);
|
||||
|
||||
inline void fopAcM_onSwitch(fopAc_ac_c* pActor, int sw) {
|
||||
@@ -377,6 +378,10 @@ inline BOOL fopAcM_isSwitch(fopAc_ac_c* pActor, int sw) {
|
||||
return dComIfGs_isSwitch(sw, fopAcM_GetHomeRoomNo(pActor));
|
||||
}
|
||||
|
||||
inline void fopAcM_revSwitch(fopAc_ac_c* pActor, int sw) {
|
||||
return dComIfGs_revSwitch(sw, fopAcM_GetHomeRoomNo(pActor));
|
||||
}
|
||||
|
||||
inline fopAc_ac_c* fopAcM_SearchByID(fpc_ProcID id) {
|
||||
return (fopAc_ac_c*)fopAcIt_Judge((fopAcIt_JudgeFunc)fpcSch_JudgeByID, &id);
|
||||
}
|
||||
|
||||
+358
-34
@@ -4,133 +4,457 @@
|
||||
//
|
||||
|
||||
#include "d/actor/d_a_obj_swheavy.h"
|
||||
#include "d/res/res_hhbot.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
|
||||
#include "weak_data_1811.h" // IWYU pragma: keep
|
||||
|
||||
const char daObjSwheavy::Act_c::M_arcname[] = "Hhbot";
|
||||
const daObjSwheavy::Attr_c daObjSwheavy::Act_c::M_attr[4] = {
|
||||
{
|
||||
/* m00 */ {},
|
||||
/* mFlags */ 0,
|
||||
/* mVSpring */ 0.0f,
|
||||
/* mVSpeedDecay */ 0.0f,
|
||||
/* mPushVSpeed0 */ 0.0f,
|
||||
/* m14 */ 0,
|
||||
/* mMiniPushDelay */ 0,
|
||||
/* mPushDelay */ 0,
|
||||
},
|
||||
{
|
||||
/* m00 */ {},
|
||||
/* mFlags */ 0,
|
||||
/* mVSpring */ 0.0f,
|
||||
/* mVSpeedDecay */ 0.0f,
|
||||
/* mPushVSpeed0 */ 0.0f,
|
||||
/* m14 */ 0,
|
||||
/* mMiniPushDelay */ 0,
|
||||
/* mPushDelay */ 0,
|
||||
},
|
||||
{
|
||||
/* m00 */ {0,0,0x80,0},
|
||||
/* mFlags */ FLAG_IS_TOGGLE | FLAG_REQ_HEAVY,
|
||||
/* mVSpring */ 0.93f,
|
||||
/* mVSpeedDecay */ 0.42f,
|
||||
/* mPushVSpeed0 */ 0.0f,
|
||||
/* m14 */ 4,
|
||||
/* mMiniPushDelay */ 4,
|
||||
/* mPushDelay */ 15,
|
||||
},
|
||||
{
|
||||
/* m00 */ {0,0,0x80,0},
|
||||
/* mFlags */ FLAG_OBEY_SAVE | FLAG_STAY_PRESSED | FLAG_REQ_HEAVY,
|
||||
/* mVSpring */ 0.93f,
|
||||
/* mVSpeedDecay */ 0.42f,
|
||||
/* mPushVSpeed0 */ 0.0f,
|
||||
/* m14 */ 4,
|
||||
/* mMiniPushDelay */ 4,
|
||||
/* mPushDelay */ 15,
|
||||
},
|
||||
};
|
||||
|
||||
/* 00000078-0000009C .text solidHeapCB__Q212daObjSwheavy5Act_cFP10fopAc_ac_c */
|
||||
void daObjSwheavy::Act_c::solidHeapCB(fopAc_ac_c*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjSwheavy::Act_c::solidHeapCB(fopAc_ac_c* i_this) {
|
||||
return static_cast<daObjSwheavy::Act_c*>(i_this)->create_heap() & 0xFF; // Fakematch?
|
||||
}
|
||||
|
||||
/* 0000009C-0000032C .text create_heap__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::create_heap() {
|
||||
/* Nonmatching */
|
||||
BOOL daObjSwheavy::Act_c::create_heap() {
|
||||
J3DModelData* mdl_1_data = (J3DModelData*) dComIfG_getObjectRes(M_arcname, HHBOT_BDL_HHBOT1);
|
||||
JUT_ASSERT(0x116, mdl_1_data != NULL);
|
||||
mpModel1 = mDoExt_J3DModel__create(mdl_1_data, 0x80000, 0x11000022);
|
||||
|
||||
J3DModelData* mdl_2_data = (J3DModelData*) dComIfG_getObjectRes(M_arcname, HHBOT_BDL_HHBOT2);
|
||||
JUT_ASSERT(0x11F, mdl_2_data != NULL);
|
||||
mpModel2 = mDoExt_J3DModel__create(mdl_2_data, 0x80000, 0x11000022);
|
||||
|
||||
bool b1 = false;
|
||||
mpBgW1 = new dBgW();
|
||||
if (mpBgW1 != NULL) {
|
||||
cBgD_t* bgw_1_data = (cBgD_t*) dComIfG_getObjectRes(M_arcname, HHBOT_DZB_HHBOT1);
|
||||
JUT_ASSERT(0x137, bgw_1_data != NULL);
|
||||
if (!mpBgW1->Set(bgw_1_data, dBgW::MOVE_BG_e, &mMtx1)) {
|
||||
b1 = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool b2 = false;
|
||||
mpBgW2 = new dBgW();
|
||||
if (mpBgW2 != NULL) {
|
||||
cBgD_t* bgw_2_data = (cBgD_t*) dComIfG_getObjectRes(M_arcname, HHBOT_DZB_HHBOT2);
|
||||
JUT_ASSERT(0x146, bgw_2_data != NULL);
|
||||
if (!mpBgW2->Set(bgw_2_data, dBgW::MOVE_BG_e, &mMtx2)) {
|
||||
b2 = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool success = false;
|
||||
if (mpModel1 && mpModel2 && b1 && b2) {
|
||||
success = true;
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
mpBgW1 = NULL;
|
||||
mpBgW2 = NULL;
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
/* 0000032C-00000628 .text _create__Q212daObjSwheavy5Act_cFv */
|
||||
s32 daObjSwheavy::Act_c::_create() {
|
||||
/* Nonmatching */
|
||||
fopAcM_SetupActor(this, daObjSwheavy::Act_c);
|
||||
|
||||
s32 phase_state = dComIfG_resLoad(&mPhs, M_arcname);
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
mType = prm_get_type();
|
||||
bool up = cLib_checkBit<u32>(attr().mFlags, FLAG_IS_TOGGLE) || !is_switch();
|
||||
scale.z *= 1.5f;
|
||||
scale.x *= 1.5f;
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
mDoMtx_stack_c::scaleM(scale);
|
||||
mDoMtx_copy(mDoMtx_stack_c::get(), mMtx1);
|
||||
if (!up) {
|
||||
mDoMtx_stack_c::get()[1][3] += -35.5f;
|
||||
}
|
||||
mDoMtx_copy(mDoMtx_stack_c::get(), mMtx2);
|
||||
if (fopAcM_entrySolidHeap(this, solidHeapCB, 0x2000)) {
|
||||
dComIfG_Bgsp()->Regist(mpBgW1, this);
|
||||
mpBgW1->SetCrrFunc(NULL);
|
||||
dComIfG_Bgsp()->Regist(mpBgW2, this);
|
||||
mpBgW2->SetCrrFunc(NULL);
|
||||
mpBgW2->SetRideCallback(rideCB);
|
||||
fopAcM_SetMtx(this, mpModel1->getBaseTRMtx());
|
||||
init_mtx();
|
||||
fopAcM_setCullSizeBox(this, -97.5f, -2.0f, -97.5f, 97.5f, 55.0f, 97.5f);
|
||||
mRiding = false;
|
||||
mPrevRiding = false;
|
||||
mMiniPushTimer = 0;
|
||||
mMiniPushFlg = false;
|
||||
mHeavyRiding = false;
|
||||
mPrevHeavyRiding = false;
|
||||
mPushTimer = 0;
|
||||
mPushFlg = false;
|
||||
mVSpeed = 0.0f;
|
||||
m330 = 0;
|
||||
m334 = 0.0f;
|
||||
if (cLib_checkBit<u32>(attr().mFlags, FLAG_IS_TOGGLE) || !is_switch()) {
|
||||
mTargetHFrac = 1.0f;
|
||||
mCurHFrac = 1.0f;
|
||||
m328 = 0.0f;
|
||||
m32C = 1.0f;
|
||||
m338 = 1.0f;
|
||||
mTopPos = 0.0f;
|
||||
mode_upper_init();
|
||||
} else {
|
||||
mTargetHFrac = 0.0f;
|
||||
mCurHFrac = 0.0f;
|
||||
m328 = -35.5f;
|
||||
m32C = 0.0f;
|
||||
m338 = 0.0f;
|
||||
mTopPos = -35.5f;
|
||||
mode_lower_init();
|
||||
}
|
||||
} else {
|
||||
phase_state = cPhs_ERROR_e;
|
||||
}
|
||||
}
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
/* 00000628-000006EC .text _delete__Q212daObjSwheavy5Act_cFv */
|
||||
bool daObjSwheavy::Act_c::_delete() {
|
||||
/* Nonmatching */
|
||||
if (mpBgW1) {
|
||||
if (mpBgW1->ChkUsed()) {
|
||||
dComIfG_Bgsp()->Release(mpBgW1);
|
||||
}
|
||||
}
|
||||
if (mpBgW2) {
|
||||
if (mpBgW2->ChkUsed()) {
|
||||
dComIfG_Bgsp()->Release(mpBgW2);
|
||||
}
|
||||
}
|
||||
dComIfG_resDelete(&mPhs, M_arcname);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 000006EC-000007F8 .text set_mtx__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::set_mtx() {
|
||||
/* Nonmatching */
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
mpModel1->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mDoMtx_stack_c::get()[1][3] += m328;
|
||||
mpModel2->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
mDoMtx_stack_c::scaleM(scale);
|
||||
mDoMtx_copy(mDoMtx_stack_c::get(), mMtx1);
|
||||
mDoMtx_stack_c::get()[1][3] += mTopPos;
|
||||
mDoMtx_copy(mDoMtx_stack_c::get(), mMtx2);
|
||||
}
|
||||
|
||||
/* 000007F8-00000850 .text init_mtx__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::init_mtx() {
|
||||
/* Nonmatching */
|
||||
mpModel1->setBaseScale(scale);
|
||||
mpModel2->setBaseScale(scale);
|
||||
set_mtx();
|
||||
}
|
||||
|
||||
/* 00000850-00000884 .text rideCB__Q212daObjSwheavy5Act_cFP4dBgWP10fopAc_ac_cP10fopAc_ac_c */
|
||||
void daObjSwheavy::Act_c::rideCB(dBgW*, fopAc_ac_c*, fopAc_ac_c*) {
|
||||
/* Nonmatching */
|
||||
void daObjSwheavy::Act_c::rideCB(dBgW* bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) {
|
||||
daObjSwheavy::Act_c *i_this = (daObjSwheavy::Act_c*)i_ac;
|
||||
if (fopAcM_CheckStatus(i_pt, fopAcStts_FREEZE_e)) {
|
||||
i_this->mRiding = true;
|
||||
|
||||
if (fopAcM_GetProfName(i_pt) == PROC_PLAYER && ((daPy_py_c*)i_pt)->checkEquipHeavyBoots()) {
|
||||
i_this->mHeavyRiding = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 00000884-00000998 .text calc_top_pos__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::calc_top_pos() {
|
||||
/* Nonmatching */
|
||||
float decay = attr().mVSpeedDecay;
|
||||
mVSpeed -= (mCurHFrac - mTargetHFrac) * attr().mVSpring;
|
||||
mVSpeed -= mVSpeed * decay;
|
||||
mCurHFrac += mVSpeed;
|
||||
m328 = (1.0f - mCurHFrac) * -35.5f;
|
||||
m328 = cLib_minMaxLimit(m328, -36.5f, 1.0f);
|
||||
|
||||
if (m330 > 0) {
|
||||
if (--m330 == 0) {
|
||||
m32C = m334;
|
||||
}
|
||||
}
|
||||
if (mMode == 0) {
|
||||
m338 = mCurHFrac;
|
||||
} else {
|
||||
m338 = m32C;
|
||||
}
|
||||
mTopPos = (1.0f - m338) * -35.5f;
|
||||
if (mTopPos < m328) {
|
||||
mTopPos = m328;
|
||||
}
|
||||
}
|
||||
|
||||
/* 00000998-000009A4 .text top_bg_aim_req__Q212daObjSwheavy5Act_cFfs */
|
||||
void daObjSwheavy::Act_c::top_bg_aim_req(float, short) {
|
||||
/* Nonmatching */
|
||||
void daObjSwheavy::Act_c::top_bg_aim_req(float param_1, short param_2) {
|
||||
m334 = param_1;
|
||||
m330 = param_2;
|
||||
}
|
||||
|
||||
/* 000009A4-00000AF8 .text set_push_flag__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::set_push_flag() {
|
||||
/* Nonmatching */
|
||||
if (mMiniPushFlg) {
|
||||
if (mRiding) {
|
||||
mMiniPushTimer = attr().mMiniPushDelay;
|
||||
} else {
|
||||
if (--mMiniPushTimer <= 0) {
|
||||
mMiniPushFlg = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (mRiding) {
|
||||
if (++mMiniPushTimer >= attr().mMiniPushDelay) {
|
||||
mMiniPushFlg = true;
|
||||
}
|
||||
} else {
|
||||
mMiniPushTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (mPushFlg) {
|
||||
if (mHeavyRiding) {
|
||||
mPushTimer = attr().mPushDelay;
|
||||
} else {
|
||||
if (--mPushTimer <= 0) {
|
||||
mPushFlg = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (mHeavyRiding) {
|
||||
if (++mPushTimer >= attr().mPushDelay) {
|
||||
mPushFlg = true;
|
||||
}
|
||||
} else {
|
||||
mPushTimer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 00000AF8-00000B14 .text mode_upper_init__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::mode_upper_init() {
|
||||
/* Nonmatching */
|
||||
mMode = 0;
|
||||
mTargetHFrac = 1.0f;
|
||||
mChangingState = false;
|
||||
}
|
||||
|
||||
/* 00000B14-00000C30 .text mode_upper__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::mode_upper() {
|
||||
/* Nonmatching */
|
||||
bool pressing = false;
|
||||
float height = 1.0f;
|
||||
if (mMiniPushFlg) {
|
||||
if (cLib_checkBit<u32>(attr().mFlags, FLAG_REQ_HEAVY)) {
|
||||
if (mPushFlg) {
|
||||
pressing = true;
|
||||
} else {
|
||||
height = 0.9f;
|
||||
}
|
||||
} else {
|
||||
pressing = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (pressing || (cLib_checkBit<u32>(attr().mFlags, FLAG_OBEY_SAVE) && is_switch())) {
|
||||
if (pressing) {
|
||||
mChangingState = true;
|
||||
}
|
||||
mode_u_l_init();
|
||||
} else {
|
||||
mTargetHFrac = height;
|
||||
top_bg_aim_req(height, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* 00000C30-00000C90 .text mode_u_l_init__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::mode_u_l_init() {
|
||||
/* Nonmatching */
|
||||
mMode = 1;
|
||||
mTargetHFrac = 0.0f;
|
||||
mVSpeed = attr().mPushVSpeed0;
|
||||
top_bg_aim_req(0.0f, attr().m14);
|
||||
}
|
||||
|
||||
/* 00000C90-00000D98 .text mode_u_l__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::mode_u_l() {
|
||||
/* Nonmatching */
|
||||
if (mCurHFrac <= 0.0f) {
|
||||
if (mChangingState) {
|
||||
if (cLib_checkBit<u32>(attr().mFlags, FLAG_IS_TOGGLE)) {
|
||||
rev_switch();
|
||||
} else {
|
||||
on_switch();
|
||||
}
|
||||
}
|
||||
fopAcM_seStart(this, JA_SE_OBJ_FOOT_SW_ON, 0);
|
||||
mode_lower_init();
|
||||
}
|
||||
}
|
||||
|
||||
/* 00000D98-00000DB8 .text mode_lower_init__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::mode_lower_init() {
|
||||
/* Nonmatching */
|
||||
mMode = 2;
|
||||
mTargetHFrac = 0.0f;
|
||||
mChangingState = false;
|
||||
}
|
||||
|
||||
/* 00000DB8-00000F0C .text mode_lower__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::mode_lower() {
|
||||
/* Nonmatching */
|
||||
bool pressing = false;
|
||||
if (mMiniPushFlg) {
|
||||
if (cLib_checkBit<u32>(attr().mFlags, FLAG_REQ_HEAVY)) {
|
||||
if (mPushFlg) {
|
||||
pressing = true;
|
||||
}
|
||||
} else {
|
||||
pressing = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool pop_back_up = !cLib_checkBit<u32>(attr().mFlags, FLAG_STAY_PRESSED) &&
|
||||
!pressing;
|
||||
bool match_state_up = cLib_checkBit<u32>(attr().mFlags, FLAG_OBEY_SAVE) &&
|
||||
!is_switch() &&
|
||||
!pressing;
|
||||
|
||||
if (pop_back_up || match_state_up) {
|
||||
bool is_toggle = cLib_checkBit<u32>(attr().mFlags, FLAG_IS_TOGGLE);
|
||||
if (pop_back_up && !is_toggle && !pressing) {
|
||||
mChangingState = true;
|
||||
}
|
||||
mode_l_u_init();
|
||||
}
|
||||
}
|
||||
|
||||
/* 00000F0C-00000F44 .text mode_l_u_init__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::mode_l_u_init() {
|
||||
/* Nonmatching */
|
||||
mMode = 3;
|
||||
mTargetHFrac = 1.0f;
|
||||
top_bg_aim_req(1.0f, 1);
|
||||
}
|
||||
|
||||
/* 00000F44-00000FBC .text mode_l_u__Q212daObjSwheavy5Act_cFv */
|
||||
void daObjSwheavy::Act_c::mode_l_u() {
|
||||
/* Nonmatching */
|
||||
if (mCurHFrac >= 1.0f) {
|
||||
if (mChangingState) {
|
||||
off_switch();
|
||||
}
|
||||
mode_upper_init();
|
||||
}
|
||||
}
|
||||
|
||||
/* 00000FBC-00001104 .text _execute__Q212daObjSwheavy5Act_cFv */
|
||||
bool daObjSwheavy::Act_c::_execute() {
|
||||
/* Nonmatching */
|
||||
typedef void (daObjSwheavy::Act_c::*procFunc)();
|
||||
static procFunc mode_proc[] = {
|
||||
&daObjSwheavy::Act_c::mode_upper,
|
||||
&daObjSwheavy::Act_c::mode_u_l,
|
||||
&daObjSwheavy::Act_c::mode_lower,
|
||||
&daObjSwheavy::Act_c::mode_l_u,
|
||||
};
|
||||
set_push_flag();
|
||||
(this->*mode_proc[mMode])();
|
||||
calc_top_pos();
|
||||
mPrevRiding = mRiding;
|
||||
mPrevHeavyRiding = mHeavyRiding;
|
||||
mRiding = false;
|
||||
mHeavyRiding = false;
|
||||
set_mtx();
|
||||
mpBgW1->Move();
|
||||
mpBgW2->Move();
|
||||
eyePos.x = current.pos.x;
|
||||
eyePos.y = current.pos.y + m328 - -35.5f;
|
||||
eyePos.z = current.pos.z;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 00001104-000011C0 .text _draw__Q212daObjSwheavy5Act_cFv */
|
||||
bool daObjSwheavy::Act_c::_draw() {
|
||||
/* Nonmatching */
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType(mpModel1, &tevStr);
|
||||
g_env_light.setLightTevColorType(mpModel2, &tevStr);
|
||||
dComIfGd_setListBG();
|
||||
mDoExt_modelUpdateDL(mpModel1);
|
||||
mDoExt_modelUpdateDL(mpModel2);
|
||||
dComIfGd_setList();
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace daObjSwheavy {
|
||||
namespace {
|
||||
/* 000011C0-000011E0 .text Mthd_Create__Q212daObjSwheavy29@unnamed@d_a_obj_swheavy_cpp@FPv */
|
||||
void Mthd_Create(void*) {
|
||||
/* Nonmatching */
|
||||
s32 Mthd_Create(void* i_this) {
|
||||
return static_cast<Act_c*>(i_this)->_create();
|
||||
}
|
||||
|
||||
/* 000011E0-00001204 .text Mthd_Delete__Q212daObjSwheavy29@unnamed@d_a_obj_swheavy_cpp@FPv */
|
||||
void Mthd_Delete(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL Mthd_Delete(void* i_this) {
|
||||
return static_cast<Act_c*>(i_this)->_delete();
|
||||
}
|
||||
|
||||
/* 00001204-00001228 .text Mthd_Execute__Q212daObjSwheavy29@unnamed@d_a_obj_swheavy_cpp@FPv */
|
||||
void Mthd_Execute(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL Mthd_Execute(void* i_this) {
|
||||
return static_cast<Act_c*>(i_this)->_execute();
|
||||
}
|
||||
|
||||
/* 00001228-0000124C .text Mthd_Draw__Q212daObjSwheavy29@unnamed@d_a_obj_swheavy_cpp@FPv */
|
||||
void Mthd_Draw(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL Mthd_Draw(void* i_this) {
|
||||
return static_cast<Act_c*>(i_this)->_draw();
|
||||
}
|
||||
|
||||
/* 0000124C-00001254 .text Mthd_IsDelete__Q212daObjSwheavy29@unnamed@d_a_obj_swheavy_cpp@FPv */
|
||||
void Mthd_IsDelete(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL Mthd_IsDelete(void* i_this) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static actor_method_class Mthd_Table = {
|
||||
|
||||
Reference in New Issue
Block a user