diff --git a/include/common_structs.h b/include/common_structs.h index d51945b7d2..bb260c216b 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -787,7 +787,7 @@ typedef struct EffectInstance { /* 0x00 */ s32 flags; /* 0x04 */ s32 effectIndex; /* 0x08 */ s32 totalMatricies; - /* 0x0C */ void* unk_0C; + /* 0x0C */ Vec4f* unk_0C; // Correct Type? /* 0x10 */ struct Effect* effect; } EffectInstance; @@ -1723,10 +1723,4 @@ typedef struct { /* 0x11630 */ Matrix4s matrixStack[0x200]; } DisplayContext; // size = 0x19630 -// Size and purpose unknown -typedef struct ScriptOwner { - /* 0x000 */ u16 unk_00; // ActorID?? - /* 0x003 */ u8 unk_03; // ActorPartIndex?? -} ScriptOwner; - #endif diff --git a/src/code_1AF120.c b/src/code_1AF120.c index dfad65a6d8..c7472eb317 100644 --- a/src/code_1AF120.c +++ b/src/code_1AF120.c @@ -13,4 +13,15 @@ ApiStatus GetDamageIntensity(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_1AF120", ActorAddMovePos); +// TODO: Rename to AddEffectOffset +ApiStatus ActorAddMovePos(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + EffectInstance* effect = get_variable(script, *args++); + + // TODO: Figure out the actual type of unk_0C + effect->unk_0C->y += get_variable(script, *args++); + effect->unk_0C->z += get_variable(script, *args++); + effect->unk_0C->yaw += get_variable(script, *args++); + + return ApiStatus_DONE2; +}