diff options
| author | theo <arisstephenson2@gmail.com> | 2020-06-13 17:02:27 -0700 |
|---|---|---|
| committer | theo <arisstephenson2@gmail.com> | 2020-06-13 17:02:27 -0700 |
| commit | 66fcdf618665694fb5f5c2d3788561f4e638f167 (patch) | |
| tree | 106b704cf63fa68f2c714247958b013fcf38b0d0 /src/createEntity.c | |
| parent | 8e1ca1936b4066fa252a14576cb5e4e79aff92b8 (diff) | |
clang-format
Diffstat (limited to 'src/createEntity.c')
| -rw-r--r-- | src/createEntity.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/src/createEntity.c b/src/createEntity.c index 92fef210..b7eeb595 100644 --- a/src/createEntity.c +++ b/src/createEntity.c @@ -2,7 +2,7 @@ // #include "entityData.h" // #include "global.h" -// extern Entity * sub_0805EB9C(u32, u32); +// extern Entity * sub_0805EB9C(u32, u32); // extern Entity * sub_0805E768(); // extern void sub_0804AEB0(Entity *, EntityData *); // extern u32 sub_0804AF0C(Entity *, EntityData *); @@ -11,41 +11,41 @@ // Entity * CreateEntity(EntityData *param_1) // { - // Entity *preexisting; - // Entity *entity; - // s32 type; - - // type = param_1->entityType & 15; - // if (((param_1->field_0x1 & 240) == 80) && - // (preexisting = sub_0805EB9C(type,param_1->entitySubtype), preexisting != NULL)) { - // entity = NULL; - // } - // else { - // entity = sub_0805E768(); //Get empty entity - // if (entity != NULL) { - // (entity->entityType).type = type; - // (entity->entityType).subtype = param_1->entitySubtype; - // (entity->entityType).parameter1 = param_1->entityParameter1; - // sub_0804AEB0(entity,param_1); - // if ((param_1->field_0x1 & 240) != 16) { - // (entity->entityType).parameter2 = *(u8 *)¶m_1->entityParameter2; - // /* i suspect this is where the entity's behavior is defined. Not sure. */ - // entity->parameter3 = (u8)((u32)param_1->entityParameter2 >> 8); - // if ((type != 9) && (sub_0804AF0C(entity,param_1), entity->field_0x4 != NULL)) { - // if ((param_1->entityType & 16) == 0) { - // if ((param_1->entityType & 32) != 0) { - // entity->collisionLayer = 2; - // return entity; - // } - // if ((gRoomControls & 2) == 0) { - // sub_08016A30(entity); - // return entity; - // } - // } - // entity->collisionLayer = 1; - // } - // } - // } - // } - // return entity; +// Entity *preexisting; +// Entity *entity; +// s32 type; + +// type = param_1->entityType & 15; +// if (((param_1->field_0x1 & 240) == 80) && +// (preexisting = sub_0805EB9C(type,param_1->entitySubtype), preexisting != NULL)) { +// entity = NULL; +// } +// else { +// entity = sub_0805E768(); //Get empty entity +// if (entity != NULL) { +// (entity->entityType).type = type; +// (entity->entityType).subtype = param_1->entitySubtype; +// (entity->entityType).parameter1 = param_1->entityParameter1; +// sub_0804AEB0(entity,param_1); +// if ((param_1->field_0x1 & 240) != 16) { +// (entity->entityType).parameter2 = *(u8 *)¶m_1->entityParameter2; +// /* i suspect this is where the entity's behavior is defined. Not sure. */ +// entity->parameter3 = (u8)((u32)param_1->entityParameter2 >> 8); +// if ((type != 9) && (sub_0804AF0C(entity,param_1), entity->field_0x4 != NULL)) { +// if ((param_1->entityType & 16) == 0) { +// if ((param_1->entityType & 32) != 0) { +// entity->collisionLayer = 2; +// return entity; +// } +// if ((gRoomControls & 2) == 0) { +// sub_08016A30(entity); +// return entity; +// } +// } +// entity->collisionLayer = 1; +// } +// } +// } +// } +// return entity; // } |
