mirror of
https://github.com/zeldaret/tp
synced 2026-06-02 02:00:30 -04:00
Misc fixes (#2830)
* Replace DANPCF_C_HACK with a better fakematch * d_a_obj_item OK * Fix ninja diff * Misc debug/nonmatching fixes * Fix ninja diff for PAL * Fix bad PAL split
This commit is contained in:
@@ -658,10 +658,7 @@ bool J2DWindowEx::setBlackWhite(JUtility::TColor black, JUtility::TColor white)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool bVar1 = false;
|
||||
if ((u32)black != 0 || (u32)white != 0xffffffff) {
|
||||
bVar1 = true;
|
||||
}
|
||||
bool bVar1 = (u32)black != 0 || (u32)white != 0xffffffff;
|
||||
u8 uVar3 = bVar1 ? 2 : 1;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
mFrameMaterial[i]->getTevBlock()->setTevStageNum(uVar3);
|
||||
|
||||
@@ -118,7 +118,7 @@ bool JASHeap::free() {
|
||||
JSUTreeIterator<JASHeap> stack_20;
|
||||
for (JSUTreeIterator<JASHeap> it(mTree.getFirstChild()); it != mTree.getEndChild(); it = stack_20) {
|
||||
stack_20 = it;
|
||||
stack_20++;
|
||||
++stack_20;
|
||||
it->free();
|
||||
}
|
||||
JSUTree<JASHeap>* parentTree = mTree.getParent();
|
||||
|
||||
@@ -155,7 +155,7 @@ void TObject::prepare(data::TParse_TBlock const& rBlock, TControl* pControl) {
|
||||
JGADGET_WARNMSG(211, "unknown paragraph : " << u32Type);
|
||||
}
|
||||
pData = dat.next;
|
||||
JUT_ASSERT(214, pData!=0);
|
||||
JUT_ASSERT(214, pData!=NULL);
|
||||
}
|
||||
end:
|
||||
JGADGET_ASSERTWARN(216, pData==pNext);
|
||||
@@ -414,7 +414,7 @@ bool TParse::parseHeader_next(void const** ppData_inout, u32* puBlock_out, u32 f
|
||||
ASSERT(puBlock_out != 0);
|
||||
|
||||
const void* pData = *ppData_inout;
|
||||
ASSERT(pData != 0);
|
||||
ASSERT(pData != NULL);
|
||||
|
||||
const data::TParse_THeader header(pData);
|
||||
*ppData_inout = header.getContent();
|
||||
@@ -449,7 +449,7 @@ bool TParse::parseBlock_next(void const** ppData_inout, u32* puData_out, u32 fla
|
||||
ASSERT(puData_out != 0);
|
||||
|
||||
const void* pData = *ppData_inout;
|
||||
ASSERT(pData != 0);
|
||||
ASSERT(pData != NULL);
|
||||
data::TParse_TBlock blk(pData);
|
||||
*ppData_inout = blk.getNext();
|
||||
*puData_out = blk.get_size();
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace stb {
|
||||
namespace data {
|
||||
|
||||
void TParse_TSequence::getData(TData* pData) const {
|
||||
ASSERT(pData != 0);
|
||||
ASSERT(pData != NULL);
|
||||
|
||||
pData->content = NULL;
|
||||
pData->next = NULL;
|
||||
@@ -35,7 +35,7 @@ void TParse_TSequence::getData(TData* pData) const {
|
||||
}
|
||||
|
||||
void TParse_TParagraph::getData(TData* pData) const {
|
||||
ASSERT(pData != 0);
|
||||
ASSERT(pData != NULL);
|
||||
|
||||
const void* data = getRaw();
|
||||
u32 result;
|
||||
|
||||
@@ -198,29 +198,31 @@ void TObject::process_sequence_() {
|
||||
switch (type) {
|
||||
case 0:
|
||||
JUT_EXPECT(u32Value == 0);
|
||||
JUT_EXPECT(pContent == 0);
|
||||
JUT_EXPECT(pContent == NULL);
|
||||
break;
|
||||
case 1:
|
||||
JUT_EXPECT(pContent == 0);
|
||||
JUT_EXPECT(pContent == NULL);
|
||||
setFlag_operation_(u32Value);
|
||||
break;
|
||||
case 2:
|
||||
JUT_EXPECT(pContent == 0);
|
||||
JUT_EXPECT(pContent == NULL);
|
||||
setWait(u32Value);
|
||||
break;
|
||||
case 3:
|
||||
JUT_EXPECT(pContent == 0);
|
||||
case 3: {
|
||||
JUT_EXPECT(pContent == NULL);
|
||||
s32 off = toInt32FromUInt24_(u32Value);
|
||||
void* nextseq = (void*)getSequence_offset(off);
|
||||
setSequence_next(nextseq);
|
||||
break;
|
||||
case 4:
|
||||
JUT_EXPECT(pContent == 0);
|
||||
}
|
||||
case 4: {
|
||||
JUT_EXPECT(pContent == NULL);
|
||||
u32 val = toInt32FromUInt24_(u32Value);
|
||||
suspend(val);
|
||||
break;
|
||||
case 0x80:
|
||||
ASSERT(pContent != 0);
|
||||
}
|
||||
case 0x80: {
|
||||
ASSERT(pContent != NULL);
|
||||
void* p = (void*)pContent;
|
||||
data::TParse_TParagraph para(NULL);
|
||||
while (p < pNext) {
|
||||
@@ -234,10 +236,11 @@ void TObject::process_sequence_() {
|
||||
on_paragraph(para_dat.type, para_dat.content, para_dat.param);
|
||||
}
|
||||
p = (void*)para_dat.next;
|
||||
ASSERT(p != 0);
|
||||
ASSERT(p != NULL);
|
||||
}
|
||||
JUT_EXPECT(p == pNext);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
JUTWarn w;
|
||||
w << "unknown sequence : " << dat.type;
|
||||
@@ -248,32 +251,34 @@ void TObject::process_sequence_() {
|
||||
void TObject::process_paragraph_reserved_(u32 arg1, const void* pContent, u32 uSize) {
|
||||
switch (arg1) {
|
||||
case 0x1:
|
||||
ASSERT(pContent != 0);
|
||||
ASSERT(pContent != NULL);
|
||||
ASSERT(uSize == 4);
|
||||
setFlag_operation_(*(u32*)pContent);
|
||||
break;
|
||||
case 0x2:
|
||||
ASSERT(pContent != 0);
|
||||
ASSERT(pContent != NULL);
|
||||
ASSERT(uSize == 4);
|
||||
setWait(*(u32*)pContent);
|
||||
break;
|
||||
case 0x3:
|
||||
ASSERT(pContent != 0);
|
||||
case 0x3: {
|
||||
ASSERT(pContent != NULL);
|
||||
ASSERT(uSize == 4);
|
||||
const void* seq = getSequence_offset(*(s32*)pContent);
|
||||
setSequence_next(seq);
|
||||
break;
|
||||
}
|
||||
case 0x80:
|
||||
on_data(NULL, 0, pContent, uSize);
|
||||
break;
|
||||
case 0x81:
|
||||
case 0x81: {
|
||||
data::TParse_TParagraph_dataID dataID(pContent);
|
||||
const void* temp = dataID.getContent();
|
||||
on_data(dataID.get_ID(), dataID.get_IDSize(), temp,
|
||||
uSize - ((uintptr_t)temp - (uintptr_t)dataID.getRaw()));
|
||||
break;
|
||||
}
|
||||
case 0x82:
|
||||
ASSERT(pContent != 0);
|
||||
ASSERT(pContent != NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -300,7 +305,7 @@ void TControl::appendObject(TObject* p) {
|
||||
}
|
||||
|
||||
void TControl::removeObject(TObject* p) {
|
||||
ASSERT(p != 0);
|
||||
ASSERT(p != NULL);
|
||||
ASSERT(p->getControl() == this);
|
||||
p->setControl_(NULL);
|
||||
mObjectContainer.Erase(p);
|
||||
@@ -308,7 +313,7 @@ void TControl::removeObject(TObject* p) {
|
||||
|
||||
void TControl::destroyObject(TObject* p) {
|
||||
removeObject(p);
|
||||
ASSERT(pFactory != 0);
|
||||
ASSERT(pFactory != NULL);
|
||||
pFactory->destroy(p);
|
||||
}
|
||||
|
||||
@@ -376,11 +381,11 @@ TParse::TParse(TControl* pControl) : pControl(pControl) {}
|
||||
TParse::~TParse() {}
|
||||
|
||||
bool TParse::parseHeader_next(const void** ppData_inout, u32* puBlock_out, u32 flags) {
|
||||
ASSERT(ppData_inout != 0);
|
||||
ASSERT(puBlock_out != 0);
|
||||
ASSERT(ppData_inout != NULL);
|
||||
ASSERT(puBlock_out != NULL);
|
||||
|
||||
const void* pData = *ppData_inout;
|
||||
ASSERT(pData != 0);
|
||||
ASSERT(pData != NULL);
|
||||
|
||||
const data::TParse_THeader header(pData);
|
||||
*ppData_inout = header.getContent();
|
||||
@@ -411,11 +416,11 @@ bool TParse::parseHeader_next(const void** ppData_inout, u32* puBlock_out, u32 f
|
||||
}
|
||||
|
||||
bool TParse::parseBlock_next(void const** ppData_inout, u32* puData_out, u32 flags) {
|
||||
ASSERT(ppData_inout != 0);
|
||||
ASSERT(puData_out != 0);
|
||||
ASSERT(ppData_inout != NULL);
|
||||
ASSERT(puData_out != NULL);
|
||||
|
||||
const void* pData = *ppData_inout;
|
||||
ASSERT(pData != 0);
|
||||
ASSERT(pData != NULL);
|
||||
|
||||
data::TParse_TBlock blk(pData);
|
||||
*ppData_inout = blk.getNext();
|
||||
@@ -433,7 +438,7 @@ bool TParse::parseBlock_block(const data::TParse_TBlock& ppBlock, u32 flags) {
|
||||
|
||||
bool TParse::parseBlock_object(const data::TParse_TBlock_object& ppObject, u32 flags) {
|
||||
TControl* pControl = getControl();
|
||||
ASSERT(pControl != 0);
|
||||
ASSERT(pControl != NULL);
|
||||
|
||||
if (ppObject.get_type() == data::BLOCK_NONE) {
|
||||
TObject_control& ref = pControl->referObject_control();
|
||||
|
||||
@@ -1259,6 +1259,7 @@ static int daArrow_delete(daArrow_c* i_this) {
|
||||
}
|
||||
|
||||
AUDIO_INSTANCES;
|
||||
template<>
|
||||
JAUSectionHeap* JASGlobalInstance<JAUSectionHeap>::sInstance;
|
||||
|
||||
/* 8049DE8C-8049DEAC -00001 0020+00 1/0 0/0 0/0 .data l_daArrowMethodTable */
|
||||
|
||||
@@ -5724,4 +5724,5 @@ extern actor_process_profile_definition g_profile_B_ZANT = {
|
||||
};
|
||||
|
||||
AUDIO_INSTANCES;
|
||||
template<>
|
||||
JAUSectionHeap* JASGlobalInstance<JAUSectionHeap>::sInstance;
|
||||
|
||||
@@ -1585,3 +1585,6 @@ extern actor_process_profile_definition g_profile_BOOMERANG = {
|
||||
};
|
||||
|
||||
AUDIO_INSTANCES;
|
||||
class JAUSectionHeap;
|
||||
template<>
|
||||
JAUSectionHeap* JASGlobalInstance<JAUSectionHeap>::sInstance;
|
||||
|
||||
@@ -964,4 +964,5 @@ extern actor_process_profile_definition g_profile_CANOE = {
|
||||
};
|
||||
|
||||
AUDIO_INSTANCES
|
||||
template<>
|
||||
JAUSectionHeap* JASGlobalInstance<JAUSectionHeap>::sInstance;
|
||||
|
||||
@@ -1258,5 +1258,5 @@ extern actor_process_profile_definition g_profile_CSTATUE = {
|
||||
AUDIO_INSTANCES;
|
||||
|
||||
#include "JSystem/JAudio2/JAUSectionHeap.h"
|
||||
template <>
|
||||
template<>
|
||||
JAUSectionHeap* JASGlobalInstance<JAUSectionHeap>::sInstance;
|
||||
|
||||
@@ -237,7 +237,7 @@ static void hit_check(e_arrow_class* i_this) {
|
||||
/* 8067D21C-8067D40C 000B3C 01F0+00 1/1 0/0 0/0 .text e_arrow_shot__FP13e_arrow_class */
|
||||
static void e_arrow_shot(e_arrow_class* i_this) {
|
||||
switch (i_this->mMode) {
|
||||
case 0:
|
||||
case 0: {
|
||||
i_this->speedF = 100.0f;
|
||||
i_this->mMode = 1;
|
||||
|
||||
@@ -254,6 +254,7 @@ static void e_arrow_shot(e_arrow_class* i_this) {
|
||||
i_this->field_0x5d0 = parent_p->speed.x;
|
||||
i_this->field_0x5d4 = parent_p->speed.z;
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
if (i_this->mFlags & 0x20) {
|
||||
fopAc_ac_c* coach_p = fopAcM_SearchByName(PROC_NPC_COACH);
|
||||
|
||||
@@ -198,17 +198,24 @@ int daE_WS_c::checkPlayerPos() {
|
||||
}
|
||||
|
||||
/* 807E4568-807E470C 000C48 01A4+00 1/1 0/0 0/0 .text checkAttackEnd__8daE_WS_cFv */
|
||||
// NONMATCHING
|
||||
bool daE_WS_c::checkAttackEnd() {
|
||||
cXyz player_pos;
|
||||
mDoMtx_stack_c::copy(daPy_getLinkPlayerActorClass()->getModelJointMtx(0));
|
||||
mDoMtx_stack_c::multVecZero(&player_pos);
|
||||
|
||||
if (!(daPy_getPlayerActorClass()->checkClimbMove() ||
|
||||
BOOL r30 = false;
|
||||
if (
|
||||
daPy_getPlayerActorClass()->checkClimbMove() ||
|
||||
dComIfGp_checkPlayerStatus1(0, 0x02000000) ||
|
||||
dComIfGp_checkPlayerStatus1(0, 0x10000) ||
|
||||
calcTargetDist(current.pos, player_pos) < 200.0f) ||
|
||||
(!checkInSearchRange(current.pos, field_0x65c) || checkBeforeBg(shape_angle.y)))
|
||||
calcTargetDist(current.pos, player_pos) < 200.0f
|
||||
) {
|
||||
r30 = true;
|
||||
}
|
||||
if (!r30 ||
|
||||
!checkInSearchRange(current.pos, field_0x65c) ||
|
||||
checkBeforeBg(shape_angle.y)
|
||||
)
|
||||
{
|
||||
setActionMode(ACTION_WAIT_e);
|
||||
speedF = 0.0f;
|
||||
|
||||
@@ -6409,4 +6409,5 @@ extern actor_process_profile_definition g_profile_MG_ROD = {
|
||||
|
||||
AUDIO_INSTANCES
|
||||
#include "JSystem/JAudio2/JAUSectionHeap.h"
|
||||
template<>
|
||||
JAUSectionHeap* JASGlobalInstance<JAUSectionHeap>::sInstance;
|
||||
|
||||
@@ -467,12 +467,7 @@ int daNpcT_Path_c::chkPassed1(cXyz i_pnt, int i_num) {
|
||||
cXyz next_pos;
|
||||
cXyz sp5C;
|
||||
|
||||
#if VERSION != VERSION_SHIELD_DEBUG
|
||||
// FIXME: fakematch. I literally don't know how else to get this to match....
|
||||
u16 cur_idx = get_u16_Idx();
|
||||
#else
|
||||
u16 cur_idx = getIdx();
|
||||
#endif
|
||||
u16 cur_idx = (int)(u16)getIdx();
|
||||
u16 prev_idx, next_idx;
|
||||
prev_idx = next_idx = cur_idx;
|
||||
|
||||
|
||||
@@ -783,9 +783,7 @@ void daNpcMoiR_c::playExpression() {
|
||||
daNpcF_anmPlayData* pDat2[1] = {&dat2};
|
||||
daNpcF_anmPlayData dat3 = {ANM_FH_SERIOUS, mpHIO->m.common.morf_frame, 0};
|
||||
daNpcF_anmPlayData* pDat3[1] = {&dat3};
|
||||
// FIXME: daNpcF hack in configure.py prevents us from converting more of these,
|
||||
// otherwise this function will not inline in GCN.
|
||||
daNpcF_anmPlayData dat4 = {ANM_F_TAKAJO_HI, daNpcMoiR_Param_c::m.common.morf_frame, 0};
|
||||
daNpcF_anmPlayData dat4 = {ANM_F_TAKAJO_HI, mpHIO->m.common.morf_frame, 0};
|
||||
daNpcF_anmPlayData* pDat4[1] = {&dat4};
|
||||
daNpcF_anmPlayData dat5 = {ANM_FH_TAKAJO_HI, 0.0f, 0};
|
||||
daNpcF_anmPlayData* pDat5[1] = {&dat5};
|
||||
@@ -795,9 +793,9 @@ void daNpcMoiR_c::playExpression() {
|
||||
daNpcF_anmPlayData* pDat7[1] = {&dat7};
|
||||
daNpcF_anmPlayData dat8 = {ANM_F_HOLD_S, 0.0f, 0};
|
||||
daNpcF_anmPlayData* pDat8[1] = {&dat8};
|
||||
daNpcF_anmPlayData dat9 = {ANM_FH_HOLD_S, daNpcMoiR_Param_c::m.common.morf_frame, 0};
|
||||
daNpcF_anmPlayData dat9 = {ANM_FH_HOLD_S, mpHIO->m.common.morf_frame, 0};
|
||||
daNpcF_anmPlayData* pDat9[1] = {&dat9};
|
||||
daNpcF_anmPlayData dat10 = {ANM_NONE, daNpcMoiR_Param_c::m.common.morf_frame, 0};
|
||||
daNpcF_anmPlayData dat10 = {ANM_NONE, mpHIO->m.common.morf_frame, 0};
|
||||
daNpcF_anmPlayData* pDat10[1] = {&dat10};
|
||||
daNpcF_anmPlayData* pDat11[1] = {&dat0};
|
||||
|
||||
|
||||
@@ -1032,16 +1032,6 @@ void daNpcTheB_c::lookat() {
|
||||
mLookat.calc(this, model->getBaseTRMtx(), lookat_angle, FALSE, angle_delta, false);
|
||||
}
|
||||
|
||||
#pragma inline_max_size(503)
|
||||
/*
|
||||
FAKEMATCH
|
||||
The DANPCF_C_HACK sets an inline size that prevents the parent constructor
|
||||
from being inlined, however that same hack also prevents the following
|
||||
function from being inlined when it needs to.
|
||||
|
||||
Once a proper solution is found for the constructor issue, the pragma
|
||||
should be removed
|
||||
*/
|
||||
inline void daNpcTheB_c::setWaitAnimation() {
|
||||
if (
|
||||
mAnm_p->getAnm() == getTrnsfrmKeyAnmP(l_arcName, l_bckGetParamList[8].fileIdx)
|
||||
|
||||
@@ -89,10 +89,8 @@ static u32 const l_bmdIdx[2] = {5, 8};
|
||||
/* 80B9CD74-80B9CED8 0002D4 0164+00 1/0 0/0 0/0 .text CreateHeap__10daTurara_cFv */
|
||||
int daTurara_c::CreateHeap() {
|
||||
J3DModelData* modelData = (J3DModelData*) dComIfG_getObjectRes("M_Turara", l_bmdIdx[field_0x98c]);
|
||||
JUT_ASSERT(260, modelData != NULL);
|
||||
|
||||
if (modelData == NULL) {
|
||||
// FIXME: For shield decomp matching, needs a JUT assert.
|
||||
}
|
||||
if (field_0x98c == 0) {
|
||||
mpModel[0] = mDoExt_J3DModel__create(modelData, 0, 0x11000084);
|
||||
} else {
|
||||
@@ -103,15 +101,12 @@ int daTurara_c::CreateHeap() {
|
||||
}
|
||||
|
||||
modelData = (J3DModelData*) dComIfG_getObjectRes("M_Turara", 9);
|
||||
if (modelData == NULL) {
|
||||
// FIXME: For shield decomp matching, needs a JUT assert.
|
||||
}
|
||||
JUT_ASSERT(279, modelData != NULL);
|
||||
mpModel[1] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
|
||||
if (mpModel[1] == NULL) {
|
||||
return 0;
|
||||
}
|
||||
dBgW* my_dBgW = new dBgW;
|
||||
field_0x980 = my_dBgW;
|
||||
field_0x980 = new dBgW;
|
||||
if (field_0x980 == NULL || field_0x980->Set((cBgD_t *)dComIfG_getObjectRes("M_Turara", 0xd),
|
||||
1, &mBgMtx) != 0) {
|
||||
field_0x980 = NULL;
|
||||
@@ -123,19 +118,17 @@ int daTurara_c::CreateHeap() {
|
||||
/* 80B9CED8-80B9D29C 000438 03C4+00 1/1 0/0 0/0 .text create__10daTurara_cFv */
|
||||
int daTurara_c::create() {
|
||||
fopAcM_ct(this, daTurara_c);
|
||||
u8 my_bit = getSwBit3();
|
||||
if (fopAcM_isSwitch(this, my_bit)) {
|
||||
if (fopAcM_isSwitch(this, getSwBit3())) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
int phase = dComIfG_resLoad(&mPhaseReq,"M_Turara");
|
||||
if (phase == cPhs_COMPLEATE_e) {
|
||||
u8 my_bool = 0;
|
||||
field_0x98c = shape_angle.x;
|
||||
u8 r26 = 0;
|
||||
field_0x98c = getState();
|
||||
if (field_0x98c != 0) {
|
||||
if (field_0x98c == 1) {
|
||||
my_bool = 1;
|
||||
u8 my_bit1 = getSwBit1();
|
||||
fopAcM_onSwitch(this, my_bit1);
|
||||
r26 = 1;
|
||||
fopAcM_onSwitch(this, getSwBit1());
|
||||
}
|
||||
fopAcM_SetGroup(this,0);
|
||||
field_0x98c = 1;
|
||||
@@ -160,8 +153,7 @@ int daTurara_c::create() {
|
||||
mCylCollider.Set(mCcDCyl);
|
||||
mCylCollider.SetStts(&mColliderStts);
|
||||
mCylCollider.OffAtSetBit();
|
||||
u8 my_bit1 = getSwBit1();
|
||||
if (fopAcM_isSwitch(this, my_bit1)) {
|
||||
if (fopAcM_isSwitch(this, getSwBit1())) {
|
||||
field_0x984 = 1;
|
||||
mCylCollider.OffCoSetBit();
|
||||
if (mpBgW) {
|
||||
@@ -171,7 +163,7 @@ int daTurara_c::create() {
|
||||
dComIfG_Bgsp().Regist(field_0x980, this);
|
||||
field_0x980->Move();
|
||||
}
|
||||
if (my_bool) {
|
||||
if (r26) {
|
||||
mMode = 3;
|
||||
} else {
|
||||
setFallStat();
|
||||
@@ -185,7 +177,9 @@ int daTurara_c::create() {
|
||||
fopAcM_setCullSizeBox2(this, mpModel[field_0x984]->getModelData());
|
||||
setBaseMtx();
|
||||
field_0x994 = 1;
|
||||
// FIXME: Needs entryHIO here.
|
||||
#ifdef DEBUG
|
||||
l_HIO.entryHIO("つらら");
|
||||
#endif
|
||||
}
|
||||
return phase;
|
||||
}
|
||||
@@ -226,9 +220,9 @@ void daTurara_c::move() {
|
||||
mCylCollider.SetR(130.0f);
|
||||
}
|
||||
mCylCollider.SetH(510.0f);
|
||||
cXyz my_vec(current.pos);
|
||||
my_vec.y -= 50.0f;
|
||||
mCylCollider.SetC(my_vec);
|
||||
cXyz sp08(current.pos);
|
||||
sp08.y -= 50.0f;
|
||||
mCylCollider.SetC(sp08);
|
||||
dComIfG_Ccsp()->Set(&mCylCollider);
|
||||
}
|
||||
|
||||
@@ -247,21 +241,19 @@ void daTurara_c::modeWait() {
|
||||
}
|
||||
}
|
||||
if (mCylCollider.ChkTgHit()) {
|
||||
dCcD_GObjInf* my_actor = mCylCollider.GetTgHitGObj();
|
||||
if (my_actor->GetAtType() == AT_TYPE_BOMB) {
|
||||
dCcD_GObjInf* r29 = mCylCollider.GetTgHitGObj();
|
||||
if (r29->GetAtType() == AT_TYPE_BOMB) {
|
||||
if (getEvetID() != 0xff) {
|
||||
orderEvent(getEvetID(), 0xFF, 1);
|
||||
} else {
|
||||
eventStart();
|
||||
}
|
||||
} else if (my_actor->GetAtType() == AT_TYPE_IRON_BALL) {
|
||||
dComIfGp_particle_set(0x8a8f, ¤t.pos, NULL, NULL, NULL, 0xff, NULL, -1, NULL, NULL, NULL);
|
||||
dComIfGp_particle_set(0x8a90, ¤t.pos, NULL, NULL, NULL, 0xff, NULL, -1, NULL, NULL, NULL);
|
||||
dComIfGp_particle_set(0x8a91, ¤t.pos, NULL, NULL, NULL, 0xff, NULL, -1, NULL, NULL, NULL);
|
||||
s8 roomNo = fopAcM_GetRoomNo(this);
|
||||
mDoAud_seStart(Z2SE_OBJ_ICICLE_BRK, ¤t.pos, 0, dComIfGp_getReverb(roomNo));
|
||||
u8 swbit3 = getSwBit3();
|
||||
fopAcM_onSwitch(this, swbit3);
|
||||
} else if (r29->GetAtType() == AT_TYPE_IRON_BALL) {
|
||||
dComIfGp_particle_set(0x8a8f, ¤t.pos, NULL, NULL);
|
||||
dComIfGp_particle_set(0x8a90, ¤t.pos, NULL, NULL);
|
||||
dComIfGp_particle_set(0x8a91, ¤t.pos, NULL, NULL);
|
||||
mDoAud_seStart(Z2SE_OBJ_ICICLE_BRK, ¤t.pos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
fopAcM_onSwitch(this, getSwBit3());
|
||||
fopAcM_delete(this);
|
||||
}
|
||||
}
|
||||
@@ -346,35 +338,30 @@ void daTurara_c::init_modeDropEnd() {
|
||||
}
|
||||
mCylCollider.OffCoSetBit();
|
||||
mCylCollider.OffAtSetBit();
|
||||
u8 swbit1 = getSwBit1();
|
||||
fopAcM_onSwitch(this, swbit1);
|
||||
s8 roomNo = fopAcM_GetRoomNo(this);
|
||||
mDoAud_seStart(Z2SE_OBJ_ICICLE_LAND, ¤t.pos, 0, dComIfGp_getReverb(roomNo));
|
||||
fopAcM_onSwitch(this, getSwBit1());
|
||||
mDoAud_seStart(Z2SE_OBJ_ICICLE_LAND, ¤t.pos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
mMode = 3;
|
||||
}
|
||||
|
||||
/* 80B9DE48-80B9E078 0013A8 0230+00 1/0 0/0 0/0 .text modeDropEnd__10daTurara_cFv */
|
||||
void daTurara_c::modeDropEnd() {
|
||||
if (mCylCollider.ChkTgHit()) {
|
||||
dCcD_GObjInf* my_actor = mCylCollider.GetTgHitGObj();
|
||||
u32 att_type = my_actor->GetAtType();
|
||||
if ((att_type & AT_TYPE_UNK) || (att_type & AT_TYPE_20000000)) {
|
||||
dCcD_GObjInf* r29 = mCylCollider.GetTgHitGObj();
|
||||
if ((r29->GetAtType() & AT_TYPE_UNK) || (r29->GetAtType() & AT_TYPE_20000000)) {
|
||||
if (field_0x980) {
|
||||
dComIfG_Bgsp().Release(field_0x980);
|
||||
field_0x980->Move();
|
||||
}
|
||||
csXyz my_vec(0, home.angle.y, 0);
|
||||
csXyz sp10(0, home.angle.y, 0);
|
||||
fopAcM_createItemFromTable(¤t.pos, getItemTbleNum(), -1,
|
||||
fopAcM_GetHomeRoomNo(this), &my_vec, 0, (cXyz*)NULL,
|
||||
fopAcM_GetHomeRoomNo(this), &sp10, 0, (cXyz*)NULL,
|
||||
NULL, NULL, false);
|
||||
}
|
||||
dComIfGp_particle_set(0x8a8f, ¤t.pos, NULL, NULL);
|
||||
dComIfGp_particle_set(0x8a90, ¤t.pos, NULL, NULL);
|
||||
dComIfGp_particle_set(0x8a91, ¤t.pos, NULL, NULL);
|
||||
s8 roomNo = fopAcM_GetRoomNo(this);
|
||||
mDoAud_seStart(Z2SE_OBJ_ICICLE_BRK, ¤t.pos, 0, dComIfGp_getReverb(roomNo));
|
||||
u8 swbit3 = getSwBit3();
|
||||
fopAcM_onSwitch(this, swbit3);
|
||||
mDoAud_seStart(Z2SE_OBJ_ICICLE_BRK, ¤t.pos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
fopAcM_onSwitch(this, getSwBit3());
|
||||
fopAcM_delete(this);
|
||||
}
|
||||
}
|
||||
@@ -390,28 +377,25 @@ void daTurara_c::init_modeDropEnd2() {
|
||||
}
|
||||
mCylCollider.OffCoSetBit();
|
||||
mCylCollider.OffAtSetBit();
|
||||
s8 roomNo = fopAcM_GetRoomNo(this);
|
||||
mDoAud_seStart(Z2SE_OBJ_ICICLE_BRK, ¤t.pos, 0, dComIfGp_getReverb(roomNo));
|
||||
mDoAud_seStart(Z2SE_OBJ_ICICLE_BRK, ¤t.pos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
current.pos.y -= 100.0f;
|
||||
cXyz first_vec(current.pos);
|
||||
first_vec.y += 100.0f;
|
||||
s16 my_proc = PROC_E_KK;
|
||||
field_0x988 = fopAcM_create(my_proc, getSwBit1() << 0x10 | 3, &first_vec, fopAcM_GetRoomNo(this), 0, 0, 0xffffffff);
|
||||
// FIXME: JUT assert needed here
|
||||
mEmID = fopAcM_create(PROC_E_KK, getSwBit1() << 0x10 | 3, &first_vec, fopAcM_GetRoomNo(this), 0, 0, -1);
|
||||
JUT_ASSERT(770, mEmID != fpcM_ERROR_PROCESS_ID_e);
|
||||
cXyz second_vec(0.7f, 0.7f, 0.7f);
|
||||
dComIfGp_particle_set(0x8a8f, &first_vec, NULL, &second_vec);
|
||||
dComIfGp_particle_set(0x8a90, &first_vec, NULL, &second_vec);
|
||||
dComIfGp_particle_set(0x8a91, &first_vec, NULL, &second_vec);
|
||||
dComIfGp_particle_set(0x8a92, &first_vec, NULL, &second_vec);
|
||||
u8 swbit = getSwBit3();
|
||||
fopAcM_onSwitch(this, swbit);
|
||||
fopAcM_onSwitch(this, getSwBit3());
|
||||
field_0x994 = 0;
|
||||
mMode = 4;
|
||||
}
|
||||
|
||||
/* 80B9E338-80B9E388 001898 0050+00 1/0 0/0 0/0 .text modeDropEnd2__10daTurara_cFv */
|
||||
void daTurara_c::modeDropEnd2() {
|
||||
if (fopAcM_SearchByID(field_0x988)) {
|
||||
if (fopAcM_SearchByID(mEmID)) {
|
||||
fopAcM_delete(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,21 +16,6 @@
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void itemGetNextExecute__8daItem_cFv();
|
||||
extern "C" void checkPlayerGet__8daItem_cFv();
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" extern void* __vt__16Z2SoundObjSimple[8];
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void __dt__14Z2SoundObjBaseFv();
|
||||
|
||||
/* 8015ADCC-8015B0B8 15570C 02EC+00 1/1 0/0 0/0 .text Reflect__FP4cXyzRC13cBgS_PolyInfof
|
||||
*/
|
||||
static f32 Reflect(cXyz* i_vec, cBgS_PolyInfo const& i_polyinfo, f32 i_scale) {
|
||||
@@ -105,8 +90,6 @@ void daItem_c::setBaseMtx_1() {
|
||||
|
||||
/* 8015B254-8015B320 155B94 00CC+00 2/2 0/0 0/0 .text
|
||||
* itemGetCoCallBack__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf */
|
||||
// NONMATCHING - matches, but pushes up weak daPy_py_c functions incorrectly
|
||||
// might need other TUs that use daPy_py_c weaks to be finished first
|
||||
static void itemGetCoCallBack(fopAc_ac_c* i_coActorA, dCcD_GObjInf* i_coObjInfA,
|
||||
fopAc_ac_c* i_coActorB, dCcD_GObjInf* i_coObjInfB) {
|
||||
daItem_c* a_coActorA = (daItem_c*)i_coActorA;
|
||||
@@ -324,12 +307,6 @@ int daItem_c::_daItem_create() {
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
/* 8015BA3C-8015BA9C 15637C 0060+00 0/0 1/1 0/0 .text __dt__16Z2SoundObjSimpleFv */
|
||||
// Z2SoundObjSimple::~Z2SoundObjSimple() {
|
||||
extern "C" void __dt__16Z2SoundObjSimpleFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 8015BA9C-8015BD84 1563DC 02E8+00 1/1 0/0 0/0 .text _daItem_execute__8daItem_cFv */
|
||||
int daItem_c::_daItem_execute() {
|
||||
field_0x950 = speed;
|
||||
|
||||
@@ -262,7 +262,6 @@ void daObjVolcBall_c::actionWarning() {
|
||||
|
||||
/* 80D22944-80D22C6C 000EA4 0328+00 1/0 0/0 0/0 .text actionEruption__15daObjVolcBall_cFv
|
||||
*/
|
||||
// NONMATCHING small regalloc
|
||||
void daObjVolcBall_c::actionEruption() {
|
||||
if (!dComIfGp_getVibration().CheckQuake()) {
|
||||
startQuake();
|
||||
|
||||
@@ -985,4 +985,5 @@ extern actor_process_profile_definition g_profile_SPINNER = {
|
||||
|
||||
AUDIO_INSTANCES
|
||||
struct JAUSectionHeap;
|
||||
template<>
|
||||
JAUSectionHeap* JASGlobalInstance<JAUSectionHeap>::sInstance;
|
||||
|
||||
@@ -12,24 +12,6 @@
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
#if VERSION == VERSION_GCN_USA
|
||||
// This is a HACK to get d_insect data at correct address due to
|
||||
// issues with the d_a_obj_item vtable. TODO: fix daItem_c vtable
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DATA extern void* __vt__8daItem_c__HACK[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8015E010-8015E078 158950 0068+00 0/0 0/0 13/13 .text __ct__9dInsect_cFv */
|
||||
dInsect_c::dInsect_c() {
|
||||
m_itemId = -1;
|
||||
|
||||
+6
-3
@@ -1232,12 +1232,13 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) {
|
||||
break;
|
||||
case 2:
|
||||
switch (field_0x8f) {
|
||||
case 2:
|
||||
case 2: {
|
||||
f32 temp_f31 = (f32)field_0x90 / 5.0f;
|
||||
setMapPaletteColorAlphaPer(0x2F, 0x32, temp_f31);
|
||||
setMapPaletteColorAlphaPer(0x21, 0x2B, temp_f31);
|
||||
break;
|
||||
case 3:
|
||||
}
|
||||
case 3: {
|
||||
calcMapCenterXZ(field_0x88, &mCenterX, &mCenterZ);
|
||||
f32 sp24, sp20;
|
||||
calcMapCenterXZ(field_0x84, &sp24, &sp20);
|
||||
@@ -1268,11 +1269,13 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) {
|
||||
mCenterX += sp14;
|
||||
mCenterZ -= sp10;
|
||||
break;
|
||||
case 4:
|
||||
}
|
||||
case 4: {
|
||||
f32 temp_f31_3 = 1.0f - ((f32)field_0x90 / 5.0f);
|
||||
setMapPaletteColorAlphaPer(0x2F, 0x32, temp_f31_3);
|
||||
setMapPaletteColorAlphaPer(0x21, 0x2B, temp_f31_3);
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
copyPalette();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user