mirror of https://github.com/zeldaret/tmc.git
lockedDoor.c: clang-format
This commit is contained in:
parent
da68765792
commit
08399f1be4
|
|
@ -24,15 +24,8 @@ u32 sub_080837B0(Entity*);
|
||||||
void sub_08083814(Entity*, u32);
|
void sub_08083814(Entity*, u32);
|
||||||
|
|
||||||
void (*const gUnk_0811F65C[])(Entity*) = {
|
void (*const gUnk_0811F65C[])(Entity*) = {
|
||||||
sub_08083338,
|
sub_08083338, sub_080834B4, sub_080834EC, sub_08083518, sub_08083540,
|
||||||
sub_080834B4,
|
nullsub_513, sub_08083598, sub_080835C8, sub_080835F8,
|
||||||
sub_080834EC,
|
|
||||||
sub_08083518,
|
|
||||||
sub_08083540,
|
|
||||||
nullsub_513,
|
|
||||||
sub_08083598,
|
|
||||||
sub_080835C8,
|
|
||||||
sub_080835F8
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void LockedDoor(Entity* this) {
|
void LockedDoor(Entity* this) {
|
||||||
|
|
@ -54,27 +47,22 @@ const struct_0811F680 gUnk_0811F680[] = {
|
||||||
{ 0, -2 },
|
{ 0, -2 },
|
||||||
{ 2, 0 },
|
{ 2, 0 },
|
||||||
{ 0, 2 },
|
{ 0, 2 },
|
||||||
{-2, 0}
|
{ -2, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct_0811F680 gUnk_0811F688[] = {
|
const struct_0811F680 gUnk_0811F688[] = {
|
||||||
{ 0, -21 },
|
{ 0, -21 },
|
||||||
{ 21, 0 },
|
{ 21, 0 },
|
||||||
{ 0, 21 },
|
{ 0, 21 },
|
||||||
{-21, 0}
|
{ -21, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 gUnk_0811F690[] = {
|
const u16 gUnk_0811F690[] = {
|
||||||
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
|
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15,
|
||||||
0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15,
|
0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x53, 0x53, 0x53, 0x53, 0x53, 0x53, 0x53, 0x53,
|
||||||
0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52,
|
0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||||
0x53, 0x53, 0x53, 0x53, 0x53, 0x53, 0x53, 0x53,
|
0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
|
||||||
0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54,
|
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x59, 0x59, 0x59, 0x59, 0x59, 0x59, 0x59, 0x59,
|
||||||
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
|
||||||
0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56,
|
|
||||||
0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
|
|
||||||
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
|
|
||||||
0x59, 0x59, 0x59, 0x59, 0x59, 0x59, 0x59, 0x59
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
@ -86,18 +74,22 @@ const struct_0811F730 gUnk_0811F730[] = {
|
||||||
{ { 8, 8 }, { -8, 8 } },
|
{ { 8, 8 }, { -8, 8 } },
|
||||||
{ { -8, 8 }, { -8, -8 } },
|
{ { -8, 8 }, { -8, -8 } },
|
||||||
{ { 8, -8 }, { -8, -8 } },
|
{ { 8, -8 }, { -8, -8 } },
|
||||||
{{ 8, 8}, { 8,-8}}
|
{ { 8, 8 }, { 8, -8 } },
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 gUnk_0811F740[] = {
|
const u8 gUnk_0811F740[] = {
|
||||||
0xBE, 0x7D, 0xEB, 0xD7
|
0xBE,
|
||||||
|
0x7D,
|
||||||
|
0xEB,
|
||||||
|
0xD7,
|
||||||
};
|
};
|
||||||
|
|
||||||
void sub_08083338(Entity* this) {
|
void sub_08083338(Entity* this) {
|
||||||
if (this->cutsceneBeh.HWORD != 0xFFFF && CheckFlags(this->cutsceneBeh.HWORD)) {
|
if (this->cutsceneBeh.HWORD != 0xFFFF && CheckFlags(this->cutsceneBeh.HWORD)) {
|
||||||
DeleteThisEntity();
|
DeleteThisEntity();
|
||||||
}
|
}
|
||||||
if (!sub_080837B0(this)) return;
|
if (!sub_080837B0(this))
|
||||||
|
return;
|
||||||
this->type2 = (this->type >> 2) & 3;
|
this->type2 = (this->type >> 2) & 3;
|
||||||
this->frameIndex = this->type & 3;
|
this->frameIndex = this->type & 3;
|
||||||
this->speed = 0x300;
|
this->speed = 0x300;
|
||||||
|
|
@ -195,28 +187,34 @@ void sub_08083540(Entity *this) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void nullsub_513(Entity* this) {}
|
void nullsub_513(Entity* this) {
|
||||||
|
}
|
||||||
|
|
||||||
void sub_08083598(Entity* this) {
|
void sub_08083598(Entity* this) {
|
||||||
if (this->type2 == 0) {
|
if (this->type2 == 0) {
|
||||||
if (!CheckFlags(this->field_0x86.HWORD)) return;
|
if (!CheckFlags(this->field_0x86.HWORD))
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (CheckFlags(this->field_0x86.HWORD)) return;
|
if (CheckFlags(this->field_0x86.HWORD))
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
sub_08083658(this);
|
sub_08083658(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_080835C8(Entity* this) {
|
void sub_080835C8(Entity* this) {
|
||||||
if (this->type2 == 0) {
|
if (this->type2 == 0) {
|
||||||
if (CheckFlags(this->field_0x86.HWORD)) return;
|
if (CheckFlags(this->field_0x86.HWORD))
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (!CheckFlags(this->field_0x86.HWORD)) return;
|
if (!CheckFlags(this->field_0x86.HWORD))
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
this->action = 3;
|
this->action = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_080835F8(Entity* this) {
|
void sub_080835F8(Entity* this) {
|
||||||
if (this->interactType == 0 && !CheckFlags(this->field_0x86.HWORD)) return;
|
if (this->interactType == 0 && !CheckFlags(this->field_0x86.HWORD))
|
||||||
|
return;
|
||||||
this->action = 1;
|
this->action = 1;
|
||||||
this->actionDelay = 0x14;
|
this->actionDelay = 0x14;
|
||||||
sub_08083658(this);
|
sub_08083658(this);
|
||||||
|
|
@ -267,16 +265,20 @@ void sub_080836DC(Entity *this, u32 unk_0, u32 unk_1) {
|
||||||
u32 sub_08083734(Entity* this, u32 unk0) {
|
u32 sub_08083734(Entity* this, u32 unk0) {
|
||||||
switch (unk0) {
|
switch (unk0) {
|
||||||
case 0:
|
case 0:
|
||||||
if (this->field_0x70.HALF_U.HI + 0xd - gPlayerEntity.y.HALF.HI < 0) return 1;
|
if (this->field_0x70.HALF_U.HI + 0xd - gPlayerEntity.y.HALF.HI < 0)
|
||||||
|
return 1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (gPlayerEntity.x.HALF.HI - (this->field_0x70.HALF_U.LO - 0xb) < 0) return 1;
|
if (gPlayerEntity.x.HALF.HI - (this->field_0x70.HALF_U.LO - 0xb) < 0)
|
||||||
|
return 1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (gPlayerEntity.y.HALF.HI - (this->field_0x70.HALF_U.HI - 0x8) < 0) return 1;
|
if (gPlayerEntity.y.HALF.HI - (this->field_0x70.HALF_U.HI - 0x8) < 0)
|
||||||
|
return 1;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (this->field_0x70.HALF_U.LO + 0xa - gPlayerEntity.x.HALF.HI < 0) return 1;
|
if (this->field_0x70.HALF_U.LO + 0xa - gPlayerEntity.x.HALF.HI < 0)
|
||||||
|
return 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue