1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 06:21:16 +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

@ -80,8 +80,8 @@ static ColliderCylinderInit sCylinderInit = {
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x000007A2, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
ATELEM_NONE,
ACELEM_ON,
OCELEM_ON,
},
{ 20, 60, 0, { 0, 0, 0 } },
@ -556,7 +556,7 @@ void EnGe2_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
} else if (this->collider.base.acFlags & AC_HIT) {
if ((this->collider.elem.acHitElem != NULL) &&
(this->collider.elem.acHitElem->toucher.dmgFlags & DMG_HOOKSHOT)) {
(this->collider.elem.acHitElem->atDmgInfo.dmgFlags & DMG_HOOKSHOT)) {
//! @bug duration parameter is larger than 255 which messes with the internal bitpacking of the colorfilter.
//! Because of the duration being tracked as an unsigned byte it ends up being truncated to 144
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 400);
@ -607,8 +607,9 @@ void EnGe2_UpdateStunned(Actor* thisx, PlayState* play2) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
Actor_UpdateBgCheckInfo(play, &this->actor, 40.0f, 25.0f, 40.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
if ((this->collider.base.acFlags & AC_HIT) && ((this->collider.elem.acHitElem == NULL) ||
!(this->collider.elem.acHitElem->toucher.dmgFlags & DMG_HOOKSHOT))) {
if ((this->collider.base.acFlags & AC_HIT) &&
((this->collider.elem.acHitElem == NULL) ||
!(this->collider.elem.acHitElem->atDmgInfo.dmgFlags & DMG_HOOKSHOT))) {
this->actor.colorFilterTimer = 0;
EnGe2_ChangeAction(this, GE2_ACTION_KNOCKEDOUT);
this->timer = 100;