mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-22 06:52:03 +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
|
@ -51,7 +51,8 @@ void BgInGate_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
Actor_SetScale(&this->dyna.actor, 0.1f);
|
||||
if (((this->dyna.actor.params & 1) != 0) && (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6)) {
|
||||
if ((PARAMS_GET_U(this->dyna.actor.params, 0, 1) != 0) &&
|
||||
(GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6)) {
|
||||
play->csCtx.curFrame = 0;
|
||||
BgInGate_SetupAction(this, func_80892890);
|
||||
} else {
|
||||
|
@ -72,7 +73,7 @@ void func_80892890(BgInGate* this, PlayState* play) {
|
|||
|
||||
if (play->csCtx.curFrame >= 50) {
|
||||
phi0 = 0x4000;
|
||||
if ((this->dyna.actor.params & 2) == 0) {
|
||||
if (!PARAMS_GET_NOSHIFT(this->dyna.actor.params, 1, 1)) {
|
||||
phi0 = -0x4000;
|
||||
}
|
||||
this->dyna.actor.shape.rot.y = this->dyna.actor.world.rot.y + phi0;
|
||||
|
@ -86,7 +87,7 @@ void func_80892890(BgInGate* this, PlayState* play) {
|
|||
}
|
||||
csFrames = (Math_SinS(csFrames) * 16384.0f);
|
||||
phi1 = csFrames;
|
||||
if ((this->dyna.actor.params & 2) == 0) {
|
||||
if (!PARAMS_GET_NOSHIFT(this->dyna.actor.params, 1, 1)) {
|
||||
phi1 = -phi1;
|
||||
}
|
||||
this->dyna.actor.shape.rot.y = this->dyna.actor.world.rot.y + phi1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue