Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name collider fields for "effects" / misc. #1925

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

Dragorn421
Copy link
Collaborator

Natural continuation to collider cleanup ( #1427 #1637 ), and some names based on feedback deriving from #1601 (comment)

Names are Best I Could Think Of ™️ , comments and discussion is, as per usual, very welcome!

  • rename Collider.colType / COLTYPE_ -> Collider.colMaterial / COL_MATERIAL_
  • rename ColliderElement.elemType / ELEMTYPE_ -> ColliderElement.elemMaterial / ELEM_MATERIAL_
  • rename CollisionCheckInfo.[at|ac]HitEffect -> CollisionCheckInfo.player[AT|AC]HitReaction
  • rename ColliderElementDamageInfoAT.effect to ColliderElementDamageInfoAT.playerACHitReaction and similar with dmgInfoAC/playerAT
    • add PLAYER_AT_HIT_, PLAYER_AC_HIT_ enums for these fields' values
      • right now only used in a few collider init data for demonstration: ObjBombiwa, EnVali
    • note: this puts an AC-named constant in "AT" data which is very confusing, but I don't have a better idea at present
  • update a few related comments for docs
  • note: did not rename ColliderElementDamageInfo[AT|AC].dmgFlags nor CollisionCheckInfo.damageEffect (in contrary to some prior discussion) (because no idea)

@Dragorn421 Dragorn421 changed the title Colliders effectsfields Name collider fields for "effects" / misc. Mar 16, 2024
Copy link
Collaborator Author

@Dragorn421 Dragorn421 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interesting review bits among all the CtrL+Shift+H noise are:

  • include/z64actor.h
  • include/z64collision_check.h
  • CollisionCheck_SetATvsAC in src/code/z_collision_check.c for the player[AT|AC]HitReaction logic
  • sCylinderInit in z_obj_bombiwa.c, and sQuadInit, sCylinderInit in z_en_vali.c, as demonstration for PLAYER_[AC|AT]_HIT_REACTION_ usage (which aren't used in all collider init data everywhere right now)
  • z_player.c with the only uses of player[AT|AC]HitReaction

Copy link
Collaborator

@fig02 fig02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like I had things to say back when this was opened. But I procrastinated doing so and have forgotten. Seems fine to me looking it all over again. Sorry for the large delay

@Dragorn421
Copy link
Collaborator Author

due to bss memes this PR conflicts with anything merged to main, I'm not bothering to merge every time but the PR can still be reviewed anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants