diff --git a/include/common_structs.h b/include/common_structs.h index bb260c216b..0c4c9f881c 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 */ Vec4f* unk_0C; // Correct Type? + /* 0x0C */ struct EffectInstanceData* data; /* 0x10 */ struct Effect* effect; } EffectInstance; @@ -804,7 +804,7 @@ typedef struct Effect { /* 0x00 */ s32 flags; /* 0x04 */ s32 effectIndex; /* 0x08 */ s32 instanceCounter; - /* 0x0C */ s32 unk_0C; + /* 0x0C */ s32 unk_0C; //? Maybe EffectInstanceData too ? /* 0x10 */ void (*update)(EffectInstance* effectInst); /* 0x14 */ void (*renderWorld)(EffectInstance* effectInst); /* 0x18 */ void (*unk_18)(EffectInstance* effectInst); @@ -1723,4 +1723,15 @@ typedef struct { /* 0x11630 */ Matrix4s matrixStack[0x200]; } DisplayContext; // size = 0x19630 +typedef struct EffectInstanceData { + /* 0x00 */ s32 unk_00; + /* 0x0C */ Vec3f pos; + /* 0x10 */ Vec3f rotation; + /* 0x1C */ Vec3f scale; + /* 0x28 */ char unk_28[0x4]; + /* 0x2C */ s32 unk_2C; + /* 0x30 */ f32 unk_30; + /* 0x34 */ char unk_34[0x4C]; +} EffectInstanceData; // size = 0x80 + #endif diff --git a/src/code_1AF120.c b/src/code_1AF120.c index c7472eb317..d80703d52c 100644 --- a/src/code_1AF120.c +++ b/src/code_1AF120.c @@ -18,10 +18,9 @@ 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++); + effect->data->pos.x += get_variable(script, *args++); + effect->data->pos.y += get_variable(script, *args++); + effect->data->pos.z += get_variable(script, *args++); return ApiStatus_DONE2; }