1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-20 14:01:15 +00:00

Use DMG_ defines in code (#1245)

* Use `DMG_` defines for `dmgFlags` when single bits are used

* Pass on several (in code, no colliders)

* Conditional cleanup

* Remove wip comment, just use the flags 4head
This commit is contained in:
Dragorn421 2022-06-03 11:36:04 -07:00 committed by GitHub
parent b2752a6a2e
commit b3b913d33d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 201 additions and 180 deletions

View file

@ -554,7 +554,8 @@ void EnGe2_Update(Actor* thisx, PlayState* play) {
if ((this->stateFlags & GE2_STATE_KO) || (this->stateFlags & GE2_STATE_CAPTURING)) {
this->actionFunc(this, play);
} else if (this->collider.base.acFlags & AC_HIT) {
if ((this->collider.info.acHitInfo != NULL) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x80)) {
if ((this->collider.info.acHitInfo != NULL) &&
(this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT)) {
Actor_SetColorFilter(&this->actor, 0, 120, 0, 400);
this->actor.update = EnGe2_UpdateStunned;
return;
@ -603,8 +604,8 @@ 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.info.acHitInfo == NULL) || !(this->collider.info.acHitInfo->toucher.dmgFlags & 0x80))) {
if ((this->collider.base.acFlags & AC_HIT) && ((this->collider.info.acHitInfo == NULL) ||
!(this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT))) {
this->actor.colorFilterTimer = 0;
EnGe2_ChangeAction(this, GE2_ACTION_KNOCKEDOUT);
this->timer = 100;