diff options
| author | fig02 <fig02srl@gmail.com> | 2020-06-17 15:44:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-17 15:44:22 -0400 |
| commit | 67d13fe19010cd7e54c09154022e5d664dc1c254 (patch) | |
| tree | eb6a305bf126ef5f85133ca31f09acd6f9325891 /src/code/z_actor.c | |
| parent | 494062167935a814744202e9a508489b2e109e28 (diff) | |
Arms_Hook OK (#210)
* Arms_Hook OK
* cleanup
* decr
* remove redundant include
* missed some things
* rename things
Co-authored-by: dark-samus <mathmcclintic@gmail.com>
Diffstat (limited to 'src/code/z_actor.c')
| -rw-r--r-- | src/code/z_actor.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index e6ea5ff88..0342dd8f0 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1,6 +1,7 @@ #include <ultra64.h> #include <global.h> #include <vt.h> +#include "overlays/actors/ovl_Arms_Hook/z_arms_hook.h" #include "overlays/actors/ovl_En_Part/z_en_part.h" @@ -1020,24 +1021,14 @@ s32 func_8002DDF4(GlobalContext* globalCtx) { return player->stateFlags2 & 0x1000; } -typedef struct { - /* 0x000 */ Actor actor; - /* 0x14C */ char unk_14C[0xB4]; - /* 0x200 */ Actor* unk_200; - /* 0x204 */ f32 unk_204; - /* 0x208 */ f32 unk_208; - /* 0x20C */ f32 unk_20C; - /* 0x210 */ s16 unk_210; -} ActorArmsHook; - void func_8002DE04(GlobalContext* globalCtx, Actor* actorA, Actor* actorB) { - ActorArmsHook* hookActor; + ArmsHook* hookshot; - hookActor = (ActorArmsHook*)Actor_Find(&globalCtx->actorCtx, 0x0066, ACTORTYPE_ITEMACTION); - hookActor->unk_200 = actorB; - hookActor->unk_204 = 0.0f; - hookActor->unk_208 = 0.0f; - hookActor->unk_20C = 0.0f; + hookshot = (ArmsHook*)Actor_Find(&globalCtx->actorCtx, ACTOR_ARMS_HOOK, ACTORTYPE_ITEMACTION); + hookshot->grabbed = actorB; + hookshot->grabbedDistDiff.x = 0.0f; + hookshot->grabbedDistDiff.y = 0.0f; + hookshot->grabbedDistDiff.z = 0.0f; actorB->flags |= 0x2000; actorA->flags &= ~0x2000; } |
