mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 07:21:19 +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
|
@ -71,7 +71,7 @@ void func_80B93B68(ObjHsblock* this, PlayState* play, CollisionHeader* collision
|
|||
}
|
||||
|
||||
void func_80B93BF0(ObjHsblock* this, PlayState* play) {
|
||||
if ((this->dyna.actor.params >> 5) & 1) {
|
||||
if (PARAMS_GET_U(this->dyna.actor.params, 5, 1)) {
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, ACTOR_OBJ_ICE_POLY, this->dyna.actor.world.pos.x,
|
||||
this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, this->dyna.actor.world.rot.x,
|
||||
this->dyna.actor.world.rot.y, this->dyna.actor.world.rot.z, 1);
|
||||
|
@ -81,17 +81,17 @@ void func_80B93BF0(ObjHsblock* this, PlayState* play) {
|
|||
void ObjHsblock_Init(Actor* thisx, PlayState* play) {
|
||||
ObjHsblock* this = (ObjHsblock*)thisx;
|
||||
|
||||
func_80B93B68(this, play, sCollisionHeaders[thisx->params & 3], 0);
|
||||
func_80B93B68(this, play, sCollisionHeaders[PARAMS_GET_U(thisx->params, 0, 2)], 0);
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
func_80B93BF0(this, play);
|
||||
|
||||
switch (thisx->params & 3) {
|
||||
switch (PARAMS_GET_U(thisx->params, 0, 2)) {
|
||||
case 0:
|
||||
case 2:
|
||||
func_80B93D90(this);
|
||||
break;
|
||||
case 1:
|
||||
if (Flags_GetSwitch(play, (thisx->params >> 8) & 0x3F)) {
|
||||
if (Flags_GetSwitch(play, PARAMS_GET_U(thisx->params, 8, 6))) {
|
||||
func_80B93D90(this);
|
||||
} else {
|
||||
func_80B93DB0(this);
|
||||
|
@ -122,7 +122,7 @@ void func_80B93DB0(ObjHsblock* this) {
|
|||
}
|
||||
|
||||
void func_80B93DF4(ObjHsblock* this, PlayState* play) {
|
||||
if (Flags_GetSwitch(play, (this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
if (Flags_GetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 8, 6))) {
|
||||
func_80B93E38(this);
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ void ObjHsblock_Update(Actor* thisx, PlayState* play) {
|
|||
if (this->actionFunc != NULL) {
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
Actor_SetFocus(thisx, D_80B940C0[thisx->params & 3]);
|
||||
Actor_SetFocus(thisx, D_80B940C0[PARAMS_GET_U(thisx->params, 0, 2)]);
|
||||
}
|
||||
|
||||
void ObjHsblock_Draw(Actor* thisx, PlayState* play) {
|
||||
|
@ -178,7 +178,7 @@ void ObjHsblock_Draw(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 255);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDLists[thisx->params & 3]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDLists[PARAMS_GET_U(thisx->params, 0, 2)]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_obj_hsblock.c", 399);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue