Fix some roomno related inlines

This commit is contained in:
LagoLunatic
2023-11-02 05:31:02 -04:00
parent c7d703712d
commit f3055e96e8
11 changed files with 22 additions and 23 deletions
+7 -7
View File
@@ -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 {