mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 23:41:24 +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
|
@ -104,7 +104,7 @@ void func_80B9ABA0(ObjMure3* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80B9ACE4(ObjMure3* this, PlayState* play) {
|
||||
s16 count = sRupeeCounts[(this->actor.params >> 13) & 7];
|
||||
s16 count = sRupeeCounts[PARAMS_GET_U(this->actor.params, 13, 3)];
|
||||
s32 i;
|
||||
EnItem00** collectible;
|
||||
|
||||
|
@ -123,7 +123,7 @@ void func_80B9ACE4(ObjMure3* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80B9ADCC(ObjMure3* this, PlayState* play) {
|
||||
s16 count = sRupeeCounts[(this->actor.params >> 13) & 7];
|
||||
s16 count = sRupeeCounts[PARAMS_GET_U(this->actor.params, 13, 3)];
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
|
@ -131,7 +131,7 @@ void func_80B9ADCC(ObjMure3* this, PlayState* play) {
|
|||
|
||||
if ((*collectible != NULL) && !((this->unk_16C >> i) & 1)) {
|
||||
if (Actor_HasParent(&(*collectible)->actor, play)) {
|
||||
Flags_SetSwitch(play, this->actor.params & 0x3F);
|
||||
Flags_SetSwitch(play, PARAMS_GET_U(this->actor.params, 0, 6));
|
||||
}
|
||||
if ((*collectible)->actor.update == NULL) {
|
||||
this->unk_16C |= (1 << i);
|
||||
|
@ -145,7 +145,7 @@ void ObjMure3_Init(Actor* thisx, PlayState* play) {
|
|||
s32 pad;
|
||||
ObjMure3* this = (ObjMure3*)thisx;
|
||||
|
||||
if (Flags_GetSwitch(play, this->actor.params & 0x3F)) {
|
||||
if (Flags_GetSwitch(play, PARAMS_GET_U(this->actor.params, 0, 6))) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ void func_80B9AF64(ObjMure3* this, PlayState* play) {
|
|||
|
||||
if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) < SQ(1150.0f)) {
|
||||
this->actor.flags |= ACTOR_FLAG_4;
|
||||
spawnFuncs[(this->actor.params >> 13) & 7](this, play);
|
||||
spawnFuncs[PARAMS_GET_U(this->actor.params, 13, 3)](this, play);
|
||||
func_80B9AFEC(this);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue