From f08b8a7865ff680de87d85e90c0be17c60ed3875 Mon Sep 17 00:00:00 2001 From: theo3 Date: Sat, 15 Aug 2020 12:34:09 -0700 Subject: objectA.c OK --- src/object/objectA.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/object/objectA.c (limited to 'src/object/objectA.c') diff --git a/src/object/objectA.c b/src/object/objectA.c new file mode 100644 index 00000000..c68d503b --- /dev/null +++ b/src/object/objectA.c @@ -0,0 +1,39 @@ +#include "global.h" +#include "entity.h" +#include "room.h" +#include "flags.h" +#include "functions.h" + +extern BoundingBox gUnk_080FD170; + +extern u8 gUnk_02000070; + +void ObjectA(Entity *this) { + u32 uVar2; + + if (this->action == 0) { + this->action = 1; + this->boundingBox = &gUnk_080FD170; + if (this->collisionLayer == 1) { + uVar2 = 0x26; + } else { + uVar2 = 0x34; + } + this->field_0x70.HALF.LO = uVar2; + if (CheckFlags(this->field_0x86) != 0) { + SetTileType(*(u16*)&this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer); + if ((gRoomControls.unk2 & 1) != 0) { + gUnk_02000070 = 0; + } + DeleteThisEntity(); + } else { + sub_080787CC(this); + } + } else if (this->interactType != 0) { + SetTileType(*(u16*)&this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer); + SetFlag(this->field_0x86); + sub_080A29BC(this); + sub_080526F8(-1); + DeleteThisEntity(); + } +} \ No newline at end of file -- cgit v1.2.3