summaryrefslogtreecommitdiff
path: root/src/code/code_0x800A5AC0.c
diff options
context:
space:
mode:
authorrozlette <uberpanzermensch@gmail.com>2019-09-29 01:37:21 -0500
committerrozlette <uberpanzermensch@gmail.com>2019-09-29 01:37:21 -0500
commita8060ddcff50d6d616f94b0d5ef5002be6583809 (patch)
tree3fa9819159d3d0a4006310f179fa2a29bfa179d9 /src/code/code_0x800A5AC0.c
parent0ecea6b62635f2753a2a7344d55b1d6b36f56449 (diff)
Use structs.h generated from Ghidra project
Diffstat (limited to 'src/code/code_0x800A5AC0.c')
-rw-r--r--src/code/code_0x800A5AC0.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/code/code_0x800A5AC0.c b/src/code/code_0x800A5AC0.c
index b1b3c0245..dfbe0f8d9 100644
--- a/src/code/code_0x800A5AC0.c
+++ b/src/code/code_0x800A5AC0.c
@@ -6,48 +6,48 @@
// This file is most likely En_A_Obj
UNK_RET EnAObj_Init(void* a0, UNK_TYPE a1) {
- s800A5AC0* s0 = (s800A5AC0*)a0;
- s0->unk116 = ((s0->unk1C >> 8) & 0xFF) | 0x300;
- s0->unk1C = (s0->unk1C & 0xFF) - 9;
+ z_ActorEnAObj* s0 = (z_ActorEnAObj*)a0;
+ s0->base.textId = ((s0->base.variable >> 8) & 0xFF) | 0x300;
+ s0->base.variable = (s0->base.variable & 0xFF) - 9;
Lib_ApplyActorInitVars((z_Actor*)s0, (z_ActorCompInitEntry*)&D_801ADEAC);
- func_800B3BA4(&s0->unkBC, 0, (UNK_PTR)&func_800B3FC0, 12);
- Collision_InitCylinder(a1, &s0->unk148, (z_Actor*)s0, &D_801ADE80);
- Collision_CylinderMoveToActor((z_Actor*)s0, &s0->unk148);
- s0->unkB6 = 255;
- s0->unk144 = EnAObj_Update1;
+ func_800B3BA4(&s0->base.unkBC, 0, (UNK_PTR)&func_800B3FC0, 12);
+ Collision_InitCylinder(a1, &s0->collision, (z_Actor*)s0, &D_801ADE80);
+ Collision_CylinderMoveToActor((z_Actor*)s0, &s0->collision);
+ s0->base.unkA0.unk16 = 255;
+ s0->update = (actor_func)EnAObj_Update1;
}
-UNK_RET EnAObj_Fini(s800A5AC0* a0, z_GlobalContext* a1) {
- UNK_TYPE* a2 = &a0->unk148;
+UNK_RET EnAObj_Fini(z_ActorEnAObj* a0, z_GlobalContext* a1) {
+ z_ColCylinder* a2 = &a0->collision;
Collision_FiniCylinder(a1, a2);
}
-UNK_RET EnAObj_Update1(s800A5AC0* a0, UNK_TYPE a1) {
+UNK_RET EnAObj_Update1(z_ActorEnAObj* a0, UNK_TYPE a1) {
s16 v0;
s32 v1;
if (func_800B84D0(a0, a1) != 0) {
- a0->unk144 = (void(*)(s800A5AC0*, UNK_TYPE))EnAObj_Update2; //! Is this cast correct?
+ a0->update = (actor_func)EnAObj_Update2;
} else {
- v0 = a0->unk92 - a0->unkBE;
+ v0 = a0->base.unk92 - a0->base.unkBC.rotation.y;
v1 = (v0 < 0)? -v0 : v0;
- if ((v1 < 10240) || ((a0->unk1C == 1) && (v1 > 22528))) {
+ if ((v1 < 10240) || ((a0->base.variable == 1) && (v1 > 22528))) {
func_800B863C(a0, a1);
}
}
}
-UNK_RET EnAObj_Update2(s800A5AC0* a0) {
+UNK_RET EnAObj_Update2(z_ActorEnAObj* a0) {
if (func_800B867C(a0) != 0) {
- a0->unk144 = EnAObj_Update1;
+ a0->update = (actor_func)EnAObj_Update1;
}
}
-UNK_RET EnAObj_Main(s800A5AC0* a0, UNK_TYPE a1) {
- (a0->unk144)(a0, a1);
+UNK_RET EnAObj_Main(z_ActorEnAObj* a0, UNK_TYPE a1) {
+ (a0->update)((z_Actor*)a0, (z_GlobalContext*)a1);
func_800B675C(a0, 0x42340000);
- Collision_AddOT(a1, a1 + 0x18884, &a0->unk148);
+ Collision_AddOT(a1, a1 + 0x18884, &a0->collision);
}
-UNK_RET EnAObj_Draw(s800A5AC0* a0, UNK_TYPE a1) {
- func_800BDFC0(a1, D_801ADEB0[a0->unk1C], a1, a0);
+UNK_RET EnAObj_Draw(z_ActorEnAObj* a0, UNK_TYPE a1) {
+ func_800BDFC0(a1, D_801ADEB0[a0->base.variable], a1, a0);
}