mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-16 20:27:36 -04:00
j2d / map_path work, d_drawlist / d_attention cleanup (#208)
* work on fop actor / actor mng, daalink, d_a_obj_item * d_a_title mostly decompiled * daalink / d_event / JMessage / dmsg_out_font work * msg_scrn_base / msg_scrn_boss * some work on mDo machine, d_menu_save, d_tresure, and various * remove asm * progress * finish d_menu_save / d_pane_class_alpha / d_pane_class / rename some data * rename more data * remove asm / progress * match all of d_pane_class * fixes / some dKankyo doc * bunch of j2d work. d_drawlist / d_attention cleanup * progress / asm * cleanup wip * decompile JStage * setup some more JStudio structs * set up d_demo classes * some d_demo work * cleanup dolphin os stuff * some initial dEvent documentation * some At collision documentation * match JUTConsole::doDraw * dbgs work / split up some of d_a_alink into .inc files * d_a_alink_spinner work
This commit is contained in:
@@ -24,7 +24,7 @@ void dCcD_GAtTgCoCommonBase::ClrActorInfo() {
|
||||
void dCcD_GAtTgCoCommonBase::ct() {
|
||||
mGFlag = NULL;
|
||||
mRPrm = 0;
|
||||
field_0x08 = 0;
|
||||
mHitCallback = NULL;
|
||||
mEffCounter = 0;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,9 @@ void dCcD_Stts::Init(int param_0, int param_1, fopAc_ac_c* pActor) {
|
||||
} else {
|
||||
actorPid = 0xFFFFFFFF;
|
||||
}
|
||||
this->cCcD_Stts::Init(param_0, param_1, pActor, actorPid);
|
||||
|
||||
cCcD_Stts::Init(param_0, param_1, pActor, actorPid);
|
||||
|
||||
s32 roomNo;
|
||||
if (pActor != NULL) {
|
||||
roomNo = fopAcM_GetRoomNo(pActor);
|
||||
@@ -132,6 +134,7 @@ void dCcD_Stts::Init(int param_0, int param_1, fopAc_ac_c* pActor) {
|
||||
roomNo = 0;
|
||||
field_0x1C |= 1;
|
||||
}
|
||||
|
||||
if (roomNo != -1) {
|
||||
mRoomId = roomNo;
|
||||
} else {
|
||||
@@ -141,8 +144,8 @@ void dCcD_Stts::Init(int param_0, int param_1, fopAc_ac_c* pActor) {
|
||||
|
||||
/* 800838F4-80083928 07E234 0034+00 1/0 0/0 0/0 .text Ct__9dCcD_SttsFv */
|
||||
void dCcD_Stts::Ct() {
|
||||
this->cCcD_Stts::Ct();
|
||||
this->dCcD_GStts::Ct();
|
||||
cCcD_Stts::Ct();
|
||||
dCcD_GStts::Ct();
|
||||
}
|
||||
|
||||
/* 80083928-80083934 07E268 000C+00 1/0 0/0 0/0 .text ClrAt__9dCcD_SttsFv */
|
||||
@@ -152,29 +155,29 @@ void dCcD_Stts::ClrAt() {
|
||||
|
||||
/* 80083934-80083944 07E274 0010+00 1/0 0/0 0/0 .text ClrTg__9dCcD_SttsFv */
|
||||
void dCcD_Stts::ClrTg() {
|
||||
this->cCcD_Stts::ClrTg();
|
||||
this->dCcD_GStts::ClrTg();
|
||||
cCcD_Stts::ClrTg();
|
||||
dCcD_GStts::ClrTg();
|
||||
}
|
||||
|
||||
/* 80083944-800839A0 07E284 005C+00 1/1 0/0 0/0 .text Set__11dCcD_GObjAtFRC14dCcD_SrcGObjAt */
|
||||
void dCcD_GObjAt::Set(dCcD_SrcGObjAt const& src) {
|
||||
this->dCcD_GAtTgCoCommonBase::Set(src.mBase);
|
||||
this->mSe = src.mSe;
|
||||
this->mMtrl = src.mMtrl;
|
||||
this->mHitMark = src.mHitMark;
|
||||
this->mSpl = src.mSpl;
|
||||
dCcD_GAtTgCoCommonBase::Set(src.mBase);
|
||||
mSe = src.mSe;
|
||||
mMtrl = src.mMtrl;
|
||||
mHitMark = src.mHitMark;
|
||||
mSpl = src.mSpl;
|
||||
}
|
||||
|
||||
/* 800839A0-80083A28 07E2E0 0088+00 1/1 0/0 0/0 .text Set__11dCcD_GObjTgFRC14dCcD_SrcGObjTg */
|
||||
void dCcD_GObjTg::Set(dCcD_SrcGObjTg const& src) {
|
||||
this->dCcD_GAtTgCoCommonBase::Set(src.mBase);
|
||||
this->mSe = src.mSe;
|
||||
this->mMtrl = src.mMtrl;
|
||||
this->mHitMark = src.mHitMark;
|
||||
this->mSpl = src.mSpl;
|
||||
this->mHitPos = cXyz::Zero;
|
||||
this->mShieldFrontRangeYAngle = NULL;
|
||||
this->mShieldRange = 0x4000;
|
||||
dCcD_GAtTgCoCommonBase::Set(src.mBase);
|
||||
mSe = src.mSe;
|
||||
mMtrl = src.mMtrl;
|
||||
mHitMark = src.mHitMark;
|
||||
mSpl = src.mSpl;
|
||||
mHitPos = cXyz::Zero;
|
||||
mShieldFrontRangeYAngle = NULL;
|
||||
mShieldRange = 0x4000;
|
||||
}
|
||||
|
||||
/* 80083A28-80083B8C 07E368 0164+00 0/0 4/4 496/496 .text __ct__12dCcD_GObjInfFv */
|
||||
@@ -208,7 +211,7 @@ s32 dCcD_GObjInf::ChkAtHit() {
|
||||
|
||||
/* 80084318-80084358 07EC58 0040+00 0/0 10/10 7/7 .text ResetAtHit__12dCcD_GObjInfFv */
|
||||
void dCcD_GObjInf::ResetAtHit() {
|
||||
this->ClrAtHit();
|
||||
ClrAtHit();
|
||||
mGObjAt.mEffCounter = 0;
|
||||
}
|
||||
|
||||
@@ -223,7 +226,7 @@ cCcD_Obj* dCcD_GObjInf::GetAtHitObj() {
|
||||
|
||||
/* 800843A8-800843DC 07ECE8 0034+00 0/0 2/2 3/3 .text GetAtHitGObj__12dCcD_GObjInfFv */
|
||||
cCcD_GObjInf* dCcD_GObjInf::GetAtHitGObj() {
|
||||
cCcD_Obj* obj = this->GetAtHitObj();
|
||||
cCcD_Obj* obj = GetAtHitObj();
|
||||
if (obj == NULL) {
|
||||
return NULL;
|
||||
} else {
|
||||
@@ -270,7 +273,7 @@ bool dCcD_GObjInf::ChkTgHit() {
|
||||
|
||||
/* 800844B8-800844F8 07EDF8 0040+00 0/0 1/1 5/5 .text ResetTgHit__12dCcD_GObjInfFv */
|
||||
void dCcD_GObjInf::ResetTgHit() {
|
||||
this->ClrTgHit();
|
||||
ClrTgHit();
|
||||
mGObjTg.mEffCounter = 0;
|
||||
}
|
||||
|
||||
@@ -286,7 +289,7 @@ cCcD_Obj* dCcD_GObjInf::GetTgHitObj() {
|
||||
|
||||
/* 80084548-8008457C 07EE88 0034+00 1/1 5/5 63/63 .text GetTgHitGObj__12dCcD_GObjInfFv */
|
||||
dCcD_GObjInf* dCcD_GObjInf::GetTgHitGObj() {
|
||||
cCcD_Obj* obj = this->GetTgHitObj();
|
||||
cCcD_Obj* obj = GetTgHitObj();
|
||||
if (obj == NULL) {
|
||||
return NULL;
|
||||
} else {
|
||||
@@ -297,7 +300,7 @@ dCcD_GObjInf* dCcD_GObjInf::GetTgHitGObj() {
|
||||
/* 8008457C-800845B0 07EEBC 0034+00 0/0 2/2 18/18 .text GetTgHitObjSe__12dCcD_GObjInfFv
|
||||
*/
|
||||
u8 dCcD_GObjInf::GetTgHitObjSe() {
|
||||
dCcD_GObjInf* objInf = this->GetTgHitGObj();
|
||||
dCcD_GObjInf* objInf = GetTgHitGObj();
|
||||
if (objInf == NULL) {
|
||||
return NULL;
|
||||
} else {
|
||||
@@ -308,25 +311,30 @@ u8 dCcD_GObjInf::GetTgHitObjSe() {
|
||||
/* ############################################################################################## */
|
||||
/* 8037A780-8037A7E0 006DE0 0060+00 1/1 0/0 0/0 .rodata m_hitSeID__12dCcD_GObjInf */
|
||||
u32 const dCcD_GObjInf::m_hitSeID[24] = {
|
||||
0x0004000F, 0x00040000, 0x00040002, 0x00040004, 0x00040009, 0x0004000B, 0x0004000C, 0x0004000D,
|
||||
0x0004000E, 0x0004000F, 0x00040001, 0x00040004, 0x00040010, 0x00040011, 0x00040012, 0x00040013,
|
||||
0x00040014, 0x00040015, 0x00040018, 0x00040016, 0x00040003, 0x00040005, 0x00040006, 0x00040007,
|
||||
Z2SE_HIT_DUMMY_CANCEL, Z2SE_HIT_SWORD, Z2SE_HIT_SHIELD_ATTACK,
|
||||
Z2SE_HIT_WOLFKICK, Z2SE_HIT_HOOKSHOT_STICK, Z2SE_HIT_METAL_WEAPON,
|
||||
Z2SE_HIT_STONE_WEAPON, Z2SE_HIT_HARD_BODY, Z2SE_HIT_SOFT_BODY,
|
||||
Z2SE_HIT_DUMMY_CANCEL, Z2SE_HIT_SWORD_STAB, Z2SE_HIT_WOLFKICK,
|
||||
Z2SE_HIT_SWORD_RUN, Z2SE_HIT_EN_WOOD_WEAPON, Z2SE_HIT_THOROW_OBJ,
|
||||
Z2SE_HIT_SPINNER, Z2SE_HIT_COPYROD, Z2SE_HIT_STATUE_HAMMER,
|
||||
Z2SE_HIT_PACHINKO, Z2SE_HIT_AL_ARROW_STICK, Z2SE_HIT_WOLFBITE,
|
||||
Z2SE_HIT_WOOD_WEAPON, Z2SE_HIT_HAMMER, Z2SE_HIT_ARROW_STICK,
|
||||
};
|
||||
|
||||
/* 800845B0-8008460C 07EEF0 005C+00 0/0 3/3 32/32 .text getHitSeID__12dCcD_GObjInfFUci */
|
||||
u32 dCcD_GObjInf::getHitSeID(u8 param_0, int param_1) {
|
||||
if (param_1 != 0) {
|
||||
if (param_0 == 0x17) {
|
||||
return 0x40017;
|
||||
u32 dCcD_GObjInf::getHitSeID(u8 seIdx, int useRebound) {
|
||||
if (useRebound) {
|
||||
if (seIdx == 23) {
|
||||
return Z2SE_HIT_AL_ARROW_REBOUND;
|
||||
}
|
||||
if (param_0 == 7) {
|
||||
return 0x40008;
|
||||
if (seIdx == 7) {
|
||||
return Z2SE_HIT_ARROW_REBOUND;
|
||||
}
|
||||
if (param_0 == 8) {
|
||||
return 0x4000A;
|
||||
if (seIdx == 8) {
|
||||
return Z2SE_HIT_HOOKSHOT_REBOUND;
|
||||
}
|
||||
}
|
||||
return m_hitSeID[param_0];
|
||||
return m_hitSeID[seIdx];
|
||||
}
|
||||
|
||||
/* 8008460C-80084658 07EF4C 004C+00 5/0 0/0 0/0 .text ClrCoHit__12dCcD_GObjInfFv */
|
||||
@@ -364,22 +372,22 @@ cCcD_Obj* dCcD_GObjInf::GetCoHitObj() {
|
||||
}
|
||||
|
||||
/* 80084740-8008479C 07F080 005C+00 4/4 0/0 0/0 .text Set__12dCcD_GObjInfFRC15dCcD_SrcGObjInf */
|
||||
void dCcD_GObjInf::Set(dCcD_SrcGObjInf const& param_0) {
|
||||
this->cCcD_Obj::Set(param_0.mObj);
|
||||
mGObjAt.Set(param_0.mGObjAt);
|
||||
mGObjTg.Set(param_0.mGObjTg);
|
||||
mGObjCo.Set(param_0.mGObjCo);
|
||||
void dCcD_GObjInf::Set(dCcD_SrcGObjInf const& src) {
|
||||
cCcD_Obj::Set(src.mObj);
|
||||
mGObjAt.Set(src.mGObjAt);
|
||||
mGObjTg.Set(src.mGObjTg);
|
||||
mGObjCo.Set(src.mGObjCo);
|
||||
}
|
||||
|
||||
/* 8008479C-800847C8 07F0DC 002C+00 2/2 1/1 3/3 .text dCcD_GetGObjInf__FP8cCcD_Obj */
|
||||
dCcD_GObjInf* dCcD_GetGObjInf(cCcD_Obj* obj) {
|
||||
return (dCcD_GObjInf*)obj->GetGObjInf();
|
||||
dCcD_GObjInf* dCcD_GetGObjInf(cCcD_Obj* p_obj) {
|
||||
return (dCcD_GObjInf*)p_obj->GetGObjInf();
|
||||
}
|
||||
|
||||
/* 800847D0-80084814 07F110 0044+00 0/0 1/1 20/20 .text Set__8dCcD_CpsFRC11dCcD_SrcCps */
|
||||
void dCcD_Cps::Set(dCcD_SrcCps const& param_0) {
|
||||
this->dCcD_GObjInf::Set(param_0.mObjInf);
|
||||
this->cCcD_CpsAttr::Set(param_0.mCps);
|
||||
void dCcD_Cps::Set(dCcD_SrcCps const& src) {
|
||||
dCcD_GObjInf::Set(src.mObjInf);
|
||||
cCcD_CpsAttr::Set(src.mCps);
|
||||
}
|
||||
|
||||
/* 80084814-80084824 07F154 0010+00 1/0 0/0 0/0 .text GetShapeAttr__8dCcD_CpsFv */
|
||||
@@ -390,18 +398,18 @@ cCcD_ShapeAttr* dCcD_Cps::GetShapeAttr() {
|
||||
/* 80084824-80084854 07F164 0030+00 0/0 0/0 6/6 .text CalcAtVec__8dCcD_CpsFv */
|
||||
void dCcD_Cps::CalcAtVec() {
|
||||
cXyz& dest = mGObjAt.GetVec();
|
||||
PSVECSubtract(&this->GetEndP(), &this->GetStartP(), &dest);
|
||||
PSVECSubtract(&GetEndP(), &GetStartP(), &dest);
|
||||
}
|
||||
|
||||
/* 80084854-80084884 07F194 0030+00 0/0 0/0 2/2 .text CalcTgVec__8dCcD_CpsFv */
|
||||
void dCcD_Cps::CalcTgVec() {
|
||||
cXyz& dest = mGObjTg.GetVec();
|
||||
PSVECSubtract(&this->GetEndP(), &this->GetStartP(), &dest);
|
||||
PSVECSubtract(&GetEndP(), &GetStartP(), &dest);
|
||||
}
|
||||
|
||||
/* 80084884-800848A4 07F1C4 0020+00 0/0 0/0 5/5 .text Set__8dCcD_TriFRC11dCcD_SrcTri */
|
||||
void dCcD_Tri::Set(dCcD_SrcTri const& param_0) {
|
||||
this->dCcD_GObjInf::Set(param_0.mObjInf);
|
||||
void dCcD_Tri::Set(dCcD_SrcTri const& src) {
|
||||
dCcD_GObjInf::Set(src.mObjInf);
|
||||
}
|
||||
|
||||
/* 800848A4-800848B4 07F1E4 0010+00 1/0 0/0 0/0 .text GetShapeAttr__8dCcD_TriFv */
|
||||
@@ -411,9 +419,9 @@ cCcD_ShapeAttr* dCcD_Tri::GetShapeAttr() {
|
||||
|
||||
/* 800848B4-800848F8 07F1F4 0044+00 0/0 2/2 245/245 .text Set__8dCcD_CylFRC11dCcD_SrcCyl
|
||||
*/
|
||||
void dCcD_Cyl::Set(dCcD_SrcCyl const& param_0) {
|
||||
this->dCcD_GObjInf::Set(param_0.mObjInf);
|
||||
this->cCcD_CylAttr::Set(param_0.mCyl);
|
||||
void dCcD_Cyl::Set(dCcD_SrcCyl const& src) {
|
||||
dCcD_GObjInf::Set(src.mObjInf);
|
||||
cCcD_CylAttr::Set(src.mCyl);
|
||||
}
|
||||
|
||||
/* 800848F8-80084908 07F238 0010+00 1/0 0/0 0/0 .text GetShapeAttr__8dCcD_CylFv */
|
||||
@@ -422,10 +430,10 @@ cCcD_ShapeAttr* dCcD_Cyl::GetShapeAttr() {
|
||||
}
|
||||
|
||||
/* 80084908-80084954 07F248 004C+00 0/0 3/3 3/3 .text StartCAt__8dCcD_CylFR4cXyz */
|
||||
void dCcD_Cyl::StartCAt(cXyz& param_0) {
|
||||
void dCcD_Cyl::StartCAt(cXyz& pos) {
|
||||
cXyz zero = cXyz::Zero;
|
||||
mGObjAt.SetVec(zero);
|
||||
this->SetC(param_0);
|
||||
SetC(pos);
|
||||
}
|
||||
|
||||
inline void vecDiff(cXyz& out, const cXyz& a, const cXyz& b) {
|
||||
@@ -433,41 +441,41 @@ inline void vecDiff(cXyz& out, const cXyz& a, const cXyz& b) {
|
||||
}
|
||||
|
||||
/* 80084954-800849C4 07F294 0070+00 0/0 3/3 4/4 .text MoveCAt__8dCcD_CylFR4cXyz */
|
||||
void dCcD_Cyl::MoveCAt(cXyz& param_0) {
|
||||
void dCcD_Cyl::MoveCAt(cXyz& pos) {
|
||||
cXyz diff;
|
||||
vecDiff(diff, param_0, this->GetCP());
|
||||
vecDiff(diff, pos, GetCP());
|
||||
mGObjAt.SetVec(diff);
|
||||
this->SetC(param_0);
|
||||
SetC(pos);
|
||||
}
|
||||
|
||||
/* 800849C4-80084A34 07F304 0070+00 0/0 0/0 1/1 .text MoveCTg__8dCcD_CylFR4cXyz */
|
||||
void dCcD_Cyl::MoveCTg(cXyz& param_0) {
|
||||
void dCcD_Cyl::MoveCTg(cXyz& pos) {
|
||||
cXyz diff;
|
||||
vecDiff(diff, param_0, this->GetCP());
|
||||
vecDiff(diff, pos, GetCP());
|
||||
mGObjTg.SetVec(diff);
|
||||
this->SetC(param_0);
|
||||
SetC(pos);
|
||||
}
|
||||
|
||||
/* 80084A34-80084A78 07F374 0044+00 0/0 2/2 196/196 .text Set__8dCcD_SphFRC11dCcD_SrcSph
|
||||
*/
|
||||
void dCcD_Sph::Set(dCcD_SrcSph const& param_0) {
|
||||
this->dCcD_GObjInf::Set(param_0.mObjInf);
|
||||
this->cCcD_SphAttr::Set(param_0.mSph);
|
||||
void dCcD_Sph::Set(dCcD_SrcSph const& src) {
|
||||
dCcD_GObjInf::Set(src.mObjInf);
|
||||
cCcD_SphAttr::Set(src.mSph);
|
||||
}
|
||||
|
||||
/* 80084A78-80084AC4 07F3B8 004C+00 0/0 3/3 25/25 .text StartCAt__8dCcD_SphFR4cXyz */
|
||||
void dCcD_Sph::StartCAt(cXyz& xyz) {
|
||||
void dCcD_Sph::StartCAt(cXyz& pos) {
|
||||
cXyz zero(cXyz::Zero);
|
||||
SetAtVec(zero);
|
||||
this->cM3dGSph::SetC(xyz);
|
||||
cM3dGSph::SetC(pos);
|
||||
}
|
||||
|
||||
/* 80084AC4-80084B34 07F404 0070+00 0/0 2/2 23/23 .text MoveCAt__8dCcD_SphFR4cXyz */
|
||||
void dCcD_Sph::MoveCAt(cXyz& param_0) {
|
||||
void dCcD_Sph::MoveCAt(cXyz& pos) {
|
||||
cXyz diff;
|
||||
vecDiff(diff, param_0, GetC());
|
||||
vecDiff(diff, pos, GetC());
|
||||
mGObjAt.SetVec(diff);
|
||||
this->SetC(param_0);
|
||||
SetC(pos);
|
||||
}
|
||||
|
||||
cCcD_ShapeAttr* dCcD_Sph::GetShapeAttr() {
|
||||
|
||||
+54
-35
@@ -9,14 +9,10 @@
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 800852E0-800852F0 07FC20 0010+00 1/1 0/0 0/0 .text
|
||||
* Set__12dCcMassS_ObjFP8cCcD_ObjUcPFP10fopAc_ac_cP4cXyzUl_v */
|
||||
void dCcMassS_Obj::Set(cCcD_Obj* obj, u8 priority, dCcMassS_ObjCallback callback) {
|
||||
mpObj = obj;
|
||||
void dCcMassS_Obj::Set(cCcD_Obj* p_obj, u8 priority, dCcMassS_ObjCallback callback) {
|
||||
mpObj = p_obj;
|
||||
mPriority = priority;
|
||||
mpCallback = callback;
|
||||
}
|
||||
@@ -40,7 +36,7 @@ void dCcMassS_HitInf::ClearPointer() {
|
||||
|
||||
/* 80085350-80085450 07FC90 0100+00 0/0 1/1 0/0 .text __ct__12dCcMassS_MngFv */
|
||||
dCcMassS_Mng::dCcMassS_Mng() {
|
||||
this->Ct();
|
||||
Ct();
|
||||
}
|
||||
|
||||
/* 800855C8-800855E4 07FF08 001C+00 1/1 0/0 0/0 .text __ct__12dCcMassS_ObjFv */
|
||||
@@ -52,13 +48,13 @@ void dCcMassS_Mng::Ct() {
|
||||
mResultCam = 0;
|
||||
mCamTopPos.set(0, -1000000000.0f, 0);
|
||||
mCamBottomPos.set(0, -1000000000.0f, 0);
|
||||
this->Clear();
|
||||
Clear();
|
||||
}
|
||||
|
||||
/* 80085630-80085690 07FF70 0060+00 0/0 0/0 2/2 .text SetAttr__12dCcMassS_MngFffUcUc */
|
||||
void dCcMassS_Mng::SetAttr(f32 param_0, f32 param_1, u8 param_2, u8 param_3) {
|
||||
mCylAttr.SetR(param_0);
|
||||
mCylAttr.SetH(param_1);
|
||||
void dCcMassS_Mng::SetAttr(f32 radius, f32 height, u8 param_2, u8 param_3) {
|
||||
mCylAttr.SetR(radius);
|
||||
mCylAttr.SetH(height);
|
||||
field_0x200 = param_2;
|
||||
field_0x201 = param_3;
|
||||
}
|
||||
@@ -67,34 +63,41 @@ void dCcMassS_Mng::SetAttr(f32 param_0, f32 param_1, u8 param_2, u8 param_3) {
|
||||
void dCcMassS_Mng::Prepare() {
|
||||
cM3dGAab aab;
|
||||
aab.ClearForMinMax();
|
||||
|
||||
for (dCcMassS_Obj* pObj = mMassObjs; pObj < mMassObjs + mMassObjCount; ++pObj) {
|
||||
cCcD_ShapeAttr* objShape = pObj->GetObj()->GetShapeAttr();
|
||||
objShape->CalcAabBox();
|
||||
aab.SetMinMax(objShape->GetWorkAab());
|
||||
}
|
||||
|
||||
for (dCcMassS_Obj* pObj = mMassAreas; pObj < mMassAreas + mMassAreaCount; ++pObj) {
|
||||
cCcD_ShapeAttr* objShape = pObj->GetObj()->GetShapeAttr();
|
||||
objShape->CalcAabBox();
|
||||
aab.SetMinMax(objShape->GetWorkAab());
|
||||
}
|
||||
|
||||
if (field_0x202 & 1) {
|
||||
mCpsAttr.CalcAabBox();
|
||||
aab.SetMinMax(mCpsAttr.GetWorkAab());
|
||||
}
|
||||
|
||||
mDivideArea.SetArea(aab);
|
||||
for (dCcMassS_Obj* pObj = mMassObjs; pObj < mMassObjs + mMassObjCount; ++pObj) {
|
||||
cCcD_ShapeAttr* objShape = pObj->GetObj()->GetShapeAttr();
|
||||
cCcD_DivideInfo* divideInfo = &pObj->GetDivideInfo();
|
||||
mDivideArea.CalcDivideInfo(divideInfo, objShape->GetWorkAab(), 0);
|
||||
}
|
||||
|
||||
for (dCcMassS_Obj* pObj = mMassAreas; pObj < mMassAreas + mMassAreaCount; ++pObj) {
|
||||
cCcD_ShapeAttr* objShape = pObj->GetObj()->GetShapeAttr();
|
||||
cCcD_DivideInfo* divideInfo = &pObj->GetDivideInfo();
|
||||
mDivideArea.CalcDivideInfo(divideInfo, objShape->GetWorkAab(), 0);
|
||||
}
|
||||
|
||||
if (field_0x202 & 1) {
|
||||
mDivideArea.CalcDivideInfo(&mDivideInfo, mCpsAttr.GetWorkAab(), 0);
|
||||
}
|
||||
|
||||
mCamTopPos.set(0, -1000000000.0f, 0);
|
||||
mCamTopDist = 1000000000.0f;
|
||||
mCamBottomPos.set(0, -1000000000.0f, 0);
|
||||
@@ -103,14 +106,17 @@ void dCcMassS_Mng::Prepare() {
|
||||
|
||||
/* 800858AC-80085CF0 0801EC 0444+00 0/0 0/0 2/2 .text
|
||||
* Chk__12dCcMassS_MngFP4cXyzPP10fopAc_ac_cP15dCcMassS_HitInf */
|
||||
u32 dCcMassS_Mng::Chk(cXyz* xyz, fopAc_ac_c** pActor, dCcMassS_HitInf* hitInf) {
|
||||
u32 dCcMassS_Mng::Chk(cXyz* p_xyz, fopAc_ac_c** p_actor, dCcMassS_HitInf* p_hitInf) {
|
||||
cCcD_DivideInfo divideInfo;
|
||||
u32 flagsMaybe = 0;
|
||||
*pActor = NULL;
|
||||
mCylAttr.SetC(*xyz);
|
||||
*p_actor = NULL;
|
||||
|
||||
mCylAttr.SetC(*p_xyz);
|
||||
mCylAttr.CalcAabBox();
|
||||
|
||||
mDivideArea.CalcDivideInfoOverArea(÷Info, mCylAttr.GetWorkAab());
|
||||
hitInf->ClearPointer();
|
||||
p_hitInf->ClearPointer();
|
||||
|
||||
if (field_0x200 & 8) {
|
||||
for (dCcMassS_Obj* massObj = mMassAreas; massObj < mMassAreas + mMassAreaCount; ++massObj) {
|
||||
if (massObj->GetDivideInfo().Chk(divideInfo)) {
|
||||
@@ -119,17 +125,19 @@ u32 dCcMassS_Mng::Chk(cXyz* xyz, fopAc_ac_c** pActor, dCcMassS_HitInf* hitInf) {
|
||||
f32 f;
|
||||
if (obj->ChkCoSet() && mCylAttr.CrossCo(*objShape, &f)) {
|
||||
flagsMaybe |= 4;
|
||||
*pActor = obj->GetStts()->GetAc();
|
||||
if (hitInf != NULL) {
|
||||
hitInf->SetAreaHitObj(obj);
|
||||
*p_actor = obj->GetStts()->GetAc();
|
||||
if (p_hitInf != NULL) {
|
||||
p_hitInf->SetAreaHitObj(obj);
|
||||
}
|
||||
|
||||
if (massObj->GetCallback() != NULL) {
|
||||
massObj->GetCallback()(obj->GetStts()->GetAc(), xyz, field_0x201);
|
||||
massObj->GetCallback()(obj->GetStts()->GetAc(), p_xyz, field_0x201);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (dCcMassS_Obj* massObj = mMassObjs; massObj < mMassObjs + mMassObjCount; ++massObj) {
|
||||
if (massObj->GetDivideInfo().Chk(divideInfo)) {
|
||||
cCcD_Obj* obj = massObj->GetObj();
|
||||
@@ -139,18 +147,20 @@ u32 dCcMassS_Mng::Chk(cXyz* xyz, fopAc_ac_c** pActor, dCcMassS_HitInf* hitInf) {
|
||||
if (obj->ChkAtSet() && !gobjInf->ChkAtNoMass() &&
|
||||
mCylAttr.CrossAtTg(*objShape, &unusedVec) && (field_0x200 & 1)) {
|
||||
flagsMaybe |= 1;
|
||||
*pActor = obj->GetStts()->GetAc();
|
||||
if (hitInf != NULL) {
|
||||
hitInf->SetAtHitObj(obj);
|
||||
*p_actor = obj->GetStts()->GetAc();
|
||||
if (p_hitInf != NULL) {
|
||||
p_hitInf->SetAtHitObj(obj);
|
||||
}
|
||||
}
|
||||
|
||||
f32 f;
|
||||
if (obj->ChkCoSet() && mCylAttr.CrossCo(*objShape, &f) && (field_0x200 & 2)) {
|
||||
flagsMaybe |= 2;
|
||||
*pActor = obj->GetStts()->GetAc();
|
||||
*p_actor = obj->GetStts()->GetAc();
|
||||
|
||||
if (field_0x200 & 0x10) {
|
||||
Vec vec;
|
||||
PSVECSubtract(&(*pActor)->mCurrent.mPosition, xyz, &vec);
|
||||
PSVECSubtract(&(*p_actor)->mCurrent.mPosition, p_xyz, &vec);
|
||||
vec.y = 0;
|
||||
f32 vecMag = PSVECMag(&vec);
|
||||
if (cM3d_IsZero(vecMag)) {
|
||||
@@ -160,23 +170,27 @@ u32 dCcMassS_Mng::Chk(cXyz* xyz, fopAc_ac_c** pActor, dCcMassS_HitInf* hitInf) {
|
||||
}
|
||||
obj->GetStts()->PlusCcMove(vec.x, vec.y, vec.z);
|
||||
}
|
||||
if (hitInf != NULL) {
|
||||
hitInf->SetCoHitObj(obj);
|
||||
hitInf->SetCoHitLen(f);
|
||||
|
||||
if (p_hitInf != NULL) {
|
||||
p_hitInf->SetCoHitObj(obj);
|
||||
p_hitInf->SetCoHitLen(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
f32 f;
|
||||
if ((field_0x202 & 1) && mDivideInfo.Chk(divideInfo) && mCylAttr.CrossCo(mCpsAttr, &f)) {
|
||||
mResultCam |= 1;
|
||||
mResultCam |= 1 << (field_0x201 + 1);
|
||||
|
||||
if ((mResultCam & 2) || (mResultCam & 8)) {
|
||||
cXyz tmpVec;
|
||||
f32 plusH = xyz->y + mCylAttr.GetH();
|
||||
tmpVec.x = xyz->x;
|
||||
f32 plusH = p_xyz->y + mCylAttr.GetH();
|
||||
tmpVec.x = p_xyz->x;
|
||||
tmpVec.y = plusH;
|
||||
tmpVec.z = xyz->z;
|
||||
tmpVec.z = p_xyz->z;
|
||||
|
||||
if (mCamTopPos.y < (20.0f + plusH)) {
|
||||
f32 newCamTopDist = PSVECSquareDistance(&tmpVec, &mCpsAttr.GetStartP());
|
||||
if (mCamTopDist > newCamTopDist) {
|
||||
@@ -184,6 +198,7 @@ u32 dCcMassS_Mng::Chk(cXyz* xyz, fopAc_ac_c** pActor, dCcMassS_HitInf* hitInf) {
|
||||
mCamTopPos = tmpVec;
|
||||
}
|
||||
}
|
||||
|
||||
if (mCamBottomPos.y < (20.0f + plusH)) {
|
||||
f32 newCamBottomDist = PSVECSquareDistance(&tmpVec, &mCpsAttr.GetEndP());
|
||||
if (mCamBottomDist > newCamBottomDist) {
|
||||
@@ -193,6 +208,7 @@ u32 dCcMassS_Mng::Chk(cXyz* xyz, fopAc_ac_c** pActor, dCcMassS_HitInf* hitInf) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return flagsMaybe;
|
||||
}
|
||||
|
||||
@@ -200,12 +216,15 @@ u32 dCcMassS_Mng::Chk(cXyz* xyz, fopAc_ac_c** pActor, dCcMassS_HitInf* hitInf) {
|
||||
void dCcMassS_Mng::Clear() {
|
||||
mMassObjCount = 0;
|
||||
mMassAreaCount = 0;
|
||||
|
||||
for (int i = 0; i < (s32)ARRAY_SIZE(mMassObjs); ++i) {
|
||||
mMassObjs[i].Clear();
|
||||
}
|
||||
|
||||
for (int i = 0; i < (s32)ARRAY_SIZE(mMassAreas); ++i) {
|
||||
mMassAreas[i].Clear();
|
||||
}
|
||||
|
||||
mCylAttr.SetR(0.0f);
|
||||
mCylAttr.SetH(0.0f);
|
||||
field_0x200 = 0;
|
||||
@@ -213,17 +232,17 @@ void dCcMassS_Mng::Clear() {
|
||||
}
|
||||
|
||||
/* 80085D98-80085E6C 0806D8 00D4+00 0/0 4/4 7/7 .text Set__12dCcMassS_MngFP8cCcD_ObjUc */
|
||||
void dCcMassS_Mng::Set(cCcD_Obj* obj, u8 priority) {
|
||||
void dCcMassS_Mng::Set(cCcD_Obj* p_obj, u8 priority) {
|
||||
if (mMassObjCount >= (s32)ARRAY_SIZE(mMassObjs)) {
|
||||
for (int i = 0; i < (s32)ARRAY_SIZE(mMassObjs); ++i) {
|
||||
int prevPrio = mMassObjs[i].GetPriority();
|
||||
if (prevPrio > priority || (prevPrio == priority && cM_rndF(1.0f) < 0.5f)) {
|
||||
mMassObjs[i].Set(obj, priority, NULL);
|
||||
mMassObjs[i].Set(p_obj, priority, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mMassObjs[mMassObjCount].Set(obj, priority, NULL);
|
||||
mMassObjs[mMassObjCount].Set(p_obj, priority, NULL);
|
||||
mMassObjCount++;
|
||||
}
|
||||
}
|
||||
@@ -243,6 +262,6 @@ u8 dCcMassS_Mng::GetResultCam() const {
|
||||
|
||||
/* 80085EB8-80085ED4 0807F8 001C+00 0/0 1/1 0/0 .text GetCamTopPos__12dCcMassS_MngFP3Vec
|
||||
*/
|
||||
void dCcMassS_Mng::GetCamTopPos(Vec* out) {
|
||||
*out = mCamTopPos;
|
||||
void dCcMassS_Mng::GetCamTopPos(Vec* p_out) {
|
||||
*p_out = mCamTopPos;
|
||||
}
|
||||
|
||||
+184
-122
@@ -52,8 +52,64 @@ BOOL daPy_py_c::checkNowWolf() {
|
||||
/* ############################################################################################## */
|
||||
/* 803AC418-803AC500 009538 00E8+00 1/1 0/0 0/0 .data plCutLRC */
|
||||
SECTION_DATA static int plCutLRC[58] = {
|
||||
0, 0, 1, 1, 2, 0, 2, 1, 0, 0, 0, 2, 1, 1, 1, 2, 2, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 2, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0,
|
||||
0, //
|
||||
0, // CUT_VERTICAL
|
||||
1, // CUT_STAB
|
||||
1, // CUT_SWEEP
|
||||
2, // CUT_HORIZONTAL
|
||||
0, // CUT_HEAD
|
||||
2, // CUT_LEFT_SWEEP_FINISH
|
||||
1, // CUT_DOWN_FINISH
|
||||
0, // CUT_TURN_RIGHT
|
||||
0, //
|
||||
0, // CUT_JUMP
|
||||
2, //
|
||||
1, //
|
||||
1, //
|
||||
1, //
|
||||
2, //
|
||||
2, // CUT_AIR
|
||||
1, //
|
||||
1, // CUT_LARGE_JUMP_INIT
|
||||
0, // CUT_LARGE_JUMP
|
||||
0, // CUT_LARGE_JUMP_FINISH
|
||||
1, // CUT_RIGHT_SWEEP_FINISH
|
||||
0, // CUT_TURN_LEFT
|
||||
0, // CUT_LARGE_TURN_LEFT
|
||||
0, // CUT_LARGE_TURN_RIGHT
|
||||
0, //
|
||||
0, // CUT_FAST_MOVE
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, // CUT_TWIRL
|
||||
0, // CUT_FAST
|
||||
0, // CUT_STAB_FINISH
|
||||
2, // CUT_STAB_COMBO
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
2, //
|
||||
1, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
2, //
|
||||
1, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
0, //
|
||||
};
|
||||
|
||||
/* 800873B0-800873D4 081CF0 0024+00 0/0 0/0 3/3 .text pl_cut_LRC__Fi */
|
||||
@@ -113,31 +169,31 @@ static int getMapInfo(s8 param_0) {
|
||||
}
|
||||
|
||||
/* 800874F0-80087514 081E30 0024+00 2/2 0/0 0/0 .text getHitId__FP8cCcD_Obji */
|
||||
static u32 getHitId(cCcD_Obj* obj, int param_1) {
|
||||
dCcD_GObjInf* dObj = static_cast<dCcD_GObjInf*>(obj);
|
||||
return dObj->getHitSeID(dObj->GetAtSe(), param_1);
|
||||
static u32 getHitId(cCcD_Obj* p_obj, int useReboundSE) {
|
||||
dCcD_GObjInf* dObj = static_cast<dCcD_GObjInf*>(p_obj);
|
||||
return dObj->getHitSeID(dObj->GetAtSe(), useReboundSE);
|
||||
}
|
||||
|
||||
/* 80087514-80087594 081E54 0080+00 0/0 0/0 47/47 .text
|
||||
* def_se_set__FP10Z2CreatureP8cCcD_ObjUlP10fopAc_ac_c */
|
||||
void def_se_set(Z2Creature* sound, cCcD_Obj* collider, u32 map_info, fopAc_ac_c* actor) {
|
||||
if (sound != NULL) {
|
||||
int tmp;
|
||||
if (actor != NULL && fopAcM_checkStatus(actor, 0x280000)) {
|
||||
tmp = 0;
|
||||
void def_se_set(Z2Creature* p_sound, cCcD_Obj* p_collider, u32 map_info, fopAc_ac_c* p_actor) {
|
||||
if (p_sound != NULL) {
|
||||
int useReboundSE;
|
||||
if (p_actor != NULL && fopAcM_checkStatus(p_actor, 0x280000)) {
|
||||
useReboundSE = false;
|
||||
} else {
|
||||
tmp = 1;
|
||||
useReboundSE = true;
|
||||
}
|
||||
sound->startCollisionSE(getHitId(collider, tmp), map_info);
|
||||
p_sound->startCollisionSE(getHitId(p_collider, useReboundSE), map_info);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80087594-80087A58 081ED4 04C4+00 1/1 0/0 0/0 .text at_power_get__FP11dCcU_AtInfo */
|
||||
static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
u8 power = info->mpCollider->GetAtAtp();
|
||||
static u8 at_power_get(dCcU_AtInfo* p_info) {
|
||||
u8 power = p_info->mpCollider->GetAtAtp();
|
||||
|
||||
if (info->mPowerType == 0) {
|
||||
if (info->mpCollider->ChkAtType(0x10000000)) {
|
||||
if (p_info->mPowerType == 0) {
|
||||
if (p_info->mpCollider->ChkAtType(0x10000000)) {
|
||||
power = 0;
|
||||
} else if (power == 1) {
|
||||
power = 1;
|
||||
@@ -150,8 +206,8 @@ static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
} else if (power >= 4) {
|
||||
power = 200;
|
||||
}
|
||||
} else if (info->mPowerType == 6) {
|
||||
if (info->mpCollider->ChkAtType(0x10000000)) {
|
||||
} else if (p_info->mPowerType == 6) {
|
||||
if (p_info->mpCollider->ChkAtType(0x10000000)) {
|
||||
power = 0;
|
||||
} else if (power == 1) {
|
||||
power = 1;
|
||||
@@ -162,10 +218,10 @@ static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
} else if (power >= 3) {
|
||||
power *= 10;
|
||||
}
|
||||
} else if (info->mPowerType == 4) {
|
||||
if (info->mpCollider->ChkAtType(0x400000)) {
|
||||
} else if (p_info->mPowerType == 4) {
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_IRON_BALL)) {
|
||||
power = 200;
|
||||
} else if (info->mpCollider->ChkAtType(0x10000000)) {
|
||||
} else if (p_info->mpCollider->ChkAtType(0x10000000)) {
|
||||
power = 0;
|
||||
} else if (power == 1) {
|
||||
power = 1;
|
||||
@@ -178,8 +234,8 @@ static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
} else if (power >= 4) {
|
||||
power = 200;
|
||||
}
|
||||
} else if (info->mPowerType == 5) {
|
||||
if (info->mpCollider->ChkAtType(0x2000)) {
|
||||
} else if (p_info->mPowerType == 5) {
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_ARROW)) {
|
||||
power = 0;
|
||||
} else if (power == 1) {
|
||||
power = 1;
|
||||
@@ -188,8 +244,8 @@ static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
} else if (power >= 3) {
|
||||
power = 4;
|
||||
}
|
||||
} else if (info->mPowerType == 2) {
|
||||
if (info->mpCollider->ChkAtType(0x400000)) {
|
||||
} else if (p_info->mPowerType == 2) {
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_IRON_BALL)) {
|
||||
power = 200;
|
||||
} else if (power == 1) {
|
||||
power = 1;
|
||||
@@ -202,14 +258,14 @@ static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
} else if (power >= 4) {
|
||||
power = 200;
|
||||
}
|
||||
} else if (info->mPowerType == 1) {
|
||||
if (info->mpCollider->ChkAtType(0x400000) || power >= 4) {
|
||||
} else if (p_info->mPowerType == 1) {
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_IRON_BALL) || power >= 4) {
|
||||
power = 200;
|
||||
} else {
|
||||
power *= 10;
|
||||
}
|
||||
} else if (info->mPowerType == 3) {
|
||||
if (info->mpCollider->ChkAtType(0x400000) || power >= 4) {
|
||||
} else if (p_info->mPowerType == 3) {
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_IRON_BALL) || power >= 4) {
|
||||
power = 200;
|
||||
} else if (power == 1) {
|
||||
power = 10;
|
||||
@@ -218,10 +274,10 @@ static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
} else if (power >= 3) {
|
||||
power = 40;
|
||||
}
|
||||
} else if (info->mPowerType == 7) {
|
||||
if (info->mpCollider->ChkAtType(0x420008)) {
|
||||
} else if (p_info->mPowerType == 7) {
|
||||
if (p_info->mpCollider->ChkAtType(0x420008)) {
|
||||
power = 50;
|
||||
} else if (info->mpCollider->ChkAtType(0x2000)) {
|
||||
} else if (p_info->mpCollider->ChkAtType(AT_TYPE_ARROW)) {
|
||||
power = 27;
|
||||
} else if (power == 1) {
|
||||
power = 1;
|
||||
@@ -234,7 +290,7 @@ static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
} else if (power >= 4) {
|
||||
power = 200;
|
||||
}
|
||||
} else if (info->mPowerType == 8) {
|
||||
} else if (p_info->mPowerType == 8) {
|
||||
if (power == 1) {
|
||||
power = 3;
|
||||
} else if (power == 2) {
|
||||
@@ -244,11 +300,11 @@ static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
} else if (power >= 3) {
|
||||
power *= 10;
|
||||
}
|
||||
} else if (info->mPowerType == 9 || info->mPowerType == 10) {
|
||||
if (info->mpCollider->ChkAtType(0x4000)) {
|
||||
} else if (p_info->mPowerType == 9 || p_info->mPowerType == 10) {
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_HOOKSHOT)) {
|
||||
power = 0;
|
||||
}
|
||||
if (info->mpCollider->ChkAtType(0x400000)) {
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_IRON_BALL)) {
|
||||
power = 19;
|
||||
}
|
||||
|
||||
@@ -263,8 +319,8 @@ static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
} else if (power >= 4) {
|
||||
power = 200;
|
||||
}
|
||||
} else if (info->mPowerType == 11) {
|
||||
if (info->mpCollider->ChkAtType(0x4000)) {
|
||||
} else if (p_info->mPowerType == 11) {
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_HOOKSHOT)) {
|
||||
power = 0;
|
||||
}
|
||||
|
||||
@@ -277,7 +333,7 @@ static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
} else if (power >= 4) {
|
||||
power = 100;
|
||||
}
|
||||
} else if (info->mPowerType == 12) {
|
||||
} else if (p_info->mPowerType == 12) {
|
||||
if (power == 1) {
|
||||
power = 10;
|
||||
} else if (power == 2) {
|
||||
@@ -294,57 +350,59 @@ static u8 at_power_get(dCcU_AtInfo* info) {
|
||||
|
||||
/* 80087A58-80087C04 082398 01AC+00 1/1 0/0 38/38 .text at_power_check__FP11dCcU_AtInfo
|
||||
*/
|
||||
fopAc_ac_c* at_power_check(dCcU_AtInfo* info) {
|
||||
if (info->mpCollider == NULL) {
|
||||
fopAc_ac_c* at_power_check(dCcU_AtInfo* p_info) {
|
||||
if (p_info->mpCollider == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
info->mpActor = info->mpCollider->GetAc();
|
||||
info->mHitType = 12;
|
||||
info->mAttackPower = 0;
|
||||
info->mHitBit = 0;
|
||||
p_info->mpActor = p_info->mpCollider->GetAc();
|
||||
p_info->mHitType = 12;
|
||||
p_info->mAttackPower = 0;
|
||||
p_info->mHitBit = 0;
|
||||
|
||||
if (info->mpActor != NULL) {
|
||||
info->mAttackPower = at_power_get(info);
|
||||
if (p_info->mpActor != NULL) {
|
||||
p_info->mAttackPower = at_power_get(p_info);
|
||||
|
||||
s16 ac_name = fopAcM_GetName(info->mpActor);
|
||||
s16 ac_name = fopAcM_GetName(p_info->mpActor);
|
||||
if (ac_name == PROC_ALINK || ac_name == PROC_ALINK) {
|
||||
if (info->mpCollider->ChkAtType(0x8000) || info->mpCollider->ChkAtType(0x400000)) {
|
||||
info->mHitType = 9;
|
||||
if (p_info->mpCollider->ChkAtType(0x8000) ||
|
||||
p_info->mpCollider->ChkAtType(AT_TYPE_IRON_BALL)) {
|
||||
p_info->mHitType = HIT_TYPE_LINK_HEAVY_ATTACK;
|
||||
} else {
|
||||
info->mHitType = 1;
|
||||
info->mHitBit = cc_pl_cut_bit_get();
|
||||
p_info->mHitType = HIT_TYPE_LINK_NORMAL_ATTACK;
|
||||
p_info->mHitBit = cc_pl_cut_bit_get();
|
||||
}
|
||||
} else if (ac_name == PROC_NBOMB) {
|
||||
info->mHitType = 2;
|
||||
info->mHitBit = 0x10000000;
|
||||
p_info->mHitType = HIT_TYPE_BOMB;
|
||||
p_info->mHitBit = 0x10000000;
|
||||
} else if (ac_name == PROC_BOOMERANG) {
|
||||
info->mHitType = 10;
|
||||
info->mHitBit = 0x40000000;
|
||||
p_info->mHitType = HIT_TYPE_BOOMERANG;
|
||||
p_info->mHitBit = 0x40000000;
|
||||
} else if (ac_name == PROC_ARROW) {
|
||||
info->mHitType = 15;
|
||||
info->mHitBit = 0x80000000;
|
||||
p_info->mHitType = HIT_TYPE_ARROW;
|
||||
p_info->mHitBit = 0x80000000;
|
||||
}
|
||||
}
|
||||
|
||||
info->mHitStatus = 0;
|
||||
if (info->mpCollider->ChkAtType(0x40) || info->mpCollider->ChkAtType(0x10000) ||
|
||||
info->mpCollider->ChkAtType(0x80) || info->mpCollider->ChkAtType(0x10)) {
|
||||
info->mHitType = 0x10;
|
||||
} else if (info->mpCollider->ChkAtType(0x4000)) {
|
||||
info->mHitBit = 0x1000;
|
||||
p_info->mHitStatus = 0;
|
||||
if (p_info->mpCollider->ChkAtType(0x40) || p_info->mpCollider->ChkAtType(AT_TYPE_BOOMERANG) ||
|
||||
p_info->mpCollider->ChkAtType(AT_TYPE_SLINGSHOT) ||
|
||||
p_info->mpCollider->ChkAtType(AT_TYPE_SHIELD_ATTACK)) {
|
||||
p_info->mHitType = HIT_TYPE_STUN;
|
||||
} else if (p_info->mpCollider->ChkAtType(AT_TYPE_HOOKSHOT)) {
|
||||
p_info->mHitBit = 0x1000;
|
||||
} else {
|
||||
s16 ac_name = fopAcM_GetName(info->mpActor);
|
||||
s16 ac_name = fopAcM_GetName(p_info->mpActor);
|
||||
if (ac_name == PROC_ALINK || ac_name == PROC_ALINK) {
|
||||
if (dCcD_GetGObjInf(info->mpCollider)->GetAtSpl() == 1) {
|
||||
info->mHitStatus = 1;
|
||||
if (dCcD_GetGObjInf(p_info->mpCollider)->GetAtSpl() == 1) {
|
||||
p_info->mHitStatus = 1;
|
||||
}
|
||||
} else if (info->mAttackPower >= 3) {
|
||||
info->mHitStatus = 1;
|
||||
} else if (p_info->mAttackPower >= 3) {
|
||||
p_info->mHitStatus = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return info->mpActor;
|
||||
return p_info->mpActor;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
@@ -381,113 +439,115 @@ SECTION_SDATA2 static f32 lit_4218[1 + 1 /* padding */] = {
|
||||
|
||||
/* 80087C04-80088134 082544 0530+00 0/0 0/0 84/84 .text cc_at_check__FP10fopAc_ac_cP11dCcU_AtInfo
|
||||
*/
|
||||
// reg issues
|
||||
// just float reg issues
|
||||
#ifdef NONMATCHING
|
||||
fopAc_ac_c* cc_at_check(fopAc_ac_c* enemy, dCcU_AtInfo* info) {
|
||||
fopAc_ac_c* cc_at_check(fopAc_ac_c* p_enemy, dCcU_AtInfo* p_info) {
|
||||
daPy_py_c* link = (daPy_py_c*)dComIfGp_getPlayer(0);
|
||||
info->mpActor = at_power_check(info);
|
||||
p_info->mpActor = at_power_check(p_info);
|
||||
|
||||
if (info->mpActor != NULL) {
|
||||
cXyz tmp = info->mpActor->mSpeed;
|
||||
if (p_info->mpActor != NULL) {
|
||||
cXyz tmp = p_info->mpActor->mSpeed;
|
||||
tmp.y = 0.0f;
|
||||
if (tmp.abs() > 100.0f) {
|
||||
f32 x = info->mpActor->mSpeed.x;
|
||||
f32 z = info->mpActor->mSpeed.z;
|
||||
info->mHitDirection = cM_atan2s(-x, -z) + (s16)cM_rndFX(4000.0f);
|
||||
f32 x = p_info->mpActor->mSpeed.x;
|
||||
f32 z = p_info->mpActor->mSpeed.z;
|
||||
p_info->mHitDirection = cM_atan2s(-x, -z) + (s16)cM_rndFX(4000.0f);
|
||||
} else {
|
||||
if (fopAcM_GetName(info->mpActor) == PROC_BOOMERANG) {
|
||||
f32 x_diff = enemy->mCurrent.mPosition.x - link->mCurrent.mPosition.x;
|
||||
f32 z_diff = enemy->mCurrent.mPosition.z - link->mCurrent.mPosition.z;
|
||||
info->mHitDirection = cM_atan2s(-x_diff, -z_diff) + (s16)cM_rndFX(10000.0f);
|
||||
if (fopAcM_GetName(p_info->mpActor) == PROC_BOOMERANG) {
|
||||
f32 x_diff = p_enemy->mCurrent.mPosition.x - link->mCurrent.mPosition.x;
|
||||
f32 z_diff = p_enemy->mCurrent.mPosition.z - link->mCurrent.mPosition.z;
|
||||
p_info->mHitDirection = cM_atan2s(-x_diff, -z_diff) + (s16)cM_rndFX(10000.0f);
|
||||
} else {
|
||||
f32 x_diff = enemy->mCurrent.mPosition.x - info->mpActor->mCurrent.mPosition.x;
|
||||
f32 z_diff = enemy->mCurrent.mPosition.z - info->mpActor->mCurrent.mPosition.z;
|
||||
info->mHitDirection = cM_atan2s(-x_diff, -z_diff);
|
||||
f32 x_diff = p_enemy->mCurrent.mPosition.x - p_info->mpActor->mCurrent.mPosition.x;
|
||||
f32 z_diff = p_enemy->mCurrent.mPosition.z - p_info->mpActor->mCurrent.mPosition.z;
|
||||
p_info->mHitDirection = cM_atan2s(-x_diff, -z_diff);
|
||||
}
|
||||
}
|
||||
|
||||
if (info->mHitType == 1 && link->getCutType() == daPy_py_c::TYPE_CUT_HEAD) {
|
||||
info->mHitDirection = link->mCollisionRot.y;
|
||||
if (p_info->mHitType == HIT_TYPE_LINK_NORMAL_ATTACK &&
|
||||
link->getCutType() == daPy_py_c::TYPE_CUT_HEAD) {
|
||||
p_info->mHitDirection = link->mCollisionRot.y;
|
||||
}
|
||||
|
||||
if (info->mpCollider->ChkAtType(0x4000) && fopAcM_checkStatus(enemy, 0x380000)) {
|
||||
info->mAttackPower = 0;
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_HOOKSHOT) &&
|
||||
fopAcM_checkStatus(p_enemy, 0x380000)) {
|
||||
p_info->mAttackPower = 0;
|
||||
}
|
||||
|
||||
if (static_cast<dCcD_GObjInf*>(info->mpCollider)->GetAtMtrl() == 4) {
|
||||
if (fopAcM_GetName(enemy) == PROC_B_GND) {
|
||||
info->mAttackPower = 0;
|
||||
} else if (fopAcM_GetName(enemy) != PROC_B_ZANT) {
|
||||
info->mAttackPower = 100;
|
||||
if (static_cast<dCcD_GObjInf*>(p_info->mpCollider)->GetAtMtrl() == 4) {
|
||||
if (fopAcM_GetName(p_enemy) == PROC_B_GND) {
|
||||
p_info->mAttackPower = 0;
|
||||
} else if (fopAcM_GetName(p_enemy) != PROC_B_ZANT) {
|
||||
p_info->mAttackPower = 100;
|
||||
}
|
||||
}
|
||||
|
||||
if (info->mHitType == 1) {
|
||||
if (p_info->mHitType == HIT_TYPE_LINK_NORMAL_ATTACK) {
|
||||
if (!daPy_py_c::checkNowWolf()) {
|
||||
if (link->checkMasterSwordEquip()) {
|
||||
info->mAttackPower *= 2;
|
||||
p_info->mAttackPower *= 2;
|
||||
}
|
||||
|
||||
if (daPy_py_c::checkWoodSwordEquip()) {
|
||||
// probably supposed to be some sort of division
|
||||
info->mAttackPower = info->mAttackPower >> 1;
|
||||
p_info->mAttackPower /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (link->getSwordAtUpTime()) {
|
||||
info->mAttackPower *= 2;
|
||||
info->mHitStatus = 1;
|
||||
p_info->mAttackPower *= 2;
|
||||
p_info->mHitStatus = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (info->mAttackPower != 0) {
|
||||
enemy->field_0x562 -= info->mAttackPower;
|
||||
if (p_info->mAttackPower != 0) {
|
||||
p_enemy->field_0x562 -= p_info->mAttackPower;
|
||||
}
|
||||
|
||||
s8 pause_time = 0;
|
||||
if (info->mAttackPower != 0 && enemy->field_0x562 <= 0) {
|
||||
info->mHitStatus = 2;
|
||||
enemy->field_0x562 = 0;
|
||||
if (p_info->mAttackPower != 0 && p_enemy->field_0x562 <= 0) {
|
||||
p_info->mHitStatus = 2;
|
||||
p_enemy->field_0x562 = 0;
|
||||
}
|
||||
|
||||
int uvar8;
|
||||
if (info->mpCollider->ChkAtType(0x4000) && !fopAcM_checkStatus(enemy, 0x280000)) {
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_HOOKSHOT) &&
|
||||
!fopAcM_checkStatus(p_enemy, 0x280000)) {
|
||||
uvar8 = 1;
|
||||
} else {
|
||||
uvar8 = 0;
|
||||
}
|
||||
|
||||
if (info->mpSound != NULL) {
|
||||
if (info->field_0x18 != 0) {
|
||||
info->mpSound->startCollisionSE(getHitId(info->mpCollider, uvar8),
|
||||
info->field_0x18);
|
||||
if (p_info->mpSound != NULL) {
|
||||
if (p_info->field_0x18 != 0) {
|
||||
p_info->mpSound->startCollisionSE(getHitId(p_info->mpCollider, uvar8),
|
||||
p_info->field_0x18);
|
||||
} else {
|
||||
info->mpSound->startCollisionSE(getHitId(info->mpCollider, uvar8),
|
||||
getMapInfo(info->mHitStatus));
|
||||
p_info->mpSound->startCollisionSE(getHitId(p_info->mpCollider, uvar8),
|
||||
getMapInfo(p_info->mHitStatus));
|
||||
}
|
||||
}
|
||||
|
||||
if (info->mHitStatus != 0) {
|
||||
if (p_info->mHitStatus != 0) {
|
||||
pause_time = 5;
|
||||
} else {
|
||||
if (info->mAttackPower > 1) {
|
||||
if (p_info->mAttackPower > 1) {
|
||||
pause_time = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (info->mpCollider->ChkAtType(0x8000000) ||
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_MIDNA_LOCK) ||
|
||||
((daPy_py_c*)dComIfGp_getPlayer(0))->checkHorseRide()) {
|
||||
// actor is Bulblin or Horseback Ganon
|
||||
// add bulblin class later
|
||||
if ((fopAcM_GetName(enemy) == PROC_E_RD && *(char*)((char*)&enemy + 0x1292) != 0) ||
|
||||
fopAcM_GetName(enemy) == PROC_B_GND) {
|
||||
if ((fopAcM_GetName(p_enemy) == PROC_E_RD &&
|
||||
static_cast<e_rd_class*>(p_enemy)->field_0x129a != 0) ||
|
||||
fopAcM_GetName(p_enemy) == PROC_B_GND) {
|
||||
pause_time = 3;
|
||||
} else {
|
||||
pause_time = 0;
|
||||
}
|
||||
}
|
||||
|
||||
s16 ac_name = fopAcM_GetName(enemy);
|
||||
s16 ac_name = fopAcM_GetName(p_enemy);
|
||||
// actor is Stalkin, Chu, Keese, Shadow Keese, Shadow Vermin, Baby Gohma, or Rat
|
||||
if (ac_name == PROC_E_BS || ac_name == PROC_E_SM2 || ac_name == PROC_E_BA ||
|
||||
ac_name == PROC_E_YK || ac_name == PROC_E_YG || ac_name == PROC_E_GM ||
|
||||
@@ -495,15 +555,17 @@ fopAc_ac_c* cc_at_check(fopAc_ac_c* enemy, dCcU_AtInfo* info) {
|
||||
pause_time = 0;
|
||||
}
|
||||
|
||||
if (info->mHitType == 1 || info->mpCollider->ChkAtType(0x8)) {
|
||||
if (!link->checkCutJumpCancelTurn() && info->mpCollider->ChkAtType(0x8)) {
|
||||
if ((p_info->mHitType == HIT_TYPE_LINK_NORMAL_ATTACK ||
|
||||
p_info->mpCollider->ChkAtType(AT_TYPE_THROW_OBJ)) &&
|
||||
!link->checkCutJumpCancelTurn()) {
|
||||
if (p_info->mpCollider->ChkAtType(AT_TYPE_THROW_OBJ)) {
|
||||
pause_time = 4;
|
||||
}
|
||||
dScnPly_c::setPauseTimer(pause_time);
|
||||
}
|
||||
}
|
||||
|
||||
return info->mpActor;
|
||||
return p_info->mpActor;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
|
||||
Reference in New Issue
Block a user