mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 15:04:31 +00:00
cleanup around ColliderCylinderInit
usage
This commit is contained in:
parent
18a1d34c77
commit
29a9fab5ad
4 changed files with 15 additions and 15 deletions
|
@ -47,7 +47,7 @@ ActorProfile Bg_Dodoago_Profile = {
|
||||||
/**/ BgDodoago_Draw,
|
/**/ BgDodoago_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderCylinderInit sColCylinderInitMain = {
|
static ColliderCylinderInit sMainColliderCylinderInit = {
|
||||||
{
|
{
|
||||||
COL_MATERIAL_NONE,
|
COL_MATERIAL_NONE,
|
||||||
AT_NONE,
|
AT_NONE,
|
||||||
|
@ -67,7 +67,7 @@ static ColliderCylinderInit sColCylinderInitMain = {
|
||||||
{ 80, 30, 80, { 0, 0, 0 } },
|
{ 80, 30, 80, { 0, 0, 0 } },
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderCylinderInit sColCylinderInitLeftRight = {
|
static ColliderCylinderInit sLeftRightColliderCylinderInit = {
|
||||||
{
|
{
|
||||||
COL_MATERIAL_NONE,
|
COL_MATERIAL_NONE,
|
||||||
AT_NONE,
|
AT_NONE,
|
||||||
|
@ -143,9 +143,9 @@ void BgDodoago_Init(Actor* thisx, PlayState* play) {
|
||||||
Collider_InitCylinder(play, &this->mainCollider);
|
Collider_InitCylinder(play, &this->mainCollider);
|
||||||
Collider_InitCylinder(play, &this->leftCollider);
|
Collider_InitCylinder(play, &this->leftCollider);
|
||||||
Collider_InitCylinder(play, &this->rightCollider);
|
Collider_InitCylinder(play, &this->rightCollider);
|
||||||
Collider_SetCylinder(play, &this->mainCollider, &this->dyna.actor, &sColCylinderInitMain);
|
Collider_SetCylinder(play, &this->mainCollider, &this->dyna.actor, &sMainColliderCylinderInit);
|
||||||
Collider_SetCylinder(play, &this->leftCollider, &this->dyna.actor, &sColCylinderInitLeftRight);
|
Collider_SetCylinder(play, &this->leftCollider, &this->dyna.actor, &sLeftRightColliderCylinderInit);
|
||||||
Collider_SetCylinder(play, &this->rightCollider, &this->dyna.actor, &sColCylinderInitLeftRight);
|
Collider_SetCylinder(play, &this->rightCollider, &this->dyna.actor, &sLeftRightColliderCylinderInit);
|
||||||
|
|
||||||
BgDodoago_SetupAction(this, BgDodoago_WaitExplosives);
|
BgDodoago_SetupAction(this, BgDodoago_WaitExplosives);
|
||||||
sDisableBombCatcher = false;
|
sDisableBombCatcher = false;
|
||||||
|
|
|
@ -59,7 +59,7 @@ ActorProfile En_Eiyer_Profile = {
|
||||||
/**/ EnEiyer_Draw,
|
/**/ EnEiyer_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderCylinderInit sColCylInit = {
|
static ColliderCylinderInit sColliderCylinderInit = {
|
||||||
{
|
{
|
||||||
COL_MATERIAL_HIT0,
|
COL_MATERIAL_HIT0,
|
||||||
AT_ON | AT_TYPE_ENEMY,
|
AT_ON | AT_TYPE_ENEMY,
|
||||||
|
@ -135,7 +135,7 @@ void EnEiyer_Init(Actor* thisx, PlayState* play) {
|
||||||
ActorShape_Init(&this->actor.shape, 600.0f, ActorShadow_DrawCircle, 65.0f);
|
ActorShape_Init(&this->actor.shape, 600.0f, ActorShadow_DrawCircle, 65.0f);
|
||||||
SkelAnime_Init(play, &this->skelanime, &gStingerSkel, &gStingerIdleAnim, this->jointTable, this->morphTable, 19);
|
SkelAnime_Init(play, &this->skelanime, &gStingerSkel, &gStingerIdleAnim, this->jointTable, this->morphTable, 19);
|
||||||
Collider_InitCylinder(play, &this->collider);
|
Collider_InitCylinder(play, &this->collider);
|
||||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sColCylInit);
|
Collider_SetCylinder(play, &this->collider, &this->actor, &sColliderCylinderInit);
|
||||||
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||||
|
|
||||||
if (this->actor.params < 3) {
|
if (this->actor.params < 3) {
|
||||||
|
@ -282,7 +282,7 @@ void EnEiyer_SetupLand(EnEiyer* this) {
|
||||||
// Update BgCheck info, play sound, and spawn effect on the first frame of the land action
|
// Update BgCheck info, play sound, and spawn effect on the first frame of the land action
|
||||||
this->timer = -1;
|
this->timer = -1;
|
||||||
this->actor.gravity = 0.0f;
|
this->actor.gravity = 0.0f;
|
||||||
this->collider.dim.height = sColCylInit.dim.height;
|
this->collider.dim.height = sColliderCylinderInit.dim.height;
|
||||||
this->actionFunc = EnEiyer_Land;
|
this->actionFunc = EnEiyer_Land;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ void EnEiyer_SetupStunned(EnEiyer* this) {
|
||||||
this->actor.speed = 0.0f;
|
this->actor.speed = 0.0f;
|
||||||
this->actor.velocity.y = 0.0f;
|
this->actor.velocity.y = 0.0f;
|
||||||
this->actor.gravity = -1.0f;
|
this->actor.gravity = -1.0f;
|
||||||
this->collider.dim.height = sColCylInit.dim.height + 8;
|
this->collider.dim.height = sColliderCylinderInit.dim.height + 8;
|
||||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, 80);
|
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, 80);
|
||||||
this->collider.base.atFlags &= ~AT_ON;
|
this->collider.base.atFlags &= ~AT_ON;
|
||||||
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
|
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
|
||||||
|
@ -606,7 +606,7 @@ void EnEiyer_Stunned(EnEiyer* this, PlayState* play) {
|
||||||
if (this->timer == 0) {
|
if (this->timer == 0) {
|
||||||
this->actor.gravity = 0.0f;
|
this->actor.gravity = 0.0f;
|
||||||
this->actor.velocity.y = 0.0f;
|
this->actor.velocity.y = 0.0f;
|
||||||
this->collider.dim.height = sColCylInit.dim.height;
|
this->collider.dim.height = sColliderCylinderInit.dim.height;
|
||||||
EnEiyer_SetupGlide(this);
|
EnEiyer_SetupGlide(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -638,7 +638,7 @@ void EnEiyer_UpdateDamage(EnEiyer* this, PlayState* play) {
|
||||||
Actor_PlaySfx(&this->actor, NA_SE_EN_EIER_DAMAGE);
|
Actor_PlaySfx(&this->actor, NA_SE_EN_EIER_DAMAGE);
|
||||||
EnEiyer_SetupHurt(this);
|
EnEiyer_SetupHurt(this);
|
||||||
} else {
|
} else {
|
||||||
this->collider.dim.height = sColCylInit.dim.height;
|
this->collider.dim.height = sColliderCylinderInit.dim.height;
|
||||||
EnEiyer_SetupDie(this);
|
EnEiyer_SetupDie(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ ActorProfile En_GeldB_Profile = {
|
||||||
/**/ EnGeldB_Draw,
|
/**/ EnGeldB_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderCylinderInit sBodyCylInit = {
|
static ColliderCylinderInit sBodyCylinderInit = {
|
||||||
{
|
{
|
||||||
COL_MATERIAL_HIT5,
|
COL_MATERIAL_HIT5,
|
||||||
AT_NONE,
|
AT_NONE,
|
||||||
|
@ -252,7 +252,7 @@ void EnGeldB_Init(Actor* thisx, PlayState* play) {
|
||||||
SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoRedSkel, &gGerudoRedNeutralAnim, this->jointTable,
|
SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoRedSkel, &gGerudoRedNeutralAnim, this->jointTable,
|
||||||
this->morphTable, GELDB_LIMB_MAX);
|
this->morphTable, GELDB_LIMB_MAX);
|
||||||
Collider_InitCylinder(play, &this->bodyCollider);
|
Collider_InitCylinder(play, &this->bodyCollider);
|
||||||
Collider_SetCylinder(play, &this->bodyCollider, thisx, &sBodyCylInit);
|
Collider_SetCylinder(play, &this->bodyCollider, thisx, &sBodyCylinderInit);
|
||||||
Collider_InitTris(play, &this->blockCollider);
|
Collider_InitTris(play, &this->blockCollider);
|
||||||
Collider_SetTris(play, &this->blockCollider, thisx, &sBlockTrisInit, this->blockElements);
|
Collider_SetTris(play, &this->blockCollider, thisx, &sBlockTrisInit, this->blockElements);
|
||||||
Collider_InitQuad(play, &this->swordCollider);
|
Collider_InitQuad(play, &this->swordCollider);
|
||||||
|
|
|
@ -59,7 +59,7 @@ ActorProfile En_Hy_Profile = {
|
||||||
/**/ EnHy_Draw,
|
/**/ EnHy_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColliderCylinderInit sColCylInit = {
|
static ColliderCylinderInit sColliderCylinderInit = {
|
||||||
{
|
{
|
||||||
COL_MATERIAL_NONE,
|
COL_MATERIAL_NONE,
|
||||||
AT_NONE,
|
AT_NONE,
|
||||||
|
@ -1168,7 +1168,7 @@ void EnHy_WaitForObjects(EnHy* this, PlayState* play) {
|
||||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
|
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
|
||||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotOsAnime].segment);
|
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotOsAnime].segment);
|
||||||
Collider_InitCylinder(play, &this->collider);
|
Collider_InitCylinder(play, &this->collider);
|
||||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sColCylInit);
|
Collider_SetCylinder(play, &this->collider, &this->actor, &sColliderCylinderInit);
|
||||||
EnHy_InitCollider(this);
|
EnHy_InitCollider(this);
|
||||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, sModelInfo[ENHY_GET_TYPE(&this->actor)].animInfoIndex);
|
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, sModelInfo[ENHY_GET_TYPE(&this->actor)].animInfoIndex);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue