mirror of https://github.com/zeldaret/tp.git
d_a_obj_kamakiri matching (#2501)
This commit is contained in:
parent
5bdf8bb50e
commit
028c07d47d
|
@ -1957,7 +1957,7 @@ config.libs = [
|
|||
ActorRel(NonMatching, "d_a_obj_kage"),
|
||||
ActorRel(NonMatching, "d_a_obj_kago"),
|
||||
ActorRel(NonMatching, "d_a_obj_kaisou"),
|
||||
ActorRel(NonMatching, "d_a_obj_kamakiri"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_kamakiri"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_kantera"),
|
||||
ActorRel(NonMatching, "d_a_obj_katatsumuri"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_kazeneko"),
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
class npc_worm_class : public dInsect_c {
|
||||
public:
|
||||
bool check_release() { return field_0x56C == 1; }
|
||||
bool check_release() { return field_0x56c == 1; }
|
||||
|
||||
/* 0x590 */ request_of_phase_process_class mPhase;
|
||||
/* 0x598 */ u8 field_0x598;
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
#ifndef D_A_OBJ_KAMAKIRI_H
|
||||
#define D_A_OBJ_KAMAKIRI_H
|
||||
|
||||
#include "JSystem/JHostIO/JORMContext.h"
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_insect.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
|
@ -11,14 +15,14 @@
|
|||
* @details
|
||||
*
|
||||
*/
|
||||
class daObjKAM_c : public fopAc_ac_c {
|
||||
class daObjKAM_c : public dInsect_c {
|
||||
public:
|
||||
/* 80C351BC */ void InitCcSph();
|
||||
/* 80C35228 */ void SetCcSph();
|
||||
/* 80C352A0 */ void CreateHeap();
|
||||
/* 80C352A0 */ int CreateHeap();
|
||||
/* 80C35684 */ void ShopWaitAction();
|
||||
/* 80C357EC */ void WaitAction();
|
||||
/* 80C35970 */ void WallCheck();
|
||||
/* 80C35970 */ int WallCheck();
|
||||
/* 80C35BE4 */ void SpeedSet();
|
||||
/* 80C35CF0 */ void WallWalk();
|
||||
/* 80C36138 */ void WalkAction();
|
||||
|
@ -30,22 +34,83 @@ public:
|
|||
/* 80C36E34 */ void ParticleSet();
|
||||
/* 80C36F58 */ void BoomChk();
|
||||
/* 80C37324 */ void ObjHit();
|
||||
/* 80C374AC */ void Execute();
|
||||
/* 80C37724 */ void Delete();
|
||||
/* 80C374AC */ int Execute();
|
||||
/* 80C37724 */ int Delete();
|
||||
/* 80C3778C */ void setBaseMtx();
|
||||
/* 80C378F4 */ void CreateChk();
|
||||
/* 80C37AA0 */ void create();
|
||||
int Draw() {
|
||||
if (mDraw != 0) {
|
||||
Z_BufferChk();
|
||||
J3DModel* model = mpMorfSO->getModel();
|
||||
g_env_light.settingTevStruct(0x10, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(model, &tevStr);
|
||||
mpBtkAnm->entry(model->getModelData());
|
||||
mpBrkAnm->entry(model->getModelData());
|
||||
mpMorfSO->entryDL();
|
||||
if (field_0x9c0 == 0) {
|
||||
_GXTexObj* texObj = dDlst_shadowControl_c::getSimpleTex();
|
||||
dComIfGd_setSimpleShadow(¤t.pos, mObjAcch.GetGroundH(), 15.0f, mObjAcch.m_gnd, 0, -0.6f, texObj);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/* 80C378F4 */ u8 CreateChk();
|
||||
/* 80C37AA0 */ int create();
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568[0xa68 - 0x568];
|
||||
/* 0x590 */ dCcD_Stts mStts;
|
||||
/* 0x5CC */ dCcD_Sph mSphere;
|
||||
/* 0x704 */ daPy_boomerangMove_c mBoomerangMove;
|
||||
/* 0x710 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x750 */ dBgS_ObjAcch mObjAcch;
|
||||
/* 0x928 */ dBgS_GndChk mGndChk;
|
||||
/* 0x928 */ u8 field_0x97c[0x980 - 0x97c];
|
||||
/* 0x980 */ u8 field_0x980;
|
||||
/* 0x981 */ u8 field_0x981;
|
||||
/* 0x982 */ s16 field_0x982[3];
|
||||
/* 0x988 */ f32 field_0x988;
|
||||
/* 0x98C */ f32 field_0x98c;
|
||||
/* 0x990 */ s16 field_0x990;
|
||||
/* 0x992 */ u8 field_0x992[0x99a - 0x992];
|
||||
/* 0x99A */ csXyz field_0x99a;
|
||||
/* 0x9A0 */ s16 field_0x9a0;
|
||||
/* 0x9A2 */ s16 mNormalYaw;
|
||||
/* 0x9A4 */ s16 field_0x9a4;
|
||||
/* 0x9A8 */ f32 field_0x9a8;
|
||||
/* 0x9AC */ f32 field_0x9ac;
|
||||
/* 0x9B0 */ mDoExt_brkAnm* mpBrkAnm;
|
||||
/* 0x9B4 */ mDoExt_btkAnm* mpBtkAnm;
|
||||
/* 0x9B8 */ f32 field_0x9b8;
|
||||
/* 0x9BC */ u32 field_0x9bc;
|
||||
/* 0x9C0 */ u8 field_0x9c0;
|
||||
/* 0x9C1 */ u8 field_0x9c1;
|
||||
/* 0x9C2 */ u8 field_0x9c2;
|
||||
/* 0x9C4 */ Z2Creature mCreatureSound;
|
||||
/* 0xA54 */ u8 field_0xa44[0xa58 - 0xa54];
|
||||
/* 0xA58 */ mDoExt_McaMorfSO* mpMorfSO;
|
||||
/* 0xA5C */ request_of_phase_process_class mPhase;
|
||||
/* 0xA64 */ u8 field_0xa64;
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daObjKAM_c) == 0xa68);
|
||||
|
||||
class daObj_KamHIO_c {
|
||||
class daObj_KamHIO_c : public JORReflexible {
|
||||
public:
|
||||
/* 80C3518C */ daObj_KamHIO_c();
|
||||
/* 80C38360 */ ~daObj_KamHIO_c();
|
||||
/* 80C38360 */ virtual ~daObj_KamHIO_c() {}
|
||||
void genMessage(JORMContext* context) {
|
||||
// Golden insect (stag beetle)
|
||||
context->genLabel("黄金蟲(カブト)", 0x80000001, 0, NULL, -1, -1, 0x200, 0x18);
|
||||
// Model scale (male)
|
||||
context->genSlider("モデルスケール(オス)", &mModelScaleMale, 0.1f, 4.0f, 0, NULL, -1, -1, 0x200,
|
||||
0x18);
|
||||
// Model scale (female)
|
||||
context->genSlider("モデルスケール(メス)", &mModelScaleFemale, 0.1f, 4.0f, 0, NULL, -1, -1, 0x200,
|
||||
0x18);
|
||||
}
|
||||
|
||||
s8 field_0x4;
|
||||
f32 mModelScaleFemale;
|
||||
f32 mModelScaleMale;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ public:
|
|||
class daPy_boomerangMove_c {
|
||||
public:
|
||||
/* 8015E5B0 */ void initOffset(cXyz const*);
|
||||
void initOffset(cXyz const* xyz, dCcD_GObjInf const*) { initOffset(xyz); }
|
||||
/* 8015E654 */ int posMove(cXyz*, s16*, fopAc_ac_c*, s16);
|
||||
/* 8015E87C */ void bgCheckAfterOffset(cXyz const*);
|
||||
|
||||
|
|
|
@ -21,19 +21,19 @@ public:
|
|||
/* 8015E078 */ void Insect_GetDemoMain();
|
||||
/* 8015E26C */ void CalcZBuffer(f32);
|
||||
|
||||
/* 80110648 */ virtual void Insect_Release() { field_0x56C = 1; }
|
||||
/* 80110648 */ virtual void Insect_Release() { field_0x56c = 1; }
|
||||
bool ChkGetDemo() { return m_mode > 0; }
|
||||
void setItemNo(u8 i_itemNo) { m_itemNo = i_itemNo; }
|
||||
void setSaveBitNo(s16 i_saveBitNo) { m_saveBitNo = i_saveBitNo; }
|
||||
bool CheckZ() { return (u32)field_0x57C > field_0x578; }
|
||||
bool CheckZ() { return (u32)field_0x57c > field_0x578; }
|
||||
|
||||
public:
|
||||
/* 0x56C */ u8 field_0x56C;
|
||||
/* 0x56C */ u8 field_0x56c;
|
||||
/* 0x56D */ bool mDraw;
|
||||
/* 0x570 */ u32 mParticleKey1;
|
||||
/* 0x574 */ u32 mParticleKey2;
|
||||
/* 0x578 */ u32 field_0x578;
|
||||
/* 0x57C */ f32 field_0x57C;
|
||||
/* 0x57C */ f32 field_0x57c;
|
||||
/* 0x580 */ u8 m_itemNo;
|
||||
/* 0x581 */ u8 mSex;
|
||||
/* 0x582 */ s16 m_saveBitNo;
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
/* 801D9E20 */ bool isGiveInsect(int, int);
|
||||
/* 801D9ED4 */ static bool isGiveInsect(u8);
|
||||
/* 801D9E7C */ static bool isCatchInsect(u8);
|
||||
/* 801D9F3C */ static u8 isCatchNotGiveInsect(u8);
|
||||
/* 801D9F3C */ static bool isCatchNotGiveInsect(u8);
|
||||
/* 801D9F8C */ void cursorMove();
|
||||
/* 801DA1EC */ void setCursorPos();
|
||||
/* 801DA2FC */ u8 dpdMove();
|
||||
|
|
|
@ -256,7 +256,7 @@ void daObjARI_c::Action() {
|
|||
|
||||
/* 80BA33F8-80BA3408 000E58 0010+00 1/0 0/0 0/0 .text Insect_Release__10daObjARI_cFv */
|
||||
void daObjARI_c::Insect_Release() {
|
||||
field_0x56C = 1;
|
||||
field_0x56c = 1;
|
||||
mAction = 1;
|
||||
}
|
||||
|
||||
|
@ -637,7 +637,7 @@ cPhs__Step daObjARI_c::create() {
|
|||
if (step == cPhs_COMPLEATE_e) {
|
||||
mLocation = fopAcM_GetParam(this) & 0xf;
|
||||
if (mLocation == LOC_UNK_2) {
|
||||
field_0x56C = 0;
|
||||
field_0x56c = 0;
|
||||
shape_angle.x -= 0x2000;
|
||||
fopAcM_OnStatus(this, 0x4000);
|
||||
} else {
|
||||
|
|
|
@ -287,7 +287,7 @@ void daObjCHO_c::checkGroundPos() {
|
|||
|
||||
/* 80BCB310-80BCB320 0010F0 0010+00 1/0 0/0 0/0 .text Insect_Release__10daObjCHO_cFv */
|
||||
void daObjCHO_c::Insect_Release() {
|
||||
field_0x56C = 1;
|
||||
field_0x56c = 1;
|
||||
mAction = ACT_MOVE;
|
||||
}
|
||||
|
||||
|
@ -560,7 +560,7 @@ cPhs__Step daObjCHO_c::create() {
|
|||
if (step == cPhs_COMPLEATE_e) {
|
||||
mLocation = fopAcM_GetParam(this) & 0xf;
|
||||
if (mLocation == LOC_UNK_2) {
|
||||
field_0x56C = 0;
|
||||
field_0x56c = 0;
|
||||
shape_angle.x -= 0x2000;
|
||||
fopAcM_OnStatus(this, 0x4000);
|
||||
mTargetSpeedY = -2.0f;
|
||||
|
|
|
@ -269,7 +269,7 @@ void daObjDAN_c::checkGroundPos() {
|
|||
|
||||
/* 80BDB0D8-80BDB0E8 000C38 0010+00 1/0 0/0 0/0 .text Insect_Release__10daObjDAN_cFv */
|
||||
void daObjDAN_c::Insect_Release() {
|
||||
field_0x56C = 1;
|
||||
field_0x56c = 1;
|
||||
mAction = ACT_MOVE;
|
||||
}
|
||||
|
||||
|
@ -535,7 +535,7 @@ cPhs__Step daObjDAN_c::create() {
|
|||
if (step == cPhs_COMPLEATE_e) {
|
||||
mLocation = fopAcM_GetParam(this) & 0xf;
|
||||
if (mLocation == LOC_UNK_2) {
|
||||
field_0x56C = 0;
|
||||
field_0x56c = 0;
|
||||
shape_angle.x -= 0x2000;
|
||||
fopAcM_OnStatus(this, 0x4000);
|
||||
} else {
|
||||
|
|
|
@ -506,7 +506,7 @@ void daObjKABUTO_c::ShopAction() {
|
|||
/* 80C2CAC4-80C2CADC 001D44 0018+00 1/0 0/0 0/0 .text Insect_Release__13daObjKABUTO_cFv
|
||||
*/
|
||||
void daObjKABUTO_c::Insect_Release() {
|
||||
field_0x56C = 1;
|
||||
field_0x56c = 1;
|
||||
mAction = ACT_MOVE;
|
||||
mMode = 0;
|
||||
}
|
||||
|
@ -757,7 +757,7 @@ cPhs__Step daObjKABUTO_c::create() {
|
|||
if (step == cPhs_COMPLEATE_e) {
|
||||
mLocation = fopAcM_GetParam(this) & 0xf;
|
||||
if (mLocation == LOC_UNK_2) {
|
||||
field_0x56C = 0;
|
||||
field_0x56c = 0;
|
||||
shape_angle.x -= 0x2000;
|
||||
fopAcM_OnStatus(this, 0x4000);
|
||||
} else {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -321,7 +321,7 @@ void daObjNAN_c::bin_wait() {
|
|||
fopAcM_OnStatus(this, 0x4000);
|
||||
mDraw = false;
|
||||
field_0x7d0++;
|
||||
} else if (field_0x7d0 != -1 && field_0x56C != 0) {
|
||||
} else if (field_0x7d0 != -1 && field_0x56c != 0) {
|
||||
current.angle.y = daPy_getPlayerActorClass()->current.angle.y - 0x4000;
|
||||
if (strcmp("R_SP160", dComIfGp_getStartStageName()) == 0 &&
|
||||
dComIfGp_getStartStageRoomNo() == 3)
|
||||
|
@ -558,7 +558,7 @@ static u8 const l_nan_itemno[2] = {
|
|||
/* 80CA276C-80CA2904 0022AC 0198+00 1/1 0/0 0/0 .text execute__10daObjNAN_cFv */
|
||||
int daObjNAN_c::execute() {
|
||||
if (ChkGetDemo()) {
|
||||
field_0x57C = field_0x578 + 10000.0f;
|
||||
field_0x57c = field_0x578 + 10000.0f;
|
||||
mCreatureSound.startCreatureSoundLevel(Z2SE_INSCT_KIRA, 0, -1);
|
||||
Insect_GetDemoMain();
|
||||
nan_setParticle();
|
||||
|
|
|
@ -453,7 +453,7 @@ void daObjTEN_c::checkGroundPos() {
|
|||
|
||||
/* 80D0A13C-80D0A154 001A5C 0018+00 1/0 0/0 0/0 .text Insect_Release__10daObjTEN_cFv */
|
||||
void daObjTEN_c::Insect_Release() {
|
||||
field_0x56C = 1;
|
||||
field_0x56c = 1;
|
||||
field_0x624 = 2;
|
||||
mAction = ACTION_MOVE;
|
||||
}
|
||||
|
@ -729,7 +729,7 @@ int daObjTEN_c::create() {
|
|||
if (rv == cPhs_COMPLEATE_e) {
|
||||
field_0x624 = fopAcM_GetParam(this) & 0xf;
|
||||
if (field_0x624 == 2) {
|
||||
field_0x56C = 0;
|
||||
field_0x56c = 0;
|
||||
shape_angle.x -= 0x2000;
|
||||
fopAcM_OnStatus(this, fopAcM_STATUS_UNK_004000);
|
||||
} else {
|
||||
|
|
|
@ -30,7 +30,7 @@ SECTION_DATA extern void* __vt__8daItem_c__HACK[] = {
|
|||
/* 8015E010-8015E078 158950 0068+00 0/0 0/0 13/13 .text __ct__9dInsect_cFv */
|
||||
dInsect_c::dInsect_c() {
|
||||
m_itemId = -1;
|
||||
field_0x56C = 0;
|
||||
field_0x56c = 0;
|
||||
mDraw = true;
|
||||
m_mode = 0;
|
||||
m_itemNo = fpcNm_ITEM_M_MAYFLY;
|
||||
|
@ -127,7 +127,7 @@ void dInsect_c::CalcZBuffer(f32 param_0) {
|
|||
pos_projected.z = -10.0f;
|
||||
}
|
||||
|
||||
field_0x57C =
|
||||
field_0x57c =
|
||||
(((view_near + ((view_far * view_near) / pos_projected.z)) / (view_far - view_near)) +
|
||||
1.0f) *
|
||||
16777215.0f;
|
||||
|
|
|
@ -633,7 +633,7 @@ bool dMenu_Insect_c::isGiveInsect(u8 i_insectID) {
|
|||
|
||||
/* 801D9F3C-801D9F8C 1D487C 0050+00 0/0 1/1 12/12 .text isCatchNotGiveInsect__14dMenu_Insect_cFUc
|
||||
*/
|
||||
u8 dMenu_Insect_c::isCatchNotGiveInsect(u8 param_0) {
|
||||
bool dMenu_Insect_c::isCatchNotGiveInsect(u8 param_0) {
|
||||
if (isCatchInsect(param_0) != 0 && isGiveInsect(param_0) == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue