clang-format and newlines

This commit is contained in:
theo3
2020-11-13 23:27:50 -08:00
parent 8fd7481395
commit 3079c016b4
236 changed files with 4010 additions and 4415 deletions
+77 -86
View File
@@ -11,7 +11,7 @@ static void sub_0808F244(Entity*);
extern void sub_0806FCF4(Entity*, u32, u32, u32);
extern void sub_0808F5EC(Entity*);
extern bool32 sub_0806F3E4(Entity *);
extern bool32 sub_0806F3E4(Entity*);
extern void (*const gUnk_08121E5C[])(Entity*);
extern void (*const gUnk_08121E88[])(Entity*);
@@ -63,98 +63,89 @@ static void sub_0808F14C(Entity* this) {
}
}
void sub_0808F170(Entity *this)
{
*(u32 *)&this->field_0x74 -= 0x20;
*(u32 *)&this->field_0x78 += 0x20;
sub_0806FCF4(this, *(u32 *)&this->field_0x78, 8, 2);
if (*(u32 *)&this->field_0x78 > 0x1ff) {
this->action++;
}
sub_0808F2B0(this);
}
void sub_0808F1A4(Entity *this)
{
*(u32 *)&this->field_0x78 += 0x10;
*(u32 *)&this->field_0x74 += 0x10;
sub_0806FCF4(this, *(u32 *)&this->field_0x78, 8, 2);
if (*(u32 *)&this->field_0x78 > 0x3ff) {
this->attachedEntity->action = 0xff;
DeleteThisEntity();
}
else {
void sub_0808F170(Entity* this) {
*(u32*)&this->field_0x74 -= 0x20;
*(u32*)&this->field_0x78 += 0x20;
sub_0806FCF4(this, *(u32*)&this->field_0x78, 8, 2);
if (*(u32*)&this->field_0x78 > 0x1ff) {
this->action++;
}
sub_0808F2B0(this);
}
}
void sub_0808F1E0(Entity *this)
{
void sub_0808F1A4(Entity* this) {
*(u32*)&this->field_0x78 += 0x10;
*(u32*)&this->field_0x74 += 0x10;
sub_0806FCF4(this, *(u32*)&this->field_0x78, 8, 2);
if (*(u32*)&this->field_0x78 > 0x3ff) {
this->attachedEntity->action = 0xff;
DeleteThisEntity();
} else {
sub_0808F2B0(this);
}
}
void sub_0808F1E0(Entity* this) {
gUnk_08121E98[this->action](this);
}
void sub_0808F1F8(Entity *this)
{
u8 bVar1;
this->spriteRendering.b0 = 3;
this->action++;
this->spriteRendering.b3 = this->parent->spriteRendering.b3;
this->spriteOrientation.flipY = this->parent->spriteOrientation.flipY;
this->spritePriority.b0 = 7;
InitializeAnimation(this, 1);
sub_0808F244(this);
}
void sub_0808F1F8(Entity* this) {
u8 bVar1;
static void sub_0808F244(Entity *this)
{
this->spriteSettings.b.draw = this->parent->spriteSettings.b.draw;
this->y.HALF.HI = this->parent->y.HALF.HI + 3;
this->x.HALF.HI = (*(s8*)&this->attachedEntity->spriteOffsetX + this->attachedEntity->x.HALF.HI);
this->height.WORD = 0;
*(u32 *)&this->field_0x74 = 0x80 - this->parent->height.HALF.HI;
*(u32 *)&this->field_0x78 = 0x100 - this->parent->height.HALF.HI;
*(u32 *)&this->field_0x70.WORD = *((u8 *)&this->parent->field_0x7c + 3);
sub_0808F2B0(this);
if ((this->parent->field_0x6c.HALF.HI & 2) != 0) {
DeleteThisEntity();
}
}
static void sub_0808F2B0(Entity *this)
{
sub_0805EC9C(this, *(u32 *)&this->field_0x74, *(u32 *)&this->field_0x78, this->field_0x70.WORD);
}
void sub_0808F2C0(Entity *this)
{
if (this->action == 0) {
this->spriteRendering.b0 = 3;
this->action++;
this->spriteRendering.b3 = this->parent->spriteRendering.b3;
this->spriteOrientation.flipY = this->parent->spriteOrientation.flipY;
this->spriteSettings.b.draw = 1;
this->spritePriority.b0 = 7;
this->height.WORD = 0;
InitializeAnimation(this, 1);
sub_0808F244(this);
}
static void sub_0808F244(Entity* this) {
this->spriteSettings.b.draw = this->parent->spriteSettings.b.draw;
this->y.HALF.HI = this->parent->y.HALF.HI + 3;
this->x.HALF.HI = this->parent->x.HALF.HI;
InitializeAnimation(this,3);
}
if (this->parent->height.HALF.HI == 0) {
*(u32 *)&this->field_0x74 = *(u32 *)&this->parent->field_0x74;
*(u32 *)&this->field_0x78 = *(u32 *)&this->parent->field_0x78;
}
else {
*(u32 *)&this->field_0x74 = 0x200 - this->parent->height.HALF.HI;
*(u32 *)&this->field_0x78 = this->parent->height.HALF.HI * -2 + 0x300;
}
*(u32 *)&this->field_0x70 = 0;
sub_0808F2B0(this);
sub_0806FCF4(this,*(u32 *)&this->field_0x78,8,2);
if (this->action == 0xff) {
DeleteThisEntity();
}
this->x.HALF.HI = (*(s8*)&this->attachedEntity->spriteOffsetX + this->attachedEntity->x.HALF.HI);
this->height.WORD = 0;
*(u32*)&this->field_0x74 = 0x80 - this->parent->height.HALF.HI;
*(u32*)&this->field_0x78 = 0x100 - this->parent->height.HALF.HI;
*(u32*)&this->field_0x70.WORD = *((u8*)&this->parent->field_0x7c + 3);
sub_0808F2B0(this);
if ((this->parent->field_0x6c.HALF.HI & 2) != 0) {
DeleteThisEntity();
}
}
static void sub_0808F2B0(Entity* this) {
sub_0805EC9C(this, *(u32*)&this->field_0x74, *(u32*)&this->field_0x78, this->field_0x70.WORD);
}
void sub_0808F2C0(Entity* this) {
if (this->action == 0) {
this->action++;
this->spriteRendering.b3 = this->parent->spriteRendering.b3;
this->spriteOrientation.flipY = this->parent->spriteOrientation.flipY;
this->spriteSettings.b.draw = 1;
this->spritePriority.b0 = 7;
this->height.WORD = 0;
this->y.HALF.HI = this->parent->y.HALF.HI + 3;
this->x.HALF.HI = this->parent->x.HALF.HI;
InitializeAnimation(this, 3);
}
if (this->parent->height.HALF.HI == 0) {
*(u32*)&this->field_0x74 = *(u32*)&this->parent->field_0x74;
*(u32*)&this->field_0x78 = *(u32*)&this->parent->field_0x78;
} else {
*(u32*)&this->field_0x74 = 0x200 - this->parent->height.HALF.HI;
*(u32*)&this->field_0x78 = this->parent->height.HALF.HI * -2 + 0x300;
}
*(u32*)&this->field_0x70 = 0;
sub_0808F2B0(this);
sub_0806FCF4(this, *(u32*)&this->field_0x78, 8, 2);
if (this->action == 0xff) {
DeleteThisEntity();
}
}
void sub_0808F370(Entity* this) {
@@ -168,7 +159,7 @@ void sub_0808F370(Entity* this) {
u8 flag = this->parent->previousActionFlag - 1;
if (flag < 5) {
if (this->field_0x70.WORD == 0) {
if (--(*(u32 *)&this->field_0x74) == -1) {
if (--(*(u32*)&this->field_0x74) == -1) {
this->field_0x70.WORD = gUnk_08121EA0[Random() & 1];
}
} else {
@@ -178,7 +169,7 @@ void sub_0808F370(Entity* this) {
}
} else {
this->action = 0;
*(u32 *)&this->field_0x74 = 0;
*(u32*)&this->field_0x74 = 0;
}
}
}
@@ -201,7 +192,7 @@ void sub_0808F3DC(Entity* this) {
}
ResolveEntityOnTop(this->attachedEntity, this);
} else {
if (*(u32 *)&this->parent->field_0x74 == 0) {
if (*(u32*)&this->parent->field_0x74 == 0) {
if (this->entityType.form == 8) {
this->attachedEntity->damageType = this->damageType;
}
@@ -260,8 +251,8 @@ void sub_0808F554(Entity* this) {
}
if (this->action != 0) {
if (*(u32 *)&this->cutsceneBeh) {
if (--(*(u32 *)&this->cutsceneBeh) == 0) {
if (*(u32*)&this->cutsceneBeh) {
if (--(*(u32*)&this->cutsceneBeh) == 0) {
DeleteThisEntity();
}
}
@@ -294,5 +285,5 @@ void sub_0808F5EC(Entity* this) {
entity->attachedEntity = this->attachedEntity;
}
*(u32 *)&this->field_0x74 = 600;
*(u32*)&this->field_0x74 = 600;
}