mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-21 14:07:29 -04:00
d_path match, d_a_boko_static 99%
This commit is contained in:
+1
-1
@@ -369,7 +369,7 @@ config.libs = [
|
||||
Object(NonMatching, "d/d_tree.cpp"),
|
||||
Object(NonMatching, "d/d_particle.cpp"),
|
||||
Object(Matching, "d/d_particle_name.cpp"),
|
||||
Object(NonMatching, "d/d_path.cpp"),
|
||||
Object(Matching, "d/d_path.cpp"),
|
||||
Object(NonMatching, "d/d_drawlist.cpp"),
|
||||
Object(Matching, "d/d_kankyo_data.cpp"),
|
||||
Object(Matching, "d/d_kankyo_wether.cpp"),
|
||||
|
||||
@@ -40,6 +40,7 @@ enum cCcD_ObjAtType {
|
||||
/* 0x04000000 */ AT_TYPE_DARKNUT_SWORD = (1 << 26),
|
||||
/* 0x08000000 */ AT_TYPE_GRAPPLING_HOOK = (1 << 27),
|
||||
/* 0x10000000 */ AT_TYPE_MOBLIN_SPEAR = (1 << 28),
|
||||
/* 0x20000000 */ AT_TYPE_PGANON_SWORD = (1 << 29),
|
||||
/* 0xFFFFFFFF */ AT_TYPE_ALL = ~0,
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -25,6 +25,6 @@ struct dPath {
|
||||
dPath__Point* dPath_GetPnt(dPath*, int);
|
||||
dPath* dPath_GetRoomPath(int, int);
|
||||
dPath* dPath_GetNextRoomPath(dPath*, int);
|
||||
void dPath_GetPolyRoomPathVec(cBgS_PolyInfo&, cXyz*, int*);
|
||||
int dPath_GetPolyRoomPathVec(cBgS_PolyInfo&, cXyz*, int*);
|
||||
|
||||
#endif /* D_PATH_H */
|
||||
|
||||
@@ -24,7 +24,6 @@ enum fopAc_Status_e {
|
||||
fopAcStts_UNK4000_e = 0x00004000,
|
||||
fopAcStts_NOPAUSE_e = 0x00020000,
|
||||
fopAcStts_UNK40000_e = 0x00040000,
|
||||
fopAcStts_UNK00040180_e = 0x00040180,
|
||||
fopAcStts_UNK80000_e = 0x00080000,
|
||||
fopAcStts_HOOK_CARRY_e = 0x00100000,
|
||||
fopAcStts_UNK200000_e = 0x00200000,
|
||||
|
||||
@@ -52,7 +52,7 @@ extern actor_process_profile_definition g_profile_SEATAG = {
|
||||
&g_fopAc_Method.base,
|
||||
0x01DF,
|
||||
&l_daSeatag_Method,
|
||||
fopAcStts_UNK00040180_e,
|
||||
fopAcStts_UNK40000_e | fopAcStts_NOCULLEXEC_e | fopAcStts_CULL_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
+114
-7
@@ -3,16 +3,123 @@
|
||||
// Translation Unit: d_a_boko_static.cpp
|
||||
//
|
||||
|
||||
#include "d_a_boko_static.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DModel.h"
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
|
||||
class daBoko_c : fopAc_ac_c {
|
||||
public:
|
||||
/* 0x290 */ request_of_phase_process_class mPhs;
|
||||
/* 0x298 */ J3DModel * mpModel;
|
||||
|
||||
/* TODO The entire rest of daBoko_c */
|
||||
|
||||
public:
|
||||
void getTopPos(cXyz *);
|
||||
void getBlurRootPos(cXyz *);
|
||||
|
||||
static Vec m_top_offset[6];
|
||||
static Vec m_blur_root_offset[6];
|
||||
static Vec m_root_offset[6];
|
||||
static f32 m_cps_r[6];
|
||||
static s32 m_at_point[6];
|
||||
static u32 m_at_type[6];
|
||||
static f32 m_jump_blur_rate[6];
|
||||
static f32 m_blur_rate[6];
|
||||
static const u32 m_se_type[6];
|
||||
};
|
||||
|
||||
Vec daBoko_c::m_top_offset[6] = {
|
||||
{ 0.0f, 0.0f, 85.0f },
|
||||
{ 16.0f, 0.0f, 77.0f },
|
||||
{ -8.0f, 3.0f, 120.0f },
|
||||
{ 0.0f, 0.0f, 128.0f },
|
||||
{ 10.0f, 0.0f, 200.0f },
|
||||
{ -40.0f, 0.0f, 110.0f },
|
||||
};
|
||||
Vec daBoko_c::m_blur_root_offset[6] = {
|
||||
{ 0.0f, 0.0f, -45.0f },
|
||||
{ 0.0f, 0.0f, -43.0f },
|
||||
{ -1.0f, 3.0f, -60.0f },
|
||||
{ 0.0f, 0.0f, -50.0f },
|
||||
{ 0.0f, 0.0f, -100.0f },
|
||||
{ -20.0f, 0.0f, -50.0f },
|
||||
};
|
||||
Vec daBoko_c::m_root_offset[6] = {
|
||||
{ 0.0f, 0.0f, -85.0f },
|
||||
{ 5.0f, 0.0f, -90.0f },
|
||||
{ 3.0f, 0.0f, -120.0f },
|
||||
{ 0.0f, 0.0f, -130.0f },
|
||||
{ 0.0f, 0.0f, -175.0f },
|
||||
{ 0.0f, 0.0f, -125.0f },
|
||||
};
|
||||
f32 daBoko_c::m_cps_r[6] = {
|
||||
30.0f,
|
||||
30.0f,
|
||||
50.0f,
|
||||
50.0f,
|
||||
50.0f,
|
||||
50.0f,
|
||||
};
|
||||
s32 daBoko_c::m_at_point[6] = {
|
||||
0x01,
|
||||
0x02,
|
||||
0x04,
|
||||
0x04,
|
||||
0x04,
|
||||
0x04,
|
||||
};
|
||||
u32 daBoko_c::m_at_type[6] = {
|
||||
AT_TYPE_BOKO_STICK,
|
||||
AT_TYPE_MACHETE,
|
||||
AT_TYPE_STALFOS_MACE,
|
||||
AT_TYPE_DARKNUT_SWORD,
|
||||
AT_TYPE_MOBLIN_SPEAR,
|
||||
AT_TYPE_PGANON_SWORD,
|
||||
};
|
||||
f32 daBoko_c::m_jump_blur_rate[6] = {
|
||||
0.0f,
|
||||
-0.1f,
|
||||
0.4f,
|
||||
0.5f,
|
||||
1.4f,
|
||||
0.5f,
|
||||
};
|
||||
f32 daBoko_c::m_blur_rate[6] = {
|
||||
0.0f,
|
||||
-0.1f,
|
||||
0.1f,
|
||||
0.2f,
|
||||
1.0f,
|
||||
0.2f,
|
||||
};
|
||||
const u32 daBoko_c::m_se_type[6] = {
|
||||
0x04,
|
||||
0x01,
|
||||
0x01,
|
||||
0x01,
|
||||
0x03,
|
||||
0x01,
|
||||
};
|
||||
|
||||
/* 80067E78-80067F0C .text getTopPos__8daBoko_cFP4cXyz */
|
||||
void daBoko_c::getTopPos(cXyz*) {
|
||||
/* Nonmatching */
|
||||
void daBoko_c::getTopPos(cXyz* ret) {
|
||||
if (mpModel != NULL) {
|
||||
cMtx_multVec(mpModel->getBaseTRMtx(), &m_top_offset[fopAcM_GetParam(this)], ret);
|
||||
} else {
|
||||
*ret = fopAcM_GetPosition(this) + m_top_offset[fopAcM_GetParam(this)];
|
||||
}
|
||||
}
|
||||
|
||||
/* 80067F0C-80067FA0 .text getBlurRootPos__8daBoko_cFP4cXyz */
|
||||
void daBoko_c::getBlurRootPos(cXyz*) {
|
||||
/* Nonmatching */
|
||||
void daBoko_c::getBlurRootPos(cXyz* ret) {
|
||||
if (mpModel != NULL) {
|
||||
cMtx_multVec(mpModel->getBaseTRMtx(), &m_blur_root_offset[fopAcM_GetParam(this)], ret);
|
||||
} else {
|
||||
*ret = fopAcM_GetPosition(this) + m_blur_root_offset[fopAcM_GetParam(this)];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+36
-4
@@ -9,8 +9,8 @@
|
||||
|
||||
/* 80080018-8008010C .text dPath_GetPnt__FP5dPathi */
|
||||
dPath__Point* dPath_GetPnt(dPath* path, int pnt_index) {
|
||||
JUT_ASSERT(14, path != 0);
|
||||
JUT_ASSERT(15, 0 <= pnt_index && pnt_index < path->m_num);
|
||||
JUT_ASSERT(30, path != 0);
|
||||
JUT_ASSERT(31, 0 <= pnt_index && pnt_index < path->m_num);
|
||||
|
||||
if (path == NULL || path->mpPnt == NULL || 0 > pnt_index || pnt_index >= path->m_num)
|
||||
return NULL;
|
||||
@@ -62,7 +62,39 @@ dPath* dPath_GetNextRoomPath(dPath* path, int room_no) {
|
||||
}
|
||||
|
||||
/* 80080340-800804A4 .text dPath_GetPolyRoomPathVec__FR13cBgS_PolyInfoP4cXyzPi */
|
||||
void dPath_GetPolyRoomPathVec(cBgS_PolyInfo&, cXyz*, int*) {
|
||||
/* Nonmatching */
|
||||
int dPath_GetPolyRoomPathVec(cBgS_PolyInfo& polyInfo, cXyz* pDstPos, int* pDstArg0) {
|
||||
int room_no = dComIfG_Bgsp()->GetRoomId(polyInfo);
|
||||
int path_index = dComIfG_Bgsp()->GetRoomPathId(polyInfo);
|
||||
|
||||
pDstPos->x = 0.0f;
|
||||
pDstPos->y = 0.0f;
|
||||
pDstPos->z = 0.0f;
|
||||
*pDstArg0 = 0;
|
||||
|
||||
if (room_no == -1)
|
||||
return FALSE;
|
||||
|
||||
dPath * path = dPath_GetRoomPath(path_index, room_no);
|
||||
if (path == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (path->field4_0x6 != 0xFF && dComIfGs_isSwitch(path->field4_0x6, room_no))
|
||||
return FALSE;
|
||||
|
||||
int pnt_no = dComIfG_Bgsp()->GetRoomPathPntNo(polyInfo);
|
||||
if (pnt_no == 0xFF || pnt_no < 0 || pnt_no >= path->m_num)
|
||||
return FALSE;
|
||||
|
||||
dPath__Point *point = &path->mpPnt[pnt_no];
|
||||
dPath__Point *next_point;
|
||||
if (pnt_no == path->m_num - 1)
|
||||
next_point = &path->mpPnt[0];
|
||||
else
|
||||
next_point = &path->mpPnt[pnt_no + 1];
|
||||
pDstPos->x = next_point->mPos.x - point->mPos.x;
|
||||
pDstPos->y = next_point->mPos.y - point->mPos.y;
|
||||
pDstPos->z = next_point->mPos.z - point->mPos.z;
|
||||
*pDstArg0 = path->mArg0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user