mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-08 20:20:04 -04:00
Fix some roomno related inlines
This commit is contained in:
@@ -1085,7 +1085,7 @@ inline void dComIfGs_offSwitch(int i_no, int i_roomNo) {
|
||||
g_dComIfG_gameInfo.save.offSwitch(i_no, i_roomNo);
|
||||
}
|
||||
|
||||
inline BOOL dComIfGs_isSwitch(s32 i_no, s32 i_roomNo) {
|
||||
inline BOOL dComIfGs_isSwitch(int i_no, int i_roomNo) {
|
||||
return g_dComIfG_gameInfo.save.isSwitch(i_no, i_roomNo);
|
||||
}
|
||||
|
||||
@@ -1442,7 +1442,7 @@ inline s32 dComIfGp_roomControl_getTimePass() {
|
||||
return g_dComIfG_gameInfo.play.getRoomControl()->GetTimePass();
|
||||
}
|
||||
|
||||
inline s32 dComIfGp_roomControl_getStayNo() {
|
||||
inline int dComIfGp_roomControl_getStayNo() {
|
||||
return dStage_roomControl_c::getStayNo();
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +261,6 @@ public:
|
||||
const cXyz& getPosition() const { return current.pos; }
|
||||
cXyz* getPositionP() { return ¤t.pos; }
|
||||
const csXyz& getAngle() const { return current.angle; }
|
||||
int getRoomNo() const { return current.roomNo; }
|
||||
}; // Size: 0x290
|
||||
|
||||
STATIC_ASSERT(sizeof(fopAc_ac_c) == 0x290);
|
||||
|
||||
@@ -285,7 +285,7 @@ inline f32 fopAcM_getCullSizeSphereR(fopAc_ac_c* i_actor) {
|
||||
|
||||
inline void dComIfGs_onSwitch(int i_no, int i_roomNo);
|
||||
inline void dComIfGs_offSwitch(int i_no, int i_roomNo);
|
||||
inline BOOL dComIfGs_isSwitch(s32 i_no, s32 i_roomNo);
|
||||
inline BOOL dComIfGs_isSwitch(int i_no, int i_roomNo);
|
||||
inline void dComIfGs_offActor(int i_no, int i_roomNo);
|
||||
|
||||
inline void fopAcM_onSwitch(fopAc_ac_c* pActor, int sw) {
|
||||
|
||||
@@ -147,7 +147,7 @@ void daAgb_c::NameConv() {
|
||||
|
||||
/* 800CF894-800CFA30 .text uploadInitCheck__7daAgb_cFv */
|
||||
int daAgb_c::uploadInitCheck() {
|
||||
s32 roomNo = dComIfGp_roomControl_getStayNo();
|
||||
int roomNo = dComIfGp_roomControl_getStayNo();
|
||||
dStage_FileList_dt_c* fili_p =
|
||||
dComIfGp_roomControl_getStatusRoomDt(roomNo)->getFileListInfo();
|
||||
|
||||
@@ -653,7 +653,7 @@ void daAgb_c::GbaItemUse() {
|
||||
|
||||
u32 temp_r0 = temp_r29 - 3;
|
||||
if (temp_r0 == 0 || temp_r0 == 1 || temp_r0 == 2 || temp_r29 == 0x11 || temp_r29 == 0x12) {
|
||||
s32 roomNo = dComIfGp_roomControl_getStayNo();
|
||||
int roomNo = dComIfGp_roomControl_getStayNo();
|
||||
dStage_FileList_dt_c* fili_p =
|
||||
dComIfGp_roomControl_getStatusRoomDt(roomNo)->getFileListInfo();
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ BOOL daAndsw2_c::chkAllSw2() {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < num; i++) {
|
||||
if (!dComIfGs_isSwitch(topSw+i, getRoomNo())) {
|
||||
if (!dComIfGs_isSwitch(topSw+i, current.roomNo)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ static BOOL daAndsw2_actionOnAll(daAndsw2_c* i_this) {
|
||||
} else if (i_this->mEventIdx != -1) {
|
||||
i_this->mAction = ACT_ORDER;
|
||||
} else {
|
||||
int room = i_this->getRoomNo();
|
||||
int room = i_this->current.roomNo;
|
||||
int sw = i_this->getSwbit();
|
||||
dComIfGs_onSwitch(sw, room);
|
||||
|
||||
@@ -136,7 +136,7 @@ static BOOL daAndsw2_actionTimer(daAndsw2_c* i_this) {
|
||||
} else if (i_this->mEventIdx != -1) {
|
||||
i_this->mAction = ACT_ORDER;
|
||||
} else {
|
||||
int room = i_this->getRoomNo();
|
||||
int room = i_this->current.roomNo;
|
||||
int sw = i_this->getSwbit();
|
||||
dComIfGs_onSwitch(sw, room);
|
||||
|
||||
@@ -151,7 +151,7 @@ static BOOL daAndsw2_actionTimer(daAndsw2_c* i_this) {
|
||||
static BOOL daAndsw2_actionOrder(daAndsw2_c* i_this) {
|
||||
if (i_this->mEvtInfo.checkCommandDemoAccrpt()) {
|
||||
i_this->mAction = ACT_EVENT;
|
||||
int room = i_this->getRoomNo();
|
||||
int room = i_this->current.roomNo;
|
||||
int sw = i_this->getSwbit();
|
||||
dComIfGs_onSwitch(sw, room);
|
||||
} else if (i_this->getType() == TYPE_CONTINUOUS && !i_this->chkAllSw2()) {
|
||||
@@ -179,7 +179,7 @@ static BOOL daAndsw2_actionEvent(daAndsw2_c* i_this) {
|
||||
static BOOL daAndsw2_actionOff(daAndsw2_c* i_this) {
|
||||
if (!i_this->chkAllSw2()) {
|
||||
i_this->mAction = ACT_ON_ALL;
|
||||
int room = i_this->getRoomNo();
|
||||
int room = i_this->current.roomNo;
|
||||
int sw = i_this->getSwbit();
|
||||
dComIfGs_offSwitch(sw, room);
|
||||
}
|
||||
@@ -211,7 +211,7 @@ s32 daAndsw2_c::create() {
|
||||
|
||||
switch (getType()) {
|
||||
case TYPE_ONE_OFF:
|
||||
if (sw == 0xFF || dComIfGs_isSwitch(sw, getRoomNo())) {
|
||||
if (sw == 0xFF || dComIfGs_isSwitch(sw, current.roomNo)) {
|
||||
// Switch invalid or already set.
|
||||
mAction = ACT_WAIT;
|
||||
} else {
|
||||
@@ -224,7 +224,7 @@ s32 daAndsw2_c::create() {
|
||||
if (sw == 0xFF) {
|
||||
// Switch invalid.
|
||||
mAction = ACT_WAIT;
|
||||
} else if (dComIfGs_isSwitch(sw, getRoomNo())) {
|
||||
} else if (dComIfGs_isSwitch(sw, current.roomNo)) {
|
||||
// Switch already set, wait for the condition to no longer be met.
|
||||
mAction = ACT_OFF;
|
||||
} else {
|
||||
|
||||
@@ -35,7 +35,7 @@ s32 daDisappear_Execute(disappear_class* i_this) {
|
||||
|
||||
if (health != 1 && health != 3) {
|
||||
if (health == 2) {
|
||||
fopAcM_createItemForBoss(i_this->getPositionP(), 0, i_this->getRoomNo(), &i_this->current.angle, NULL, 0);
|
||||
fopAcM_createItemForBoss(i_this->getPositionP(), 0, i_this->current.roomNo, &i_this->current.angle, NULL, 0);
|
||||
}
|
||||
else if (health >= 0x0A && health <= 0x0D) {
|
||||
if (health < 0x0D) {
|
||||
@@ -47,7 +47,7 @@ s32 daDisappear_Execute(disappear_class* i_this) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
fopAcM_createIball(i_this->getPositionP(), i_this->mItemTableIdx, i_this->getRoomNo(), &i_this->current.angle, i_this->mSwitchId);
|
||||
fopAcM_createIball(i_this->getPositionP(), i_this->mItemTableIdx, i_this->current.roomNo, &i_this->current.angle, i_this->mSwitchId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ s32 daDisappear_Delete(disappear_class*) {
|
||||
|
||||
/* 800E7AD0-800E7DBC .text set_disappear__FP15disappear_classf */
|
||||
void set_disappear(disappear_class* i_this, float scale) {
|
||||
s8 rev = dComIfGp_getReverb(i_this->getRoomNo());
|
||||
s8 rev = dComIfGp_getReverb(i_this->current.roomNo);
|
||||
mDoAud_seStart(JA_SE_CM_MONS_EXPLODE, &i_this->mEyePos, 0, rev);
|
||||
|
||||
cXyz particleScale(scale, scale, scale);
|
||||
|
||||
@@ -762,7 +762,7 @@ void daItem_c::itemGetExecute() {
|
||||
break;
|
||||
}
|
||||
|
||||
u8 roomNo = getRoomNo();
|
||||
u8 roomNo = current.roomNo;
|
||||
s32 flag = mPickupFlag;
|
||||
if (m_itemNo == BLUE_JELLY) {
|
||||
// Blue Chu Jelly uses mPickupFlag as if it was a switch.
|
||||
|
||||
@@ -46,7 +46,7 @@ s32 daMagma_Create(fopAc_ac_c* i_this) {
|
||||
g_dComIfG_gameInfo.play.mpMagmaPacket->newFloor(
|
||||
magma->current.pos,
|
||||
magma->mScale,
|
||||
magma->getRoomNo(),
|
||||
magma->current.roomNo,
|
||||
magma->mBase.mParameters
|
||||
);
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ namespace daObjPaper {
|
||||
void daObjPaper::Act_c::damage_cc_proc() {
|
||||
u32 hitResult = mCylinderCol.ChkTgHit();
|
||||
if (hitResult) {
|
||||
daObj::HitSeStart(&mEyePos, getRoomNo(), &mCylinderCol, 0x0D);
|
||||
daObj::HitSeStart(&mEyePos, current.roomNo, &mCylinderCol, 0x0D);
|
||||
dKy_Sound_set(getPosition(), 4, fopAcM_GetID(this), 100);
|
||||
|
||||
daObj::HitEff_hibana(this, &mCylinderCol);
|
||||
|
||||
@@ -13,7 +13,8 @@ void daPy_py_c::changePlayer(fopAc_ac_c* newPlayer) {
|
||||
if (!newPlayer) {
|
||||
return;
|
||||
}
|
||||
if (dComIfGp_roomControl_getStayNo() != newPlayer->getRoomNo()) {
|
||||
s8 stayNo = dComIfGp_roomControl_getStayNo();
|
||||
if (stayNo != newPlayer->current.roomNo) {
|
||||
return;
|
||||
}
|
||||
dComIfGp_setPlayer(0, newPlayer);
|
||||
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
request_of_phase_process_class* getPhase() { return &mPhs; }
|
||||
|
||||
u8 getTboxNo() { return fopAcM_GetParam(this) >> 0x07 & 0x1F; }
|
||||
s32 getSwNo() { return fopAcM_GetParam(this) >> 0x0C & 0xFF; }
|
||||
int getSwNo() { return fopAcM_GetParam(this) >> 0x0C & 0xFF; }
|
||||
u8 getItemNo() { return orig.angle.z >> 8 & 0xFF; }
|
||||
|
||||
bool action() { return (this->*mActionFunc)(); }
|
||||
@@ -1276,8 +1276,7 @@ bool daTbox_c::actionGenocide() {
|
||||
fopAcM_orderOtherEvent2(this, "DEFAULT_TREASURE_APPEAR", 1, 0xFFFF);
|
||||
mEvtInfo.mCondition |= 2;
|
||||
|
||||
s32 swNo = getSwNo();
|
||||
dComIfGs_onSwitch(swNo, mRoomNo);
|
||||
dComIfGs_onSwitch(getSwNo(), mRoomNo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user