Merge pull request #445 from hatal175/goto

Remove several gotos
This commit is contained in:
notyourav
2022-03-15 21:43:35 -07:00
committed by GitHub
9 changed files with 78 additions and 81 deletions
+3 -3
View File
@@ -20,16 +20,16 @@ void sub_080929A4(Entity* this) {
case 0x44D ... 0x44F:
case 0x182:
DeleteThisEntity();
goto switchEnd;
break;
default:
ClearFlag(this->field_0x86.HWORD);
}
ClearFlag(this->field_0x86.HWORD);
break;
case 0x80:
DeleteThisEntity();
break;
}
switchEnd:
}
}
+1 -2
View File
@@ -105,7 +105,7 @@ void MinecartDoor_Action3(MinecartDoorEntity* this) {
if (sub_08083734(super, super->type) == 0) {
return;
}
goto label;
bVar3 = FALSE;
} else {
bVar3 = --super->actionDelay * 0x1000000;
}
@@ -113,7 +113,6 @@ void MinecartDoor_Action3(MinecartDoorEntity* this) {
bVar3 = sub_08096D84(this);
}
if (bVar3 == FALSE) {
label:
super->action = 4;
sub_080836DC(super, super->type, this->unk_76);
}
+9 -7
View File
@@ -161,18 +161,20 @@ bool32 sub_0808FC5C(PushableFurnitureEntity* this) {
}
bVar2 = FALSE;
if (*(u16*)&super->type == 0x101) {
if (super->y.HALF.HI != this->unk_7e)
goto _0808FCC8;
if (super->y.HALF.HI == this->unk_7e) {
bVar2 = TRUE;
}
} else {
if (super->x.HALF.HI == this->unk_7e) {
bVar2 = TRUE;
}
_0808FCC8:
if (!bVar2) {
sub_0808FF50(this);
return TRUE;
}
}
if (!bVar2) {
sub_0808FF50(this);
return TRUE;
}
this->unk_81 = 1;
if (super->parent == NULL) {
SetFlag((u32)this->unk_86);