mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 22:41:14 +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:
parent
137e0d2a10
commit
eaf955ad22
200 changed files with 1113 additions and 1045 deletions
|
@ -99,7 +99,7 @@ void EnBx_Init(Actor* thisx, PlayState* play) {
|
|||
thisx->colChkInfo.mass = MASS_IMMOVABLE;
|
||||
this->unk_14C = 0;
|
||||
thisx->uncullZoneDownward = 2000.0f;
|
||||
if (Flags_GetSwitch(play, (thisx->params >> 8) & 0xFF)) {
|
||||
if (Flags_GetSwitch(play, PARAMS_GET_U(thisx->params, 8, 8))) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
thisx->params &= 0xFF;
|
||||
|
@ -141,7 +141,7 @@ void EnBx_Update(Actor* thisx, PlayState* play) {
|
|||
(&player->actor == this->collider.base.ac) || (&player->actor == this->colliderQuad.base.at)) {
|
||||
tmp33 = player->invincibilityTimer & 0xFF;
|
||||
tmp32 = thisx->world.rot.y;
|
||||
if (!(thisx->params & 0x80)) {
|
||||
if (!PARAMS_GET_NOSHIFT(thisx->params, 7, 1)) {
|
||||
tmp32 = thisx->yawTowardsPlayer;
|
||||
}
|
||||
if ((&player->actor != this->collider.base.at) && (&player->actor != this->collider.base.ac) &&
|
||||
|
@ -190,7 +190,7 @@ void EnBx_Update(Actor* thisx, PlayState* play) {
|
|||
Collider_UpdateCylinder(thisx, &this->collider);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
if (thisx->params & 0x80) {
|
||||
if (PARAMS_GET_NOSHIFT(thisx->params, 7, 1)) {
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderQuad.base);
|
||||
}
|
||||
}
|
||||
|
@ -212,14 +212,14 @@ void EnBx_Draw(Actor* thisx, PlayState* play) {
|
|||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, mtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_809D2560[this->actor.params & 0x7F]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_809D2560[PARAMS_GET_U(this->actor.params, 0, 7)]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 16, 16, 1, 0,
|
||||
(play->gameplayFrames * -10) % 128, 32, 32));
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_en_bx.c", 478),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (this->actor.params & 0x80) {
|
||||
if (PARAMS_GET_NOSHIFT(this->actor.params, 7, 1)) {
|
||||
func_809D1D0C(&this->actor, play);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue