mirror of https://github.com/zeldaret/tp.git
Clean up various inlines/fakematches/comments
This commit is contained in:
parent
8a478c5ebe
commit
091069cf49
|
|
@ -8271,7 +8271,7 @@ static void* daAlink_searchBoar(fopAc_ac_c* param_0, void* param_1);
|
|||
static fopAc_ac_c* daAlink_searchLightBall(fopAc_ac_c* p_actor, void* param_1);
|
||||
|
||||
inline daAlink_c* daAlink_getAlinkActorClass() {
|
||||
return (daAlink_c*)g_dComIfG_gameInfo.play.getPlayerPtr(LINK_PTR);
|
||||
return (daAlink_c*)dComIfGp_getLinkPlayer();
|
||||
}
|
||||
|
||||
#endif /* D_A_D_A_ALINK_H */
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ public:
|
|||
void setStartStageLayer(s8 layer) { mStartStage.setLayer(layer); }
|
||||
|
||||
const char* getNextStageName() { return mNextStage.getName(); }
|
||||
dStage_startStage_c* getNextStartStage() { return &mNextStage; }
|
||||
dStage_startStage_c* getNextStartStage() { return mNextStage.getStartStage(); }
|
||||
s8 getNextStageRoomNo() { return mNextStage.getRoomNo(); }
|
||||
s8 getNextStageLayer() { return mNextStage.getLayer(); }
|
||||
s16 getNextStagePoint() { return mNextStage.getPoint(); }
|
||||
|
|
@ -2572,7 +2572,7 @@ inline s8 dComIfGp_getNextStageLayer() {
|
|||
return g_dComIfG_gameInfo.play.getNextStageLayer();
|
||||
}
|
||||
|
||||
inline s32 dComIfGp_getNextStageWipe() {
|
||||
inline s8 dComIfGp_getNextStageWipe() {
|
||||
return g_dComIfG_gameInfo.play.getNextStageWipe();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1100,7 +1100,7 @@ public:
|
|||
static void setZoneNo(int, int);
|
||||
static dBgp_c* getBgp(int i_roomNo) {
|
||||
#if DEBUG
|
||||
// NONMATCHING
|
||||
// DEBUG NONMATCHING
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
|
|
@ -1230,6 +1230,7 @@ public:
|
|||
BOOL isEnable() const { return enabled; }
|
||||
s8 getWipe() const { return wipe; }
|
||||
u8 getWipeSpeed() const { return wipe_speed; }
|
||||
dStage_startStage_c* getStartStage() { return this; }
|
||||
|
||||
private:
|
||||
s8 enabled;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ static void daAlinkHIO_setReverseAnmGenMessage(daAlinkHIO_anm_c* i_anmP, JORMCon
|
|||
0x18);
|
||||
}
|
||||
|
||||
// NONMATCHING - regalloc + extra mr instruction
|
||||
// DEBUG NONMATCHING - regalloc + extra mr instruction
|
||||
void daAlinkHIO_data_c::setStructData(char* param_1) {
|
||||
u8* pfVar2;
|
||||
u8* pfVar4;
|
||||
|
|
@ -146,7 +146,7 @@ void daAlinkHIO_data_c::baseCopy() {
|
|||
cLib_memCpy(mp_data, mp_src_data, m_len);
|
||||
}
|
||||
|
||||
// NONMATCHING
|
||||
// DEBUG NONMATCHING
|
||||
void daAlinkHIO_data_c::update() {
|
||||
baseCopy();
|
||||
JORMContext* ctx = attachJORMContext(8);
|
||||
|
|
@ -5764,7 +5764,6 @@ void daAlinkHIO_wolf_c::genMessage(JORMContext* ctx) {
|
|||
ctx->genSlider("光雫B", &m.mLightDropB, -0x40, 0x40, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
}
|
||||
|
||||
// NONMATCHING
|
||||
daAlinkHIO_wolf_c::daAlinkHIO_wolf_c()
|
||||
: mWlMove(), mWlMoveNoP(), mWlAtnMove(), mWlSideStep(), mWlBackJump(), mWlHowl(), mWlAutoJump(),
|
||||
mWlPush(), mWlLie(), mLight(1), mWlWallHang(), mWlDamage(), mWlSlide(), mWlRope(),
|
||||
|
|
|
|||
|
|
@ -2878,6 +2878,7 @@ static void demo_camera(b_gnd_class* i_this) {
|
|||
if (i_this->mDemoCamMode != 0) {
|
||||
// fakematch - dComIfGp_getHorseActor() isn't getting inlined for some reason
|
||||
horse = (daHorse_c*)g_dComIfG_gameInfo.play.getPlayerPtr(1);
|
||||
// horse = (daHorse_c*)dComIfGp_getHorseActor();
|
||||
}
|
||||
|
||||
cXyz sp114;
|
||||
|
|
@ -3483,8 +3484,7 @@ static void demo_camera(b_gnd_class* i_this) {
|
|||
|
||||
a_this->current.pos.set(0.0f, 1100.0f, 0.0f);
|
||||
a_this->old.pos = a_this->current.pos;
|
||||
a_this->shape_angle.y = -0x2000;
|
||||
a_this->current.angle.y = -0x2000;
|
||||
a_this->current.angle.y = a_this->shape_angle.y = -0x2000;
|
||||
|
||||
cMtx_YrotS(*calc_mtx, a_this->shape_angle.y);
|
||||
sp114.x = -300.0f;
|
||||
|
|
@ -3653,8 +3653,7 @@ static void demo_camera(b_gnd_class* i_this) {
|
|||
player->setPlayerPosAndAngle(&sp108, -0x4802, 0);
|
||||
a_this->current.pos.set(-600.0f, 1100.0f, 0.0f);
|
||||
a_this->old.pos = a_this->current.pos;
|
||||
a_this->current.angle.y = 0x37FE;
|
||||
a_this->shape_angle.y = 0x37FE;
|
||||
a_this->shape_angle.y = a_this->current.angle.y = 0x37FE;
|
||||
sp8 = TRUE;
|
||||
}
|
||||
break;
|
||||
|
|
@ -3679,8 +3678,7 @@ static void demo_camera(b_gnd_class* i_this) {
|
|||
a_this->current.pos.set(-600.0f, 1100.0f, 0.0f);
|
||||
|
||||
a_this->old.pos = a_this->current.pos;
|
||||
a_this->current.angle.y = 0x37FE;
|
||||
a_this->shape_angle.y = 0x37FE;
|
||||
a_this->shape_angle.y = a_this->current.angle.y = 0x37FE;
|
||||
|
||||
sp108.set(0.0f, 1100.0f, 0.0f);
|
||||
fopAcM_create(PROC_OBJ_GB, 0xF0069600, &sp108, fopAcM_GetRoomNo(a_this), NULL, NULL, -1);
|
||||
|
|
|
|||
|
|
@ -2015,7 +2015,7 @@ int daDoor20_c::chkStopOpen() {
|
|||
roomNo = door_param2_c::getBRoomNo(this);
|
||||
}
|
||||
if ((field_0x68c == 0 && frontOption == 3) || (field_0x68c == 1 && backOption == 3)) {
|
||||
if (dComIfGp_event_runCheck() == 0 || (field_0x68d == 0)) {
|
||||
if (dComIfGp_event_runCheck() == FALSE || (field_0x68d == 0)) {
|
||||
if (dComIfGp_roomControl_checkRoomDisp(roomNo) &&
|
||||
fopAcM_myRoomSearchEnemy(roomNo) == NULL)
|
||||
{
|
||||
|
|
@ -2024,7 +2024,7 @@ int daDoor20_c::chkStopOpen() {
|
|||
return 0;
|
||||
}
|
||||
if (swBit != 0xff) {
|
||||
g_dComIfG_gameInfo.info.onSwitch(swBit, roomNo);
|
||||
dComIfGs_onSwitch(swBit, roomNo);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3409,7 +3409,6 @@ static s8 e_wb_c_run(e_wb_class* i_this) {
|
|||
return return_value;
|
||||
}
|
||||
|
||||
// NONMATCHING - regalloc / conditional pathing
|
||||
static void action(e_wb_class* i_this) {
|
||||
fopEn_enemy_c* a_this = (fopEn_enemy_c*)i_this;
|
||||
cXyz pos1;
|
||||
|
|
|
|||
|
|
@ -1853,11 +1853,11 @@ static void mf_hit(mg_fish_class* i_this) {
|
|||
daPy_py_c* player = daPy_getLinkPlayerActorClass();
|
||||
player->onFishingRodGetFish();
|
||||
if (pvVar5->lure_type == MG_LURE_SP) {
|
||||
u8 bVar7 = g_dComIfG_gameInfo.info.mSavedata.mEvent.getEventReg(0xf11f);
|
||||
u8 bVar7 = dComIfGs_getEventReg(0xf11f);
|
||||
if (bVar7 < 0x1f) {
|
||||
bVar7++;
|
||||
}
|
||||
g_dComIfG_gameInfo.info.mSavedata.mEvent.setEventReg(0xf11f, bVar7);
|
||||
dComIfGs_setEventReg(0xf11f, bVar7);
|
||||
}
|
||||
} else if (iVar1 != 0) {
|
||||
if (iVar1 == 2) {
|
||||
|
|
@ -2041,8 +2041,7 @@ static void mf_jump(mg_fish_class* i_this) {
|
|||
commonXyz2.z += i_this->actor.current.pos.z;
|
||||
commonXyz2.y = 10.0f + i_this->mSurfaceY;
|
||||
fopAcM_createItem(&commonXyz2, 0, -1, -1, NULL, NULL, 0);
|
||||
g_dComIfG_gameInfo.info.mSavedata.mEvent.onEventBit(
|
||||
dSv_event_flag_c::saveBitLabels[0x1d6]);
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1d6]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -3859,7 +3858,7 @@ static int daMg_Fish_Create(fopAc_ac_c* i_this) {
|
|||
if (phase == cPhs_COMPLEATE_e) {
|
||||
s32 params_0 = fopAcM_GetParam(i_this) >> 24;
|
||||
if (params_0 != 0 && params_0 != 0xff &&
|
||||
g_dComIfG_gameInfo.info.isSwitch(params_0, fopAcM_GetRoomNo(i_this)))
|
||||
dComIfGs_isSwitch(params_0, fopAcM_GetRoomNo(i_this)))
|
||||
{
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5811,7 +5811,6 @@ static int npc_ks_fsdemo(npc_ks_class* i_this) {
|
|||
int frame = i_this->model->getFrame();
|
||||
int iVar1 = 0;
|
||||
s16 sVar1 = 0x1000;
|
||||
s16 range;
|
||||
|
||||
i_this->field_0x5fc = 0;
|
||||
i_this->field_0xaec = 1;
|
||||
|
|
@ -5936,7 +5935,7 @@ static int npc_ks_fsdemo(npc_ks_class* i_this) {
|
|||
}
|
||||
|
||||
iVar1 = 1;
|
||||
range = actor->current.angle.y - i_this->target_angle;
|
||||
s16 range = actor->current.angle.y - i_this->target_angle;
|
||||
if ((range > 0x3000 || range < -0x3000) && i_this->mode < 22) {
|
||||
anm_init(i_this, 28, 3.0f, 0, 1.0f);
|
||||
i_this->mode = 22;
|
||||
|
|
|
|||
|
|
@ -979,7 +979,6 @@ BOOL daNpc_ykM_c::isDelete() {
|
|||
}
|
||||
}
|
||||
|
||||
// NONMATCHING - m_nextID load issue, regalloc
|
||||
void daNpc_ykM_c::reset() {
|
||||
csXyz angle;
|
||||
int iVar1 = (u8*)&field_0x1588 - (u8*)&mpNextAction;
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ void daBmWindow_c::init_modeWait() {
|
|||
}
|
||||
|
||||
void daBmWindow_c::modeWait() {
|
||||
daPy_py_c* player = (daPy_py_c*)g_dComIfG_gameInfo.play.getPlayerPtr(LINK_PTR);
|
||||
daPy_py_c* player = (daPy_py_c*)dComIfGp_getLinkPlayer();
|
||||
cXyz cStack_2c;
|
||||
cXyz cStack_38;
|
||||
cStack_2c = l_check_area[0];
|
||||
|
|
|
|||
|
|
@ -161,9 +161,8 @@ int daObjCRVHAHEN_c::Execute() {
|
|||
|
||||
int daObjCRVHAHEN_c::Delete() {
|
||||
if (mInitialized) {
|
||||
J3DModelData* model_data = (J3DModelData*)dRes_control_c::getRes(
|
||||
l_arcName, "CaravanPiece.bmd", g_dComIfG_gameInfo.mResControl.mObjectInfo, 0x80);
|
||||
dComIfGp_removeSimpleModel(model_data, (int)(char)current.roomNo);
|
||||
J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, "CaravanPiece.bmd");
|
||||
dComIfGp_removeSimpleModel(model_data, fopAcM_GetRoomNo(this));
|
||||
}
|
||||
|
||||
dComIfG_resDelete(&mPhase, l_arcName);
|
||||
|
|
@ -222,9 +221,8 @@ int daObjCRVHAHEN_c::create() {
|
|||
}
|
||||
mDrawHahen = 0;
|
||||
gravity = -9.0f;
|
||||
J3DModelData* model_data = (J3DModelData*)dRes_control_c::getRes(
|
||||
l_arcName, "CaravanPiece.bmd", g_dComIfG_gameInfo.mResControl.mObjectInfo, 0x80);
|
||||
dComIfGp_addSimpleModel(model_data, (int)(char)current.roomNo, '\0');
|
||||
J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, "CaravanPiece.bmd");
|
||||
dComIfGp_addSimpleModel(model_data, fopAcM_GetRoomNo(this), '\0');
|
||||
mInitialized = true;
|
||||
mGroundHeight = current.pos.y;
|
||||
fopAcM_setCullSizeBox(this, -1000.0, -500.0, -1000.0, 1000.0, 500.0, 1000.0);
|
||||
|
|
|
|||
|
|
@ -324,7 +324,6 @@ void daObjLv7Brg_c::action() {
|
|||
}
|
||||
}
|
||||
|
||||
// NONMATCHING - small regalloc
|
||||
void daObjLv7Brg_c::mode_action() {
|
||||
f32 var_f31;
|
||||
f32 temp_f30 = field_0xa78;
|
||||
|
|
|
|||
|
|
@ -273,10 +273,11 @@ int daZdoor_c::create1st() {
|
|||
mDoorType = getType();
|
||||
int phase_state = dComIfG_resLoad(&mPhaseReq, l_arcName[mDoorType]);
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
int res_name_index = g_dComIfG_gameInfo.mResControl.getObjectResName2Index(l_arcName[mDoorType], l_dzbName[mDoorType]);
|
||||
int dzb_id = dComIfG_getObjctResName2Index(l_arcName[mDoorType], l_dzbName[mDoorType]);
|
||||
JUT_ASSERT(604, dzb_id != -1);
|
||||
|
||||
u16 estimate_size = estimateSizeTbl[mDoorType];
|
||||
phase_state = MoveBGCreate(l_arcName[mDoorType], res_name_index, 0x0, estimate_size, 0x0);
|
||||
phase_state = MoveBGCreate(l_arcName[mDoorType], dzb_id, 0x0, estimate_size, 0x0);
|
||||
|
||||
if (phase_state == cPhs_ERROR_e) {
|
||||
return phase_state;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ static void texScrollCheck(f32& param_0) {
|
|||
param_0 -= 1.0f;
|
||||
}
|
||||
|
||||
// NONMATCHING - reg alloc
|
||||
static int daVrbox2_Draw(vrbox2_class* i_this) {
|
||||
camera_class* camera_p;
|
||||
dKankyo_sunlenz_Packet* lenz_p;
|
||||
|
|
|
|||
|
|
@ -4661,7 +4661,7 @@ void dScnKy_env_light_c::exeKankyo() {
|
|||
|
||||
g_env_light.mColPatMode = g_env_light.mColPatModeGather;
|
||||
|
||||
if (dComIfGp_event_runCheck() == false && g_env_light.mColPatModeGather != 0) {
|
||||
if (dComIfGp_event_runCheck() == FALSE && g_env_light.mColPatModeGather != 0) {
|
||||
if (g_env_light.mColPatModeGather >= 3) {
|
||||
g_env_light.mColPatModeGather = 0;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ void dKyr_sun_move() {
|
|||
}
|
||||
|
||||
void dKyr_rain_init() {
|
||||
camera_class* camera = g_dComIfG_gameInfo.play.mCameraInfo[0].mCamera;
|
||||
camera_class* camera = (camera_class*)dComIfGp_getCamera(0);
|
||||
g_env_light.mpRainPacket->mpTex = (u8*)dComIfG_getObjectRes("Always", 0x4a);
|
||||
g_env_light.mpRainPacket->mpTex2 = (u8*)dComIfG_getObjectRes("Always", 0x57);
|
||||
g_env_light.mpRainPacket->mCamEyePos = camera->lookat.eye;
|
||||
|
|
@ -1224,7 +1224,7 @@ void dKyr_housi_move() {
|
|||
}
|
||||
|
||||
void dKyr_snow_init() {
|
||||
camera_class* camera = g_dComIfG_gameInfo.play.mCameraInfo[0].mCamera;
|
||||
camera_class* camera = (camera_class*)dComIfGp_getCamera(0);
|
||||
g_env_light.mpSnowPacket = new (32) dKankyo_snow_Packet();
|
||||
|
||||
if (g_env_light.mpSnowPacket == NULL) {
|
||||
|
|
@ -1518,7 +1518,7 @@ void dKyr_snow_move() {
|
|||
}
|
||||
|
||||
void dKyr_star_init() {
|
||||
camera_class* camera = g_dComIfG_gameInfo.play.mCameraInfo[0].mCamera;
|
||||
camera_class* camera = (camera_class*)dComIfGp_getCamera(0);
|
||||
g_env_light.mpStarPacket = new (32) dKankyo_star_Packet();
|
||||
|
||||
if (g_env_light.mpStarPacket == NULL) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ dMap_HIO_c::dMap_HIO_c() {
|
|||
}
|
||||
|
||||
void dMap_HIO_c::listenPropertyEvent(const JORPropertyEvent* evt) {
|
||||
// NONMATCHING
|
||||
// DEBUG NONMATCHING
|
||||
JORReflexible::listenPropertyEvent(evt);
|
||||
|
||||
if (dMap_HIO_prm_res_dst_s::m_res != NULL) {
|
||||
|
|
@ -117,7 +117,7 @@ void dMap_HIO_c::listenPropertyEvent(const JORPropertyEvent* evt) {
|
|||
}
|
||||
|
||||
void dMap_HIO_list_c::copySrcToHio() {
|
||||
// NONMATCHING
|
||||
// DEBUG NONMATCHING
|
||||
if (dMap_HIO_c::m_res_src_p != NULL) {
|
||||
dMpath_RGBA_c color;
|
||||
for (int i = 0; i < 51; i++) {
|
||||
|
|
|
|||
|
|
@ -418,8 +418,7 @@ void dMeter2_c::checkStatus() {
|
|||
mStatus = 0;
|
||||
field_0x12c = field_0x128;
|
||||
|
||||
// supposed to be daPy_py_c::checkNowWolf, but it messes with reg alloc?
|
||||
field_0x128 = ((daPy_py_c*)g_dComIfG_gameInfo.play.getPlayerPtr(LINK_PTR))->checkWolf();
|
||||
field_0x128 = daPy_py_c::checkNowWolf();
|
||||
|
||||
if (!dComIfGp_2dShowCheck() || dMsgObject_getMsgObjectClass()->isPlaceMessage()) {
|
||||
mStatus |= 0x4000;
|
||||
|
|
@ -1008,33 +1007,30 @@ void dMeter2_c::moveLightDrop() {
|
|||
|
||||
void dMeter2_c::moveRupee() {
|
||||
s16 temp_r5;
|
||||
s16 var_r6;
|
||||
s32 temp_r0;
|
||||
bool draw_rupee;
|
||||
|
||||
temp_r5 = dComIfGs_getRupeeMax();
|
||||
draw_rupee = false;
|
||||
s16 r29 = 0;
|
||||
bool draw_rupee = false;
|
||||
|
||||
// using dComIfGp_getItemRupeeCount() here swaps r3/r4 reg alloc?
|
||||
if (g_dComIfG_gameInfo.play.mItemInfo.mItemRupeeCount != 0) {
|
||||
var_r6 = dComIfGs_getRupee() + dComIfGp_getItemRupeeCount();
|
||||
if (var_r6 > temp_r5) {
|
||||
var_r6 = temp_r5;
|
||||
} else if (var_r6 < 0) {
|
||||
var_r6 = 0;
|
||||
if (dComIfGp_getItemRupeeCount() != 0) {
|
||||
r29 = dComIfGs_getRupee() + dComIfGp_getItemRupeeCount();
|
||||
if (r29 > temp_r5) {
|
||||
r29 = temp_r5;
|
||||
} else if (r29 < 0) {
|
||||
r29 = 0;
|
||||
}
|
||||
|
||||
dComIfGs_setRupee(var_r6);
|
||||
dComIfGs_setRupee(r29);
|
||||
dComIfGp_clearItemRupeeCount();
|
||||
temp_r0 = (u16)var_r6 - mRupeeNum;
|
||||
|
||||
if (temp_r0 >= 5) {
|
||||
if (dComIfGs_getRupee() - mRupeeNum >= 5) {
|
||||
onRupeeSoundBit(2);
|
||||
if (isRupeeSoundBit(3)) {
|
||||
offRupeeSoundBit(3);
|
||||
offRupeeSoundBit(1);
|
||||
}
|
||||
} else if (temp_r0 <= -5) {
|
||||
} else if (dComIfGs_getRupee() - mRupeeNum <= -5) {
|
||||
onRupeeSoundBit(3);
|
||||
if (isRupeeSoundBit(2)) {
|
||||
offRupeeSoundBit(2);
|
||||
|
|
|
|||
|
|
@ -225,9 +225,8 @@ static bool objectSetCheck(room_of_scene_class* i_this) {
|
|||
static int dScnRoom_Execute(room_of_scene_class* i_this) {
|
||||
int roomNo = fopScnM_GetParam(i_this);
|
||||
|
||||
u32 flag = g_dComIfG_gameInfo.play.getRoomControl()->mStatus[roomNo].mFlag;
|
||||
if (flag & 2) {
|
||||
dComIfGp_roomControl_setStatusFlag(roomNo, flag & ~2);
|
||||
if (dComIfGp_roomControl_checkStatusFlag(roomNo, 2)) {
|
||||
dComIfGp_roomControl_offStatusFlag(roomNo, 2);
|
||||
dComIfGp_roomControl_onStatusFlag(roomNo, 1);
|
||||
} else if (objectSetCheck(i_this)) {
|
||||
if (dComIfGp_roomControl_checkStatusFlag(roomNo, 4)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue