1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-19 13:35:18 +00:00

Generic actor params getters (#1359)

* Initial PARAMS_GET macros

* NOSHIFT macro

* Use number of bits rather than raw mask values

* Add descriptions for each generic macro

* Reformat

* Adjust comment

* format

* edit en_door macro names

* edit redead macro name

* edit bdan switch macro name, and remove unneeded comments in go2

* mizushutter macro names

* remove PARAMS_GET_S, rework ishi switch flag handling

* actually remove PARAMS_GET_S

* remove PARAMS_GET2_S

* PARAMS_GET_U and PARAMS_GET_S

* format

* fix merge

* format

---------

Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
Tharo 2024-08-14 20:29:43 +01:00 committed by GitHub
parent 137e0d2a10
commit eaf955ad22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
200 changed files with 1113 additions and 1045 deletions

View file

@ -363,7 +363,7 @@ u16 EnZo_GetTextId(PlayState* play, Actor* thisx) {
return textId;
}
switch (thisx->params & 0x3F) {
switch (PARAMS_GET_U(thisx->params, 0, 6)) {
case 8:
if (GET_EVENTCHKINF(EVENTCHKINF_30)) {
return 0x402A;
@ -581,7 +581,7 @@ void EnZo_Init(Actor* thisx, PlayState* play) {
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInit);
if (LINK_IS_ADULT && ((this->actor.params & 0x3F) == 8)) {
if (LINK_IS_ADULT && (PARAMS_GET_U(this->actor.params, 0, 6) == 8)) {
Actor_Kill(&this->actor);
return;
}
@ -596,7 +596,7 @@ void EnZo_Init(Actor* thisx, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &this->actor, this->collider.dim.height * 0.5f, this->collider.dim.radius, 0.0f,
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
if (this->actor.depthInWater < 54.0f || (this->actor.params & 0x3F) == 8) {
if (this->actor.depthInWater < 54.0f || PARAMS_GET_U(this->actor.params, 0, 6) == 8) {
this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
this->actor.shape.shadowScale = 24.0f;
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENZO_ANIM_1);