summaryrefslogtreecommitdiff
path: root/src/object/objectB2.c
diff options
context:
space:
mode:
author21aslade <21aslade@go.dsdmail.net>2020-11-07 15:22:02 -0700
committer21aslade <21aslade@go.dsdmail.net>2020-11-07 15:22:02 -0700
commitd04dc143fbbef8feef61daf39d110703f4dfda9b (patch)
tree626b7ee4279b2224aa06bef8231fd6daa4363998 /src/object/objectB2.c
parent4b6f822829d6dd771ed995030f1bf1d24f204536 (diff)
parentf1bfe499de0afdd8e93c5e3e0e6c9e12b3343e1b (diff)
Merge branch 'master' of https://github.com/zeldaret/tmc
Diffstat (limited to 'src/object/objectB2.c')
-rw-r--r--src/object/objectB2.c52
1 files changed, 23 insertions, 29 deletions
diff --git a/src/object/objectB2.c b/src/object/objectB2.c
index 3db27795..7c4073fb 100644
--- a/src/object/objectB2.c
+++ b/src/object/objectB2.c
@@ -7,38 +7,32 @@ extern u32 sub_080AE4CC(Entity*, u32, u32, u32);
extern void* gUnk_02027EB4;
extern void* gUnk_0200D654;
-#if 0
+void ObjectB2(Entity* this) {
+ void* pEVar3;
-void ObjectB2(Entity *this)
-{
- void* pEVar3;
-
- if (this->action == 0) {
- this->action = 1;
- this->actionDelay = 0x10;
- this->direction = (this->entityType).form << 3;
- if (this->collisionLayer == 2) {
- pEVar3 = &gUnk_0200D654;
+ if (this->action == 0) {
+ this->action = 1;
+ this->actionDelay = 0x10;
+ this->direction = (this->entityType).form << 3;
+ if (this->collisionLayer == 2) {
+ pEVar3 = &gUnk_0200D654;
+ } else {
+ pEVar3 = &gUnk_02027EB4;
+ }
+ this->attachedEntity = pEVar3;
+ InitializeAnimation(this, this->entityType.form);
}
- else {
- pEVar3 = &gUnk_02027EB4;
+ this->nonPlanarMovement = this->parent->nonPlanarMovement;
+ sub_0806F69C(this);
+ if (sub_080AE4CC(this->attachedEntity, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
+ DeleteThisEntity();
}
- this->attachedEntity = pEVar3;
- InitializeAnimation(this, this->entityType.form);
- }
- this->nonPlanarMovement = this->parent->nonPlanarMovement;
- sub_0806F69C(this);
- if (sub_080AE4CC(this->attachedEntity, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
- DeleteThisEntity();
- }
- if (this->nonPlanarMovement < 0x41) {
- this->spriteSettings.b.draw ^= 1;
+ if (this->nonPlanarMovement < 0x41) {
+ this->spriteSettings.b.draw ^= 1;
- if (--this->actionDelay == 0) {
- DeleteThisEntity();
+ if (--this->actionDelay == 0) {
+ DeleteThisEntity();
+ }
}
- }
- GetNextFrame(this);
+ GetNextFrame(this);
}
-
-#endif