mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 14:20:11 +00:00
More actor cleanup Part 2 (#116)
* Change all main actor functions to take a 'Actor* thisx' argument * Change all actor callbacks to also take a 'Actor* thisx' argument
This commit is contained in:
parent
8efddb0fe0
commit
f114df8929
429 changed files with 3689 additions and 2523 deletions
|
@ -8,9 +8,11 @@
|
|||
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
void EnIt_Init(EnIt* this, GlobalContext* globalCtx);
|
||||
void EnIt_Destroy(EnIt* this, GlobalContext* globalCtx);
|
||||
void EnIt_Update(EnIt* this, GlobalContext* globalCtx);
|
||||
#define THIS ((EnIt*)thisx)
|
||||
|
||||
void EnIt_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnIt_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnIt_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
static ColliderCylinderInit cylinderInitData = {
|
||||
{ COLTYPE_UNK10, 0x00, 0x00, 0x05, 0x10, COLSHAPE_CYLINDER },
|
||||
|
@ -34,25 +36,25 @@ const ActorInit En_It_InitVars = {
|
|||
(ActorFunc)NULL,
|
||||
};
|
||||
|
||||
void EnIt_Init(EnIt* this, GlobalContext* globalCtx) {
|
||||
EnIt* it = this;
|
||||
void EnIt_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnIt* this = THIS;
|
||||
|
||||
it->actor.params = 0x0D05;
|
||||
Collider_InitCylinder(globalCtx, &it->collider);
|
||||
Collider_SetCylinder(globalCtx, &it->collider, &it->actor, &cylinderInitData);
|
||||
func_80061EFC(&it->actor.colChkInfo, 0, &colChkInfoInit); // Init Damage Chart
|
||||
this->actor.params = 0x0D05;
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &cylinderInitData);
|
||||
func_80061EFC(&this->actor.colChkInfo, 0, &colChkInfoInit); // Init Damage Chart
|
||||
}
|
||||
|
||||
void EnIt_Destroy(EnIt* this, GlobalContext* globalCtx) {
|
||||
EnIt* it = this;
|
||||
void EnIt_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnIt* this = THIS;
|
||||
|
||||
Collider_DestroyCylinder(globalCtx, &it->collider);
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
void EnIt_Update(EnIt* this, GlobalContext* globalCtx) {
|
||||
void EnIt_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnIt* this = THIS;
|
||||
s32 pad;
|
||||
EnIt* it = this;
|
||||
|
||||
Collider_CylinderUpdate(&it->actor, &it->collider);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &it->collider);
|
||||
Collider_CylinderUpdate(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue