mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-08 20:20:04 -04:00
Various inline cleanup
This commit is contained in:
@@ -83,10 +83,11 @@ s32 J3DMaterialTable::entryTexMtxAnimator(J3DAnmTextureSRTKey* btk) {
|
||||
J3DTexMtx *tmtx = pMaterial->getTexMtx(texMtxID);
|
||||
J3DTexMtxAnm* tmtxanm = new J3DTexMtxAnm(btk, no);
|
||||
|
||||
tmtx->getTexMtxInfo().mInfo = ((tmtx->getTexMtxInfo().mInfo) & 0x7F) | (btk->getTexMtxCalcType() << 7);
|
||||
tmtx->getTexMtxInfo().mCenter.x = btk->getSRTCenter(no).x;
|
||||
tmtx->getTexMtxInfo().mCenter.y = btk->getSRTCenter(no).y;
|
||||
tmtx->getTexMtxInfo().mCenter.z = btk->getSRTCenter(no).z;
|
||||
J3DTexMtxInfo& tmtxinfo = tmtx->getTexMtxInfo();
|
||||
tmtxinfo.mInfo = (tmtxinfo.mInfo & 0x7F) | btk->getTexMtxCalcType() << 7;
|
||||
tmtxinfo.mCenter.x = btk->getSRTCenter(no).x;
|
||||
tmtxinfo.mCenter.y = btk->getSRTCenter(no).y;
|
||||
tmtxinfo.mCenter.z = btk->getSRTCenter(no).z;
|
||||
|
||||
pMatAnm->setTexMtxAnm(texMtxID, tmtxanm);
|
||||
}
|
||||
@@ -291,10 +292,11 @@ s32 J3DMaterialTable::setTexMtxAnimator(J3DAnmTextureSRTKey* btk, J3DTexMtxAnm*
|
||||
pMaterial->getTexCoord(texMtxID)->setTexGenMtx(GX_TEXMTX0 + (texMtxID & 0xFF) * 3);
|
||||
|
||||
J3DTexMtx *tmtx = pMaterial->getTexMtx(texMtxID);
|
||||
tmtx->getTexMtxInfo().mInfo = ((tmtx->getTexMtxInfo().mInfo) & 0x7F) | (btk->getTexMtxCalcType() << 7);
|
||||
tmtx->getTexMtxInfo().mCenter.x = btk->getSRTCenter(no).x;
|
||||
tmtx->getTexMtxInfo().mCenter.y = btk->getSRTCenter(no).y;
|
||||
tmtx->getTexMtxInfo().mCenter.z = btk->getSRTCenter(no).z;
|
||||
J3DTexMtxInfo& tmtxinfo = tmtx->getTexMtxInfo();
|
||||
tmtxinfo.mInfo = (tmtxinfo.mInfo & 0x7F) | btk->getTexMtxCalcType() << 7;
|
||||
tmtxinfo.mCenter.x = btk->getSRTCenter(no).x;
|
||||
tmtxinfo.mCenter.y = btk->getSRTCenter(no).y;
|
||||
tmtxinfo.mCenter.z = btk->getSRTCenter(no).z;
|
||||
|
||||
pMatAnm->setTexMtxAnm(texMtxID, &pTexAnm[no]);
|
||||
}
|
||||
|
||||
@@ -3401,11 +3401,13 @@ void daPy_lk_c::setAnimeEquipSword(BOOL r4) {
|
||||
|
||||
/* 8010C100-8010C158 .text setAnimeEquipSingleItem__9daPy_lk_cFUs */
|
||||
void daPy_lk_c::setAnimeEquipSingleItem(u16 bckIdx) {
|
||||
f32 rate = daPy_HIO_item_c0::m.field_0x14;
|
||||
f32 start = daPy_HIO_item_c0::m.field_0x18;
|
||||
s16 end = daPy_HIO_item_c0::m.field_0x2;
|
||||
f32 f3 = daPy_HIO_item_c0::m.field_0x1C;
|
||||
setActAnimeUpper(bckIdx, UPPER_MOVE2_e, rate, start, end, f3);
|
||||
setActAnimeUpper(
|
||||
bckIdx, UPPER_MOVE2_e,
|
||||
daPy_HIO_item_c0::m.field_0x14,
|
||||
daPy_HIO_item_c0::m.field_0x18,
|
||||
daPy_HIO_item_c0::m.field_0x2,
|
||||
daPy_HIO_item_c0::m.field_0x1C
|
||||
);
|
||||
setPriTextureAnime(0x74, 0);
|
||||
}
|
||||
|
||||
@@ -6877,12 +6879,7 @@ BOOL daPy_lk_c::procFrontRollCrash_init() {
|
||||
fopAc_ac_c* actor = dComIfG_Bgsp()->GetActorPointer(mAcchCir[0]);
|
||||
if (actor != 0 && fopAcM_GetName(actor) == PROC_Obj_Movebox) {
|
||||
daObjMovebox::Act_c* movebox = (daObjMovebox::Act_c*)actor;
|
||||
if (
|
||||
movebox->mType == daObjMovebox::Act_c::TYPE_BREAKABLE_WOODEN_CRATE ||
|
||||
movebox->mType == daObjMovebox::Act_c::TYPE_GOLDEN_CRATE
|
||||
) {
|
||||
movebox->set_rollCrash();
|
||||
}
|
||||
movebox->set_rollCrash();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -7069,7 +7066,10 @@ BOOL daPy_lk_c::procBackJumpLand() {
|
||||
|
||||
/* 80115E88-80115EA4 .text checkAutoJumpFlying__9daPy_lk_cCFv */
|
||||
int daPy_lk_c::checkAutoJumpFlying() const {
|
||||
return mCurProc != daPyProc_AUTO_JUMP_e ? -1 : m34D0;
|
||||
if (mCurProc != daPyProc_AUTO_JUMP_e) {
|
||||
return -1;
|
||||
}
|
||||
return m34D0;
|
||||
}
|
||||
|
||||
/* 80115EA4-8011602C .text procAutoJump_init__9daPy_lk_cFv */
|
||||
@@ -8566,11 +8566,11 @@ s16 daPy_lk_c::getGroundAngle(cBgS_PolyInfo* param_1, s16 param_2) {
|
||||
if (plane == NULL || !cBgW_CheckBGround(plane->GetNP()->y)) {
|
||||
return 0;
|
||||
}
|
||||
f32 cos = cM_scos((cM_atan2s(plane->GetNP()->x, plane->GetNP()->z) - param_2));
|
||||
f32 xz =
|
||||
(std::sqrtf(plane->GetNP()->x * plane->GetNP()->x + plane->GetNP()->z * plane->GetNP()->z));
|
||||
cXyz* norm = plane->GetNP();
|
||||
f32 cos = cM_scos((cM_atan2s(norm->x, norm->z) - param_2));
|
||||
f32 xz = (std::sqrtf(norm->x * norm->x + norm->z * norm->z));
|
||||
xz *= cos;
|
||||
return cM_atan2s(xz, plane->GetNP()->y);
|
||||
return cM_atan2s(xz, norm->y);
|
||||
}
|
||||
|
||||
/* 80119EBC-8011A508 .text setLegAngle__9daPy_lk_cFfiPsPs */
|
||||
@@ -9212,10 +9212,10 @@ void daPy_lk_c::setNeckAngle() {
|
||||
daPy_matAnm_c::onEyeMoveFlg();
|
||||
}
|
||||
} else {
|
||||
m_tex_eye_scroll[0]->mEyePos.x = 0.0f;
|
||||
m_tex_eye_scroll[1]->mEyePos.x = 0.0f;
|
||||
m_tex_eye_scroll[0]->mEyePos.y = 0.0f;
|
||||
m_tex_eye_scroll[1]->mEyePos.y = 0.0f;
|
||||
m_tex_eye_scroll[0]->setNowOffsetX(0.0f);
|
||||
m_tex_eye_scroll[1]->setNowOffsetX(0.0f);
|
||||
m_tex_eye_scroll[0]->setNowOffsetY(0.0f);
|
||||
m_tex_eye_scroll[1]->setNowOffsetY(0.0f);
|
||||
if (daPy_matAnm_c::getEyeMoveFlg() != 0) {
|
||||
daPy_matAnm_c::setMorfFrame(3);
|
||||
}
|
||||
@@ -11885,10 +11885,11 @@ void daPy_lk_c::initTextureScroll() {
|
||||
m_texMtxAnm[no].setAnmTransform(btk);
|
||||
m_texMtxAnm[no].setAnmIndex(no);
|
||||
|
||||
tmtx->getTexMtxInfo().mInfo = (tmtx->getTexMtxInfo().mInfo & 0x7F) | btk->getTexMtxCalcType() << 7;
|
||||
tmtx->getTexMtxInfo().mCenter.x = btk->getSRTCenter(no).x;
|
||||
tmtx->getTexMtxInfo().mCenter.y = btk->getSRTCenter(no).y;
|
||||
tmtx->getTexMtxInfo().mCenter.z = btk->getSRTCenter(no).z;
|
||||
J3DTexMtxInfo& tmtxinfo = tmtx->getTexMtxInfo();
|
||||
tmtxinfo.mInfo = (tmtxinfo.mInfo & 0x7F) | btk->getTexMtxCalcType() << 7;
|
||||
tmtxinfo.mCenter.x = btk->getSRTCenter(no).x;
|
||||
tmtxinfo.mCenter.y = btk->getSRTCenter(no).y;
|
||||
tmtxinfo.mCenter.z = btk->getSRTCenter(no).z;
|
||||
|
||||
JUT_ASSERT(VERSION_SELECT(20814, 21001, 21001, 21001), mtl->getMaterialAnm() != NULL);
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ const char* daTag_Msg_c::myDemoName() {
|
||||
dStage_EventInfo_c *pEventInfo;
|
||||
u32 eventNo;
|
||||
|
||||
pEventInfo = dComIfGp_getStageEventInfo();
|
||||
pEventInfo = dComIfGp_getStage().getEventInfo();
|
||||
eventNo = getEventNo() & 0xff;
|
||||
|
||||
if (getMessage() == 0x1902) {
|
||||
|
||||
+3
-3
@@ -80,7 +80,7 @@ s32 dEvt_control_c::order(u16 eventType, u16 priority, u16 flag, u16 hindFlag, v
|
||||
|
||||
/* 8007002C-8007015C .text setParam__14dEvt_control_cFP12dEvt_order_c */
|
||||
void dEvt_control_c::setParam(dEvt_order_c* order) {
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStageEventInfo();
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStage().getEventInfo();
|
||||
setPt1(order->mActor1);
|
||||
setPt2(order->mActor2);
|
||||
mEventId = order->mEventId;
|
||||
@@ -696,7 +696,7 @@ void dEvt_control_c::remove() {
|
||||
|
||||
/* 800714AC-80071534 .text getStageEventDt__14dEvt_control_cFv */
|
||||
dStage_Event_dt_c* dEvt_control_c::getStageEventDt() {
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStageEventInfo();
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStage().getEventInfo();
|
||||
if (getMode() == dEvtMode_NONE_e)
|
||||
return NULL;
|
||||
|
||||
@@ -708,7 +708,7 @@ dStage_Event_dt_c* dEvt_control_c::getStageEventDt() {
|
||||
|
||||
/* 80071534-800715B8 .text nextStageEventDt__14dEvt_control_cFPv */
|
||||
dStage_Event_dt_c* dEvt_control_c::nextStageEventDt(void* idxp) {
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStageEventInfo();
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStage().getEventInfo();
|
||||
if (idxp == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ void dEvent_exception_c::init() {
|
||||
|
||||
/* 800737F4-80073900 .text setStartDemo__18dEvent_exception_cFi */
|
||||
int dEvent_exception_c::setStartDemo(int eventInfoIdx) {
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStageEventInfo();
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStage().getEventInfo();
|
||||
if (eventInfoIdx == 0xFF) {
|
||||
mEventInfoIdx = 206;
|
||||
return 0xFF;
|
||||
@@ -67,7 +67,7 @@ const char* dEvent_exception_c::getEventName() {
|
||||
"FALL_START",
|
||||
};
|
||||
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStageEventInfo();
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStage().getEventInfo();
|
||||
stage_stag_info_class* stage_info = dComIfGp_getStageStagInfo();
|
||||
if (mEventInfoIdx == -1)
|
||||
return NULL;
|
||||
@@ -339,7 +339,7 @@ dEvDtEvent_c* dEvent_manager_c::getEventData(s16 eventIdx) {
|
||||
|
||||
/* 800743AC-800744AC .text getEventIdx__16dEvent_manager_cFPCcUc */
|
||||
s16 dEvent_manager_c::getEventIdx(const char* eventName, u8 eventInfoIdx) {
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStageEventInfo();
|
||||
dStage_EventInfo_c* stageEventInfo = dComIfGp_getStage().getEventInfo();
|
||||
if (mList.mHeaderP == NULL)
|
||||
return -1;
|
||||
|
||||
@@ -733,7 +733,7 @@ void dEvent_manager_c::setPrmStaff(void* work, int staffIdx) {
|
||||
|
||||
/* 80075288-8007537C .text getToolId__16dEvent_manager_cFUci */
|
||||
u8 dEvent_manager_c::getToolId(u8 r4, int r31) {
|
||||
dStage_EventInfo_c* eventInfo = dComIfGp_getStageEventInfo();
|
||||
dStage_EventInfo_c* eventInfo = dComIfGp_getStage().getEventInfo();
|
||||
int r5 = r31;
|
||||
if (r4 == 0xFF) {
|
||||
return 0xFF;
|
||||
|
||||
@@ -1801,7 +1801,7 @@ void dFile_select_c::CommandExec() {
|
||||
mDoMemCdRWm_SetCheckSumGameData(mSaveDataPtr, saveSlot);
|
||||
mDoMemCd_setPictWriteDataPtr(mSavePicDataPtr);
|
||||
mDoMemCd_setCopyToPos(0xFF);
|
||||
mDoMemCd_save(mSaveDataPtr, 0x1650, 0);
|
||||
mDoMemCd_Save(mSaveDataPtr, 0x1650, 0);
|
||||
field_0x392b = 0xF;
|
||||
}
|
||||
else if(field_0x392a == 3) {
|
||||
@@ -1816,7 +1816,7 @@ void dFile_select_c::CommandExec() {
|
||||
memcpy(r30, r4_2, 0x6000);
|
||||
mDoMemCd_setCopyToPos(field_0x3926);
|
||||
mDoMemCd_setPictWriteDataPtr(r30);
|
||||
mDoMemCd_save(mSaveDataPtr, 0x1650, 0);
|
||||
mDoMemCd_Save(mSaveDataPtr, 0x1650, 0);
|
||||
field_0x392b = 0x10;
|
||||
}
|
||||
}
|
||||
@@ -3715,7 +3715,7 @@ void dFile_select_c::ExDataSave() {
|
||||
dComIfGs_setDataNum(saveSlot);
|
||||
mDoMemCd_setPictWriteDataPtr(NULL);
|
||||
#endif
|
||||
mDoMemCd_save(mSaveDataPtr, 0x1650, 0);
|
||||
mDoMemCd_Save(mSaveDataPtr, 0x1650, 0);
|
||||
field_0x392b = 0x20;
|
||||
}
|
||||
|
||||
|
||||
+14
-9
@@ -182,14 +182,13 @@ void dMap_GetFloorInfoDtP(dStage_FloorInfo_c* floor, f32 ret) {
|
||||
|
||||
/* 80045A98-80045AEC .text dMap_GetFloorInfoDtPFromFloorNo__FP18dStage_FloorInfo_cUc */
|
||||
dStage_FloorInfo_dt_c* dMap_GetFloorInfoDtPFromFloorNo(dStage_FloorInfo_c* floor, u8 i_floorNo) {
|
||||
/* Nonmatching */
|
||||
dStage_FloorInfo_dt_c* entry;
|
||||
BOOL valid = FALSE;
|
||||
|
||||
if (floor != NULL) {
|
||||
entry = floor->m_entries;
|
||||
for (int i = 0; i < floor->num; i++, entry++) {
|
||||
if (entry->floorNo == i_floorNo) {
|
||||
for (int i = 0; !valid && i < floor->num; i++, entry++) {
|
||||
if (i_floorNo == entry->floorNo) {
|
||||
valid = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -220,20 +219,26 @@ void dMap_GetFloorNo(dStage_dt_c*, f32) {
|
||||
u32 dMap_RoomInfo_c::getRoomDspFloorNo(u8 i_no, BOOL search) {
|
||||
/* Nonmatching */
|
||||
s32 no = i_no - Floor_Base;
|
||||
#if VERSION > VERSION_DEMO
|
||||
JUT_ASSERT(0x702, Floor_Valid(no));
|
||||
#endif
|
||||
|
||||
s32 dspFloorNo = field_0x2[no];
|
||||
if (search) {
|
||||
if (!IsFloorNo(dspFloorNo)) {
|
||||
while (!IsFloorNo(dspFloorNo) && --no >= 0) {
|
||||
#if VERSION > VERSION_DEMO
|
||||
JUT_ASSERT(0x70f, Floor_Valid(no));
|
||||
#endif
|
||||
dspFloorNo = field_0x2[no];
|
||||
}
|
||||
}
|
||||
|
||||
if (!IsFloorNo(dspFloorNo)) {
|
||||
while (!IsFloorNo(dspFloorNo) && ++no <= (Floor_Num - 1)) {
|
||||
#if VERSION > VERSION_DEMO
|
||||
JUT_ASSERT(0x718, Floor_Valid(no));
|
||||
#endif
|
||||
dspFloorNo = field_0x2[no];
|
||||
}
|
||||
}
|
||||
@@ -411,13 +416,13 @@ void dMap_RoomInfoCtrl_c::ctrlDrawRoomRealSize(int i_no, int p1, int p2, int p3,
|
||||
|
||||
/* 80047C64-80047CD0 .text init__19dMap_RoomInfoCtrl_cFv */
|
||||
void dMap_RoomInfoCtrl_c::init() {
|
||||
/* Nonmatching */
|
||||
int no = 0;
|
||||
dMap_RoomInfo_c* info = m_info;
|
||||
int no;
|
||||
int i;
|
||||
dMap_RoomInfo_c* prev = NULL;
|
||||
for (int i = 0; i < m_num; i++, no++, info++) {
|
||||
info->init(prev, no);
|
||||
prev = info;
|
||||
dMap_RoomInfo_c* info = m_info;
|
||||
no = 0;
|
||||
for (i = 0; i < m_num; no++, i++, info++) {
|
||||
prev = info->init(prev, no);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1047,7 +1047,7 @@ void blockenc(u8* block) {
|
||||
r6 = 30; // r6 (bit offset within r8)
|
||||
r8 = 0; // r8 (bitfield of color indexes)
|
||||
pix_idx = r8;
|
||||
for (; pix_idx < 0x40; pix_idx += 4) {
|
||||
for (; pix_idx < 0x40; pix_idx += 4, r6 -= 2) {
|
||||
// b2 = block[pix_idx + 2] * 11;
|
||||
// r2 = block[pix_idx + 0] * 30;
|
||||
// g2 = block[pix_idx + 1] * 59;
|
||||
@@ -1068,7 +1068,6 @@ void blockenc(u8* block) {
|
||||
}
|
||||
|
||||
r8 |= (r24 & 0x03) << r6;
|
||||
r6 -= 2;
|
||||
}
|
||||
} else { // VERSION_DEMO only block (optimized out in retail)
|
||||
pix_idx = 0; // r10
|
||||
|
||||
Reference in New Issue
Block a user