1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 22:41:14 +00:00

Colliders: change "touch, bump" to AT and AC (elems) (#1637)

* toucherFlags, bumperFlags -> atElemFlags, acElemFlags

* TOUCH_ -> ATELEM_

* BUMP_ -> ACELEM_

* ColliderElementTouch,Bump -> ColliderElementDamageInfoAT,AC

* toucher,bumper -> atDmgInfo,acDmgInfo

* Update docs and zcolchk funcs names

* run formatter

* remove the last mentions of "bump" for colliders

* Update renamed functions in disasm
This commit is contained in:
Dragorn421 2024-03-05 01:33:08 +01:00 committed by GitHub
parent bf37ad1368
commit 68a86d2d00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
253 changed files with 1509 additions and 1509 deletions

View file

@ -70,8 +70,8 @@ static ColliderCylinderInit sDorfCylinderInit = {
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON | BUMP_HOOKABLE,
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON | ACELEM_HOOKABLE,
OCELEM_ON,
},
{ 20, 80, -50, { 0, 0, 0 } },
@ -90,8 +90,8 @@ static ColliderCylinderInit sLightBallCylinderInit = {
ELEMTYPE_UNK6,
{ 0x00100700, 0x00, 0x08 },
{ 0x0D900740, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
OCELEM_ON,
},
{ 20, 30, -15, { 0, 0, 0 } },
@ -2691,14 +2691,14 @@ void BossGanon_UpdateDamage(BossGanon* this, PlayState* play) {
acHitElem = this->collider.elem.acHitElem;
if ((this->actionFunc == BossGanon_HitByLightBall) || (this->actionFunc == BossGanon_ChargeBigMagic)) {
if (acHitElem->toucher.dmgFlags & DMG_ARROW_LIGHT) {
if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_LIGHT) {
BossGanon_SetupVulnerable(this, play);
this->timers[2] = 0;
Actor_PlaySfx(&this->actor, NA_SE_EN_GANON_DAMAGE1);
this->unk_1A6 = 15;
}
} else if ((this->actionFunc == BossGanon_Vulnerable) && (this->unk_1C2 >= 3)) {
if (!(acHitElem->toucher.dmgFlags & DMG_HOOKSHOT)) {
if (!(acHitElem->atDmgInfo.dmgFlags & DMG_HOOKSHOT)) {
u8 hitWithSword = false;
u8 damage;
Vec3f sp50;
@ -2712,7 +2712,7 @@ void BossGanon_UpdateDamage(BossGanon* this, PlayState* play) {
0x1E);
}
damage = flags = CollisionCheck_GetSwordDamage(acHitElem->toucher.dmgFlags);
damage = flags = CollisionCheck_GetSwordDamage(acHitElem->atDmgInfo.dmgFlags);
if (flags == 0) {
damage = 2;
@ -2746,7 +2746,7 @@ void BossGanon_UpdateDamage(BossGanon* this, PlayState* play) {
sCape->tearTimer = 1;
}
}
} else if (acHitElem->toucher.dmgFlags & DMG_RANGED) {
} else if (acHitElem->atDmgInfo.dmgFlags & DMG_RANGED) {
Actor_PlaySfx(&this->actor, 0);
for (i = 0; i < ARRAY_COUNT(sCape->strands); i++) {
@ -3941,7 +3941,7 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
this->collider.base.acFlags &= ~AC_HIT;
if ((hitWithBottle == false) && (acHitElem->toucher.dmgFlags & DMG_SHIELD)) {
if ((hitWithBottle == false) && (acHitElem->atDmgInfo.dmgFlags & DMG_SHIELD)) {
spBA = 2;
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_MG, &player->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
@ -4427,7 +4427,7 @@ void func_808E2544(Actor* thisx, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
if (!(acHitElem->toucher.dmgFlags & DMG_SHIELD) || Player_HasMirrorShieldEquipped(play)) {
if (!(acHitElem->atDmgInfo.dmgFlags & DMG_SHIELD) || Player_HasMirrorShieldEquipped(play)) {
Rumble_Request(this->actor.xyzDistToPlayerSq, 180, 20, 100);
this->unk_1C2 = 0xC;
this->actor.speed = -30.0f;