summaryrefslogtreecommitdiff
path: root/src/code/code_0x800A5AC0.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/code/code_0x800A5AC0.c')
-rw-r--r--src/code/code_0x800A5AC0.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/src/code/code_0x800A5AC0.c b/src/code/code_0x800A5AC0.c
index ae76b71d9..801763c66 100644
--- a/src/code/code_0x800A5AC0.c
+++ b/src/code/code_0x800A5AC0.c
@@ -1,53 +1,51 @@
#include <ultra64.h>
#include <global.h>
-// TODO this file looks like an actor, it should be cleaned up as such
+// This file is most likely z_en_a_obj.c
-// This file is most likely En_A_Obj
-
-UNK_RET EnAObj_Init(ActorEnAObj* a0, GlobalContext* a1) {
- ActorEnAObj* s0 = (ActorEnAObj*)a0;
+void EnAObj_Init(ActorEnAObj* this, GlobalContext* ctxt) {
+ ActorEnAObj* s0 = (ActorEnAObj*)this;
s0->base.textId = ((s0->base.variable >> 8) & 0xFF) | 0x300;
s0->base.variable = (s0->base.variable & 0xFF) - 9;
Lib_ApplyActorInitVars((Actor*)s0, (ActorInitVar*)&enAObjInitVar);
Actor_SetPostDrawParams(&s0->base.postDrawParams, 0, (actor_post_draw_func*)func_800B3FC0, 12);
- Collision_InitCylinder(a1, &s0->collision, (Actor*)s0, &enAObjCylinderInit);
+ Collision_InitCylinder(ctxt, &s0->collision, (Actor*)s0, &enAObjCylinderInit);
Collision_CylinderMoveToActor((Actor*)s0, &s0->collision);
s0->base.unkA0.unk16 = 255;
s0->update = (actor_func)EnAObj_Update1;
}
-UNK_RET EnAObj_Fini(ActorEnAObj* a0, GlobalContext* a1) {
- ColCylinder* a2 = &a0->collision;
- Collision_FiniCylinder(a1, a2);
+void EnAObj_Fini(ActorEnAObj* this, GlobalContext* ctxt) {
+ ColCylinder* a2 = &this->collision;
+ Collision_FiniCylinder(ctxt, a2);
}
-UNK_RET EnAObj_Update1(ActorEnAObj* a0, GlobalContext* a1) {
+void EnAObj_Update1(ActorEnAObj* this, GlobalContext* ctxt) {
s16 v0;
s32 v1;
- if (func_800B84D0((Actor*)a0, a1) != 0) {
- a0->update = (actor_func)EnAObj_Update2;
+ if (func_800B84D0((Actor*)this, ctxt) != 0) {
+ this->update = (actor_func)EnAObj_Update2;
} else {
- v0 = a0->base.unk92 - a0->base.postDrawParams.rotation.y;
+ v0 = this->base.unk92 - this->base.postDrawParams.rotation.y;
v1 = (v0 < 0)? -v0 : v0;
- if ((v1 < 10240) || ((a0->base.variable == 1) && (v1 > 22528))) {
- func_800B863C((Actor*)a0, a1);
+ if ((v1 < 10240) || ((this->base.variable == 1) && (v1 > 22528))) {
+ func_800B863C((Actor*)this, ctxt);
}
}
}
-UNK_RET EnAObj_Update2(ActorEnAObj* a0, GlobalContext* a1) {
- if (func_800B867C((Actor*)a0, a1) != 0) {
- a0->update = (actor_func)EnAObj_Update1;
+void EnAObj_Update2(ActorEnAObj* this, GlobalContext* ctxt) {
+ if (func_800B867C((Actor*)this, ctxt) != 0) {
+ this->update = (actor_func)EnAObj_Update1;
}
}
-UNK_RET EnAObj_Main(ActorEnAObj* a0, GlobalContext* a1) {
- (a0->update)((Actor*)a0, (GlobalContext*)a1);
- func_800B675C((Actor*)a0, 45.0f);
- Collision_AddOT(a1, &a1->collisionContext, (ColCommon*)&a0->collision);
+void EnAObj_Main(ActorEnAObj* this, GlobalContext* ctxt) {
+ (this->update)((Actor*)this, (GlobalContext*)ctxt);
+ func_800B675C((Actor*)this, 45.0f);
+ Collision_AddOT(ctxt, &ctxt->collisionContext, (ColCommon*)&this->collision);
}
-UNK_RET EnAObj_Draw(ActorEnAObj* a0, GlobalContext* a1) {
- func_800BDFC0(a1, enAObjDisplayLists[a0->base.variable]);
+void EnAObj_Draw(ActorEnAObj* this, GlobalContext* ctxt) {
+ func_800BDFC0(ctxt, enAObjDisplayLists[this->base.variable]);
}