add new common_struct EffectInstanceData

This commit is contained in:
brotenko@gmail.com 2021-02-13 00:51:36 +01:00
parent 1dd4568b6b
commit 19eef41547
2 changed files with 16 additions and 6 deletions

View File

@ -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

View File

@ -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;
}