clang-format

This commit is contained in:
theo
2020-06-13 17:02:27 -07:00
parent 8e1ca1936b
commit 66fcdf6186
86 changed files with 2320 additions and 2604 deletions
+47 -66
View File
@@ -3,10 +3,10 @@
#include "room.h"
#include "link.h"
extern void sub_0809F7BC(Entity *);
extern void sub_0809F7BC(Entity*);
extern void PlaySFX(u32);
extern void sub_0809F814(u32);
extern void sub_0809F7F4(Entity *);
extern void sub_0809F7F4(Entity*);
extern void SetGlobalFlag(u32);
extern void LoadRoomEntityList();
extern void DeleteThisEntity();
@@ -15,51 +15,46 @@ extern void sub_08078A90(u32);
extern void sub_08078B48(void);
extern u32 SetLocalFlag(u32);
extern u32 Random(void);
extern void sub_0806F69C(Entity *);
extern void (*gUnk_08124798[])(Entity *);
extern void (*gUnk_081247A0[])(Entity *);
extern void (*gUnk_081247AC[])(Entity *);
extern Entity * CreateObject(u32, u32, u32);
extern void sub_0806FA30(Entity *, Entity *);
extern void sub_0807BB68(u32 *, u32, u32);
extern void sub_0806F69C(Entity*);
extern void (*gUnk_08124798[])(Entity*);
extern void (*gUnk_081247A0[])(Entity*);
extern void (*gUnk_081247AC[])(Entity*);
extern Entity* CreateObject(u32, u32, u32);
extern void sub_0806FA30(Entity*, Entity*);
extern void sub_0807BB68(u32*, u32, u32);
extern u8 gUnk_02034490;
extern u32 gUnk_030010A0;
extern void *gUnk_080DD750;
extern void* gUnk_080DD750;
extern Entity gLinkEntity;
extern LinkState gLinkState;
extern u8 gUnk_081247C0[];
extern u16 gUnk_081247C8[];
extern u32 gUnk_081247D0;
void sub_0809F4C4(Entity *this)
{
void sub_0809F4C4(Entity* this) {
gUnk_08124798[(this->entityType).parameter1](this);
}
void sub_0809F4DC(Entity *this)
{
void sub_0809F4DC(Entity* this) {
if ((this->entityType).parameter2 == 0) {
gUnk_081247A0[this->action](this);
}
else {
} else {
gUnk_081247AC[this->action](this);
}
}
void sub_0809F514(Entity *this)
{
void sub_0809F514(Entity* this) {
this->action = 1;
this->parameter3 = 120;
this->spriteSettings.b.ss0 = 0;
*(u8 *)&this->field_0x68 = 12;
*(u8*)&this->field_0x68 = 12;
gRoomControls.cameraTarget = this;
gUnk_02034490 = 255;
sub_0809F7BC(this);
}
void sub_0809F548(Entity *this)
{
void sub_0809F548(Entity* this) {
if (--this->parameter3 == 0) {
this->action = 2;
@@ -67,8 +62,7 @@ void sub_0809F548(Entity *this)
PlaySFX(285);
sub_0809F814((((this->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 63) << 6);
}
else {
} else {
if ((gUnk_030010A0 & 7) == 0) {
sub_0809F7BC(this);
}
@@ -76,8 +70,7 @@ void sub_0809F548(Entity *this)
}
}
void sub_0809F5B0(Entity *this)
{
void sub_0809F5B0(Entity* this) {
if (--this->parameter3 == 0) {
PlaySFX(115);
SetGlobalFlag(36);
@@ -86,17 +79,15 @@ void sub_0809F5B0(Entity *this)
}
}
void sub_0809F5DC(Entity *this)
{
void sub_0809F5DC(Entity* this) {
this->action = 1;
this->spriteSettings.b.ss0 = 0;
*(u8 *)&this->field_0x68 = 12;
*(u8*)&this->field_0x68 = 12;
}
void sub_0809F5F0(Entity *this)
{
void sub_0809F5F0(Entity* this) {
u32 iVar1;
iVar1 = CheckRoomFlag(this->parameter3);
if (iVar1 != 0) {
this->action = 2;
@@ -107,9 +98,8 @@ void sub_0809F5F0(Entity *this)
}
}
void sub_0809F61C(Entity *this)
{
void sub_0809F61C(Entity* this) {
if ((gRoomControls.unk6 & 4) == 0) {
if (this->parameter3 == 30) {
SetLocalFlag(this->entityType.parameter2);
@@ -119,8 +109,8 @@ void sub_0809F61C(Entity *this)
this->parameter3 = 120;
PlaySFX(285);
sub_0809F814((((this->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 63) << 6); }
else {
(((this->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 63) << 6);
} else {
if ((gUnk_030010A0 & 7) == 0) {
sub_0809F7BC(this);
}
@@ -129,8 +119,7 @@ void sub_0809F61C(Entity *this)
}
}
void sub_0809F69C(Entity *this)
{
void sub_0809F69C(Entity* this) {
if (--this->parameter3 == 0) {
this->parameter3 = 30;
@@ -140,21 +129,18 @@ void sub_0809F69C(Entity *this)
}
}
void sub_0809F6CC(Entity *this)
{
if (((gRoomControls.unk6 & 4) == 0) &&
(--this->parameter3 == 0)) {
void sub_0809F6CC(Entity* this) {
if (((gRoomControls.unk6 & 4) == 0) && (--this->parameter3 == 0)) {
gLinkState.unk7 = 1;
DeleteThisEntity();
}
}
void sub_0809F700(Entity *this)
{
void sub_0809F700(Entity* this) {
u8 bVar1;
u32 uVar2;
if (this->action == 0) {
this->action = 1;
this->parameter3 = (Random() & 30) + 8;
@@ -172,12 +158,11 @@ void sub_0809F700(Entity *this)
}
#ifdef NON_MATCHING
Entity * sub_0809F770(Entity *this)
{
Entity *cloud;
Entity* sub_0809F770(Entity* this) {
Entity* cloud;
s32 uVar1;
cloud = CreateObject(163,1,0);
cloud = CreateObject(163, 1, 0);
if (cloud != NULL) {
sub_0806FA30(this, cloud);
uVar1 = Random();
@@ -190,18 +175,16 @@ Entity * sub_0809F770(Entity *this)
}
#else
NAKED
Entity * sub_0809F770(Entity *this)
{
asm(".include \"asm/non_matching/cloud/sub_0809F770.inc\"");
Entity* sub_0809F770(Entity* this) {
asm(".include \"asm/non_matching/cloud/sub_0809F770.inc\"");
}
#endif
void sub_0809F7BC(Entity *this)
{
Entity *cloud;
void sub_0809F7BC(Entity* this) {
Entity* cloud;
u32 uVar1;
u32 uVar2;
for (uVar2 = 0; uVar2 < 8; uVar2++) {
cloud = sub_0809F770(this);
if (cloud != NULL) {
@@ -212,12 +195,11 @@ void sub_0809F7BC(Entity *this)
}
}
void sub_0809F7F4(Entity *this)
{
void sub_0809F7F4(Entity* this) {
u8 cVar1;
u8 *puVar2;
puVar2 = (u8 *)&this->field_0x68;
u8* puVar2;
puVar2 = (u8*)&this->field_0x68;
*puVar2 -= 1;
if (*puVar2 == 0) {
@@ -226,7 +208,6 @@ void sub_0809F7F4(Entity *this)
}
}
void sub_0809F814(u32 r0)
{
void sub_0809F814(u32 r0) {
sub_0807BB68(&gUnk_081247D0, r0, 1);
}
}