mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-08-13 17:03:47 -04:00
72 lines
1.7 KiB
C
72 lines
1.7 KiB
C
|
/*
|
||
|
* File: z_en_it.c
|
||
|
* Overlay: ovl_En_It
|
||
|
* Description: Dampe's Minigame digging spot hitboxes
|
||
|
*/
|
||
|
|
||
|
#include "z_en_it.h"
|
||
|
|
||
|
#define FLAGS 0
|
||
|
|
||
|
void EnIt_Init(Actor* thisx, GlobalContext* globalCtx);
|
||
|
void EnIt_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||
|
void EnIt_Update(Actor* thisx, GlobalContext* globalCtx);
|
||
|
|
||
|
static ColliderCylinderInit sCylinderInit = {
|
||
|
{
|
||
|
COLTYPE_NONE,
|
||
|
AT_NONE,
|
||
|
AC_NONE,
|
||
|
OC1_ON | OC1_NO_PUSH,
|
||
|
OC2_TYPE_1,
|
||
|
COLSHAPE_CYLINDER,
|
||
|
},
|
||
|
{
|
||
|
ELEMTYPE_UNK0,
|
||
|
{ 0x00000000, 0x00, 0x00 },
|
||
|
{ 0x00000000, 0x00, 0x00 },
|
||
|
TOUCH_NONE,
|
||
|
BUMP_NONE,
|
||
|
OCELEM_ON,
|
||
|
},
|
||
|
{ 40, 10, 0, { 0 } },
|
||
|
};
|
||
|
|
||
|
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||
|
|
||
|
const ActorInit En_It_InitVars = {
|
||
|
ACTOR_EN_IT,
|
||
|
ACTORCAT_PROP,
|
||
|
FLAGS,
|
||
|
OBJECT_GAMEPLAY_KEEP,
|
||
|
sizeof(EnIt),
|
||
|
(ActorFunc)EnIt_Init,
|
||
|
(ActorFunc)EnIt_Destroy,
|
||
|
(ActorFunc)EnIt_Update,
|
||
|
(ActorFunc)NULL,
|
||
|
NULL,
|
||
|
};
|
||
|
|
||
|
void EnIt_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||
|
EnIt* this = (EnIt*)thisx;
|
||
|
|
||
|
this->actor.params = 0x0D05;
|
||
|
Collider_InitCylinder(globalCtx, &this->collider);
|
||
|
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||
|
CollisionCheck_SetInfo2(&this->actor.colChkInfo, 0, &sColChkInfoInit);
|
||
|
}
|
||
|
|
||
|
void EnIt_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||
|
EnIt* this = (EnIt*)thisx;
|
||
|
|
||
|
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||
|
}
|
||
|
|
||
|
void EnIt_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||
|
EnIt* this = (EnIt*)thisx;
|
||
|
s32 pad;
|
||
|
|
||
|
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||
|
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||
|
}
|