From 227626e9a77ab2e8c5703829e7bd0b53ab2ee326 Mon Sep 17 00:00:00 2001 From: dark-samus Date: Sat, 21 Nov 2020 04:29:48 -0500 Subject: [PATCH] format --- src/code_102610_len_2330.c | 4 ++-- src/code_102c80.c | 36 ++++++++++++++++++------------------ src/code_104940_len_dc0.c | 7 ++++--- src/code_105700_len_2130.c | 8 +++++--- src/code_105f90.c | 3 ++- src/code_106ef0.c | 2 +- src/code_109660_len_1270.c | 8 ++++---- src/code_a5dd0_len_114e0.c | 3 ++- src/os/code_4ac90_len_3910.c | 3 ++- 9 files changed, 40 insertions(+), 34 deletions(-) diff --git a/src/code_102610_len_2330.c b/src/code_102610_len_2330.c index d77a3004ca..655f2acae3 100644 --- a/src/code_102610_len_2330.c +++ b/src/code_102610_len_2330.c @@ -10,7 +10,7 @@ void create_shadow_callback(Shadow* shadow) { //TODO: make sure this is the right struct for this. s32 func_802E0DB0(Shadow* shadow) { - + if (((shadow->unk_06 & 4) != 0) && (gPlayerStatus.flags & 2) != 0) { return 1; } @@ -109,7 +109,7 @@ void func_802E1350(Entity* entity) { } } -void func_802E13B8(Entity *entity) { +void func_802E13B8(Entity* entity) { Trigger* trigger = (Trigger*)entity->dataBuf; // TODO: Fix this entity_init_Hammer23Block_normal(entity); diff --git a/src/code_102c80.c b/src/code_102c80.c index b456a071f8..038b731aba 100644 --- a/src/code_102c80.c +++ b/src/code_102c80.c @@ -73,14 +73,14 @@ void func_802E1660(Entity* entity) { func_802E153C(entity); - if(entity->unk_06 & 0x40) { - if(playerStatus->actionState == ActionState_HAMMER) { - if(gPlayerData.hammerLevel < 0) { + if (entity->unk_06 & 0x40) { + if (playerStatus->actionState == ActionState_HAMMER) { + if (gPlayerData.hammerLevel < 0) { return; } func_8010FD68(entity); - if(temp->attachedEntity == NULL) { + if (temp->attachedEntity == NULL) { return; } @@ -89,25 +89,25 @@ void func_802E1660(Entity* entity) { } } - if(playerStatus->actionState == ActionState_SPIN_JUMP) { + if (playerStatus->actionState == ActionState_SPIN_JUMP) { return; } - if(temp2[3] == 4) { - if(temp2[0] != 0) { + if (temp2[3] == 4) { + if (temp2[0] != 0) { return; } } - if(!(entity->unk_06 & 1)) { - if(!(entity->unk_06 & 0x80)) { + if (!(entity->unk_06 & 1)) { + if (!(entity->unk_06 & 0x80)) { return; } } func_8010FD68(entity); - if(temp->attachedEntity == NULL) { + if (temp->attachedEntity == NULL) { return; } @@ -141,7 +141,7 @@ void func_802E1EA8(Entity* entity) { INCLUDE_ASM(s32, "code_102c80", func_802E1EDC); void func_802E234C(Entity* entity) { - PlayerStatus* playerStatus = &gPlayerStatus; + PlayerStatus* playerStatus = &gPlayerStatus; struct802E1400* temp = (struct802E1400*)entity->dataBuf; playerStatus->animFlags |= 0x1000000; @@ -205,13 +205,13 @@ void func_802E2EB0(Entity* entity) { ((struct802E1400*)entity->dataBuf)->unk_38 = entity->position.y; type = get_entity_type((u8)entity->listIndex); - if((type - 24) < 3) { + if ((type - 24) < 3) { entity->scale.x = 0.5f; entity->scale.y = 0.5f; entity->scale.z = 0.5f; } - switch(type) { + switch (type) { case 21: case 24: a1 = &D_0A0031E0; @@ -241,7 +241,7 @@ void func_802E2EB0(Entity* entity) { break; } - if(a2 == NULL) { + if (a2 == NULL) { return; } @@ -255,11 +255,11 @@ INCLUDE_ASM(void, "code_102c80", func_802E2EB0, Entity* entity); //Needs rodata support void func_802E2FD0(Entity* entity) { u32 type; - void *addr = NULL; + void* addr = NULL; type = get_entity_type(entity->listIndex); - switch(type) { + switch (type) { case 21: addr = &D_802E9C8C; break; @@ -290,7 +290,7 @@ void func_802E2FD0(Entity* entity) { break; } - if(addr == NULL) { + if (addr == NULL) { return; } @@ -298,4 +298,4 @@ void func_802E2FD0(Entity* entity) { } #else INCLUDE_ASM(s32, "code_102c80", func_802E2FD0); -#endif \ No newline at end of file +#endif diff --git a/src/code_104940_len_dc0.c b/src/code_104940_len_dc0.c index ac6e986370..c65476e32d 100644 --- a/src/code_104940_len_dc0.c +++ b/src/code_104940_len_dc0.c @@ -62,7 +62,7 @@ s32 func_802E3650(Entity* entity) { itemEntity->position.y = entity->position.y + 4.0f; } } - } + } return ret; } @@ -144,7 +144,8 @@ void func_802E38D8(Entity* entity) { if ((temp->unk_04 == 0) || (temp->unk_06 == 0)) { temp->unk_03 = 1; - func_8010FBC0(get_entity_by_index(create_entity(&D_802EA07C, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000)), &D_802E9E54); + func_8010FBC0(get_entity_by_index(create_entity(&D_802EA07C, entity->position.x, entity->position.y, entity->position.z, + entity->rotation.y, 0x80000000)), &D_802E9E54); entity->flags |= 0x20000020; } } @@ -212,4 +213,4 @@ s32 entity_init_HammerBlock_small(Entity* entity) { entity->scale.x = 0.5f; entity->scale.y = 0.5f; entity->scale.z = 0.5f; -} \ No newline at end of file +} diff --git a/src/code_105700_len_2130.c b/src/code_105700_len_2130.c index 2dce3aa836..30cb130293 100644 --- a/src/code_105700_len_2130.c +++ b/src/code_105700_len_2130.c @@ -51,7 +51,7 @@ void func_802E40A0(Entity* entity) { UNK_PTR ptr; entityType = get_entity_type(entity->listIndex); - if ((entityType == 0x12) || (entityType == 0x14) ){ + if ((entityType == 0x12) || (entityType == 0x14)) { play_model_animation(entity->virtualModelIndex, &D_00000094); } else { play_model_animation(entity->virtualModelIndex, &D_00000094_2); @@ -105,7 +105,8 @@ void func_802E421C(Entity* entity) { phi_a0 = &D_802EA0A0; } } - temp_s2 = create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000); + temp_s2 = create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, + 0x80000000); entityTemp = get_entity_by_index(temp_s2); entityTemp->flags |= 1; @@ -128,7 +129,8 @@ void func_802E421C(Entity* entity) { } else { phi_a0 = &D_802EA63C; } - entityTemp = get_entity_by_index(create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000)); + entityTemp = get_entity_by_index(create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, + entity->rotation.y, 0x80000000)); entityTemp->alpha = entity->alpha; if (((entity->flags & 1) != 0) || ((u32) entity->alpha < 0xFF)) { entityTemp->alpha = 0x20; diff --git a/src/code_105f90.c b/src/code_105f90.c index bb8d271130..4b03e45142 100644 --- a/src/code_105f90.c +++ b/src/code_105f90.c @@ -128,7 +128,8 @@ s8 func_802E55A8(Entity* entity, StaticEntityData* data) { temp_s2 = D_8015C7D0; entity_init_Hammer23Block_normal(entity); - someEntity = get_entity_by_index(create_entity(data, entity->position.x, entity->position.y, entity->position.z, 0.0f, 0x80000000)); + someEntity = get_entity_by_index(create_entity(data, entity->position.x, entity->position.y, entity->position.z, 0.0f, + 0x80000000)); temp_v1 = someEntity->dataBuf; temp_v1->unk_00 = entity->listIndex; if (temp_s2 == 0) { diff --git a/src/code_106ef0.c b/src/code_106ef0.c index dbdf1fd9b0..a7f42bf50e 100644 --- a/src/code_106ef0.c +++ b/src/code_106ef0.c @@ -91,4 +91,4 @@ void func_802E5F7C(Entity* entity) { temp->unk_128 = &D_0A000800; temp->unk_12C = &D_0A000750; entity->unk_3C = func_802E586C; -} \ No newline at end of file +} diff --git a/src/code_109660_len_1270.c b/src/code_109660_len_1270.c index ede70077ef..dfabb48d4c 100644 --- a/src/code_109660_len_1270.c +++ b/src/code_109660_len_1270.c @@ -28,7 +28,7 @@ typedef struct struct802E8BC0 { /* 0x00 */ char unk_00[4]; /* 0x04 */ s32 unk_04; /* 0x08 */ char unk_08[4]; - /* 0x0C */ s32 unk_0C; + /* 0x0C */ s32 unk_0C; } struct802E8BC0; MapConfig* get_current_map_header(void); @@ -36,9 +36,9 @@ void disable_player_input(void); void disable_player_static_collisions(void); void move_player(s32, f32, f32); -void func_802E8BC0(Entity *entity) { - PlayerStatus *playerStatus = &gPlayerStatus; - PlayerStatus *playerStatus2 = &gPlayerStatus; +void func_802E8BC0(Entity* entity) { + PlayerStatus* playerStatus = &gPlayerStatus; + PlayerStatus* playerStatus2 = &gPlayerStatus; struct802E8BC0* temp = (struct802E8BC0*)entity->dataBuf; MapConfig* mapConfig = get_current_map_header(); f32 temp_f20; diff --git a/src/code_a5dd0_len_114e0.c b/src/code_a5dd0_len_114e0.c index bb69a5f261..2a8479e85f 100644 --- a/src/code_a5dd0_len_114e0.c +++ b/src/code_a5dd0_len_114e0.c @@ -100,7 +100,8 @@ INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80111790); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_801117DC); -INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_entity, StaticEntityData* data, s32 x, s32 y, s32 z, s32 arg4, s32 flags); +INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_entity, StaticEntityData* data, s32 x, s32 y, s32 z, s32 arg4, + s32 flags); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_shadow_from_data); diff --git a/src/os/code_4ac90_len_3910.c b/src/os/code_4ac90_len_3910.c index 29f7df455d..c72a80c65e 100644 --- a/src/os/code_4ac90_len_3910.c +++ b/src/os/code_4ac90_len_3910.c @@ -222,7 +222,8 @@ INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072170); INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800721D0); -INCLUDE_ASM(UNK_TYPE, "os/code_4ac90_len_3910", func_80072230, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); +INCLUDE_ASM(UNK_TYPE, "os/code_4ac90_len_3910", func_80072230, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, + s32 arg5); INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072290);