diff options
| author | notyourav <65437533+notyourav@users.noreply.github.com> | 2022-03-09 12:09:29 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-09 12:09:29 -0800 |
| commit | db306db638dbef985462a5535a14dda64661515f (patch) | |
| tree | a19be34871265660314345e5798cbbd8d07e848d /src/object | |
| parent | ad1c29958b1c2692ce4e53a5db5f82cfefd317c1 (diff) | |
| parent | 0d44caf0fd5d92dd3585e03e35ab5796b2113241 (diff) | |
Merge pull request #442 from HookedBehemoth/Object2B
decompile Object2B
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/object2B.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/object/object2B.c b/src/object/object2B.c new file mode 100644 index 00000000..747bf241 --- /dev/null +++ b/src/object/object2B.c @@ -0,0 +1,22 @@ +#include "global.h" +#include "entity.h" +#include "functions.h" + +void Object2B(Entity* object) { + Entity* parent; + + if (object->action == 0) { + object->action = 1; + object->z.WORD = 0; + object->spriteRendering.b3 = 3; + InitializeAnimation(object, 9); + } + + parent = object->parent; + if (parent->z.WORD == 0) { + DeleteThisEntity(); + } else { + int position = 0x120 - parent->z.HALF.HI; + sub_0805EC9C(object, position, position, parent->field_0x7c.HALF_U.HI); + } +} |
