mirror of
https://github.com/zeldaret/tmc
synced 2026-08-20 14:15:10 -04:00
Remove several gotos
This commit is contained in:
+28
-29
@@ -814,41 +814,40 @@ void sub_0802DDD8(GleerokEntity* this) {
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
if (super->type2 == 1)
|
||||
goto code13;
|
||||
if (this->unk_76 == 0) {
|
||||
r2 = 1;
|
||||
r8 = 2;
|
||||
r4 = 1;
|
||||
} else {
|
||||
r2 = 2;
|
||||
r8 = 6;
|
||||
r4 = 0;
|
||||
}
|
||||
|
||||
if (this->unk_84->ent2->field_0xf == 1) {
|
||||
super->child = CreateProjectileWithParent(super, GLEEROK_PROJECTILE, r2);
|
||||
if (super->child) {
|
||||
super->child->direction = this->unk_84->filler[0x15];
|
||||
super->child->type2 = this->unk_84->ent2->frame & 0xf;
|
||||
super->child->parent = this->unk_84->ent2;
|
||||
super->child->child = this->unk_84->entities[0];
|
||||
if (super->type2 != 1) {
|
||||
if (this->unk_76 == 0) {
|
||||
r2 = 1;
|
||||
r8 = 2;
|
||||
r4 = 1;
|
||||
} else {
|
||||
r2 = 2;
|
||||
r8 = 6;
|
||||
r4 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->unk_74 == 0) {
|
||||
this->unk_74 = r4;
|
||||
this->unk_84->entities[super->field_0xf]->field_0xf = r8;
|
||||
|
||||
if (++super->field_0xf > 5) {
|
||||
super->field_0xf = 0;
|
||||
if (this->unk_84->ent2->field_0xf == 1) {
|
||||
super->child = CreateProjectileWithParent(super, GLEEROK_PROJECTILE, r2);
|
||||
if (super->child) {
|
||||
super->child->direction = this->unk_84->filler[0x15];
|
||||
super->child->type2 = this->unk_84->ent2->frame & 0xf;
|
||||
super->child->parent = this->unk_84->ent2;
|
||||
super->child->child = this->unk_84->entities[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (this->unk_74 == 0) {
|
||||
this->unk_74 = r4;
|
||||
this->unk_84->entities[super->field_0xf]->field_0xf = r8;
|
||||
|
||||
if (++super->field_0xf > 5) {
|
||||
super->field_0xf = 0;
|
||||
}
|
||||
} else {
|
||||
this->unk_74--;
|
||||
}
|
||||
} else {
|
||||
this->unk_74--;
|
||||
}
|
||||
|
||||
if (super->type2 == 1) {
|
||||
code13:
|
||||
sub_0802EA48(this->unk_84, 5, 0x40, super->direction);
|
||||
} else {
|
||||
if (this->unk_76 == 0) {
|
||||
|
||||
@@ -68,19 +68,15 @@ void sub_08031704(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08031714(Entity* this) {
|
||||
u8 newDirection;
|
||||
sub_080317B4(this);
|
||||
if (--this->field_0xf == 0) {
|
||||
this->field_0xf = (Random() & 0xf) + 0x10;
|
||||
if (sub_08049FA0(this) == 0) {
|
||||
if ((this->field_0xf & 1) != 0) {
|
||||
this->direction = sub_08049EE4(this);
|
||||
goto _08031766;
|
||||
}
|
||||
if (sub_08049FA0(this) == 0 && (this->field_0xf & 1) != 0) {
|
||||
this->direction = sub_08049EE4(this);
|
||||
} else {
|
||||
this->direction += 0x18;
|
||||
this->direction = ((Random() & 0xe) + this->direction) & 0x1f;
|
||||
}
|
||||
this->direction += 0x18;
|
||||
this->direction = ((Random() & 0xe) + this->direction) & 0x1f;
|
||||
_08031766:
|
||||
sub_080317E0(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user