diff --git a/soh/include/z64actor.h b/soh/include/z64actor.h index abcc1f2e1..c0664f79e 100644 --- a/soh/include/z64actor.h +++ b/soh/include/z64actor.h @@ -103,34 +103,34 @@ typedef struct { /* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDraw } ActorShape; // size = 0x30 -#define ACTOR_FLAG_0 (1 << 0) -#define ACTOR_FLAG_2 (1 << 2) -#define ACTOR_FLAG_3 (1 << 3) -#define ACTOR_FLAG_4 (1 << 4) -#define ACTOR_FLAG_5 (1 << 5) -#define ACTOR_FLAG_6 (1 << 6) -#define ACTOR_FLAG_7 (1 << 7) -#define ACTOR_FLAG_8 (1 << 8) -#define ACTOR_FLAG_9 (1 << 9) -#define ACTOR_FLAG_10 (1 << 10) +#define ACTOR_FLAG_TARGETABLE (1 << 0) +#define ACTOR_FLAG_HOSTILE (1 << 2) +#define ACTOR_FLAG_FRIENDLY (1 << 3) +#define ACTOR_FLAG_UPDATE_WHILE_CULLED (1 << 4) +#define ACTOR_FLAG_DRAW_WHILE_CULLED (1 << 5) +#define ACTOR_FLAG_ACTIVE (1 << 6) +#define ACTOR_FLAG_LENS (1 << 7) +#define ACTOR_FLAG_PLAYER_TALKED_TO (1 << 8) +#define ACTOR_FLAG_HOOKSHOT_DRAGS (1 << 9) +#define ACTOR_FLAG_DRAGGED_BY_HOOKSHOT (1 << 10) #define ACTOR_FLAG_ENKUSA_CUT (1 << 11) -#define ACTOR_FLAG_12 (1 << 12) -#define ACTOR_FLAG_13 (1 << 13) -#define ACTOR_FLAG_14 (1 << 14) -#define ACTOR_FLAG_15 (1 << 15) -#define ACTOR_FLAG_16 (1 << 16) -#define ACTOR_FLAG_17 (1 << 17) -#define ACTOR_FLAG_18 (1 << 18) -#define ACTOR_FLAG_19 (1 << 19) -#define ACTOR_FLAG_20 (1 << 20) -#define ACTOR_FLAG_21 (1 << 21) -#define ACTOR_FLAG_22 (1 << 22) -#define ACTOR_FLAG_23 (1 << 23) -#define ACTOR_FLAG_24 (1 << 24) -#define ACTOR_FLAG_25 (1 << 25) -#define ACTOR_FLAG_26 (1 << 26) -#define ACTOR_FLAG_27 (1 << 27) -#define ACTOR_FLAG_28 (1 << 28) +#define ACTOR_FLAG_IGNORE_QUAKE (1 << 12) +#define ACTOR_FLAG_HOOKSHOT_ATTACHED (1 << 13) +#define ACTOR_FLAG_ARROW_DRAGGABLE (1 << 14) +#define ACTOR_FLAG_DRAGGED_BY_ARROW (1 << 15) +#define ACTOR_FLAG_WILL_TALK (1 << 16) +#define ACTOR_FLAG_PILLAR_PICKUP (1 << 17) +#define ACTOR_FLAG_NAVI_HAS_INFO (1 << 18) +#define ACTOR_FLAG_SFX_AT_POS (1 << 19) +#define ACTOR_FLAG_SFX_AT_CENTER (1 << 20) +#define ACTOR_FLAG_SFX_AT_CENTER2 (1 << 21) +#define ACTOR_FLAG_IGNORE_POINTLIGHTS (1 << 22) +#define ACTOR_FLAG_ALWAYS_THROWN (1 << 23) +#define ACTOR_FLAG_PLAY_HIT_SFX (1 << 24) +#define ACTOR_FLAG_NO_FREEZE_OCARINA (1 << 25) +#define ACTOR_FLAG_CAN_PRESS_SWITCH (1 << 26) +#define ACTOR_FLAG_NO_LOCKON (1 << 27) +#define ACTOR_FLAG_SFX_AS_TIMER (1 << 28) typedef struct Actor { /* 0x000 */ s16 id; // Actor ID diff --git a/soh/include/z64player.h b/soh/include/z64player.h index 7ce699678..d2e69f51b 100644 --- a/soh/include/z64player.h +++ b/soh/include/z64player.h @@ -415,80 +415,80 @@ typedef struct { } PendingFlag; // size = 0x06 // #endregion -#define PLAYER_STATE1_0 (1 << 0) +#define PLAYER_STATE1_LOADING (1 << 0) //Transitioning to a new scene #define PLAYER_STATE1_SWINGING_BOTTLE (1 << 1) -#define PLAYER_STATE1_2 (1 << 2) -#define PLAYER_STATE1_3 (1 << 3) -#define PLAYER_STATE1_4 (1 << 4) -#define PLAYER_STATE1_5 (1 << 5) -#define PLAYER_STATE1_6 (1 << 6) -#define PLAYER_STATE1_7 (1 << 7) -#define PLAYER_STATE1_8 (1 << 8) -#define PLAYER_STATE1_9 (1 << 9) -#define PLAYER_STATE1_10 (1 << 10) -#define PLAYER_STATE1_11 (1 << 11) -#define PLAYER_STATE1_12 (1 << 12) -#define PLAYER_STATE1_13 (1 << 13) -#define PLAYER_STATE1_14 (1 << 14) -#define PLAYER_STATE1_15 (1 << 15) -#define PLAYER_STATE1_16 (1 << 16) -#define PLAYER_STATE1_17 (1 << 17) -#define PLAYER_STATE1_18 (1 << 18) -#define PLAYER_STATE1_19 (1 << 19) -#define PLAYER_STATE1_20 (1 << 20) -#define PLAYER_STATE1_21 (1 << 21) -#define PLAYER_STATE1_22 (1 << 22) -#define PLAYER_STATE1_23 (1 << 23) -#define PLAYER_STATE1_24 (1 << 24) -#define PLAYER_STATE1_25 (1 << 25) -#define PLAYER_STATE1_26 (1 << 26) -#define PLAYER_STATE1_27 (1 << 27) -#define PLAYER_STATE1_28 (1 << 28) -#define PLAYER_STATE1_29 (1 << 29) -#define PLAYER_STATE1_30 (1 << 30) -#define PLAYER_STATE1_31 (1 << 31) +#define PLAYER_STATE1_HOOKSHOT_FALLING (1 << 2) +#define PLAYER_STATE1_ITEM_IN_HAND (1 << 3) +#define PLAYER_STATE1_ENEMY_TARGET (1 << 4) +#define PLAYER_STATE1_INPUT_DISABLED (1 << 5) +#define PLAYER_STATE1_TEXT_ON_SCREEN (1 << 6) +#define PLAYER_STATE1_DEAD (1 << 7) +#define PLAYER_STATE1_START_PUTAWAY (1 << 8) +#define PLAYER_STATE1_READY_TO_FIRE (1 << 9) +#define PLAYER_STATE1_GETTING_ITEM (1 << 10) +#define PLAYER_STATE1_ITEM_OVER_HEAD (1 << 11) +#define PLAYER_STATE1_CHARGING_SPIN_ATTACK (1 << 12) +#define PLAYER_STATE1_HANGING_OFF_LEDGE (1 << 13) +#define PLAYER_STATE1_CLIMBING_LEDGE (1 << 14) +#define PLAYER_STATE1_TARGETING (1 << 15) +#define PLAYER_STATE1_TARGET_LOCKED (1 << 16) +#define PLAYER_STATE1_TARGET_NOTHING (1 << 17) +#define PLAYER_STATE1_JUMPING (1 << 18) +#define PLAYER_STATE1_FREEFALL (1 << 19) +#define PLAYER_STATE1_FIRST_PERSON (1 << 20) +#define PLAYER_STATE1_CLIMBING_LADDER (1 << 21) +#define PLAYER_STATE1_SHIELDING (1 << 22) +#define PLAYER_STATE1_ON_HORSE (1 << 23) +#define PLAYER_STATE1_BOOMERANG_IN_HAND (1 << 24) +#define PLAYER_STATE1_THREW_BOOMERANG (1 << 25) +#define PLAYER_STATE1_DAMAGED (1 << 26) +#define PLAYER_STATE1_IN_WATER (1 << 27) +#define PLAYER_STATE1_IN_ITEM_CS (1 << 28) +#define PLAYER_STATE1_IN_CUTSCENE (1 << 29) +#define PLAYER_STATE1_30 (1 << 30) //Unknown, potentially target related? +#define PLAYER_STATE1_FLOOR_DISABLED (1 << 31) //Used for grottos -#define PLAYER_STATE2_0 (1 << 0) -#define PLAYER_STATE2_1 (1 << 1) -#define PLAYER_STATE2_2 (1 << 2) -#define PLAYER_STATE2_3 (1 << 3) -#define PLAYER_STATE2_4 (1 << 4) -#define PLAYER_STATE2_5 (1 << 5) -#define PLAYER_STATE2_6 (1 << 6) -#define PLAYER_STATE2_7 (1 << 7) -#define PLAYER_STATE2_8 (1 << 8) -#define PLAYER_STATE2_9 (1 << 9) -#define PLAYER_STATE2_10 (1 << 10) -#define PLAYER_STATE2_11 (1 << 11) -#define PLAYER_STATE2_12 (1 << 12) -#define PLAYER_STATE2_13 (1 << 13) -#define PLAYER_STATE2_14 (1 << 14) -#define PLAYER_STATE2_15 (1 << 15) +#define PLAYER_STATE2_DO_ACTION_GRAB (1 << 0) +#define PLAYER_STATE2_SPEAK_OR_CHECK (1 << 1) +#define PLAYER_STATE2_DO_ACTION_CLIMB (1 << 2) +#define PLAYER_STATE2_FOOTSTEP (1 << 3) +#define PLAYER_STATE2_MOVING_DYNAPOLY (1 << 4) +#define PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET (1 << 5) +#define PLAYER_STATE2_DISABLE_ROTATION_ALWAYS (1 << 6) +#define PLAYER_STATE2_GRABBED_BY_ENEMY (1 << 7) +#define PLAYER_STATE2_GRABBING_DYNAPOLY (1 << 8) +#define PLAYER_STATE2_SPAWN_DUST (1 << 9) +#define PLAYER_STATE2_UNDERWATER (1 << 10) +#define PLAYER_STATE2_DIVING (1 << 11) +#define PLAYER_STATE2_STATIONARY_LADDER (1 << 12) +#define PLAYER_STATE2_SWITCH_TARGETING (1 << 13) +#define PLAYER_STATE2_FROZEN (1 << 14) +#define PLAYER_STATE2_PAUSE_MOST_UPDATING (1 << 15) #define PLAYER_STATE2_DO_ACTION_ENTER (1 << 16) // Turns on the "Enter On A" DoAction -#define PLAYER_STATE2_17 (1 << 17) +#define PLAYER_STATE2_SPIN_ATTACKING (1 << 17) //w/o magic #define PLAYER_STATE2_CRAWLING (1 << 18) // Crawling through a crawlspace -#define PLAYER_STATE2_19 (1 << 19) -#define PLAYER_STATE2_20 (1 << 20) -#define PLAYER_STATE2_21 (1 << 21) -#define PLAYER_STATE2_22 (1 << 22) -#define PLAYER_STATE2_23 (1 << 23) -#define PLAYER_STATE2_24 (1 << 24) -#define PLAYER_STATE2_25 (1 << 25) -#define PLAYER_STATE2_26 (1 << 26) -#define PLAYER_STATE2_27 (1 << 27) -#define PLAYER_STATE2_28 (1 << 28) -#define PLAYER_STATE2_29 (1 << 29) -#define PLAYER_STATE2_30 (1 << 30) -#define PLAYER_STATE2_31 (1 << 31) +#define PLAYER_STATE2_HOPPING (1 << 19) //Sidehop/backflip +#define PLAYER_STATE2_NAVI_OUT (1 << 20) +#define PLAYER_STATE2_NAVI_ALERT (1 << 21) +#define PLAYER_STATE2_DO_ACTION_DOWN (1 << 22) +#define PLAYER_STATE2_NEAR_OCARINA_ACTOR (1 << 23) +#define PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR (1 << 24) +#define PLAYER_STATE2_PLAY_FOR_ACTOR (1 << 25) +#define PLAYER_STATE2_REFLECTION (1 << 26) //Handles Dark Link's Reflection +#define PLAYER_STATE2_OCARINA_PLAYING (1 << 27) +#define PLAYER_STATE2_IDLING (1 << 28) +#define PLAYER_STATE2_DISABLE_DRAW (1 << 29) +#define PLAYER_STATE2_SWORD_LUNGE (1 << 30) +#define PLAYER_STATE2_FORCED_VOID_OUT (1 << 31) -#define PLAYER_STATE3_0 (1 << 0) -#define PLAYER_STATE3_1 (1 << 1) -#define PLAYER_STATE3_2 (1 << 2) -#define PLAYER_STATE3_3 (1 << 3) -#define PLAYER_STATE3_4 (1 << 4) -#define PLAYER_STATE3_5 (1 << 5) +#define PLAYER_STATE3_IGNORE_CEILING_FLOOR_WATER (1 << 0) +#define PLAYER_STATE3_MIDAIR (1 << 1) +#define PLAYER_STATE3_PAUSE_ACTION_FUNC (1 << 2) +#define PLAYER_STATE3_FINISHED_ATTACKING (1 << 3) +#define PLAYER_STATE3_CHECK_FLOOR_WATER_COLLISION (1 << 4) +#define PLAYER_STATE3_FORCE_PULL_OCARINA (1 << 5) #define PLAYER_STATE3_RESTORE_NAYRUS_LOVE (1 << 6) // Set by ocarina effects actors when destroyed to signal Nayru's Love may be restored (see `ACTOROVL_ALLOC_ABSOLUTE`) -#define PLAYER_STATE3_7 (1 << 7) +#define PLAYER_STATE3_HOOKSHOT_TRAVELLING (1 << 7) //Travelling to target typedef void (*PlayerFunc674)(struct Player*, struct PlayState*); typedef s32 (*PlayerFunc82C)(struct Player*, struct PlayState*); diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index b2290e740..ccfe09710 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -1708,14 +1708,16 @@ void DrawPlayerTab() { ImGui::Text("Player State"); uint8_t bit[32] = {}; uint32_t flags[3] = { player->stateFlags1, player->stateFlags2, player->stateFlags3 }; + std::vector> flag_strs = { state1, state2, state3 }; for (int j = 0; j <= 2; j++) { DrawGroupWithBorder([&]() { ImGui::Text("State Flags %d", j + 1); + std::vector state = flag_strs[j]; for (int i = 0; i <= 31; i++) { bit[i] = ((flags[j] >> i) & 1); if (bit[i] != 0) { - ImGui::Text("Flag %d", i); + ImGui::Text("%s", state[i].c_str()); } } }); diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.h b/soh/soh/Enhancements/debugger/debugSaveEditor.h index af4013ca5..06fd38c37 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.h +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.h @@ -503,3 +503,84 @@ const std::vector flagTables = { { RAND_INF_GREG_FOUND, "RAND_INF_GREG_FOUND" }, } }, }; + +const std::vector state1 = { + "Loading", + "Swinging Bottle", + "Falling from Hookshot", + "Hookshot/Bow in Hand", + "Targeting Enemy", + "Input Disabled", + "Text on Screen", + "Death", + "Starting to put away", + "Ready to Fire", + "Get Item", + "Item over Head", + "Charging Spin Attack", + "Hanging off Ledge", + "Climbing Ledge", + "Targeting", + "Target Locked", + "Targeting Nothing", + "Jumping Forward", + "In Freefall", + "In First-Person View", + "Climbing Ladder", + "Shielding", + "On Horse", + "Boomerang in Hand", + "Boomerang Thrown", + "Damaged", + "In Water", + "In Item Cutscene", + "In Cutscene", + "30", //Unknown + "Floor collision disabled" +}; + +const std::vector state2 = { + "Grab", + "Speak/Check", + "Climb", + "Footstep", + "Moving Dynapoly", + "Disabled Rotation on Z target", + "Disabled Rotation", + "Grabbed by Enemy", + "Grabbing Dynapoly", + "Spawning Dust", + "Underwater", + "Diving", + "Stationary on Ladder", + "Switch Targeting", + "Frozen", + "Pause Most Updating", + "Enter", + "Spin Attack w/o Magic", + "Crawling", + "Hopping", + "Navi Out", + "Navi Alert", + "Down", + "Near Ocarina Actor", + "Attempt playing for Oca. Actor", + "Playing for Oca. Actor", + "Reflection", + "Ocarina Playing", + "Idling", + "Disabled draw func", + "Sword Lunge", + "Void out" +}; + +const std::vector state3 = { + "Ignore ceiling for Floor and Water", + "Midair", + "Pause Action Func", + "Finished Attacking", + "Check Floor Water Collision", + "Force Pull Ocarina", + "Restore Nayru's Love", + "Travelling to Hook Target" +}; \ No newline at end of file diff --git a/soh/soh/Enhancements/randomizer/randomizer_entrance.c b/soh/soh/Enhancements/randomizer/randomizer_entrance.c index 2ccb83627..e58e51818 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_entrance.c +++ b/soh/soh/Enhancements/randomizer/randomizer_entrance.c @@ -518,7 +518,7 @@ void Entrance_HandleEponaState(void) { Player* player = GET_PLAYER(gPlayState); //If Link is riding Epona but he's about to go through an entrance where she can't spawn, //unset the Epona flag to avoid Master glitch, and restore temp B. - if (Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES) && (player->stateFlags1 & PLAYER_STATE1_23)) { + if (Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES) && (player->stateFlags1 & PLAYER_STATE1_ON_HORSE)) { // Allow Master glitch to be performed on the Thieves Hideout entrance if (entrance == Entrance_GetOverride(0x0496)) { // Gerudo Fortress -> Theives Hideout return; @@ -563,7 +563,7 @@ void Entrance_HandleEponaState(void) { // Update Link's status to no longer be riding epona so that the next time link // enters an epona supported area, he isn't automatically placed on epona - player->stateFlags1 &= ~PLAYER_STATE1_23; + player->stateFlags1 &= ~PLAYER_STATE1_ON_HORSE; player->actor.parent = NULL; AREG(6) = 0; gSaveContext.equips.buttonItems[0] = gSaveContext.buttonStatus[0]; //"temp B" diff --git a/soh/src/code/code_800430A0.c b/soh/src/code/code_800430A0.c index 95c7c4fc5..abaf88405 100644 --- a/soh/src/code/code_800430A0.c +++ b/soh/src/code/code_800430A0.c @@ -62,7 +62,7 @@ void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId) { if (dynaActor != NULL) { func_800434A8(dynaActor); - if (CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_26)) { + if (CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_CAN_PRESS_SWITCH)) { func_80043538(dynaActor); } } diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index 21d4e8702..c7db247f4 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -525,7 +525,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) { } actor = targetCtx->unk_94; - if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_27)) { + if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_NO_LOCKON)) { FrameInterpolation_RecordOpenChild(actor, 1); NaviColor* naviColor = &sNaviColorList[actor->category]; @@ -620,7 +620,7 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl targetCtx->unk_48 = 0; } - lockOnSfxId = CHECK_FLAG_ALL(actorArg->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2) ? NA_SE_SY_LOCK_ON + lockOnSfxId = CHECK_FLAG_ALL(actorArg->flags, ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) ? NA_SE_SY_LOCK_ON : NA_SE_SY_LOCK_ON_HUMAN; func_80078884(lockOnSfxId); } @@ -1147,7 +1147,7 @@ s32 func_8002D53C(PlayState* play, TitleCardContext* titleCtx) { void Actor_Kill(Actor* actor) { actor->draw = NULL; actor->update = NULL; - actor->flags &= ~ACTOR_FLAG_0; + actor->flags &= ~ACTOR_FLAG_TARGETABLE; } void Actor_SetWorldToHome(Actor* actor) { @@ -1393,8 +1393,8 @@ void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB) { hookshot->grabbedDistDiff.x = 0.0f; hookshot->grabbedDistDiff.y = 0.0f; hookshot->grabbedDistDiff.z = 0.0f; - actorB->flags |= ACTOR_FLAG_13; - actorA->flags &= ~ACTOR_FLAG_13; + actorB->flags |= ACTOR_FLAG_HOOKSHOT_ATTACHED; + actorA->flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED; } void func_8002DE74(PlayState* play, Player* player) { @@ -1829,7 +1829,7 @@ f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) { s16 yawTempAbs = ABS(yawTemp); if (player->unk_664 != NULL) { - if ((yawTempAbs > 0x4000) || (actor->flags & ACTOR_FLAG_27)) { + if ((yawTempAbs > 0x4000) || (actor->flags & ACTOR_FLAG_NO_LOCKON)) { return FLT_MAX; } else { f32 ret = @@ -1865,7 +1865,7 @@ u32 func_8002F090(Actor* actor, f32 arg1) { } s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) { - if ((actor->update == NULL) || !(actor->flags & ACTOR_FLAG_0)) { + if ((actor->update == NULL) || !(actor->flags & ACTOR_FLAG_TARGETABLE)) { return true; } @@ -1887,8 +1887,8 @@ s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) { } u32 Actor_ProcessTalkRequest(Actor* actor, PlayState* play) { - if (actor->flags & ACTOR_FLAG_8) { - actor->flags &= ~ACTOR_FLAG_8; + if (actor->flags & ACTOR_FLAG_PLAYER_TALKED_TO) { + actor->flags &= ~ACTOR_FLAG_PLAYER_TALKED_TO; return true; } @@ -1899,7 +1899,7 @@ s32 func_8002F1C4(Actor* actor, PlayState* play, f32 arg2, f32 arg3, u32 exchang Player* player = GET_PLAYER(play); // This is convoluted but it seems like it must be a single if statement to match - if ((player->actor.flags & ACTOR_FLAG_8) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(play)) || + if ((player->actor.flags & ACTOR_FLAG_PLAYER_TALKED_TO) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(play)) || (!actor->isTargeted && ((arg3 < fabsf(actor->yDistToPlayer)) || (player->targetActorDistance < actor->xzDistToPlayer) || (arg2 < actor->xzDistToPlayer)))) { @@ -2201,30 +2201,30 @@ void func_8002F850(PlayState* play, Actor* actor) { void func_8002F8F0(Actor* actor, u16 sfxId) { actor->sfx = sfxId; - actor->flags |= ACTOR_FLAG_19; - actor->flags &= ~(ACTOR_FLAG_20 | ACTOR_FLAG_21 | ACTOR_FLAG_28); + actor->flags |= ACTOR_FLAG_SFX_AT_POS; + actor->flags &= ~(ACTOR_FLAG_SFX_AT_CENTER | ACTOR_FLAG_SFX_AT_CENTER2 | ACTOR_FLAG_SFX_AS_TIMER); } void func_8002F91C(Actor* actor, u16 sfxId) { actor->sfx = sfxId; - actor->flags |= ACTOR_FLAG_20; - actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_21 | ACTOR_FLAG_28); + actor->flags |= ACTOR_FLAG_SFX_AT_CENTER; + actor->flags &= ~(ACTOR_FLAG_SFX_AT_POS | ACTOR_FLAG_SFX_AT_CENTER2 | ACTOR_FLAG_SFX_AS_TIMER); } void func_8002F948(Actor* actor, u16 sfxId) { actor->sfx = sfxId; - actor->flags |= ACTOR_FLAG_21; - actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_28); + actor->flags |= ACTOR_FLAG_SFX_AT_CENTER2; + actor->flags &= ~(ACTOR_FLAG_SFX_AT_POS | ACTOR_FLAG_SFX_AT_CENTER | ACTOR_FLAG_SFX_AS_TIMER); } void func_8002F974(Actor* actor, u16 sfxId) { - actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_21 | ACTOR_FLAG_28); + actor->flags &= ~(ACTOR_FLAG_SFX_AT_POS | ACTOR_FLAG_SFX_AT_CENTER | ACTOR_FLAG_SFX_AT_CENTER2 | ACTOR_FLAG_SFX_AS_TIMER); actor->sfx = sfxId; } void func_8002F994(Actor* actor, s32 arg1) { - actor->flags |= ACTOR_FLAG_28; - actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_21); + actor->flags |= ACTOR_FLAG_SFX_AS_TIMER; + actor->flags &= ~(ACTOR_FLAG_SFX_AT_POS | ACTOR_FLAG_SFX_AT_CENTER | ACTOR_FLAG_SFX_AT_CENTER2); if (arg1 < 40) { actor->sfx = NA_SE_PL_WALK_DIRT - SFX_FLAG; } else if (arg1 < 100) { @@ -2523,7 +2523,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) { sp80 = &D_80116068[0]; if (player->stateFlags2 & 0x8000000) { - unkFlag = ACTOR_FLAG_25; + unkFlag = ACTOR_FLAG_NO_FREEZE_OCARINA; } if ((player->stateFlags1 & 0x40) && ((player->actor.textId & 0xFF00) != 0x600)) { @@ -2571,9 +2571,9 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) { actor->xyzDistToPlayerSq = SQ(actor->xzDistToPlayer) + SQ(actor->yDistToPlayer); actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, &player->actor); - actor->flags &= ~ACTOR_FLAG_24; + actor->flags &= ~ACTOR_FLAG_PLAY_HIT_SFX; - if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_4 | ACTOR_FLAG_6))) { + if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_ACTIVE))) { if (actor == player->unk_664) { actor->isTargeted = true; } else { @@ -2657,11 +2657,11 @@ void Actor_Draw(PlayState* play, Actor* actor) { lights = LightContext_NewLights(&play->lightCtx, play->state.gfxCtx); - Lights_BindAll(lights, play->lightCtx.listHead, (actor->flags & ACTOR_FLAG_22) ? NULL : &actor->world.pos); + Lights_BindAll(lights, play->lightCtx.listHead, (actor->flags & ACTOR_FLAG_IGNORE_POINTLIGHTS) ? NULL : &actor->world.pos); Lights_Draw(lights, play->state.gfxCtx); FrameInterpolation_RecordActorPosRotMatrix(); - if (actor->flags & ACTOR_FLAG_12) { + if (actor->flags & ACTOR_FLAG_IGNORE_QUAKE) { Matrix_SetTranslateRotateYXZ( actor->world.pos.x + play->mainCamera.skyboxOffset.x, actor->world.pos.y + (f32)((actor->shape.yOffset * actor->scale.y) + play->mainCamera.skyboxOffset.y), @@ -2716,13 +2716,13 @@ void Actor_Draw(PlayState* play, Actor* actor) { } void func_80030ED8(Actor* actor) { - if (actor->flags & ACTOR_FLAG_19) { + if (actor->flags & ACTOR_FLAG_SFX_AT_POS) { Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); - } else if (actor->flags & ACTOR_FLAG_20) { + } else if (actor->flags & ACTOR_FLAG_SFX_AT_CENTER) { func_80078884(actor->sfx); - } else if (actor->flags & ACTOR_FLAG_21) { + } else if (actor->flags & ACTOR_FLAG_SFX_AT_CENTER2) { func_800788CC(actor->sfx); - } else if (actor->flags & ACTOR_FLAG_28) { + } else if (actor->flags & ACTOR_FLAG_SFX_AS_TIMER) { func_800F4C58(&D_801333D4, NA_SE_SY_TIMER - SFX_FLAG, (s8)(actor->sfx - 1)); } else { func_80078914(&actor->projectedPos, actor->sfx); @@ -2908,17 +2908,17 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) { if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(70) == 0)) { if (func_800314B0(play, actor)) { - actor->flags |= ACTOR_FLAG_6; + actor->flags |= ACTOR_FLAG_ACTIVE; } else { - actor->flags &= ~ACTOR_FLAG_6; + actor->flags &= ~ACTOR_FLAG_ACTIVE; } } actor->isDrawn = false; if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(71) == 0)) { - if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & (ACTOR_FLAG_5 | ACTOR_FLAG_6))) { - if ((actor->flags & ACTOR_FLAG_7) && + if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & (ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_ACTIVE))) { + if ((actor->flags & ACTOR_FLAG_LENS) && ((play->roomCtx.curRoom.lensMode == LENS_MODE_HIDE_ACTORS) || play->actorCtx.lensActive || (actor->room != play->roomCtx.curRoom.num))) { ASSERT(invisibleActorCounter < INVISIBLE_ACTOR_MAX); @@ -3458,11 +3458,11 @@ void func_800328D4(PlayState* play, ActorContext* actorCtx, Player* player, u32 sp84 = player->unk_664; while (actor != NULL) { - if ((actor->update != NULL) && ((Player*)actor != player) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0)) { + if ((actor->update != NULL) && ((Player*)actor != player) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_TARGETABLE)) { // This block below is for determining the closest actor to player in determining the volume // used while playing enemy bgm music - if ((actorCategory == ACTORCAT_ENEMY) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2) && + if ((actorCategory == ACTORCAT_ENEMY) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) && (actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sbgmEnemyDistSq)) { actorCtx->targetCtx.bgmEnemy = actor; sbgmEnemyDistSq = actor->xyzDistToPlayerSq; @@ -4510,10 +4510,10 @@ s16 func_80034DD4(Actor* actor, PlayState* play, s16 arg2, f32 arg3) { } if (arg3 < var) { - actor->flags &= ~ACTOR_FLAG_0; + actor->flags &= ~ACTOR_FLAG_TARGETABLE; Math_SmoothStepToS(&arg2, 0, 6, 0x14, 1); } else { - actor->flags |= ACTOR_FLAG_0; + actor->flags |= ACTOR_FLAG_TARGETABLE; Math_SmoothStepToS(&arg2, 0xFF, 6, 0x14, 1); } diff --git a/soh/src/code/z_en_a_keep.c b/soh/src/code/z_en_a_keep.c index abdc07ecc..c0eded587 100644 --- a/soh/src/code/z_en_a_keep.c +++ b/soh/src/code/z_en_a_keep.c @@ -3,7 +3,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnAObj_Init(Actor* thisx, PlayState* play); void EnAObj_Destroy(Actor* thisx, PlayState* play); @@ -142,7 +142,7 @@ void EnAObj_Init(Actor* thisx, PlayState* play) { break; case A_OBJ_UNKNOWN_6: // clang-format off - thisx->flags |= ACTOR_FLAG_0; this->dyna.bgId = 5; this->focusYoffset = 10.0f; + thisx->flags |= ACTOR_FLAG_TARGETABLE; this->dyna.bgId = 5; this->focusYoffset = 10.0f; // clang-format on thisx->gravity = -2.0f; EnAObj_SetupWaitTalk(this, thisx->params); @@ -156,7 +156,7 @@ void EnAObj_Init(Actor* thisx, PlayState* play) { case A_OBJ_SIGNPOST_ARROW: thisx->textId = (this->textId & 0xFF) | 0x300; // clang-format off - thisx->flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; thisx->targetArrowOffset = 500.0f; + thisx->flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; thisx->targetArrowOffset = 500.0f; // clang-format on this->focusYoffset = 45.0f; EnAObj_SetupWaitTalk(this, thisx->params); diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index 6ab7c0ede..cfe5a96d3 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -1642,7 +1642,7 @@ EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params) { (spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) { spawnedActor->actor.room = -1; } - spawnedActor->actor.flags |= ACTOR_FLAG_4; + spawnedActor->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } } } @@ -1676,7 +1676,7 @@ EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params) { spawnedActor->actor.speedXZ = 0.0f; spawnedActor->actor.gravity = param4000 ? 0.0f : -0.9f; spawnedActor->actor.world.rot.y = Rand_CenteredFloat(65536.0f); - spawnedActor->actor.flags |= ACTOR_FLAG_4; + spawnedActor->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } } } @@ -1790,7 +1790,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP spawnedActor->actor.world.rot.y = Rand_ZeroOne() * 40000.0f; Actor_SetScale(&spawnedActor->actor, 0.0f); EnItem00_SetupAction(spawnedActor, func_8001E304); - spawnedActor->actor.flags |= ACTOR_FLAG_4; + spawnedActor->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; if ((spawnedActor->actor.params != ITEM00_SMALL_KEY) && (spawnedActor->actor.params != ITEM00_HEART_PIECE) && (spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) { diff --git a/soh/src/code/z_player_call.c b/soh/src/code/z_player_call.c index 901280787..89d093383 100644 --- a/soh/src/code/z_player_call.c +++ b/soh/src/code/z_player_call.c @@ -1,6 +1,6 @@ #include "global.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25 | ACTOR_FLAG_26) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA | ACTOR_FLAG_CAN_PRESS_SWITCH) void (*sPlayerCallInitFunc)(Actor* thisx, PlayState* play); void (*sPlayerCallDestroyFunc)(Actor* thisx, PlayState* play); diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index d556fcc30..581044935 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -1490,7 +1490,7 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void Matrix_Get(&sp14C); Matrix_MtxFToYXZRotS(&sp14C, &spB8, 0); - if (hookedActor->flags & ACTOR_FLAG_17) { + if (hookedActor->flags & ACTOR_FLAG_PILLAR_PICKUP) { hookedActor->world.rot.x = hookedActor->shape.rot.x = spB8.x - this->unk_3BC.x; } else { hookedActor->world.rot.y = hookedActor->shape.rot.y = this->actor.shape.rot.y + this->unk_3BC.y; diff --git a/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index e2318dd9a..ec85332b0 100644 --- a/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -1,7 +1,7 @@ #include "z_arms_hook.h" #include "objects/object_link_boy/object_link_boy.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void ArmsHook_Init(Actor* thisx, PlayState* play); void ArmsHook_Destroy(Actor* thisx, PlayState* play); @@ -76,7 +76,7 @@ void ArmsHook_Destroy(Actor* thisx, PlayState* play) { ArmsHook* this = (ArmsHook*)thisx; if (this->grabbed != NULL) { - this->grabbed->flags &= ~ACTOR_FLAG_13; + this->grabbed->flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED; } Collider_DestroyQuad(play, &this->collider); } @@ -112,7 +112,7 @@ s32 ArmsHook_AttachToPlayer(ArmsHook* this, Player* player) { void ArmsHook_DetachHookFromActor(ArmsHook* this) { if (this->grabbed != NULL) { - this->grabbed->flags &= ~ACTOR_FLAG_13; + this->grabbed->flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED; this->grabbed = NULL; } } @@ -121,7 +121,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) { Player* player = (Player*)this->actor.parent; if (Player_HoldsHookshot(player)) { - if ((player->itemAction != player->heldItemAction) || (player->actor.flags & ACTOR_FLAG_8) || + if ((player->itemAction != player->heldItemAction) || (player->actor.flags & ACTOR_FLAG_PLAYER_TALKED_TO) || ((player->stateFlags1 & 0x4000080))) { this->timer = 0; ArmsHook_DetachHookFromActor(this); @@ -133,7 +133,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) { } void ArmsHook_AttachHookToActor(ArmsHook* this, Actor* actor) { - actor->flags |= ACTOR_FLAG_13; + actor->flags |= ACTOR_FLAG_HOOKSHOT_ATTACHED; this->grabbed = actor; Math_Vec3f_Diff(&actor->world.pos, &this->actor.world.pos, &this->grabbedDistDiff); } @@ -172,10 +172,10 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) { touchedActor = this->collider.base.at; - if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_9 | ACTOR_FLAG_10))) { + if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_HOOKSHOT_DRAGS | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT))) { if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) { ArmsHook_AttachHookToActor(this, touchedActor); - if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_10)) { + if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_DRAGGED_BY_HOOKSHOT)) { func_80865044(this); } } @@ -186,7 +186,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { } else if (DECR(this->timer) == 0) { grabbed = this->grabbed; if (grabbed != NULL) { - if ((grabbed->update == NULL) || !CHECK_FLAG_ALL(grabbed->flags, ACTOR_FLAG_13)) { + if ((grabbed->update == NULL) || !CHECK_FLAG_ALL(grabbed->flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { grabbed = NULL; this->grabbed = NULL; } else if (this->actor.child != NULL) { diff --git a/soh/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/soh/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index af001d2b6..850f793da 100644 --- a/soh/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/soh/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -7,7 +7,7 @@ #include "z_arrow_fire.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void ArrowFire_Init(Actor* thisx, PlayState* play); void ArrowFire_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/soh/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 566e34367..2d63f9890 100644 --- a/soh/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/soh/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void ArrowIce_Init(Actor* thisx, PlayState* play); void ArrowIce_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/soh/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 7e625b1c0..3bea3b09f 100644 --- a/soh/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/soh/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void ArrowLight_Init(Actor* thisx, PlayState* play); void ArrowLight_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c b/soh/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c index 23bb66dc5..959d836fb 100644 --- a/soh/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c @@ -7,7 +7,7 @@ #include "z_bg_bdan_objects.h" #include "objects/object_bdan_objects/object_bdan_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgBdanObjects_Init(Actor* thisx, PlayState* play); void BgBdanObjects_Destroy(Actor* thisx, PlayState* play); @@ -115,7 +115,7 @@ void BgBdanObjects_Init(Actor* thisx, PlayState* play) { this->switchFlag = (thisx->params >> 8) & 0x3F; thisx->params &= 0xFF; if (thisx->params == 2) { - thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED; play->colCtx.colHeader->waterBoxes[7].ySurface = thisx->world.pos.y; this->actionFunc = func_8086C9A8; return; diff --git a/soh/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c b/soh/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c index 39581961f..86d23c45b 100644 --- a/soh/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c +++ b/soh/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c @@ -7,7 +7,7 @@ #include "z_bg_bdan_switch.h" #include "objects/object_bdan_objects/object_bdan_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgBdanSwitch_Init(Actor* thisx, PlayState* play); void BgBdanSwitch_Destroy(Actor* thisx, PlayState* play); @@ -161,7 +161,7 @@ void BgBdanSwitch_Init(Actor* thisx, PlayState* play) { case YELLOW_TALL_1: case YELLOW_TALL_2: BgBdanSwitch_InitCollision(this, play); - this->dyna.actor.flags |= ACTOR_FLAG_0; + this->dyna.actor.flags |= ACTOR_FLAG_TARGETABLE; this->dyna.actor.targetMode = 4; break; } diff --git a/soh/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c b/soh/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c index 98e437547..ed84bbc1c 100644 --- a/soh/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c +++ b/soh/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c @@ -9,7 +9,7 @@ #include "objects/object_bowl/object_bowl.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgBomGuard_Init(Actor* thisx, PlayState* play); void BgBomGuard_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c b/soh/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c index 9b559d7e2..a2f2d241c 100644 --- a/soh/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c +++ b/soh/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c @@ -7,7 +7,7 @@ #include "z_bg_bombwall.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS ACTOR_FLAG_22 +#define FLAGS ACTOR_FLAG_IGNORE_POINTLIGHTS void BgBombwall_Init(Actor* thisx, PlayState* play); void BgBombwall_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c b/soh/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c index 35475e525..0f5436b28 100644 --- a/soh/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c +++ b/soh/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c @@ -10,7 +10,7 @@ #include "objects/object_bowl/object_bowl.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgBowlWall_Init(Actor* thisx, PlayState* play); void BgBowlWall_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index 5015c87da..ea0562857 100644 --- a/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -9,7 +9,7 @@ #include "objects/object_bwall/object_bwall.h" #include "objects/object_kingdodongo/object_kingdodongo.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef struct { /* 0x00 */ CollisionHeader* colHeader; @@ -242,7 +242,7 @@ void BgBreakwall_WaitForObject(BgBreakwall* this, PlayState* play) { this->dyna.actor.objBankIndex = this->bankIndex; Actor_SetObjectDependency(play, &this->dyna.actor); - this->dyna.actor.flags &= ~ACTOR_FLAG_4; + this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->dyna.actor.draw = BgBreakwall_Draw; CollisionHeader_GetVirtual(sBombableWallInfo[wallType].colHeader, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); diff --git a/soh/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c b/soh/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c index 5ee57a0d4..70f055e6d 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c +++ b/soh/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c @@ -7,7 +7,7 @@ #include "z_bg_ddan_jd.h" #include "objects/object_ddan_objects/object_ddan_objects.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgDdanJd_Init(Actor* thisx, PlayState* play); void BgDdanJd_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c b/soh/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c index 5ee73ba2a..701249e79 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c +++ b/soh/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c @@ -7,7 +7,7 @@ #include "z_bg_ddan_kd.h" #include "objects/object_ddan_objects/object_ddan_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgDdanKd_Init(Actor* thisx, PlayState* play); void BgDdanKd_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index 49584e2cd..b1f13dadb 100644 --- a/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -12,7 +12,7 @@ #include "scenes/indoors/daiyousei_izumi/daiyousei_izumi_scene.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) typedef enum { /* 0 */ FAIRY_UPGRADE_MAGIC, diff --git a/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c b/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c index 458725be1..a3e9ec999 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c +++ b/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c @@ -10,7 +10,7 @@ #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) typedef enum { /* 0x00 */ FLASH_NONE, diff --git a/soh/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c b/soh/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c index 707e4e115..02271a89c 100644 --- a/soh/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c +++ b/soh/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c @@ -7,7 +7,7 @@ #include "z_bg_gnd_darkmeiro.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgGndDarkmeiro_Init(Actor* thisx, PlayState* play); void BgGndDarkmeiro_Destroy(Actor* thisx, PlayState* play); @@ -56,7 +56,7 @@ void BgGndDarkmeiro_Init(Actor* thisx, PlayState* play2) { switch (this->dyna.actor.params & 0xFF) { case DARKMEIRO_INVISIBLE_PATH: this->dyna.actor.draw = BgGndDarkmeiro_DrawInvisiblePath; - this->dyna.actor.flags |= ACTOR_FLAG_7; + this->dyna.actor.flags |= ACTOR_FLAG_LENS; break; case DARKMEIRO_CLEAR_BLOCK: CollisionHeader_GetVirtual(&gClearBlockCol, &colHeader); diff --git a/soh/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c b/soh/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c index b89d945b4..fa66b29aa 100644 --- a/soh/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c +++ b/soh/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c @@ -7,7 +7,7 @@ #include "z_bg_gnd_firemeiro.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgGndFiremeiro_Init(Actor* thisx, PlayState* play); void BgGndFiremeiro_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c b/soh/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c index c2e4e24a7..257847a7d 100644 --- a/soh/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c +++ b/soh/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c @@ -7,7 +7,7 @@ #include "z_bg_gnd_iceblock.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) typedef enum { /* 0 */ GNDICE_IDLE, diff --git a/soh/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c b/soh/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c index 4a6a0fe55..2ffb8a98e 100644 --- a/soh/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c +++ b/soh/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c @@ -7,7 +7,7 @@ #include "z_bg_gnd_nisekabe.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgGndNisekabe_Init(Actor* thisx, PlayState* play); void BgGndNisekabe_Destroy(Actor* thisx, PlayState* play); @@ -41,9 +41,9 @@ void BgGndNisekabe_Update(Actor* thisx, PlayState* play) { BgGndNisekabe* this = (BgGndNisekabe*)thisx; if (play->actorCtx.lensActive) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_LENS; } else { - this->actor.flags &= ~ACTOR_FLAG_7; + this->actor.flags &= ~ACTOR_FLAG_LENS; } } @@ -56,7 +56,7 @@ void BgGndNisekabe_Draw(Actor* thisx, PlayState* play) { BgGndNisekabe* this = (BgGndNisekabe*)thisx; u32 index = this->actor.params & 0xFF; - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_LENS)) { Gfx_DrawDListXlu(play, dLists[index]); } else { Gfx_DrawDListOpa(play, dLists[index]); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index e413a9156..de2235b2e 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c @@ -99,7 +99,7 @@ void BgHakaGate_Init(Actor* thisx, PlayState* play) { this->actionFunc = BgHakaGate_FalseSkull; } this->vScrollTimer = Rand_ZeroOne() * 20.0f; - thisx->flags |= ACTOR_FLAG_4; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; if (Flags_GetSwitch(play, this->switchFlag)) { this->vFlameScale = 350; } @@ -126,7 +126,7 @@ void BgHakaGate_Init(Actor* thisx, PlayState* play) { this->actionFunc = BgHakaGate_DoNothing; thisx->world.pos.y += 80.0f; } else { - thisx->flags |= ACTOR_FLAG_4; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; Actor_SetFocus(thisx, 30.0f); this->actionFunc = BgHakaGate_GateWait; } @@ -276,7 +276,7 @@ void BgHakaGate_GateWait(BgHakaGate* this, PlayState* play) { void BgHakaGate_GateOpen(BgHakaGate* this, PlayState* play) { if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 80.0f, 1.0f)) { Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP); - this->dyna.actor.flags &= ~ACTOR_FLAG_4; + this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actionFunc = BgHakaGate_DoNothing; } else { func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); @@ -294,9 +294,9 @@ void BgHakaGate_FalseSkull(BgHakaGate* this, PlayState* play) { Math_StepToS(&this->vFlameScale, 350, 20); } if (play->actorCtx.lensActive) { - this->dyna.actor.flags |= ACTOR_FLAG_7; + this->dyna.actor.flags |= ACTOR_FLAG_LENS; } else { - this->dyna.actor.flags &= ~ACTOR_FLAG_7; + this->dyna.actor.flags &= ~ACTOR_FLAG_LENS; } } @@ -345,7 +345,7 @@ void BgHakaGate_Draw(Actor* thisx, PlayState* play) { BgHakaGate* this = (BgHakaGate*)thisx; MtxF currentMtxF; - if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_7)) { + if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_LENS)) { Gfx_DrawDListXlu(play, object_haka_objects_DL_00F1B0); } else { Gfx_SetupDL_25Opa(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c b/soh/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c index c5cfa1c65..9845b91d5 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c @@ -7,7 +7,7 @@ #include "z_bg_haka_huta.h" #include "objects/object_hakach_objects/object_hakach_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgHakaHuta_Init(Actor* thisx, PlayState* play); void BgHakaHuta_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c b/soh/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c index 139d2f83f..5e43aa62f 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c @@ -8,7 +8,7 @@ #include "objects/object_hakach_objects/object_hakach_objects.h" #include "objects/object_haka_objects/object_haka_objects.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_7) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_LENS) void BgHakaMegane_Init(Actor* thisx, PlayState* play); void BgHakaMegane_Destroy(Actor* thisx, PlayState* play); @@ -110,10 +110,10 @@ void func_8087DBF0(BgHakaMegane* this, PlayState* play) { Actor* thisx = &this->dyna.actor; if (play->actorCtx.lensActive) { - thisx->flags |= ACTOR_FLAG_7; + thisx->flags |= ACTOR_FLAG_LENS; func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); } else { - thisx->flags &= ~ACTOR_FLAG_7; + thisx->flags &= ~ACTOR_FLAG_LENS; func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); } } @@ -130,7 +130,7 @@ void BgHakaMegane_Update(Actor* thisx, PlayState* play) { void BgHakaMegane_Draw(Actor* thisx, PlayState* play) { BgHakaMegane* this = (BgHakaMegane*)thisx; - if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_7)) { + if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_LENS)) { Gfx_DrawDListXlu(play, sDLists[thisx->params]); } else { Gfx_DrawDListOpa(play, sDLists[thisx->params]); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c b/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c index 628f0bbc5..28e012fae 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c @@ -65,7 +65,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, PlayState* play) { if (thisx->params == 2) { DynaPolyActor_Init(&this->dyna, DPM_UNK3); - thisx->flags |= ACTOR_FLAG_4; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; CollisionHeader_GetVirtual(&object_haka_objects_Col_005334, &colHeader); this->actionFunc = func_8087E258; } else { @@ -73,7 +73,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, PlayState* play) { if (thisx->params == 0) { CollisionHeader_GetVirtual(&object_haka_objects_Col_009168, &colHeader); - thisx->flags |= ACTOR_FLAG_7; + thisx->flags |= ACTOR_FLAG_LENS; this->unk_16A = 20; this->actionFunc = func_8087DFF8; } else if (thisx->params == 3) { @@ -84,7 +84,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, PlayState* play) { this->actionFunc = func_8087E34C; thisx->world.pos.y = thisx->home.pos.y; } else { - thisx->flags |= ACTOR_FLAG_4; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actionFunc = func_8087E288; } } else { diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c b/soh/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c index a82c2d4e3..846cc1f72 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c @@ -8,7 +8,7 @@ #include "objects/object_haka_objects/object_haka_objects.h" #include "objects/object_ice_objects/object_ice_objects.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED) typedef enum { /* 0 */ SCYTHE_TRAP_SHADOW_TEMPLE, @@ -143,7 +143,7 @@ void BgHakaSgami_Init(Actor* thisx, PlayState* play) { thisx->params = (thisx->params >> 8) & 0xFF; if (this->unk_151 != 0) { - thisx->flags |= ACTOR_FLAG_7; + thisx->flags |= ACTOR_FLAG_LENS; } Collider_InitTris(play, colliderScythe); @@ -171,7 +171,7 @@ void BgHakaSgami_Init(Actor* thisx, PlayState* play) { if (thisx->params == SCYTHE_TRAP_SHADOW_TEMPLE) { this->requiredObjBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_HAKA_OBJECTS); - thisx->flags &= ~ACTOR_FLAG_0; + thisx->flags &= ~ACTOR_FLAG_TARGETABLE; } else { this->requiredObjBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_ICE_OBJECTS); this->colliderScytheCenter.dim.radius = 30; @@ -201,7 +201,7 @@ void BgHakaSgami_SetupSpin(BgHakaSgami* this, PlayState* play) { this->actor.objBankIndex = this->requiredObjBankIndex; this->actor.draw = BgHakaSgami_Draw; this->timer = SCYTHE_SPIN_TIME; - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actionFunc = BgHakaSgami_Spin; } } diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c b/soh/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c index e1f29276a..923d8c721 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c @@ -7,7 +7,7 @@ #include "z_bg_haka_ship.h" #include "objects/object_haka_objects/object_haka_objects.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgHakaShip_Init(Actor* thisx, PlayState* play); void BgHakaShip_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c b/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c index 9c9393562..fc7b36cb9 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c @@ -133,7 +133,7 @@ void BgHakaTrap_Init(Actor* thisx, PlayState* play) { this->actionFunc = func_80880484; } else { DynaPolyActor_Init(&this->dyna, DPM_PLAYER); - thisx->flags |= ACTOR_FLAG_4; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; if (thisx->params == HAKA_TRAP_SPIKED_BOX) { CollisionHeader_GetVirtual(&object_haka_objects_Col_009CD0, &colHeader); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c index c4d3ae11e..4f9b4a216 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_haka_objects/object_haka_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgHakaTubo_Init(Actor* thisx, PlayState* play); void BgHakaTubo_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c b/soh/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c index 102d2ecaf..72730cdf0 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c @@ -7,7 +7,7 @@ #include "z_bg_haka_water.h" #include "objects/object_hakach_objects/object_hakach_objects.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgHakaWater_Init(Actor* thisx, PlayState* play); void BgHakaWater_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c b/soh/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c index d8b9b8301..1f0c98f04 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c @@ -8,7 +8,7 @@ #include "objects/object_hakach_objects/object_hakach_objects.h" #include "objects/object_haka_objects/object_haka_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef enum { /* 0x0 */ STA_GIANT_BIRD_STATUE, diff --git a/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index d18a21c58..c49908d4b 100644 --- a/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -76,7 +76,7 @@ void BgHeavyBlock_InitPiece(BgHeavyBlock* this, f32 scale) { void BgHeavyBlock_SetupDynapoly(BgHeavyBlock* this, PlayState* play) { s32 pad[2]; CollisionHeader* colHeader = NULL; - this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_17; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_PILLAR_PICKUP; DynaPolyActor_Init(&this->dyna, DPM_UNK); CollisionHeader_GetVirtual(&gHeavyBlockCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); @@ -100,7 +100,7 @@ void BgHeavyBlock_Init(Actor* thisx, PlayState* play) { this->actionFunc = BgHeavyBlock_MovePiece; BgHeavyBlock_InitPiece(this, 1.0f); this->timer = 120; - thisx->flags |= ACTOR_FLAG_4; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->unk_164.y = -50.0f; break; case HEAVYBLOCK_SMALL_PIECE: @@ -108,7 +108,7 @@ void BgHeavyBlock_Init(Actor* thisx, PlayState* play) { this->actionFunc = BgHeavyBlock_MovePiece; BgHeavyBlock_InitPiece(this, 2.0f); this->timer = 120; - thisx->flags |= ACTOR_FLAG_4; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->unk_164.y = -20.0f; break; case HEAVYBLOCK_BREAKABLE: @@ -478,7 +478,7 @@ void BgHeavyBlock_Land(BgHeavyBlock* this, PlayState* play) { break; } } else { - this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5); + this->dyna.actor.flags &= ~(ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED); this->actionFunc = BgHeavyBlock_DoNothing; } } diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c index 0108235fe..2b4849643 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_curtain.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgHidanCurtain_Init(Actor* thisx, PlayState* play); void BgHidanCurtain_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c index 17dc96371..64829acd1 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c @@ -139,7 +139,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) { this->dyna.actor.world.pos.z += 32.5f * Math_CosS(this->dyna.actor.world.rot.y); func_8002DF54(play, &this->dyna.actor, 8); - this->dyna.actor.flags |= ACTOR_FLAG_4; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actionFunc = BgHidanDalm_Shrink; this->dyna.actor.bgCheckFlags &= ~2; this->dyna.actor.bgCheckFlags &= ~8; diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c index 2dd63d120..e7151be7d 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_fslift.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgHidanFslift_Init(Actor* thisx, PlayState* play); void BgHidanFslift_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c index 212ea7b5a..d4e146520 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef enum { /* 0 */ FWBIG_MOVE, @@ -95,7 +95,7 @@ void BgHidanFwbig_Init(Actor* thisx, PlayState* play2) { BgHidanFwbig_UpdatePosition(this); Actor_SetScale(&this->actor, 0.15f); this->collider.dim.height = 230; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->moveState = FWBIG_MOVE; this->actionFunc = BgHidanFwbig_WaitForPlayer; this->actor.world.pos.y = this->actor.home.pos.y - (2400.0f * this->actor.scale.y); diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c index 70d847d29..ea49fbd4f 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c @@ -126,7 +126,7 @@ void BgHidanHrock_Init(Actor* thisx, PlayState* play) { } } else { if (thisx->params == 0) { - thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED; thisx->uncullZoneForward = 3000.0f; } this->actionFunc = func_808896B8; @@ -185,7 +185,7 @@ void func_8088960C(BgHidanHrock* this, PlayState* play) { this->dyna.actor.velocity.y++; if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, this->dyna.actor.velocity.y)) { - this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5); + this->dyna.actor.flags &= ~(ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); if (this->dyna.actor.params == 0) { @@ -204,7 +204,7 @@ void func_808896B8(BgHidanHrock* this, PlayState* play) { if (this->collider.base.acFlags & 2) { this->collider.base.acFlags &= ~2; this->actionFunc = func_808894B0; - this->dyna.actor.flags |= ACTOR_FLAG_4; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; if (this->dyna.actor.params == 0) { this->dyna.actor.room = -1; diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c index 990b6949a..d8ea17410 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_kousi.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgHidanKousi_Init(Actor* thisx, PlayState* play); void BgHidanKousi_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c index e1e181cc5..8b1d99cb9 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c @@ -93,7 +93,7 @@ void BgHidanRock_Init(Actor* thisx, PlayState* play) { } else { this->actionFunc = func_8088B268; } - thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED; CollisionHeader_GetVirtual(&gFireTempleStoneBlock1Col, &colHeader); } else { CollisionHeader_GetVirtual(&gFireTempleStoneBlock2Col, &colHeader); @@ -116,7 +116,7 @@ void BgHidanRock_Destroy(Actor* thisx, PlayState* play) { } void func_8088B24C(BgHidanRock* this) { - this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED; this->actionFunc = func_8088B990; } @@ -250,7 +250,7 @@ void func_8088B79C(BgHidanRock* this, PlayState* play) { } else { this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 15.0f; this->actionFunc = func_8088B90C; - this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5); + this->dyna.actor.flags &= ~(ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED); } Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c index 30dcbca85..44c1cc5e5 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_syoku.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgHidanSyoku_Init(Actor* thisx, PlayState* play); void BgHidanSyoku_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c b/soh/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c index 9c5751561..039b77807 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c @@ -142,7 +142,7 @@ void BgIceObjects_Idle(BgIceObjects* this, PlayState* play) { if ((this->dyna.unk_150 > 0.0f) && !Player_InCsMode(play)) { BgIceObjects_SetNextTarget(this, play); if (Actor_WorldDistXZToPoint(thisx, &this->targetPos) > 1.0f) { - thisx->flags |= ACTOR_FLAG_4; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; func_8002DF54(play, thisx, 8); thisx->params = 1; this->actionFunc = BgIceObjects_Slide; @@ -170,7 +170,7 @@ void BgIceObjects_Slide(BgIceObjects* this, PlayState* play) { this->targetPos.x = thisx->world.pos.x; this->targetPos.z = thisx->world.pos.z; if (thisx->velocity.y <= 0.0f) { - thisx->flags &= ~ACTOR_FLAG_4; + thisx->flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; } thisx->params = 0; func_8002DF54(play, thisx, 7); @@ -207,7 +207,7 @@ void BgIceObjects_Reset(BgIceObjects* this, PlayState* play) { this->dyna.unk_150 = 0.0f; } if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y, 1.0f)) { - thisx->flags &= ~ACTOR_FLAG_4; + thisx->flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; Math_Vec3f_Copy(&this->targetPos, &thisx->home.pos); this->actionFunc = BgIceObjects_Idle; thisx->speedXZ = 0.0f; diff --git a/soh/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c b/soh/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c index 07e36a463..de469fd17 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c +++ b/soh/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c @@ -7,7 +7,7 @@ #include "z_bg_ice_shutter.h" #include "objects/object_ice_objects/object_ice_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgIceShutter_Init(Actor* thisx, PlayState* play); void BgIceShutter_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c index b58b94991..35cbc3f49 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c @@ -7,7 +7,7 @@ #include "z_bg_jya_1flift.h" #include "objects/object_jya_obj/object_jya_obj.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgJya1flift_Init(Actor* thisx, PlayState* play); void BgJya1flift_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c b/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c index 65a5da34e..51dc19a09 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c @@ -7,7 +7,7 @@ #include "z_bg_jya_bigmirror.h" #include "objects/object_jya_obj/object_jya_obj.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgJyaBigmirror_Init(Actor* thisx, PlayState* play); void BgJyaBigmirror_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c b/soh/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c index dffb76e59..cb36b743d 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c @@ -1,7 +1,7 @@ #include "z_bg_jya_bombchuiwa.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "objects/object_jya_obj/object_jya_obj.h" -#define FLAGS ACTOR_FLAG_0 +#define FLAGS ACTOR_FLAG_TARGETABLE void BgJyaBombchuiwa_Init(Actor* thisx, PlayState* play); void BgJyaBombchuiwa_Destroy(Actor* thisx, PlayState* play); @@ -163,7 +163,7 @@ void BgJyaBombchuiwa_CleanUpAfterExplosion(BgJyaBombchuiwa* this, PlayState* pla BgJyaBombchuiwa_SetDrawFlags(this, 4); this->lightRayIntensity = 0.3f; this->timer = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } void func_808949B8(BgJyaBombchuiwa* this, PlayState* play) { diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c b/soh/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c index 8ccfd984c..564f6f322 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c @@ -7,7 +7,7 @@ #include "objects/object_jya_obj/object_jya_obj.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgJyaCobra_Init(Actor* thisx, PlayState* play); void BgJyaCobra_Destroy(Actor* thisx, PlayState* play); @@ -452,7 +452,7 @@ void func_80896950(BgJyaCobra* this, PlayState* play) { if (fabsf(this->dyna.unk_150) > 0.001f) { this->dyna.unk_150 = 0.0f; - player->stateFlags2 &= ~PLAYER_STATE2_4; + player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY; } } @@ -494,7 +494,7 @@ void func_80896ABC(BgJyaCobra* this, PlayState* play) { if (Math_ScaledStepToS(&this->unk_170, this->unk_16A * 0x2000, this->unk_16E)) { this->unk_16C = (this->unk_16C + this->unk_16A) & 7; - player->stateFlags2 &= ~PLAYER_STATE2_4; + player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY; this->dyna.unk_150 = 0.0f; func_80896918(this, play); } else { @@ -502,7 +502,7 @@ void func_80896ABC(BgJyaCobra* this, PlayState* play) { (this->unk_16C * 0x2000) + this->dyna.actor.home.rot.y + this->unk_170; } - if (player->stateFlags2 & PLAYER_STATE2_4) { + if (player->stateFlags2 & PLAYER_STATE2_MOVING_DYNAPOLY) { if (this->unk_172) { func_80895BEC(this, play); } diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c b/soh/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c index b78455231..cd1654e35 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c @@ -8,7 +8,7 @@ #include "z_bg_jya_goroiwa.h" #include "objects/object_goroiwa/object_goroiwa.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgJyaGoroiwa_Init(Actor* thisx, PlayState* play); void BgJyaGoroiwa_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c b/soh/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c index b78dadd69..a66bd8e27 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c @@ -8,7 +8,7 @@ #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "objects/object_jya_iron/object_jya_iron.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgJyaHaheniron_Init(Actor* thisx, PlayState* play); void BgJyaHaheniron_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c b/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c index 7b9772cb0..7ec5c2a77 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c @@ -7,7 +7,7 @@ #include "z_bg_jya_lift.h" #include "objects/object_jya_obj/object_jya_obj.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgJyaLift_Init(Actor* thisx, PlayState* play); void BgJyaLift_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c b/soh/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c index 8d9b275c2..b8ee9c331 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c @@ -8,7 +8,7 @@ #include "objects/object_jya_obj/object_jya_obj.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgJyaZurerukabe_Init(Actor* thisx, PlayState* play); void BgJyaZurerukabe_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c b/soh/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c index 28825f509..9db156041 100644 --- a/soh/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c +++ b/soh/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c @@ -7,7 +7,7 @@ #include "z_bg_menkuri_eye.h" #include "objects/object_menkuri_objects/object_menkuri_objects.h" -#define FLAGS ACTOR_FLAG_5 +#define FLAGS ACTOR_FLAG_DRAW_WHILE_CULLED void BgMenkuriEye_Init(Actor* thisx, PlayState* play); void BgMenkuriEye_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c b/soh/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c index 739f8011a..0b0b466b4 100644 --- a/soh/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c +++ b/soh/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c @@ -7,7 +7,7 @@ #include "z_bg_menkuri_kaiten.h" #include "objects/object_menkuri_objects/object_menkuri_objects.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgMenkuriKaiten_Init(Actor* thisx, PlayState* play); void BgMenkuriKaiten_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c b/soh/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c index 6cde7b643..8c55c2db6 100644 --- a/soh/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c +++ b/soh/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c @@ -42,9 +42,9 @@ void BgMenkuriNisekabe_Update(Actor* thisx, PlayState* play) { BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; if (play->actorCtx.lensActive) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_LENS; } else { - this->actor.flags &= ~ACTOR_FLAG_7; + this->actor.flags &= ~ACTOR_FLAG_LENS; } } @@ -52,7 +52,7 @@ void BgMenkuriNisekabe_Draw(Actor* thisx, PlayState* play) { BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; u32 index = this->actor.params & 0xFF; - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_LENS)) { Gfx_DrawDListXlu(play, sDLists[index]); } else { Gfx_DrawDListOpa(play, sDLists[index]); diff --git a/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c b/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c index fbded3caa..06c2381e9 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c +++ b/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h" #include "objects/object_mizu_objects/object_mizu_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgMizuBwall_Init(Actor* thisx, PlayState* play); void BgMizuBwall_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c b/soh/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c index edac821cf..f678c5031 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c +++ b/soh/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h" #include "objects/object_mizu_objects/object_mizu_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED #define MOVEBG_TYPE(params) (((u16)(params) >> 0xC) & 0xF) #define MOVEBG_FLAGS(params) ((u16)(params)&0x3F) @@ -311,7 +311,7 @@ void func_8089E318(BgMizuMovebg* this, PlayState* play) { this->dyna.actor.child->world.pos.x = this->dyna.actor.world.pos.x + sp28.x; this->dyna.actor.child->world.pos.y = this->dyna.actor.world.pos.y + sp28.y; this->dyna.actor.child->world.pos.z = this->dyna.actor.world.pos.z + sp28.z; - this->dyna.actor.child->flags &= ~ACTOR_FLAG_0; + this->dyna.actor.child->flags &= ~ACTOR_FLAG_TARGETABLE; } break; } diff --git a/soh/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c b/soh/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c index c80664ee9..4a2d78fa0 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c +++ b/soh/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c @@ -1,7 +1,7 @@ #include "z_bg_mizu_shutter.h" #include "objects/object_mizu_objects/object_mizu_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED #define SIZE_PARAM (((u16)this->dyna.actor.params >> 0xC) & 0xF) #define TIMER_PARAM (((u16)this->dyna.actor.params >> 6) & 0x3F) diff --git a/soh/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c b/soh/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c index f469acc69..dbf5e5503 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c +++ b/soh/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c @@ -7,7 +7,7 @@ #include "z_bg_mizu_water.h" #include "objects/object_mizu_objects/object_mizu_objects.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgMizuWater_Init(Actor* thisx, PlayState* play); void BgMizuWater_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c b/soh/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c index dc56f1289..bd6b89301 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c +++ b/soh/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c @@ -14,7 +14,7 @@ #include "objects/object_mjin_flash/object_mjin_flash.h" #include "objects/object_mjin_oka/object_mjin_oka.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgMjin_Init(Actor* thisx, PlayState* play); void BgMjin_Destroy(Actor* thisx, PlayState* play); @@ -82,7 +82,7 @@ void func_808A0850(BgMjin* this, PlayState* play) { if (Object_IsLoaded(&play->objectCtx, this->objBankIndex)) { colHeader = NULL; - this->dyna.actor.flags &= ~ACTOR_FLAG_4; + this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->dyna.actor.objBankIndex = this->objBankIndex; Actor_SetObjectDependency(play, &this->dyna.actor); DynaPolyActor_Init(&this->dyna, 0); diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/soh/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c index 82e6e50c3..eeecfabcb 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c @@ -7,7 +7,7 @@ #include "z_bg_mori_bigst.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgMoriBigst_Init(Actor* thisx, PlayState* play); void BgMoriBigst_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c b/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c index e497500f8..e5e84af5a 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c @@ -1,7 +1,7 @@ #include "z_bg_mori_elevator.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgMoriElevator_Init(Actor* thisx, PlayState* play); void BgMoriElevator_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c b/soh/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c index 9d4bcdd15..4ec854444 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c @@ -135,7 +135,7 @@ s32 BgMoriHashigo_SpawnLadder(BgMoriHashigo* this, PlayState* play) { s32 BgMoriHashigo_InitClasp(BgMoriHashigo* this, PlayState* play) { Actor_ProcessInitChain(&this->dyna.actor, sInitChainClasp); - this->dyna.actor.flags |= ACTOR_FLAG_0; + this->dyna.actor.flags |= ACTOR_FLAG_TARGETABLE; Actor_SetFocus(&this->dyna.actor, 55.0f); BgMoriHashigo_InitCollider(this, play); if ((this->dyna.actor.params == HASHIGO_CLASP) && !BgMoriHashigo_SpawnLadder(this, play)) { diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c b/soh/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c index 291bcb056..79bad2257 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c @@ -7,7 +7,7 @@ #include "z_bg_mori_hashira4.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgMoriHashira4_Init(Actor* thisx, PlayState* play); void BgMoriHashira4_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c b/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c index 7891ef3d6..114705a1f 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c @@ -13,7 +13,7 @@ #include "objects/object_mori_hineri2a/object_mori_hineri2a.h" #include "objects/object_mori_tex/object_mori_tex.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgMoriHineri_Init(Actor* thisx, PlayState* play); void BgMoriHineri_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c b/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c index d540a52ef..88ff91935 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c @@ -7,7 +7,7 @@ #include "z_bg_mori_idomizu.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgMoriIdomizu_Init(Actor* thisx, PlayState* play); void BgMoriIdomizu_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c b/soh/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c index 0fa09e51a..bc420d399 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c @@ -7,7 +7,7 @@ #include "z_bg_mori_rakkatenjo.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgMoriRakkatenjo_Init(Actor* thisx, PlayState* play); void BgMoriRakkatenjo_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index 2895b7c6c..ae699abb6 100644 --- a/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -156,7 +156,7 @@ void BgPoEvent_InitBlocks(BgPoEvent* this, PlayState* play) { CollisionHeader* colHeader = NULL; s32 bgId; - this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED; CollisionHeader_GetVirtual(&gPoSistersAmyBlockCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); if ((this->type == 0) && (this->index != 3)) { @@ -309,7 +309,7 @@ void BgPoEvent_BlockFall(BgPoEvent* this, PlayState* play) { this->dyna.actor.velocity.y++; if (Math_StepToF(&this->dyna.actor.world.pos.y, 433.0f, this->dyna.actor.velocity.y)) { - this->dyna.actor.flags &= ~ACTOR_FLAG_5; + this->dyna.actor.flags &= ~ACTOR_FLAG_DRAW_WHILE_CULLED; this->dyna.actor.velocity.y = 0.0f; sBgPoEventBlocksAtRest++; if (this->type != 1) { diff --git a/soh/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c b/soh/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c index 0d3fbf229..ced3fba1b 100644 --- a/soh/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c @@ -7,7 +7,7 @@ #include "z_bg_relay_objects.h" #include "objects/object_relay_objects/object_relay_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef enum { /* 0 */ WINDMILL_ROTATING_GEAR, @@ -64,7 +64,7 @@ void BgRelayObjects_Init(Actor* thisx, PlayState* play) { } func_800F5718(); thisx->room = -1; - thisx->flags |= ACTOR_FLAG_5; + thisx->flags |= ACTOR_FLAG_DRAW_WHILE_CULLED; if (D_808A9508 & 2) { thisx->params = 0xFF; Actor_Kill(thisx); @@ -156,7 +156,7 @@ void func_808A9234(BgRelayObjects* this, PlayState* play) { return; } Flags_UnsetSwitch(play, this->switchFlag); - this->dyna.actor.flags &= ~ACTOR_FLAG_4; + this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; if (play->roomCtx.curRoom.num == 4) { gSaveContext.timer1State = 0xF; } diff --git a/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index 5ad3594d8..d57696955 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "soh/frame_interpolation.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef enum { /* -1 */ DT_DRAWBRIDGE = -1, diff --git a/soh/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c b/soh/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c index 311945dff..0d75d9ab3 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c @@ -7,7 +7,7 @@ #include "z_bg_spot01_fusya.h" #include "objects/object_spot01_objects/object_spot01_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgSpot01Fusya_Init(Actor* thisx, PlayState* play); void BgSpot01Fusya_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c b/soh/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c index cad21a0cc..1dd024c65 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c @@ -8,7 +8,7 @@ #include "objects/object_spot01_objects/object_spot01_objects.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgSpot01Idohashira_Init(Actor* thisx, PlayState* play); void BgSpot01Idohashira_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c b/soh/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c index 4205200d8..be27b893c 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c @@ -7,7 +7,7 @@ #include "z_bg_spot01_idomizu.h" #include "objects/object_spot01_objects/object_spot01_objects.h" -#define FLAGS ACTOR_FLAG_5 +#define FLAGS ACTOR_FLAG_DRAW_WHILE_CULLED void BgSpot01Idomizu_Init(Actor* thisx, PlayState* play); void BgSpot01Idomizu_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c b/soh/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c index b684a3b85..695c7f857 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c @@ -7,7 +7,7 @@ #include "z_bg_spot01_idosoko.h" #include "objects/object_spot01_matoya/object_spot01_matoya.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgSpot01Idosoko_Init(Actor* thisx, PlayState* play); void BgSpot01Idosoko_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c b/soh/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c index 2edc0d255..61a9e5d18 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c @@ -8,7 +8,7 @@ #include "objects/object_spot01_matoya/object_spot01_matoya.h" #include "objects/object_spot01_matoyab/object_spot01_matoyab.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgSpot01Objects2_Init(Actor* thisx, PlayState* play); void BgSpot01Objects2_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index b675165d1..df662a063 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -7,7 +7,7 @@ #include "z_bg_spot02_objects.h" #include "objects/object_spot02_objects/object_spot02_objects.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgSpot02Objects_Init(Actor* thisx, PlayState* play); void BgSpot02Objects_Destroy(Actor* thisx, PlayState* play); @@ -75,7 +75,7 @@ void BgSpot02Objects_Init(Actor* thisx, PlayState* play) { } else if (thisx->params == 1) { this->actionFunc = func_808AC8FC; CollisionHeader_GetVirtual(&object_spot02_objects_Col_0128D8, &colHeader); - thisx->flags |= ACTOR_FLAG_22; + thisx->flags |= ACTOR_FLAG_IGNORE_POINTLIGHTS; } else { if (play->sceneNum == SCENE_SPOT02) { this->actionFunc = func_808AC908; diff --git a/soh/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c b/soh/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c index 60f33b7bb..71341097b 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c @@ -7,7 +7,7 @@ #include "z_bg_spot03_taki.h" #include "objects/object_spot03_object/object_spot03_object.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgSpot03Taki_Init(Actor* thisx, PlayState* play); void BgSpot03Taki_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c b/soh/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c index 5eeecb83d..9f5c01218 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c @@ -62,7 +62,7 @@ void BgSpot05Soko_Init(Actor* thisx, PlayState* play) { Actor_Kill(thisx); } else { this->actionFunc = func_808AE5B4; - thisx->flags |= ACTOR_FLAG_4; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } } this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index 0fba93c83..e94166558 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -8,7 +8,7 @@ #include "objects/object_spot06_objects/object_spot06_objects.h" #include "soh/Enhancements/custom-message/CustomMessageTypes.h" -#define FLAGS ACTOR_FLAG_9 +#define FLAGS ACTOR_FLAG_HOOKSHOT_DRAGS typedef enum { /* 0x0 */ LHO_WATER_TEMPLE_ENTRACE_GATE, @@ -152,7 +152,7 @@ void BgSpot06Objects_Init(Actor* thisx, PlayState* play) { break; case LHO_WATER_PLANE: Actor_ProcessInitChain(thisx, sInitChainWaterPlane); - thisx->flags = ACTOR_FLAG_4 | ACTOR_FLAG_5; + thisx->flags = ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED; if (LINK_IS_ADULT && !(Flags_GetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER))) { if (gSaveContext.sceneSetupIndex < 4) { @@ -320,7 +320,7 @@ void BgSpot06Objects_LockWait(BgSpot06Objects* this, PlayState* play) { if (this->collider.base.acFlags & 2) { this->timer = 130; - this->dyna.actor.flags |= ACTOR_FLAG_4; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; sin = Math_SinS(this->dyna.actor.world.rot.y); cos = Math_CosS(this->dyna.actor.world.rot.y); this->dyna.actor.world.pos.x += (3.0f * sin); @@ -363,7 +363,7 @@ void BgSpot06Objects_LockPullOutward(BgSpot06Objects* this, PlayState* play) { if (this->timer == 0) { this->dyna.actor.velocity.y = 0.5f; - this->dyna.actor.flags &= ~ACTOR_FLAG_13; + this->dyna.actor.flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED; this->actionFunc = BgSpot06Objects_LockSwimToSurface; } @@ -393,7 +393,7 @@ void BgSpot06Objects_LockSwimToSurface(BgSpot06Objects* this, PlayState* play) { this->dyna.actor.world.pos.z - (Math_CosS(this->dyna.actor.shape.rot.y) * 16.0f); this->dyna.actor.world.pos.y = -1993.0f; this->timer = 32; - this->dyna.actor.flags &= ~ACTOR_FLAG_4; + this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->collider.elements[0].dim.worldSphere.radius = this->collider.elements[0].dim.modelSphere.radius * 2; this->actionFunc = BgSpot06Objects_LockFloat; } diff --git a/soh/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c b/soh/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c index 5253da943..5de544a4e 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c @@ -7,7 +7,7 @@ #include "z_bg_spot07_taki.h" #include "objects/object_spot07_object/object_spot07_object.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgSpot07Taki_Init(Actor* thisx, PlayState* play); void BgSpot07Taki_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c b/soh/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c index ce8cea9fb..af09141fd 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c @@ -9,7 +9,7 @@ #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS ACTOR_FLAG_22 +#define FLAGS ACTOR_FLAG_IGNORE_POINTLIGHTS void BgSpot08Bakudankabe_Init(Actor* thisx, PlayState* play); void BgSpot08Bakudankabe_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c b/soh/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c index adece5af7..11241004a 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c @@ -9,7 +9,7 @@ #include "objects/object_spot11_obj/object_spot11_obj.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgSpot11Bakudankabe_Init(Actor* thisx, PlayState* play); void BgSpot11Bakudankabe_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c b/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c index c5cab7a10..e98369169 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Elf/z_en_elf.h" #include "objects/object_spot11_obj/object_spot11_obj.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgSpot11Oasis_Init(Actor* thisx, PlayState* play); void BgSpot11Oasis_Update(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c b/soh/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c index 505be90c0..b6b11df76 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_En_Bombf/z_en_bombf.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgSpot16Bombstone_Init(Actor* thisx, PlayState* play); void BgSpot16Bombstone_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/soh/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c index ee2f79643..d919b300d 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c @@ -7,7 +7,7 @@ #include "z_bg_spot17_funen.h" #include "objects/object_spot17_obj/object_spot17_obj.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgSpot17Funen_Init(Actor* thisx, PlayState* play); void BgSpot17Funen_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c index 30e63391a..8233ffeac 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c @@ -2,7 +2,7 @@ #include "objects/object_spot18_obj/object_spot18_obj.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgSpot18Basket_Init(Actor* thisx, PlayState* play); void BgSpot18Basket_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c b/soh/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c index 9f2955b09..73c94e2fe 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c @@ -7,7 +7,7 @@ #include "z_bg_spot18_shutter.h" #include "objects/object_spot18_obj/object_spot18_obj.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgSpot18Shutter_Init(Actor* thisx, PlayState* play); void BgSpot18Shutter_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c b/soh/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c index 36c0dc17d..444de05e3 100644 --- a/soh/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c +++ b/soh/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c @@ -7,7 +7,7 @@ #include "z_bg_sst_floor.h" #include "objects/object_sst/object_sst.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgSstFloor_Init(BgSstFloor* this, PlayState* play); void BgSstFloor_Destroy(BgSstFloor* this, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c b/soh/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c index 26b20d9b1..823606f39 100644 --- a/soh/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c +++ b/soh/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c @@ -7,7 +7,7 @@ #include "z_bg_toki_hikari.h" #include "objects/object_toki_objects/object_toki_objects.h" -#define FLAGS ACTOR_FLAG_5 +#define FLAGS ACTOR_FLAG_DRAW_WHILE_CULLED void BgTokiHikari_Init(Actor* thisx, PlayState* play); void BgTokiHikari_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index c1406382f..8abc3a5ae 100644 --- a/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -7,7 +7,7 @@ #include "z_bg_toki_swd.h" #include "objects/object_toki_objects/object_toki_objects.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgTokiSwd_Init(Actor* thisx, PlayState* play); void BgTokiSwd_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/soh/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c index b825ee65c..2f9171d4a 100644 --- a/soh/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/soh/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -8,7 +8,7 @@ #include "objects/object_spot04_objects/object_spot04_objects.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgTreemouth_Init(Actor* thisx, PlayState* play); void BgTreemouth_Destroy(Actor* thisx, PlayState* play); @@ -147,9 +147,9 @@ void func_808BC8B8(BgTreemouth* this, PlayState* play) { if (!LINK_IS_ADULT) { if (Flags_GetEventChkInf(0xC)) { if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x7530)) { - this->dyna.actor.flags |= ACTOR_FLAG_0; + this->dyna.actor.flags |= ACTOR_FLAG_TARGETABLE; if (this->dyna.actor.isTargeted) { - this->dyna.actor.flags &= ~ACTOR_FLAG_0; + this->dyna.actor.flags &= ~ACTOR_FLAG_TARGETABLE; play->csCtx.segment = D_808BD2A0; gSaveContext.cutsceneTrigger = 1; BgTreemouth_SetupAction(this, func_808BC9EC); diff --git a/soh/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c b/soh/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c index f70d8c416..abdf98c0c 100644 --- a/soh/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c +++ b/soh/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c @@ -46,7 +46,7 @@ void BgUmaJump_Init(Actor* thisx, PlayState* play) { Actor_Kill(&this->dyna.actor); return; } - this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED; } } diff --git a/soh/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/soh/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c index a74e166f1..16ea4e0e7 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c +++ b/soh/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c @@ -7,7 +7,7 @@ #include "z_bg_ydan_hasi.h" #include "objects/object_ydan_objects/object_ydan_objects.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BgYdanHasi_Init(Actor* thisx, PlayState* play); void BgYdanHasi_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c b/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c index e4c80d3f8..ad11f19fd 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c +++ b/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c @@ -297,7 +297,7 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, PlayState* play) { if (this->dyna.actor.xzDistToPlayer < 80.0f) { this->unk_16C = 200.0f; this->dyna.actor.room = -1; - this->dyna.actor.flags |= ACTOR_FLAG_4; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->timer = 40; Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WEB_BROKEN); this->actionFunc = BgYdanSp_FloorWebBreaking; diff --git a/soh/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/soh/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index 8759d1e31..bc91d519b 100644 --- a/soh/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/soh/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -8,7 +8,7 @@ #include "objects/object_zg/object_zg.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void BgZg_Init(Actor* thisx, PlayState* play); void BgZg_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index 5b52ca92d..a7387efb5 100644 --- a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -5,7 +5,7 @@ #include "scenes/dungeons/ddan_boss/ddan_boss_room_1.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BossDodongo_Init(Actor* thisx, PlayState* play); void BossDodongo_Destroy(Actor* thisx, PlayState* play); @@ -205,7 +205,7 @@ void BossDodongo_Init(Actor* thisx, PlayState* play) { } } - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; for (int i = 0; i < ARRAY_COUNT(sMaskTex8x16); i++) { sMaskTex8x16[i] = 0; @@ -495,7 +495,7 @@ void BossDodongo_SetupWalk(BossDodongo* this) { this->unk_1AA = 0; this->actionFunc = BossDodongo_Walk; this->unk_1DA = 0; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->unk_1E4 = 0.0f; } @@ -750,7 +750,7 @@ void BossDodongo_Roll(BossDodongo* this, PlayState* play) { f32 sp4C; f32 sp48; - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; SkelAnime_Update(&this->skelAnime); if (this->unk_1DA == 10) { @@ -1311,7 +1311,7 @@ void BossDodongo_SetupDeathCutscene(BossDodongo* this) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_K_DEAD); this->unk_1DA = 0; this->csState = 0; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); this->unk_1BC = 1; Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF); } diff --git a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index b29232095..48a99fa9d 100644 --- a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -15,7 +15,7 @@ #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) typedef enum { /* 0 */ INTRO_FLY_EMERGE, @@ -695,7 +695,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { } break; case BOSSFD_FLY_CHASE: - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; temp_y = Math_SinS(this->work[BFD_MOVE_TIMER] * 2396.0f) * 30.0f + this->fwork[BFD_TARGET_Y_OFFSET]; this->targetPosition.x = player->actor.world.pos.x; this->targetPosition.y = player->actor.world.pos.y + temp_y + 30.0f; @@ -1275,9 +1275,9 @@ void BossFd_Effects(BossFd* this, PlayState* play) { } if ((this->actor.world.pos.y < 90.0f) || (700.0f < this->actor.world.pos.y) || (this->actionFunc == BossFd_Wait)) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } } diff --git a/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 9280071f5..1c5eed4ae 100644 --- a/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -11,7 +11,7 @@ #include "vt.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) typedef enum { /* 0 */ DEATH_START, @@ -530,7 +530,7 @@ void BossFd2_Vulnerable(BossFd2* this, PlayState* play) { s16 i; this->disableAT = true; - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; SkelAnime_Update(&this->skelAnime); switch (this->work[FD2_ACTION_STATE]) { case 0: @@ -618,7 +618,7 @@ void BossFd2_SetupDeath(BossFd2* this, PlayState* play) { Animation_Change(&this->skelAnime, &gHoleVolvagiaDamagedAnim, 1.0f, 0.0f, this->fwork[FD2_END_FRAME], ANIMMODE_ONCE_INTERP, -3.0f); this->actionFunc = BossFd2_Death; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->deathState = DEATH_START; } @@ -965,7 +965,7 @@ void BossFd2_Update(Actor* thisx, PlayState* play2) { osSyncPrintf("FD2 move start \n"); this->disableAT = false; - this->actor.flags &= ~ACTOR_FLAG_10; + this->actor.flags &= ~ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; this->work[FD2_VAR_TIMER]++; this->work[FD2_UNK_TIMER]++; @@ -1000,9 +1000,9 @@ void BossFd2_Update(Actor* thisx, PlayState* play2) { this->fwork[FD2_TEX2_SCROLL_X] += 3.0f; this->fwork[FD2_TEX2_SCROLL_Y] -= 2.0f; if (this->actor.focus.pos.y < 90.0f) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } } diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index f27915f39..48c9f19f9 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -14,7 +14,7 @@ #include -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BossGanon_Init(Actor* thisx, PlayState* play); void BossGanon_Destroy(Actor* thisx, PlayState* play); @@ -381,7 +381,7 @@ void BossGanon_Init(Actor* thisx, PlayState* play2) { 0.0f, 0.0f, 0, 0, 0, 1); Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_BOSS); } else { - thisx->flags &= ~ACTOR_FLAG_0; + thisx->flags &= ~ACTOR_FLAG_TARGETABLE; this->fwork[GDF_FWORK_1] = 255.0f; if (thisx->params >= 0xC8) { @@ -2585,7 +2585,7 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) { Vec3f sp40; if (this->timers[3] == 0) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } SkelAnime_Update(&this->skelAnime); @@ -2634,7 +2634,7 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) { this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfLandAnim); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfLandAnim, 0.0f); this->timers[0] = 70; - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; } break; @@ -2667,7 +2667,7 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) { this->unk_2E6 = 80; this->unk_2E8 = 0; - this->actor.flags &= ~ACTOR_FLAG_10; + this->actor.flags &= ~ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; } break; @@ -2735,7 +2735,7 @@ void BossGanon_SetupDamaged(BossGanon* this, PlayState* play) { } void BossGanon_Damaged(BossGanon* this, PlayState* play) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; SkelAnime_Update(&this->skelAnime); @@ -2897,7 +2897,7 @@ void BossGanon_Update(Actor* thisx, PlayState* play2) { this->collider.base.colType = 3; sBossGanonCape->gravity = -3.0f; this->shockGlow = false; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unk_1A2++; this->unk_1A4++; diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 9de9f7400..5e46b7746 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -10,7 +10,7 @@ #include -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void BossGanon2_Init(Actor* thisx, PlayState* play); void BossGanon2_Destroy(Actor* thisx, PlayState* play); @@ -199,7 +199,7 @@ void func_808FD4D4(BossGanon2* this, PlayState* play, s16 arg2, s16 arg3) { void func_808FD5C4(BossGanon2* this, PlayState* play) { this->actionFunc = func_808FD5F4; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.world.pos.y = -3000.0f; } @@ -916,7 +916,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->unk_337 = 1; func_808FFDB0(this, play); this->unk_1A2[1] = 50; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; sBossGanon2Zelda->unk_3C8 = 7; } break; @@ -1087,7 +1087,7 @@ void func_808FFDB0(BossGanon2* this, PlayState* play) { } this->unk_336 = 1; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->unk_228 = 1.0f; this->unk_224 = 1.0f; } else { diff --git a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 642dd4559..5514a3333 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -12,7 +12,7 @@ #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) typedef enum { /* 0 */ NOT_DEAD, @@ -245,7 +245,7 @@ void BossGanondrof_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->colliderSpear); Collider_SetCylinder(play, &this->colliderBody, &this->actor, &sCylinderInitBody); Collider_SetCylinder(play, &this->colliderSpear, &this->actor, &sCylinderInitSpear); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (Flags_GetClear(play, play->roomCtx.curRoom.num)) { Actor_Kill(&this->actor); Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y, @@ -407,7 +407,7 @@ void BossGanondrof_Paintings(BossGanondrof* this, PlayState* play) { EnfHG* horseTemp; Animation_MorphToPlayOnce(&this->skelAnime, &gPhantomGanonRideSpearRaiseAnim, -2.0f); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; horseTemp = (EnfHG*)this->actor.child; Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_FHG_FIRE, this->spearTip.x, this->spearTip.y, this->spearTip.z, 30, FHGFIRE_LIGHT_GREEN, 0, FHGFIRE_SPEAR_LIGHT); @@ -418,7 +418,7 @@ void BossGanondrof_Paintings(BossGanondrof* this, PlayState* play) { Animation_MorphToPlayOnce(&this->skelAnime, &gPhantomGanonRideSpearResetAnim, -2.0f); } else if (horse->bossGndSignal == FHG_RIDE) { Animation_MorphToLoop(&this->skelAnime, &gPhantomGanonRideAnim, -2.0f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } osSyncPrintf("RUN 3\n"); @@ -445,7 +445,7 @@ void BossGanondrof_Paintings(BossGanondrof* this, PlayState* play) { void BossGanondrof_SetupNeutral(BossGanondrof* this, f32 arg1) { Animation_MorphToLoop(&this->skelAnime, &gPhantomGanonNeutralAnim, arg1); this->actionFunc = BossGanondrof_Neutral; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->fwork[GND_FLOAT_SPEED] = 0.0f; this->timers[0] = (s16)(Rand_ZeroOne() * 64.0f) + 30; } @@ -717,7 +717,7 @@ void BossGanondrof_Stunned(BossGanondrof* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_FANTOM_DAMAGE2); } - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; } osSyncPrintf("TIME0 %d ********************************************\n", this->timers[0]); @@ -900,7 +900,7 @@ void BossGanondrof_SetupDeath(BossGanondrof* this, PlayState* play) { Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF); Audio_PlayActorSound2(&this->actor, NA_SE_EN_FANTOM_DEAD); this->deathState = DEATH_START; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->work[GND_VARIANCE_TIMER] = 0; this->shockTimer = 50; } @@ -1283,7 +1283,7 @@ void BossGanondrof_Update(Actor* thisx, PlayState* play) { EnfHG* horse; osSyncPrintf("MOVE START %d\n", this->actor.params); - this->actor.flags &= ~ACTOR_FLAG_10; + this->actor.flags &= ~ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; this->colliderBody.base.colType = COLTYPE_HIT3; if (this->killActor) { Actor_Kill(&this->actor); diff --git a/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 0bc49d3f0..9cbe7893a 100644 --- a/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -5,7 +5,7 @@ #include "overlays/actors/ovl_Door_Shutter/z_door_shutter.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) // IRIS_FOLLOW: gohma looks towards the player (iris rotation) // BONUS_IFRAMES: gain invincibility frames when the player does something (throwing things?), or @@ -396,7 +396,7 @@ void BossGoma_SetupDefeated(BossGoma* this, PlayState* play) { this->noBackfaceCulling = false; this->framesUntilNextAction = 1200; this->actionState = 0; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); this->actor.speedXZ = 0.0f; this->actor.shape.shadowScale = 0.0f; Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF); @@ -625,7 +625,7 @@ void BossGoma_SetupEncounterState4(BossGoma* this, PlayState* play) { camera = Play_GetCamera(play, 0); player = GET_PLAYER(play); this->actionState = 4; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; func_80064520(play, &play->csCtx); func_8002DF54(play, &this->actor, 1); this->subCameraId = Play_CreateSubCamera(play); @@ -715,7 +715,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { this->framesUntilNextAction = 50; this->timer = 80; this->frameCount = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; // fall-through case 2: // zoom on player from room center // room entrance, towards center @@ -1295,7 +1295,7 @@ void BossGoma_FloorPrepareAttack(BossGoma* this, PlayState* play) { void BossGoma_FloorAttack(BossGoma* this, PlayState* play) { s16 i; - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; SkelAnime_Update(&this->skelanime); switch (this->actionState) { diff --git a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index bcd457172..bc6537484 100644 --- a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -15,7 +15,7 @@ #include -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) #define MO_WATER_LEVEL(play) play->colCtx.colHeader->waterBoxes[0].ySurface @@ -571,7 +571,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { } switch (this->work[MO_TENT_ACTION_STATE]) { case MO_TENT_WAIT: - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (this == sMorphaTent2) { this->work[MO_TENT_ACTION_STATE] = MO_TENT_SPAWN; this->timers[0] = 70; @@ -665,7 +665,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { } break; case MO_TENT_ATTACK: - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; func_80078914(&this->tentTipPos, NA_SE_EN_MOFER_ATTACK - SFX_FLAG); Math_ApproachF(&this->waterLevelMod, -5.0f, 0.1f, 0.4f); for (indS1 = 0; indS1 < 41; indS1++) { @@ -935,7 +935,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { Math_ApproachF(&this->tentMaxAngle, 0.5f, 1.0f, 0.01); Math_ApproachF(&this->tentSpeed, 320.0f, 1.0f, 50.0f); if (this->timers[0] == 0) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Math_ApproachF(&this->baseAlpha, 0.0, 1.0f, 5.0f); for (indS1 = 0; indS1 < 40; indS1++) { if (sMorphaTent2 && sMorphaTent2->tentSpawnPos) {} @@ -980,7 +980,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { } break; case MO_TENT_DESPAWN: - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Math_ApproachF(&this->baseAlpha, 0, 1.0f, 5.0f); if ((this->baseAlpha <= 0.5f) && (this->timers[0] == 0)) { this->meltIndex = 0; @@ -1007,7 +1007,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { case MO_TENT_DEATH_3: this->baseBubblesTimer = 20; Math_ApproachF(&sMorphaCore->waterLevel, -300.0f, 0.1f, 0.8f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; for (indS1 = 0; indS1 < 41; indS1++) { sin = Math_SinS(((s16)this->fwork[MO_TENT_SWING_LAG_X] * indS1) + this->xSwing); tempf1 = this->fwork[MO_TENT_SWING_SIZE_X] * (indS1 * 0.025f * sin); @@ -1368,8 +1368,8 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { this->cameraZoom = 60.0f; this->actor.world.pos = sMorphaTent1->actor.world.pos; this->work[MO_TENT_ACTION_STATE] = MO_CORE_INTRO_REVEAL; - this->actor.flags &= ~ACTOR_FLAG_0; - sMorphaTent1->actor.flags |= ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; + sMorphaTent1->actor.flags |= ACTOR_FLAG_TARGETABLE; } else { sMorphaTent1->xSwing = 0xCEC; sMorphaTent1->fwork[MO_TENT_SWING_RATE_X] = 0.0f; @@ -1576,7 +1576,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) { Rand_ZeroFloat(0.08f) + 0.13f); } this->drawActor = false; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Audio_PlayActorSound2(&this->actor, NA_SE_EN_MOFER_CORE_JUMP); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 70, NA_SE_EN_MOFER_LASTVOICE); } @@ -1814,7 +1814,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) { sMorphaTent1->cutScale = 1.0f; sMorphaTent1->work[MO_TENT_ACTION_STATE] = MO_TENT_CUT; sMorphaTent1->timers[0] = 40; - sMorphaTent1->actor.flags &= ~ACTOR_FLAG_0; + sMorphaTent1->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (player->actor.parent == &sMorphaTent1->actor) { player->unk_850 = 0x65; player->actor.parent = NULL; @@ -1888,7 +1888,7 @@ void BossMo_Core(BossMo* this, PlayState* play) { if ((this->csState != MO_BATTLE) && (this->csState < MO_DEATH_START)) { BossMo_IntroCs(this, play); if (this->work[MO_TENT_ACTION_STATE] == MO_CORE_INTRO_WAIT) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; return; } } else if (this->csState >= MO_DEATH_START) { @@ -1921,7 +1921,7 @@ void BossMo_Core(BossMo* this, PlayState* play) { } switch (this->work[MO_TENT_ACTION_STATE]) { case MO_CORE_MOVE: - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; if ((this->timers[0] == 0) && ((sMorphaTent1->work[MO_TENT_ACTION_STATE] == MO_TENT_WAIT) || (sMorphaTent1->work[MO_TENT_ACTION_STATE] == MO_TENT_READY)) && @@ -1960,7 +1960,7 @@ void BossMo_Core(BossMo* this, PlayState* play) { } break; case MO_CORE_STUNNED: - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; if (this->timers[0] == 0) { this->work[MO_TENT_ACTION_STATE] = MO_CORE_MOVE; this->timers[0] = 30; @@ -1977,7 +1977,7 @@ void BossMo_Core(BossMo* this, PlayState* play) { if (this->timers[0] == 0) { switch (this->work[MO_TENT_ACTION_STATE]) { case MO_CORE_ATTACK: - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->work[MO_CORE_POS_IN_TENT]++; if (sMorphaTent1->work[MO_TENT_ACTION_STATE] == MO_TENT_ATTACK) { temp = (s16)(Math_SinS(this->work[MO_TENT_MOVE_TIMER] * 0x300) * 10.0f) + 15; @@ -2002,7 +2002,7 @@ void BossMo_Core(BossMo* this, PlayState* play) { this->timers[0] = 0; break; case MO_CORE_INTRO_REVEAL: - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->work[MO_CORE_POS_IN_TENT]++; temp = (s16)(Math_SinS(this->work[MO_TENT_MOVE_TIMER] * 0x500) * 10.0f) + 15; if (this->work[MO_CORE_POS_IN_TENT] >= temp) { @@ -2230,7 +2230,7 @@ void BossMo_UpdateCore(Actor* thisx, PlayState* play) { } else { MO_WATER_LEVEL(play) = sMorphaTent2->waterLevelMod + ((s16)this->waterLevel + sMorphaTent1->waterLevelMod); } - this->actor.flags |= ACTOR_FLAG_9; + this->actor.flags |= ACTOR_FLAG_HOOKSHOT_DRAGS; this->actor.focus.pos = this->actor.world.pos; this->work[MO_TENT_VAR_TIMER]++; @@ -2259,7 +2259,7 @@ void BossMo_UpdateCore(Actor* thisx, PlayState* play) { } BossMo_UpdateEffects(this, play); if (player->actor.parent != NULL) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } BossMo_Unknown(); } diff --git a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 98d1da158..52d2a9e60 100644 --- a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -12,7 +12,7 @@ #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT) #define vParity actionVar #define vVanish actionVar @@ -309,7 +309,7 @@ void BossSst_Init(Actor* thisx, PlayState* play2) { sHands[LEFT]->actor.child = &sHands[RIGHT]->actor; sHands[RIGHT]->actor.child = &sHands[LEFT]->actor; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.update = BossSst_UpdateHead; this->actor.draw = BossSst_DrawHead; this->radius = -650.0f; @@ -334,7 +334,7 @@ void BossSst_Init(Actor* thisx, PlayState* play2) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 95.0f); this->handZPosMod = -3500; this->actor.targetArrowOffset = 5000.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; BossSst_HandSetupWait(this); } } @@ -418,8 +418,8 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) { } if (this->timer == 0) { - sHands[RIGHT]->actor.flags |= ACTOR_FLAG_0; - sHands[LEFT]->actor.flags |= ACTOR_FLAG_0; + sHands[RIGHT]->actor.flags |= ACTOR_FLAG_TARGETABLE; + sHands[LEFT]->actor.flags |= ACTOR_FLAG_TARGETABLE; player->stateFlags1 &= ~0x20; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, 7); @@ -593,7 +593,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) { sCameraEye.y += 400.0f * 0.01f; sCameraEye.z += 1550.0f * 0.01f; this->vVanish = true; - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_LENS; } else if (revealStateTimer < 40) { sCameraAt.x += 125.0f * 0.01f; sCameraAt.y += 350.0f * 0.01f; @@ -829,7 +829,7 @@ void BossSst_HeadSetupStunned(BossSst* this) { this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); this->colliderCyl.base.acFlags &= ~AC_ON; this->vVanish = false; - this->actor.flags &= ~ACTOR_FLAG_7; + this->actor.flags &= ~ACTOR_FLAG_LENS; BossSst_HeadSfx(this, NA_SE_EN_SHADEST_FREEZE); this->actionFunc = BossSst_HeadStunned; } @@ -897,7 +897,7 @@ void BossSst_HeadVulnerable(BossSst* this, PlayState* play) { Math_StepToF(&sHandOffsets[RIGHT].z, 600.0f, 20.0f); Math_StepToF(&sHandOffsets[LEFT].x, 200.0f, 20.0f); Math_StepToF(&sHandOffsets[RIGHT].x, -200.0f, 20.0f); - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { this->timer += 2; this->timer = CLAMP_MAX(this->timer, 50); } else { @@ -1401,7 +1401,7 @@ void BossSst_HandSetupRetreat(BossSst* this) { Animation_MorphToPlayOnce(&this->skelAnime, sHandHangPoses[this->actor.params], 10.0f); this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); this->colliderJntSph.base.acFlags |= AC_ON; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; BossSst_HandSetInvulnerable(this, false); this->timer = 0; this->actionFunc = BossSst_HandRetreat; @@ -2054,7 +2054,7 @@ void BossSst_HandShake(BossSst* this, PlayState* play) { this->timer = 80; } } else if (this->timer == 0) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; BossSst_HandSetupSlam(this); } } @@ -2534,7 +2534,7 @@ void BossSst_HandCollisionCheck(BossSst* this, PlayState* play) { BossSst_HandSetupRetreat(OTHER_HAND(this)); } - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (this->actor.colChkInfo.damageEffect == 3) { BossSst_HandSetupFrozen(this); } else { @@ -2651,9 +2651,9 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play) { this->actionFunc(this, play); if (this->vVanish) { if (!play->actorCtx.lensActive || (thisx->colorFilterTimer != 0)) { - this->actor.flags &= ~ACTOR_FLAG_7; + this->actor.flags &= ~ACTOR_FLAG_LENS; } else { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_LENS; } } @@ -2673,13 +2673,13 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play) { } BossSst_MoveAround(this); - if ((!this->vVanish || CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) && + if ((!this->vVanish || CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_LENS)) && ((this->actionFunc == BossSst_HeadReadyCharge) || (this->actionFunc == BossSst_HeadCharge) || (this->actionFunc == BossSst_HeadFrozenHand) || (this->actionFunc == BossSst_HeadStunned) || (this->actionFunc == BossSst_HeadVulnerable) || (this->actionFunc == BossSst_HeadDamage))) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } else { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } if (this->actionFunc == BossSst_HeadCharge) { @@ -2787,7 +2787,7 @@ s32 BossSst_OverrideHeadDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* s32 timer12; f32 shakeMod; - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7) && this->vVanish) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_LENS) && this->vVanish) { *dList = NULL; } else if (this->actionFunc == BossSst_HeadThrash) { // Animation modifications for death cutscene shakeAmp = (this->timer / 10) + 1; @@ -2878,7 +2878,7 @@ void BossSst_DrawHead(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_LENS)) { Gfx_SetupDL_25Opa(play->state.gfxCtx); gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x80, sBodyColor.r, sBodyColor.g, sBodyColor.b, 255); if (!sBodyStatic) { @@ -2905,7 +2905,7 @@ void BossSst_DrawHead(Actor* thisx, PlayState* play) { Matrix_RotateY(-randYaw, MTXMODE_APPLY); } - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_LENS)) { POLY_OPA_DISP = SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, BossSst_OverrideHeadDraw, BossSst_PostHeadDraw, this, POLY_OPA_DISP); diff --git a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index d513fa6bb..2de93e7bd 100644 --- a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -7,7 +7,7 @@ #include -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) typedef enum { /* 0x00 */ TW_KOTAKE, @@ -421,7 +421,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) { Actor_SetScale(&this->actor, 0.01f); this->actor.update = BossTw_BlastUpdate; this->actor.draw = BossTw_BlastDraw; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInitBlasts); @@ -611,7 +611,7 @@ void BossTw_SetupFlyTo(BossTw* this, PlayState* play) { BossTw* otherTw = (BossTw*)this->actor.parent; this->unk_5F8 = 1; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionFunc = BossTw_FlyTo; this->rotateSpeed = 0.0f; Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_006F28, -10.0f); @@ -1435,7 +1435,7 @@ void BossTw_SetupWait(BossTw* this, PlayState* play) { this->actionFunc = BossTw_Wait; this->visible = false; this->actor.world.pos.y = -2000.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } void BossTw_Wait(BossTw* this, PlayState* play) { @@ -1597,7 +1597,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { this->csState1 = 1; this->visible = true; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.shape.rot.y = 0; BossTw_SetupWait(sKotakePtr, play); BossTw_SetupWait(sKoumePtr, play); @@ -1718,7 +1718,7 @@ void BossTw_SetupCSWait(BossTw* this, PlayState* play) { this->actionFunc = BossTw_CSWait; this->visible = false; this->actor.world.pos.y = -2000.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } /** @@ -1731,7 +1731,7 @@ void BossTw_TwinrovaSetupIntroCS(BossTw* this, PlayState* play) { this->actionFunc = BossTw_TwinrovaIntroCS; this->visible = false; this->actor.world.pos.y = -2000.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { @@ -2337,7 +2337,7 @@ void BossTw_TwinrovaSetupDeathCS(BossTw* this, PlayState* play) { this->actionFunc = BossTw_TwinrovaDeathCS; Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_024374, -3.0f); this->actor.world.rot.y = this->actor.shape.rot.y; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->csState2 = this->csState1 = 0; this->work[CS_TIMER_1] = this->work[CS_TIMER_2] = 0; this->work[INVINC_TIMER] = 10000; @@ -2652,7 +2652,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_BOSS_TW, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, TW_DEATHBALL_KOTAKE); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } } Actor_SetScale(&this->actor, this->actor.scale.x); @@ -2705,7 +2705,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { sKoumePtr->work[YAW_TGT] = sKotakePtr->work[YAW_TGT] = sKoumePtr->actor.shape.rot.x = sKotakePtr->actor.shape.rot.x = sKoumePtr->actor.shape.rot.y = sKotakePtr->actor.shape.rot.y = 0; func_8002DF54(play, &sKoumePtr->actor, 1); - sKoumePtr->actor.flags |= ACTOR_FLAG_0; + sKoumePtr->actor.flags |= ACTOR_FLAG_TARGETABLE; } break; case 2: @@ -2949,7 +2949,7 @@ void BossTw_TwinrovaUpdate(Actor* thisx, PlayState* play2) { BossTw* this = (BossTw*)thisx; Player* player = GET_PLAYER(play); - this->actor.flags &= ~ACTOR_FLAG_10; + this->actor.flags &= ~ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; this->unk_5F8 = 0; this->collider.base.colType = COLTYPE_HIT3; @@ -5301,7 +5301,7 @@ void BossTw_TwinrovaStun(BossTw* this, PlayState* play) { s16 cloudType; this->unk_5F8 = 1; - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; cloudType = sTwinrovaBlastType == 0 ? 3 : 2; diff --git a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 808f9ee12..262b121fa 100644 --- a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -15,7 +15,7 @@ #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) #define GET_BODY(this) ((BossVa*)(this)->actor.parent) #define vaGorePulse offset.x @@ -598,7 +598,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { //sFightPhase = 0; //sBodyState = 1; SkelAnime_Init(play, &this->skelAnime, &gBarinadeBodySkel, &gBarinadeBodyAnim, NULL, NULL, 0); - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; break; case BOSSVA_SUPPORT_1: case BOSSVA_SUPPORT_2: @@ -618,7 +618,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { SkelAnime_InitFlex(play, &this->skelAnime, &gBarinadeStumpSkel, &gBarinadeStumpAnim, NULL, NULL, 0); break; default: - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; SkelAnime_Init(play, &this->skelAnime, &gBarinadeBariSkel, &gBarinadeBariAnim, NULL, NULL, 0); this->actor.shape.yOffset = 400.0f; break; @@ -768,7 +768,7 @@ void BossVa_SetupIntro(BossVa* this) { Animation_Change(&this->skelAnime, &gBarinadeBodyAnim, 1.0f, lastFrame, lastFrame, ANIMMODE_ONCE, 0.0f); this->actor.shape.yOffset = -450.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; BossVa_SetupAction(this, BossVa_BodyIntro); } @@ -1060,7 +1060,7 @@ void BossVa_SetupBodyPhase1(BossVa* this) { Animation_Change(&this->skelAnime, &gBarinadeBodyAnim, 1.0f, lastFrame, lastFrame, ANIMMODE_ONCE, 0.0f); this->actor.shape.yOffset = -450.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->timer = 25; sBodyState = 0x80; BossVa_SetupAction(this, BossVa_BodyPhase1); @@ -1127,7 +1127,7 @@ void BossVa_SetupBodyPhase2(BossVa* this, PlayState* play) { } this->invincibilityTimer = 0; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; BossVa_SetupAction(this, BossVa_BodyPhase2); } @@ -1193,10 +1193,10 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) { Math_SmoothStepToS(&this->actor.shape.rot.z, this->actor.world.rot.z, 1, 0xC8, 0); Math_SmoothStepToF(&this->actor.shape.yOffset, -1000.0f, 1.0f, 20.0f, 0.0f); if (!(sPhase2Timer & 0x100)) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 1.0f; } else { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 0.0f; } @@ -1259,7 +1259,7 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_FAINT); sBodyState = 1; this->timer = 131; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else { sBodyState = 0; if (this->timer == 0) { @@ -1269,7 +1269,7 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) { } Math_SmoothStepToF(&this->actor.speedXZ, 3.0f, 1.0f, 0.15f, 0.0f); } - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } else { this->timer--; if (this->timer < 35) { @@ -1344,7 +1344,7 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) { void BossVa_SetupBodyPhase4(BossVa* this, PlayState* play) { this->unk_1AC = 0; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->vaBodySpinRate = this->unk_1AC; this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->timer2 = (s16)(Rand_ZeroOne() * 150.0f) + 300; @@ -1524,7 +1524,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { void BossVa_SetupBodyDeath(BossVa* this, PlayState* play) { func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG, 1.0f); - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF); this->vaCamRotMod = 0xC31; sCsState = DEATH_START; @@ -1814,7 +1814,7 @@ void BossVa_SupportCut(BossVa* this, PlayState* play) { lastFrame = Animation_GetLastFrame(&gBarinadeSupportDetachedAnim); Animation_Change(&this->skelAnime, &gBarinadeSupportDetachedAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP_INTERP, 0.0f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } if ((this->timer == 0) && (sCsState < DEATH_START)) { @@ -1868,7 +1868,7 @@ void BossVa_SupportCut(BossVa* this, PlayState* play) { void BossVa_SetupStump(BossVa* this, PlayState* play) { Animation_Change(&this->skelAnime, &gBarinadeStumpAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gBarinadeStumpAnim), ANIMMODE_ONCE, 0.0f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; BossVa_SetupAction(this, BossVa_Stump); } @@ -1887,7 +1887,7 @@ void BossVa_SetupZapperIntro(BossVa* this, PlayState* play) { Animation_Change(&this->skelAnime, &gBarinadeZapperIdleAnim, 1.0f, lastFrame - 1.0f, lastFrame, ANIMMODE_LOOP_INTERP, -6.0f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; BossVa_SetupAction(this, BossVa_ZapperIntro); } @@ -1914,7 +1914,7 @@ void BossVa_SetupZapperAttack(BossVa* this, PlayState* play) { Animation_Change(&this->skelAnime, &gBarinadeZapperIdleAnim, 1.0f, lastFrame - 1.0f, lastFrame, ANIMMODE_LOOP_INTERP, -6.0f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; BossVa_SetupAction(this, BossVa_ZapperAttack); } @@ -2411,7 +2411,7 @@ void BossVa_SetupBariIntro(BossVa* this, PlayState* play) { this->actor.world.pos.y = sInitPosOffsets[this->actor.params + 10].y + this->actor.home.pos.y; this->actor.world.pos.z = sInitPosOffsets[this->actor.params + 10].z + this->actor.home.pos.z; this->timer = 45; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; BossVa_SetupAction(this, BossVa_BariIntro); } @@ -2532,7 +2532,7 @@ void BossVa_SetupBariPhase3Attack(BossVa* this, PlayState* play) { this->unk_1F0 = 0x78; this->unk_1A0 = 60.0f; this->unk_1A8 = 0.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; BossVa_SetupAction(this, BossVa_BariPhase3Attack); } @@ -2619,7 +2619,7 @@ void BossVa_SetupBariPhase2Attack(BossVa* this, PlayState* play) { this->unk_1F0 = 0x78; this->unk_1A0 = 60.0f; this->unk_1A8 = 0.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; BossVa_SetupAction(this, BossVa_BariPhase2Attack); } @@ -2669,7 +2669,7 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) { if (!(sPhase2Timer & 0x100) && (GET_BODY(this)->actor.colorFilterTimer == 0)) { sp4C = 200.0f; BossVa_Spark(play, this, 1, 125, 15.0f, 7.0f, SPARK_TETHER, 1.0f, true); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (this->actor.params & 1) { sp4C = -200.0f; } @@ -2692,7 +2692,7 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderLightning.base); CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base); } else { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; Math_SmoothStepToS(&this->unk_1AC, sp50 + 150, 1, 0x3C, 0); if (GET_BODY(this)->actor.colorFilterTimer == 0) { Math_SmoothStepToF(&this->unk_1A0, 180.0f, 1.0f, 1.5f, 0.0f); @@ -2732,7 +2732,7 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) { } void BossVa_SetupBariPhase3Stunned(BossVa* this, PlayState* play) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->timer = GET_BODY(this)->timer; Actor_SetColorFilter(&this->actor, 0, 255, 0x2000, this->timer); BossVa_SetupAction(this, BossVa_BariPhase3Stunned); @@ -2765,7 +2765,7 @@ void BossVa_BariPhase3Stunned(BossVa* this, PlayState* play) { } else { BossVa_Spark(play, this, 1, 85, 15.0f, 0.0f, SPARK_TETHER, 1.0f, true); if (this->timer2 >= 0x10) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->timer2 = 0x80; BossVa_SetupAction(this, BossVa_BariPhase3Attack); } @@ -2774,7 +2774,7 @@ void BossVa_BariPhase3Stunned(BossVa* this, PlayState* play) { } void BossVa_SetupBariDeath(BossVa* this) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->timer = 30; Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_BL_DEAD); this->isDead++; @@ -2792,7 +2792,7 @@ void BossVa_SetupDoor(BossVa* this, PlayState* play) { if (sCsState >= INTRO_SPAWN_BARI) { sDoorState = 100; } - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; BossVa_SetupAction(this, BossVa_Door); } diff --git a/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index 5e33a6d3b..48f127fab 100644 --- a/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -12,7 +12,7 @@ #include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h" #include "soh/frame_interpolation.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void Demo6K_Init(Actor* thisx, PlayState* play); void Demo6K_Destroy(Actor* thisx, PlayState* play); @@ -166,7 +166,7 @@ void Demo6K_Init(Actor* thisx, PlayState* play) { case 17: case 18: case 19: - this->actor.flags |= ACTOR_FLAG_5; + this->actor.flags |= ACTOR_FLAG_DRAW_WHILE_CULLED; this->drawFunc = func_8096865C; this->initActionFunc = func_80967410; this->flags |= 1; diff --git a/soh/src/overlays/actors/ovl_Demo_Du/z_demo_du.c b/soh/src/overlays/actors/ovl_Demo_Du/z_demo_du.c index f182d9d5f..18f85675a 100644 --- a/soh/src/overlays/actors/ovl_Demo_Du/z_demo_du.c +++ b/soh/src/overlays/actors/ovl_Demo_Du/z_demo_du.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef void (*DemoDuActionFunc)(DemoDu*, PlayState*); typedef void (*DemoDuDrawFunc)(Actor*, PlayState*); diff --git a/soh/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c b/soh/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c index 46ede7985..3b055a3f2 100644 --- a/soh/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c +++ b/soh/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c @@ -37,7 +37,7 @@ #include "objects/object_bba/object_bba.h" #include "objects/object_ane/object_ane.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void DemoEc_Init(Actor* thisx, PlayState* play); void DemoEc_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index d10fcfdc1..3aaa0d3b9 100644 --- a/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -10,7 +10,7 @@ #include "objects/object_efc_tw/object_efc_tw.h" #include "objects/object_gi_jewel/object_gi_jewel.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void DemoEffect_Init(Actor* thisx, PlayState* play); void DemoEffect_Destroy(Actor* thisx, PlayState* play); @@ -461,7 +461,7 @@ void DemoEffect_Init(Actor* thisx, PlayState* play2) { case DEMO_EFFECT_TIMEWARP_TIMEBLOCK_LARGE: case DEMO_EFFECT_TIMEWARP_TIMEBLOCK_SMALL: - this->actor.flags |= ACTOR_FLAG_25; + this->actor.flags |= ACTOR_FLAG_NO_FREEZE_OCARINA; case DEMO_EFFECT_TIMEWARP_MASTERSWORD: this->initDrawFunc = DemoEffect_DrawTimeWarp; this->initUpdateFunc = DemoEffect_InitTimeWarp; diff --git a/soh/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c b/soh/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c index 6ed939848..196038265 100644 --- a/soh/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c +++ b/soh/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_fhg/object_fhg.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef enum { /* 0x00 */ EXT_WAIT, diff --git a/soh/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/soh/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c index b2829b2d9..1f9ebe90d 100644 --- a/soh/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/soh/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -8,7 +8,7 @@ #include "objects/object_geff/object_geff.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void DemoGeff_Init(Actor* thisx, PlayState* play); void DemoGeff_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c b/soh/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c index 7685b6ae4..5f3737b44 100644 --- a/soh/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c +++ b/soh/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c @@ -9,7 +9,7 @@ #include "objects/object_geff/object_geff.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void DemoGj_Init(Actor* thisx, PlayState* play); void DemoGj_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/soh/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index 1e45f14db..db665b7f8 100644 --- a/soh/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/soh/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -8,7 +8,7 @@ #include "objects/object_oF1d_map/object_oF1d_map.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void DemoGo_Init(Actor* thisx, PlayState* play); void DemoGo_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c b/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c index f14ef51e9..381f03b3c 100644 --- a/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c +++ b/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c @@ -4,7 +4,7 @@ #include "vt.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void DemoGt_Init(Actor* thisx, PlayState* play); void DemoGt_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c b/soh/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c index fb302bb27..a5abd9948 100644 --- a/soh/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c +++ b/soh/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c @@ -2,7 +2,7 @@ #include "vt.h" #include "objects/object_ik/object_ik.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void DemoIk_Init(Actor* thisx, PlayState* play); void DemoIk_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index 05a292f16..92bfd7ddf 100644 --- a/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -11,7 +11,7 @@ #include "objects/object_im/object_im.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void DemoIm_Init(Actor* thisx, PlayState* play); void DemoIm_Destroy(Actor* thisx, PlayState* play); @@ -833,7 +833,7 @@ s32 func_809869F8(DemoIm* this, PlayState* play) { f32 playerPosX = player->actor.world.pos.x; f32 thisPosX = this->actor.world.pos.x; - if ((thisPosX - (kREG(16) + 30.0f) > playerPosX) && !(this->actor.flags & ACTOR_FLAG_6)) { + if ((thisPosX - (kREG(16) + 30.0f) > playerPosX) && !(this->actor.flags & ACTOR_FLAG_ACTIVE)) { return true; } else { return false; @@ -853,7 +853,7 @@ s32 func_80986A5C(DemoIm* this, PlayState* play) { } s32 func_80986AD0(DemoIm* this, PlayState* play) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; if (!Actor_ProcessTalkRequest(&this->actor, play)) { this->actor.textId = 0x708E; func_8002F2F4(&this->actor, play); @@ -974,7 +974,7 @@ void func_80986DC8(DemoIm* this, PlayState* play) { DemoIm_UpdateSkelAnime(this); func_80984BE0(this); func_80984E58(this, play); - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); } void func_80986E20(DemoIm* this, PlayState* play) { @@ -1021,7 +1021,7 @@ void func_80986FA8(DemoIm* this, PlayState* play) { DemoIm_UpdateSkelAnime(this); func_80984BE0(this); func_80984E58(this, play); - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); DemoIm_UpdateCollider(this, play); func_80986CFC(this, play); } @@ -1139,7 +1139,7 @@ void DemoIm_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); DemoIm_InitCollider(thisx, play); SkelAnime_InitFlex(play, &this->skelAnime, &gImpaSkel, NULL, this->jointTable, this->morphTable, 17); - thisx->flags &= ~ACTOR_FLAG_0; + thisx->flags &= ~ACTOR_FLAG_TARGETABLE; switch (this->actor.params) { case 2: diff --git a/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index c32d20c5c..e76b2fcc3 100644 --- a/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -5,7 +5,7 @@ #include "objects/object_toki_objects/object_toki_objects.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void DemoKankyo_Init(Actor* thisx, PlayState* play); void DemoKankyo_Destroy(Actor* thisx, PlayState* play); @@ -250,7 +250,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) { case DEMOKANKYO_WARP_OUT: case DEMOKANKYO_WARP_IN: Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ITEMACTION); - this->actor.flags |= ACTOR_FLAG_25; + this->actor.flags |= ACTOR_FLAG_NO_FREEZE_OCARINA; this->actor.room = -1; this->warpTimer = 35; this->sparkleCounter = 0; diff --git a/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c b/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c index e6ad6e143..bb29705d4 100644 --- a/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c +++ b/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c @@ -8,7 +8,7 @@ #include "objects/object_demo_kekkai/object_demo_kekkai.h" #include "scenes/dungeons/ganontika/ganontika_scene.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void DemoKekkai_Init(Actor* thisx, PlayState* play); void DemoKekkai_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index 83c9776c6..805e89f9f 100644 --- a/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -11,7 +11,7 @@ #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void DemoSa_Init(Actor* thisx, PlayState* play); void DemoSa_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c b/soh/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c index 378fc3e87..eed364b3d 100644 --- a/soh/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c +++ b/soh/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c @@ -6,7 +6,7 @@ #include "z_demo_shd.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void DemoShd_Init(Actor* thisx, PlayState* play); void DemoShd_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/soh/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c index 555fdbea9..068bb1799 100644 --- a/soh/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c +++ b/soh/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_Box/z_en_box.h" #include "objects/object_box/object_box.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void DemoTreLgt_Init(Actor* thisx, PlayState* play); void DemoTreLgt_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index f8c3a9a91..c38bb6d34 100644 --- a/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -8,7 +8,7 @@ #include "objects/gameplay_field_keep/gameplay_field_keep.h" #include "soh/Enhancements/randomizer/randomizer_entrance.h" -#define FLAGS ACTOR_FLAG_25 +#define FLAGS ACTOR_FLAG_NO_FREEZE_OCARINA void DoorAna_Init(Actor* thisx, PlayState* play); void DoorAna_Destroy(Actor* thisx, PlayState* play); @@ -74,7 +74,7 @@ void DoorAna_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); } else { - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } Actor_SetScale(&this->actor, 0); DoorAna_SetupAction(this, DoorAna_WaitClosed); @@ -101,7 +101,7 @@ void DoorAna_WaitClosed(DoorAna* this, PlayState* play) { // opening with song of storms if (this->actor.xyzDistToPlayerSq < 40000.0f && Flags_GetEnv(play, 5)) { openGrotto = true; - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; } } else { // bombing/hammering open a grotto diff --git a/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c index 4558838cb..0c1f851e8 100644 --- a/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c +++ b/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c @@ -11,7 +11,7 @@ #include "objects/object_haka_door/object_haka_door.h" #include "objects/object_door_killer/object_door_killer.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef enum { /* 0 */ DOOR_KILLER_DOOR, diff --git a/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index aab96055d..6aef4910e 100644 --- a/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -24,7 +24,7 @@ #include "objects/object_demo_kekkai/object_demo_kekkai.h" #include "objects/object_ouke_haka/object_ouke_haka.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void DoorShutter_Init(Actor* thisx, PlayState* play); void DoorShutter_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c b/soh/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c index 7c0225851..1cd642f0c 100644 --- a/soh/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c +++ b/soh/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c @@ -2,7 +2,7 @@ #include "objects/object_efc_erupc/object_efc_erupc.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EfcErupc_Init(Actor* thisx, PlayState* play); void EfcErupc_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c b/soh/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c index 7740419e5..56a761c84 100644 --- a/soh/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c +++ b/soh/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EffDust_Init(Actor* thisx, PlayState* play); void EffDust_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/soh/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index 2433343e5..3fe7fc689 100644 --- a/soh/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/soh/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -8,7 +8,7 @@ #include "vt.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void ElfMsg_Init(Actor* thisx, PlayState* play); void ElfMsg_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/soh/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index 9988e3822..5a291d249 100644 --- a/soh/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/soh/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -7,7 +7,7 @@ #include "z_elf_msg2.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void ElfMsg2_Init(Actor* thisx, PlayState* play); void ElfMsg2_Destroy(Actor* thisx, PlayState* play); @@ -83,7 +83,7 @@ void ElfMsg2_Init(Actor* thisx, PlayState* play) { ElfMsg2_SetupAction(this, ElfMsg2_WaitUntilActivated); } else { ElfMsg2_SetupAction(this, ElfMsg2_WaitForTextRead); - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_18; // Make actor targetable and Navi-checkable + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_NAVI_HAS_INFO; // Make actor targetable and Navi-checkable this->actor.textId = ElfMsg2_GetMessageId(this); } this->actor.shape.rot.x = this->actor.shape.rot.y = this->actor.shape.rot.z = 0; @@ -135,7 +135,7 @@ void ElfMsg2_WaitUntilActivated(ElfMsg2* this, PlayState* play) { if ((this->actor.world.rot.y >= 0x41) && (this->actor.world.rot.y <= 0x80) && (Flags_GetSwitch(play, (this->actor.world.rot.y - 0x41)))) { ElfMsg2_SetupAction(this, ElfMsg2_WaitForTextRead); - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_18; // Make actor targetable and Navi-checkable + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_NAVI_HAS_INFO; // Make actor targetable and Navi-checkable this->actor.textId = ElfMsg2_GetMessageId(this); } } diff --git a/soh/src/overlays/actors/ovl_En_Am/z_en_am.c b/soh/src/overlays/actors/ovl_En_Am/z_en_am.c index 71b562eff..decef6ece 100644 --- a/soh/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/soh/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -8,7 +8,7 @@ #include "objects/object_am/object_am.h" #include "overlays/actors/ovl_En_Bom/z_en_bom.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_26) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_CAN_PRESS_SWITCH) void EnAm_Init(Actor* thisx, PlayState* play); void EnAm_Destroy(Actor* thisx, PlayState* play); @@ -288,7 +288,7 @@ void EnAm_SetupStatue(EnAm* this) { f32 lastFrame = Animation_GetLastFrame(&gArmosRicochetAnim); Animation_Change(&this->skelAnime, &gArmosRicochetAnim, 0.0f, lastFrame, lastFrame, ANIMMODE_LOOP, 0.0f); - this->dyna.actor.flags &= ~ACTOR_FLAG_0; + this->dyna.actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->behavior = AM_BEHAVIOR_DO_NOTHING; this->dyna.actor.speedXZ = 0.0f; EnAm_SetupAction(this, EnAm_Statue); @@ -389,7 +389,7 @@ void EnAm_Sleep(EnAm* this, PlayState* play) { if (this->textureBlend >= 240) { this->attackTimer = 200; this->textureBlend = 255; - this->dyna.actor.flags |= ACTOR_FLAG_0; + this->dyna.actor.flags |= ACTOR_FLAG_TARGETABLE; this->dyna.actor.shape.yOffset = 0.0f; EnAm_SetupLunge(this); } else { @@ -410,7 +410,7 @@ void EnAm_Sleep(EnAm* this, PlayState* play) { this->textureBlend -= 10; } else { this->textureBlend = 0; - this->dyna.actor.flags &= ~ACTOR_FLAG_0; + this->dyna.actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (this->dyna.bgId < 0) { this->unk_264 = 0; diff --git a/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c index 97664aa17..00464b3dc 100644 --- a/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -7,7 +7,7 @@ #include "z_en_ani.h" #include "objects/object_ani/object_ani.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnAni_Init(Actor* thisx, PlayState* play); void EnAni_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c b/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c index 08e06ac04..5a4377837 100644 --- a/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c +++ b/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c @@ -10,7 +10,7 @@ #include "overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnAnubice_Init(Actor* thisx, PlayState* play); void EnAnubice_Destroy(Actor* thisx, PlayState* play); @@ -147,7 +147,7 @@ void EnAnubice_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->actor.shape.yOffset = -4230.0f; this->focusHeightOffset = 0.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->home = this->actor.world.pos; this->actor.targetMode = 3; this->actionFunc = EnAnubice_FindFlameCircles; @@ -196,7 +196,7 @@ void EnAnubice_FindFlameCircles(EnAnubice* this, PlayState* play) { } this->hasSearchedForFlameCircles = true; } - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionFunc = EnAnubice_SetupIdle; } } @@ -375,7 +375,7 @@ void EnAnubice_Update(Actor* thisx, PlayState* play) { (fabsf(this->flameCircles[i]->actor.world.pos.z - this->actor.world.pos.z) < 60.0f) && (flameCircle->timer != 0)) { Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Enemy_StartFinishingBlow(play, &this->actor); Audio_PlayActorSound2(&this->actor, NA_SE_EN_ANUBIS_DEAD); this->actionFunc = EnAnubice_SetupDie; @@ -387,7 +387,7 @@ void EnAnubice_Update(Actor* thisx, PlayState* play) { this->collider.base.acFlags &= ~AC_HIT; if (this->actor.colChkInfo.damageEffect == ANUBICE_DMGEFF_FIRE) { Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Enemy_StartFinishingBlow(play, &this->actor); Audio_PlayActorSound2(&this->actor, NA_SE_EN_ANUBIS_DEAD); this->actionFunc = EnAnubice_SetupDie; diff --git a/soh/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c b/soh/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c index eb440f411..740aea6c4 100644 --- a/soh/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c +++ b/soh/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c @@ -9,7 +9,7 @@ #include "objects/object_anubice/object_anubice.h" #include "soh/frame_interpolation.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnAnubiceFire_Init(Actor* thisx, PlayState* play); void EnAnubiceFire_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c b/soh/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c index 8867436e2..3b74c38ba 100644 --- a/soh/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c +++ b/soh/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c @@ -7,7 +7,7 @@ #include "z_en_anubice_tag.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnAnubiceTag_Init(Actor* thisx, PlayState* play); void EnAnubiceTag_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c b/soh/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c index 3e45719b8..3622e5f5f 100644 --- a/soh/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c +++ b/soh/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c @@ -6,7 +6,7 @@ #include "z_en_arow_trap.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnArowTrap_Init(Actor* thisx, PlayState* play); void EnArowTrap_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index fb33ed6a0..d98215802 100644 --- a/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_gi_nuts/object_gi_nuts.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnArrow_Init(Actor* thisx, PlayState* play); void EnArrow_Destroy(Actor* thisx, PlayState* play); @@ -193,7 +193,7 @@ void EnArrow_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyQuad(play, &this->collider); if ((this->hitActor != NULL) && (this->hitActor->update != NULL)) { - this->hitActor->flags &= ~ACTOR_FLAG_15; + this->hitActor->flags &= ~ACTOR_FLAG_DRAGGED_BY_ARROW; } } @@ -333,11 +333,11 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) { hitActor = this->collider.base.at; if ((hitActor->update != NULL) && (!(this->collider.base.atFlags & AT_BOUNCED)) && - (hitActor->flags & ACTOR_FLAG_14)) { + (hitActor->flags & ACTOR_FLAG_ARROW_DRAGGABLE)) { this->hitActor = hitActor; EnArrow_CarryActor(this, play); Math_Vec3f_Diff(&hitActor->world.pos, &this->actor.world.pos, &this->unk_250); - hitActor->flags |= ACTOR_FLAG_15; + hitActor->flags |= ACTOR_FLAG_DRAGGED_BY_ARROW; this->collider.base.atFlags &= ~AT_HIT; this->actor.speedXZ /= 2.0f; this->actor.velocity.y /= 2.0f; @@ -396,14 +396,14 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) { this->hitActor->world.pos.y = hitPoint.y + ((sp54.y <= hitPoint.y) ? 1.0f : -1.0f); this->hitActor->world.pos.z = hitPoint.z + ((sp54.z <= hitPoint.z) ? 1.0f : -1.0f); Math_Vec3f_Diff(&this->hitActor->world.pos, &this->actor.world.pos, &this->unk_250); - this->hitActor->flags &= ~ACTOR_FLAG_15; + this->hitActor->flags &= ~ACTOR_FLAG_DRAGGED_BY_ARROW; this->hitActor = NULL; } else { Math_Vec3f_Sum(&this->actor.world.pos, &this->unk_250, &this->hitActor->world.pos); } if (this->touchedPoly && (this->hitActor != NULL)) { - this->hitActor->flags &= ~ACTOR_FLAG_15; + this->hitActor->flags &= ~ACTOR_FLAG_DRAGGED_BY_ARROW; this->hitActor = NULL; } } else { diff --git a/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c index fd824bed7..1ddba826b 100644 --- a/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c +++ b/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c @@ -8,7 +8,7 @@ #include "objects/object_niw/object_niw.h" #include "overlays/actors/ovl_En_Niw/z_en_niw.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnAttackNiw_Init(Actor* thisx, PlayState* play); void EnAttackNiw_Destroy(Actor* thisx, PlayState* play); @@ -54,7 +54,7 @@ void EnAttackNiw_Init(Actor* thisx, PlayState* play) { this->unk_298.y = Rand_CenteredFloat(10.0f); this->unk_298.z = Rand_CenteredFloat(100.0f); Actor_SetScale(&this->actor, 0.01f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.shape.rot.y = this->actor.world.rot.y = (Rand_ZeroOne() - 0.5f) * 60000.0f; this->actionFunc = func_809B5670; } diff --git a/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c index 22ea26d00..fc69b615e 100644 --- a/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -8,7 +8,7 @@ #include "objects/object_bxa/object_bxa.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnBa_Init(Actor* thisx, PlayState* play); void EnBa_Destroy(Actor* thisx, PlayState* play); @@ -149,7 +149,7 @@ void EnBa_Idle(EnBa* this, PlayState* play) { if ((this->actor.colChkInfo.mass == MASS_IMMOVABLE) && (this->actor.xzDistToPlayer > 175.0f)) { Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 330.0f, 1.0f, 7.0f, 0.0f); } else { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 100.0f, 1.0f, 10.0f, 0.0f); } this->unk_2FC = this->actor.world.pos; @@ -398,7 +398,7 @@ void func_809B75A0(EnBa* this, PlayState* play2) { Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW); Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY); Matrix_MultVec3f(&D_809B8080, &this->unk_158[0]); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; for (i = 5; i < 13; i++) { Math_SmoothStepToS(&this->unk_2A8[i].x, this->unk_2A8[5].x, 1, this->unk_31C, 0); Math_SmoothStepToS(&this->unk_2A8[i].y, this->unk_2A8[5].y, 1, this->unk_31C, 0); diff --git a/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c index 9f07839da..ef0127e85 100644 --- a/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_Bb/object_Bb.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_24) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_PLAY_HIT_SFX) #define vBombHopPhase actionVar1 #define vTrailIdx actionVar1 @@ -345,7 +345,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) { this->flamePrimBlue = this->flameEnvColor.b = 255; thisx->world.pos.y += 50.0f; EnBb_SetupBlue(this); - thisx->flags |= ACTOR_FLAG_14; + thisx->flags |= ACTOR_FLAG_ARROW_DRAGGABLE; break; case ENBB_RED: thisx->naviEnemyId = 0x24; @@ -374,7 +374,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) { EnBb_SetupWhite(play, this); EnBb_SetWaypoint(this, play); EnBb_FaceWaypoint(this); - thisx->flags |= ACTOR_FLAG_14; + thisx->flags |= ACTOR_FLAG_ARROW_DRAGGABLE; break; case ENBB_GREEN_BIG: this->path = this->actionState >> 4; @@ -410,7 +410,7 @@ void EnBb_Destroy(Actor* thisx, PlayState* play) { void EnBb_SetupFlameTrail(EnBb* this) { this->action = BB_FLAME_TRAIL; this->moveMode = BBMOVE_NOCLIP; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.velocity.y = 0.0f; this->actor.gravity = 0.0f; this->actor.speedXZ = 0.0f; @@ -714,7 +714,7 @@ void EnBb_Down(EnBb* this, PlayState* play) { this->moveMode = BBMOVE_HIDDEN; this->timer = 10; this->actionState++; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->action = BB_RED; EnBb_SetupAction(this, EnBb_Red); return; @@ -779,7 +779,7 @@ void EnBb_SetupRed(PlayState* play, EnBb* this) { this->actor.home.pos = this->actor.world.pos; this->actor.velocity.y = this->actor.gravity = this->actor.speedXZ = 0.0f; this->actor.bgCheckFlags &= ~1; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } this->action = BB_RED; EnBb_SetupAction(this, EnBb_Red); @@ -813,7 +813,7 @@ void EnBb_Red(EnBb* this, PlayState* play) { case BBRED_ATTACK: if (this->timer == 0) { this->moveMode = BBMOVE_NORMAL; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } this->bobPhase += Rand_ZeroOne(); Math_SmoothStepToF(&this->flameScaleY, 80.0f, 1.0f, 10.0f, 0.0f); @@ -832,7 +832,7 @@ void EnBb_Red(EnBb* this, PlayState* play) { this->moveMode = BBMOVE_HIDDEN; this->timer = 10; this->actionState++; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else { this->actor.velocity.y *= -1.06f; if (this->actor.velocity.y > 13.0f) { @@ -1141,7 +1141,7 @@ void EnBb_Stunned(EnBb* this, PlayState* play) { EnBb_SetupDown(this); } } else { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnBb_SetupDeath(this, play); } } @@ -1206,7 +1206,7 @@ void EnBb_CollisionCheck(EnBb* this, PlayState* play) { } } if (this->actor.colChkInfo.health == 0) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (this->actor.params == ENBB_RED) { EnBb_KillFlameTrail(this); } @@ -1248,7 +1248,7 @@ void EnBb_Update(Actor* thisx, PlayState* play2) { if (this->actor.colChkInfo.damageEffect != 0xD) { this->actionFunc(this, play); if ((this->actor.params <= ENBB_BLUE) && (this->actor.speedXZ >= -6.0f) && - ((this->actor.flags & ACTOR_FLAG_15) == 0)) { + ((this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW) == 0)) { Actor_MoveForward(&this->actor); } if (this->moveMode == BBMOVE_NORMAL) { diff --git a/soh/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c b/soh/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c index 12da0cc92..a3d6c923d 100644 --- a/soh/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c +++ b/soh/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c @@ -7,7 +7,7 @@ #include "z_en_bdfire.h" #include "objects/object_kingdodongo/object_kingdodongo.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnBdfire_Init(Actor* thisx, PlayState* play); void EnBdfire_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/soh/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index 8e544a151..f92985a02 100644 --- a/soh/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/soh/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -1,7 +1,7 @@ #include "z_en_bigokuta.h" #include "objects/object_bigokuta/object_bigokuta.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnBigokuta_Init(Actor* thisx, PlayState* play); void EnBigokuta_Destroy(Actor* thisx, PlayState* play); @@ -386,7 +386,7 @@ void func_809BD6B8(EnBigokuta* this) { void func_809BD768(EnBigokuta* this) { this->unk_194 = Rand_ZeroOne() < 0.5f ? -1 : 1; this->unk_19A = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->cylinder[0].base.atFlags &= ~AT_ON; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DAIOCTA_SINK); this->actionFunc = func_809BE4A4; @@ -688,7 +688,7 @@ void func_809BE4A4(EnBigokuta* this, PlayState* play) { void func_809BE518(EnBigokuta* this, PlayState* play) { if (Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y, 10.0f)) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; func_809BD3F8(this); } } @@ -789,7 +789,7 @@ void EnBigokuta_Update(Actor* thisx, PlayState* play2) { for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->cylinder[i].base); } - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; } else { for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->cylinder[i].base); diff --git a/soh/src/overlays/actors/ovl_En_Bili/z_en_bili.c b/soh/src/overlays/actors/ovl_En_Bili/z_en_bili.c index 971ac0f20..5d3cfd3bf 100644 --- a/soh/src/overlays/actors/ovl_En_Bili/z_en_bili.c +++ b/soh/src/overlays/actors/ovl_En_Bili/z_en_bili.c @@ -7,7 +7,7 @@ #include "z_en_bili.h" #include "objects/object_bl/object_bl.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_12 | ACTOR_FLAG_14) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_ARROW_DRAGGABLE) void EnBili_Init(Actor* thisx, PlayState* play); void EnBili_Destroy(Actor* thisx, PlayState* play); @@ -222,7 +222,7 @@ void EnBili_SetupBurnt(EnBili* this) { this->timer = 20; this->collider.base.atFlags &= ~AT_ON; this->collider.base.acFlags &= ~AC_ON; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actor.speedXZ = 0.0f; Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0x2000, 0x14); this->actionFunc = EnBili_Burnt; @@ -230,7 +230,7 @@ void EnBili_SetupBurnt(EnBili* this) { void EnBili_SetupDie(EnBili* this) { this->timer = 18; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnBili_Die; this->actor.speedXZ = 0.0f; gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BIRI]++; @@ -254,7 +254,7 @@ void EnBili_SetupFrozen(EnBili* this, PlayState* play) { s32 i; Vec3f effectPos; - if (!(this->actor.flags & ACTOR_FLAG_15)) { + if (!(this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW)) { this->actor.gravity = -1.0f; } @@ -459,7 +459,7 @@ void EnBili_Recoil(EnBili* this, PlayState* play) { void EnBili_Burnt(EnBili* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->actor.flags & ACTOR_FLAG_15) { + if (this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW) { this->actor.colorFilterTimer = 20; } else { if (this->timer != 0) { @@ -480,7 +480,7 @@ void EnBili_Die(EnBili* this, PlayState* play) { s32 i; if (this->actor.draw != NULL) { - if (this->actor.flags & ACTOR_FLAG_15) { + if (this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW) { return; } this->actor.draw = NULL; @@ -536,7 +536,7 @@ void EnBili_Frozen(EnBili* this, PlayState* play) { this->timer--; } - if (!(this->actor.flags & ACTOR_FLAG_15)) { + if (!(this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW)) { this->actor.gravity = -1.0f; } @@ -559,7 +559,7 @@ void EnBili_UpdateDamage(EnBili* this, PlayState* play) { if (Actor_ApplyDamage(&this->actor) == 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_BIRI_DEAD); Enemy_StartFinishingBlow(play, &this->actor); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } damageEffect = this->actor.colChkInfo.damageEffect; @@ -591,7 +591,7 @@ void EnBili_UpdateDamage(EnBili* this, PlayState* play) { } if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x1F820) { // DMG_ARROW - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } } } diff --git a/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index 825bc57c1..fafb55ca5 100644 --- a/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -7,7 +7,7 @@ #include "z_en_blkobj.h" #include "objects/object_blkobj/object_blkobj.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnBlkobj_Init(Actor* thisx, PlayState* play); void EnBlkobj_Destroy(Actor* thisx, PlayState* play); @@ -88,7 +88,7 @@ void EnBlkobj_Wait(EnBlkobj* this, PlayState* play) { } void EnBlkobj_SpawnDarkLink(EnBlkobj* this, PlayState* play) { - if (!(this->dyna.actor.flags & ACTOR_FLAG_6)) { + if (!(this->dyna.actor.flags & ACTOR_FLAG_ACTIVE)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_TORCH2, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, 0, this->dyna.actor.yawTowardsPlayer, 0, 0, true); diff --git a/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 5f77b4ece..7df89937b 100644 --- a/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "soh/Enhancements/game-interactor/GameInteractor.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnBom_Init(Actor* thisx, PlayState* play); void EnBom_Destroy(Actor* thisx, PlayState* play); @@ -183,7 +183,7 @@ void EnBom_Explode(EnBom* this, PlayState* play) { Player* player; if (this->explosionCollider.elements[0].dim.modelSphere.radius == 0) { - this->actor.flags |= ACTOR_FLAG_5; + this->actor.flags |= ACTOR_FLAG_DRAW_WHILE_CULLED; func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96); } @@ -344,7 +344,7 @@ void EnBom_Update(Actor* thisx, PlayState* play2) { Camera_AddQuake(&play->mainCamera, 2, 0xB, 8); thisx->params = BOMB_EXPLOSION; this->timer = 10; - thisx->flags |= ACTOR_FLAG_5; + thisx->flags |= ACTOR_FLAG_DRAW_WHILE_CULLED; EnBom_SetupAction(this, EnBom_Explode); } } diff --git a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index 75f27576b..ae9a4e8b3 100644 --- a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h" #include "objects/object_bg/object_bg.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_27) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_LOCKON) typedef enum { /* 0 */ CHU_GIRL_EYES_ASLEEP, diff --git a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c index eceec0c4f..116805c1a 100644 --- a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c +++ b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c @@ -3,7 +3,7 @@ #include "overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h" #include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnBomBowlPit_Init(Actor* thisx, PlayState* play); void EnBomBowlPit_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/soh/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index 7cf493115..02ff9140d 100644 --- a/soh/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/soh/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED #define BOMBCHU_SCALE 0.01f @@ -240,7 +240,7 @@ void EnBomChu_WaitForRelease(EnBomChu* this, PlayState* play) { //! @bug there is no NULL check on the floor poly. If the player is out of bounds the floor poly will be NULL //! and will cause a crash inside this function. EnBomChu_UpdateFloorPoly(this, this->actor.floorPoly, play); - this->actor.flags |= ACTOR_FLAG_0; // make chu targetable + this->actor.flags |= ACTOR_FLAG_TARGETABLE; // make chu targetable func_8002F850(play, &this->actor); this->actionFunc = EnBomChu_Move; } diff --git a/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 0938d0100..13b02c79c 100644 --- a/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -8,7 +8,7 @@ #include "objects/object_bombf/object_bombf.h" #include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnBombf_Init(Actor* thisx, PlayState* play); void EnBombf_Destroy(Actor* thisx, PlayState* play); @@ -105,7 +105,7 @@ void EnBombf_Init(Actor* thisx, PlayState* play) { thisx->focus.pos = thisx->world.pos; if (Actor_FindNearby(play, thisx, ACTOR_BG_DDAN_KD, ACTORCAT_BG, 10000.0f) != NULL) { - thisx->flags |= ACTOR_FLAG_5; + thisx->flags |= ACTOR_FLAG_DRAW_WHILE_CULLED; } thisx->colChkInfo.cylRadius = 10.0f; @@ -118,7 +118,7 @@ void EnBombf_Init(Actor* thisx, PlayState* play) { thisx->gravity = -1.5f; Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_EXPLOSIVE); thisx->colChkInfo.mass = 200; - thisx->flags &= ~ACTOR_FLAG_0; + thisx->flags &= ~ACTOR_FLAG_TARGETABLE; EnBombf_SetupAction(this, EnBombf_Move); } else { thisx->colChkInfo.mass = MASS_IMMOVABLE; @@ -158,7 +158,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) { this->timer = 180; this->flowerBombScale = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_PL_PULL_UP_ROCK); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else { player->actor.child = NULL; player->heldActor = NULL; @@ -177,7 +177,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) { bombFlower->unk_200 = 1; bombFlower->timer = 0; this->timer = 180; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->flowerBombScale = 0.0f; } } @@ -189,7 +189,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) { if (bombFlower != NULL) { bombFlower->timer = 100; this->timer = 180; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->flowerBombScale = 0.0f; } } else { @@ -209,7 +209,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) { if (this->timer == 0) { this->flowerBombScale += 0.05f; if (this->flowerBombScale >= 1.0f) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } } @@ -263,7 +263,7 @@ void EnBombf_Explode(EnBombf* this, PlayState* play) { Player* player; if (this->explosionCollider.elements[0].dim.modelSphere.radius == 0) { - this->actor.flags |= ACTOR_FLAG_5; + this->actor.flags |= ACTOR_FLAG_DRAW_WHILE_CULLED; func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96); } @@ -430,7 +430,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) { Camera_AddQuake(&play->mainCamera, 2, 0xB, 8); thisx->params = BOMBFLOWER_EXPLOSION; this->timer = 10; - thisx->flags |= ACTOR_FLAG_5; + thisx->flags |= ACTOR_FLAG_DRAW_WHILE_CULLED; EnBombf_SetupAction(this, EnBombf_Explode); } } diff --git a/soh/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/soh/src/overlays/actors/ovl_En_Boom/z_en_boom.c index 7342c01b3..dedb53d5b 100644 --- a/soh/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/soh/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -7,7 +7,7 @@ #include "z_en_boom.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnBoom_Init(Actor* thisx, PlayState* play); void EnBoom_Destroy(Actor* thisx, PlayState* play); @@ -161,7 +161,7 @@ void EnBoom_Fly(EnBoom* this, PlayState* play) { if (((this->collider.base.at->id == ACTOR_EN_ITEM00) || (this->collider.base.at->id == ACTOR_EN_SI))) { this->grabbed = this->collider.base.at; if (this->collider.base.at->id == ACTOR_EN_SI) { - this->collider.base.at->flags |= ACTOR_FLAG_13; + this->collider.base.at->flags |= ACTOR_FLAG_HOOKSHOT_ATTACHED; } } } @@ -184,11 +184,11 @@ void EnBoom_Fly(EnBoom* this, PlayState* play) { target->gravity = -0.9f; target->bgCheckFlags &= ~0x03; } else { - target->flags &= ~ACTOR_FLAG_13; + target->flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED; } } // Set player flags and kill the boomerang beacause Link caught it. - player->stateFlags1 &= ~PLAYER_STATE1_25; + player->stateFlags1 &= ~PLAYER_STATE1_THREW_BOOMERANG; player->boomerangQuickRecall = false; Actor_Kill(&this->actor); } diff --git a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c index 54ec3cf29..67938c0f1 100644 --- a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -151,7 +151,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) { EnBox_SetupAction(this, EnBox_FallOnSwitchFlag); this->alpha = 0; this->movementFlags |= ENBOX_MOVE_IMMOBILE; - this->dyna.actor.flags |= ACTOR_FLAG_4; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } else if ((this->type == ENBOX_TYPE_ROOM_CLEAR_BIG || this->type == ENBOX_TYPE_ROOM_CLEAR_SMALL) && !Flags_GetClear(play, this->dyna.actor.room)) { EnBox_SetupAction(this, EnBox_AppearOnRoomClear); @@ -159,25 +159,25 @@ void EnBox_Init(Actor* thisx, PlayState* play2) { this->movementFlags |= ENBOX_MOVE_IMMOBILE; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f; this->alpha = 0; - this->dyna.actor.flags |= ACTOR_FLAG_4; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } else if (this->type == ENBOX_TYPE_9 || this->type == ENBOX_TYPE_10) { EnBox_SetupAction(this, func_809C9700); - this->dyna.actor.flags |= ACTOR_FLAG_25; + this->dyna.actor.flags |= ACTOR_FLAG_NO_FREEZE_OCARINA; func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); this->movementFlags |= ENBOX_MOVE_IMMOBILE; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f; this->alpha = 0; - this->dyna.actor.flags |= ACTOR_FLAG_4; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } else if (this->type == ENBOX_TYPE_SWITCH_FLAG_BIG && !Flags_GetSwitch(play, this->switchFlag)) { EnBox_SetupAction(this, EnBox_AppearOnSwitchFlag); func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); this->movementFlags |= ENBOX_MOVE_IMMOBILE; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f; this->alpha = 0; - this->dyna.actor.flags |= ACTOR_FLAG_4; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } else { if (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6) { - this->dyna.actor.flags |= ACTOR_FLAG_7; + this->dyna.actor.flags |= ACTOR_FLAG_LENS; } EnBox_SetupAction(this, EnBox_WaitOpen); this->movementFlags |= ENBOX_MOVE_IMMOBILE; @@ -326,7 +326,7 @@ void func_809C9700(EnBox* this, PlayState* play) { } else if (this->unk_1FB == ENBOX_STATE_2 && play->msgCtx.ocarinaMode == OCARINA_MODE_04) { if ((play->msgCtx.lastPlayedSong == OCARINA_SONG_LULLABY && this->type == ENBOX_TYPE_9) || (play->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS && this->type == ENBOX_TYPE_10)) { - this->dyna.actor.flags &= ~ACTOR_FLAG_25; + this->dyna.actor.flags &= ~ACTOR_FLAG_NO_FREEZE_OCARINA; EnBox_SetupAction(this, EnBox_AppearInit); OnePointCutscene_Attention(play, &this->dyna.actor); this->unk_1A8 = 0; @@ -519,7 +519,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) { void EnBox_Open(EnBox* this, PlayState* play) { u16 sfxId; - this->dyna.actor.flags &= ~ACTOR_FLAG_7; + this->dyna.actor.flags &= ~ACTOR_FLAG_LENS; if (SkelAnime_Update(&this->skelanime)) { if (this->unk_1F4 > 0) { @@ -916,11 +916,11 @@ void EnBox_Draw(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); /* - this->dyna.actor.flags & ACTOR_FLAG_7 is set by Init (if type is 4 or 6) + this->dyna.actor.flags & ACTOR_FLAG_LENS is set by Init (if type is 4 or 6) and cleared by Open */ if ((this->alpha == 255 && !(this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6)) || - (!CHECK_FLAG_ALL(this->dyna.actor.flags, ACTOR_FLAG_7) && + (!CHECK_FLAG_ALL(this->dyna.actor.flags, ACTOR_FLAG_LENS) && (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6))) { gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); diff --git a/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c index 78607e0fe..cf4a2db89 100644 --- a/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c +++ b/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c @@ -7,7 +7,7 @@ #include "z_en_brob.h" #include "objects/object_brob/object_brob.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) void EnBrob_Init(Actor* thisx, PlayState* play); void EnBrob_Destroy(Actor* thisx, PlayState* play); @@ -92,7 +92,7 @@ void EnBrob_Init(Actor* thisx, PlayState* play) { this->colliders[1].dim.height *= thisx->scale.y; this->colliders[1].dim.yShift *= thisx->scale.y; this->actionFunc = NULL; - thisx->flags &= ~ACTOR_FLAG_0; + thisx->flags &= ~ACTOR_FLAG_TARGETABLE; func_809CADDC(this, play); } diff --git a/soh/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c b/soh/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c index be4db9d4d..cd3c522e3 100644 --- a/soh/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c +++ b/soh/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c @@ -1,7 +1,7 @@ #include "z_en_bubble.h" #include "objects/object_bubble/object_bubble.h" -#define FLAGS ACTOR_FLAG_0 +#define FLAGS ACTOR_FLAG_TARGETABLE void EnBubble_Init(Actor* thisx, PlayState* play); void EnBubble_Destroy(Actor* thisx, PlayState* play); @@ -79,7 +79,7 @@ void EnBubble_SetDimensions(EnBubble* this, f32 dim) { f32 c; f32 d; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; Actor_SetScale(&this->actor, 1.0f); this->actor.shape.yOffset = 16.0f; this->graphicRotSpeed = 16.0f; @@ -148,7 +148,7 @@ s32 EnBubble_Explosion(EnBubble* this, PlayState* play) { &sEffectEnvColor, Rand_S16Offset(100, 50), 0x19, 0); } Item_DropCollectibleRandom(play, NULL, &this->actor.world.pos, 0x50); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; return Rand_S16Offset(90, 60); } diff --git a/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c index a775137f4..fc24b595d 100644 --- a/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -352,7 +352,7 @@ void EnButte_FollowLink(EnButte* this, PlayState* play) { void EnButte_SetupTransformIntoFairy(EnButte* this) { this->timer = 9; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->skelAnime.playSpeed = 1.0f; EnButte_ResetTransformationEffect(); this->actionFunc = EnButte_TransformIntoFairy; diff --git a/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c index 3b7155b5e..a480fd51a 100644 --- a/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_bw/object_bw.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnBw_Init(Actor* thisx, PlayState* play); void EnBw_Destroy(Actor* thisx, PlayState* play); @@ -432,7 +432,7 @@ void func_809CF8F0(EnBw* this) { this->unk_222 = 1000; this->actor.velocity.y = 11.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP); - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; EnBw_SetupAction(this, func_809CF984); } @@ -462,7 +462,7 @@ void func_809CF984(EnBw* this, PlayState* play) { } Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 30.0f, 11, 4.0f, 0, 0, false); this->unk_222 = 3000; - this->actor.flags &= ~ACTOR_FLAG_24; + this->actor.flags &= ~ACTOR_FLAG_PLAY_HIT_SFX; this->actor.speedXZ = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND); EnBw_SetupAction(this, func_809CE884); @@ -573,7 +573,7 @@ void func_809CFF98(EnBw* this, PlayState* play) { void func_809D00F4(EnBw* this) { this->unk_220 = 0; this->unk_222 = 40; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_BUBLEWALK_DEAD); EnBw_SetupAction(this, func_809D014C); diff --git a/soh/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/soh/src/overlays/actors/ovl_En_Bx/z_en_bx.c index e83969c5f..626ca53bc 100644 --- a/soh/src/overlays/actors/ovl_En_Bx/z_en_bx.c +++ b/soh/src/overlays/actors/ovl_En_Bx/z_en_bx.c @@ -8,7 +8,7 @@ #include "objects/object_bxa/object_bxa.h" #include "soh/frame_interpolation.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnBx_Init(Actor* thisx, PlayState* play); void EnBx_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Changer/z_en_changer.c b/soh/src/overlays/actors/ovl_En_Changer/z_en_changer.c index 76bd9ef0f..dc5202bd2 100644 --- a/soh/src/overlays/actors/ovl_En_Changer/z_en_changer.c +++ b/soh/src/overlays/actors/ovl_En_Changer/z_en_changer.c @@ -201,7 +201,7 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) { ((this->rightChestNum & 0x1F) << 8) + (rightChestItem & 0xFF), true); } - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnChanger_Wait; } diff --git a/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index 62e991d38..fd705855b 100644 --- a/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -4,7 +4,7 @@ #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnClearTag_Init(Actor* thisx, PlayState* play); void EnClearTag_Destroy(Actor* thisx, PlayState* play); @@ -265,7 +265,7 @@ void EnClearTag_Init(Actor* thisx, PlayState* play) { Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_ENEMY); } - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.targetMode = 5; Collider_SetCylinder(play, &this->collider, &this->actor, &sArwingCylinderInit); this->actor.colChkInfo.health = 3; @@ -552,7 +552,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) { if (this->drawMode != CLEAR_TAG_DRAW_MODE_ARWING) { this->drawMode = CLEAR_TAG_DRAW_MODE_EFFECT; this->deathTimer = 70; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else { Actor_Kill(&this->actor); } diff --git a/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c index b9e0136f1..c97a54760 100644 --- a/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -7,7 +7,7 @@ #include "z_en_cow.h" #include "objects/object_cow/object_cow.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnCow_Init(Actor* thisx, PlayState* play); void EnCow_Destroy(Actor* thisx, PlayState* play); @@ -146,7 +146,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) { this->actor.draw = func_809E0070; this->actionFunc = func_809DFA84; func_809DEF94(this); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unk_278 = ((u32)(Rand_ZeroFloat(1000.0f)) & 0xFFFF) + 40.0f; break; } @@ -203,7 +203,7 @@ void func_809DF494(EnCow* this, PlayState* play) { void func_809DF6BC(EnCow* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; Message_CloseTextbox(play); this->actionFunc = func_809DF96C; } @@ -211,7 +211,7 @@ void func_809DF6BC(EnCow* this, PlayState* play) { void func_809DF730(EnCow* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; this->actionFunc = func_809DF96C; } } @@ -251,7 +251,7 @@ void func_809DF778(EnCow* this, PlayState* play) { void func_809DF7D8(EnCow* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; Message_CloseTextbox(play); this->actionFunc = func_809DF778; func_8002F434(&this->actor, play, GI_MILK, 10000.0f, 100.0f); @@ -274,7 +274,7 @@ void func_809DF8FC(EnCow* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, play)) { this->actionFunc = func_809DF870; } else { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; func_8002F2CC(&this->actor, play, 170.0f); this->actor.textId = 0x2006; } @@ -322,7 +322,7 @@ void func_809DF96C(EnCow* this, PlayState* play) { return; } this->actionFunc = func_809DF8FC; - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; func_8002F2CC(&this->actor, play, 170.0f); this->actor.textId = 0x2006; } else { diff --git a/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c index 6598406ce..bd0ba257b 100644 --- a/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -1,7 +1,7 @@ #include "z_en_crow.h" #include "objects/object_crow/object_crow.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_12 | ACTOR_FLAG_14) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_ARROW_DRAGGABLE) void EnCrow_Init(Actor* thisx, PlayState* play); void EnCrow_Destroy(Actor* thisx, PlayState* play); @@ -178,12 +178,12 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40); } - if (this->actor.flags & ACTOR_FLAG_15) { + if (this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW) { this->actor.speedXZ = 0.0f; } this->collider.base.acFlags &= ~AC_ON; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actionFunc = EnCrow_Damaged; } @@ -332,7 +332,7 @@ void EnCrow_Damaged(EnCrow* this, PlayState* play) { Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); this->actor.colorFilterTimer = 40; - if (!(this->actor.flags & ACTOR_FLAG_15)) { + if (!(this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW)) { if (this->actor.colorFilterParams & 0x4000) { Math_ScaledStepToS(&this->actor.shape.rot.x, 0x4000, 0x200); this->actor.shape.rot.z += 0x1780; @@ -407,8 +407,8 @@ void EnCrow_Respawn(EnCrow* this, PlayState* play) { target = 0.01f; } if (Math_StepToF(&this->actor.scale.x, target, target * 0.1f)) { - this->actor.flags |= ACTOR_FLAG_0; - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actor.colChkInfo.health = 1; EnCrow_SetupFlyIdle(this); } @@ -425,7 +425,7 @@ void EnCrow_UpdateDamage(EnCrow* this, PlayState* play) { EnCrow_SetupTurnAway(this); } else { Actor_ApplyDamage(&this->actor); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Enemy_StartFinishingBlow(play, &this->actor); EnCrow_SetupDamaged(this, play); } diff --git a/soh/src/overlays/actors/ovl_En_Cs/z_en_cs.c b/soh/src/overlays/actors/ovl_En_Cs/z_en_cs.c index a3006daec..1990d2b3b 100644 --- a/soh/src/overlays/actors/ovl_En_Cs/z_en_cs.c +++ b/soh/src/overlays/actors/ovl_En_Cs/z_en_cs.c @@ -2,7 +2,7 @@ #include "objects/object_cs/object_cs.h" #include "objects/object_link_child/object_link_child.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnCs_Init(Actor* thisx, PlayState* play); void EnCs_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 635f77e41..57d2ec604 100644 --- a/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_GeldB/z_en_geldb.h" #include "objects/object_daiku/object_daiku.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) typedef struct { Vec3f eyePosDeltaLocal; @@ -370,7 +370,7 @@ void EnDaiku_Jailed(EnDaiku* this, PlayState* play) { this->actionFunc = EnDaiku_WaitFreedom; } else if (!(this->stateFlags & ENDAIKU_STATEFLAG_GERUDOFIGHTING) && !gerudo->invisible) { this->stateFlags |= ENDAIKU_STATEFLAG_GERUDOFIGHTING; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); } } @@ -382,7 +382,7 @@ void EnDaiku_WaitFreedom(EnDaiku* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (Flags_GetSwitch(play, this->actor.params >> 8 & 0x3F)) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; EnDaiku_UpdateText(this, play); } } diff --git a/soh/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/soh/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c index e098051c7..115a7e086 100644 --- a/soh/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c +++ b/soh/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c @@ -7,7 +7,7 @@ #include "z_en_daiku_kakariko.h" #include "objects/object_daiku/object_daiku.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) typedef enum { /* 0x0 */ CARPENTER_ICHIRO, // Red and purple pants, normal hair diff --git a/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c index 9f1658ed9..5d4ee5020 100644 --- a/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -3,7 +3,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) void EnDekubaba_Init(Actor* thisx, PlayState* play); void EnDekubaba_Destroy(Actor* thisx, PlayState* play); @@ -406,7 +406,7 @@ void EnDekubaba_SetupPrunedSomersault(EnDekubaba* this) { this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; this->collider.base.acFlags &= ~AC_ON; this->actor.speedXZ = this->size * 3.0f; - this->actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED; this->actionFunc = EnDekubaba_PrunedSomersault; if (this->actor.params == DEKUBABA_BIG) { @@ -471,7 +471,7 @@ void EnDekubaba_SetupDeadStickDrop(EnDekubaba* this, PlayState* play) { this->actor.velocity.y = 0.0f; this->actor.shape.shadowScale = 3.0f; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_MISC); - this->actor.flags &= ~ACTOR_FLAG_5; + this->actor.flags &= ~ACTOR_FLAG_DRAW_WHILE_CULLED; this->timer = 200; this->actionFunc = EnDekubaba_DeadStickDrop; } @@ -970,7 +970,7 @@ void EnDekubaba_PrunedSomersault(EnDekubaba* this, PlayState* play) { if ((this->actor.scale.x > 0.005f) && ((this->actor.bgCheckFlags & 2) || (this->actor.bgCheckFlags & 8))) { this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 0.0f; this->actor.speedXZ = 0.0f; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, this->size * 3.0f, 0, this->size * 12.0f, this->size * 5.0f, 15, HAHEN_OBJECT_DEFAULT, 10, NULL); } @@ -1146,7 +1146,7 @@ void EnDekubaba_Update(Actor* thisx, PlayState* play) { } if (this->actionFunc == EnDekubaba_Lunge) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; } if (this->collider.base.acFlags & AC_ON) { diff --git a/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c index 86daf5187..48a666195 100644 --- a/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -8,7 +8,7 @@ #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" #include "objects/object_dekunuts/object_dekunuts.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) #define DEKUNUTS_FLOWER 10 @@ -112,7 +112,7 @@ void EnDekunuts_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); if (thisx->params == DEKUNUTS_FLOWER) { - thisx->flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + thisx->flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); } else { ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 35.0f); SkelAnime_Init(play, &this->skelAnime, &gDekuNutsSkel, &gDekuNutsStandAnim, this->jointTable, diff --git a/soh/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/soh/src/overlays/actors/ovl_En_Dh/z_en_dh.c index b64d327a9..3daf7b11b 100644 --- a/soh/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/soh/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -1,7 +1,7 @@ #include "z_en_dh.h" #include "objects/object_dh/object_dh.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT) typedef enum { /* 0 */ DH_WAIT, @@ -149,7 +149,7 @@ void EnDh_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.mass = MASS_HEAVY; this->actor.colChkInfo.health = LINK_IS_ADULT ? 14 : 20; this->alpha = this->unk_258 = 255; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Collider_InitCylinder(play, &this->collider1); Collider_SetCylinder(play, &this->collider1, &this->actor, &sCylinderInit); Collider_InitJntSph(play, &this->collider2); @@ -195,7 +195,7 @@ void EnDh_SetupWait(EnDh* this) { this->actor.shape.yOffset = -15000.0f; this->dirtWaveSpread = this->actor.speedXZ = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_LENS; this->dirtWavePhase = this->actionState = this->actor.params = ENDH_WAIT_UNDERGROUND; EnDh_SetupAction(this, EnDh_Wait); } @@ -210,9 +210,9 @@ void EnDh_Wait(EnDh* this, PlayState* play) { if ((this->actor.params >= ENDH_START_ATTACK_GRAB) || (this->actor.params <= ENDH_HANDS_KILLED_4)) { switch (this->actionState) { case 0: - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; - this->actor.flags &= ~ACTOR_FLAG_7; + this->actor.flags &= ~ACTOR_FLAG_LENS; this->actionState++; this->drawDirtWave++; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_HIDE); @@ -366,7 +366,7 @@ void EnDh_SetupBurrow(EnDh* this) { this->actor.world.rot.y = this->actor.shape.rot.y; this->dirtWavePhase = 0; this->actionState = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_HIDE); EnDh_SetupAction(this, EnDh_Burrow); } @@ -436,7 +436,7 @@ void EnDh_SetupDeath(EnDh* this) { Animation_MorphToPlayOnce(&this->skelAnime, &object_dh_Anim_0032BC, -1.0f); this->curAction = DH_DEATH; this->timer = 300; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 0.0f; func_800F5B58(); this->actor.params = ENDH_DEATH; diff --git a/soh/src/overlays/actors/ovl_En_Dha/z_en_dha.c b/soh/src/overlays/actors/ovl_En_Dha/z_en_dha.c index 090bac2d2..f485cf3d9 100644 --- a/soh/src/overlays/actors/ovl_En_Dha/z_en_dha.c +++ b/soh/src/overlays/actors/ovl_En_Dha/z_en_dha.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Dh/z_en_dh.h" #include "objects/object_dh/object_dh.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnDha_Init(Actor* thisx, PlayState* play); void EnDha_Destroy(Actor* thisx, PlayState* play); @@ -167,7 +167,7 @@ void EnDha_Init(Actor* thisx, PlayState* play) { this->limbAngleX[0] = -0x4000; Collider_InitJntSph(play, &this->collider); Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItem); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnDha_SetupWait(this); } diff --git a/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index a54b87e7b..e5afb02d0 100644 --- a/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -9,7 +9,7 @@ #include "objects/object_zo/object_zo.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnDivingGame_Init(Actor* thisx, PlayState* play); void EnDivingGame_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c index 3942e3b2f..3143eeea3 100644 --- a/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -8,7 +8,7 @@ #include "objects/object_shopnuts/object_shopnuts.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnDns_Init(Actor* thisx, PlayState* play); void EnDns_Destroy(Actor* thisx, PlayState* play); @@ -368,9 +368,9 @@ void EnDns_Wait(EnDns* this, PlayState* play) { this->actionFunc = EnDns_Talk; } else { if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isTargeted) { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; } else { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } if (this->actor.xzDistToPlayer < 130.0f) { func_8002F2F4(&this->actor, play); @@ -464,7 +464,7 @@ void func_809EFF98(EnDns* this, PlayState* play) { this->dnsItemEntry->setRupeesAndFlags(this); this->dropCollectible = 1; this->maintainCollider = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnDns_ChangeAnim(this, ENDNS_ANIM_1); this->actionFunc = EnDns_SetupBurrow; } @@ -472,7 +472,7 @@ void func_809EFF98(EnDns* this, PlayState* play) { this->dnsItemEntry->setRupeesAndFlags(this); this->dropCollectible = 1; this->maintainCollider = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnDns_ChangeAnim(this, ENDNS_ANIM_1); this->actionFunc = EnDns_SetupBurrow; } @@ -481,7 +481,7 @@ void func_809EFF98(EnDns* this, PlayState* play) { void func_809F008C(EnDns* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { this->maintainCollider = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnDns_ChangeAnim(this, ENDNS_ANIM_1); this->actionFunc = EnDns_SetupBurrow; } diff --git a/soh/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c b/soh/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c index 07c3ead6e..a10d43d46 100644 --- a/soh/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c +++ b/soh/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c @@ -99,7 +99,7 @@ void EnDntDemo_Init(Actor* thisx, PlayState* play2) { osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ じじじじじじじじじじい ☆☆☆☆☆ %x\n" VT_RST, this->leader); } this->subCamera = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnDntDemo_Judge; } diff --git a/soh/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c b/soh/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c index 6a0d204bf..24d1129d1 100644 --- a/soh/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c +++ b/soh/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c @@ -10,7 +10,7 @@ #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnDntJiji_Init(Actor* thisx, PlayState* play); void EnDntJiji_Destroy(Actor* thisx, PlayState* play); @@ -84,7 +84,7 @@ void EnDntJiji_Init(Actor* thisx, PlayState* play) { osSyncPrintf("\n\n"); // "Deku Scrub mask show elder" osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ デグナッツお面品評会長老 ☆☆☆☆☆ %x\n" VT_RST, this->stage); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.colChkInfo.mass = 0xFF; this->actor.targetMode = 6; this->actionFunc = EnDntJiji_SetFlower; @@ -225,7 +225,7 @@ void EnDntJiji_SetupCower(EnDntJiji* this, PlayState* play) { } else { this->getItemId = GI_NUT_UPGRADE_40; } - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.textId = 0x10DB; this->unused = 5; this->actionFunc = EnDntJiji_Cower; @@ -306,7 +306,7 @@ void EnDntJiji_GivePrize(EnDntJiji* this, PlayState* play) { this->stage->leaderSignal = DNT_SIGNAL_RETURN; } } - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (!this->unburrow) { this->actionFunc = EnDntJiji_SetupHide; } else { diff --git a/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index 5f05992ca..b7b32f6b2 100644 --- a/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -13,7 +13,7 @@ #include "objects/object_hintnuts/object_hintnuts.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnDntNomal_Init(Actor* thisx, PlayState* play); void EnDntNomal_Destroy(Actor* thisx, PlayState* play); @@ -123,7 +123,7 @@ void EnDntNomal_Init(Actor* thisx, PlayState* play) { if (this->type < ENDNTNOMAL_TARGET) { this->type = ENDNTNOMAL_TARGET; } - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.colChkInfo.mass = 0xFF; this->objId = -1; if (this->type == ENDNTNOMAL_TARGET) { diff --git a/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c b/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c index 62c83a231..d45bd8c9b 100644 --- a/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c +++ b/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "objects/object_dodojr/object_dodojr.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) void EnDodojr_Init(Actor* thisx, PlayState* play); void EnDodojr_Destroy(Actor* thisx, PlayState* play); @@ -77,7 +77,7 @@ void EnDodojr_Init(Actor* thisx, PlayState* play) { CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(4), &sColChkInit); this->actor.naviEnemyId = 0xE; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Actor_SetScale(&this->actor, 0.02f); @@ -207,7 +207,7 @@ void func_809F6B38(EnDodojr* this) { void func_809F6BBC(EnDodojr* this) { this->actor.shape.shadowDraw = NULL; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.home.pos = this->actor.world.pos; this->actor.speedXZ = 0.0f; this->actor.gravity = -0.8f; @@ -319,7 +319,7 @@ s32 func_809F706C(EnDodojr* this) { void func_809F709C(EnDodojr* this) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_DEAD); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; func_809F6A20(this); this->actionFunc = func_809F7AB8; } @@ -404,7 +404,7 @@ void func_809F73AC(EnDodojr* this, PlayState* play) { -10.0f); Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_UP); this->actor.world.pos.y -= 60.0f; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.world.rot.x -= 0x4000; this->actor.shape.rot.x = this->actor.world.rot.x; this->dustPos = this->actor.world.pos; @@ -480,7 +480,7 @@ void func_809F768C(EnDodojr* this, PlayState* play) { void func_809F773C(EnDodojr* this, PlayState* play) { if (DECR(this->timer3) == 0) { func_809F64D0(this); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; func_809F6A20(this); this->actionFunc = func_809F77AC; } @@ -536,7 +536,7 @@ void func_809F78EC(EnDodojr* this, PlayState* play) { } void func_809F799C(EnDodojr* this, PlayState* play) { - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; func_8002D868(&this->actor); if (func_809F68B0(this, play) != 0) { diff --git a/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index f6b0939e1..faefacd48 100644 --- a/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -3,7 +3,7 @@ #include "overlays/actors/ovl_En_Bombf/z_en_bombf.h" #include "objects/object_dodongo/object_dodongo.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) typedef enum { DODONGO_SWEEP_TAIL, @@ -565,12 +565,12 @@ void EnDodongo_Walk(EnDodongo* this, PlayState* play) { if (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < 400.0f) { Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x1F4, 0); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; if ((this->actor.xzDistToPlayer < 100.0f) && (yawDiff < 0x1388) && (this->actor.yDistToPlayer < 60.0f)) { EnDodongo_SetupBreatheFire(this); } } else { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if ((Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) > 150.0f) || (this->retreatTimer != 0)) { s16 yawToHome = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos); @@ -665,7 +665,7 @@ void EnDodongo_SetupDeath(EnDodongo* this, PlayState* play) { this->timer = 0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_DEAD); this->actionState = DODONGO_DEATH; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 0.0f; EnDodongo_SetupAction(this, EnDodongo_Death); gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DODONGO]++; diff --git a/soh/src/overlays/actors/ovl_En_Door/z_en_door.c b/soh/src/overlays/actors/ovl_En_Door/z_en_door.c index 2e830f250..1f82a797a 100644 --- a/soh/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/soh/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -11,7 +11,7 @@ #include "objects/object_mizu_objects/object_mizu_objects.h" #include "objects/object_haka_door/object_haka_door.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED #define DOOR_AJAR_SLAM_RANGE 120.0f #define DOOR_AJAR_OPEN_RANGE (2 * DOOR_AJAR_SLAM_RANGE) @@ -152,7 +152,7 @@ void EnDoor_SetupType(EnDoor* this, PlayState* play) { if (Object_IsLoaded(&play->objectCtx, this->requiredObjBankIndex)) { doorType = this->actor.params >> 7 & 7; - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actor.objBankIndex = this->requiredObjBankIndex; this->actionFunc = EnDoor_Idle; if (doorType == DOOR_EVENING) { @@ -179,7 +179,7 @@ void EnDoor_SetupType(EnDoor* this, PlayState* play) { doorType = DOOR_SCENEEXIT; } else { this->actionFunc = EnDoor_WaitForCheck; - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_27; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_NO_LOCKON; } } // Replace the door type it was loaded with by the new type diff --git a/soh/src/overlays/actors/ovl_En_Ds/z_en_ds.c b/soh/src/overlays/actors/ovl_En_Ds/z_en_ds.c index cebceaf9e..e8b1cf673 100644 --- a/soh/src/overlays/actors/ovl_En_Ds/z_en_ds.c +++ b/soh/src/overlays/actors/ovl_En_Ds/z_en_ds.c @@ -8,7 +8,7 @@ #include "objects/object_ds/object_ds.h" #include "soh/Enhancements/randomizer/adult_trade_shuffle.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnDs_Init(Actor* thisx, PlayState* play); void EnDs_Destroy(Actor* thisx, PlayState* play); @@ -45,7 +45,7 @@ void EnDs_Init(Actor* thisx, PlayState* play) { this->actionFunc = EnDs_Wait; this->actor.targetMode = 1; this->unk_1E8 = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unk_1E4 = 0.0f; } @@ -58,7 +58,7 @@ void EnDs_Destroy(Actor* thisx, PlayState* play) { void EnDs_Talk(EnDs* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { this->actionFunc = EnDs_Wait; - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } this->unk_1E8 |= 1; } @@ -75,7 +75,7 @@ void EnDs_TalkAfterGiveOddPotion(EnDs* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, play)) { this->actionFunc = EnDs_Talk; } else { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; func_8002F2CC(&this->actor, play, 1000.0f); } } @@ -84,7 +84,7 @@ void EnDs_DisplayOddPotionText(EnDs* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { this->actor.textId = 0x504F; this->actionFunc = EnDs_TalkAfterGiveOddPotion; - this->actor.flags &= ~ACTOR_FLAG_8; + this->actor.flags &= ~ACTOR_FLAG_PLAYER_TALKED_TO; gSaveContext.itemGetInf[3] |= 1; } } @@ -223,7 +223,7 @@ void EnDs_OfferBluePotion(EnDs* this, PlayState* play) { return; case 2: // have 100 rupees and empty bottle Rupees_ChangeBy(-100); - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; GetItemEntry itemEntry; if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF && diff --git a/soh/src/overlays/actors/ovl_En_Du/z_en_du.c b/soh/src/overlays/actors/ovl_En_Du/z_en_du.c index 235f9b896..51a40c5ec 100644 --- a/soh/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/soh/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -2,7 +2,7 @@ #include "objects/object_du/object_du.h" #include "scenes/overworld/spot18/spot18_scene.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnDu_Init(Actor* thisx, PlayState* play); void EnDu_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/soh/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c index fbdbe0a9c..7018da6ca 100644 --- a/soh/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c +++ b/soh/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c @@ -8,7 +8,7 @@ #include "objects/object_dy_obj/object_dy_obj.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnDyExtra_Init(Actor* thisx, PlayState* play); void EnDyExtra_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Eg/z_en_eg.c b/soh/src/overlays/actors/ovl_En_Eg/z_en_eg.c index e950b9db3..612e2e698 100644 --- a/soh/src/overlays/actors/ovl_En_Eg/z_en_eg.c +++ b/soh/src/overlays/actors/ovl_En_Eg/z_en_eg.c @@ -7,7 +7,7 @@ #include "z_en_eg.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnEg_Init(Actor* thisx, PlayState* play); void EnEg_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c b/soh/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c index 7690dfaf5..1e0b32967 100644 --- a/soh/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c +++ b/soh/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c @@ -1,7 +1,7 @@ #include "z_en_eiyer.h" #include "objects/object_ei/object_ei.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) void EnEiyer_Init(Actor* thisx, PlayState* play); void EnEiyer_Destroy(Actor* thisx, PlayState* play); @@ -204,7 +204,7 @@ void EnEiyer_SetupAppearFromGround(EnEiyer* this) { this->collider.base.atFlags &= ~AT_ON; this->collider.base.acFlags &= ~AC_ON; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_12); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_IGNORE_QUAKE); this->actor.shape.shadowScale = 0.0f; this->actor.shape.yOffset = 0.0f; this->actionFunc = EnEiyer_AppearFromGround; @@ -219,12 +219,12 @@ void EnEiyer_SetupUnderground(EnEiyer* this) { } this->collider.base.acFlags |= AC_ON; - this->actor.flags &= ~ACTOR_FLAG_4; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } void EnEiyer_SetupInactive(EnEiyer* this) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = EnEiyer_Inactive; } @@ -235,7 +235,7 @@ void EnEiyer_SetupAmbush(EnEiyer* this, PlayState* play) { this->collider.info.bumper.dmgFlags = ~0x00300000; this->basePos = this->actor.world.pos; this->actor.world.rot.y = this->actor.shape.rot.y; - this->actor.flags |= ACTOR_FLAG_12; + this->actor.flags |= ACTOR_FLAG_IGNORE_QUAKE; this->collider.base.acFlags &= ~AC_ON; this->actor.shape.shadowScale = 65.0f; this->actor.shape.yOffset = 600.0f; @@ -269,7 +269,7 @@ void EnEiyer_SetupDiveAttack(EnEiyer* this, PlayState* play) { void EnEiyer_SetupLand(EnEiyer* this) { Animation_MorphToPlayOnce(&this->skelanime, &gStingerDiveAnim, -3.0f); this->collider.base.atFlags &= ~AT_ON; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; // Update BgCheck info, play sound, and spawn effect on the first frame of the land action this->timer = -1; @@ -612,7 +612,7 @@ void EnEiyer_UpdateDamage(EnEiyer* this, PlayState* play) { if (Actor_ApplyDamage(&this->actor) == 0) { Enemy_StartFinishingBlow(play, &this->actor); Audio_PlayActorSound2(&this->actor, NA_SE_EN_EIER_DEAD); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_STINGER]++; } @@ -676,7 +676,7 @@ void EnEiyer_Update(Actor* thisx, PlayState* play) { } } - if (this->actor.flags & ACTOR_FLAG_0) { + if (this->actor.flags & ACTOR_FLAG_TARGETABLE) { this->actor.focus.pos.x = this->actor.world.pos.x + Math_SinS(this->actor.shape.rot.y) * 12.5f; this->actor.focus.pos.z = this->actor.world.pos.z + Math_CosS(this->actor.shape.rot.y) * 12.5f; this->actor.focus.pos.y = this->actor.world.pos.y; diff --git a/soh/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/soh/src/overlays/actors/ovl_En_Elf/z_en_elf.c index 7911cbddd..a2825514c 100644 --- a/soh/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/soh/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -7,7 +7,7 @@ #include "z_en_elf.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) #define FAIRY_FLAG_TIMED (1 << 8) #define FAIRY_FLAG_BIG (1 << 9) @@ -1394,7 +1394,7 @@ void func_80A053F0(Actor* thisx, PlayState* play) { } } else if (player->naviTextId < 0) { // trigger dialog instantly for negative message IDs - thisx->flags |= ACTOR_FLAG_16; + thisx->flags |= ACTOR_FLAG_WILL_TALK; } if (Actor_ProcessTalkRequest(thisx, play)) { @@ -1412,10 +1412,10 @@ void func_80A053F0(Actor* thisx, PlayState* play) { func_80A01C38(this, 3); if (this->elfMsg != NULL) { - this->elfMsg->actor.flags |= ACTOR_FLAG_8; + this->elfMsg->actor.flags |= ACTOR_FLAG_PLAYER_TALKED_TO; } - thisx->flags &= ~ACTOR_FLAG_16; + thisx->flags &= ~ACTOR_FLAG_WILL_TALK; } else { this->actionFunc(this, play); thisx->shape.rot.y = this->unk_2BC; diff --git a/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c index 263f9d80f..8834bdcd1 100644 --- a/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -2,7 +2,7 @@ #include "vt.h" #include "overlays/actors/ovl_En_Tite/z_en_tite.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_27) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_LOCKON) void EnEncount1_Init(Actor* thisx, PlayState* play); void EnEncount1_Update(Actor* thisx, PlayState* play); @@ -65,7 +65,7 @@ void EnEncount1_Init(Actor* thisx, PlayState* play) { osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発生チェック範囲 ☆☆☆☆☆ %f\n" VT_RST, this->spawnRange); osSyncPrintf("\n\n"); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; switch (this->spawnType) { case SPAWNER_LEEVER: this->timer = 30; diff --git a/soh/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c b/soh/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c index ca6713870..972b60afb 100644 --- a/soh/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c +++ b/soh/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c @@ -4,7 +4,7 @@ #include "objects/object_efc_star_field/object_efc_star_field.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) typedef enum { /* 0x0 */ ENCOUNT2_INACTIVE, diff --git a/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c index 81ad6df5e..ccf163e3a 100644 --- a/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c +++ b/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnExItem_Init(Actor* thisx, PlayState* play); void EnExItem_Destroy(Actor* thisx, PlayState* play); @@ -52,7 +52,7 @@ void EnExItem_Init(Actor* thisx, PlayState* play) { s32 pad; EnExItem* this = (EnExItem*)thisx; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->type = this->actor.params & 0xFF; this->unusedParam = (this->actor.params >> 8) & 0xFF; osSyncPrintf("\n\n"); @@ -403,7 +403,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) { func_8002DF54(play, NULL, 7); this->actor.parent = NULL; if (gSaveContext.n64ddFlag) { - GET_PLAYER(play)->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_11); + GET_PLAYER(play)->stateFlags1 &= ~(PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD); getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_TARGET_IN_WOODS, GI_BULLET_BAG_50); getItemId = getItemEntry.getItemId; } else { diff --git a/soh/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c b/soh/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c index 6c921a17a..b816a1e2e 100644 --- a/soh/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c +++ b/soh/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c @@ -3,7 +3,7 @@ #include "../ovl_En_Diving_Game/z_en_diving_game.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnExRuppy_Init(Actor* thisx, PlayState* play); void EnExRuppy_Destroy(Actor* thisx, PlayState* play); @@ -115,7 +115,7 @@ void EnExRuppy_Init(Actor* thisx, PlayState* play) { this->unk_15A = this->actor.world.rot.z; this->actor.world.rot.z = 0; this->timer = 30; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnExRuppy_DropIntoWater; break; @@ -146,7 +146,7 @@ void EnExRuppy_Init(Actor* thisx, PlayState* play) { this->actor.shape.shadowScale = 6.0f; this->actor.shape.yOffset = 700.0f; } - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnExRuppy_WaitToBlowUp; break; @@ -177,13 +177,13 @@ void EnExRuppy_Init(Actor* thisx, PlayState* play) { this->actor.shape.yOffset = 700.0f; this->actor.shape.shadowScale = 6.0f; } - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnExRuppy_WaitAsCollectible; break; case 4: // Progress markers in the shooting gallery this->actor.gravity = -3.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (CVarGetInteger("gNewDrops", 0) !=0) { Actor_SetScale(&this->actor, 0.3f); this->actor.shape.shadowScale = 0.3f; diff --git a/soh/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/soh/src/overlays/actors/ovl_En_Fd/z_en_fd.c index 39988998f..b3a16b5c6 100644 --- a/soh/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/soh/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -9,7 +9,7 @@ #include "objects/object_fw/object_fw.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_9) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_HOOKSHOT_DRAGS) #define FLG_COREDEAD (0x4000) #define FLG_COREDONE (0x8000) @@ -226,7 +226,7 @@ s32 EnFd_SpawnCore(EnFd* this, PlayState* play) { this->actor.child->colChkInfo.health = 8; } - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { func_8002DE04(play, &this->actor, this->actor.child); } @@ -294,7 +294,7 @@ s32 EnFd_ColliderCheck(EnFd* this, PlayState* play) { return false; } this->invincibilityTimer = 30; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLAME_DAMAGE); Enemy_StartFinishingBlow(play, &this->actor); return true; @@ -458,8 +458,8 @@ void EnFd_Init(Actor* thisx, PlayState* play) { Collider_InitJntSph(play, &this->collider); Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colSphs); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0xF), &sColChkInit); - this->actor.flags &= ~ACTOR_FLAG_0; - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; Actor_SetScale(&this->actor, 0.01f); this->firstUpdateFlag = true; this->actor.gravity = -1.0f; @@ -493,7 +493,7 @@ void EnFd_SpinAndGrow(EnFd* this, PlayState* play) { this->actor.velocity.y = 6.0f; this->actor.scale.y = 0.01f; this->actor.world.rot.y ^= 0x8000; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 8.0f; Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENFD_ANIM_1); this->actionFunc = EnFd_JumpToGround; @@ -666,15 +666,15 @@ void EnFd_Update(Actor* thisx, PlayState* play) { EnFd_SpawnDot(this, play); } - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { // has been hookshoted if (EnFd_SpawnCore(this, play)) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->invincibilityTimer = 30; Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLAME_DAMAGE); Enemy_StartFinishingBlow(play, &this->actor); } else { - this->actor.flags &= ~ACTOR_FLAG_13; + this->actor.flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED; } } else if (this->actionFunc != EnFd_WaitForCore) { EnFd_ColliderCheck(this, play); diff --git a/soh/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c b/soh/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c index 8cc76a37a..bd59e6f51 100644 --- a/soh/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c +++ b/soh/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c @@ -1,7 +1,7 @@ #include "z_en_fd_fire.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnFdFire_Init(Actor* thisx, PlayState* play); void EnFdFire_Destroy(Actor* thisx, PlayState* play); @@ -129,7 +129,7 @@ void EnFdFire_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInit); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.gravity = -0.6f; this->actor.speedXZ = 5.0f; this->actor.velocity.y = 12.0f; diff --git a/soh/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/soh/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c index ac13a51f6..31f1aebbb 100644 --- a/soh/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c +++ b/soh/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c @@ -11,7 +11,7 @@ #include "overlays/actors/ovl_En_fHG/z_en_fhg.h" #include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) typedef enum { /* 0 */ STRIKE_INIT, diff --git a/soh/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c b/soh/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c index b1dc483e0..fbdfbc7f7 100644 --- a/soh/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c +++ b/soh/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c @@ -3,7 +3,7 @@ #include "vt.h" #include "objects/object_efc_star_field/object_efc_star_field.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnFireRock_Init(Actor* thisx, PlayState* play); void EnFireRock_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/soh/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index 231629b0b..6da2e9adc 100644 --- a/soh/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/soh/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -8,7 +8,7 @@ #include "objects/object_firefly/object_firefly.h" #include "overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_12 | ACTOR_FLAG_14) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_ARROW_DRAGGABLE) void EnFirefly_Init(Actor* thisx, PlayState* play); void EnFirefly_Destroy(Actor* thisx, PlayState* play); @@ -149,7 +149,7 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) { CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); if ((this->actor.params & 0x8000) != 0) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_LENS; this->actor.draw = EnFirefly_DrawInvisible; this->actor.params &= 0x7FFF; } @@ -216,7 +216,7 @@ void EnFirefly_SetupFall(EnFirefly* this) { this->actor.velocity.y = 0.0f; Animation_Change(&this->skelAnime, &gKeeseFlyAnim, 0.5f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f); Audio_PlayActorSound2(&this->actor, NA_SE_EN_FFLY_DEAD); - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 40); this->actionFunc = EnFirefly_Fall; } @@ -272,7 +272,7 @@ void EnFirefly_SetupFrozenFall(EnFirefly* this, PlayState* play) { s32 i; Vec3f iceParticlePos; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->auraType = KEESE_AURA_NONE; this->actor.speedXZ = 0.0f; Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0xFF); @@ -434,7 +434,7 @@ void EnFirefly_Fall(EnFirefly* this, PlayState* play) { this->actor.colorFilterTimer = 40; SkelAnime_Update(&this->skelAnime); Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); - if (this->actor.flags & ACTOR_FLAG_15) { + if (this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW) { this->actor.colorFilterTimer = 40; } else { Math_ScaledStepToS(&this->actor.shape.rot.x, 0x6800, 0x200); @@ -637,7 +637,7 @@ void EnFirefly_UpdateDamage(EnFirefly* this, PlayState* play) { if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) { if (Actor_ApplyDamage(&this->actor) == 0) { Enemy_StartFinishingBlow(play, &this->actor); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } damageEffect = this->actor.colChkInfo.damageEffect; @@ -693,7 +693,7 @@ void EnFirefly_Update(Actor* thisx, PlayState* play2) { this->actionFunc(this, play); - if (!(this->actor.flags & ACTOR_FLAG_15)) { + if (!(this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW)) { if ((this->actor.colChkInfo.health == 0) || (this->actionFunc == EnFirefly_Stunned)) { Actor_MoveForward(&this->actor); } else { diff --git a/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c index 4c1a9ba1f..67b41e530 100644 --- a/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -117,7 +117,7 @@ void EnFish_SetCutsceneData(EnFish* this) { thisx->shape.yOffset = 600.0f; D_80A17014 = 10.0f; D_80A17018 = 0.0f; - thisx->flags |= ACTOR_FLAG_4; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; EnFish_SetOutOfWaterAnimation(this); } } @@ -142,7 +142,7 @@ void EnFish_Init(Actor* thisx, PlayState* play) { this->fastPhase = Rand_ZeroOne() * (0xFFFF + 0.5f); if (params == FISH_DROPPED) { - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 8.0f); EnFish_Dropped_SetupFall(this); } else if (params == FISH_SWIMMING_UNIQUE) { @@ -476,7 +476,7 @@ void EnFish_Dropped_FlopOnGround(EnFish* this, PlayState* play) { void EnFish_Dropped_SetupSwimAway(EnFish* this) { this->actor.home.pos = this->actor.world.pos; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->timer = 200; this->actor.gravity = 0.0f; this->actor.minVelocityY = 0.0f; diff --git a/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index 84725221a..e6b036ba7 100644 --- a/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -7,7 +7,7 @@ #include "z_en_floormas.h" #include "objects/object_wallmaster/object_wallmaster.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT) #define SPAWN_INVISIBLE 0x8000 #define SPAWN_SMALL 0x10 @@ -139,13 +139,13 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) { // s16 cast needed this->actor.params &= (s16) ~(SPAWN_INVISIBLE); if (invisble) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_LENS; this->actor.draw = EnFloormas_DrawHighlighted; } if (this->actor.params == SPAWN_SMALL) { this->actor.draw = NULL; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnFloormas_SmWait; } else { // spawn first small floormaster @@ -283,8 +283,8 @@ void EnFloormas_SetupLand(EnFloormas* this) { void EnFloormas_SetupSplit(EnFloormas* this) { Actor_SetScale(&this->actor, 0.004f); - this->actor.flags |= ACTOR_FLAG_4; - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_LENS)) { this->actor.draw = EnFloormas_DrawHighlighted; } else { this->actor.draw = EnFloormas_Draw; @@ -349,7 +349,7 @@ void EnFloormas_SetupGrabLink(EnFloormas* this, Player* player) { f32 xzDelta; Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.0f, 36.0f, 45.0f, ANIMMODE_ONCE, -3.0f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 0.0f; this->actor.velocity.y = 0.0f; EnFloormas_MakeInvulnerable(this); @@ -388,7 +388,7 @@ void EnFloormas_SetupSmWait(EnFloormas* this) { } this->actor.draw = NULL; this->actionFunc = EnFloormas_SmWait; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED); } void EnFloormas_SetupTakeDamage(EnFloormas* this) { @@ -668,7 +668,7 @@ void EnFloormas_Land(EnFloormas* this, PlayState* play) { void EnFloormas_Split(EnFloormas* this, PlayState* play) { if (this->actor.bgCheckFlags & 1) { if (SkelAnime_Update(&this->skelAnime)) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->smActionTimer = 50; EnFloormas_SetupStand(this); } @@ -810,7 +810,7 @@ void EnFloormas_GrabLink(EnFloormas* this, PlayState* play) { this->actor.shape.rot.x = 0; this->actor.velocity.y = 6.0f; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = -3.0f; EnFloormas_SetupLand(this); } else { @@ -917,7 +917,7 @@ void EnFloormas_Merge(EnFloormas* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime) != 0) { if (this->actor.scale.x >= 0.01f) { - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; EnFloormas_MakeVulnerable(this); this->actor.params = 0; this->collider.info.bumperFlags |= BUMP_HOOKABLE; @@ -1002,7 +1002,7 @@ void EnFloormas_ColliderCheck(EnFloormas* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_DEAD); } Enemy_StartFinishingBlow(play, &this->actor); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else if (this->actor.colChkInfo.damage != 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_DAMAGE); } @@ -1056,7 +1056,7 @@ void EnFloormas_Update(Actor* thisx, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, this->actor.scale.x * 3000.0f, 0.0f, 0x1D); Collider_UpdateCylinder(&this->actor, &this->collider); if (this->actionFunc == EnFloormas_Charge) { - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } if (this->actionFunc != EnFloormas_GrabLink) { diff --git a/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c index fa131fe00..c1575c63e 100644 --- a/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -3,7 +3,7 @@ #include "vt.h" #include "objects/object_fr/object_fr.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnFr_Init(Actor* thisx, PlayState* play); void EnFr_Destroy(Actor* thisx, PlayState* play); @@ -216,7 +216,7 @@ void EnFr_Init(Actor* thisx, PlayState* play) { this->actor.destroy = NULL; this->actor.draw = NULL; this->actor.update = EnFr_UpdateIdle; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED); this->actor.flags &= ~0; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); this->actor.textId = 0x40AC; @@ -258,7 +258,7 @@ void EnFr_Update(Actor* thisx, PlayState* play) { s32 pad2; if (Object_IsLoaded(&play->objectCtx, this->objBankIndex)) { - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; frogIndex = this->actor.params - 1; sEnFrPointers.frogs[frogIndex] = this; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -301,7 +301,7 @@ void EnFr_Update(Actor* thisx, PlayState* play) { this->posButterflyLight.x = this->posButterfly.x = this->posLogSpot.x; this->posButterflyLight.y = this->posButterfly.y = this->posLogSpot.y + 50.0f; this->posButterflyLight.z = this->posButterfly.z = this->posLogSpot.z; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } } diff --git a/soh/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/soh/src/overlays/actors/ovl_En_Fu/z_en_fu.c index 20bc6dff6..4d21b1b91 100644 --- a/soh/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/soh/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -8,7 +8,7 @@ #include "objects/object_fu/object_fu.h" #include "scenes/indoors/hakasitarelay/hakasitarelay_scene.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) #define FU_RESET_LOOK_ANGLE (1 << 0) #define FU_WAIT (1 << 1) @@ -140,7 +140,7 @@ void EnFu_WaitChild(EnFu* this, PlayState* play) { textID = (gSaveContext.eventChkInf[6] & 0x80) ? 0x5033 : 0x5032; } - // if ACTOR_FLAG_8 is set and textID is 0x5033, change animation + // if ACTOR_FLAG_PLAYER_TALKED_TO is set and textID is 0x5033, change animation // if func_80A1D94C returns 1, actionFunc is set to func_80A1DA04 if (func_80A1D94C(this, play, textID, func_80A1DA04)) { if (textID == 0x5033) { @@ -193,11 +193,11 @@ void func_80A1DBD4(EnFu* this, PlayState* play) { if (play->msgCtx.ocarinaMode >= OCARINA_MODE_04) { this->actionFunc = EnFu_WaitAdult; play->msgCtx.ocarinaMode = OCARINA_MODE_04; - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) { func_80078884(NA_SE_SY_CORRECT_CHIME); this->actionFunc = func_80A1DB60; - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; if (!gSaveContext.n64ddFlag) { play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gSongOfStormsCs); diff --git a/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c index ffac1fa0c..3960d8544 100644 --- a/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c +++ b/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c @@ -10,7 +10,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_9) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_HOOKSHOT_DRAGS) void EnFw_Init(Actor* thisx, PlayState* play); void EnFw_Destroy(Actor* thisx, PlayState* play); @@ -364,7 +364,7 @@ void EnFw_JumpToParentInitPos(EnFw* this, PlayState* play) { void EnFw_Update(Actor* thisx, PlayState* play) { EnFw* this = (EnFw*)thisx; SkelAnime_Update(&this->skelAnime); - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { // not attached to hookshot. Actor_MoveForward(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 20.0f, 0.0f, 5); diff --git a/soh/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/soh/src/overlays/actors/ovl_En_Fz/z_en_fz.c index 8736b47ba..b9639605e 100644 --- a/soh/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/soh/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -2,7 +2,7 @@ #include "objects/object_fz/object_fz.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT) void EnFz_Init(Actor* thisx, PlayState* play); void EnFz_Destroy(Actor* thisx, PlayState* play); @@ -175,7 +175,7 @@ void EnFz_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.008f); this->actor.colChkInfo.mass = MASS_IMMOVABLE; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unusedTimer1 = 0; this->unusedCounter = 0; this->updateBgInfo = true; @@ -388,7 +388,7 @@ void EnFz_SetYawTowardsPlayer(EnFz* this) { void EnFz_SetupDisappear(EnFz* this) { this->state = 2; this->isFreezing = false; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnFz_Disappear; } @@ -446,7 +446,7 @@ void EnFz_SetupAimForMove(EnFz* this) { this->timer = 40; this->updateBgInfo = true; this->isFreezing = true; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionFunc = EnFz_AimForMove; this->actor.gravity = -1.0f; } @@ -549,7 +549,7 @@ void EnFz_SetupDespawn(EnFz* this, PlayState* play) { this->updateBgInfo = true; this->isFreezing = false; this->isDespawning = true; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->isActive = false; this->timer = 60; this->speedXZ = 0.0f; @@ -571,7 +571,7 @@ void EnFz_SetupMelt(EnFz* this) { this->state = 3; this->isFreezing = false; this->isDespawning = true; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnFz_Melt; this->actor.speedXZ = 0.0f; this->speedXZ = 0.0f; @@ -602,7 +602,7 @@ void EnFz_SetupBlowSmokeStationary(EnFz* this) { this->timer = 40; this->updateBgInfo = true; this->isFreezing = true; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionFunc = EnFz_BlowSmokeStationary; this->actor.gravity = -1.0f; } diff --git a/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c b/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c index 1cbcf8b1e..48f9745d8 100644 --- a/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c +++ b/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c @@ -14,7 +14,7 @@ #include "objects/object_gi_rupy/object_gi_rupy.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) typedef enum { /* 0 */ MOVE_TARGET, diff --git a/soh/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c b/soh/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c index 066ce12c0..0fc08ba4a 100644 --- a/soh/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c +++ b/soh/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c @@ -7,7 +7,7 @@ #include "z_en_ganon_mant.h" #include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnGanonMant_Init(Actor* thisx, PlayState* play); void EnGanonMant_Destroy(Actor* thisx, PlayState* play); @@ -103,7 +103,7 @@ static u8 sMaskTex[MANT_TEX_WIDTH * MANT_TEX_HEIGHT] = { {0} }; void EnGanonMant_Init(Actor* thisx, PlayState* play) { EnGanonMant* this = (EnGanonMant*)thisx; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; for (int i = 0; i < ARRAY_COUNT(sMaskTex); i++) { sMaskTex[i] = 0; diff --git a/soh/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c b/soh/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c index b1bccd113..32b875df0 100644 --- a/soh/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c +++ b/soh/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c @@ -7,7 +7,7 @@ #include "z_en_ganon_organ.h" #include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnGanonOrgan_Init(Actor* thisx, PlayState* play); void EnGanonOrgan_Destroy(Actor* thisx, PlayState* play); @@ -32,7 +32,7 @@ const ActorInit En_Ganon_Organ_InitVars = { #include "overlays/ovl_En_Ganon_Organ/ovl_En_Ganon_Organ.h" void EnGanonOrgan_Init(Actor* thisx, PlayState* play) { - thisx->flags &= ~ACTOR_FLAG_0; + thisx->flags &= ~ACTOR_FLAG_TARGETABLE; } void EnGanonOrgan_Destroy(Actor* thisx, PlayState* play) { diff --git a/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c index ff4be49e6..9cdb9b4e2 100644 --- a/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c +++ b/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c @@ -8,7 +8,7 @@ #include "objects/object_ps/object_ps.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnGb_Init(Actor* thisx, PlayState* play); void EnGb_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/soh/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index 7e397050f..67e45b197 100644 --- a/soh/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/soh/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -9,7 +9,7 @@ #include "objects/object_ge1/object_ge1.h" #include "soh/Enhancements/randomizer/randomizer_entrance.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) #define GE1_STATE_TALKING (1 << 0) #define GE1_STATE_GIVE_QUIVER (1 << 1) @@ -585,7 +585,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) { s32 getItemId; if (Actor_TextboxIsClosing(&this->actor, play)) { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; this->actionFunc = EnGe1_WaitTillItemGiven_Archery; } @@ -623,7 +623,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) { void EnGe1_TalkWinPrize_Archery(EnGe1* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, play)) { this->actionFunc = EnGe1_BeginGiveItem_Archery; - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } else { func_8002F2CC(&this->actor, play, 200.0f); } @@ -645,7 +645,7 @@ void EnGe1_BeginGame_Archery(EnGe1* this, PlayState* play) { Actor* horse; if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; switch (play->msgCtx.choiceIndex) { case 0: @@ -703,7 +703,7 @@ void EnGe1_TalkAfterGame_Archery(EnGe1* this, PlayState* play) { gSaveContext.eventInf[0] &= ~0x100; LOG_NUM("z_common_data.yabusame_total", gSaveContext.minigameScore); LOG_NUM("z_common_data.memory.information.room_inf[127][ 0 ]", HIGH_SCORE(HS_HBA)); - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; if (HIGH_SCORE(HS_HBA) < gSaveContext.minigameScore) { HIGH_SCORE(HS_HBA) = gSaveContext.minigameScore; diff --git a/soh/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/soh/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index 9437100d5..7fe28fa58 100644 --- a/soh/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/soh/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -9,7 +9,7 @@ #include "objects/object_gla/object_gla.h" #include "soh/Enhancements/randomizer/randomizer_entrance.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) #define GE2_STATE_ANIMCOMPLETE (1 << 1) #define GE2_STATE_KO (1 << 2) @@ -314,7 +314,7 @@ void EnGe2_KnockedOut(EnGe2* this, PlayState* play) { s32 effectAngle; Vec3f effectPos; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (this->stateFlags & GE2_STATE_ANIMCOMPLETE) { effectAngle = (play->state.frames) * 0x2800; effectPos.x = this->actor.focus.pos.x + (Math_CosS(effectAngle) * 5.0f); @@ -454,7 +454,7 @@ void EnGe2_SetActionAfterTalk(EnGe2* this, PlayState* play) { break; } this->actor.update = EnGe2_UpdateFriendly; - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } EnGe2_TurnToFacePlayer(this, play); } @@ -480,7 +480,7 @@ void EnGe2_WaitTillCardGiven(EnGe2* this, PlayState* play) { void EnGe2_GiveCard(EnGe2* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; this->actionFunc = EnGe2_WaitTillCardGiven; if (!gSaveContext.n64ddFlag) { func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f); @@ -497,7 +497,7 @@ void EnGe2_ForceTalk(EnGe2* this, PlayState* play) { this->actionFunc = EnGe2_GiveCard; } else { this->actor.textId = 0x6004; - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; func_8002F1C4(&this->actor, play, 300.0f, 300.0f, 0); } EnGe2_LookAtPlayer(this, play); diff --git a/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index 4da2b2db7..a4d060502 100644 --- a/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -7,7 +7,7 @@ #include "z_en_ge3.h" #include "objects/object_geldb/object_geldb.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnGe3_Init(Actor* thisx, PlayState* play); void EnGe3_Destroy(Actor* thisx, PlayState* play); @@ -130,7 +130,7 @@ void EnGe3_Wait(EnGe3* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { this->actionFunc = EnGe3_WaitLookAtPlayer; this->actor.update = EnGe3_UpdateWhenNotTalking; - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } EnGe3_TurnToFacePlayer(this, play); } @@ -156,7 +156,7 @@ void EnGe3_WaitTillCardGiven(EnGe3* this, PlayState* play) { void EnGe3_GiveCard(EnGe3* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; this->actionFunc = EnGe3_WaitTillCardGiven; if (!gSaveContext.n64ddFlag) { func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f); @@ -176,7 +176,7 @@ void EnGe3_ForceTalk(EnGe3* this, PlayState* play) { this->unk_30C |= 4; } this->actor.textId = 0x6004; - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; func_8002F1C4(&this->actor, play, 300.0f, 300.0f, 0); } EnGe3_LookAtPlayer(this, play); diff --git a/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index 040f516ad..4b4f07a1e 100644 --- a/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -8,7 +8,7 @@ #include "objects/object_geldb/object_geldb.h" #include "soh/Enhancements/randomizer/randomizer_entrance.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) typedef enum { /* 0 */ GELDB_WAIT, @@ -352,7 +352,7 @@ void EnGeldB_SetupWait(EnGeldB* this) { this->action = GELDB_WAIT; this->actor.bgCheckFlags &= ~3; this->actor.gravity = -2.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnGeldB_SetupAction(this, EnGeldB_Wait); } @@ -370,7 +370,7 @@ void EnGeldB_Wait(EnGeldB* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN); this->skelAnime.playSpeed = 1.0f; this->actor.world.pos.y = this->actor.floorHeight; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.focus.pos = this->actor.world.pos; this->actor.bgCheckFlags &= ~2; this->actor.velocity.y = 0.0f; @@ -1318,7 +1318,7 @@ void EnGeldB_SetupDefeated(EnGeldB* this) { this->invisible = true; } this->action = GELDB_DEFEAT; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DEAD); EnGeldB_SetupAction(this, EnGeldB_Defeated); gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_GERUDO_THIEF]++; diff --git a/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c index bd99a9ba1..979a3d839 100644 --- a/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -7,7 +7,7 @@ #include "z_en_girla.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnGirlA_Init(Actor* thisx, PlayState* play); void EnGirlA_Destroy(Actor* thisx, PlayState* play); @@ -1180,7 +1180,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, PlayState* play) { ShopItemEntry* itemEntry = &shopItemEntries[params]; if (Object_IsLoaded(&play->objectCtx, this->objBankIndex)) { - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actor.objBankIndex = this->objBankIndex; switch (this->actor.params) { case SI_KEATON_MASK: @@ -1262,7 +1262,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, PlayState* play) { this->hiliteFunc = itemEntry->hiliteFunc; this->giDrawId = itemEntry->giDrawId; osSyncPrintf("%s(%2d)\n", sShopItemDescriptions[params], params); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Actor_SetScale(&this->actor, 0.25f); this->actor.shape.yOffset = 24.0f; this->actor.shape.shadowScale = 4.0f; diff --git a/soh/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/soh/src/overlays/actors/ovl_En_Gm/z_en_gm.c index 3f6ae565d..4915ef9a5 100644 --- a/soh/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/soh/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -9,7 +9,7 @@ #include "objects/object_gm/object_gm.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnGm_Init(Actor* thisx, PlayState* play); void EnGm_Destroy(Actor* thisx, PlayState* play); @@ -109,7 +109,7 @@ s32 func_80A3D7C8(void) { void func_80A3D838(EnGm* this, PlayState* play) { if (Object_IsLoaded(&play->objectCtx, this->objGmBankIndex)) { - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, 18); gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->objGmBankIndex].segment); Animation_Change(&this->skelAnime, &object_gm_Anim_0002B8, 1.0f, 0.0f, diff --git a/soh/src/overlays/actors/ovl_En_Go/z_en_go.c b/soh/src/overlays/actors/ovl_En_Go/z_en_go.c index 3231fb31a..3e264be77 100644 --- a/soh/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/soh/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -5,7 +5,7 @@ #include "soh/frame_interpolation.h" #include "soh/Enhancements/randomizer/adult_trade_shuffle.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnGo_Init(Actor* thisx, PlayState* play); void EnGo_Destroy(Actor* thisx, PlayState* play); @@ -639,8 +639,8 @@ void EnGo_Init(Actor* thisx, PlayState* play) { } if ((this->actor.params & 0xF0) && ((this->actor.params & 0xF0) != 0x90)) { - this->actor.flags &= ~ACTOR_FLAG_4; - this->actor.flags &= ~ACTOR_FLAG_5; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; + this->actor.flags &= ~ACTOR_FLAG_DRAW_WHILE_CULLED; } EnGo_ChangeAnim(this, ENGO_ANIM_0); diff --git a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c index ad7d99686..100f9721f 100644 --- a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -5,7 +5,7 @@ #include "soh/frame_interpolation.h" #include "soh/Enhancements/randomizer/adult_trade_shuffle.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) /* FLAGS @@ -934,7 +934,7 @@ s32 func_80A44AB0(EnGo2* this, PlayState* play) { } else { if (this->collider.base.acFlags & 2) { Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); - this->actor.flags &= ~ACTOR_FLAG_24; + this->actor.flags &= ~ACTOR_FLAG_PLAY_HIT_SFX; this->collider.base.acFlags &= ~0x2; EnGo2_StopRolling(this, play); return true; @@ -1010,10 +1010,10 @@ s32 EnGo2_IsWakingUp(EnGo2* this) { if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) { if ((this->collider.base.ocFlags2 & 1) == 0) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; return false; } else { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; return true; } } @@ -1348,7 +1348,7 @@ void EnGo2_GetDustData(EnGo2* this, s32 index2) { void EnGo2_RollingAnimation(EnGo2* this, PlayState* play) { if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_10); this->skelAnime.playSpeed = -0.5f; } else { @@ -1417,7 +1417,7 @@ void EnGo2_SetupRolling(EnGo2* this, PlayState* play) { } else { this->actor.speedXZ = 6.0f; } - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; this->animTimer = 10; this->actor.shape.yOffset = 1800.0f; this->actor.speedXZ += this->actor.speedXZ; // Speeding up @@ -1600,8 +1600,8 @@ void EnGo2_Init(Actor* thisx, PlayState* play) { case GORON_CITY_LOST_WOODS: case GORON_DMT_FAIRY_HINT: case GORON_MARKET_BAZAAR: - this->actor.flags &= ~ACTOR_FLAG_4; - this->actor.flags &= ~ACTOR_FLAG_5; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; + this->actor.flags &= ~ACTOR_FLAG_DRAW_WHILE_CULLED; } EnGo2_SetColliderDim(this); @@ -1669,7 +1669,7 @@ void EnGo2_Init(Actor* thisx, PlayState* play) { break; case GORON_DMT_BIGGORON: this->actor.shape.shadowDraw = NULL; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if ((INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_SWORD_BROKEN) && (INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_EYEDROPS)) { this->eyeMouthTexState = 1; @@ -1749,7 +1749,7 @@ void func_80A46B40(EnGo2* this, PlayState* play) { } else { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } func_80A454CC(this); this->unk_211 = true; @@ -1922,7 +1922,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) { switch (this->goronState) { case 0: Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_5); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.shape.rot.y += 0x5B0; this->trackingMode = NPC_TRACKING_NONE; this->animTimer = gSaveContext.n64ddFlag ? 0 : (this->skelAnime.endFrame + 60.0f + 60.0f); // eyeDrops animation timer @@ -1955,7 +1955,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) { } if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_1); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->trackingMode = NPC_TRACKING_HEAD_AND_TORSO; this->skelAnime.playSpeed = 0.0f; this->skelAnime.curFrame = this->skelAnime.endFrame; diff --git a/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c b/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c index 641eb0872..af5b6a382 100644 --- a/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c +++ b/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_Boss_Goma/z_boss_goma.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnGoma_Init(Actor* thisx, PlayState* play); void EnGoma_Destroy(Actor* thisx, PlayState* play); @@ -121,10 +121,10 @@ void EnGoma_Init(Actor* thisx, PlayState* play) { this->gomaType = ENGOMA_BOSSLIMB; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f); this->actionTimer = this->actor.params + 150; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else if (params >= 10) { // Debris when hatching this->actor.gravity = -1.3f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionTimer = 50; this->gomaType = ENGOMA_HATCH_DEBRIS; this->eggScale = 1.0f; @@ -370,7 +370,7 @@ void EnGoma_SetupDie(EnGoma* this) { } this->invincibilityTimer = 100; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } void EnGoma_Die(EnGoma* this, PlayState* play) { @@ -502,7 +502,7 @@ void EnGoma_SetupJump(EnGoma* this) { } void EnGoma_Jump(EnGoma* this, PlayState* play) { - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; SkelAnime_Update(&this->skelanime); Math_ApproachF(&this->actor.speedXZ, 10.0f, 0.5f, 5.0f); diff --git a/soh/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/soh/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index 154a12c1f..830b2440b 100644 --- a/soh/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/soh/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -10,7 +10,7 @@ #include "objects/object_goroiwa/object_goroiwa.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef s32 (*EnGoroiwaUnkFunc1)(EnGoroiwa* this, PlayState* play); typedef void (*EnGoroiwaUnkFunc2)(EnGoroiwa* this); diff --git a/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 12dea8b22..a2be28dce 100644 --- a/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_En_Elf/z_en_elf.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnGs_Init(Actor* thisx, PlayState* play); void EnGs_Destroy(Actor* thisx, PlayState* play); @@ -359,7 +359,7 @@ void func_80A4ED34(EnGs* this, PlayState* play) { func_8002F974(&this->actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); if (this->unk_200++ >= 40) { this->unk_19E |= 0x10; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actor.uncullZoneForward = 12000.0f; this->actor.gravity = 0.3f; diff --git a/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c index 69d543d27..910d30fd7 100644 --- a/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -9,7 +9,7 @@ #include "objects/object_boj/object_boj.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnGuest_Init(Actor* thisx, PlayState* play); void EnGuest_Destroy(Actor* thisx, PlayState* play); @@ -80,7 +80,7 @@ void EnGuest_Update(Actor* thisx, PlayState* play) { s32 pad; if (Object_IsLoaded(&play->objectCtx, this->osAnimeBankIndex)) { - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_InitFlex(play, &this->skelAnime, &object_boj_Skel_0000F0, NULL, this->jointTable, this->morphTable, 16); diff --git a/soh/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/soh/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c index 507d480b2..2b0cb0d6e 100644 --- a/soh/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/soh/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -8,7 +8,7 @@ #include "objects/object_sd/object_sd.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnHeishi1_Init(Actor* thisx, PlayState* play); void EnHeishi1_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index 35c351827..85e24b4ea 100644 --- a/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -12,7 +12,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnHeishi2_Init(Actor* thisx, PlayState* play); void EnHeishi2_Destroy(Actor* thisx, PlayState* play); @@ -93,7 +93,7 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) { if ((this->type == 6) || (this->type == 9)) { this->actor.draw = EnHeishi2_DrawKingGuard; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, 6); if (this->type == 6) { this->actionFunc = EnHeishi2_DoNothing1; @@ -113,7 +113,7 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) { this->actor.shape.rot.y = this->actor.world.rot.y; Collider_DestroyCylinder(play, &this->collider); func_8002DF54(play, 0, 8); - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actionFunc = func_80A544AC; } } else { @@ -144,7 +144,7 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) { // "Peep hole soldier!" osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 覗き穴奥兵士ふぃ〜 ☆☆☆☆☆ \n" VT_RST); Collider_DestroyCylinder(play, collider); - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); this->actionFunc = EnHeishi_DoNothing2; break; } @@ -640,7 +640,7 @@ void func_80A544AC(EnHeishi2* this, PlayState* play) { this->actor.world.rot.z = this->actor.shape.rot.z; if (this->actor.shape.rot.z < -6000) { Message_StartTextbox(play, 0x708F, NULL); - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; this->actionFunc = func_80A5455C; this->unk_2E4 = 0.0f; } diff --git a/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index f684f4ae5..9fffe1c7a 100644 --- a/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -2,7 +2,7 @@ #include "objects/object_sd/object_sd.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnHeishi4_Init(Actor* thisx, PlayState* play); void EnHeishi4_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c index f21966d93..b5e5228bb 100644 --- a/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -7,7 +7,7 @@ #include "z_en_hintnuts.h" #include "objects/object_hintnuts/object_hintnuts.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) void EnHintnuts_Init(Actor* thisx, PlayState* play); void EnHintnuts_Destroy(Actor* thisx, PlayState* play); @@ -76,7 +76,7 @@ void EnHintnuts_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); if (this->actor.params == 0xA) { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); } else { ActorShape_Init(&this->actor.shape, 0x0, ActorShadow_DrawCircle, 35.0f); SkelAnime_Init(play, &this->skelAnime, &gHintNutsSkel, &gHintNutsStandAnim, this->jointTable, @@ -113,8 +113,8 @@ void EnHintnuts_Destroy(Actor* thisx, PlayState* play) { void EnHintnuts_HitByScrubProjectile1(EnHintnuts* this, PlayState* play) { if (this->actor.textId != 0 && this->actor.category == ACTORCAT_ENEMY && ((this->actor.params == 0) || (sPuzzleCounter == 2))) { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_BG); } } @@ -173,7 +173,7 @@ void EnHintnuts_HitByScrubProjectile2(EnHintnuts* this) { } sPuzzleCounter--; } - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actionFunc = EnHintnuts_BeginFreeze; } else { this->actionFunc = EnHintnuts_BeginRun; @@ -198,7 +198,7 @@ void EnHintnuts_SetupLeave(EnHintnuts* this, PlayState* play) { this->animFlagAndTimer = 100; this->actor.world.rot.y = this->actor.shape.rot.y; this->collider.base.ocFlags1 &= ~OC1_ON; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DAMAGE); Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0x0, 0x0, 0x0, 0x3, true); // recovery heart @@ -207,7 +207,7 @@ void EnHintnuts_SetupLeave(EnHintnuts* this, PlayState* play) { void EnHintnuts_SetupFreeze(EnHintnuts* this) { Animation_PlayLoop(&this->skelAnime, &gHintNutsFreezeAnim); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 100); this->actor.colorFilterTimer = 1; this->animFlagAndTimer = 0; @@ -327,9 +327,9 @@ void EnHintnuts_BeginFreeze(EnHintnuts* this, PlayState* play) { void EnHintnuts_CheckProximity(EnHintnuts* this, PlayState* play) { if (this->actor.category != ACTORCAT_ENEMY) { if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isTargeted) { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; } else { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } if (this->actor.xzDistToPlayer < 130.0f) { this->actor.textId = this->textIdCopy; @@ -380,8 +380,8 @@ void EnHintnuts_Run(EnHintnuts* this, PlayState* play) { fabsf(this->actor.world.pos.y - this->actor.home.pos.y) < 2.0f) { this->actor.speedXZ = 0.0f; if (this->actor.category == ACTORCAT_BG) { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_16); - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_WILL_TALK); + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); } EnHintnuts_SetupBurrow(this); @@ -453,8 +453,8 @@ void EnHintnuts_Freeze(EnHintnuts* this, PlayState* play) { if (this->animFlagAndTimer == 1) { Actor_Kill(&this->actor); } else { - this->actor.flags |= ACTOR_FLAG_0; - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actor.colChkInfo.health = sColChkInfoInit.health; this->actor.colorFilterTimer = 0; EnHintnuts_SetupWait(this); diff --git a/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.c index a2e23a599..e8c8f35ca 100644 --- a/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -1,6 +1,6 @@ #include "z_en_holl.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED // Horizontal Plane parameters diff --git a/soh/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c b/soh/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c index b01ea5f6d..24a389685 100644 --- a/soh/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c +++ b/soh/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED #define HONOTRAP_AT_ACTIVE (1 << 0) #define HONOTRAP_AC_ACTIVE (1 << 1) diff --git a/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 7b0aa613e..7ccb228a6 100644 --- a/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -10,7 +10,7 @@ #include "objects/object_hni/object_hni.h" #include "scenes/overworld/spot09/spot09_scene.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef void (*EnHorseCsFunc)(EnHorse*, PlayState*, CsCmdActorAction*); typedef void (*EnHorseActionFunc)(EnHorse*, PlayState*); @@ -725,7 +725,7 @@ s32 EnHorse_PlayerCanMove(EnHorse* this, PlayState* play) { if ((player->stateFlags1 & 1) || func_8002DD78(GET_PLAYER(play)) == 1 || (player->stateFlags1 & 0x100000) || ((this->stateFlags & ENHORSE_FLAG_19) && !this->inRace) || this->action == ENHORSE_ACT_HBA || - player->actor.flags & ACTOR_FLAG_8 || play->csCtx.state != 0) { + player->actor.flags & ACTOR_FLAG_PLAYER_TALKED_TO || play->csCtx.state != 0) { return false; } return true; @@ -1539,7 +1539,7 @@ void EnHorse_Reverse(EnHorse* this, PlayState* play) { } else if (stickMag < 10.0f) { stickAngle = -0x7FFF; } - } else if (player->actor.flags & ACTOR_FLAG_8) { + } else if (player->actor.flags & ACTOR_FLAG_PLAYER_TALKED_TO) { EnHorse_StartMountedIdleResetAnim(this); this->actor.speedXZ = 0.0f; return; diff --git a/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index 0d3262c09..60d6d4a60 100644 --- a/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -7,7 +7,7 @@ #include "z_en_horse_game_check.h" #include "overlays/actors/ovl_En_Horse/z_en_horse.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED #define AT_FINISH_LINE(actor) \ (Math3D_PointInSquare2D(sFinishLine[0], sFinishLine[1], sFinishLine[2], sFinishLine[3], (actor)->world.pos.x, \ diff --git a/soh/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c b/soh/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c index f492b3cf4..d36c1c690 100644 --- a/soh/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c +++ b/soh/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c @@ -7,7 +7,7 @@ #include "z_en_horse_ganon.h" #include "objects/object_horse_ganon/object_horse_ganon.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef struct { /* 0x0 */ Vec3s unk_0; diff --git a/soh/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/soh/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index 529432052..0710bb9be 100644 --- a/soh/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/soh/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -7,7 +7,7 @@ #include "z_en_horse_link_child.h" #include "objects/object_horse_link_child/object_horse_link_child.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnHorseLinkChild_Init(Actor* thisx, PlayState* play); void EnHorseLinkChild_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c b/soh/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c index 4ca68c4aa..d0de9bcb8 100644 --- a/soh/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c +++ b/soh/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c @@ -277,7 +277,7 @@ void EnHorseNormal_Destroy(Actor* thisx, PlayState* play) { } void func_80A6B91C(EnHorseNormal* this, PlayState* play) { - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->action = HORSE_FOLLOW_PATH; this->animationIdx = 6; this->waypoint = 0; @@ -511,7 +511,7 @@ void func_80A6C6B0(EnHorseNormal* this) { this->animationIdx = 0; this->unk_21C = 0; this->unk_21E = 0; - this->actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED; this->actor.speedXZ = 0.0f; this->unk_218 = 0.0f; Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f, diff --git a/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c b/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c index 8a2bad211..869f03e84 100644 --- a/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c +++ b/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c @@ -7,7 +7,7 @@ #include "z_en_horse_zelda.h" #include "objects/object_horse_zelda/object_horse_zelda.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnHorseZelda_Init(Actor* thisx, PlayState* play); void EnHorseZelda_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c index b730915e6..81fe82aa9 100644 --- a/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -9,7 +9,7 @@ #include "objects/object_hs/object_hs.h" #include "soh/Enhancements/randomizer/adult_trade_shuffle.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnHs_Init(Actor* thisx, PlayState* play); void EnHs_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c b/soh/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c index 01deb32fb..aeeaca357 100644 --- a/soh/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c +++ b/soh/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_hs/object_hs.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnHs2_Init(Actor* thisx, PlayState* play); void EnHs2_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c index 248094843..dc5055e70 100644 --- a/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c +++ b/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c @@ -15,7 +15,7 @@ #include "objects/object_cob/object_cob.h" #include "objects/object_os_anime/object_os_anime.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnHy_Init(Actor* thisx, PlayState* play); void EnHy_Destroy(Actor* thisx, PlayState* play); @@ -926,7 +926,7 @@ void EnHy_InitImpl(EnHy* this, PlayState* play) { Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, sModelInfo[this->actor.params & 0x7F].animInfoIndex); if ((play->sceneNum == SCENE_MARKET_ALLEY) || (play->sceneNum == SCENE_MARKET_DAY)) { - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actor.uncullZoneScale = 0.0f; } diff --git a/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c index a7421c137..f412e7398 100644 --- a/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c +++ b/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c @@ -106,7 +106,7 @@ void EnIceHono_InitCapturableFlame(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChainCapturableFlame); Actor_SetScale(&this->actor, 0.0074f); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; Actor_SetFocus(&this->actor, 10.0f); Collider_InitCylinder(play, &this->collider); diff --git a/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c index d57ec0d45..48359632c 100644 --- a/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -9,7 +9,7 @@ #include "objects/object_ik/object_ik.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef void (*EnIkDrawFunc)(struct EnIk*, PlayState*); @@ -190,7 +190,7 @@ void func_80A74398(Actor* thisx, PlayState* play) { thisx->update = func_80A75FA0; thisx->draw = func_80A76798; - thisx->flags |= ACTOR_FLAG_10; + thisx->flags |= ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; Collider_InitCylinder(play, &this->bodyCollider); Collider_SetCylinder(play, &this->bodyCollider, thisx, &sCylinderInit); @@ -310,7 +310,7 @@ void func_80A747C0(EnIk* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_WAKEUP); } if (SkelAnime_Update(&this->skelAnime)) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE; func_80A74AAC(this); } } @@ -318,7 +318,7 @@ void func_80A747C0(EnIk* this, PlayState* play) { void func_80A7489C(EnIk* this) { f32 frames = Animation_GetLastFrame(&object_ik_Anim_00DD50); - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE; this->unk_2F8 = 4; this->actor.speedXZ = 0.0f; Animation_Change(&this->skelAnime, &object_ik_Anim_00DD50, 0.0f, 0.0f, frames, ANIMMODE_LOOP, 4.0f); @@ -1429,7 +1429,7 @@ void func_80A780D0(EnIk* this, PlayState* play) { void func_80A78160(EnIk* this, PlayState* play) { this->actor.update = func_80A75FA0; this->actor.draw = func_80A76798; - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE; gSaveContext.eventChkInf[3] |= 0x800; Actor_SetScale(&this->actor, 0.012f); func_80A7489C(this); diff --git a/soh/src/overlays/actors/ovl_En_In/z_en_in.c b/soh/src/overlays/actors/ovl_En_In/z_en_in.c index 246a0f3ac..204c62f09 100644 --- a/soh/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/soh/src/overlays/actors/ovl_En_In/z_en_in.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_Horse/z_en_horse.h" #include "objects/object_in/object_in.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnIn_Init(Actor* thisx, PlayState* play); void EnIn_Destroy(Actor* thisx, PlayState* play); @@ -471,7 +471,7 @@ void func_80A79C78(EnIn* this, PlayState* play) { player->rideActor->freezeTimer = 10; } player->actor.freezeTimer = 10; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; ShrinkWindow_SetVal(0x20); Interface_ChangeAlpha(2); } @@ -700,10 +700,10 @@ void func_80A7A568(EnIn* this, PlayState* play) { void func_80A7A770(EnIn* this, PlayState* play) { if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; } else if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { Rupees_ChangeBy(-50); - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; EnIn_ChangeAnim(this, ENIN_ANIM_3); this->actionFunc = func_80A7A848; gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x0F) | 7; @@ -736,7 +736,7 @@ void func_80A7A848(EnIn* this, PlayState* play) { void func_80A7A940(EnIn* this, PlayState* play) { if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; return; } if (this->unk_1EC != 0) { @@ -746,7 +746,7 @@ void func_80A7A940(EnIn* this, PlayState* play) { } } if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; func_80A79BAC(this, play, 2, 0x26); gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0002; gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000; diff --git a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 8e1604e9a..877f57ba4 100644 --- a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -189,7 +189,7 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) { if (this->unk_314 & 4) { this->unk_31C = Rand_S16Offset(200, 40); - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } if (temp_s2 == 2 || temp_s2 == 3) { diff --git a/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index ca69b2fa4..2fcc58949 100644 --- a/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -10,7 +10,7 @@ #include "vt.h" -#define FLAGS ACTOR_FLAG_23 +#define FLAGS ACTOR_FLAG_ALWAYS_THROWN void EnIshi_Init(Actor* thisx, PlayState* play); void EnIshi_Destroy(Actor* thisx, PlayState* play); @@ -391,7 +391,7 @@ void EnIshi_Wait(EnIshi* this, PlayState* play) { void EnIshi_SetupLiftedUp(EnIshi* this) { this->actionFunc = EnIshi_LiftedUp; this->actor.room = -1; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } void EnIshi_LiftedUp(EnIshi* this, PlayState* play) { diff --git a/soh/src/overlays/actors/ovl_En_Jj/z_en_jj.c b/soh/src/overlays/actors/ovl_En_Jj/z_en_jj.c index fbea8b130..b0b560530 100644 --- a/soh/src/overlays/actors/ovl_En_Jj/z_en_jj.c +++ b/soh/src/overlays/actors/ovl_En_Jj/z_en_jj.c @@ -8,7 +8,7 @@ #include "objects/object_jj/object_jj.h" #include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) typedef enum { /* 0 */ JABUJABU_EYE_OPEN, diff --git a/soh/src/overlays/actors/ovl_En_Js/z_en_js.c b/soh/src/overlays/actors/ovl_En_Js/z_en_js.c index 12f443ec3..9b558f3fc 100644 --- a/soh/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/soh/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -7,7 +7,7 @@ #include "z_en_js.h" #include "objects/object_js/object_js.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnJs_Init(Actor* thisx, PlayState* play); void EnJs_Destroy(Actor* thisx, PlayState* play); @@ -106,7 +106,7 @@ void func_80A89008(EnJs* this) { void func_80A89078(EnJs* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { func_80A89008(this); - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } } @@ -122,7 +122,7 @@ void func_80A8910C(EnJs* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { this->actor.textId = 0x6078; En_Js_SetupAction(this, func_80A890C0); - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; } } diff --git a/soh/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c b/soh/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c index e17edf9e1..306e34100 100644 --- a/soh/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c +++ b/soh/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c @@ -7,7 +7,7 @@ #include "z_en_jsjutan.h" #include "overlays/actors/ovl_En_Bom/z_en_bom.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnJsjutan_Init(Actor* thisx, PlayState* play); void EnJsjutan_Destroy(Actor* thisx, PlayState* play); @@ -41,7 +41,7 @@ void EnJsjutan_Init(Actor* thisx, PlayState* play) { s32 pad; CollisionHeader* header = NULL; - this->dyna.actor.flags &= ~ACTOR_FLAG_0; + this->dyna.actor.flags &= ~ACTOR_FLAG_TARGETABLE; DynaPolyActor_Init(&this->dyna, DPM_UNK); CollisionHeader_GetVirtual(&sCol, &header); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, header); diff --git a/soh/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/soh/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index 10baf4b03..376a647dd 100644 --- a/soh/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/soh/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_ka/object_ka.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnKakasi_Init(Actor* thisx, PlayState* play); void EnKakasi_Destroy(Actor* thisx, PlayState* play); @@ -74,7 +74,7 @@ void EnKakasi_Init(Actor* thisx, PlayState* play) { SkelAnime_InitFlex(play, &this->skelanime, &object_ka_Skel_0065B0, &object_ka_Anim_000214, NULL, NULL, 0); this->rot = this->actor.world.rot; - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); diff --git a/soh/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c b/soh/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c index a61323f38..63dcbc6c3 100644 --- a/soh/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c +++ b/soh/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_ka/object_ka.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25 | ACTOR_FLAG_27) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA | ACTOR_FLAG_NO_LOCKON) static ColliderCylinderInit sCylinderInit = { { @@ -90,7 +90,7 @@ void EnKakasi2_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->height = 60.0f; Actor_SetScale(&this->actor, 0.01f); - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; this->unk_198 = this->actor.shape.rot.y; if (this->switchFlag >= 0 && Flags_GetSwitch(play, this->switchFlag)) { @@ -128,7 +128,7 @@ void func_80A90264(EnKakasi2* this, PlayState* play) { Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); SkelAnime_InitFlex(play, &this->skelAnime, &object_ka_Skel_0065B0, &object_ka_Anim_000214, NULL, NULL, 0); OnePointCutscene_Attention(play, &this->actor); - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_27; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_NO_LOCKON; func_80078884(NA_SE_SY_CORRECT_CHIME); if (this->switchFlag >= 0) { @@ -156,7 +156,7 @@ void func_80A90264(EnKakasi2* this, PlayState* play) { OnePointCutscene_Attention(play, &this->actor); func_80078884(NA_SE_SY_CORRECT_CHIME); - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_27; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_NO_LOCKON; this->actionFunc = func_80A904D8; } } diff --git a/soh/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/soh/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c index 6d000d6fe..8b79f1122 100644 --- a/soh/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/soh/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_ka/object_ka.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnKakasi3_Init(Actor* thisx, PlayState* play); void EnKakasi3_Destroy(Actor* thisx, PlayState* play); @@ -77,7 +77,7 @@ void EnKakasi3_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); SkelAnime_InitFlex(play, &this->skelAnime, &object_ka_Skel_0065B0, &object_ka_Anim_000214, NULL, NULL, 0); - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_DRAGGED_BY_HOOKSHOT; this->rot = this->actor.world.rot; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); diff --git a/soh/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/soh/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c index ea587972e..4250404ec 100644 --- a/soh/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/soh/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -9,7 +9,7 @@ #include "objects/object_kanban/object_kanban.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) #define PART_UPPER_LEFT (1 << 0) #define PART_LEFT_UPPER (1 << 1) @@ -197,7 +197,7 @@ void EnKanban_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.01f); if (this->actor.params != ENKANBAN_PIECE) { this->actor.targetMode = 0; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); osSyncPrintf("KANBAN ARG %x\n", this->actor.params); @@ -269,7 +269,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) { this->zTargetTimer--; } if (this->zTargetTimer == 1) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } if (this->partFlags == 0xFFFF) { EnKanban_Message(this, play); @@ -387,8 +387,8 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) { piece->direction = -1; } piece->airTimer = 100; - piece->actor.flags &= ~ACTOR_FLAG_0; - piece->actor.flags |= ACTOR_FLAG_25; + piece->actor.flags &= ~ACTOR_FLAG_TARGETABLE; + piece->actor.flags |= ACTOR_FLAG_NO_FREEZE_OCARINA; this->cutMarkTimer = 5; Audio_PlayActorSound2(&this->actor, NA_SE_IT_SWORD_STRIKE); } @@ -399,7 +399,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); if (this->actor.xzDistToPlayer > 500.0f) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->partFlags = 0xFFFF; } if (this->cutMarkTimer != 0) { @@ -755,7 +755,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) { ((pDiff + yDiff + rDiff + this->spinRot.x + this->spinRot.z) == 0) && (this->floorRot.x == 0.0f) && (this->floorRot.z == 0.0f)) { signpost->partFlags |= this->partFlags; - signpost->actor.flags |= ACTOR_FLAG_0; + signpost->actor.flags |= ACTOR_FLAG_TARGETABLE; Actor_Kill(&this->actor); } } break; diff --git a/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index 6632b949b..5d7712fb3 100644 --- a/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) void EnKarebaba_Init(Actor* thisx, PlayState* play); void EnKarebaba_Destroy(Actor* thisx, PlayState* play); @@ -180,7 +180,7 @@ void EnKarebaba_SetupDying(EnKarebaba* this) { this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; this->actor.speedXZ = 3.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKU_JR_DEAD); - this->actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED; this->actionFunc = EnKarebaba_Dying; gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_WITHERED_DEKU_BABA]++; } @@ -194,7 +194,7 @@ void EnKarebaba_SetupDeadItemDrop(EnKarebaba* this, PlayState* play) { this->actor.shape.shadowScale = 3.0f; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_MISC); this->actor.params = 200; - this->actor.flags &= ~ACTOR_FLAG_5; + this->actor.flags &= ~ACTOR_FLAG_DRAW_WHILE_CULLED; this->actionFunc = EnKarebaba_DeadItemDrop; } @@ -331,7 +331,7 @@ void EnKarebaba_Dying(EnKarebaba* this, PlayState* play) { if (this->actor.scale.x > 0.005f && ((this->actor.bgCheckFlags & 2) || (this->actor.bgCheckFlags & 8))) { this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 0.0f; this->actor.speedXZ = 0.0f; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 3.0f, 0, 12, 5, 15, HAHEN_OBJECT_DEFAULT, 10, NULL); } @@ -403,8 +403,8 @@ void EnKarebaba_Regrow(EnKarebaba* this, PlayState* play) { this->actor.world.pos.y = this->actor.home.pos.y + (14.0f * scaleFactor); if (this->actor.params == 20) { - this->actor.flags &= ~ACTOR_FLAG_4; - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); EnKarebaba_SetupIdle(this); } diff --git a/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c index 6dec44fe6..f12e16c63 100644 --- a/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -12,7 +12,7 @@ #include "vt.h" #include "soh/Enhancements/randomizer/adult_trade_shuffle.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) #define ENKO_TYPE (this->actor.params & 0xFF) #define ENKO_PATH ((this->actor.params & 0xFF00) >> 8) @@ -1105,9 +1105,9 @@ void func_80A98DB4(EnKo* this, PlayState* play) { } if (this->modelAlpha < 10.0f) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } } @@ -1151,7 +1151,7 @@ void EnKo_Destroy(Actor* thisx, PlayState* play) { void func_80A99048(EnKo* this, PlayState* play) { if (EnKo_IsOsAnimeLoaded(this, play) && EnKo_AreObjectsLoaded(this, play)) { - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actor.objBankIndex = this->legsObjectBankIdx; gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->actor.objBankIndex].segment); SkelAnime_InitFlex(play, &this->skelAnime, sSkeleton[sModelInfo[ENKO_TYPE].legsId].flexSkeletonHeader, diff --git a/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c index 016dae619..3f561ea5c 100644 --- a/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -11,7 +11,7 @@ #include "objects/object_kusa/object_kusa.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_23) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_ALWAYS_THROWN) void EnKusa_Init(Actor* thisx, PlayState* play); void EnKusa_Destroy(Actor* thisx, PlayState* play); @@ -290,13 +290,13 @@ void EnKusa_WaitObject(EnKusa* this, PlayState* play) { this->actor.draw = EnKusa_Draw; this->actor.objBankIndex = this->objBankIndex; - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; } } void EnKusa_SetupMain(EnKusa* this) { EnKusa_SetupAction(this, EnKusa_Main); - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; } void EnKusa_Main(EnKusa* this, PlayState* play) { @@ -345,7 +345,7 @@ void EnKusa_Main(EnKusa* this, PlayState* play) { void EnKusa_SetupLiftedUp(EnKusa* this) { EnKusa_SetupAction(this, EnKusa_LiftedUp); this->actor.room = -1; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } void EnKusa_LiftedUp(EnKusa* this, PlayState* play) { diff --git a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 30a8d39b9..853214f01 100644 --- a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -8,7 +8,7 @@ #include "objects/object_kz/object_kz.h" #include "soh/Enhancements/randomizer/adult_trade_shuffle.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnKz_Init(Actor* thisx, PlayState* play); void EnKz_Destroy(Actor* thisx, PlayState* play); @@ -216,11 +216,11 @@ s32 func_80A9C95C(PlayState* play, EnKz* this, s16* talkState, f32 unkf, NpcGetT yaw = Math_Vec3f_Yaw(&this->actor.home.pos, &player->actor.world.pos); yaw -= this->actor.shape.rot.y; if ((fabsf(yaw) > 1638.0f) || (this->actor.xzDistToPlayer < 265.0f)) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; return 0; } - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; Actor_GetScreenPos(play, &this->actor, &sp32, &sp30); if (!((sp32 >= -30) && (sp32 < 361) && (sp30 >= -10) && (sp30 < 241))) { diff --git a/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c b/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c index 6502bbd69..c6246b6c9 100644 --- a/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c +++ b/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c @@ -7,7 +7,7 @@ #include "z_en_lightbox.h" #include "objects/object_lightbox/object_lightbox.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnLightbox_Init(Actor* thisx, PlayState* play); void EnLightbox_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index cbf7c2bc4..b7c90046d 100644 --- a/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -7,7 +7,7 @@ #include "z_en_ma1.h" #include "objects/object_ma1/object_ma1.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnMa1_Init(Actor* thisx, PlayState* play); void EnMa1_Destroy(Actor* thisx, PlayState* play); @@ -426,7 +426,7 @@ void func_80AA0F44(EnMa1* this, PlayState* play) { this->actor.textId = 0x2061; Message_StartTextbox(play, this->actor.textId, NULL); this->interactInfo.talkState = NPC_TALK_STATE_TALKING; - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; // when rando'ed, skip to the Item Giving. Otherwise go to the song teaching code. this->actionFunc = gSaveContext.n64ddFlag ? func_80AA1150 : func_80AA106C; } else if (this->actor.xzDistToPlayer < 30.0f + (f32)this->collider.dim.radius) { @@ -448,7 +448,7 @@ void func_80AA106C(EnMa1* this, PlayState* play) { if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { Audio_OcaSetInstrument(2); func_8010BD58(play, OCARINA_ACTION_TEACH_EPONA); - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; this->actionFunc = func_80AA10EC; } } @@ -500,7 +500,7 @@ void func_80AA1150(EnMa1* this, PlayState* play) { // and give the song on next update. func_80078884(NA_SE_SY_CORRECT_CHIME); this->actionFunc = EnMa1_EndTeachSong; - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; play->msgCtx.ocarinaMode = OCARINA_MODE_00; } } diff --git a/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c index 8b7e6f3d5..2a3587809 100644 --- a/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c +++ b/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c @@ -1,7 +1,7 @@ #include "z_en_ma2.h" #include "objects/object_ma2/object_ma2.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnMa2_Init(Actor* thisx, PlayState* play); void EnMa2_Destroy(Actor* thisx, PlayState* play); @@ -257,7 +257,7 @@ void EnMa2_Destroy(Actor* thisx, PlayState* play) { void func_80AA2018(EnMa2* this, PlayState* play) { if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; this->interactInfo.talkState = NPC_TALK_STATE_IDLE; } } @@ -299,10 +299,10 @@ void func_80AA21C8(EnMa2* this, PlayState* play) { player->stateFlags2 |= 0x800000; } else { if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; Message_CloseTextbox(play); } else { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; this->actionFunc = func_80AA2018; } } diff --git a/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c index 429b44e0b..ff2e80692 100644 --- a/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c +++ b/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c @@ -7,7 +7,7 @@ #include "z_en_ma3.h" #include "objects/object_ma2/object_ma2.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnMa3_Init(Actor* thisx, PlayState* play); void EnMa3_Destroy(Actor* thisx, PlayState* play); @@ -82,7 +82,7 @@ u16 func_80AA2AA0(PlayState* play, Actor* thisx) { timer1ValuePtr = &gSaveContext.timer1Value; if (gSaveContext.eventInf[0] & 0x400) { gSaveContext.timer1Value = gSaveContext.timer1Value; - thisx->flags |= ACTOR_FLAG_16; + thisx->flags |= ACTOR_FLAG_WILL_TALK; if (gSaveContext.timer1Value >= 0xD3) { return 0x208E; } @@ -152,7 +152,7 @@ s16 func_80AA2BD4(PlayState* play, Actor* thisx) { } case 0x208E: gSaveContext.eventInf[0] &= ~0x400; - thisx->flags &= ~ACTOR_FLAG_16; + thisx->flags &= ~ACTOR_FLAG_WILL_TALK; ret = NPC_TALK_STATE_IDLE; gSaveContext.timer1State = 0xA; break; @@ -277,7 +277,7 @@ void EnMa3_Destroy(Actor* thisx, PlayState* play) { void func_80AA3200(EnMa3* this, PlayState* play) { if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; this->interactInfo.talkState = NPC_TALK_STATE_IDLE; } } diff --git a/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.c index dd000c6e2..14972871c 100644 --- a/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -7,7 +7,7 @@ #include "z_en_mag.h" #include "objects/object_mag/object_mag.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnMag_Init(Actor* thisx, PlayState* play); void EnMag_InitMq(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Mb/z_en_mb.c b/soh/src/overlays/actors/ovl_En_Mb/z_en_mb.c index b8c7bfc19..644614d4b 100644 --- a/soh/src/overlays/actors/ovl_En_Mb/z_en_mb.c +++ b/soh/src/overlays/actors/ovl_En_Mb/z_en_mb.c @@ -14,7 +14,7 @@ * - "Spear Patrol" (variable 0xPP00 PP=pathId): uses a spear, patrols following a path, charges */ -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) typedef enum { /* -1 */ ENMB_TYPE_SPEAR_GUARD = -1, @@ -308,7 +308,7 @@ void EnMb_Init(Actor* thisx, PlayState* play) { } ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFeet, 90.0f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.naviEnemyId += 1; EnMb_SetupClubWaitPlayerNear(this); break; @@ -324,7 +324,7 @@ void EnMb_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.mass = MASS_HEAVY; this->maxHomeDist = 350.0f; this->playerDetectionRange = 1750.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnMb_SetupSpearPatrolTurnTowardsWaypoint(this, play); break; } @@ -584,7 +584,7 @@ void EnMb_SetupClubDamagedWhileKneeling(EnMb* this) { void EnMb_SetupClubDead(EnMb* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gEnMbClubFallOnItsBackAnim, -4.0f); this->state = ENMB_STATE_CLUB_DEAD; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->hitbox.dim.height = 80; this->hitbox.dim.radius = 95; this->timer1 = 30; @@ -1164,12 +1164,12 @@ void EnMb_SpearGuardWalk(EnMb* this, PlayState* play) { if (this->timer3 == 0 && Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < this->playerDetectionRange) { Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x2EE, 0); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; if (this->actor.xzDistToPlayer < 500.0f && relYawTowardsPlayer < 0x1388) { EnMb_SetupSpearPrepareAndCharge(this); } } else { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) > this->maxHomeDist || this->timer2 != 0) { yawTowardsHome = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos); Math_SmoothStepToS(&this->actor.world.rot.y, yawTowardsHome, 1, 0x2EE, 0); @@ -1329,7 +1329,7 @@ void EnMb_SetupSpearDead(EnMb* this) { this->timer1 = 30; this->state = ENMB_STATE_SPEAR_SPEARPATH_DAMAGED; Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_DEAD); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnMb_SetupAction(this, EnMb_SpearDead); } diff --git a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c index 72ecf32be..f270eca21 100644 --- a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -8,7 +8,7 @@ #include "objects/object_md/object_md.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnMd_Init(Actor* thisx, PlayState* play); void EnMd_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/soh/src/overlays/actors/ovl_En_Mk/z_en_mk.c index 67399b3d6..b8fda33a2 100644 --- a/soh/src/overlays/actors/ovl_En_Mk/z_en_mk.c +++ b/soh/src/overlays/actors/ovl_En_Mk/z_en_mk.c @@ -8,7 +8,7 @@ #include "objects/object_mk/object_mk.h" #include "soh/Enhancements/randomizer/adult_trade_shuffle.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnMk_Init(Actor* thisx, PlayState* play); void EnMk_Destroy(Actor* thisx, PlayState* play); @@ -85,7 +85,7 @@ void EnMk_Destroy(Actor* thisx, PlayState* play) { void func_80AACA40(EnMk* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; this->actionFunc = EnMk_Wait; } diff --git a/soh/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/soh/src/overlays/actors/ovl_En_Mm/z_en_mm.c index bd5f3107a..c593b96f7 100644 --- a/soh/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/soh/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -8,7 +8,7 @@ #include "objects/object_mm/object_mm.h" #include "objects/object_link_child/object_link_child.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) typedef enum { /* 0 */ RM_ANIM_RUN, diff --git a/soh/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c b/soh/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c index f567727c5..ad940c115 100644 --- a/soh/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c +++ b/soh/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_mm/object_mm.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) typedef enum { /* 0 */ RM2_ANIM_RUN, diff --git a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 923cb5011..039e7297f 100644 --- a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -7,7 +7,7 @@ #include "z_en_ms.h" #include "objects/object_ms/object_ms.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnMs_Init(Actor* thisx, PlayState* play); void EnMs_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c b/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c index df18d4ff0..2af75934c 100644 --- a/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c +++ b/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c @@ -7,7 +7,7 @@ #include "z_en_mu.h" #include "objects/object_mu/object_mu.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnMu_Init(Actor* thisx, PlayState* play); void EnMu_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c index 560cb6cfa..b92ddd8af 100644 --- a/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -9,7 +9,7 @@ #include "objects/object_nb/object_nb.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef enum { /* 0x00 */ NB_CHAMBER_INIT, @@ -1113,7 +1113,7 @@ void EnNb_CrawlspaceSpawnCheck(EnNb* this, PlayState* play) { } else { EnNb_SetCurrentAnim(this, &gNabooruStandingHandsOnHipsAnim, 0, 0.0f, 0); this->headTurnFlag = 1; - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; this->actor.world.pos = this->finalPos; this->action = NB_IDLE_AFTER_TALK; this->drawMode = NB_DRAW_DEFAULT; @@ -1192,7 +1192,7 @@ void EnNb_SetupIdleCrawlspace(EnNb* this, s32 animFinished) { if (animFinished) { EnNb_SetCurrentAnim(this, &gNabooruStandingHandsOnHipsAnim, 0, -8.0f, 0); this->headTurnFlag = 1; - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; this->action = NB_IDLE_CRAWLSPACE; } } @@ -1201,7 +1201,7 @@ void func_80AB3838(EnNb* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, play)) { this->action = NB_IN_DIALOG; } else { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; if (!(gSaveContext.infTable[22] & 0x1000)) { this->actor.textId = 0x601D; @@ -1217,7 +1217,7 @@ void EnNb_SetupPathMovement(EnNb* this, PlayState* play) { EnNb_SetCurrentAnim(this, &gNabooruStandingToWalkingTransitionAnim, 2, -8.0f, 0); gSaveContext.eventChkInf[9] |= 0x10; this->action = NB_IN_PATH; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); } void EnNb_SetTextIdAsChild(EnNb* this, PlayState* play) { @@ -1237,7 +1237,7 @@ void EnNb_SetTextIdAsChild(EnNb* this, PlayState* play) { } this->action = NB_IDLE_CRAWLSPACE; } - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); } else if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) { choiceIndex = play->msgCtx.choiceIndex; @@ -1293,7 +1293,7 @@ void func_80AB3B04(EnNb* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, play)) { this->action = NB_ACTION_30; } else { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; this->actor.textId = Text_GetFaceReaction(play, 0x23); if ((this->actor.textId) == 0) { @@ -1307,7 +1307,7 @@ void func_80AB3B04(EnNb* this, PlayState* play) { void func_80AB3B7C(EnNb* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { this->action = NB_IDLE_AFTER_TALK; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); } } diff --git a/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c index e36296654..d84c5423f 100644 --- a/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -10,7 +10,7 @@ #include "vt.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_23) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_ALWAYS_THROWN) void EnNiw_Init(Actor* thisx, PlayState* play); void EnNiw_Destroy(Actor* thisx, PlayState* play); @@ -153,7 +153,7 @@ void EnNiw_Init(Actor* thisx, PlayState* play) { } Actor_ProcessInitChain(&this->actor, sInitChain); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoSkel, &gCuccoAnim, this->jointTable, this->morphTable, 16); @@ -213,7 +213,7 @@ void EnNiw_Init(Actor* thisx, PlayState* play) { this->actor.gravity = 0.0f; case 0xE: this->actor.colChkInfo.mass = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; break; case 4: this->actor.gravity = 0.0f; @@ -462,7 +462,7 @@ void func_80AB6450(EnNiw* this, PlayState* play) { this->sfxTimer1 = 30; this->path = 0; this->timer4 = 30; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 0.0f; this->actionFunc = func_80AB6BF8; } else { @@ -484,7 +484,7 @@ void func_80AB6570(EnNiw* this, PlayState* play) { this->sfxTimer1 = 30; this->path = 0; this->timer4 = 30; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 0.0f; this->actionFunc = func_80AB6BF8; return; @@ -641,7 +641,7 @@ void func_80AB6BF8(EnNiw* this, PlayState* play) { this->actor.shape.rot.z = 0; this->actor.shape.rot.y = this->actor.shape.rot.z; this->actor.shape.rot.x = this->actor.shape.rot.z; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionFunc = func_80AB6D08; } func_80AB5BF8(this, play, 2); @@ -689,7 +689,7 @@ void func_80AB6D08(EnNiw* this, PlayState* play) { this->sfxTimer1 = 30; this->path = 0; this->timer4 = 30; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 0.0f; this->actionFunc = func_80AB6BF8; } else { @@ -802,7 +802,7 @@ void func_80AB714C(EnNiw* this, PlayState* play) { if (this->timer5 == 0) { this->timer7 = 10; this->unk_2E4 = this->actor.yawTowardsPlayer; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = func_80AB7204; } diff --git a/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c index db41089e8..b0ba52947 100644 --- a/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c +++ b/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c @@ -8,7 +8,7 @@ #include "objects/object_gr/object_gr.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnNiwGirl_Init(Actor* thisx, PlayState* play); void EnNiwGirl_Destroy(Actor* thisx, PlayState* play); @@ -101,7 +101,7 @@ void EnNiwGirl_Destroy(Actor* thisx, PlayState* play) { void EnNiwGirl_Jump(EnNiwGirl* this, PlayState* play) { f32 frameCount = Animation_GetLastFrame(&gNiwGirlRunAnim); Animation_Change(&this->skelAnime, &gNiwGirlRunAnim, 1.0f, 0.0f, frameCount, 0, -10.0f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = func_80AB9210; } @@ -142,7 +142,7 @@ void func_80AB9210(EnNiwGirl* this, PlayState* play) { void EnNiwGirl_Talk(EnNiwGirl* this, PlayState* play) { Animation_Change(&this->skelAnime, &gNiwGirlJumpAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gNiwGirlJumpAnim), 0, -10.0f); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.textId = 0x7000; if ((gSaveContext.eventChkInf[8] & 1) && (this->unk_27A == 0)) { this->actor.textId = 0x70EA; diff --git a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index 088381c70..50df2657a 100644 --- a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -5,7 +5,7 @@ #include "vt.h" #include "soh/Enhancements/randomizer/adult_trade_shuffle.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnNiwLady_Init(Actor* thisx, PlayState* play); void EnNiwLady_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/soh/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c index be2fd2ec5..d2500afaf 100644 --- a/soh/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c +++ b/soh/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c @@ -13,7 +13,7 @@ #include "objects/object_dns/object_dns.h" #include "objects/object_dnk/object_dnk.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnNutsball_Init(Actor* thisx, PlayState* play); void EnNutsball_Destroy(Actor* thisx, PlayState* play); @@ -163,7 +163,7 @@ void EnNutsball_Update(Actor* thisx, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 10, sCylinderInit.dim.radius, sCylinderInit.dim.height, 5); Collider_UpdateCylinder(&this->actor, &this->collider); - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); diff --git a/soh/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c b/soh/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c index 38aff1f83..963f54b96 100644 --- a/soh/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c +++ b/soh/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c @@ -8,7 +8,7 @@ #include "objects/object_nwc/object_nwc.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnNwc_Init(Actor* thisx, PlayState* play); void EnNwc_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Ny/z_en_ny.c b/soh/src/overlays/actors/ovl_En_Ny/z_en_ny.c index 725064e21..3da032633 100644 --- a/soh/src/overlays/actors/ovl_En_Ny/z_en_ny.c +++ b/soh/src/overlays/actors/ovl_En_Ny/z_en_ny.c @@ -2,7 +2,7 @@ #include "objects/object_ny/object_ny.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) void EnNy_Init(Actor* thisx, PlayState* play); void EnNy_Destroy(Actor* thisx, PlayState* play); @@ -333,7 +333,7 @@ s32 EnNy_CollisionCheck(EnNy* this, PlayState* play) { this->stoneTimer = 0; if (this->actor.colChkInfo.health == 0) { this->actor.shape.shadowAlpha = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unk_1D0 = sp3F; Enemy_StartFinishingBlow(play, &this->actor); return 1; diff --git a/soh/src/overlays/actors/ovl_En_OE2/z_en_oe2.c b/soh/src/overlays/actors/ovl_En_OE2/z_en_oe2.c index 7ff6d8727..b8ea6092e 100644 --- a/soh/src/overlays/actors/ovl_En_OE2/z_en_oe2.c +++ b/soh/src/overlays/actors/ovl_En_OE2/z_en_oe2.c @@ -6,7 +6,7 @@ #include "z_en_oe2.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnOE2_Init(Actor* thisx, PlayState* play); void EnOE2_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c b/soh/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c index 68802026e..07172972b 100644 --- a/soh/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c +++ b/soh/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c @@ -7,7 +7,7 @@ #include "z_en_okarina_effect.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnOkarinaEffect_Init(Actor* thisx, PlayState* play); void EnOkarinaEffect_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c b/soh/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c index 3c4b769cc..ad5283c63 100644 --- a/soh/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c +++ b/soh/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c @@ -9,7 +9,7 @@ #include "scenes/overworld/spot02/spot02_scene.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnOkarinaTag_Init(Actor* thisx, PlayState* play); void EnOkarinaTag_Destroy(Actor* thisx, PlayState* play); @@ -47,7 +47,7 @@ void EnOkarinaTag_Init(Actor* thisx, PlayState* play) { osSyncPrintf("\n\n"); // "Ocarina tag outbreak" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ オカリナタグ発生 ☆☆☆☆☆ %x\n" VT_RST, this->actor.params); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->type = (this->actor.params >> 0xA) & 0x3F; this->ocarinaSong = (this->actor.params >> 6) & 0xF; this->switchFlag = this->actor.params & 0x3F; @@ -112,7 +112,7 @@ void func_80ABEF2C(EnOkarinaTag* this, PlayState* play) { player = GET_PLAYER(play); this->unk_15A++; if ((this->switchFlag >= 0) && (Flags_GetSwitch(play, this->switchFlag))) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else { if ((this->ocarinaSong != 6) || (gSaveContext.scarecrowSpawnSongSet)) { if (player->stateFlags2 & 0x1000000) { @@ -191,7 +191,7 @@ void func_80ABF28C(EnOkarinaTag* this, PlayState* play) { this->unk_15A++; if ((this->ocarinaSong != 6) || (gSaveContext.scarecrowSpawnSongSet)) { if ((this->switchFlag >= 0) && Flags_GetSwitch(play, this->switchFlag)) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else if (((this->type != 4) || !(gSaveContext.eventChkInf[4] & 0x800)) && ((this->type != 6) || !(gSaveContext.eventChkInf[1] & 0x2000)) && (this->actor.xzDistToPlayer < (90.0f + this->interactRange)) && diff --git a/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c b/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c index 9d958d0c5..e1f9777ab 100644 --- a/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c +++ b/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c @@ -2,7 +2,7 @@ #include "objects/object_okuta/object_okuta.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) void EnOkuta_Init(Actor* thisx, PlayState* play); void EnOkuta_Destroy(Actor* thisx, PlayState* play); @@ -147,8 +147,8 @@ void EnOkuta_Init(Actor* thisx, PlayState* play) { EnOkuta_SetupWaitToAppear(this); } else { ActorShape_Init(&thisx->shape, 1100.0f, ActorShadow_DrawCircle, 18.0f); - thisx->flags &= ~ACTOR_FLAG_0; - thisx->flags |= ACTOR_FLAG_4; + thisx->flags &= ~ACTOR_FLAG_TARGETABLE; + thisx->flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, thisx, &sProjectileColliderInit); Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_PROP); @@ -203,7 +203,7 @@ void EnOkuta_SpawnRipple(EnOkuta* this, PlayState* play) { void EnOkuta_SetupWaitToAppear(EnOkuta* this) { this->actor.draw = NULL; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnOkuta_WaitToAppear; this->actor.world.pos.y = this->actor.home.pos.y; } @@ -211,7 +211,7 @@ void EnOkuta_SetupWaitToAppear(EnOkuta* this) { void EnOkuta_SetupAppear(EnOkuta* this, PlayState* play) { this->actor.draw = EnOkuta_Draw; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; Animation_PlayOnce(&this->skelAnime, &gOctorokAppearAnim); EnOkuta_SpawnBubbles(this, play); this->actionFunc = EnOkuta_Appear; @@ -609,7 +609,7 @@ void EnOkuta_ColliderCheck(EnOkuta* this, PlayState* play) { if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) { Enemy_StartFinishingBlow(play, &this->actor); this->actor.colChkInfo.health = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (this->actor.colChkInfo.damageEffect == 3) { EnOkuta_SetupFreeze(this); } else { @@ -673,7 +673,7 @@ void EnOkuta_Update(Actor* thisx, PlayState* play2) { this->collider.dim.radius = sOctorockColliderInit.dim.radius * this->actor.scale.x * 100.0f; } if (this->actor.params == 0x10) { - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } if (this->actionFunc != EnOkuta_WaitToAppear) { diff --git a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index d272581ce..163a8b86b 100644 --- a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -15,7 +15,7 @@ #include "objects/object_masterkokirihead/object_masterkokirihead.h" #include "soh/Enhancements/randomizer/randomizer_entrance.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnOssan_Init(Actor* thisx, PlayState* play); void EnOssan_Destroy(Actor* thisx, PlayState* play); @@ -2184,7 +2184,7 @@ void EnOssan_InitActionFunc(EnOssan* this, PlayState* play) { ShopItem* items; if (EnOssan_AreShopkeeperObjectsLoaded(this, play)) { - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actor.objBankIndex = this->objBankIndex1; Actor_SetObjectDependency(play, &this->actor); @@ -2269,7 +2269,7 @@ void EnOssan_InitActionFunc(EnOssan* this, PlayState* play) { this->blinkTimer = 20; this->eyeTextureIdx = 0; this->blinkFunc = EnOssan_WaitForBlink; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnOssan_SetupAction(this, EnOssan_MainActionFunc); } } diff --git a/soh/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/soh/src/overlays/actors/ovl_En_Owl/z_en_owl.c index eb7932aed..a6405304c 100644 --- a/soh/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/soh/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -10,7 +10,7 @@ #include "scenes/overworld/spot16/spot16_scene.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnOwl_Init(Actor* thisx, PlayState* play); void EnOwl_Destroy(Actor* thisx, PlayState* play); @@ -283,7 +283,7 @@ s32 EnOwl_CheckInitTalk(EnOwl* this, PlayState* play, u16 textId, f32 targetDist this->actor.textId = textId; distCheck = (flags & 2) ? 200.0f : 1000.0f; if (this->actor.xzDistToPlayer < targetDist) { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; func_8002F1C4(&this->actor, play, targetDist, distCheck, 0); } return false; @@ -349,7 +349,7 @@ void func_80ACA76C(EnOwl* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF); func_80ACA62C(this, play); - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } } @@ -365,7 +365,7 @@ void func_80ACA7E0(EnOwl* this, PlayState* play) { func_80ACA71C(this); this->actionFunc = func_80ACA690; } - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } } @@ -569,7 +569,7 @@ void func_80ACB03C(EnOwl* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF); func_80ACA62C(this, play); - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } } @@ -858,7 +858,7 @@ void func_80ACBAB8(EnOwl* this, PlayState* play) { } void func_80ACBC0C(EnOwl* this, PlayState* play) { - this->actor.flags |= ACTOR_FLAG_5; + this->actor.flags |= ACTOR_FLAG_DRAW_WHILE_CULLED; if (this->actor.xzDistToPlayer > 6000.0f && !(this->actionFlags & 0x80)) { Actor_Kill(&this->actor); diff --git a/soh/src/overlays/actors/ovl_En_Part/z_en_part.c b/soh/src/overlays/actors/ovl_En_Part/z_en_part.c index 9a40e7f7f..e1b65efca 100644 --- a/soh/src/overlays/actors/ovl_En_Part/z_en_part.c +++ b/soh/src/overlays/actors/ovl_En_Part/z_en_part.c @@ -8,7 +8,7 @@ #include "objects/object_tite/object_tite.h" #include "objects/object_ik/object_ik.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnPart_Init(Actor* thisx, PlayState* play); void EnPart_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c b/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c index e3c5028e5..c7133f190 100644 --- a/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c +++ b/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c @@ -12,7 +12,7 @@ #include #include -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_10 | ACTOR_FLAG_26) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT | ACTOR_FLAG_CAN_PRESS_SWITCH) void EnPartner_Init(Actor* thisx, PlayState* play); void EnPartner_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index ec1bcd28b..16f447da0 100644 --- a/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -3,7 +3,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_24) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_PLAY_HIT_SFX) #define GROUND_HOVER_HEIGHT 75.0f #define MAX_LARVA 3 @@ -225,7 +225,7 @@ void EnPeehat_Init(Actor* thisx, PlayState* play) { this->xzDistToRise = 2800.0f; this->xzDistMax = 1400.0f; EnPeehat_Flying_SetStateGround(this); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; break; case PEAHAT_TYPE_LARVA: this->actor.scale.x = this->actor.scale.z = 0.006f; @@ -328,7 +328,7 @@ void EnPeehat_Ground_StateGround(EnPeehat* this, PlayState* play) { // Keep the peahat as the version that doesn't spawn extra enemies and can actually be killed // when Enemy Randomizer is on. if (IS_DAY || CVarGetInteger("gRandomizedEnemies", 0)) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; if (this->riseDelayTimer == 0) { if (this->actor.xzDistToPlayer < this->xzDistToRise) { EnPeehat_Ground_SetStateRise(this); @@ -338,7 +338,7 @@ void EnPeehat_Ground_StateGround(EnPeehat* this, PlayState* play) { this->riseDelayTimer--; } } else { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Math_SmoothStepToF(&this->actor.shape.yOffset, -1000.0f, 1.0f, 50.0f, 0.0f); if (this->unk_2D4 != 0) { this->unk_2D4--; @@ -988,7 +988,7 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->colQuad.base); } // if PEAHAT_TYPE_GROUNDED - if (thisx->params < 0 && (thisx->flags & ACTOR_FLAG_6)) { + if (thisx->params < 0 && (thisx->flags & ACTOR_FLAG_ACTIVE)) { for (i = 1; i >= 0; i--) { Vec3f posResult; CollisionPoly* poly = NULL; diff --git a/soh/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c b/soh/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c index 8c2e6d569..55155226b 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c +++ b/soh/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c @@ -7,7 +7,7 @@ #include "z_en_po_desert.h" #include "objects/object_po_field/object_po_field.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_7 | ACTOR_FLAG_12) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_LENS | ACTOR_FLAG_IGNORE_QUAKE) void EnPoDesert_Init(Actor* thisx, PlayState* play); void EnPoDesert_Destroy(Actor* thisx, PlayState* play); @@ -201,11 +201,11 @@ void EnPoDesert_Update(Actor* thisx, PlayState* play) { Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); if (play->actorCtx.lensActive) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_LENS; this->actor.shape.shadowDraw = ActorShadow_DrawCircle; } else { this->actor.shape.shadowDraw = NULL; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_7); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_LENS); } } @@ -218,7 +218,7 @@ s32 EnPoDesert_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec mtxScale = this->actionTimer / 16.0f; Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); } - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_LENS)) { *dList = NULL; } return false; @@ -239,7 +239,7 @@ void EnPoDesert_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* color.r = (s16)(rand * 30.0f) + 225; color.g = (s16)(rand * 100.0f) + 155; color.b = (s16)(rand * 160.0f) + 95; - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_LENS)) { gDPPipeSync((*gfxP)++); gDPSetEnvColor((*gfxP)++, color.r, color.g, color.b, 255); gSPMatrix((*gfxP)++, MATRIX_NEWMTX(play->state.gfxCtx), diff --git a/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index 882ea5baf..2e946ac6d 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -10,7 +10,7 @@ #include -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_12) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_IGNORE_QUAKE) void EnPoField_Init(Actor* thisx, PlayState* play); void EnPoField_Destroy(Actor* thisx, PlayState* play); @@ -199,7 +199,7 @@ void EnPoField_SetupWaitForSpawn(EnPoField* this, PlayState* play) { Lights_PointSetColorAndRadius(&this->lightInfo, 0, 0, 0, 0); this->actionTimer = 200; Actor_SetScale(&this->actor, 0.0f); - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_16); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_WILL_TALK); this->collider.base.acFlags &= ~AC_ON; this->collider.base.ocFlags1 = OC1_ON | OC1_TYPE_ALL; this->actor.colChkInfo.health = D_80AD70D8.health; @@ -248,7 +248,7 @@ void EnPoField_SetupCirclePlayer(EnPoField* this, PlayState* play) { Math_Vec3f_Copy(&this->actor.home.pos, &player->actor.world.pos); this->actor.world.rot.y = this->actor.yawTowardsPlayer; if (this->actionFunc != EnPoField_Damage) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionTimer = 600; this->unk_194 = 32; } @@ -261,7 +261,7 @@ void EnPoField_SetupFlee(EnPoField* this) { this->actionFunc = EnPoField_Flee; this->actor.speedXZ = 12.0f; if (this->actionFunc != EnPoField_Damage) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; this->actionTimer = 2000; this->unk_194 = 32; @@ -283,7 +283,7 @@ void EnPoField_SetupDamage(EnPoField* this) { void EnPoField_SetupDeath(EnPoField* this) { this->actionTimer = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.naviEnemyId = 0xFF; @@ -349,7 +349,7 @@ void func_80AD4384(EnPoField* this) { this->actor.textId = 0x5005; this->actionTimer = 400; this->unk_194 = 32; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionFunc = func_80AD58D4; } @@ -667,15 +667,15 @@ void func_80AD58D4(EnPoField* this, PlayState* play) { } if (this->actionTimer == 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH); - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; EnPoField_SetupSoulDisappear(this); return; } if (this->collider.base.ocFlags1 & OC1_HIT) { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; func_8002F2F4(&this->actor, play); } else { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); } this->actor.world.pos.y = Math_SinS(this->unk_194 * 0x800) * 5.0f + this->actor.home.pos.y; diff --git a/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c index 7db0fcc16..df1b79652 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c +++ b/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Honotrap/z_en_honotrap.h" #include "objects/object_tk/object_tk.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_12 | ACTOR_FLAG_16) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_WILL_TALK) void EnPoRelay_Init(Actor* thisx, PlayState* play); void EnPoRelay_Destroy(Actor* thisx, PlayState* play); @@ -146,14 +146,14 @@ void EnPoRelay_SetupRace(EnPoRelay* this) { this->hookshotSlotFull = (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE && !gSaveContext.n64ddFlag) || (gSaveContext.n64ddFlag && Flags_GetTreasure(gPlayState, 0x1E)); this->unk_19A = Actor_WorldYawTowardPoint(&this->actor, &vec); - this->actor.flags |= ACTOR_FLAG_27; + this->actor.flags |= ACTOR_FLAG_NO_LOCKON; Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH); this->actionFunc = EnPoRelay_Race; } void EnPoRelay_SetupEndRace(EnPoRelay* this) { this->actor.world.rot.y = this->actor.home.rot.y + 0xC000; - this->actor.flags &= ~ACTOR_FLAG_27; + this->actor.flags &= ~ACTOR_FLAG_NO_LOCKON; this->actor.speedXZ = 0.0f; this->actionFunc = EnPoRelay_EndRace; } @@ -166,10 +166,10 @@ void EnPoRelay_CorrectY(EnPoRelay* this) { void EnPoRelay_Idle(EnPoRelay* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x100); if (Actor_ProcessTalkRequest(&this->actor, play)) { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; this->actionFunc = EnPoRelay_Talk; } else if (this->actor.xzDistToPlayer < 250.0f) { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; this->actor.textId = this->textId; func_8002F2CC(&this->actor, play, 250.0f); } diff --git a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index def561831..ff3a06a3c 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -9,7 +9,7 @@ #include "objects/object_po_sisters/object_po_sisters.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_9 | ACTOR_FLAG_12 | ACTOR_FLAG_14) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_HOOKSHOT_DRAGS | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_ARROW_DRAGGABLE) void EnPoSisters_Init(Actor* thisx, PlayState* play); void EnPoSisters_Destroy(Actor* thisx, PlayState* play); @@ -210,7 +210,7 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { this->unk_198 = 1; this->unk_199 = 32; this->unk_294 = 110.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (this->actor.params & 0x1000) { func_80ADA094(this, play); } else if (this->unk_194 == 0) { @@ -218,7 +218,7 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { this->collider.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER; func_80AD9AA8(this, play); } else { - this->actor.flags &= ~(ACTOR_FLAG_9 | ACTOR_FLAG_14); + this->actor.flags &= ~(ACTOR_FLAG_HOOKSHOT_DRAGS | ACTOR_FLAG_ARROW_DRAGGABLE); this->collider.info.elemType = ELEMTYPE_UNK4; this->collider.info.bumper.dmgFlags |= 1; this->collider.base.ocFlags1 = OC1_NONE; @@ -388,7 +388,7 @@ void func_80AD99D4(EnPoSisters* this, PlayState* play) { this->actor.speedXZ = 0.0f; this->actor.world.pos.y += 42.0f; this->actor.shape.yOffset = -6000.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unk_199 = 0; this->actionFunc = func_80ADAFC0; OnePointCutscene_Init(play, 3190, 999, &this->actor, MAIN_CAM); @@ -438,7 +438,7 @@ void func_80AD9C24(EnPoSisters* this, PlayState* play) { Vec3f vec; this->actor.draw = NULL; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unk_19C = 100; this->unk_199 = 32; this->collider.base.colType = COLTYPE_HIT3; @@ -497,7 +497,7 @@ void func_80AD9F1C(EnPoSisters* this) { this->unk_19A = 300; this->unk_19C = 3; this->unk_199 |= 9; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionFunc = func_80ADB770; } @@ -519,7 +519,7 @@ void func_80ADA028(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); this->unk_22E.a = 255; this->unk_199 |= 0x15; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionFunc = func_80ADBBF4; this->actor.speedXZ = 0.0f; } @@ -711,7 +711,7 @@ void func_80ADA9E8(EnPoSisters* this, PlayState* play) { } void func_80ADAAA4(EnPoSisters* this, PlayState* play) { - if (SkelAnime_Update(&this->skelAnime) && !(this->actor.flags & ACTOR_FLAG_15)) { + if (SkelAnime_Update(&this->skelAnime) && !(this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW)) { if (this->actor.colChkInfo.health != 0) { if (this->unk_194 != 0) { func_80AD96A4(this); @@ -1013,7 +1013,7 @@ void func_80ADB9F0(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { this->unk_22E.a = 255; if (this->unk_194 == 3) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.home.pos.x = 1992.0f; this->actor.home.pos.z = -1440.0f; this->unk_199 |= 0x18; @@ -1230,7 +1230,7 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { this->unk_198 = CLAMP_MIN(temp, 1); } if (this->actionFunc == func_80ADA8C0) { - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } if (this->unk_199 & 1) { diff --git a/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.c index dcf933967..7b975c43a 100644 --- a/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -8,7 +8,7 @@ #include "objects/object_poh/object_poh.h" #include "objects/object_po_composer/object_po_composer.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_12) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_IGNORE_QUAKE) void EnPoh_Init(Actor* thisx, PlayState* play); void EnPoh_Destroy(Actor* thisx, PlayState* play); @@ -318,7 +318,7 @@ void func_80ADE368(EnPoh* this) { void EnPoh_SetupInitialAction(EnPoh* this) { this->lightColor.a = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (this->infoIdx == EN_POH_INFO_NORMAL) { Animation_PlayOnceSetSpeed(&this->skelAnime, &gPoeAppearAnim, 0.0f); this->actionFunc = func_80ADEF38; @@ -336,7 +336,7 @@ void func_80ADE48C(EnPoh* this) { this->actor.world.rot.y = this->actor.shape.rot.y; this->unk_198 = 0; this->actor.naviEnemyId = 0xFF; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = func_80ADF15C; } @@ -375,7 +375,7 @@ void EnPoh_SetupDeath(EnPoh* this, PlayState* play) { this->actor.draw = EnPoh_DrawSoul; this->actor.shape.shadowDraw = NULL; Actor_SetScale(&this->actor, 0.01f); - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actor.gravity = -1.0f; this->actor.shape.yOffset = 1500.0f; this->actor.world.pos.y -= 15.0f; @@ -438,7 +438,7 @@ void EnPoh_Talk(EnPoh* this, PlayState* play) { } this->unk_198 = 200; this->unk_195 = 32; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionFunc = func_80ADFE80; } @@ -581,7 +581,7 @@ void func_80ADEF38(EnPoh* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { this->lightColor.a = 255; this->visibilityTimer = Rand_S16Offset(700, 300); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; EnPoh_SetupIdle(this); } else if (this->skelAnime.curFrame > 10.0f) { this->lightColor.a = ((this->skelAnime.curFrame - 10.0f) * 0.05f) * 255.0f; @@ -596,7 +596,7 @@ void EnPoh_ComposerAppear(EnPoh* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { this->lightColor.a = 255; this->visibilityTimer = Rand_S16Offset(700, 300); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; EnPoh_SetupIdle(this); } else { this->lightColor.a = CLAMP_MAX((s32)(this->skelAnime.curFrame * 25.5f), 255); @@ -783,14 +783,14 @@ void func_80ADFE80(EnPoh* this, PlayState* play) { } if (this->unk_198 == 0) { func_80ADE950(this, 1); - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; return; } if (this->colliderCyl.base.ocFlags1 & OC1_HIT) { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; func_8002F2F4(&this->actor, play); } else { - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCyl.base); } this->actor.world.pos.y = Math_SinS(this->unk_195 * 0x800) * 5.0f + this->actor.home.pos.y; @@ -935,7 +935,7 @@ void EnPoh_Update(Actor* thisx, PlayState* play) { this->colliderCyl.dim.height = 55; this->colliderCyl.dim.yShift = 15; } - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; EnPoh_SetupInitialAction(this); } } @@ -1007,7 +1007,7 @@ void EnPoh_UpdateLiving(Actor* thisx, PlayState* play) { this->actionFunc(this, play); Actor_MoveForward(&this->actor); if (this->actionFunc == EnPoh_Attack && this->unk_198 < 10) { - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base); } Collider_UpdateCylinder(&this->actor, &this->colliderCyl); diff --git a/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c b/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c index d31377ab8..3a76aefc4 100644 --- a/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c +++ b/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c @@ -7,7 +7,7 @@ #include "z_en_pu_box.h" #include "objects/object_pu_box/object_pu_box.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnPubox_Init(Actor* thisx, PlayState* play); void EnPubox_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c index bccf64b30..4ae2f95a7 100644 --- a/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -1,7 +1,7 @@ #include "z_en_rd.h" #include "objects/object_rd/object_rd.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT) void EnRd_Init(Actor* thisx, PlayState* play); void EnRd_Destroy(Actor* thisx, PlayState* play); @@ -164,7 +164,7 @@ void EnRd_Init(Actor* thisx, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (thisx->params == 3) { - thisx->flags |= ACTOR_FLAG_7; + thisx->flags |= ACTOR_FLAG_LENS; } } @@ -356,7 +356,7 @@ void func_80AE2C1C(EnRd* this, PlayState* play) { Actor_IsFacingPlayer(&this->actor, 0x38E3)) { player->actor.freezeTimer = 0; if (play->grabPlayer(play, player)) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; func_80AE33F0(this); } } else if (this->actor.params > 0) { @@ -540,7 +540,7 @@ void func_80AE3454(EnRd* this, PlayState* play) { Math_SmoothStepToF(&this->actor.shape.yOffset, 0, 1.0f, 400.0f, 0.0f); } this->actor.targetMode = 0; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->unk_306 = 0xA; this->unk_307 = 0xF; func_80AE2B90(this, play); @@ -609,7 +609,7 @@ void func_80AE3A8C(EnRd* this) { this->actor.speedXZ = -2.0f; } - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_DAMAGE); this->unk_31B = 9; EnRd_SetupAction(this, func_80AE3B18); @@ -644,7 +644,7 @@ void func_80AE3C20(EnRd* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gGibdoRedeadDeathAnim, -1.0f); this->unk_31B = 10; this->unk_30C = 300; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_DEAD); EnRd_SetupAction(this, func_80AE3C98); diff --git a/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c b/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c index a12149145..873e9f552 100644 --- a/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c +++ b/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c @@ -10,7 +10,7 @@ #include "vt.h" #include "objects/object_reeba/object_reeba.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_27) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_LOCKON) void EnReeba_Init(Actor* thisx, PlayState* play); void EnReeba_Destroy(Actor* thisx, PlayState* play); @@ -181,7 +181,7 @@ void func_80AE4F40(EnReeba* this, PlayState* play) { this->unk_278 = 20; } - this->actor.flags &= ~ACTOR_FLAG_27; + this->actor.flags &= ~ACTOR_FLAG_NO_LOCKON; this->actor.world.pos.y = this->actor.floorHeight; if (this->isBig) { @@ -267,7 +267,7 @@ void func_80AE5270(EnReeba* this, PlayState* play) { } void func_80AE538C(EnReeba* this, PlayState* play) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE; this->actionfunc = func_80AE53AC; } @@ -329,8 +329,8 @@ void func_80AE561C(EnReeba* this, PlayState* play) { void func_80AE5688(EnReeba* this, PlayState* play) { this->unk_27E = 0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_AKINDONUTS_HIDE); - this->actor.flags |= ACTOR_FLAG_27; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags |= ACTOR_FLAG_NO_LOCKON; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); this->actionfunc = func_80AE56E0; } @@ -381,8 +381,8 @@ void func_80AE58EC(EnReeba* this, PlayState* play) { this->unk_278 = 14; this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.speedXZ = -8.0f; - this->actor.flags |= ACTOR_FLAG_27; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags |= ACTOR_FLAG_NO_LOCKON; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); this->actionfunc = func_80AE5938; } @@ -450,7 +450,7 @@ void func_80AE5BC4(EnReeba* this, PlayState* play) { this->actor.world.rot.y = this->actor.yawTowardsPlayer; Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); this->unk_278 = 14; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionfunc = func_80AE5C38; } diff --git a/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c index 5a0cb531c..d04626e75 100644 --- a/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c +++ b/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c @@ -6,7 +6,7 @@ #include "z_en_river_sound.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnRiverSound_Init(Actor* thisx, PlayState* play); void EnRiverSound_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c index 88469c3ee..bc1487dbd 100644 --- a/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_rl/object_rl.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnRl_Init(Actor* thisx, PlayState* play); void EnRl_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c index 82eb2c93e..bc5c7630e 100644 --- a/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -8,7 +8,7 @@ #include "objects/object_rr/object_rr.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT) #define RR_MESSAGE_SHIELD (1 << 0) #define RR_MESSAGE_TUNIC (1 << 1) @@ -253,7 +253,7 @@ void EnRr_SetupGrabPlayer(EnRr* this, Player* player) { s32 i; this->grabTimer = 100; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->ocTimer = 8; this->hasPlayer = true; this->reachState = 0; @@ -288,7 +288,7 @@ void EnRr_SetupReleasePlayer(EnRr* this, PlayState* play) { u8 shield; u8 tunic; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->hasPlayer = false; this->ocTimer = 110; this->segMoveRate = 0.0f; @@ -380,7 +380,7 @@ void EnRr_SetupDeath(EnRr* this) { } this->actionFunc = EnRr_Death; Audio_PlayActorSound2(&this->actor, NA_SE_EN_LIKE_DEAD); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_LIKE_LIKE]++; } diff --git a/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index 557be5e40..e977c1286 100644 --- a/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -8,7 +8,7 @@ #include "objects/object_ru1/object_ru1.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4 | ACTOR_FLAG_26) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_CAN_PRESS_SWITCH) void EnRu1_Init(Actor* thisx, PlayState* play); void EnRu1_Destroy(Actor* thisx, PlayState* play); @@ -1505,7 +1505,7 @@ void func_80AEE050(EnRu1* this) { s32 func_80AEE264(EnRu1* this, PlayState* play) { if (!Actor_ProcessTalkRequest(&this->actor, play)) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; if ((gSaveContext.infTable[20] & 8)) { this->actor.textId = 0x404E; func_8002F2F4(&this->actor, play); @@ -1826,7 +1826,7 @@ s32 func_80AEF0BC(EnRu1* this, PlayState* play) { Animation_Change(&this->skelAnime, &gRutoChildSitAnim, 1.0f, 0, frameCount, ANIMMODE_ONCE, -8.0f); play->msgCtx.msgMode = MSGMODE_PAUSED; this->action = 26; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); return true; } return false; @@ -1866,7 +1866,7 @@ void func_80AEF29C(EnRu1* this, PlayState* play) { void func_80AEF2AC(EnRu1* this, PlayState* play) { this->action = 24; this->drawConfig = 1; - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; } void func_80AEF2D0(EnRu1* this, PlayState* play) { @@ -2023,7 +2023,7 @@ void func_80AEF890(EnRu1* this, PlayState* play) { void func_80AEF930(EnRu1* this, PlayState* play) { if (func_80AEB104(this) == 3) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; this->actor.textId = 0x4048; Message_ContinueTextbox(play, this->actor.textId); func_80AEF4A8(this, play); @@ -2109,7 +2109,7 @@ void func_80AEFC54(EnRu1* this, PlayState* play) { this->action = 41; this->unk_28C = EnRu1_FindSwitch(play); func_80AEB0EC(this, 1); - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); } else { Actor_Kill(&this->actor); } @@ -2127,7 +2127,7 @@ void func_80AEFCE8(EnRu1* this, PlayState* play) { void func_80AEFD38(EnRu1* this, PlayState* play) { if ((gSaveContext.eventChkInf[3] & 0x80) && LINK_IS_CHILD) { func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0); - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->action = 44; this->drawConfig = 1; } else { @@ -2137,7 +2137,7 @@ void func_80AEFD38(EnRu1* this, PlayState* play) { s32 func_80AEFDC0(EnRu1* this, PlayState* play) { if (!Actor_ProcessTalkRequest(&this->actor, play)) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; this->actor.textId = Text_GetFaceReaction(play, 0x1F); if (this->actor.textId == 0) { this->actor.textId = 0x402C; @@ -2150,7 +2150,7 @@ s32 func_80AEFDC0(EnRu1* this, PlayState* play) { s32 func_80AEFE38(EnRu1* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); return true; } return false; diff --git a/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index 7e06207f0..4e5630dd8 100644 --- a/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnRu2_Init(Actor* thisx, PlayState* play); void EnRu2_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c index 3e1bc7fe5..c812e4c0e 100644 --- a/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c +++ b/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c @@ -4,7 +4,7 @@ #include "scenes/overworld/spot04/spot04_scene.h" #include "scenes/overworld/spot05/spot05_scene.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnSa_Init(Actor* thisx, PlayState* play); void EnSa_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/soh/src/overlays/actors/ovl_En_Sb/z_en_sb.c index 6f2aa6bd3..eb4cac9e1 100644 --- a/soh/src/overlays/actors/ovl_En_Sb/z_en_sb.c +++ b/soh/src/overlays/actors/ovl_En_Sb/z_en_sb.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_sb/object_sb.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) void EnSb_Init(Actor* thisx, PlayState* play); void EnSb_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Sda/z_en_sda.c b/soh/src/overlays/actors/ovl_En_Sda/z_en_sda.c index c2bb03643..836a2a66a 100644 --- a/soh/src/overlays/actors/ovl_En_Sda/z_en_sda.c +++ b/soh/src/overlays/actors/ovl_En_Sda/z_en_sda.c @@ -6,7 +6,7 @@ #include "z_en_sda.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnSda_Init(Actor* thisx, PlayState* play); void EnSda_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c b/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c index 23a530fd7..8c5026a87 100644 --- a/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c +++ b/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c @@ -1,7 +1,7 @@ #include "z_en_shopnuts.h" #include "objects/object_shopnuts/object_shopnuts.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) void EnShopnuts_Init(Actor* thisx, PlayState* play); void EnShopnuts_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index 344173805..dcd80ff6c 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -6,7 +6,7 @@ #include "z_en_si.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_9) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOOKSHOT_DRAGS) void EnSi_Init(Actor* thisx, PlayState* play); void EnSi_Destroy(Actor* thisx, PlayState* play); @@ -88,7 +88,7 @@ s32 func_80AFB748(EnSi* this, PlayState* play) { void func_80AFB768(EnSi* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { this->actionFunc = func_80AFB89C; } else { Math_SmoothStepToF(&this->actor.scale.x, 0.25f, 0.4f, 1.0f, 0.0f); @@ -146,7 +146,7 @@ void func_80AFB89C(EnSi* this, PlayState* play) { Actor_SetScale(&this->actor, this->actor.scale.x); this->actor.shape.rot.y += 0x400; - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { if (gSaveContext.n64ddFlag) { Randomizer_UpdateSkullReward(this, play); } else { diff --git a/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c index 3d8f68886..8d624559d 100644 --- a/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -7,7 +7,7 @@ #include "z_en_siofuki.h" #include "objects/object_siofuki/object_siofuki.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnSiofuki_Init(Actor* thisx, PlayState* play); void EnSiofuki_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c index ef88637bf..7ae647def 100644 --- a/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_Encount1/z_en_encount1.h" #include "objects/object_skb/object_skb.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnSkb_Init(Actor* thisx, PlayState* play); void EnSkb_Destroy(Actor* thisx, PlayState* play); @@ -204,7 +204,7 @@ void func_80AFCD60(EnSkb* this) { void func_80AFCDF8(EnSkb* this) { Animation_PlayOnceSetSpeed(&this->skelAnime, &gStalchildUncurlingAnim, 1.0f); this->unk_280 = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIVA_APPEAR); EnSkb_SetupAction(this, func_80AFCE5C); } @@ -214,7 +214,7 @@ void func_80AFCE5C(EnSkb* this, PlayState* play) { this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; } else { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } Math_SmoothStepToF(&this->actor.shape.yOffset, 0.0f, 1.0f, 800.0f, 0.0f); Math_SmoothStepToF(&this->actor.shape.shadowScale, 25.0f, 1.0f, 2.5f, 0.0f); @@ -231,7 +231,7 @@ void func_80AFCF48(EnSkb* this) { Animation_GetLastFrame(&gStalchildUncurlingAnim), 0.0f, ANIMMODE_ONCE, -4.0f); this->unk_280 = 0; this->unk_281 = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.speedXZ = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_AKINDONUTS_HIDE); EnSkb_SetupAction(this, func_80AFCFF0); @@ -411,7 +411,7 @@ void func_80AFD7B4(EnSkb* this, PlayState* play) { this->actor.speedXZ = -6.0f; } this->unk_280 = 1; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; BodyBreak_Alloc(&this->bodyBreak, 18, play); this->unk_283 |= 4; EffectSsDeadSound_SpawnStationary(play, &this->actor.projectedPos, NA_SE_EN_STALKID_DEAD, 1, 1, 0x28); diff --git a/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c index a5ba6ef0a..f4c27fda3 100644 --- a/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.h" #include "objects/object_skj/object_skj.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void EnSkj_Init(Actor* thisx, PlayState* play); void EnSkj_Destroy(Actor* thisx, PlayState* play); @@ -284,7 +284,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(targetArrowOffset, 30, ICHAIN_STOP), }; -static s32 D_80B01EA0; // gets set if ACTOR_FLAG_8 is set +static s32 D_80B01EA0; // gets set if ACTOR_FLAG_PLAYER_TALKED_TO is set void EnSkj_ChangeAnim(EnSkj* this, u8 index) { f32 endFrame = Animation_GetLastFrame(sAnimationInfo[index].animation); @@ -376,7 +376,7 @@ void EnSkj_Init(Actor* thisx, PlayState* play2) { this->actor.destroy = NULL; this->actor.draw = NULL; this->actor.update = EnSkj_SariasSongShortStumpUpdate; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); this->actor.flags |= 0; Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_PROP); break; @@ -387,7 +387,7 @@ void EnSkj_Init(Actor* thisx, PlayState* play2) { this->actor.destroy = NULL; this->actor.draw = NULL; this->actor.update = EnSkj_OcarinaMinigameShortStumpUpdate; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); this->actor.flags |= 0; Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_PROP); this->actor.focus.pos.x = 1230.0f; @@ -409,13 +409,13 @@ void EnSkj_Init(Actor* thisx, PlayState* play2) { SkelAnime_InitFlex(play, &this->skelAnime, &gSkullKidSkel, &gSkullKidPlayFluteAnim, this->jointTable, this->morphTable, 19); if ((type >= 0) && (type < 3)) { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_NPC); } if ((type < 0) || (type >= 7)) { - this->actor.flags &= ~ACTOR_FLAG_25; + this->actor.flags &= ~ACTOR_FLAG_NO_FREEZE_OCARINA; } if ((type > 0) && (type < 3)) { @@ -1219,14 +1219,14 @@ void EnSkj_SariasSongWaitForTextClear(EnSkj* this, PlayState* play) { } void EnSkj_OcarinaGameSetupWaitForPlayer(EnSkj* this) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnSkj_ChangeAnim(this, SKJ_ANIM_WAIT); EnSkj_SetupAction(this, SKJ_ACTION_OCARINA_GAME_WAIT_FOR_PLAYER); } void EnSkj_OcarinaGameWaitForPlayer(EnSkj* this, PlayState* play) { if (this->playerInRange) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; EnSkj_SetupAction(this, SKJ_ACTION_OCARINA_GAME_IDLE); } } diff --git a/soh/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c b/soh/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c index a802fedd0..1a9531ae1 100644 --- a/soh/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c +++ b/soh/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c @@ -7,7 +7,7 @@ #include "z_en_skjneedle.h" #include "objects/object_skj/object_skj.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_9) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_DRAGS) void EnSkjneedle_Init(Actor* thisx, PlayState* play); void EnSkjneedle_Destroy(Actor* thisx, PlayState* play); @@ -60,7 +60,7 @@ void EnSkjneedle_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); Collider_SetCylinderType1(play, &this->collider, &this->actor, &sCylinderInit); ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 20.0f); - thisx->flags &= ~ACTOR_FLAG_0; + thisx->flags &= ~ACTOR_FLAG_TARGETABLE; Actor_SetScale(&this->actor, 0.01f); } diff --git a/soh/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/soh/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 45768898c..cf6cf0187 100644 --- a/soh/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/soh/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -1,7 +1,7 @@ #include "z_en_ssh.h" #include "objects/object_ssh/object_ssh.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) #define SSH_STATE_STUNNED (1 << 0) #define SSH_STATE_GROUND_START (1 << 2) diff --git a/soh/src/overlays/actors/ovl_En_St/z_en_st.c b/soh/src/overlays/actors/ovl_En_St/z_en_st.c index 66eb44abc..53bc29b1d 100644 --- a/soh/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/soh/src/overlays/actors/ovl_En_St/z_en_st.c @@ -7,7 +7,7 @@ #include "z_en_st.h" #include "objects/object_st/object_st.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnSt_Init(Actor* thisx, PlayState* play); void EnSt_Destroy(Actor* thisx, PlayState* play); @@ -460,7 +460,7 @@ s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) { return false; } Enemy_StartFinishingBlow(play, &this->actor); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->groundBounces = 3; this->deathTimer = 20; this->actor.gravity = -1.0f; @@ -790,7 +790,7 @@ void EnSt_Init(Actor* thisx, PlayState* play) { this->blureIdx = EnSt_CreateBlureEffect(play); EnSt_InitColliders(this, play); if (thisx->params == 2) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_LENS; } if (this->actor.params == 1) { this->actor.naviEnemyId = 0x05; @@ -798,8 +798,8 @@ void EnSt_Init(Actor* thisx, PlayState* play) { this->actor.naviEnemyId = 0x04; } EnSt_CheckCeilingPos(this, play); - this->actor.flags |= ACTOR_FLAG_14; - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_ARROW_DRAGGABLE; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; EnSt_SetColliderScale(this); this->actor.gravity = 0.0f; this->initalYaw = this->actor.world.rot.y; @@ -1015,7 +1015,7 @@ void EnSt_Update(Actor* thisx, PlayState* play) { s32 pad; Color_RGBA8 color = { 0, 0, 0, 0 }; - if (this->actor.flags & ACTOR_FLAG_15) { + if (this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW) { SkelAnime_Update(&this->skelAnime); } else if (!EnSt_CheckColliders(this, play)) { // no collision has been detected. diff --git a/soh/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/soh/src/overlays/actors/ovl_En_Sth/z_en_sth.c index b45560a04..379af78b3 100644 --- a/soh/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/soh/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -9,7 +9,7 @@ #include "objects/object_ahg/object_ahg.h" #include "objects/object_boj/object_boj.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnSth_Init(Actor* thisx, PlayState* play); void EnSth_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Stream/z_en_stream.c b/soh/src/overlays/actors/ovl_En_Stream/z_en_stream.c index 661145c33..6706bef32 100644 --- a/soh/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/soh/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -7,7 +7,7 @@ #include "z_en_stream.h" #include "objects/object_stream/object_stream.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnStream_Init(Actor* thisx, PlayState* play); void EnStream_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c index 7c5473055..79a8d8bfb 100644 --- a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -1,7 +1,7 @@ #include "z_en_sw.h" #include "objects/object_st/object_st.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnSw_Init(Actor* thisx, PlayState* play); void EnSw_Destroy(Actor* thisx, PlayState* play); @@ -292,7 +292,7 @@ void EnSw_Init(Actor* thisx, PlayState* play) { this->collider.elements[0].info.toucher.damage *= 2; this->actor.naviEnemyId = 0x20; this->actor.colChkInfo.health *= 2; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; break; default: Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); @@ -373,7 +373,7 @@ s32 func_80B0C9F0(EnSw* this, PlayState* play) { this->unk_38A = 2; this->actor.shape.shadowScale = 16.0f; this->actor.gravity = -1.0f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = func_80B0DB00; gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SKULLWALLTULA]++; } diff --git a/soh/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c b/soh/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c index 839a6335e..05b76cb0e 100644 --- a/soh/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c +++ b/soh/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h" #include "overlays/actors/ovl_En_G_Switch/z_en_g_switch.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef enum { SYATEKI_ROUND_GREEN_APPEAR, diff --git a/soh/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/soh/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c index 279ac1af3..3cc614b79 100644 --- a/soh/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c +++ b/soh/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c @@ -4,7 +4,7 @@ #include "objects/object_ossan/object_ossan.h" #include "soh/Enhancements/randomizer/randomizer_entrance.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_27) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_LOCKON) typedef enum { /* 0 */ SYATEKI_RESULT_NONE, @@ -451,7 +451,7 @@ void EnSyatekiMan_FinishPrize(EnSyatekiMan* this, PlayState* play) { } this->gameResult = SYATEKI_RESULT_NONE; this->actor.parent = this->tempGallery; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionFunc = EnSyatekiMan_SetupIdle; } } diff --git a/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c b/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c index 8c231a09c..c9831115b 100644 --- a/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c +++ b/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c @@ -9,7 +9,7 @@ #include "vt.h" #include "soh/frame_interpolation.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnSyatekiNiw_Init(Actor* thisx, PlayState* play); void EnSyatekiNiw_Destroy(Actor* thisx, PlayState* play); @@ -70,7 +70,7 @@ void EnSyatekiNiw_Init(Actor* thisx, PlayState* play) { EnSyatekiNiw* this = (EnSyatekiNiw*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoSkel, &gCuccoAnim, this->jointTable, this->morphTable, 16); diff --git a/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c index 3fa33d6b4..bb3342cd8 100644 --- a/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_ta/object_ta.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnTa_Init(Actor* thisx, PlayState* play); void EnTa_Destroy(Actor* thisx, PlayState* play); @@ -181,7 +181,7 @@ void EnTa_Init(Actor* thisx, PlayState* play2) { Actor_Kill(&this->actor); } else { if (IS_DAY) { - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->unk_2C4[0] = this->unk_2C4[1] = this->unk_2C4[2] = 7; this->superCuccos[0] = (EnNiw*)Actor_Spawn( &play->actorCtx, play, ACTOR_EN_NIW, this->actor.world.pos.x + 5.0f, @@ -456,7 +456,7 @@ void func_80B14AF4(EnTa* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_VO_TA_CRY_1); func_80B13AA0(this, func_80B14A54, func_80B167C0); this->unk_2CC = 65; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } } @@ -622,7 +622,7 @@ void func_80B15100(EnTa* this, PlayState* play) { void func_80B15260(EnTa* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, play)) { this->actionFunc = func_80B15100; - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } else { func_8002F2CC(&this->actor, play, 1000.0f); } @@ -729,7 +729,7 @@ void func_80B154FC(EnTa* this, PlayState* play) { break; } this->actionFunc = func_80B15260; - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; func_8002F2CC(&this->actor, play, 1000.0f); return; } @@ -1064,9 +1064,9 @@ void func_80B16608(EnTa* this, PlayState* play) { this->actionFunc = func_80B1642C; break; } - this->actor.flags &= ~ACTOR_FLAG_16; + this->actor.flags &= ~ACTOR_FLAG_WILL_TALK; } else { - this->actor.flags |= ACTOR_FLAG_16; + this->actor.flags |= ACTOR_FLAG_WILL_TALK; func_8002F2CC(&this->actor, play, 1000.0f); } this->unk_2E0 |= 1; diff --git a/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c index 8a208f104..dd157185a 100644 --- a/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c +++ b/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_ts/object_ts.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_27) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_LOCKON) void EnTakaraMan_Init(Actor* thisx, PlayState* play); void EnTakaraMan_Reset(Actor* thisx, PlayState* play); @@ -125,11 +125,11 @@ void func_80B1778C(EnTakaraMan* this, PlayState* play) { absYawDiff = ABS(yawDiff); if (absYawDiff < 0x4300) { if (play->roomCtx.curRoom.num != this->originalRoomNum) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unk_218 = 0; } else { if (!this->unk_218) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->unk_218 = 1; } func_8002F2CC(&this->actor, play, 100.0f); diff --git a/soh/src/overlays/actors/ovl_En_Tana/z_en_tana.c b/soh/src/overlays/actors/ovl_En_Tana/z_en_tana.c index ff17deabd..779b15473 100644 --- a/soh/src/overlays/actors/ovl_En_Tana/z_en_tana.c +++ b/soh/src/overlays/actors/ovl_En_Tana/z_en_tana.c @@ -7,7 +7,7 @@ #include "z_en_tana.h" #include "objects/object_shop_dungen/object_shop_dungen.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnTana_Init(Actor* thisx, PlayState* play); void EnTana_Destroy(Actor* thisx, PlayState* play); @@ -60,7 +60,7 @@ void EnTana_Init(Actor* thisx, PlayState* play) { osSyncPrintf("☆☆☆ %s ☆☆☆\n", sShelfTypes[thisx->params]); Actor_SetScale(thisx, 1.0f); - thisx->flags &= ~ACTOR_FLAG_0; + thisx->flags &= ~ACTOR_FLAG_TARGETABLE; thisx->draw = sDrawFuncs[thisx->params]; } diff --git a/soh/src/overlays/actors/ovl_En_Test/z_en_test.c b/soh/src/overlays/actors/ovl_En_Test/z_en_test.c index be9033e96..6b3068643 100644 --- a/soh/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/soh/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -7,7 +7,7 @@ #include "z_en_test.h" #include "objects/object_sk2/object_sk2.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnTest_Init(Actor* thisx, PlayState* play); void EnTest_Destroy(Actor* thisx, PlayState* play); @@ -305,7 +305,7 @@ void EnTest_Init(Actor* thisx, PlayState* play) { } if (this->actor.params == STALFOS_TYPE_INVISIBLE) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_LENS; } } @@ -431,7 +431,7 @@ void EnTest_SetupWaitGround(EnTest* this) { this->timer = 15; this->actor.scale.y = 0.0f; this->actor.world.pos.y = this->actor.home.pos.y - 3.5f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnTest_SetupAction(this, EnTest_WaitGround); } @@ -461,7 +461,7 @@ void EnTest_SetupWaitAbove(EnTest* this) { this->unk_7C8 = 0; this->actor.world.pos.y = this->actor.home.pos.y + 150.0f; Actor_SetScale(&this->actor, 0.0f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnTest_SetupAction(this, EnTest_WaitAbove); } @@ -471,7 +471,7 @@ void EnTest_WaitAbove(EnTest* this, PlayState* play) { if ((this->actor.xzDistToPlayer < 200.0f) && (ABS(this->actor.yDistToPlayer) < 450.0f)) { EnTest_SetupAction(this, EnTest_Fall); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; Actor_SetScale(&this->actor, 0.015f); } @@ -1069,7 +1069,7 @@ void EnTest_JumpBack(EnTest* this, PlayState* play) { this->timer = (Rand_ZeroOne() * 5.0f) + 5.0f; } } - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } } else if (this->skelAnime.curFrame == (this->skelAnime.endFrame - 4.0f)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND); @@ -1488,7 +1488,7 @@ void func_80862DBC(EnTest* this, PlayState* play) { this->swordState = -1; } - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (this->actor.params == STALFOS_TYPE_5) { Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); @@ -1517,7 +1517,7 @@ void func_80862E6C(EnTest* this, PlayState* play) { } this->actor.child = NULL; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; EnTest_SetupJumpBack(this); } else if ((this->actor.params == STALFOS_TYPE_5) && !Actor_FindNearby(play, &this->actor, ACTOR_EN_TEST, ACTORCAT_ENEMY, 8000.0f)) { @@ -1537,7 +1537,7 @@ void func_80862FA8(EnTest* this, PlayState* play) { Animation_PlayOnce(&this->skelAnime, &gStalfosFallOverBackwardsAnim); Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_DEAD); this->unk_7DE = 0; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.colorFilterTimer = 0; this->actor.speedXZ = 0.0f; @@ -1571,7 +1571,7 @@ void func_808630F0(EnTest* this, PlayState* play) { this->actor.speedXZ = 0.0f; if (this->actor.params <= STALFOS_TYPE_CEILING) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnTest_SetupAction(this, func_8086318C); } else { func_80862DBC(this, play); @@ -1811,10 +1811,10 @@ void EnTest_Update(Actor* thisx, PlayState* play) { if (this->actor.params == STALFOS_TYPE_INVISIBLE) { if (play->actorCtx.lensActive) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_LENS; this->actor.shape.shadowDraw = ActorShadow_DrawFeet; } else { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_7); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_LENS); this->actor.shape.shadowDraw = NULL; } } @@ -1838,7 +1838,7 @@ s32 EnTest_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* CLOSE_DISPS(play->state.gfxCtx); } - if ((this->actor.params == STALFOS_TYPE_INVISIBLE) && !CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if ((this->actor.params == STALFOS_TYPE_INVISIBLE) && !CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_LENS)) { *dList = NULL; } diff --git a/soh/src/overlays/actors/ovl_En_Tg/z_en_tg.c b/soh/src/overlays/actors/ovl_En_Tg/z_en_tg.c index d9af596d6..9bed534ea 100644 --- a/soh/src/overlays/actors/ovl_En_Tg/z_en_tg.c +++ b/soh/src/overlays/actors/ovl_En_Tg/z_en_tg.c @@ -7,7 +7,7 @@ #include "z_en_tg.h" #include "objects/object_mu/object_mu.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnTg_Init(Actor* thisx, PlayState* play); void EnTg_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/soh/src/overlays/actors/ovl_En_Tite/z_en_tite.c index c4741204b..5b2bc73dd 100644 --- a/soh/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/soh/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -10,7 +10,7 @@ #include "vt.h" #include "objects/object_tite/object_tite.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) // EnTite_Idle #define vIdleTimer actionVar1 @@ -291,7 +291,7 @@ void EnTite_Attack(EnTite* this, PlayState* play) { case TEKTITE_MID_LUNGE: // Continue trajectory until tektite has negative velocity and has landed on ground/water surface // Snap to ground/water surface, or if falling fast dip into the water and slow fall speed - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; if ((this->actor.bgCheckFlags & 3) || ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & 0x20))) { if (this->actor.velocity.y <= 0.0f) { @@ -366,7 +366,7 @@ void EnTite_Attack(EnTite* this, PlayState* play) { func_800355B8(play, &this->backLeftFootPos); } } - if (!(this->collider.base.atFlags & AT_HIT) && (this->actor.flags & ACTOR_FLAG_6)) { + if (!(this->collider.base.atFlags & AT_HIT) && (this->actor.flags & ACTOR_FLAG_ACTIVE)) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } else { Player* player = GET_PLAYER(play); @@ -569,7 +569,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, PlayState* play) { } else { this->actor.velocity.y = 10.0f; this->actor.speedXZ = 4.0f; - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; this->actor.gravity = -1.0f; if ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & 0x20)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_TEKU_JUMP_WATER); @@ -580,7 +580,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, PlayState* play) { } else { this->actor.velocity.y = 10.0f; this->actor.speedXZ = 4.0f; - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; this->actor.gravity = -1.0f; if ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & 0x20)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_TEKU_JUMP_WATER); @@ -591,7 +591,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, PlayState* play) { // If in midair: } else { // Turn slowly toward player - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 1000, 0); if (this->actor.velocity.y >= 6.0f) { if (this->actor.bgCheckFlags & 1) { diff --git a/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 5bcbe6e22..20a8dfc61 100644 --- a/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -9,7 +9,7 @@ #include "objects/object_tk/object_tk.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) #define COLLECTFLAG_GRAVEDIGGING_HEART_PIECE 0x19 #define ITEMGETINFFLAG_GRAVEDIGGING_HEART_PIECE 0x1000 diff --git a/soh/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/soh/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index acf753c03..d7bd610a2 100644 --- a/soh/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/soh/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -7,7 +7,7 @@ #include "z_en_torch2.h" #include "objects/object_torch2/object_torch2.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) typedef enum { /* 0 */ ENTORCH2_WAIT, @@ -373,7 +373,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { player->skelAnime.curFrame = 3.0f; sStickAngle = this->actor.yawTowardsPlayer + 0x8000; sSwordJumpTimer = sSwordJumpState = 0; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } else if (sSwordJumpState == 1) { if (sSwordJumpTimer < 16) { EnTorch2_SwingSword(play, input, this); @@ -404,7 +404,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { sStickTilt = 0.0f; sSwordJumpState = 1; player->stateFlags3 |= 4; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; sSwordJumpTimer = 27; player->swordState = 0; player->linearVelocity = 0.0f; @@ -523,7 +523,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { input->cur.stick_x = input->cur.stick_y = 0; if ((this->invincibilityTimer > 0) && (this->actor.world.pos.y < (this->actor.floorHeight - 160.0f))) { this->stateFlags3 &= ~1; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->invincibilityTimer = 0; this->actor.velocity.y = 0.0f; this->actor.world.pos.y = sSpawnPoint.y + 40.0f; @@ -608,7 +608,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { if (!Actor_ApplyDamage(&this->actor)) { func_800F5B58(); - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); this->unk_8A1 = 2; this->unk_8A4 = 6.0f; this->unk_8A8 = 6.0f; @@ -628,7 +628,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { Actor_SetColorFilter(&this->actor, 0, 0xFF, 0x2000, 0x50); } } else { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unk_8A0 = this->actor.colChkInfo.damage; this->unk_8A1 = 1; this->unk_8A8 = 6.0f; diff --git a/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c index 704790caf..289a4394a 100644 --- a/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c +++ b/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c @@ -8,7 +8,7 @@ #include "objects/object_toryo/object_toryo.h" #include "soh/Enhancements/randomizer/adult_trade_shuffle.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void EnToryo_Init(Actor* thisx, PlayState* play); void EnToryo_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Tp/z_en_tp.c b/soh/src/overlays/actors/ovl_En_Tp/z_en_tp.c index ae5542e21..6a1e96773 100644 --- a/soh/src/overlays/actors/ovl_En_Tp/z_en_tp.c +++ b/soh/src/overlays/actors/ovl_En_Tp/z_en_tp.c @@ -154,7 +154,7 @@ void EnTp_Init(Actor* thisx, PlayState* play2) { this->collider.elements->dim.modelSphere.radius = this->collider.elements->dim.worldSphere.radius = 8; EnTp_Head_SetupWait(this); this->actor.focus.pos = this->actor.world.pos; - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED; Actor_SetScale(&this->actor, 1.5f); for (i = 0; i <= 6; i++) { @@ -170,7 +170,7 @@ void EnTp_Init(Actor* thisx, PlayState* play2) { Actor_SetScale(&next->actor, 0.3f); if (i == 2) { - next->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4; + next->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED; next->unk_150 = 1; // Why? } @@ -210,13 +210,13 @@ void EnTp_Tail_FollowHead(EnTp* this, PlayState* play) { } } else { if (this->unk_150 != 0) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; } if (this->head->unk_150 != 0) { this->actor.speedXZ = this->red = this->actor.velocity.y = this->heightPhase = 0.0f; if (this->actor.world.pos.y < this->head->actor.home.pos.y) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } this->actor.world.pos = this->actor.parent->prevPos; @@ -352,7 +352,7 @@ void EnTp_Fragment_SetupFade(EnTp* this) { this->actor.velocity.x = (Rand_ZeroOne() - 0.5f) * 1.5f; this->actor.velocity.y = (Rand_ZeroOne() - 0.5f) * 1.5f; this->actor.velocity.z = (Rand_ZeroOne() - 0.5f) * 1.5f; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnTp_SetupAction(this, EnTp_Fragment_Fade); } @@ -596,7 +596,7 @@ void EnTp_UpdateDamage(EnTp* this, PlayState* play) { } if (this->actor.colChkInfo.health == 0) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; head = this->head; if (head->actor.params <= TAILPASARAN_HEAD) { diff --git a/soh/src/overlays/actors/ovl_En_Tr/z_en_tr.c b/soh/src/overlays/actors/ovl_En_Tr/z_en_tr.c index 6cc2e90c9..f1de1cb0b 100644 --- a/soh/src/overlays/actors/ovl_En_Tr/z_en_tr.c +++ b/soh/src/overlays/actors/ovl_En_Tr/z_en_tr.c @@ -7,7 +7,7 @@ #include "z_en_tr.h" #include "objects/object_tr/object_tr.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnTr_Init(Actor* thisx, PlayState* play); void EnTr_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Trap/z_en_trap.c b/soh/src/overlays/actors/ovl_En_Trap/z_en_trap.c index b64e9af2b..5d5eef982 100644 --- a/soh/src/overlays/actors/ovl_En_Trap/z_en_trap.c +++ b/soh/src/overlays/actors/ovl_En_Trap/z_en_trap.c @@ -7,7 +7,7 @@ #include "z_en_trap.h" #include "objects/object_trap/object_trap.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED #define BEGIN_MOVE_OUT 65535.0f diff --git a/soh/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/soh/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c index f8e93d61f..3ed6ebb10 100644 --- a/soh/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c +++ b/soh/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c @@ -9,7 +9,7 @@ #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnTuboTrap_Init(Actor* thisx, PlayState* play); void EnTuboTrap_Destroy(Actor* thisx, PlayState* play); @@ -237,7 +237,7 @@ void EnTuboTrap_WaitForProximity(EnTuboTrap* this, PlayState* play) { if (this->actor.xzDistToPlayer < 200.0f && this->actor.world.pos.y <= player->actor.world.pos.y) { Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; targetHeight = 40.0f + -10.0f * gSaveContext.linkAge; this->targetY = player->actor.world.pos.y + targetHeight; diff --git a/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c b/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c index 5ca56ead7..45f670613 100644 --- a/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c +++ b/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c @@ -7,7 +7,7 @@ #include "z_en_vali.h" #include "objects/object_vali/object_vali.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_12) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_IGNORE_QUAKE) void EnVali_Init(Actor* thisx, PlayState* play); void EnVali_Destroy(Actor* thisx, PlayState* play); @@ -155,7 +155,7 @@ void EnVali_Init(Actor* thisx, PlayState* play) { EnVali_SetupLurk(this); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.floorHeight = BgCheck_EntityRaycastFloor4(&play->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &this->actor.world.pos); this->actor.params = BARI_TYPE_NORMAL; @@ -184,7 +184,7 @@ void EnVali_SetupLurk(EnVali* this) { void EnVali_SetupDropAppear(EnVali* this) { this->actor.draw = EnVali_Draw; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.velocity.y = 1.0f; this->actionFunc = EnVali_DropAppear; } @@ -200,7 +200,7 @@ void EnVali_SetupFloatIdle(EnVali* this) { this->leftArmCollider.dim.quad[1].y = this->rightArmCollider.dim.quad[0].y = this->rightArmCollider.dim.quad[1].y = this->actor.world.pos.y - 10.0f; - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; this->bodyCollider.base.acFlags |= AC_ON; this->slingshotReactionTimer = 0; this->floatHomeHeight = this->actor.world.pos.y; @@ -212,7 +212,7 @@ void EnVali_SetupFloatIdle(EnVali* this) { */ void EnVali_SetupAttacked(EnVali* this) { this->lightningTimer = 20; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->bodyCollider.base.acFlags &= ~AC_ON; this->actionFunc = EnVali_Attacked; } @@ -258,7 +258,7 @@ void EnVali_SetupDivideAndDie(EnVali* this, PlayState* play) { this->timer = Rand_S16Offset(10, 10); this->bodyCollider.base.acFlags &= ~AC_ON; SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_BARI_SPLIT); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.draw = NULL; this->actionFunc = EnVali_DivideAndDie; gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BARI]++; @@ -285,8 +285,8 @@ void EnVali_SetupFrozen(EnVali* this) { void EnVali_SetupReturnToLurk(EnVali* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gBariLurkingAnim, 10.0f); - this->actor.flags |= ACTOR_FLAG_4; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnVali_ReturnToLurk; } @@ -372,7 +372,7 @@ void EnVali_Attacked(EnVali* this, PlayState* play) { EnVali_DischargeLightning(this, play); if (this->lightningTimer == 0) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->bodyCollider.base.acFlags |= AC_ON; if (this->actor.params == BARI_TYPE_SWORD_DAMAGE) { EnVali_SetupRetaliate(this); @@ -513,7 +513,7 @@ void EnVali_UpdateDamage(EnVali* this, PlayState* play) { if (Actor_ApplyDamage(&this->actor) == 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_BARI_DEAD); Enemy_StartFinishingBlow(play, &this->actor); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else if ((this->actor.colChkInfo.damageEffect != BARI_DMGEFF_STUN) && (this->actor.colChkInfo.damageEffect != BARI_DMGEFF_SLINGSHOT)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_BARI_DAMAGE); diff --git a/soh/src/overlays/actors/ovl_En_Vase/z_en_vase.c b/soh/src/overlays/actors/ovl_En_Vase/z_en_vase.c index cb18428e2..5ecb21ef7 100644 --- a/soh/src/overlays/actors/ovl_En_Vase/z_en_vase.c +++ b/soh/src/overlays/actors/ovl_En_Vase/z_en_vase.c @@ -7,7 +7,7 @@ #include "z_en_vase.h" #include "objects/object_vase/object_vase.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnVase_Init(Actor* thisx, PlayState* play); void EnVase_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c b/soh/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c index ab162f97b..756f46cb5 100644 --- a/soh/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c +++ b/soh/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EnVbBall_Init(Actor* thisx, PlayState* play); void EnVbBall_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c index bf72529ed..7a3c76f4b 100644 --- a/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c +++ b/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c @@ -16,7 +16,7 @@ #include "objects/object_opening_demo1/object_opening_demo1.h" #include "soh/frame_interpolation.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnViewer_Init(Actor* thisx, PlayState* play); void EnViewer_Destroy(Actor* thisx, PlayState* play); @@ -177,7 +177,7 @@ void EnViewer_InitImpl(EnViewer* this, PlayState* play) { if (!Object_IsLoaded(&play->objectCtx, skelObjBankIndex) || !Object_IsLoaded(&play->objectCtx, this->animObjBankIndex)) { - this->actor.flags &= ~ACTOR_FLAG_6; + this->actor.flags &= ~ACTOR_FLAG_ACTIVE; return; } diff --git a/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c index 4eac68129..3b95e4d25 100644 --- a/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnVm_Init(Actor* thisx, PlayState* play); void EnVm_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c b/soh/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c index edb0b3d3f..e9ab11371 100644 --- a/soh/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c +++ b/soh/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c @@ -10,7 +10,7 @@ #include "overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnWallTubo_Init(Actor* thisx, PlayState* play); void EnWallTubo_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 7c454ea2c..e255397b3 100644 --- a/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -8,7 +8,7 @@ #include "objects/object_wallmaster/object_wallmaster.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) #define TIMER_SCALE ((f32)OS_CLOCK_RATE / 10000000000) #define DEGREE_60_RAD (60.0f * M_PI / 180.0f) @@ -159,8 +159,8 @@ void EnWallmas_Destroy(Actor* thisx, PlayState* play) { void EnWallmas_TimerInit(EnWallmas* this, PlayState* play) { Player* player = GET_PLAYER(play); - this->actor.flags &= ~ACTOR_FLAG_0; - this->actor.flags |= ACTOR_FLAG_5; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; + this->actor.flags |= ACTOR_FLAG_DRAW_WHILE_CULLED; this->timer = 0x82; this->actor.velocity.y = 0.0f; this->actor.world.pos.y = player->actor.world.pos.y; @@ -180,8 +180,8 @@ void EnWallmas_SetupDrop(EnWallmas* this, PlayState* play) { this->actor.world.pos.y = player->actor.world.pos.y + 300.0f; this->actor.world.rot.y = player->actor.shape.rot.y + 0x8000; this->actor.floorHeight = player->actor.floorHeight; - this->actor.flags |= ACTOR_FLAG_0; - this->actor.flags &= ~ACTOR_FLAG_5; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; + this->actor.flags &= ~ACTOR_FLAG_DRAW_WHILE_CULLED; this->actionFunc = EnWallmas_Drop; } @@ -276,7 +276,7 @@ void EnWallmas_SetupTakePlayer(EnWallmas* this, PlayState* play) { void EnWallmas_ProximityOrSwitchInit(EnWallmas* this) { this->timer = 0; this->actor.draw = NULL; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (this->actor.params == WMT_PROXIMITY || this->actor.params == WMT_SHADOWTAG) { this->actionFunc = EnWallmas_WaitForProximity; } else { @@ -535,7 +535,7 @@ void EnWallmas_ColUpdate(EnWallmas* this, PlayState* play) { if (Actor_ApplyDamage(&this->actor) == 0) { Enemy_StartFinishingBlow(play, &this->actor); Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_DEAD); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else { if (this->actor.colChkInfo.damage != 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_DAMAGE); diff --git a/soh/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/soh/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c index 17ab87188..0048ea502 100644 --- a/soh/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c +++ b/soh/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c @@ -7,7 +7,7 @@ #include "z_en_weather_tag.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnWeatherTag_Init(Actor* thisx, PlayState* play); void EnWeatherTag_Destroy(Actor* thisx, PlayState* play); @@ -54,7 +54,7 @@ void EnWeatherTag_Destroy(Actor* thisx, PlayState* play) { void EnWeatherTag_Init(Actor* thisx, PlayState* play) { EnWeatherTag* this = (EnWeatherTag*)thisx; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; switch (this->actor.params & 0xF) { case EN_WEATHER_TAG_TYPE_CLOUDY_MARKET: diff --git a/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c b/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c index f7a6d3638..34fa97378 100644 --- a/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c +++ b/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c @@ -7,7 +7,7 @@ #include "z_en_weiyer.h" #include "objects/object_ei/object_ei.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) void EnWeiyer_Init(Actor* thisx, PlayState* play); void EnWeiyer_Destroy(Actor* thisx, PlayState* play); @@ -574,7 +574,7 @@ void func_80B3368C(EnWeiyer* this, PlayState* play) { } else if (Actor_ApplyDamage(&this->actor) == 0) { Enemy_StartFinishingBlow(play, &this->actor); Audio_PlayActorSound2(&this->actor, NA_SE_EN_EIER_DEAD); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; func_80B32724(this); gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_STINGER]++; } else { diff --git a/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c index 522034446..0a74af438 100644 --- a/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_En_Encount1/z_en_encount1.h" #include "objects/object_wf/object_wf.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnWf_Init(Actor* thisx, PlayState* play); void EnWf_Destroy(Actor* thisx, PlayState* play); @@ -373,7 +373,7 @@ void EnWf_SetupWaitToAppear(EnWf* this) { this->actionTimer = 20; this->unk_300 = false; this->action = WOLFOS_ACTION_WAIT_TO_APPEAR; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.scale.y = 0.0f; this->actor.gravity = 0.0f; EnWf_SetupAction(this, EnWf_WaitToAppear); @@ -385,7 +385,7 @@ void EnWf_WaitToAppear(EnWf* this, PlayState* play) { if (this->actor.xzDistToPlayer < 240.0f) { this->actionTimer = 5; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; // Disable miniboss music with Enemy Randomizer because the music would keep // playing if the enemy was never defeated, which is common with Enemy Randomizer. @@ -1193,7 +1193,7 @@ void EnWf_SetupDie(EnWf* this) { } this->action = WOLFOS_ACTION_DIE; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionTimer = this->skelAnime.animLength; Audio_PlayActorSound2(&this->actor, NA_SE_EN_WOLFOS_DEAD); EnWf_SetupAction(this, EnWf_Die); diff --git a/soh/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c b/soh/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c index 66a144421..3d09c811d 100644 --- a/soh/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c +++ b/soh/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c @@ -116,7 +116,7 @@ void EnWonderItem_Init(Actor* thisx, PlayState* play) { osSyncPrintf("\n\n"); // "Mysterious mystery, very mysterious" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 不思議不思議まか不思議 \t ☆☆☆☆☆ %x\n" VT_RST, this->actor.params); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->wonderMode = (this->actor.params >> 0xB) & 0x1F; this->itemDrop = (this->actor.params >> 6) & 0x1F; diff --git a/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c b/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c index 731b83bd5..f5c8c899e 100644 --- a/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c +++ b/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c @@ -7,7 +7,7 @@ #include "z_en_wonder_talk.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_27) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_NO_LOCKON) void EnWonderTalk_Init(Actor* thisx, PlayState* play); void EnWonderTalk_Destroy(Actor* thisx, PlayState* play); @@ -147,7 +147,7 @@ void func_80B3943C(EnWonderTalk* this, PlayState* play) { } } else { if (this->switchFlag >= 0) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Flags_SetSwitch(play, this->switchFlag); } this->actionFunc = func_80B391CC; @@ -179,7 +179,7 @@ void func_80B3943C(EnWonderTalk* this, PlayState* play) { void func_80B395F0(EnWonderTalk* this, PlayState* play) { if (this->unk_156 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { if (this->switchFlag >= 0) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; Flags_SetSwitch(play, this->switchFlag); } switch (this->unk_150) { diff --git a/soh/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/soh/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index f7ecbaf19..26799d848 100644 --- a/soh/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/soh/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -7,7 +7,7 @@ #include "z_en_wonder_talk2.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_27) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_NO_LOCKON) void EnWonderTalk2_Init(Actor* thisx, PlayState* play); void EnWonderTalk2_Destroy(Actor* thisx, PlayState* play); @@ -92,7 +92,7 @@ void EnWonderTalk2_Init(Actor* thisx, PlayState* play) { this->talkMode = 4; } if (this->talkMode == 3) { - this->actor.flags &= ~ACTOR_FLAG_27; + this->actor.flags &= ~ACTOR_FLAG_NO_LOCKON; this->actionFunc = EnWonderTalk2_DoNothing; } else { this->actionFunc = func_80B3A10C; @@ -115,7 +115,7 @@ void func_80B3A15C(EnWonderTalk2* this, PlayState* play) { this->unk_158++; if ((this->switchFlag >= 0) && Flags_GetSwitch(play, this->switchFlag)) { if (!this->unk_15A) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unk_15A = true; } } else if (Actor_ProcessTalkRequest(&this->actor, play)) { @@ -193,7 +193,7 @@ void func_80B3A3D4(EnWonderTalk2* this, PlayState* play) { if (this->talkMode == 4) { this->unk_15A = true; } - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED); func_8002DF54(play, NULL, 7); this->unk_156 = true; this->actionFunc = func_80B3A4F8; @@ -208,7 +208,7 @@ void func_80B3A4F8(EnWonderTalk2* this, PlayState* play) { this->unk_158++; if (this->switchFlag >= 0 && Flags_GetSwitch(play, this->switchFlag)) { if (!this->unk_15A) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unk_15A = true; } } else if ((this->talkMode != 4) || !this->unk_15A) { @@ -285,7 +285,7 @@ void func_80B3A4F8(EnWonderTalk2* this, PlayState* play) { if (!(randoSkipText)) { Message_StartTextbox(play, this->actor.textId, NULL); func_8002DF54(play, NULL, 8); - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED; this->actionFunc = func_80B3A3D4; } } diff --git a/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c b/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c index d84e53756..8449b0b55 100644 --- a/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c +++ b/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c @@ -285,7 +285,7 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) { this->actor.world.pos.x += (sSpawnSin * sSpawnDistance[5]); this->actor.world.pos.z += (sSpawnCos * sSpawnDistance[5]); } else { - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } // Snap to floor, or remove if over void @@ -325,7 +325,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) { // Despawn extra trees in a group if out of range if ((this->spawnType == WOOD_SPAWN_SPAWNED) && (this->actor.parent != NULL)) { - if (!(this->actor.flags & ACTOR_FLAG_6)) { + if (!(this->actor.flags & ACTOR_FLAG_ACTIVE)) { new_var = this->unk_14E[0]; phi_v0 = 0; diff --git a/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c index 83d58e069..0ff5957e9 100644 --- a/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -14,7 +14,7 @@ #include "scenes/dungeons/ice_doukutu/ice_doukutu_scene.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnXc_Init(Actor* thisx, PlayState* play); void EnXc_Destroy(Actor* thisx, PlayState* play); @@ -2224,7 +2224,7 @@ void EnXc_SetupDialogueAction(EnXc* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, play)) { this->action = SHEIK_ACTION_IN_DIALOGUE; } else { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; if (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE) { this->actor.textId = 0x7010; } else { @@ -2237,7 +2237,7 @@ void EnXc_SetupDialogueAction(EnXc* this, PlayState* play) { void func_80B41798(EnXc* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { this->action = SHEIK_ACTION_BLOCK_PEDESTAL; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); } } diff --git a/soh/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c b/soh/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c index f8e39ab88..20880b496 100644 --- a/soh/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c +++ b/soh/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c @@ -81,7 +81,7 @@ void EnYabusameMark_Init(Actor* thisx, PlayState* play) { osSyncPrintf("\n\n"); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ やぶさめまと ☆☆☆☆☆ %x\n" VT_RST, this->actor.params); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->typeIndex = this->actor.params; this->actor.targetMode = 5; osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 種類インデックス \t ☆☆☆☆☆ %d\n" VT_RST, this->typeIndex); @@ -105,7 +105,7 @@ void EnYabusameMark_Init(Actor* thisx, PlayState* play) { Collider_InitQuad(play, &this->collider); Collider_SetQuad(play, &this->collider, &this->actor, &sQuadInit); this->worldPos = this->actor.world.pos; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; if (gSaveContext.sceneSetupIndex != 4) { Actor_Kill(&this->actor); return; diff --git a/soh/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c b/soh/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c index c1f2f08c1..0e8fa568a 100644 --- a/soh/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/soh/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -7,7 +7,7 @@ #include "z_en_yukabyun.h" #include "objects/object_yukabyun/object_yukabyun.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnYukabyun_Init(Actor* thisx, PlayState* play); void EnYukabyun_Destroy(Actor* thisx, PlayState* play); @@ -81,7 +81,7 @@ void func_80B43A94(EnYukabyun* this, PlayState* play) { this->unk_150--; } if (this->unk_150 == 0) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_12; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE; this->actionfunc = func_80B43AD4; } } @@ -124,7 +124,7 @@ void EnYukabyun_Update(Actor* thisx, PlayState* play) { this->collider.base.atFlags &= ~AT_HIT; this->collider.base.acFlags &= ~AC_HIT; this->collider.base.ocFlags1 &= ~OC1_HIT; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_EN_OCTAROCK_ROCK); this->actionfunc = EnYukabyun_Break; } @@ -136,7 +136,7 @@ void EnYukabyun_Update(Actor* thisx, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 20.0f, 8.0f, 5); Collider_UpdateCylinder(&this->actor, &this->collider); - this->actor.flags |= ACTOR_FLAG_24; + this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX; CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); diff --git a/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c b/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c index 254d2a757..8a5ab56be 100644 --- a/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c +++ b/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c @@ -7,7 +7,7 @@ #include "z_en_zf.h" #include "objects/object_zf/object_zf.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnZf_Init(Actor* thisx, PlayState* play); void EnZf_Destroy(Actor* thisx, PlayState* play); @@ -634,7 +634,7 @@ void EnZf_SetupDropIn(EnZf* this) { this->hopAnimIndex = 1; this->action = ENZF_ACTION_DROP_IN; this->actor.bgCheckFlags &= ~2; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; EnZf_SetupAction(this, EnZf_DropIn); } @@ -642,7 +642,7 @@ void EnZf_SetupDropIn(EnZf* this) { void EnZf_DropIn(EnZf* this, PlayState* play) { if (this->unk_3F0 == 1) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_CRY); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; if (this->actor.params == ENZF_TYPE_LIZALFOS_MINIBOSS_A) { func_800F5ACC(NA_BGM_MINI_BOSS); @@ -654,7 +654,7 @@ void EnZf_DropIn(EnZf* this, PlayState* play) { this->unk_3F0--; } else if (this->actor.xzDistToPlayer <= 160.0f) { this->unk_3F0 = 0; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_CRY); } @@ -1902,7 +1902,7 @@ void EnZf_SetupDie(EnZf* this) { } this->action = ENZF_ACTION_DIE; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (D_80B4A1B4 != -1) { if (this->actor.prev != NULL) { diff --git a/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index 39e15bbcf..e5434ed58 100644 --- a/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -7,7 +7,7 @@ #include "z_en_zl1.h" #include "objects/object_zl1/object_zl1.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) void EnZl1_Init(Actor* thisx, PlayState* play); void EnZl1_Destroy(Actor* thisx, PlayState* play); @@ -556,7 +556,7 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { func_8002DF54(play, &this->actor, 7); Interface_ChangeAlpha(50); - this->actor.flags &= ~ACTOR_FLAG_8; + this->actor.flags &= ~ACTOR_FLAG_PLAYER_TALKED_TO; this->unk_1E2 = 4; } break; diff --git a/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index dcff833e1..c0841180b 100644 --- a/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -11,7 +11,7 @@ #include "objects/object_zl2/object_zl2.h" #include "objects/object_zl2_anime1/object_zl2_anime1.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnZl2_Init(Actor* thisx, PlayState* play); void EnZl2_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index 832fac222..d43922a95 100644 --- a/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -12,7 +12,7 @@ #include "objects/object_zl2/object_zl2.h" #include "objects/object_zl2_anime2/object_zl2_anime2.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void EnZl3_Init(Actor* thisx, PlayState* play); void EnZl3_Destroy(Actor* thisx, PlayState* play); @@ -1008,7 +1008,7 @@ void func_80B55780(EnZl3* this, PlayState* play) { this->drawConfig = 1; osSyncPrintf("ゼルダ姫のEn_Zl3_Actor_inFinal2_Initは通った!!!!!!!!!!!!!!!!!!!!!!!!!\n"); EnZl3_setMouthIndex(this, 1); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } void func_80B55808(EnZl3* this) { @@ -1105,8 +1105,8 @@ void func_80B55C4C(EnZl3* this, s32 arg1) { void func_80B55C70(EnZl3* this) { func_80B54E14(this, &gZelda2Anime2Anim_008684, 2, -8.0f, 0); this->action = 12; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } void func_80B55CCC(EnZl3* this, s32 arg1) { @@ -1119,20 +1119,20 @@ void func_80B55D00(EnZl3* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, play)) { this->action = 13; } else if (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) <= 0x4300) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.textId = 0x70D5; func_8002F2F4(&this->actor, play); } else { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } } void func_80B55DB0(EnZl3* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->action = 12; } } @@ -1178,14 +1178,14 @@ void func_80B55F6C(EnZl3* this, PlayState* play) { BossGanon2* bossGanon2 = func_80B53488(this, play); if ((bossGanon2 != NULL) && (bossGanon2->unk_324 <= (10.0f / 81.0f))) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.textId = 0x7059; func_8002F2F4(&this->actor, play); } } else { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } } @@ -1210,8 +1210,8 @@ void func_80B56090(EnZl3* this, s32 arg1) { void func_80B56108(EnZl3* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->action = 16; } } @@ -1240,22 +1240,22 @@ void func_80B56214(EnZl3* this, PlayState* play) { if (bossGanon2 != NULL) { if (bossGanon2->unk_324 <= (10.0f / 81.0f)) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actor.textId = 0x7059; func_8002F2F4(&this->actor, play); } } } else { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } } void func_80B562F4(EnZl3* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->action = 20; } } @@ -1695,7 +1695,7 @@ void func_80B57350(EnZl3* this, PlayState* play) { s16 temp_v0 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; if (ABS(temp_v0) <= 0x4300) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; this->actor.textId = func_80B572F0(play); func_8002F2F4(&this->actor, play); } @@ -2518,7 +2518,7 @@ void func_80B59828(EnZl3* this, PlayState* play) { s16 newRotY; func_80B54E14(this, &gZelda2Anime2Anim_009FBC, 0, 0.0f, 0); - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; func_80B56F10(this, play); newRotY = func_80B571A8(this); this->actor.shape.rot.y = newRotY; diff --git a/soh/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/soh/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index 2f6f05a63..558069664 100644 --- a/soh/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/soh/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -8,7 +8,7 @@ #include "objects/object_zl4/object_zl4.h" #include "scenes/indoors/nakaniwa/nakaniwa_scene.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED) typedef enum { /* 0 */ ZL4_CS_WAIT, diff --git a/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c index 8a413d1c3..f5177ff6e 100644 --- a/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -9,7 +9,7 @@ #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) typedef enum { /* 0 */ ENZO_EFFECT_NONE, @@ -609,7 +609,7 @@ void EnZo_Init(Actor* thisx, PlayState* play) { this->alpha = 255.0f; this->actionFunc = EnZo_Standing; } else { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actionFunc = EnZo_Submerged; } } @@ -654,7 +654,7 @@ void EnZo_Surface(EnZo* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EV_OUT_OF_WATER); EnZo_SpawnSplashes(this); Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENZO_ANIM_3); - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; this->actionFunc = EnZo_TreadWater; this->actor.velocity.y = 0.0f; this->alpha = 255.0f; @@ -704,7 +704,7 @@ void EnZo_Dive(EnZo* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { Audio_PlayActorSound2(&this->actor, NA_SE_EV_DIVE_WATER); EnZo_SpawnSplashes(this); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.velocity.y = -4.0f; this->skelAnime.playSpeed = 0.0f; } diff --git a/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index 1d6ac8f88..dc498f627 100644 --- a/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -11,7 +11,7 @@ #include "overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h" #include "overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef struct { /* 0x00 */ Vec3f pos; diff --git a/soh/src/overlays/actors/ovl_End_Title/z_end_title.c b/soh/src/overlays/actors/ovl_End_Title/z_end_title.c index baf5d219b..af13255a8 100644 --- a/soh/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/soh/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -6,7 +6,7 @@ #include "z_end_title.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void EndTitle_Init(Actor* thisx, PlayState* play); void EndTitle_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Fishing/z_fishing.c b/soh/src/overlays/actors/ovl_Fishing/z_fishing.c index e67039659..8c8dec69b 100644 --- a/soh/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/soh/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -12,7 +12,7 @@ #include "soh/frame_interpolation.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED #define WATER_SURFACE_Y(play) play->colCtx.colHeader->waterBoxes->ySurface @@ -864,7 +864,7 @@ void Fishing_Init(Actor* thisx, PlayState* play2) { thisx->focus.pos = thisx->world.pos; thisx->focus.pos.y += 75.0f; - thisx->flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + thisx->flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; if (sLinkAge != 1) { if (HIGH_SCORE(HS_FISHING) & 0x1000) { @@ -997,7 +997,7 @@ void Fishing_Init(Actor* thisx, PlayState* play2) { this->unk_158 = 100; Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_PROP); thisx->targetMode = 0; - thisx->flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + thisx->flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY; this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo); } else { this->unk_158 = 10; @@ -2878,7 +2878,7 @@ void Fishing_HandleAquariumDialog(Fishing* this, PlayState* play) { if (this->unk_1D3 == 0) { if (this->unk_1D4 == 0) { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; if (Actor_ProcessTalkRequest(&this->actor, play)) { D_80B7A678 = D_80B7E078; @@ -2888,7 +2888,7 @@ void Fishing_HandleAquariumDialog(Fishing* this, PlayState* play) { } } else { this->unk_1D4--; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } } else if (Actor_TextboxIsClosing(&this->actor, play)) { this->unk_1D3 = 0; @@ -2969,9 +2969,9 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) { } if ((D_80B7E0B0 != 0) || (sCameraId != 0) || ((player->actor.world.pos.z > 1150.0f) && (this->unk_158 != 100))) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else { - this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_TARGETABLE; if (D_80B7A694 != 0) { if (D_80B7E0B2 == 0) { this->actor.focus.pos = sLurePos; @@ -3188,7 +3188,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) { if (D_80B7E0B6 == 2) { func_80B70ED4(this, input); } else { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } break; @@ -3225,7 +3225,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) { if (D_80B7E0B6 == 2) { func_80B70ED4(this, input); } else { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } } break; @@ -3269,7 +3269,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) { this->unk_1B4.z = Rand_ZeroFloat(50.0f); } - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; break; case -2: @@ -3308,7 +3308,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) { } Math_ApproachF(&this->unk_1B0, 2048.0f, 1.0f, 128.0f); - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } break; @@ -5215,9 +5215,9 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { SkelAnime_Update(&this->skelAnime); if ((D_80B7A684 != 0) || (Message_GetState(&play->msgCtx) != TEXT_STATE_NONE)) { - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } else { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_5; + this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_DRAW_WHILE_CULLED; } if ((this->actor.xzDistToPlayer < 120.0f) || (Message_GetState(&play->msgCtx) != TEXT_STATE_NONE)) { diff --git a/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c b/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c index 790eedb1a..78c40124b 100644 --- a/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c +++ b/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c @@ -6,7 +6,7 @@ #include "z_item_etcetera.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void ItemEtcetera_Init(Actor* thisx, PlayState* play); void ItemEtcetera_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c b/soh/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c index ff19d095e..04ed7582c 100644 --- a/soh/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c +++ b/soh/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c @@ -6,7 +6,7 @@ #include "z_item_inbox.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void ItemInbox_Init(Actor* thisx, PlayState* play); void ItemInbox_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c b/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c index 70fade6d6..bedc62a56 100644 --- a/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c +++ b/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c @@ -7,7 +7,7 @@ #include "z_item_ocarina.h" #include "scenes/overworld/spot00/spot00_scene.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void ItemOcarina_Init(Actor* thisx, PlayState* play); void ItemOcarina_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Item_Shield/z_item_shield.c b/soh/src/overlays/actors/ovl_Item_Shield/z_item_shield.c index b60de8082..e54b343fc 100644 --- a/soh/src/overlays/actors/ovl_Item_Shield/z_item_shield.c +++ b/soh/src/overlays/actors/ovl_Item_Shield/z_item_shield.c @@ -8,7 +8,7 @@ #include "z_item_shield.h" #include "objects/object_link_child/object_link_child.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void ItemShield_Init(Actor* thisx, PlayState* play); void ItemShield_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c b/soh/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c index 7415876cd..882c6b46e 100644 --- a/soh/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c +++ b/soh/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c @@ -7,7 +7,7 @@ #include "z_magic_dark.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void MagicDark_Init(Actor* thisx, PlayState* play); void MagicDark_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c b/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c index 5782614bd..6d67f1706 100644 --- a/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c +++ b/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c @@ -6,7 +6,7 @@ #include "z_magic_fire.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void MagicFire_Init(Actor* thisx, PlayState* play); void MagicFire_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c index def55aae9..519567ac4 100644 --- a/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -6,7 +6,7 @@ #include "z_magic_wind.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void MagicWind_Init(Actor* thisx, PlayState* play); void MagicWind_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c b/soh/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c index 43c1447bf..0391d39d7 100644 --- a/soh/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/soh/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -8,7 +8,7 @@ #include "objects/object_mir_ray/object_mir_ray.h" #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) void MirRay_Init(Actor* thisx, PlayState* play); void MirRay_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/soh/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 03d46f125..b8f112bd6 100644 --- a/soh/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/soh/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_22 +#define FLAGS ACTOR_FLAG_IGNORE_POINTLIGHTS void ObjBean_Init(Actor* thisx, PlayState* play); void ObjBean_Destroy(Actor* thisx, PlayState* play); @@ -639,7 +639,7 @@ void ObjBean_WaitForWater(ObjBean* this, PlayState* play) { ObjBean_SetupGrowWaterPhase1(this); D_80B90E30 = this; OnePointCutscene_Init(play, 2210, -99, &this->dyna.actor, MAIN_CAM); - this->dyna.actor.flags |= ACTOR_FLAG_4; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; return; } @@ -742,7 +742,7 @@ void ObjBean_GrowWaterPhase5(ObjBean* this, PlayState* play) { this->transformFunc(this); if (this->timer <= 0) { func_80B8FF50(this); - this->dyna.actor.flags &= ~ACTOR_FLAG_4; + this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; } } @@ -767,7 +767,7 @@ void ObjBean_SetupFly(ObjBean* this) { this->actionFunc = ObjBean_Fly; ObjBean_SetDrawMode(this, BEAN_STATE_DRAW_PLANT); this->dyna.actor.speedXZ = 0.0f; - this->dyna.actor.flags |= ACTOR_FLAG_4; // Never stop updating + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; // Never stop updating } void ObjBean_Fly(ObjBean* this, PlayState* play) { @@ -779,7 +779,7 @@ void ObjBean_Fly(ObjBean* this, PlayState* play) { ObjBean_SetupPath(this, play); ObjBean_SetupWaitForStepOff(this); - this->dyna.actor.flags &= ~ACTOR_FLAG_4; // Never stop updating (disable) + this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; // Never stop updating (disable) camera = play->cameraPtrs[MAIN_CAM]; if ((camera->setting == CAM_SET_BEAN_LOST_WOODS) || (camera->setting == CAM_SET_BEAN_GENERIC)) { diff --git a/soh/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c b/soh/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c index 360a8a390..ae9545825 100644 --- a/soh/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c +++ b/soh/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c @@ -7,7 +7,7 @@ #include "z_obj_dekujr.h" #include "objects/object_dekujr/object_dekujr.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void ObjDekujr_Init(Actor* thisx, PlayState* play); void ObjDekujr_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/soh/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c index 45a75e079..da7f9dfd9 100644 --- a/soh/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/soh/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -111,7 +111,7 @@ void func_80B93D90(ObjHsblock* this) { } void func_80B93DB0(ObjHsblock* this) { - this->dyna.actor.flags |= ACTOR_FLAG_4; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 105.0f; ObjHsblock_SetupAction(this, func_80B93DF4); } @@ -132,7 +132,7 @@ void func_80B93E5C(ObjHsblock* this, PlayState* play) { this->dyna.actor.velocity.y, 0.3f)) < 0.001f) { this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y; func_80B93D90(this); - this->dyna.actor.flags &= ~ACTOR_FLAG_4; + this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; } } diff --git a/soh/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/soh/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index 5922830c0..699ae6e7d 100644 --- a/soh/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/soh/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -7,7 +7,7 @@ #include "z_obj_ice_poly.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void ObjIcePoly_Init(Actor* thisx, PlayState* play); void ObjIcePoly_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c index 5a1595ed3..4786c0f4f 100644 --- a/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c +++ b/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c @@ -8,7 +8,7 @@ #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_26) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_CAN_PRESS_SWITCH) void ObjKibako_Init(Actor* thisx, PlayState* play); void ObjKibako_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/soh/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c index a471197e7..fdb376027 100644 --- a/soh/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/soh/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -148,7 +148,7 @@ void ObjKibako2_Idle(ObjKibako2* this, PlayState* play) { func_80033684(play, &this->dyna.actor) != NULL) { ObjKibako2_Break(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK); - this->dyna.actor.flags |= ACTOR_FLAG_4; + this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); this->dyna.actor.draw = NULL; this->actionFunc = ObjKibako2_Kill; diff --git a/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c index 3e35406af..4fd55a528 100644 --- a/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -8,7 +8,7 @@ #include "objects/object_d_lift/object_d_lift.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void ObjLift_Init(Actor* thisx, PlayState* play); void ObjLift_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/soh/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index e88b4eb77..7a893b50a 100644 --- a/soh/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/soh/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h" #include "objects/object_lightswitch/object_lightswitch.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED typedef enum { /* 0x00 */ FACE_EYES_CLOSED, @@ -224,7 +224,7 @@ void ObjLightswitch_Init(Actor* thisx, PlayState* play) { this->actor.shape.rot.z = 0; this->actor.world.rot.x = this->actor.home.rot.x = this->actor.shape.rot.x; this->actor.world.rot.z = this->actor.home.rot.z = this->actor.shape.rot.z; - this->actor.flags |= ACTOR_FLAG_5; + this->actor.flags |= ACTOR_FLAG_DRAW_WHILE_CULLED; if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_OBJ_OSHIHIKI, this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z, 0, this->actor.home.rot.y, 0, (0xFF << 8) | PUSHBLOCK_SMALL_START_ON) == NULL) { diff --git a/soh/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c b/soh/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c index 7d1285a97..82048ffe9 100644 --- a/soh/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c +++ b/soh/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c @@ -7,7 +7,7 @@ #include "z_obj_makekinsuta.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void ObjMakekinsuta_Init(Actor* thisx, PlayState* play); void ObjMakekinsuta_Update(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c b/soh/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c index 80f79998d..f0b6c4c33 100644 --- a/soh/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c +++ b/soh/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_5 +#define FLAGS ACTOR_FLAG_DRAW_WHILE_CULLED void ObjMakeoshihiki_Init(Actor* thisx, PlayState* play); void ObjMakeoshihiki_Draw(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c b/soh/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c index a94abf311..2f5cf4ee3 100644 --- a/soh/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c +++ b/soh/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c @@ -277,7 +277,7 @@ void ObjMure_InitialAction(ObjMure* this, PlayState* play) { void ObjMure_CulledState(ObjMure* this, PlayState* play) { if (fabsf(this->actor.projectedPos.z) < sZClip[this->type] || CVarGetInteger("gDisableDrawDistance", 0) != 0) { this->actionFunc = ObjMure_ActiveState; - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; ObjMure_SpawnActors(this, play); } } @@ -401,7 +401,7 @@ void ObjMure_ActiveState(ObjMure* this, PlayState* play) { if (sZClip[this->type] + 40.0f <= fabsf(this->actor.projectedPos.z) && CVarGetInteger("gDisableDrawDistance", 1) != 0) { this->actionFunc = ObjMure_CulledState; - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; ObjMure_KillActors(this, play); } else if (sTypeGroupBehaviorFunc[this->type] != NULL) { sTypeGroupBehaviorFunc[this->type](this, play); diff --git a/soh/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c b/soh/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c index 913c847a6..b883072b9 100644 --- a/soh/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c +++ b/soh/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c @@ -192,7 +192,7 @@ void func_80B9A668(ObjMure2* this, PlayState* play) { if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) < (sDistSquared1[this->actor.params & 3] * this->unk_184) || CVarGetInteger("gDisableDrawDistance", 0) != 0) { - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; ObjMure2_SpawnActors(this, play); func_80B9A6E8(this); } @@ -211,7 +211,7 @@ void func_80B9A6F8(ObjMure2* this, PlayState* play) { if ((sDistSquared2[this->actor.params & 3] * this->unk_184) <= Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z)) { - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; ObjMure2_CleanupAndDie(this, play); func_80B9A658(this); } diff --git a/soh/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c b/soh/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c index 1c8038bd9..35d425ea4 100644 --- a/soh/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c +++ b/soh/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c @@ -172,7 +172,7 @@ void func_80B9AF64(ObjMure3* this, PlayState* play) { static ObjMure3SpawnFunc spawnFuncs[] = { func_80B9A9D0, func_80B9AA90, func_80B9ABA0 }; if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) < SQ(1150.0f)) { - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; spawnFuncs[(this->actor.params >> 13) & 7](this, play); func_80B9AFEC(this); } @@ -185,7 +185,7 @@ void func_80B9AFEC(ObjMure3* this) { void func_80B9AFFC(ObjMure3* this, PlayState* play) { func_80B9ADCC(this, play); if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) >= SQ(1450.0f)) { - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; func_80B9ACE4(this, play); func_80B9AF54(this); } diff --git a/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index bfc944ca1..97670d230 100644 --- a/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_Obj_Switch/z_obj_switch.h" #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void ObjOshihiki_Init(Actor* thisx, PlayState* play); void ObjOshihiki_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c b/soh/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c index b1da7045f..4fc837036 100644 --- a/soh/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c +++ b/soh/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c @@ -6,7 +6,7 @@ #include "z_obj_roomtimer.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED void ObjRoomtimer_Init(Actor* thisx, PlayState* play); void ObjRoomtimer_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index 532666adf..34defede5 100644 --- a/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -8,7 +8,7 @@ #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "vt.h" -#define FLAGS ACTOR_FLAG_4 +#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED // type: (this->dyna.actor.params & 7) // subtype: (this->dyna.actor.params >> 4 & 7) @@ -308,7 +308,7 @@ void ObjSwitch_Init(Actor* thisx, PlayState* play) { } if (type == OBJSWITCH_TYPE_CRYSTAL_TARGETABLE) { - this->dyna.actor.flags |= ACTOR_FLAG_0; + this->dyna.actor.flags |= ACTOR_FLAG_TARGETABLE; this->dyna.actor.targetMode = 4; } diff --git a/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index ad5829123..572825e09 100644 --- a/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_syokudai/object_syokudai.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT) void ObjSyokudai_Init(Actor* thisx, PlayState* play); void ObjSyokudai_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c b/soh/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c index fc301fe9f..ed210ce0b 100644 --- a/soh/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c +++ b/soh/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c @@ -7,7 +7,7 @@ #include "z_obj_timeblock.h" #include "objects/object_timeblock/object_timeblock.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4 | ACTOR_FLAG_25 | ACTOR_FLAG_27) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA | ACTOR_FLAG_NO_LOCKON) void ObjTimeblock_Init(Actor* thisx, PlayState* play); void ObjTimeblock_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index 3b717cb3c..5d5757b6f 100644 --- a/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -9,7 +9,7 @@ #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "objects/object_tsubo/object_tsubo.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_23) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_ALWAYS_THROWN) void ObjTsubo_Init(Actor* thisx, PlayState* play); void ObjTsubo_Destroy(Actor* thisx, PlayState* play); @@ -229,7 +229,7 @@ void ObjTsubo_WaitForObject(ObjTsubo* this, PlayState* play) { this->actor.draw = ObjTsubo_Draw; this->actor.objBankIndex = this->objTsuboBankIndex; ObjTsubo_SetupIdle(this); - this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_UPDATE_WHILE_CULLED; } } @@ -279,7 +279,7 @@ void ObjTsubo_SetupLiftedUp(ObjTsubo* this) { this->actionFunc = ObjTsubo_LiftedUp; this->actor.room = -1; func_8002F7DC(&this->actor, NA_SE_PL_PULL_UP_POT); - this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } void ObjTsubo_LiftedUp(ObjTsubo* this, PlayState* play) { diff --git a/soh/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c b/soh/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c index 2f407d5bf..73e592e3e 100644 --- a/soh/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c +++ b/soh/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c @@ -8,7 +8,7 @@ #include "objects/object_timeblock/object_timeblock.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4 | ACTOR_FLAG_25 | ACTOR_FLAG_27) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA | ACTOR_FLAG_NO_LOCKON) void ObjWarp2block_Init(Actor* thisx, PlayState* play); void ObjWarp2block_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 325bd1e02..4ad706b79 100644 --- a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -11,7 +11,7 @@ #include "soh/frame_interpolation.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void ObjectKankyo_Init(Actor* thisx, PlayState* play); void ObjectKankyo_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/soh/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index 337fb86ee..178921453 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/soh/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -7,7 +7,7 @@ #include "z_oceff_spot.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void OceffSpot_Init(Actor* thisx, PlayState* play); void OceffSpot_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index f16ec1e27..d4d9acb92 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -6,7 +6,7 @@ #include "z_oceff_storm.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void OceffStorm_Init(Actor* thisx, PlayState* play); void OceffStorm_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index 2daa546a2..41b2d2905 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -7,7 +7,7 @@ #include "z_oceff_wipe.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void OceffWipe_Init(Actor* thisx, PlayState* play); void OceffWipe_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index 44c47e116..13a955640 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -7,7 +7,7 @@ #include "z_oceff_wipe2.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void OceffWipe2_Init(Actor* thisx, PlayState* play); void OceffWipe2_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index e73cb0101..eb85a2816 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -7,7 +7,7 @@ #include "z_oceff_wipe3.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void OceffWipe3_Init(Actor* thisx, PlayState* play); void OceffWipe3_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index d668349c0..043db276d 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -7,7 +7,7 @@ #include "z_oceff_wipe4.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) +#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA) void OceffWipe4_Init(Actor* thisx, PlayState* play); void OceffWipe4_Destroy(Actor* thisx, PlayState* play); diff --git a/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index 082c920e0..d85770a32 100644 --- a/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -9,7 +9,7 @@ #include "scenes/overworld/spot06/spot06_scene.h" #include "vt.h" -#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) +#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) void ShotSun_Init(Actor* thisx, PlayState* play); void ShotSun_Destroy(Actor* thisx, PlayState* play); @@ -62,15 +62,15 @@ void ShotSun_Init(Actor* thisx, PlayState* play) { params = this->actor.params & 0xFF; if (params == 0x40 || params == 0x41) { this->unk_1A4 = 0; - this->actor.flags |= ACTOR_FLAG_4; - this->actor.flags |= ACTOR_FLAG_25; + this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; + this->actor.flags |= ACTOR_FLAG_NO_FREEZE_OCARINA; this->actionFunc = func_80BADF0C; - this->actor.flags |= ACTOR_FLAG_27; + this->actor.flags |= ACTOR_FLAG_NO_LOCKON; } else { Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); this->actionFunc = ShotSun_UpdateHyliaSun; - this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } } diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index bd41af963..794aa86bc 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -1292,7 +1292,7 @@ s32 func_80832224(Player* this) { s32 func_8083224C(PlayState* play) { Player* this = GET_PLAYER(play); - return CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_8); + return CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_PLAYER_TALKED_TO); } void func_80832264(PlayState* play, Player* this, LinkAnimationHeader* anim) { @@ -1317,7 +1317,7 @@ void func_808322FC(Player* this) { } void func_80832318(Player* this) { - this->stateFlags2 &= ~PLAYER_STATE2_17; + this->stateFlags2 &= ~PLAYER_STATE2_SPIN_ATTACKING; this->swordState = 0; this->meleeWeaponInfo[0].active = this->meleeWeaponInfo[1].active = this->meleeWeaponInfo[2].active = 0; } @@ -1333,7 +1333,7 @@ void func_80832340(PlayState* play, Player* this) { } } - this->stateFlags2 &= ~(PLAYER_STATE2_10 | PLAYER_STATE2_11); + this->stateFlags2 &= ~(PLAYER_STATE2_UNDERWATER | PLAYER_STATE2_DIVING); } void func_808323B4(PlayState* play, Player* this) { @@ -1344,7 +1344,7 @@ void func_808323B4(PlayState* play, Player* this) { this->heldActor = NULL; this->interactRangeActor = NULL; heldActor->parent = NULL; - this->stateFlags1 &= ~PLAYER_STATE1_11; + this->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD; } if (Player_GetExplosiveHeld(this) >= 0) { @@ -1354,14 +1354,14 @@ void func_808323B4(PlayState* play, Player* this) { } void func_80832440(PlayState* play, Player* this) { - if ((this->stateFlags1 & PLAYER_STATE1_11) && (this->heldActor == NULL)) { + if ((this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && (this->heldActor == NULL)) { if (this->interactRangeActor != NULL) { if (this->getItemId == GI_NONE) { - this->stateFlags1 &= ~PLAYER_STATE1_11; + this->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD; this->interactRangeActor = NULL; } } else { - this->stateFlags1 &= ~PLAYER_STATE1_11; + this->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD; } } @@ -1371,8 +1371,8 @@ void func_80832440(PlayState* play, Player* this) { func_80832340(play, this); func_8005B1A4(Play_GetCamera(play, 0)); - this->stateFlags1 &= ~(PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_20 | PLAYER_STATE1_21); - this->stateFlags2 &= ~(PLAYER_STATE2_4 | PLAYER_STATE2_7 | PLAYER_STATE2_CRAWLING); + this->stateFlags1 &= ~(PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER); + this->stateFlags2 &= ~(PLAYER_STATE2_MOVING_DYNAPOLY | PLAYER_STATE2_GRABBED_BY_ENEMY | PLAYER_STATE2_CRAWLING); this->actor.shape.rot.x = 0; this->actor.shape.yOffset = 0.0f; @@ -1464,7 +1464,7 @@ void func_808327F8(Player* this, f32 arg1) { func_800F4010(&this->actor.projectedPos, sfxId, arg1); // Gameplay stats: Count footsteps // Only count while game isn't complete and don't count Link's idle animations or crawling in crawlspaces - if (!gSaveContext.sohStats.gameComplete && !(this->stateFlags2 & PLAYER_STATE2_28) && + if (!gSaveContext.sohStats.gameComplete && !(this->stateFlags2 & PLAYER_STATE2_IDLING) && !(this->stateFlags2 & PLAYER_STATE2_CRAWLING)) { gSaveContext.sohStats.count[COUNT_STEPS]++; } @@ -1496,7 +1496,7 @@ void func_808328A0(Player* this) { void func_808328EC(Player* this, u16 sfxId) { func_8002F7DC(&this->actor, sfxId); - this->stateFlags2 |= PLAYER_STATE2_3; + this->stateFlags2 |= PLAYER_STATE2_FOOTSTEP; } void func_80832924(Player* this, struct_80832924* entry) { @@ -1703,11 +1703,11 @@ void func_8083328C(PlayState* play, Player* this, LinkAnimationHeader* linkAnim) } s32 func_808332B8(Player* this) { - return (this->stateFlags1 & PLAYER_STATE1_27) && (this->currentBoots != PLAYER_BOOTS_IRON); + return (this->stateFlags1 & PLAYER_STATE1_IN_WATER) && (this->currentBoots != PLAYER_BOOTS_IRON); } s32 func_808332E4(Player* this) { - return (this->stateFlags1 & PLAYER_STATE1_24); + return (this->stateFlags1 & PLAYER_STATE1_BOOMERANG_IN_HAND); } void func_808332F4(Player* this, PlayState* play) { @@ -1750,7 +1750,7 @@ void func_808333FC(Player* this, s32 arg1) { LinkAnimationHeader* func_80833438(Player* this) { if (this->unk_890 != 0) { return D_80853914[PLAYER_ANIMGROUP_3][this->modelAnimType]; - } else if (!(this->stateFlags1 & (PLAYER_STATE1_27 | PLAYER_STATE1_29)) && + } else if (!(this->stateFlags1 & (PLAYER_STATE1_IN_WATER | PLAYER_STATE1_IN_CUTSCENE)) && (this->currentBoots == PLAYER_BOOTS_IRON)) { return D_80853914[PLAYER_ANIMGROUP_4][this->modelAnimType]; } else { @@ -1814,7 +1814,7 @@ void func_80833664(PlayState* play, Player* this, s8 actionParam) { LinkAnimationHeader** iter = &D_80853914[0][this->modelAnimType]; u32 i; - this->stateFlags1 &= ~(PLAYER_STATE1_3 | PLAYER_STATE1_24); + this->stateFlags1 &= ~(PLAYER_STATE1_ITEM_IN_HAND | PLAYER_STATE1_BOOMERANG_IN_HAND); for (i = 0; i < ARRAY_COUNT(D_80853914); i++) { if (current == *iter) { @@ -1855,7 +1855,7 @@ void func_80833790(PlayState* play, Player* this) { } void func_8083379C(PlayState* play, Player* this) { - this->stateFlags1 |= PLAYER_STATE1_3; + this->stateFlags1 |= PLAYER_STATE1_ITEM_IN_HAND; if (this->heldItemAction != PLAYER_IA_SLINGSHOT) { this->unk_860 = -1; @@ -1869,7 +1869,7 @@ void func_808337D4(PlayState* play, Player* this) { ExplosiveInfo* explosiveInfo; Actor* spawnedActor; - if (this->stateFlags1 & PLAYER_STATE1_11) { + if (this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { func_80832528(play, this); return; } @@ -1897,12 +1897,12 @@ void func_808337D4(PlayState* play, Player* this) { this->getItemId = GI_NONE; this->getItemEntry = (GetItemEntry)GET_ITEM_NONE; this->unk_3BC.y = spawnedActor->shape.rot.y - this->actor.shape.rot.y; - this->stateFlags1 |= PLAYER_STATE1_11; + this->stateFlags1 |= PLAYER_STATE1_ITEM_OVER_HEAD; } } void func_80833910(PlayState* play, Player* this) { - this->stateFlags1 |= PLAYER_STATE1_3; + this->stateFlags1 |= PLAYER_STATE1_ITEM_IN_HAND; this->unk_860 = -3; this->heldActor = @@ -1911,7 +1911,7 @@ void func_80833910(PlayState* play, Player* this) { } void func_80833984(PlayState* play, Player* this) { - this->stateFlags1 |= PLAYER_STATE1_24; + this->stateFlags1 |= PLAYER_STATE1_BOOMERANG_IN_HAND; } void func_8083399C(PlayState* play, Player* this, s8 actionParam) { @@ -1922,7 +1922,7 @@ void func_8083399C(PlayState* play, Player* this, s8 actionParam) { this->heldItemAction = this->itemAction = actionParam; this->modelGroup = this->nextModelGroup; - this->stateFlags1 &= ~(PLAYER_STATE1_3 | PLAYER_STATE1_24); + this->stateFlags1 &= ~(PLAYER_STATE1_ITEM_IN_HAND | PLAYER_STATE1_BOOMERANG_IN_HAND); D_80853FE8[actionParam](play, this); @@ -1968,7 +1968,7 @@ void func_80833A20(Player* this, s32 newSwordState) { } s32 func_80833B2C(Player* this) { - if (this->stateFlags1 & (PLAYER_STATE1_16 | PLAYER_STATE1_17 | PLAYER_STATE1_30)) { + if (this->stateFlags1 & (PLAYER_STATE1_TARGET_LOCKED | PLAYER_STATE1_TARGET_NOTHING | PLAYER_STATE1_30)) { return 1; } else { return 0; @@ -1976,13 +1976,13 @@ s32 func_80833B2C(Player* this) { } s32 func_80833B54(Player* this) { - if ((this->unk_664 != NULL) && CHECK_FLAG_ALL(this->unk_664->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2)) { - this->stateFlags1 |= PLAYER_STATE1_4; + if ((this->unk_664 != NULL) && CHECK_FLAG_ALL(this->unk_664->flags, ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)) { + this->stateFlags1 |= PLAYER_STATE1_ENEMY_TARGET; return 1; } - if (this->stateFlags1 & PLAYER_STATE1_4) { - this->stateFlags1 &= ~PLAYER_STATE1_4; + if (this->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) { + this->stateFlags1 &= ~PLAYER_STATE1_ENEMY_TARGET; if (this->linearVelocity == 0.0f) { this->currentYaw = this->actor.shape.rot.y; } @@ -2079,7 +2079,7 @@ void func_80833DF8(Player* this, PlayState* play) { } } - if (!(this->stateFlags1 & (PLAYER_STATE1_11 | PLAYER_STATE1_29)) && !func_8008F128(this)) { + if (!(this->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE)) && !func_8008F128(this)) { if (this->itemAction >= PLAYER_IA_FISHING_POLE) { bool hasOnDpad = false; if (CVarGetInteger("gDpadEquips", 0) != 0) { @@ -2165,19 +2165,19 @@ void func_808340DC(Player* this, PlayState* play) { LinkAnimation_Change(play, &this->skelAnime2, anim, playSpeed, startFrame, endFrame, ANIMMODE_ONCE, 0.0f); - this->stateFlags1 &= ~PLAYER_STATE1_8; + this->stateFlags1 &= ~PLAYER_STATE1_START_PUTAWAY; } void func_80834298(Player* this, PlayState* play) { - if ((this->actor.category == ACTORCAT_PLAYER) && (CVarGetInteger("gQuickPutaway", 0) || !(this->stateFlags1 & PLAYER_STATE1_8)) && - ((this->heldItemAction == this->itemAction) || (this->stateFlags1 & PLAYER_STATE1_22)) && + if ((this->actor.category == ACTORCAT_PLAYER) && (CVarGetInteger("gQuickPutaway", 0) || !(this->stateFlags1 & PLAYER_STATE1_START_PUTAWAY)) && + ((this->heldItemAction == this->itemAction) || (this->stateFlags1 & PLAYER_STATE1_SHIELDING)) && (gSaveContext.health != 0) && (play->csCtx.state == CS_STATE_IDLE) && (this->csMode == 0) && (play->shootingGalleryStatus == 0) && (play->activeCamera == MAIN_CAM) && (play->sceneLoadFlag != 0x14) && (gSaveContext.timer1State != 10)) { func_80833DF8(this, play); } - if (this->stateFlags1 & PLAYER_STATE1_8) { + if (this->stateFlags1 & PLAYER_STATE1_START_PUTAWAY) { func_808340DC(this, play); } } @@ -2190,7 +2190,7 @@ s32 func_80834380(PlayState* play, Player* this, s32* itemPtr, s32* typePtr) { } if (useBow) { *itemPtr = ITEM_BOW; - if (this->stateFlags1 & PLAYER_STATE1_23) { + if (this->stateFlags1 & PLAYER_STATE1_ON_HORSE) { *typePtr = ARROW_NORMAL_HORSE; } else { *typePtr = this->heldItemAction - 6; @@ -2221,7 +2221,7 @@ s32 func_8083442C(Player* this, PlayState* play) { } else { func_80833638(this, func_808351D4); - this->stateFlags1 |= PLAYER_STATE1_9; + this->stateFlags1 |= PLAYER_STATE1_READY_TO_FIRE; this->unk_834 = 14; if (this->unk_860 >= 0) { @@ -2276,7 +2276,7 @@ void func_80834644(PlayState* play, Player* this) { this->unk_834 = 0; this->unk_6AC = 0; func_808323B4(play, this); - this->stateFlags1 &= ~PLAYER_STATE1_8; + this->stateFlags1 &= ~PLAYER_STATE1_START_PUTAWAY; } LinkAnimationHeader* func_808346C4(PlayState* play, Player* this) { @@ -2296,7 +2296,7 @@ s32 func_80834758(PlayState* play, Player* this) { LinkAnimationHeader* anim; f32 frame; - if (!(this->stateFlags1 & (PLAYER_STATE1_22 | PLAYER_STATE1_23 | PLAYER_STATE1_29)) && + if (!(this->stateFlags1 & (PLAYER_STATE1_SHIELDING | PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_CUTSCENE)) && (play->shootingGalleryStatus == 0) && (this->heldItemAction == this->itemAction) && (this->currentShield != PLAYER_SHIELD_NONE) && !Player_IsChildWithHylianShield(this) && func_80833BCC(this) && CHECK_BTN_ALL(sControlInput->cur.button, BTN_R)) { @@ -2346,7 +2346,7 @@ void func_808348EC(PlayState* play, Player* this) { } s32 func_8083499C(Player* this, PlayState* play) { - if (this->stateFlags1 & PLAYER_STATE1_8) { + if (this->stateFlags1 & PLAYER_STATE1_START_PUTAWAY) { func_808340DC(this, play); } else { return 0; @@ -2393,7 +2393,7 @@ s32 func_80834B5C(Player* this, PlayState* play) { func_80834894(this); return 1; } else { - this->stateFlags1 |= PLAYER_STATE1_22; + this->stateFlags1 |= PLAYER_STATE1_SHIELDING; Player_SetModelsForHoldingShield(this); return 1; } @@ -2409,7 +2409,7 @@ s32 func_80834BD4(Player* this, PlayState* play) { LinkAnimation_Change(play, &this->skelAnime2, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f); } - this->stateFlags1 |= PLAYER_STATE1_22; + this->stateFlags1 |= PLAYER_STATE1_SHIELDING; Player_SetModelsForHoldingShield(this); return 1; @@ -2449,7 +2449,7 @@ s32 func_80834D2C(Player* this, PlayState* play) { LinkAnimation_PlayOnce(play, &this->skelAnime2, &gPlayerAnim_link_boom_throw_wait2waitR); } - if (this->stateFlags1 & PLAYER_STATE1_23) { + if (this->stateFlags1 & PLAYER_STATE1_ON_HORSE) { func_80832284(play, this, &gPlayerAnim_link_uma_anim_walk); } else if ((this->actor.bgCheckFlags & 1) && !func_80833B54(this)) { func_80832284(play, this, D_80853914[PLAYER_ANIMGROUP_0][this->modelAnimType]); @@ -2483,7 +2483,7 @@ s32 func_80834EB8(Player* this, PlayState* play) { } s32 func_80834F2C(Player* this, PlayState* play) { - if ((this->doorType == PLAYER_DOORTYPE_NONE) && !(this->stateFlags1 & PLAYER_STATE1_25)) { + if ((this->doorType == PLAYER_DOORTYPE_NONE) && !(this->stateFlags1 & PLAYER_STATE1_THREW_BOOMERANG)) { if (D_80853614 || func_80834E44(play)) { if (func_80834D2C(this, play)) { return func_80834EB8(this, play); @@ -2609,7 +2609,7 @@ s32 func_808351D4(Player* this, PlayState* play) { this->unk_834 = 10; func_80832210(this); } else { - this->stateFlags1 |= PLAYER_STATE1_9; + this->stateFlags1 |= PLAYER_STATE1_READY_TO_FIRE; } return 1; @@ -2638,7 +2638,7 @@ s32 func_808353D8(Player* this, PlayState* play) { this->unk_834--; } - if (func_80833BCC(this) || (this->unk_6AD != 0) || (this->stateFlags1 & PLAYER_STATE1_20)) { + if (func_80833BCC(this) || (this->unk_6AD != 0) || (this->stateFlags1 & PLAYER_STATE1_FIRST_PERSON)) { if (this->unk_834 == 0) { this->unk_834++; } @@ -2667,7 +2667,7 @@ s32 func_80835588(Player* this, PlayState* play) { } void func_808355DC(Player* this) { - this->stateFlags1 |= PLAYER_STATE1_17; + this->stateFlags1 |= PLAYER_STATE1_TARGET_NOTHING; if (!(this->skelAnime.moveFlags & 0x80) && (this->actor.bgCheckFlags & 0x200) && (D_80853608 < 0x2000)) { this->currentYaw = this->actor.shape.rot.y = this->actor.wallYaw + 0x8000; @@ -2704,7 +2704,7 @@ s32 func_808356E8(Player* this, PlayState* play) { return 1; } - if (this->stateFlags1 & PLAYER_STATE1_11) { + if (this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { if (LinkAnimation_Update(play, &this->skelAnime2)) { LinkAnimation_PlayLoop(play, &this->skelAnime2, &gPlayerAnim_link_normal_carryB_wait); } @@ -2730,7 +2730,7 @@ s32 func_80835800(Player* this, PlayState* play) { return 1; } - if (this->stateFlags1 & PLAYER_STATE1_25) { + if (this->stateFlags1 & PLAYER_STATE1_THREW_BOOMERANG) { func_80833638(this, func_80835B60); } else if (func_80834F2C(this, play)) { return 1; @@ -2788,7 +2788,7 @@ s32 func_808359FC(Player* this, PlayState* play) { if (boomerang != NULL) { boomerang->moveTo = this->unk_664; boomerang->returnTimer = 20; - this->stateFlags1 |= PLAYER_STATE1_25; + this->stateFlags1 |= PLAYER_STATE1_THREW_BOOMERANG; if (!func_8008E9C4(this)) { func_808355DC(this); } @@ -2827,7 +2827,7 @@ s32 func_80835B60(Player* this, PlayState* play) { return 1; } - if (!(this->stateFlags1 & PLAYER_STATE1_25)) { + if (!(this->stateFlags1 & PLAYER_STATE1_THREW_BOOMERANG)) { func_80833638(this, func_80835C08); LinkAnimation_PlayOnce(play, &this->skelAnime2, &gPlayerAnim_link_boom_catch); func_808357E8(this, D_80125EF8); @@ -2858,7 +2858,7 @@ s32 func_80835C58(PlayState* play, Player* this, PlayerFunc674 func, s32 flags) if (func_8084E3C4 == this->func_674) { Audio_OcaSetInstrument(0); - this->stateFlags2 &= ~(PLAYER_STATE2_24 | PLAYER_STATE2_25); + this->stateFlags2 &= ~(PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR | PLAYER_STATE2_PLAY_FOR_ACTOR); } else if (func_808507F4 == this->func_674) { func_80832340(play, this); } @@ -2866,20 +2866,20 @@ s32 func_80835C58(PlayState* play, Player* this, PlayerFunc674 func, s32 flags) this->func_674 = func; if ((this->itemAction != this->heldItemAction) && - (!(flags & 1) || !(this->stateFlags1 & PLAYER_STATE1_22))) { + (!(flags & 1) || !(this->stateFlags1 & PLAYER_STATE1_SHIELDING))) { func_8008EC70(this); } - if (!(flags & 1) && (!(this->stateFlags1 & PLAYER_STATE1_11))) { + if (!(flags & 1) && (!(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD))) { func_80834644(play, this); - this->stateFlags1 &= ~PLAYER_STATE1_22; + this->stateFlags1 &= ~PLAYER_STATE1_SHIELDING; } func_80832DBC(this); - this->stateFlags1 &= ~(PLAYER_STATE1_2 | PLAYER_STATE1_6 | PLAYER_STATE1_26 | PLAYER_STATE1_28 | PLAYER_STATE1_29 | - PLAYER_STATE1_31); - this->stateFlags2 &= ~(PLAYER_STATE2_19 | PLAYER_STATE2_27 | PLAYER_STATE2_28); - this->stateFlags3 &= ~(PLAYER_STATE3_1 | PLAYER_STATE3_3 | PLAYER_STATE3_7); + this->stateFlags1 &= ~(PLAYER_STATE1_HOOKSHOT_FALLING | PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DAMAGED | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE | + PLAYER_STATE1_FLOOR_DISABLED); + this->stateFlags2 &= ~(PLAYER_STATE2_HOPPING | PLAYER_STATE2_OCARINA_PLAYING | PLAYER_STATE2_IDLING); + this->stateFlags3 &= ~(PLAYER_STATE3_MIDAIR | PLAYER_STATE3_FINISHED_ATTACKING | PLAYER_STATE3_HOOKSHOT_TRAVELLING); this->unk_84F = 0; this->unk_850 = 0; this->unk_6AC = 0; @@ -2944,12 +2944,12 @@ void func_80835F44(PlayState* play, Player* this, s32 item) { actionParam = Player_ItemToActionParam(item); if (((this->heldItemAction == this->itemAction) && - (!(this->stateFlags1 & PLAYER_STATE1_22) || (Player_ActionToSword(actionParam) != 0) || + (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) || (Player_ActionToSword(actionParam) != 0) || (actionParam == PLAYER_IA_NONE))) || ((this->itemAction < 0) && ((Player_ActionToSword(actionParam) != 0) || (actionParam == PLAYER_IA_NONE)))) { - if ((actionParam == PLAYER_IA_NONE) || !(this->stateFlags1 & PLAYER_STATE1_27) || + if ((actionParam == PLAYER_IA_NONE) || !(this->stateFlags1 & PLAYER_STATE1_IN_WATER) || ((this->actor.bgCheckFlags & 1) && ((actionParam == PLAYER_IA_HOOKSHOT) || (actionParam == PLAYER_IA_LONGSHOT))) || ((actionParam >= PLAYER_IA_SHIELD_DEKU) && (actionParam <= PLAYER_IA_BOOTS_HOVER))) { @@ -3064,7 +3064,7 @@ void func_80835F44(PlayState* play, Player* this, s32 item) { actionParam < PLAYER_IA_BOW || actionParam > PLAYER_IA_BOW_0E || this->heldItemAction < PLAYER_IA_BOW || this->heldItemAction > PLAYER_IA_BOW_0E)) { this->heldItemId = item; - this->stateFlags1 |= PLAYER_STATE1_8; + this->stateFlags1 |= PLAYER_STATE1_START_PUTAWAY; } else { func_80835EFC(this); func_808323B4(play, this); @@ -3085,7 +3085,7 @@ void func_80836448(PlayState* play, Player* this, LinkAnimationHeader* anim) { func_80835C58(play, this, cond ? func_8084E368 : func_80843CEC, 0); - this->stateFlags1 |= PLAYER_STATE1_7; + this->stateFlags1 |= PLAYER_STATE1_DEAD; func_80832264(play, this, anim); if (anim == &gPlayerAnim_link_derth_rebirth) { @@ -3116,16 +3116,16 @@ void func_80836448(PlayState* play, Player* this, LinkAnimationHeader* anim) { s32 func_808365C8(Player* this) { return (!(func_808458D0 == this->func_674) || - ((this->stateFlags1 & PLAYER_STATE1_8) && + ((this->stateFlags1 & PLAYER_STATE1_START_PUTAWAY) && ((this->heldItemId == ITEM_LAST_USED) || (this->heldItemId == ITEM_NONE)))) && (!(func_80834A2C == this->func_82C) || (Player_ItemToActionParam(this->heldItemId) == this->heldItemAction)); } s32 func_80836670(Player* this, PlayState* play) { - if (!(this->stateFlags1 & PLAYER_STATE1_23) && (this->actor.parent != NULL) && Player_HoldsHookshot(this)) { + if (!(this->stateFlags1 & PLAYER_STATE1_ON_HORSE) && (this->actor.parent != NULL) && Player_HoldsHookshot(this)) { func_80835C58(play, this, func_80850AEC, 1); - this->stateFlags3 |= PLAYER_STATE3_7; + this->stateFlags3 |= PLAYER_STATE3_HOOKSHOT_TRAVELLING; func_80832264(play, this, &gPlayerAnim_link_hook_fly_start); func_80832F54(play, this, 0x9B); func_80832224(this); @@ -3170,23 +3170,23 @@ s32 func_80836670(Player* this, PlayState* play) { s32 func_80836898(PlayState* play, Player* this, PlayerFuncA74 func) { this->func_A74 = func; func_80835C58(play, this, func_808458D0, 0); - this->stateFlags2 |= PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; return func_80832528(play, this); } void func_808368EC(Player* this, PlayState* play) { s16 previousYaw = this->actor.shape.rot.y; - if (!(this->stateFlags2 & (PLAYER_STATE2_5 | PLAYER_STATE2_6))) { + if (!(this->stateFlags2 & (PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS))) { if ((this->unk_664 != NULL) && ((play->actorCtx.targetCtx.unk_4B != 0) || (this->actor.category != ACTORCAT_PLAYER))) { Math_ScaledStepToS(&this->actor.shape.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_664->focus.pos), 4000); - } else if ((this->stateFlags1 & PLAYER_STATE1_17) && - !(this->stateFlags2 & (PLAYER_STATE2_5 | PLAYER_STATE2_6))) { + } else if ((this->stateFlags1 & PLAYER_STATE1_TARGET_NOTHING) && + !(this->stateFlags2 & (PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS))) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->targetYaw, 4000); } - } else if (!(this->stateFlags2 & PLAYER_STATE2_6)) { + } else if (!(this->stateFlags2 & PLAYER_STATE2_DISABLE_ROTATION_ALWAYS)) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->currentYaw, 2000); } @@ -3250,15 +3250,15 @@ void func_80836BEC(Player* this, PlayState* play) { } if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != 0) || - (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->stateFlags3 & PLAYER_STATE3_7)) { + (this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (this->stateFlags3 & PLAYER_STATE3_HOOKSHOT_TRAVELLING)) { this->unk_66C = 0; - } else if (zTrigPressed || (this->stateFlags2 & PLAYER_STATE2_13) || (this->unk_684 != NULL)) { + } else if (zTrigPressed || (this->stateFlags2 & PLAYER_STATE2_SWITCH_TARGETING) || (this->unk_684 != NULL)) { if (this->unk_66C <= 5) { this->unk_66C = 5; } else { this->unk_66C--; } - } else if (this->stateFlags1 & PLAYER_STATE1_17) { + } else if (this->stateFlags1 & PLAYER_STATE1_TARGET_NOTHING) { this->unk_66C = 0; } else if (this->unk_66C != 0) { this->unk_66C--; @@ -3269,9 +3269,9 @@ void func_80836BEC(Player* this, PlayState* play) { } cond = func_8083224C(play); - if (cond || (this->unk_66C != 0) || (this->stateFlags1 & (PLAYER_STATE1_12 | PLAYER_STATE1_25))) { + if (cond || (this->unk_66C != 0) || (this->stateFlags1 & (PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_THREW_BOOMERANG))) { if (!cond) { - if (!(this->stateFlags1 & PLAYER_STATE1_25) && + if (!(this->stateFlags1 & PLAYER_STATE1_THREW_BOOMERANG) && ((this->heldItemAction != PLAYER_IA_FISHING_POLE) || (this->unk_860 == 0)) && CHECK_BTN_ALL(sControlInput->press.button, BTN_Z)) { @@ -3282,20 +3282,20 @@ void func_80836BEC(Player* this, PlayState* play) { } holdTarget = (gSaveContext.zTargetSetting != 0) || (this->actor.category != ACTORCAT_PLAYER); - this->stateFlags1 |= PLAYER_STATE1_15; + this->stateFlags1 |= PLAYER_STATE1_TARGETING; - if ((actorToTarget != NULL) && !(actorToTarget->flags & ACTOR_FLAG_27)) { + if ((actorToTarget != NULL) && !(actorToTarget->flags & ACTOR_FLAG_NO_LOCKON)) { if ((actorToTarget == this->unk_664) && (this->actor.category == ACTORCAT_PLAYER)) { actorToTarget = play->actorCtx.targetCtx.unk_94; } if (actorToTarget != this->unk_664) { if (!holdTarget) { - this->stateFlags2 |= PLAYER_STATE2_13; + this->stateFlags2 |= PLAYER_STATE2_SWITCH_TARGETING; } this->unk_664 = actorToTarget; this->unk_66C = 15; - this->stateFlags2 &= ~(PLAYER_STATE2_1 | PLAYER_STATE2_21); + this->stateFlags2 &= ~(PLAYER_STATE2_SPEAK_OR_CHECK | PLAYER_STATE2_NAVI_ALERT); } else { if (!holdTarget) { func_8008EDF0(this); @@ -3304,7 +3304,7 @@ void func_80836BEC(Player* this, PlayState* play) { this->stateFlags1 &= ~PLAYER_STATE1_30; } else { - if (!(this->stateFlags1 & (PLAYER_STATE1_17 | PLAYER_STATE1_30))) { + if (!(this->stateFlags1 & (PLAYER_STATE1_TARGET_NOTHING | PLAYER_STATE1_30))) { func_808355DC(this); } } @@ -3324,14 +3324,14 @@ void func_80836BEC(Player* this, PlayState* play) { } if (this->unk_664 != NULL) { - this->stateFlags1 &= ~(PLAYER_STATE1_16 | PLAYER_STATE1_17); - if ((this->stateFlags1 & PLAYER_STATE1_11) || - !CHECK_FLAG_ALL(this->unk_664->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2)) { - this->stateFlags1 |= PLAYER_STATE1_16; + this->stateFlags1 &= ~(PLAYER_STATE1_TARGET_LOCKED | PLAYER_STATE1_TARGET_NOTHING); + if ((this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) || + !CHECK_FLAG_ALL(this->unk_664->flags, ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)) { + this->stateFlags1 |= PLAYER_STATE1_TARGET_LOCKED; } } else { - if (this->stateFlags1 & PLAYER_STATE1_17) { - this->stateFlags2 &= ~PLAYER_STATE2_13; + if (this->stateFlags1 & PLAYER_STATE1_TARGET_NOTHING) { + this->stateFlags2 &= ~PLAYER_STATE2_SWITCH_TARGETING; } else { func_8008EE08(this); } @@ -3347,7 +3347,7 @@ s32 func_80836FAC(PlayState* play, Player* this, f32* arg2, s16* arg3, f32 arg4) f32 temp_f14; f32 temp_f12; - if ((this->unk_6AD != 0) || (play->sceneLoadFlag == 0x14) || (this->stateFlags1 & PLAYER_STATE1_0)) { + if ((this->unk_6AD != 0) || (play->sceneLoadFlag == 0x14) || (this->stateFlags1 & PLAYER_STATE1_LOADING)) { *arg2 = 0.0f; *arg3 = this->actor.shape.rot.y; } else { @@ -3397,7 +3397,7 @@ s32 func_80837268(Player* this, f32* arg1, s16* arg2, f32 arg3, PlayState* play) *arg2 = this->actor.shape.rot.y; if (this->unk_664 != NULL) { - if ((play->actorCtx.targetCtx.unk_4B != 0) && !(this->stateFlags2 & PLAYER_STATE2_6)) { + if ((play->actorCtx.targetCtx.unk_4B != 0) && !(this->stateFlags2 & PLAYER_STATE2_DISABLE_ROTATION_ALWAYS)) { *arg2 = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_664->focus.pos); return 0; } @@ -3432,7 +3432,7 @@ static s32 (*D_80854448[])(Player* this, PlayState* play) = { s32 func_80837348(PlayState* play, Player* this, s8* arg2, s32 arg3) { s32 i; - if (!(this->stateFlags1 & (PLAYER_STATE1_0 | PLAYER_STATE1_7 | PLAYER_STATE1_29))) { + if (!(this->stateFlags1 & (PLAYER_STATE1_LOADING | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE))) { if (arg3 != 0) { D_808535E0 = func_80836670(this, play); if (func_8084E604 == this->func_674) { @@ -3445,7 +3445,7 @@ s32 func_80837348(PlayState* play, Player* this, s8* arg2, s32 arg3) { return 1; } - if (!(this->stateFlags1 & PLAYER_STATE1_8) && (func_80834A2C != this->func_82C)) { + if (!(this->stateFlags1 & PLAYER_STATE1_START_PUTAWAY) && (func_80834A2C != this->func_82C)) { while (*arg2 >= 0) { if (D_80854448[*arg2](this, play)) { return 1; @@ -3486,7 +3486,7 @@ void func_80837530(PlayState* play, Player* this, s32 arg2) { this->unk_858 = 0.5f; } - this->stateFlags1 |= PLAYER_STATE1_12; + this->stateFlags1 |= PLAYER_STATE1_CHARGING_SPIN_ATTACK; if (this->actor.category == ACTORCAT_PLAYER) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_M_THUNDER, this->bodyPartsPos[PLAYER_BODYPART_WAIST].x, @@ -3578,7 +3578,7 @@ s32 func_80837818(Player* this) { } else { sp18 = D_80854480[sp1C]; if (sp18 == 12) { - this->stateFlags2 |= PLAYER_STATE2_30; + this->stateFlags2 |= PLAYER_STATE2_SWORD_LUNGE; if (!func_80833BCC(this)) { sp18 = 0; } @@ -3716,7 +3716,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, LinkAnimationHeader* sp2C = NULL; LinkAnimationHeader** sp28; - if (this->stateFlags1 & PLAYER_STATE1_13) { + if (this->stateFlags1 & PLAYER_STATE1_HANGING_OFF_LEDGE) { func_80837B60(this); } @@ -3725,8 +3725,8 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, func_8002F7DC(&this->actor, NA_SE_PL_DAMAGE); if (!func_80837B18(play, this, 0 - this->actor.colChkInfo.damage)) { - this->stateFlags2 &= ~PLAYER_STATE2_7; - if (!(this->actor.bgCheckFlags & 1) && !(this->stateFlags1 & PLAYER_STATE1_27)) { + this->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY; + if (!(this->actor.bgCheckFlags & 1) && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) { func_80837B9C(this, play); } return; @@ -3755,7 +3755,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, this->unk_850 = 20; } else { arg5 -= this->actor.shape.rot.y; - if (this->stateFlags1 & PLAYER_STATE1_27) { + if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { func_80835C58(play, this, func_8084E30C, 0); func_8083264C(this, 180, 20, 50, 0); @@ -3766,10 +3766,10 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, func_80832698(this, NA_SE_VO_LI_DAMAGE_S); } else if ((arg2 == 1) || (arg2 == 2) || !(this->actor.bgCheckFlags & 1) || - (this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21))) { + (this->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_CLIMBING_LADDER))) { func_80835C58(play, this, func_8084377C, 0); - this->stateFlags3 |= PLAYER_STATE3_1; + this->stateFlags3 |= PLAYER_STATE3_MIDAIR; func_8083264C(this, 255, 20, 150, 0); func_80832224(this); @@ -3847,7 +3847,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, func_80832564(play, this); - this->stateFlags1 |= PLAYER_STATE1_26; + this->stateFlags1 |= PLAYER_STATE1_DAMAGED; if (sp2C != NULL) { func_808322D0(play, this, sp2C); @@ -3913,7 +3913,7 @@ s32 func_808382DC(Player* this, PlayState* play) { } else { sp68 = ((Player_GetHeight(this) - 8.0f) < (this->unk_6C4 * this->actor.scale.y)); - if (sp68 || (this->actor.bgCheckFlags & 0x100) || (D_808535E4 == 9) || (this->stateFlags2 & PLAYER_STATE2_31)) { + if (sp68 || (this->actor.bgCheckFlags & 0x100) || (D_808535E4 == 9) || (this->stateFlags2 & PLAYER_STATE2_FORCED_VOID_OUT)) { func_80832698(this, NA_SE_VO_LI_DAMAGE_S); if (sp68) { @@ -3998,7 +3998,7 @@ s32 func_808382DC(Player* this, PlayState* play) { } } - if (!(this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21))) { + if (!(this->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_CLIMBING_LADDER))) { this->linearVelocity = -18.0f; this->currentYaw = this->actor.shape.rot.y; } @@ -4011,7 +4011,7 @@ s32 func_808382DC(Player* this, PlayState* play) { return 0; } - if ((this->unk_A87 != 0) || (this->invincibilityTimer > 0) || (this->stateFlags1 & PLAYER_STATE1_26) || + if ((this->unk_A87 != 0) || (this->invincibilityTimer > 0) || (this->stateFlags1 & PLAYER_STATE1_DAMAGED) || (this->csMode != 0) || (this->meleeWeaponQuads[0].base.atFlags & AT_HIT) || (this->meleeWeaponQuads[1].base.atFlags & AT_HIT)) { return 0; @@ -4021,11 +4021,11 @@ s32 func_808382DC(Player* this, PlayState* play) { Actor* ac = this->cylinder.base.ac; s32 sp4C; - if (ac->flags & ACTOR_FLAG_24) { + if (ac->flags & ACTOR_FLAG_PLAY_HIT_SFX) { func_8002F7DC(&this->actor, NA_SE_PL_BODY_HIT); } - if (this->stateFlags1 & PLAYER_STATE1_27) { + if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { sp4C = 0; } else if (this->actor.colChkInfo.acHitEffect == 2) { sp4C = 3; @@ -4079,7 +4079,7 @@ void func_80838940(Player* this, LinkAnimationHeader* anim, f32 arg2, PlayState* func_80832854(this); func_80832698(this, sfxId); - this->stateFlags1 |= PLAYER_STATE1_18; + this->stateFlags1 |= PLAYER_STATE1_JUMPING; } void func_808389E8(Player* this, LinkAnimationHeader* anim, f32 arg2, PlayState* play) { @@ -4095,8 +4095,8 @@ s32 func_80838A14(Player* this, PlayState* play) { f32 sp28; f32 sp24; - if (!(this->stateFlags1 & PLAYER_STATE1_11) && (this->unk_88C >= 2) && - (!(this->stateFlags1 & PLAYER_STATE1_27) || (this->ageProperties->unk_14 > this->wallHeight))) { + if (!(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && (this->unk_88C >= 2) && + (!(this->stateFlags1 & PLAYER_STATE1_IN_WATER) || (this->ageProperties->unk_14 > this->wallHeight))) { sp3C = 0; if (func_808332B8(this)) { @@ -4108,13 +4108,13 @@ s32 func_80838A14(Player* this, PlayState* play) { return 0; } } else if (!(this->actor.bgCheckFlags & 1) || - ((this->ageProperties->unk_14 <= this->wallHeight) && (this->stateFlags1 & PLAYER_STATE1_27))) { + ((this->ageProperties->unk_14 <= this->wallHeight) && (this->stateFlags1 & PLAYER_STATE1_IN_WATER))) { return 0; } if ((this->actor.wallBgId != BGCHECK_SCENE) && (D_808535F0 & 0x40)) { if (this->unk_88D >= 6) { - this->stateFlags2 |= PLAYER_STATE2_2; + this->stateFlags2 |= PLAYER_STATE2_DO_ACTION_CLIMB; if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A)) { sp3C = 1; } @@ -4126,7 +4126,7 @@ s32 func_80838A14(Player* this, PlayState* play) { if (sp3C != 0) { func_80835C58(play, this, func_80845668, 0); - this->stateFlags1 |= PLAYER_STATE1_18; + this->stateFlags1 |= PLAYER_STATE1_JUMPING; sp34 = this->wallHeight; @@ -4138,12 +4138,12 @@ s32 func_80838A14(Player* this, PlayState* play) { sp28 = COLPOLY_GET_NORMAL(this->actor.wallPoly->normal.z); sp24 = this->wallDistance + 0.5f; - this->stateFlags1 |= PLAYER_STATE1_14; + this->stateFlags1 |= PLAYER_STATE1_CLIMBING_LEDGE; if (func_808332B8(this)) { sp38 = &gPlayerAnim_link_swimer_swim_15step_up; sp34 -= (60.0f * this->ageProperties->unk_08); - this->stateFlags1 &= ~PLAYER_STATE1_27; + this->stateFlags1 &= ~PLAYER_STATE1_IN_WATER; } else if (this->ageProperties->unk_18 <= sp34) { sp38 = &gPlayerAnim_link_normal_150step_up; sp34 -= (59.0f * this->ageProperties->unk_08); @@ -4202,13 +4202,13 @@ void func_80838F18(PlayState* play, Player* this) { void func_80838F5C(PlayState* play, Player* this) { func_80835C58(play, this, func_8084F88C, 0); - this->stateFlags1 |= PLAYER_STATE1_29 | PLAYER_STATE1_31; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE | PLAYER_STATE1_FLOOR_DISABLED; Camera_ChangeSetting(Play_GetCamera(play, 0), CAM_SET_FREE0); } s32 func_80838FB8(PlayState* play, Player* this) { - if ((play->sceneLoadFlag == 0) && (this->stateFlags1 & PLAYER_STATE1_31)) { + if ((play->sceneLoadFlag == 0) && (this->stateFlags1 & PLAYER_STATE1_FLOOR_DISABLED)) { func_80838F5C(play, this); func_80832284(play, this, &gPlayerAnim_link_normal_landing_wait); func_80832698(this, NA_SE_VO_LI_FALL_S); @@ -4248,14 +4248,14 @@ s32 func_80839034(PlayState* play, Player* this, CollisionPoly* poly, u32 bgId) if (this->actor.category == ACTORCAT_PLAYER) { sp3C = 0; - if (!(this->stateFlags1 & PLAYER_STATE1_7) && (play->sceneLoadFlag == 0) && (this->csMode == 0) && - !(this->stateFlags1 & PLAYER_STATE1_0) && + if (!(this->stateFlags1 & PLAYER_STATE1_DEAD) && (play->sceneLoadFlag == 0) && (this->csMode == 0) && + !(this->stateFlags1 & PLAYER_STATE1_LOADING) && (((poly != NULL) && (sp3C = SurfaceType_GetSceneExitIndex(&play->colCtx, poly, bgId), sp3C != 0)) || (func_8083816C(D_808535E4) && (this->unk_A7A == 12)))) { sp34 = this->unk_A84 - (s32)this->actor.world.pos.y; - if (!(this->stateFlags1 & (PLAYER_STATE1_23 | PLAYER_STATE1_27 | PLAYER_STATE1_29)) && + if (!(this->stateFlags1 & (PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_WATER | PLAYER_STATE1_IN_CUTSCENE)) && !(this->actor.bgCheckFlags & 1) && (sp34 < 100) && (D_80853600 > 100.0f)) { return 0; } @@ -4298,7 +4298,7 @@ s32 func_80839034(PlayState* play, Player* this, CollisionPoly* poly, u32 bgId) play->sceneLoadFlag = 0x14; } - if (!(this->stateFlags1 & (PLAYER_STATE1_23 | PLAYER_STATE1_29)) && + if (!(this->stateFlags1 & (PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_CUTSCENE)) && !(this->stateFlags2 & PLAYER_STATE2_CRAWLING) && !func_808332B8(this) && (temp = func_80041D4C(&play->colCtx, poly, bgId), (temp != 10)) && ((sp34 < 100) || (this->actor.bgCheckFlags & 1))) { @@ -4335,7 +4335,7 @@ s32 func_80839034(PlayState* play, Player* this, CollisionPoly* poly, u32 bgId) } } - this->stateFlags1 |= PLAYER_STATE1_0 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_LOADING | PLAYER_STATE1_IN_CUTSCENE; func_80835E44(play, 0x2F); @@ -4435,7 +4435,7 @@ s32 func_80839800(Player* this, PlayState* play) { Vec3f sp4C; if ((this->doorType != PLAYER_DOORTYPE_NONE) && - (!(this->stateFlags1 & PLAYER_STATE1_11) || + (!(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) || ((this->heldActor != NULL) && (this->heldActor->id == ACTOR_EN_RU1)))) { if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (func_8084F9A0 == this->func_674)) { doorActor = this->doorActor; @@ -4467,7 +4467,7 @@ s32 func_80839800(Player* this, PlayState* play) { this->unk_84F = 0; this->unk_447 = this->doorType; - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; this->unk_450.x = this->actor.world.pos.x + ((doorDirection * 20.0f) * sp74); this->unk_450.z = this->actor.world.pos.z + ((doorDirection * 20.0f) * sp78); @@ -4542,7 +4542,7 @@ s32 func_80839800(Player* this, PlayState* play) { door->playerIsOpening = 1; if (this->doorType != PLAYER_DOORTYPE_FAKE) { - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; Actor_DisableLens(play); if (((doorActor->params >> 7) & 7) == 3) { @@ -4661,14 +4661,14 @@ void func_8083A0F4(PlayState* play, Player* this) { if (interactActorId == ACTOR_BG_TOKI_SWD) { this->interactRangeActor->parent = &this->actor; func_80835C58(play, this, func_8084F608, 0); - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; sMaskMemory = PLAYER_MASK_NONE; } else { LinkAnimationHeader* anim; if (interactActorId == ACTOR_BG_HEAVY_BLOCK) { func_80835C58(play, this, func_80846120, 0); - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; anim = &gPlayerAnim_link_normal_heavy_carry; } else if ((interactActorId == ACTOR_EN_ISHI) && ((interactRangeActor->params & 0xF) == 1)) { func_80835C58(play, this, func_80846260, 0); @@ -4697,14 +4697,14 @@ void func_8083A0F4(PlayState* play, Player* this) { } } else { func_80839F90(this, play); - this->stateFlags1 &= ~PLAYER_STATE1_11; + this->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD; } } void func_8083A2F8(PlayState* play, Player* this) { func_80835DAC(play, this, func_8084B530, 0); - this->stateFlags1 |= PLAYER_STATE1_6 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_IN_CUTSCENE; if (this->actor.textId != 0) { Message_StartTextbox(play, this->actor.textId, this->targetActor); @@ -4738,7 +4738,7 @@ void func_8083A40C(PlayState* play, Player* this) { void func_8083A434(PlayState* play, Player* this) { func_80835DAC(play, this, func_8084E6D4, 0); - this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_IN_CUTSCENE; if (this->getItemId == GI_HEART_CONTAINER_2) { this->unk_850 = 20; @@ -4838,14 +4838,14 @@ s32 func_8083A6AC(Player* this, PlayState* play) { this->currentYaw += 0x8000; this->actor.shape.rot.y = this->currentYaw; - this->stateFlags1 |= PLAYER_STATE1_21; + this->stateFlags1 |= PLAYER_STATE1_CLIMBING_LADDER; func_80832F54(play, this, 0x9F); this->unk_850 = -1; this->unk_84F = sp50; } else { - this->stateFlags1 |= PLAYER_STATE1_13; - this->stateFlags1 &= ~PLAYER_STATE1_17; + this->stateFlags1 |= PLAYER_STATE1_HANGING_OFF_LEDGE; + this->stateFlags1 &= ~PLAYER_STATE1_TARGET_NOTHING; } func_8002F7DC(&this->actor, NA_SE_PL_SLIPDOWN); @@ -4875,7 +4875,7 @@ void func_8083AA10(Player* this, PlayState* play) { this->fallDistance = this->fallStartHeight - (s32)this->actor.world.pos.y; - if (!(this->stateFlags1 & (PLAYER_STATE1_27 | PLAYER_STATE1_29)) && !(this->actor.bgCheckFlags & 1)) { + if (!(this->stateFlags1 & (PLAYER_STATE1_IN_WATER | PLAYER_STATE1_IN_CUTSCENE)) && !(this->actor.bgCheckFlags & 1)) { if (!func_80838FB8(play, this)) { if (D_80853604 == 8) { this->actor.world.pos.x = this->actor.prevPos.x; @@ -4883,7 +4883,7 @@ void func_8083AA10(Player* this, PlayState* play) { return; } - if (!(this->stateFlags3 & PLAYER_STATE3_1) && !(this->skelAnime.moveFlags & 0x80) && + if (!(this->stateFlags3 & PLAYER_STATE3_MIDAIR) && !(this->skelAnime.moveFlags & 0x80) && (func_8084411C != this->func_674) && (func_80844A44 != this->func_674)) { if ((D_80853604 == 7) || (this->swordState != 0)) { @@ -4905,11 +4905,11 @@ void func_8083AA10(Player* this, PlayState* play) { this->unk_89E = this->unk_A82; - if ((this->actor.bgCheckFlags & 4) && !(this->stateFlags1 & PLAYER_STATE1_27) && (D_80853604 != 6) && + if ((this->actor.bgCheckFlags & 4) && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER) && (D_80853604 != 6) && (D_80853604 != 9) && (D_80853600 > 20.0f) && (this->swordState == 0) && (ABS(sp5C) < 0x2000) && (this->linearVelocity > 3.0f)) { - if ((D_80853604 == 11) && !(this->stateFlags1 & PLAYER_STATE1_11)) { + if ((D_80853604 == 11) && !(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD)) { sp40 = func_808396F4(play, this, &D_8085451C, &sp44, &sp58, &sp54); sp3C = this->actor.world.pos.y; @@ -4964,7 +4964,7 @@ s32 func_8083ADD4(PlayState* play, Player* this) { if (this->unk_6AD == 3) { func_80835C58(play, this, func_80852E14, 0); if (this->doorBgCamIndex != 0) { - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; } func_80832318(this); return 1; @@ -5042,7 +5042,7 @@ s32 func_8083B040(Player* this, PlayState* play) { Actor* targetActor; if ((this->unk_6AD != 0) && - (func_808332B8(this) || (this->actor.bgCheckFlags & 1) || (this->stateFlags1 & PLAYER_STATE1_23))) { + (func_808332B8(this) || (this->actor.bgCheckFlags & 1) || (this->stateFlags1 & PLAYER_STATE1_ON_HORSE))) { if (!func_8083ADD4(play, this)) { if (this->unk_6AD == 4) { @@ -5052,7 +5052,7 @@ s32 func_8083B040(Player* this, PlayState* play) { func_8083AF44(play, this, sp2C); } else { func_80835C58(play, this, func_8085063C, 1); - this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE; func_80832264(play, this, func_80833338(this)); func_80835EA4(play, 4); } @@ -5082,7 +5082,7 @@ s32 func_8083B040(Player* this, PlayState* play) { func_8083AE40(this, giEntry.objectId); } - this->stateFlags1 |= PLAYER_STATE1_6 | PLAYER_STATE1_28 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE; if (sp2C >= 0) { sp2C = sp2C + 1; @@ -5102,11 +5102,11 @@ s32 func_8083B040(Player* this, PlayState* play) { if (this->exchangeItemId == EXCH_ITEM_BEAN) { Inventory_ChangeAmmo(ITEM_BEAN, -1); func_80835DE4(play, this, func_8084279C, 0); - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; this->unk_850 = 0x50; this->unk_84F = -1; } - targetActor->flags |= ACTOR_FLAG_8; + targetActor->flags |= ACTOR_FLAG_PLAYER_TALKED_TO; this->unk_664 = this->targetActor; } else if (sp2C == EXCH_ITEM_LETTER_RUTO) { this->unk_84F = 1; @@ -5118,7 +5118,7 @@ s32 func_8083B040(Player* this, PlayState* play) { func_80835EA4(play, 4); } - this->actor.flags |= ACTOR_FLAG_8; + this->actor.flags |= ACTOR_FLAG_PLAYER_TALKED_TO; this->exchangeItemId = sp2C; if (this->unk_84F < 0) { @@ -5150,20 +5150,20 @@ s32 func_8083B040(Player* this, PlayState* play) { } else { func_80835DE4(play, this, func_8084E3C4, 0); func_808322D0(play, this, &gPlayerAnim_link_normal_okarina_start); - this->stateFlags2 |= PLAYER_STATE2_27; + this->stateFlags2 |= PLAYER_STATE2_OCARINA_PLAYING; func_80835EA4(play, (this->unk_6A8 != NULL) ? 0x5B : 0x5A); if (this->unk_6A8 != NULL) { - this->stateFlags2 |= PLAYER_STATE2_25; + this->stateFlags2 |= PLAYER_STATE2_PLAY_FOR_ACTOR; Camera_SetParam(Play_GetCamera(play, 0), 8, this->unk_6A8); } } } else if (func_8083AD4C(play, this)) { - if (!(this->stateFlags1 & PLAYER_STATE1_23)) { + if (!(this->stateFlags1 & PLAYER_STATE1_ON_HORSE)) { func_80835C58(play, this, func_8084B1D8, 1); this->unk_850 = 13; func_8083B010(this); } - this->stateFlags1 |= PLAYER_STATE1_20; + this->stateFlags1 |= PLAYER_STATE1_FIRST_PERSON; func_80078884(NA_SE_SY_CAMERA_ZOOM_UP); func_80832210(this); return 1; @@ -5173,7 +5173,7 @@ s32 func_8083B040(Player* this, PlayState* play) { return 0; } - this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE; } func_80832224(this); @@ -5190,7 +5190,7 @@ s32 func_8083B644(Player* this, PlayState* play) { s32 sp28 = 0; s32 sp24; - sp24 = (sp30 != NULL) && (CHECK_FLAG_ALL(sp30->flags, ACTOR_FLAG_0 | ACTOR_FLAG_18) || (sp30->naviEnemyId != 0xFF)); + sp24 = (sp30 != NULL) && (CHECK_FLAG_ALL(sp30->flags, ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_NAVI_HAS_INFO) || (sp30->naviEnemyId != 0xFF)); if (sp24 || (this->naviTextId != 0)) { sp28 = (this->naviTextId < 0) && ((ABS(this->naviTextId) & 0xFF00) != 0x200); @@ -5207,15 +5207,15 @@ s32 func_8083B644(Player* this, PlayState* play) { if ((sp34 != NULL) || (sp2C != NULL)) { if ((sp30 == NULL) || (sp30 == sp34) || (sp30 == sp2C)) { - if (!(this->stateFlags1 & PLAYER_STATE1_11) || + if (!(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) || ((this->heldActor != NULL) && (sp28 || (sp34 == this->heldActor) || (sp2C == this->heldActor) || - ((sp34 != NULL) && (sp34->flags & ACTOR_FLAG_16))))) { - if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & PLAYER_STATE1_23) || - (func_808332B8(this) && !(this->stateFlags2 & PLAYER_STATE2_10))) { + ((sp34 != NULL) && (sp34->flags & ACTOR_FLAG_WILL_TALK))))) { + if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & PLAYER_STATE1_ON_HORSE) || + (func_808332B8(this) && !(this->stateFlags2 & PLAYER_STATE2_UNDERWATER))) { if (sp34 != NULL) { - this->stateFlags2 |= PLAYER_STATE2_1; - if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (sp34->flags & ACTOR_FLAG_16)) { + this->stateFlags2 |= PLAYER_STATE2_SPEAK_OR_CHECK; + if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (sp34->flags & ACTOR_FLAG_WILL_TALK)) { sp2C = NULL; } else if (sp2C == NULL) { return 0; @@ -5224,7 +5224,7 @@ s32 func_8083B644(Player* this, PlayState* play) { if (sp2C != NULL) { if (!sp28) { - this->stateFlags2 |= PLAYER_STATE2_21; + this->stateFlags2 |= PLAYER_STATE2_NAVI_ALERT; } if (!CHECK_BTN_ALL(sControlInput->press.button, CVarGetInteger("gNaviOnL", 0) ? BTN_L : BTN_CUP) && @@ -5260,7 +5260,7 @@ s32 func_8083B644(Player* this, PlayState* play) { } s32 func_8083B8F4(Player* this, PlayState* play) { - if (!(this->stateFlags1 & (PLAYER_STATE1_11 | PLAYER_STATE1_23)) && + if (!(this->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_ON_HORSE)) && Camera_CheckValidMode(Play_GetCamera(play, 0), 6)) { if ((this->actor.bgCheckFlags & 1) || (func_808332B8(this) && (this->actor.yDistToWater < this->ageProperties->unk_2C))) { @@ -5279,8 +5279,8 @@ s32 func_8083B998(Player* this, PlayState* play) { } if ((this->unk_664 != NULL) && - (CHECK_FLAG_ALL(this->unk_664->flags, ACTOR_FLAG_0 | ACTOR_FLAG_18) || (this->unk_664->naviEnemyId != 0xFF))) { - this->stateFlags2 |= PLAYER_STATE2_21; + (CHECK_FLAG_ALL(this->unk_664->flags, ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_NAVI_HAS_INFO) || (this->unk_664->naviEnemyId != 0xFF))) { + this->stateFlags2 |= PLAYER_STATE2_NAVI_ALERT; } else if ((this->naviTextId == 0 || CVarGetInteger("gNaviOnL", 0)) && !func_8008E9C4(this) && CHECK_BTN_ALL(sControlInput->press.button, BTN_CUP) && (YREG(15) != 0x10) && (YREG(15) != 0x20) && !func_8083B8F4(this, play)) { @@ -5294,7 +5294,7 @@ void func_8083BA90(PlayState* play, Player* this, s32 arg2, f32 xzVelocity, f32 func_80837948(play, this, arg2); func_80835C58(play, this, func_80844AF4, 0); - this->stateFlags3 |= PLAYER_STATE3_1; + this->stateFlags3 |= PLAYER_STATE3_MIDAIR; this->currentYaw = this->actor.shape.rot.y; this->linearVelocity = xzVelocity; @@ -5308,7 +5308,7 @@ void func_8083BA90(PlayState* play, Player* this, s32 arg2, f32 xzVelocity, f32 } s32 func_8083BB20(Player* this) { - if (!(this->stateFlags1 & PLAYER_STATE1_22) && (Player_GetSwordHeld(this) != 0)) { + if (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) && (Player_GetSwordHeld(this) != 0)) { if (D_80853614 || ((this->actor.category != ACTORCAT_PLAYER) && CHECK_BTN_ALL(sControlInput->press.button, BTN_B))) { return 1; @@ -5354,7 +5354,7 @@ void func_8083BCD0(Player* this, PlayState* play, s32 arg2) { this->currentYaw = this->actor.shape.rot.y + (arg2 << 0xE); this->linearVelocity = !(arg2 & 1) ? 6.0f : 8.5f; - this->stateFlags2 |= PLAYER_STATE2_19; + this->stateFlags2 |= PLAYER_STATE2_HOPPING; func_8002F7DC(&this->actor, ((arg2 << 0xE) == 0x8000) ? NA_SE_PL_ROLL : NA_SE_PL_SKIP); } @@ -5442,9 +5442,9 @@ void func_8083C0E8(Player* this, PlayState* play) { } void func_8083C148(Player* this, PlayState* play) { - if (!(this->stateFlags3 & PLAYER_STATE3_7)) { + if (!(this->stateFlags3 & PLAYER_STATE3_HOOKSHOT_TRAVELLING)) { func_8083B010(this); - if (this->stateFlags1 & PLAYER_STATE1_27) { + if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { func_80838F18(play, this); } else { func_80839F90(this, play); @@ -5454,11 +5454,11 @@ void func_8083C148(Player* this, PlayState* play) { } } - this->stateFlags1 &= ~(PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_20); + this->stateFlags1 &= ~(PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_FIRST_PERSON); } s32 func_8083C1DC(Player* this, PlayState* play) { - if (!func_80833B54(this) && (D_808535E0 == 0) && !(this->stateFlags1 & PLAYER_STATE1_23) && + if (!func_80833B54(this) && (D_808535E0 == 0) && !(this->stateFlags1 & PLAYER_STATE1_ON_HORSE) && CHECK_BTN_ALL(sControlInput->press.button, BTN_A)) { if (func_8083BC7C(this, play)) { return 1; @@ -5466,7 +5466,7 @@ s32 func_8083C1DC(Player* this, PlayState* play) { if ((this->unk_837 == 0) && (this->heldItemAction >= PLAYER_IA_SWORD_MASTER)) { func_80835F44(play, this, ITEM_NONE); } else { - this->stateFlags2 ^= PLAYER_STATE2_20; + this->stateFlags2 ^= PLAYER_STATE2_NAVI_OUT; } } @@ -5485,7 +5485,7 @@ s32 func_8083C2B0(Player* this, PlayState* play) { func_808323B4(play, this); if (func_80835C58(play, this, func_80843188, 0)) { - this->stateFlags1 |= PLAYER_STATE1_22; + this->stateFlags1 |= PLAYER_STATE1_SHIELDING; if (!Player_IsChildWithHylianShield(this)) { Player_SetModelsForHoldingShield(this); @@ -5543,7 +5543,7 @@ void func_8083C50C(Player* this) { s32 func_8083C544(Player* this, PlayState* play) { if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) { - if (!(this->stateFlags1 & PLAYER_STATE1_22) && (Player_GetSwordHeld(this) != 0) && (this->unk_844 == 1) && + if (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) && (Player_GetSwordHeld(this) != 0) && (this->unk_844 == 1) && (this->heldItemAction != PLAYER_IA_STICK)) { if ((this->heldItemAction != PLAYER_IA_SWORD_BGS) || (gSaveContext.swordHealth > 0.0f)) { func_808377DC(play, this); @@ -5649,7 +5649,7 @@ s32 func_8083C910(PlayState* play, Player* this, f32 arg2) { if (this->ageProperties->unk_24 <= sp28) { func_80835C58(play, this, func_8084D7C4, 0); func_80832C6C(play, this, &gPlayerAnim_link_swimer_swim); - this->stateFlags1 |= PLAYER_STATE1_27 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_WATER | PLAYER_STATE1_IN_CUTSCENE; this->unk_850 = 20; this->linearVelocity = 2.0f; Player_SetBootData(play, this); @@ -5658,7 +5658,7 @@ s32 func_8083C910(PlayState* play, Player* this, f32 arg2) { } func_80838E70(play, this, arg2, this->actor.shape.rot.y); - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; return 1; } @@ -5793,8 +5793,8 @@ s32 func_8083CFA8(PlayState* play, Player* this, f32 arg2, s32 splashScale) { } void func_8083D0A8(PlayState* play, Player* this, f32 arg2) { - this->stateFlags1 |= PLAYER_STATE1_18; - this->stateFlags1 &= ~PLAYER_STATE1_27; + this->stateFlags1 |= PLAYER_STATE1_JUMPING; + this->stateFlags1 &= ~PLAYER_STATE1_IN_WATER; func_80832340(play, this); if (func_8083CFA8(play, this, arg2, 500)) { @@ -5805,7 +5805,7 @@ void func_8083D0A8(PlayState* play, Player* this, f32 arg2) { } s32 func_8083D12C(PlayState* play, Player* this, Input* arg2) { - if (!(this->stateFlags1 & PLAYER_STATE1_10) && !(this->stateFlags2 & PLAYER_STATE2_10)) { + if (!(this->stateFlags1 & PLAYER_STATE1_GETTING_ITEM) && !(this->stateFlags2 & PLAYER_STATE2_UNDERWATER)) { if ((arg2 == NULL) || (CHECK_BTN_ALL(arg2->press.button, BTN_A) && (ABS(this->unk_6C2) < 12000) && (this->currentBoots != PLAYER_BOOTS_IRON))) { @@ -5813,11 +5813,11 @@ s32 func_8083D12C(PlayState* play, Player* this, Input* arg2) { func_80832264(play, this, &gPlayerAnim_link_swimer_swim_deep_start); this->unk_6C2 = 0; - this->stateFlags2 |= PLAYER_STATE2_10; + this->stateFlags2 |= PLAYER_STATE2_UNDERWATER; this->actor.velocity.y = 0.0f; if (arg2 != NULL) { - this->stateFlags2 |= PLAYER_STATE2_11; + this->stateFlags2 |= PLAYER_STATE2_DIVING; func_8002F7DC(&this->actor, NA_SE_PL_DIVE_BUBBLE); } @@ -5825,17 +5825,17 @@ s32 func_8083D12C(PlayState* play, Player* this, Input* arg2) { } } - if ((this->stateFlags1 & PLAYER_STATE1_10) || (this->stateFlags2 & PLAYER_STATE2_10)) { + if ((this->stateFlags1 & PLAYER_STATE1_GETTING_ITEM) || (this->stateFlags2 & PLAYER_STATE2_UNDERWATER)) { if (this->actor.velocity.y > 0.0f) { if (this->actor.yDistToWater < this->ageProperties->unk_30) { - this->stateFlags2 &= ~PLAYER_STATE2_10; + this->stateFlags2 &= ~PLAYER_STATE2_UNDERWATER; if (arg2 != NULL) { func_80835C58(play, this, func_8084E1EC, 1); - if (this->stateFlags1 & PLAYER_STATE1_10) { - this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_11 | PLAYER_STATE1_29; + if (this->stateFlags1 & PLAYER_STATE1_GETTING_ITEM) { + this->stateFlags1 |= PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE; } this->unk_850 = 2; @@ -5843,7 +5843,7 @@ s32 func_8083D12C(PlayState* play, Player* this, Input* arg2) { func_80832340(play, this); func_80832B0C(play, this, - (this->stateFlags1 & PLAYER_STATE1_11) ? &gPlayerAnim_link_swimer_swim_get + (this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) ? &gPlayerAnim_link_swimer_swim_get : &gPlayerAnim_link_swimer_swim_deep_end); if (func_8083CFA8(play, this, this->actor.velocity.y, 500)) { @@ -5868,8 +5868,8 @@ void func_8083D36C(PlayState* play, Player* this) { if ((this->currentBoots != PLAYER_BOOTS_IRON) || !(this->actor.bgCheckFlags & 1)) { func_80832564(play, this); - if ((this->currentBoots != PLAYER_BOOTS_IRON) && (this->stateFlags2 & PLAYER_STATE2_10)) { - this->stateFlags2 &= ~PLAYER_STATE2_10; + if ((this->currentBoots != PLAYER_BOOTS_IRON) && (this->stateFlags2 & PLAYER_STATE2_UNDERWATER)) { + this->stateFlags2 &= ~PLAYER_STATE2_UNDERWATER; func_8083D12C(play, this, 0); this->unk_84F = 1; } else if (func_80844A44 == this->func_674) { @@ -5883,7 +5883,7 @@ void func_8083D36C(PlayState* play, Player* this) { } } - if (!(this->stateFlags1 & PLAYER_STATE1_27) || (this->actor.yDistToWater < this->ageProperties->unk_2C)) { + if (!(this->stateFlags1 & PLAYER_STATE1_IN_WATER) || (this->actor.yDistToWater < this->ageProperties->unk_2C)) { if (func_8083CFA8(play, this, this->actor.velocity.y, 500)) { func_8002F7DC(&this->actor, NA_SE_EV_DIVE_INTO_WATER); @@ -5893,9 +5893,9 @@ void func_8083D36C(PlayState* play, Player* this) { } } - this->stateFlags1 |= PLAYER_STATE1_27; - this->stateFlags2 |= PLAYER_STATE2_10; - this->stateFlags1 &= ~(PLAYER_STATE1_18 | PLAYER_STATE1_19); + this->stateFlags1 |= PLAYER_STATE1_IN_WATER; + this->stateFlags2 |= PLAYER_STATE2_UNDERWATER; + this->stateFlags1 &= ~(PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL); this->unk_854 = 0.0f; Player_SetBootData(play, this); @@ -5914,7 +5914,7 @@ void func_8083D53C(PlayState* play, Player* this) { if ((func_80845668 != this->func_674) && (func_8084BDFC != this->func_674)) { if (this->ageProperties->unk_2C < this->actor.yDistToWater) { - if (!(this->stateFlags1 & PLAYER_STATE1_27) || + if (!(this->stateFlags1 & PLAYER_STATE1_IN_WATER) || (!((this->currentBoots == PLAYER_BOOTS_IRON) && (this->actor.bgCheckFlags & 1)) && (func_8084E30C != this->func_674) && (func_8084E368 != this->func_674) && (func_8084D610 != this->func_674) && (func_8084D84C != this->func_674) && @@ -5923,7 +5923,7 @@ void func_8083D53C(PlayState* play, Player* this) { func_8083D36C(play, this); return; } - } else if ((this->stateFlags1 & PLAYER_STATE1_27) && (this->actor.yDistToWater < this->ageProperties->unk_24)) { + } else if ((this->stateFlags1 & PLAYER_STATE1_IN_WATER) && (this->actor.yDistToWater < this->ageProperties->unk_24)) { if ((this->skelAnime.moveFlags == 0) && (this->currentBoots != PLAYER_BOOTS_IRON)) { func_8083CD54(play, this, this->actor.shape.rot.y); } @@ -6170,7 +6170,7 @@ s32 func_8083E0FC(Player* this, PlayState* play) { func_80836898(play, this, func_8083A360); - this->stateFlags1 |= PLAYER_STATE1_23; + this->stateFlags1 |= PLAYER_STATE1_ON_HORSE; this->actor.bgCheckFlags &= ~0x20; if (this->mountSide < 0) { @@ -6308,7 +6308,7 @@ s32 func_8083E5A8(Player* this, PlayState* play) { if(gSaveContext.pendingIceTrapCount) { gSaveContext.pendingIceTrapCount--; - this->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_11); + this->stateFlags1 &= ~(PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD); this->actor.colChkInfo.damage = 0; func_80837C0C(play, this, 3, 0.0f, 0.0f, 0, 20); this->getItemId = GI_NONE; @@ -6373,13 +6373,13 @@ s32 func_8083E5A8(Player* this, PlayState* play) { func_808323B4(play, this); func_8083AE40(this, giEntry.objectId); - if (!(this->stateFlags2 & PLAYER_STATE2_10) || (this->currentBoots == PLAYER_BOOTS_IRON)) { + if (!(this->stateFlags2 & PLAYER_STATE2_UNDERWATER) || (this->currentBoots == PLAYER_BOOTS_IRON)) { func_80836898(play, this, func_8083A434); func_808322D0(play, this, &gPlayerAnim_link_demo_get_itemB); func_80835EA4(play, 9); } - this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_11 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE; func_80832224(this); return 1; } @@ -6389,8 +6389,8 @@ s32 func_8083E5A8(Player* this, PlayState* play) { this->getItemId = GI_NONE; this->getItemEntry = (GetItemEntry)GET_ITEM_NONE; } - } else if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) && !(this->stateFlags1 & PLAYER_STATE1_11) && - !(this->stateFlags2 & PLAYER_STATE2_10)) { + } else if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) && !(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && + !(this->stateFlags2 & PLAYER_STATE2_UNDERWATER)) { if (this->getItemId != GI_NONE) { GetItemEntry giEntry; if (this->getItemEntry.objectId == OBJECT_INVALID) { @@ -6412,7 +6412,7 @@ s32 func_8083E5A8(Player* this, PlayState* play) { } func_80836898(play, this, func_8083A434); - this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_11 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE; func_8083AE40(this, giEntry.objectId); this->actor.world.pos.x = chest->dyna.actor.world.pos.x - (Math_SinS(chest->dyna.actor.shape.rot.y) * 29.4343f); @@ -6462,7 +6462,7 @@ s32 func_8083E5A8(Player* this, PlayState* play) { } func_80832224(this); - this->stateFlags1 |= PLAYER_STATE1_11; + this->stateFlags1 |= PLAYER_STATE1_ITEM_OVER_HEAD; return 1; } } @@ -6477,7 +6477,7 @@ void func_8083EA94(Player* this, PlayState* play) { } s32 func_8083EAF0(Player* this, Actor* actor) { - if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_23) && + if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_ALWAYS_THROWN) && ((this->linearVelocity < 1.1f) || (actor->id == ACTOR_EN_BOM_CHU))) { return 0; } @@ -6490,7 +6490,7 @@ s32 func_8083EB44(Player* this, PlayState* play) { if (CVarGetInteger("gDpadEquips", 0) != 0) { buttonsToCheck |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT; } - if ((this->stateFlags1 & PLAYER_STATE1_11) && (this->heldActor != NULL) && + if ((this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && (this->heldActor != NULL) && CHECK_BTN_ANY(sControlInput->press.button, buttonsToCheck)) { if (!func_80835644(play, this, this->heldActor)) { if (!func_8083EAF0(this, this->heldActor)) { @@ -6508,7 +6508,7 @@ s32 func_8083EB44(Player* this, PlayState* play) { s32 func_8083EC18(Player* this, PlayState* play, u32 arg2) { if (this->wallHeight >= 79.0f) { - if (!(this->stateFlags1 & PLAYER_STATE1_27) || (this->currentBoots == PLAYER_BOOTS_IRON) || + if (!(this->stateFlags1 & PLAYER_STATE1_IN_WATER) || (this->currentBoots == PLAYER_BOOTS_IRON) || (this->actor.yDistToWater < this->ageProperties->unk_2C)) { s32 sp8C = (arg2 & 8) ? 2 : 0; @@ -6575,8 +6575,8 @@ s32 func_8083EC18(Player* this, PlayState* play, u32 arg2) { LinkAnimationHeader* sp30; func_80836898(play, this, func_8083A3B0); - this->stateFlags1 |= PLAYER_STATE1_21; - this->stateFlags1 &= ~PLAYER_STATE1_27; + this->stateFlags1 |= PLAYER_STATE1_CLIMBING_LADDER; + this->stateFlags1 &= ~PLAYER_STATE1_IN_WATER; if ((sp8C != 0) || (arg2 & 2)) { if ((this->unk_84F = sp8C) != 0) { @@ -6629,7 +6629,7 @@ s32 func_8083F0C8(Player* this, PlayState* play, u32 arg2) { f32 maxWallZ; s32 i; - if (!LINK_IS_ADULT && !(this->stateFlags1 & PLAYER_STATE1_27) && (arg2 & 0x30)) { + if (!LINK_IS_ADULT && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER) && (arg2 & 0x30)) { wallPoly = this->actor.wallPoly; CollisionPoly_GetVerticesByBgId(wallPoly, this->actor.wallBgId, &play->colCtx, wallVertices); @@ -6785,17 +6785,17 @@ void func_8083F72C(Player* this, LinkAnimationHeader* anim, PlayState* play) { s32 func_8083F7BC(Player* this, PlayState* play) { DynaPolyActor* wallPolyActor; - if (!(this->stateFlags1 & PLAYER_STATE1_11) && (this->actor.bgCheckFlags & 0x200) && (D_80853608 < 0x3000)) { + if (!(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && (this->actor.bgCheckFlags & 0x200) && (D_80853608 < 0x3000)) { if (((this->linearVelocity > 0.0f) && func_8083EC18(this, play, D_808535F0)) || func_8083F0C8(this, play, D_808535F0)) { return 1; } - if (!func_808332B8(this) && ((this->linearVelocity == 0.0f) || !(this->stateFlags2 & PLAYER_STATE2_2)) && + if (!func_808332B8(this) && ((this->linearVelocity == 0.0f) || !(this->stateFlags2 & PLAYER_STATE2_DO_ACTION_CLIMB)) && (D_808535F0 & 0x40) && (this->actor.bgCheckFlags & 1) && (this->wallHeight >= 39.0f)) { - this->stateFlags2 |= PLAYER_STATE2_0; + this->stateFlags2 |= PLAYER_STATE2_DO_ACTION_GRAB; if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_A)) { @@ -6808,7 +6808,7 @@ s32 func_8083F7BC(Player* this, PlayState* play) { } func_80836898(play, this, func_8083A0F4); - this->stateFlags1 |= PLAYER_STATE1_11; + this->stateFlags1 |= PLAYER_STATE1_ITEM_OVER_HEAD; this->interactRangeActor = &wallPolyActor->actor; this->getItemId = GI_NONE; this->getItemEntry = (GetItemEntry)GET_ITEM_NONE; @@ -6835,7 +6835,7 @@ s32 func_8083F7BC(Player* this, PlayState* play) { s32 func_8083F9D0(PlayState* play, Player* this) { if ((this->actor.bgCheckFlags & 0x200) && - ((this->stateFlags2 & PLAYER_STATE2_4) || CHECK_BTN_ALL(sControlInput->cur.button, BTN_A))) { + ((this->stateFlags2 & PLAYER_STATE2_MOVING_DYNAPOLY) || CHECK_BTN_ALL(sControlInput->cur.button, BTN_A))) { DynaPolyActor* wallPolyActor = NULL; if (this->actor.wallBgId != BGCHECK_SCENE) { @@ -6843,7 +6843,7 @@ s32 func_8083F9D0(PlayState* play, Player* this) { } if (&wallPolyActor->actor == this->unk_3C4) { - if (this->stateFlags2 & PLAYER_STATE2_4) { + if (this->stateFlags2 & PLAYER_STATE2_MOVING_DYNAPOLY) { return 1; } else { return 0; @@ -6853,24 +6853,24 @@ s32 func_8083F9D0(PlayState* play, Player* this) { func_80839FFC(this, play); func_80832264(play, this, &gPlayerAnim_link_normal_push_wait_end); - this->stateFlags2 &= ~PLAYER_STATE2_4; + this->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY; return 1; } void func_8083FAB8(Player* this, PlayState* play) { func_80835C58(play, this, func_8084B898, 0); - this->stateFlags2 |= PLAYER_STATE2_4; + this->stateFlags2 |= PLAYER_STATE2_MOVING_DYNAPOLY; func_80832264(play, this, &gPlayerAnim_link_normal_push_start); } void func_8083FB14(Player* this, PlayState* play) { func_80835C58(play, this, func_8084B9E4, 0); - this->stateFlags2 |= PLAYER_STATE2_4; + this->stateFlags2 |= PLAYER_STATE2_MOVING_DYNAPOLY; func_80832264(play, this, D_80853914[PLAYER_ANIMGROUP_35][this->modelAnimType]); } void func_8083FB7C(Player* this, PlayState* play) { - this->stateFlags1 &= ~(PLAYER_STATE1_21 | PLAYER_STATE1_27); + this->stateFlags1 &= ~(PLAYER_STATE1_CLIMBING_LADDER | PLAYER_STATE1_IN_WATER); func_80837B9C(this, play); this->linearVelocity = -0.4f; } @@ -7029,7 +7029,7 @@ void func_8084029C(Player* this, f32 arg1) { } else if (func_8084021C(this->unk_868, arg1, 29.0f, 10.0f) || func_8084021C(this->unk_868, arg1, 29.0f, 24.0f)) { func_808327F8(this, this->linearVelocity); if (this->linearVelocity > 4.0f) { - this->stateFlags2 |= PLAYER_STATE2_3; + this->stateFlags2 |= PLAYER_STATE2_FOOTSTEP; } } @@ -7050,11 +7050,11 @@ void func_80840450(Player* this, PlayState* play) { s16 temp3; s32 temp4; - if (this->stateFlags3 & PLAYER_STATE3_3) { + if (this->stateFlags3 & PLAYER_STATE3_FINISHED_ATTACKING) { if (Player_GetSwordHeld(this)) { - this->stateFlags2 |= PLAYER_STATE2_5 | PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; } else { - this->stateFlags3 &= ~PLAYER_STATE3_3; + this->stateFlags3 &= ~PLAYER_STATE3_FINISHED_ATTACKING; } } @@ -7063,7 +7063,7 @@ void func_80840450(Player* this, PlayState* play) { func_80832DBC(this); func_80832284(play, this, func_808334E4(this)); this->unk_850 = 0; - this->stateFlags3 &= ~PLAYER_STATE3_3; + this->stateFlags3 &= ~PLAYER_STATE3_FINISHED_ATTACKING; } func_80833C3C(this); } else { @@ -7118,7 +7118,7 @@ void func_80840450(Player* this, PlayState* play) { Math_AsymStepToF(&this->linearVelocity, sp44 * 0.3f, 2.0f, 1.5f); - if (!(this->stateFlags3 & PLAYER_STATE3_3)) { + if (!(this->stateFlags3 & PLAYER_STATE3_FINISHED_ATTACKING)) { Math_ScaledStepToS(&this->currentYaw, sp42, temp4 * 0.1f); } } @@ -7197,11 +7197,11 @@ void func_808409CC(PlayState* play, Player* this) { if ((this->unk_664 != NULL) || (!(heathIsCritical = HealthMeter_IsCritical()) && ((this->unk_6AC = (this->unk_6AC + 1) & 1) != 0))) { - this->stateFlags2 &= ~PLAYER_STATE2_28; + this->stateFlags2 &= ~PLAYER_STATE2_IDLING; anim = func_80833338(this); } else { - this->stateFlags2 |= PLAYER_STATE2_28; - if (this->stateFlags1 & PLAYER_STATE1_11) { + this->stateFlags2 |= PLAYER_STATE2_IDLING; + if (this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { anim = func_80833338(this); } else { sp38 = play->roomCtx.curRoom.behaviorType2; @@ -7739,7 +7739,7 @@ void func_80842180(Player* this, PlayState* play) { f32 sp2C; s16 sp2A; - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; func_80841EE4(this, play); if (!func_80837348(play, this, D_80854424, 1)) { @@ -7794,7 +7794,7 @@ void func_8084227C(Player* this, PlayState* play) { f32 sp2C; s16 sp2A; - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; func_80841EE4(this, play); if (!func_80837348(play, this, D_80854430, 1)) { @@ -7912,7 +7912,7 @@ void func_8084279C(Player* this, PlayState* play) { func_8083A098(this, D_80853914[PLAYER_ANIMGROUP_34][this->modelAnimType], play); } - this->actor.flags &= ~ACTOR_FLAG_8; + this->actor.flags &= ~ACTOR_FLAG_PLAYER_TALKED_TO; func_8005B1A4(Play_GetCamera(play, 0)); } } @@ -8159,9 +8159,9 @@ void func_80843188(Player* this, PlayState* play) { } if (!Player_IsChildWithHylianShield(this)) { - this->stateFlags1 |= PLAYER_STATE1_22; + this->stateFlags1 |= PLAYER_STATE1_SHIELDING; func_80836670(this, play); - this->stateFlags1 &= ~PLAYER_STATE1_22; + this->stateFlags1 &= ~PLAYER_STATE1_SHIELDING; } func_8083721C(this); @@ -8207,7 +8207,7 @@ void func_80843188(Player* this, PlayState* play) { if (func_8083C2B0(this, play)) { func_808428D8(this, play); } else { - this->stateFlags1 &= ~PLAYER_STATE1_22; + this->stateFlags1 &= ~PLAYER_STATE1_SHIELDING; func_80832318(this); if (Player_IsChildWithHylianShield(this)) { @@ -8231,7 +8231,7 @@ void func_80843188(Player* this, PlayState* play) { } } - this->stateFlags1 |= PLAYER_STATE1_22; + this->stateFlags1 |= PLAYER_STATE1_SHIELDING; Player_SetModelsForHoldingShield(this); this->unk_6AE |= 0xC1; @@ -8253,7 +8253,7 @@ void func_808435C4(Player* this, PlayState* play) { temp = func_808374A0(play, this, &this->skelAnime, 4.0f); if ((temp != 0) && ((temp > 0) || LinkAnimation_Update(play, &this->skelAnime))) { func_80835C58(play, this, func_80843188, 1); - this->stateFlags1 |= PLAYER_STATE1_22; + this->stateFlags1 |= PLAYER_STATE1_SHIELDING; Player_SetModelsForHoldingShield(this); anim = D_80853914[PLAYER_ANIMGROUP_20][this->modelAnimType]; frames = Animation_GetLastFrame(anim); @@ -8274,11 +8274,11 @@ void func_8084370C(Player* this, PlayState* play) { } void func_8084377C(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_5 | PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; func_808382BC(this); - if (!(this->stateFlags1 & PLAYER_STATE1_29) && (this->unk_850 == 0) && (this->unk_8A1 != 0)) { + if (!(this->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE) && (this->unk_850 == 0) && (this->unk_8A1 != 0)) { s16 temp = this->actor.shape.rot.y - this->unk_8A2; this->currentYaw = this->actor.shape.rot.y = this->unk_8A2; @@ -8300,13 +8300,13 @@ void func_8084377C(Player* this, PlayState* play) { if (this->unk_850 == 0) { func_80853080(this, play); } - } else if ((this->stateFlags1 & PLAYER_STATE1_29) || + } else if ((this->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE) || (!(this->cylinder.base.acFlags & AC_HIT) && (this->unk_8A1 == 0))) { - if (this->stateFlags1 & PLAYER_STATE1_29) { + if (this->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE) { this->unk_850++; } else { func_80835C58(play, this, func_80843954, 0); - this->stateFlags1 |= PLAYER_STATE1_26; + this->stateFlags1 |= PLAYER_STATE1_DAMAGED; } func_80832264(play, this, @@ -8322,17 +8322,17 @@ void func_8084377C(Player* this, PlayState* play) { } void func_80843954(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_5 | PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; func_808382BC(this); func_8083721C(this); if (LinkAnimation_Update(play, &this->skelAnime) && (this->linearVelocity == 0.0f)) { - if (this->stateFlags1 & PLAYER_STATE1_29) { + if (this->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE) { this->unk_850++; } else { func_80835C58(play, this, func_80843A38, 0); - this->stateFlags1 |= PLAYER_STATE1_26; + this->stateFlags1 |= PLAYER_STATE1_DAMAGED; } func_808322D0(play, this, @@ -8350,10 +8350,10 @@ static struct_80832924 D_808545DC[] = { void func_80843A38(Player* this, PlayState* play) { s32 sp24; - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; func_808382BC(this); - if (this->stateFlags1 & PLAYER_STATE1_29) { + if (this->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE) { LinkAnimation_Update(play, &this->skelAnime); } else { sp24 = func_808374A0(play, this, &this->skelAnime, 16.0f); @@ -8372,7 +8372,7 @@ void func_80843AE8(PlayState* play, Player* this) { if (this->unk_850 > 0) { this->unk_850--; if (this->unk_850 == 0) { - if (this->stateFlags1 & PLAYER_STATE1_27) { + if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_swimer_swim_wait, 1.0f, 0.0f, Animation_GetLastFrame(&gPlayerAnim_link_swimer_swim_wait), ANIMMODE_ONCE, -16.0f); @@ -8393,8 +8393,8 @@ void func_80843AE8(PlayState* play, Player* this) { this->unk_850 = -1; } } else if (gSaveContext.healthAccumulator == 0) { - this->stateFlags1 &= ~PLAYER_STATE1_7; - if (this->stateFlags1 & PLAYER_STATE1_27) { + this->stateFlags1 &= ~PLAYER_STATE1_DEAD; + if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { func_80838F18(play, this); } else { func_80853080(this, play); @@ -8472,7 +8472,7 @@ s32 func_80843E64(PlayState* play, Player* this) { Math_StepToF(&this->linearVelocity, 0.0f, 1.0f); - this->stateFlags1 &= ~(PLAYER_STATE1_18 | PLAYER_STATE1_19); + this->stateFlags1 &= ~(PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL); if (sp34 >= 400) { s32 impactIndex; @@ -8545,7 +8545,7 @@ void func_8084411C(Player* this, PlayState* play) { func_80837268(this, &sp4C, &sp4A, 0.0f, play); if (!(this->actor.bgCheckFlags & 1)) { - if (this->stateFlags1 & PLAYER_STATE1_11) { + if (this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { Actor* heldActor = this->heldActor; u16 buttonsToCheck = BTN_A | BTN_B | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN; @@ -8560,19 +8560,19 @@ void func_8084411C(Player* this, PlayState* play) { LinkAnimation_Update(play, &this->skelAnime); - if (!(this->stateFlags2 & PLAYER_STATE2_19)) { + if (!(this->stateFlags2 & PLAYER_STATE2_HOPPING)) { func_8083DFE0(this, &sp4C, &sp4A); } func_80836670(this, play); - if (((this->stateFlags2 & PLAYER_STATE2_19) && (this->unk_84F == 2)) || !func_8083BBA0(this, play)) { + if (((this->stateFlags2 & PLAYER_STATE2_HOPPING) && (this->unk_84F == 2)) || !func_8083BBA0(this, play)) { if (this->actor.velocity.y < 0.0f) { if (this->unk_850 >= 0) { if ((this->actor.bgCheckFlags & 8) || (this->unk_850 == 0) || (this->fallDistance > 0)) { - if ((D_80853600 > 800.0f) || (this->stateFlags1 & PLAYER_STATE1_2)) { + if ((D_80853600 > 800.0f) || (this->stateFlags1 & PLAYER_STATE1_HOOKSHOT_FALLING)) { func_80843E14(this, NA_SE_VO_LI_FALL_S); - this->stateFlags1 &= ~PLAYER_STATE1_2; + this->stateFlags1 &= ~PLAYER_STATE1_HOOKSHOT_FALLING; } LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_normal_landing, 1.0f, 0.0f, @@ -8586,15 +8586,15 @@ void func_8084411C(Player* this, PlayState* play) { } if (!GameInteractor_GetDisableLedgeGrabsActive() && (this->actor.bgCheckFlags & 0x200) && - !(this->stateFlags2 & PLAYER_STATE2_19) && - !(this->stateFlags1 & (PLAYER_STATE1_11 | PLAYER_STATE1_27)) && (this->linearVelocity > 0.0f)) { + !(this->stateFlags2 & PLAYER_STATE2_HOPPING) && + !(this->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_WATER)) && (this->linearVelocity > 0.0f)) { if ((this->wallHeight >= 150.0f) && (this->unk_84B[this->unk_846] == 0)) { func_8083EC18(this, play, D_808535F0); } else if ((this->unk_88C >= 2) && (this->wallHeight < 150.0f) && (((this->actor.world.pos.y - this->actor.floorHeight) + this->wallHeight) > (70.0f * this->ageProperties->unk_08))) { AnimationContext_DisableQueue(play); - if (this->stateFlags1 & PLAYER_STATE1_2) { + if (this->stateFlags1 & PLAYER_STATE1_HOOKSHOT_FALLING) { func_80832698(this, NA_SE_VO_LI_HOOKSHOT_HANG); } else { func_80832698(this, NA_SE_VO_LI_HANG); @@ -8603,7 +8603,7 @@ void func_8084411C(Player* this, PlayState* play) { func_8083A5C4(play, this, this->actor.wallPoly, this->wallDistance, D_80853914[PLAYER_ANIMGROUP_39][this->modelAnimType]); this->actor.shape.rot.y = this->currentYaw += 0x8000; - this->stateFlags1 |= PLAYER_STATE1_13; + this->stateFlags1 |= PLAYER_STATE1_HANGING_OFF_LEDGE; } } } @@ -8613,7 +8613,7 @@ void func_8084411C(Player* this, PlayState* play) { LinkAnimationHeader* anim = D_80853914[PLAYER_ANIMGROUP_14][this->modelAnimType]; s32 sp3C; - if (this->stateFlags2 & PLAYER_STATE2_19) { + if (this->stateFlags2 & PLAYER_STATE2_HOPPING) { if (func_8008E9C4(this)) { anim = D_80853D4C[this->unk_84F][2]; } else { @@ -8627,7 +8627,7 @@ void func_8084411C(Player* this, PlayState* play) { } else if (this->fallDistance <= 80) { anim = D_80853914[PLAYER_ANIMGROUP_15][this->modelAnimType]; } else if ((this->fallDistance < 800) && (this->unk_84B[this->unk_846] == 0) && - !(this->stateFlags1 & PLAYER_STATE1_11)) { + !(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD)) { func_8083BC04(this, play); return; } @@ -8664,7 +8664,7 @@ void func_80844708(Player* this, PlayState* play) { f32 sp38; s16 sp36; - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; cylinderOc = NULL; sp44 = LinkAnimation_Update(play, &this->skelAnime); @@ -8739,7 +8739,7 @@ void func_80844708(Player* this, PlayState* play) { } void func_80844A44(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; if (LinkAnimation_Update(play, &this->skelAnime)) { func_80832284(play, this, &gPlayerAnim_link_normal_run_jump_water_fall_wait); @@ -8757,7 +8757,7 @@ void func_80844AF4(Player* this, PlayState* play) { f32 sp2C; s16 sp2A; - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; this->actor.gravity = -1.2f; LinkAnimation_Update(play, &this->skelAnime); @@ -8784,7 +8784,7 @@ s32 func_80844BE4(Player* this, PlayState* play) { s32 temp; if (func_8083ADD4(play, this)) { - this->stateFlags2 |= PLAYER_STATE2_17; + this->stateFlags2 |= PLAYER_STATE2_SPIN_ATTACKING; } else { if (!CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) { if ((this->unk_858 >= 0.85f) || func_808375D8(this)) { @@ -8796,9 +8796,9 @@ s32 func_80844BE4(Player* this, PlayState* play) { func_80837948(play, this, temp); func_80837AFC(this, -8); - this->stateFlags2 |= PLAYER_STATE2_17; + this->stateFlags2 |= PLAYER_STATE2_SPIN_ATTACKING; if (this->unk_84B[this->unk_846] == 0) { - this->stateFlags2 |= PLAYER_STATE2_30; + this->stateFlags2 |= PLAYER_STATE2_SWORD_LUNGE; } } else { return 0; @@ -8839,12 +8839,12 @@ void func_80844E68(Player* this, PlayState* play) { s16 sp32; s32 temp; - this->stateFlags1 |= PLAYER_STATE1_12; + this->stateFlags1 |= PLAYER_STATE1_CHARGING_SPIN_ATTACK; if (LinkAnimation_Update(play, &this->skelAnime)) { func_80832DBC(this); func_808355DC(this); - this->stateFlags1 &= ~PLAYER_STATE1_17; + this->stateFlags1 &= ~PLAYER_STATE1_TARGET_NOTHING; func_80832284(play, this, D_80854360[Player_HoldsTwoHandedWeapon(this)]); this->unk_850 = -1; } @@ -8891,7 +8891,7 @@ void func_80845000(Player* this, PlayState* play) { sp5C = fabsf(this->linearVelocity); sp58 = sp5C * 1.5f; - this->stateFlags1 |= PLAYER_STATE1_12; + this->stateFlags1 |= PLAYER_STATE1_CHARGING_SPIN_ATTACK; if (sp58 < 1.5f) { sp58 = 1.5f; @@ -8953,7 +8953,7 @@ void func_80845308(Player* this, PlayState* play) { sp5C = fabsf(this->linearVelocity); - this->stateFlags1 |= PLAYER_STATE1_12; + this->stateFlags1 |= PLAYER_STATE1_CHARGING_SPIN_ATTACK; if (sp5C == 0.0f) { sp5C = ABS(this->unk_87C) * 0.0015f; @@ -9016,7 +9016,7 @@ void func_80845668(Player* this, PlayState* play) { s32 temp2; f32 temp3; - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; sp3C = LinkAnimation_Update(play, &this->skelAnime); if (this->skelAnime.animation == &gPlayerAnim_link_normal_250jump_start) { @@ -9029,7 +9029,7 @@ void func_80845668(Player* this, PlayState* play) { temp1 = this->ageProperties->unk_0C; } - if (this->stateFlags1 & PLAYER_STATE1_27) { + if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { temp1 *= 0.085f; } else { temp1 *= 0.072f; @@ -9047,13 +9047,13 @@ void func_80845668(Player* this, PlayState* play) { temp2 = func_808374A0(play, this, &this->skelAnime, 4.0f); if (temp2 == 0) { - this->stateFlags1 &= ~(PLAYER_STATE1_14 | PLAYER_STATE1_18); + this->stateFlags1 &= ~(PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING); return; } if ((sp3C != 0) || (temp2 > 0)) { func_8083C0E8(this, play); - this->stateFlags1 &= ~(PLAYER_STATE1_14 | PLAYER_STATE1_18); + this->stateFlags1 &= ~(PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING); return; } @@ -9086,10 +9086,10 @@ void func_80845668(Player* this, PlayState* play) { } void func_808458D0(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_5 | PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; LinkAnimation_Update(play, &this->skelAnime); - if (((this->stateFlags1 & PLAYER_STATE1_11) && (this->heldActor != NULL) && (this->getItemId == GI_NONE)) || + if (((this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && (this->heldActor != NULL) && (this->getItemId == GI_NONE)) || !func_80836670(this, play)) { this->func_A74(play, this); } @@ -9125,7 +9125,7 @@ s32 func_80845964(PlayState* play, Player* this, CsCmdActorAction* arg2, f32 arg } } - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; func_80841EE4(this, play); func_8083DF68(this, arg3, arg4); @@ -9182,7 +9182,7 @@ void func_80845CA4(Player* this, PlayState* play) { if (func_80845BA0(play, this, &sp3C, -1) < 30) { this->unk_84F = 1; - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; this->unk_450.x = this->unk_45C.x; this->unk_450.z = this->unk_45C.z; @@ -9191,7 +9191,7 @@ void func_80845CA4(Player* this, PlayState* play) { sp34 = 5.0f; sp30 = 20; - if (this->stateFlags1 & PLAYER_STATE1_0) { + if (this->stateFlags1 & PLAYER_STATE1_LOADING) { sp34 = gSaveContext.entranceSpeed; if (D_808535F4 != 0) { @@ -9220,7 +9220,7 @@ void func_80845CA4(Player* this, PlayState* play) { } } - if (this->stateFlags1 & PLAYER_STATE1_11) { + if (this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { func_80836670(this, play); } } @@ -9228,7 +9228,7 @@ void func_80845CA4(Player* this, PlayState* play) { void func_80845EF8(Player* this, PlayState* play) { s32 sp2C; - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; sp2C = LinkAnimation_Update(play, &this->skelAnime); func_80836670(this, play); @@ -9250,7 +9250,7 @@ void func_80845EF8(Player* this, PlayState* play) { return; } - if (!(this->stateFlags1 & PLAYER_STATE1_29) && LinkAnimation_OnFrame(&this->skelAnime, 15.0f)) { + if (!(this->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE) && LinkAnimation_OnFrame(&this->skelAnime, 15.0f)) { play->func_11D54(this, play); } } @@ -9384,7 +9384,7 @@ void func_80846408(Player* this, PlayState* play) { this->unk_850--; if (this->unk_850 == 0) { func_8083A098(this, &gPlayerAnim_link_normal_nocarry_free_end, play); - this->stateFlags1 &= ~PLAYER_STATE1_11; + this->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD; func_80832698(this, NA_SE_VO_LI_DAMAGE_S); } } @@ -9502,7 +9502,7 @@ void func_80846660(PlayState* play, Player* this) { if ((play->sceneNum == SCENE_SPOT06) && (gSaveContext.sceneSetupIndex >= 4)) { this->unk_84F = 1; } - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_okarina_warp_goal, 2.0f / 3.0f, 0.0f, 24.0f, ANIMMODE_ONCE, 0.0f); this->actor.world.pos.y += 800.0f; @@ -9532,7 +9532,7 @@ static Vec3f D_808546F4 = { -1.0f, 69.0f, 20.0f }; void func_808467D4(PlayState* play, Player* this) { func_80835C58(play, this, func_8084E9AC, 0); - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; Math_Vec3f_Copy(&this->actor.world.pos, &D_808546F4); this->currentYaw = this->actor.shape.rot.y = -0x8000; LinkAnimation_Change(play, &this->skelAnime, this->ageProperties->unk_A0, 2.0f / 3.0f, 0.0f, 0.0f, @@ -9552,7 +9552,7 @@ void func_808468A8(PlayState* play, Player* this) { void func_808468E8(PlayState* play, Player* this) { func_808389E8(this, &gPlayerAnim_link_normal_jump, 12.0f, play); func_80835C58(play, this, func_8084F9C0, 0); - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; this->fallStartHeight = this->actor.world.pos.y; OnePointCutscene_Init(play, 5110, 40, &this->actor, MAIN_CAM); } @@ -9564,7 +9564,7 @@ void func_80846978(PlayState* play, Player* this) { void func_808469BC(PlayState* play, Player* this) { func_80835C58(play, this, func_8084F698, 0); this->actor.draw = NULL; - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; } static s16 D_80854700[] = { ACTOR_MAGIC_WIND, ACTOR_MAGIC_DARK, ACTOR_MAGIC_FIRE }; @@ -9577,7 +9577,7 @@ Actor* func_80846A00(PlayState* play, Player* this, s32 arg2) { void func_80846A68(PlayState* play, Player* this) { this->actor.draw = NULL; func_80835C58(play, this, func_8085076C, 0); - this->stateFlags1 |= PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE; } static InitChainEntry sInitChain[] = { @@ -9837,7 +9837,7 @@ void func_808473D4(PlayState* play, Player* this) { s32 doAction = DO_ACTION_NONE; if (!Player_InBlockingCsMode(play, this)) { - if (this->stateFlags1 & PLAYER_STATE1_20) { + if (this->stateFlags1 & PLAYER_STATE1_FIRST_PERSON) { doAction = DO_ACTION_RETURN; } else if ((this->heldItemAction == PLAYER_IA_FISHING_POLE) && (this->unk_860 != 0)) { if (this->unk_860 == 2) { @@ -9845,13 +9845,13 @@ void func_808473D4(PlayState* play, Player* this) { } } else if ((func_8084E3C4 != this->func_674) && !(this->stateFlags2 & PLAYER_STATE2_CRAWLING)) { if ((this->doorType != PLAYER_DOORTYPE_NONE) && - (!(this->stateFlags1 & PLAYER_STATE1_11) || + (!(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) || ((heldActor != NULL) && (heldActor->id == ACTOR_EN_RU1)))) { doAction = DO_ACTION_OPEN; - } else if ((!(this->stateFlags1 & PLAYER_STATE1_11) || (heldActor == NULL)) && + } else if ((!(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) || (heldActor == NULL)) && (interactRangeActor != NULL) && ((!sp1C && (this->getItemId == GI_NONE)) || - (this->getItemId < 0 && !(this->stateFlags1 & PLAYER_STATE1_27)))) { + (this->getItemId < 0 && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER)))) { if (this->getItemId < 0) { doAction = DO_ACTION_OPEN; } else if ((interactRangeActor->id == ACTOR_BG_TOKI_SWD) && LINK_IS_ADULT) { @@ -9859,34 +9859,34 @@ void func_808473D4(PlayState* play, Player* this) { } else { doAction = DO_ACTION_GRAB; } - } else if (!sp1C && (this->stateFlags2 & PLAYER_STATE2_0)) { + } else if (!sp1C && (this->stateFlags2 & PLAYER_STATE2_DO_ACTION_GRAB)) { doAction = DO_ACTION_GRAB; - } else if ((this->stateFlags2 & PLAYER_STATE2_2) || - (!(this->stateFlags1 & PLAYER_STATE1_23) && (this->rideActor != NULL))) { + } else if ((this->stateFlags2 & PLAYER_STATE2_DO_ACTION_CLIMB) || + (!(this->stateFlags1 & PLAYER_STATE1_ON_HORSE) && (this->rideActor != NULL))) { doAction = DO_ACTION_CLIMB; - } else if ((this->stateFlags1 & PLAYER_STATE1_23) && !EN_HORSE_CHECK_4((EnHorse*)this->rideActor) && + } else if ((this->stateFlags1 & PLAYER_STATE1_ON_HORSE) && !EN_HORSE_CHECK_4((EnHorse*)this->rideActor) && (func_8084D3E4 != this->func_674)) { - if ((this->stateFlags2 & PLAYER_STATE2_1) && (this->targetActor != NULL)) { + if ((this->stateFlags2 & PLAYER_STATE2_SPEAK_OR_CHECK) && (this->targetActor != NULL)) { if (this->targetActor->category == ACTORCAT_NPC) { doAction = DO_ACTION_SPEAK; } else { doAction = DO_ACTION_CHECK; } - } else if (!func_8002DD78(this) && !(this->stateFlags1 & PLAYER_STATE1_20)) { + } else if (!func_8002DD78(this) && !(this->stateFlags1 & PLAYER_STATE1_FIRST_PERSON)) { doAction = DO_ACTION_FASTER; } - } else if ((this->stateFlags2 & PLAYER_STATE2_1) && (this->targetActor != NULL)) { + } else if ((this->stateFlags2 & PLAYER_STATE2_SPEAK_OR_CHECK) && (this->targetActor != NULL)) { if (this->targetActor->category == ACTORCAT_NPC) { doAction = DO_ACTION_SPEAK; } else { doAction = DO_ACTION_CHECK; } - } else if ((this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_21)) || - ((this->stateFlags1 & PLAYER_STATE1_23) && (this->stateFlags2 & PLAYER_STATE2_22))) { + } else if ((this->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LADDER)) || + ((this->stateFlags1 & PLAYER_STATE1_ON_HORSE) && (this->stateFlags2 & PLAYER_STATE2_DO_ACTION_DOWN))) { doAction = DO_ACTION_DOWN; } else if (this->stateFlags2 & PLAYER_STATE2_DO_ACTION_ENTER) { doAction = DO_ACTION_ENTER; - } else if ((this->stateFlags1 & PLAYER_STATE1_11) && (this->getItemId == GI_NONE) && + } else if ((this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && (this->getItemId == GI_NONE) && (heldActor != NULL)) { if ((this->actor.bgCheckFlags & 1) || (heldActor->id == ACTOR_EN_NIW)) { if (func_8083EAF0(this, heldActor) == 0) { @@ -9895,28 +9895,28 @@ void func_808473D4(PlayState* play, Player* this) { doAction = DO_ACTION_THROW; } } - } else if (!(this->stateFlags1 & PLAYER_STATE1_27) && func_8083A0D4(this) && + } else if (!(this->stateFlags1 & PLAYER_STATE1_IN_WATER) && func_8083A0D4(this) && (this->getItemId < GI_MAX)) { doAction = DO_ACTION_GRAB; - } else if (this->stateFlags2 & PLAYER_STATE2_11) { + } else if (this->stateFlags2 & PLAYER_STATE2_DIVING) { sp24 = (D_80854784[CUR_UPG_VALUE(UPG_SCALE)] - this->actor.yDistToWater) / 40.0f; sp24 = CLAMP(sp24, 0, 7); doAction = sDiveDoActions[sp24]; - } else if (sp1C && !(this->stateFlags2 & PLAYER_STATE2_10)) { + } else if (sp1C && !(this->stateFlags2 & PLAYER_STATE2_UNDERWATER)) { doAction = DO_ACTION_DIVE; - } else if (!sp1C && (!(this->stateFlags1 & PLAYER_STATE1_22) || func_80833BCC(this) || + } else if (!sp1C && (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) || func_80833BCC(this) || !Player_IsChildWithHylianShield(this))) { - if ((!(this->stateFlags1 & PLAYER_STATE1_14) && (sp20 <= 0) && + if ((!(this->stateFlags1 & PLAYER_STATE1_CLIMBING_LEDGE) && (sp20 <= 0) && (func_8008E9C4(this) || ((D_808535E4 != 7) && (func_80833B2C(this) || ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) && - !(this->stateFlags1 & PLAYER_STATE1_22) && (sp20 == 0))))))) { + !(this->stateFlags1 & PLAYER_STATE1_SHIELDING) && (sp20 == 0))))))) { doAction = DO_ACTION_ATTACK; } else if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) && func_80833BCC(this) && (sp20 > 0)) { doAction = DO_ACTION_JUMP; } else if ((this->heldItemAction >= PLAYER_IA_SWORD_MASTER) || - ((this->stateFlags2 & PLAYER_STATE2_20) && + ((this->stateFlags2 & PLAYER_STATE2_NAVI_OUT) && (play->actorCtx.targetCtx.arrowPointedActor == NULL))) { doAction = DO_ACTION_PUTAWAY; } @@ -9937,7 +9937,7 @@ void func_808473D4(PlayState* play, Player* this) { Interface_SetDoAction(play, doAction); - if (this->stateFlags2 & PLAYER_STATE2_21) { + if (this->stateFlags2 & PLAYER_STATE2_NAVI_ALERT) { if (this->unk_664 != NULL) { Interface_SetNaviCall(play, 0x1E); } else { @@ -10005,13 +10005,13 @@ void func_80847BA0(PlayState* play, Player* this) { spA8 = this->ageProperties->unk_00; } - if (this->stateFlags1 & (PLAYER_STATE1_29 | PLAYER_STATE1_31)) { - if (this->stateFlags1 & PLAYER_STATE1_31) { + if (this->stateFlags1 & (PLAYER_STATE1_IN_CUTSCENE | PLAYER_STATE1_FLOOR_DISABLED)) { + if (this->stateFlags1 & PLAYER_STATE1_FLOOR_DISABLED) { this->actor.bgCheckFlags &= ~1; spA4 = 0x38; - } else if ((this->stateFlags1 & PLAYER_STATE1_0) && ((this->unk_A84 - (s32)this->actor.world.pos.y) >= 100)) { + } else if ((this->stateFlags1 & PLAYER_STATE1_LOADING) && ((this->unk_A84 - (s32)this->actor.world.pos.y) >= 100)) { spA4 = 0x39; - } else if (!(this->stateFlags1 & PLAYER_STATE1_0) && + } else if (!(this->stateFlags1 & PLAYER_STATE1_LOADING) && ((func_80845EF8 == this->func_674) || (func_80845CA4 == this->func_674))) { this->actor.bgCheckFlags &= ~0x208; spA4 = 0x3C; @@ -10022,12 +10022,12 @@ void func_80847BA0(PlayState* play, Player* this) { spA4 = 0x3F; } - if (this->stateFlags3 & PLAYER_STATE3_0) { + if (this->stateFlags3 & PLAYER_STATE3_IGNORE_CEILING_FLOOR_WATER) { spA4 &= ~6; } if (spA4 & 4) { - this->stateFlags3 |= PLAYER_STATE3_4; + this->stateFlags3 |= PLAYER_STATE3_CHECK_FLOOR_WATER_COLLISION; } Math_Vec3f_Copy(&spB4, &this->actor.world.pos); @@ -10053,7 +10053,7 @@ void func_80847BA0(PlayState* play, Player* this) { this->unk_89E = 5; } } else { - if (this->stateFlags2 & PLAYER_STATE2_9) { + if (this->stateFlags2 & PLAYER_STATE2_SPAWN_DUST) { this->unk_89E = 1; } else { this->unk_89E = SurfaceType_GetSfx(&play->colCtx, spC0, this->actor.floorBgId); @@ -10256,19 +10256,19 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { if (this->csMode != 0) { Camera_ChangeMode(Play_GetCamera(play, 0), CAM_MODE_NORMAL); - } else if (!(this->stateFlags1 & PLAYER_STATE1_20)) { - if ((this->actor.parent != NULL) && (this->stateFlags3 & PLAYER_STATE3_7)) { + } else if (!(this->stateFlags1 & PLAYER_STATE1_FIRST_PERSON)) { + if ((this->actor.parent != NULL) && (this->stateFlags3 & PLAYER_STATE3_HOOKSHOT_TRAVELLING)) { camMode = CAM_MODE_HOOKSHOT; Camera_SetParam(Play_GetCamera(play, 0), 8, this->actor.parent); } else if (func_8084377C == this->func_674) { camMode = CAM_MODE_STILL; - } else if (this->stateFlags2 & PLAYER_STATE2_8) { + } else if (this->stateFlags2 & PLAYER_STATE2_GRABBING_DYNAPOLY) { camMode = CAM_MODE_PUSHPULL; } else if ((unk_664 = this->unk_664) != NULL) { - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_8)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_PLAYER_TALKED_TO)) { camMode = CAM_MODE_TALK; - } else if (this->stateFlags1 & PLAYER_STATE1_16) { - if (this->stateFlags1 & PLAYER_STATE1_25) { + } else if (this->stateFlags1 & PLAYER_STATE1_TARGET_LOCKED) { + if (this->stateFlags1 & PLAYER_STATE1_THREW_BOOMERANG) { camMode = CAM_MODE_FOLLOWBOOMERANG; } else { camMode = CAM_MODE_FOLLOWTARGET; @@ -10277,39 +10277,39 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { camMode = CAM_MODE_BATTLE; } Camera_SetParam(Play_GetCamera(play, 0), 8, unk_664); - } else if (this->stateFlags1 & PLAYER_STATE1_12) { + } else if (this->stateFlags1 & PLAYER_STATE1_CHARGING_SPIN_ATTACK) { camMode = CAM_MODE_CHARGE; - } else if (this->stateFlags1 & PLAYER_STATE1_25) { + } else if (this->stateFlags1 & PLAYER_STATE1_THREW_BOOMERANG) { camMode = CAM_MODE_FOLLOWBOOMERANG; Camera_SetParam(Play_GetCamera(play, 0), 8, this->boomerangActor); - } else if (this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14)) { + } else if (this->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE)) { if (func_80833B2C(this)) { camMode = CAM_MODE_HANGZ; } else { camMode = CAM_MODE_HANG; } - } else if (this->stateFlags1 & (PLAYER_STATE1_17 | PLAYER_STATE1_30)) { + } else if (this->stateFlags1 & (PLAYER_STATE1_TARGET_NOTHING | PLAYER_STATE1_30)) { if (func_8002DD78(this) || func_808334B4(this)) { camMode = CAM_MODE_BOWARROWZ; - } else if (this->stateFlags1 & PLAYER_STATE1_21) { + } else if (this->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) { camMode = CAM_MODE_CLIMBZ; } else { camMode = CAM_MODE_TARGET; } - } else if (this->stateFlags1 & (PLAYER_STATE1_18 | PLAYER_STATE1_21)) { - if ((func_80845668 == this->func_674) || (this->stateFlags1 & PLAYER_STATE1_21)) { + } else if (this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_CLIMBING_LADDER)) { + if ((func_80845668 == this->func_674) || (this->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER)) { camMode = CAM_MODE_CLIMB; } else { camMode = CAM_MODE_JUMP; } - } else if (this->stateFlags1 & PLAYER_STATE1_19) { + } else if (this->stateFlags1 & PLAYER_STATE1_FREEFALL) { camMode = CAM_MODE_FREEFALL; } else if ((this->swordState != 0) && (this->meleeWeaponAnimation >= 0) && (this->meleeWeaponAnimation < 0x18)) { camMode = CAM_MODE_STILL; } else { camMode = CAM_MODE_NORMAL; if ((this->linearVelocity == 0.0f) && - (!(this->stateFlags1 & PLAYER_STATE1_23) || (this->rideActor->speedXZ == 0.0f))) { + (!(this->stateFlags1 & PLAYER_STATE1_ON_HORSE) || (this->rideActor->speedXZ == 0.0f))) { // not moving seqMode = SEQ_MODE_STILL; } @@ -10409,7 +10409,7 @@ void func_80848C74(PlayState* play, Player* this) { spawnedFlame = false; timerPtr = this->flameTimers; - if (this->stateFlags2 & PLAYER_STATE2_3) { + if (this->stateFlags2 & PLAYER_STATE2_FOOTSTEP) { sp58 = 100; } else { sp58 = 0; @@ -10636,7 +10636,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { this->stateFlags3 &= ~PLAYER_STATE3_RESTORE_NAYRUS_LOVE; } - if (this->stateFlags2 & PLAYER_STATE2_15) { + if (this->stateFlags2 & PLAYER_STATE2_PAUSE_MOST_UPDATING) { if (!(this->actor.bgCheckFlags & 1)) { func_80832210(this); Actor_MoveForward(&this->actor); @@ -10649,17 +10649,17 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { if (this->currentBoots != this->prevBoots) { if (this->currentBoots == PLAYER_BOOTS_IRON) { - if (this->stateFlags1 & PLAYER_STATE1_27) { + if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { func_80832340(play, this); if (this->ageProperties->unk_2C < this->actor.yDistToWater) { - this->stateFlags2 |= PLAYER_STATE2_10; + this->stateFlags2 |= PLAYER_STATE2_UNDERWATER; } } } else { - if (this->stateFlags1 & PLAYER_STATE1_27) { + if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { if ((this->prevBoots == PLAYER_BOOTS_IRON) || (this->actor.bgCheckFlags & 1)) { func_8083D36C(play, this); - this->stateFlags2 &= ~PLAYER_STATE2_10; + this->stateFlags2 &= ~PLAYER_STATE2_UNDERWATER; } } } @@ -10667,10 +10667,10 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { this->prevBoots = this->currentBoots; } - if ((this->actor.parent == NULL) && (this->stateFlags1 & PLAYER_STATE1_23)) { + if ((this->actor.parent == NULL) && (this->stateFlags1 & PLAYER_STATE1_ON_HORSE)) { this->actor.parent = this->rideActor; func_8083A360(play, this); - this->stateFlags1 |= PLAYER_STATE1_23; + this->stateFlags1 |= PLAYER_STATE1_ON_HORSE; func_80832264(play, this, &gPlayerAnim_link_uma_wait_1); func_80832F54(play, this, 0x9B); this->unk_850 = 99; @@ -10700,7 +10700,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { if (!(this->skelAnime.moveFlags & 0x80)) { if (((this->actor.bgCheckFlags & 1) && (D_808535E4 == 5) && (this->currentBoots != PLAYER_BOOTS_IRON)) || ((this->currentBoots == PLAYER_BOOTS_HOVER || GameInteractor_GetSlipperyFloorActive()) && - !(this->stateFlags1 & (PLAYER_STATE1_27 | PLAYER_STATE1_29)))) { + !(this->stateFlags1 & (PLAYER_STATE1_IN_WATER | PLAYER_STATE1_IN_CUTSCENE)))) { f32 sp70 = this->linearVelocity; s16 sp6E = this->currentYaw; s16 yawDiff = this->actor.world.rot.y - sp6E; @@ -10735,7 +10735,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { func_8002D868(&this->actor); if ((this->windSpeed != 0.0f) && !Player_InCsMode(play) && - !(this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21)) && + !(this->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_CLIMBING_LADDER)) && (func_80845668 != this->func_674) && (func_808507F4 != this->func_674)) { this->actor.velocity.x += this->windSpeed * Math_SinS(this->windDirection); this->actor.velocity.z += this->windSpeed * Math_CosS(this->windDirection); @@ -10747,7 +10747,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { D_808535E4 = 0; this->unk_A7A = 0; - if (!(this->stateFlags1 & PLAYER_STATE1_0) && (this->stateFlags1 & PLAYER_STATE1_23)) { + if (!(this->stateFlags1 & PLAYER_STATE1_LOADING) && (this->stateFlags1 & PLAYER_STATE1_ON_HORSE)) { EnHorse* rideActor = (EnHorse*)this->rideActor; CollisionPoly* sp5C; s32 sp58; @@ -10781,7 +10781,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { if (D_808535F8 == 0) { sp48 = D_80854820[D_808535F4]; - if (!(this->stateFlags1 & PLAYER_STATE1_27)) { + if (!(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) { sp48 *= 0.25f; } } else { @@ -10791,19 +10791,19 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { Math_StepToF(&this->windSpeed, sp48, sp48 * 0.1f); Math_ScaledStepToS(&this->windDirection, D_808535FC, - ((this->stateFlags1 & PLAYER_STATE1_27) ? 400.0f : 800.0f) * sp48); + ((this->stateFlags1 & PLAYER_STATE1_IN_WATER) ? 400.0f : 800.0f) * sp48); } else if (this->windSpeed != 0.0f) { - Math_StepToF(&this->windSpeed, 0.0f, (this->stateFlags1 & PLAYER_STATE1_27) ? 0.5f : 1.0f); + Math_StepToF(&this->windSpeed, 0.0f, (this->stateFlags1 & PLAYER_STATE1_IN_WATER) ? 0.5f : 1.0f); } if (!Player_InBlockingCsMode(play, this) && !(this->stateFlags2 & PLAYER_STATE2_CRAWLING)) { func_8083D53C(play, this); if ((this->actor.category == ACTORCAT_PLAYER) && (gSaveContext.health == 0)) { - if (this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21)) { + if (this->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_CLIMBING_LADDER)) { func_80832440(play, this); func_80837B9C(this, play); - } else if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & PLAYER_STATE1_27)) { + } else if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & PLAYER_STATE1_IN_WATER)) { func_80836448(play, this, func_808332B8(this) ? &gPlayerAnim_link_swimer_swim_down : (this->shockTimer != 0) ? &gPlayerAnim_link_normal_electric_shock_end @@ -10821,14 +10821,14 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { } if ((play->csCtx.state != CS_STATE_IDLE) && (this->csMode != 6) && - !(this->stateFlags1 & PLAYER_STATE1_23) && !(this->stateFlags2 & PLAYER_STATE2_7) && + !(this->stateFlags1 & PLAYER_STATE1_ON_HORSE) && !(this->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY) && (this->actor.category == ACTORCAT_PLAYER)) { CsCmdActorAction* linkActionCsCmd = play->csCtx.linkAction; if ((linkActionCsCmd != NULL) && (D_808547C4[linkActionCsCmd->action] != 0)) { func_8002DF54(play, NULL, 6); func_80832210(this); - } else if ((this->csMode == 0) && !(this->stateFlags2 & PLAYER_STATE2_10) && + } else if ((this->csMode == 0) && !(this->stateFlags2 & PLAYER_STATE2_UNDERWATER) && (play->csCtx.state != CS_STATE_UNSKIPPABLE_INIT)) { func_8002DF54(play, NULL, 0x31); func_80832210(this); @@ -10837,7 +10837,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { if (this->csMode != 0) { if ((this->csMode != 7) || - !(this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21 | PLAYER_STATE1_26))) { + !(this->stateFlags1 & (PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_CLIMBING_LADDER | PLAYER_STATE1_DAMAGED))) { this->unk_6AD = 3; } else if (func_80852E14 != this->func_674) { func_80852944(play, this, NULL); @@ -10849,19 +10849,19 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { func_8083D6EC(play, this); if ((this->unk_664 == NULL) && (this->naviTextId == 0)) { - this->stateFlags2 &= ~(PLAYER_STATE2_1 | PLAYER_STATE2_21); + this->stateFlags2 &= ~(PLAYER_STATE2_SPEAK_OR_CHECK | PLAYER_STATE2_NAVI_ALERT); } - this->stateFlags1 &= ~(PLAYER_STATE1_SWINGING_BOTTLE | PLAYER_STATE1_9 | PLAYER_STATE1_12 | PLAYER_STATE1_22); - this->stateFlags2 &= ~(PLAYER_STATE2_0 | PLAYER_STATE2_2 | PLAYER_STATE2_3 | PLAYER_STATE2_5 | PLAYER_STATE2_6 | - PLAYER_STATE2_8 | PLAYER_STATE2_9 | PLAYER_STATE2_12 | PLAYER_STATE2_14 | - PLAYER_STATE2_DO_ACTION_ENTER | PLAYER_STATE2_22 | PLAYER_STATE2_26); - this->stateFlags3 &= ~PLAYER_STATE3_4; + this->stateFlags1 &= ~(PLAYER_STATE1_SWINGING_BOTTLE | PLAYER_STATE1_READY_TO_FIRE | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_SHIELDING); + this->stateFlags2 &= ~(PLAYER_STATE2_DO_ACTION_GRAB | PLAYER_STATE2_DO_ACTION_CLIMB | PLAYER_STATE2_FOOTSTEP | PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS | + PLAYER_STATE2_GRABBING_DYNAPOLY | PLAYER_STATE2_SPAWN_DUST | PLAYER_STATE2_STATIONARY_LADDER | PLAYER_STATE2_FROZEN | + PLAYER_STATE2_DO_ACTION_ENTER | PLAYER_STATE2_DO_ACTION_DOWN | PLAYER_STATE2_REFLECTION); + this->stateFlags3 &= ~PLAYER_STATE3_CHECK_FLOOR_WATER_COLLISION; func_80847298(this); func_8083315C(play, this); - if (this->stateFlags1 & PLAYER_STATE1_27) { + if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { D_808535E8 = 0.5f; } else { D_808535E8 = 1.0f; @@ -10871,7 +10871,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { D_80853614 = D_80853618 = 0; D_80858AA4 = this->currentMask; - if (!(this->stateFlags3 & PLAYER_STATE3_2)) { + if (!(this->stateFlags3 & PLAYER_STATE3_PAUSE_ACTION_FUNC)) { this->func_674(this, play); } @@ -10884,7 +10884,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { func_808368EC(this, play); - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_8)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_PLAYER_TALKED_TO)) { this->targetActorDistance = 0.0f; } else { this->targetActor = NULL; @@ -10892,7 +10892,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { this->exchangeItemId = EXCH_ITEM_NONE; } - if (!(this->stateFlags1 & PLAYER_STATE1_11)) { + if (!(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD)) { this->interactRangeActor = NULL; this->getItemDirection = 0x6000; } @@ -10903,11 +10903,11 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { this->naviTextId = 0; - if (!(this->stateFlags2 & PLAYER_STATE2_25)) { + if (!(this->stateFlags2 & PLAYER_STATE2_PLAY_FOR_ACTOR)) { this->unk_6A8 = NULL; } - this->stateFlags2 &= ~PLAYER_STATE2_23; + this->stateFlags2 &= ~PLAYER_STATE2_NEAR_OCARINA_ACTOR; this->unk_6A4 = FLT_MAX; temp_f0 = this->actor.world.pos.y - this->actor.prevPos.y; @@ -10930,18 +10930,18 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { this->cylinder.dim.yShift = phi_f12 - this->actor.world.pos.y; - if (this->stateFlags1 & PLAYER_STATE1_22) { + if (this->stateFlags1 & PLAYER_STATE1_SHIELDING) { this->cylinder.dim.height = this->cylinder.dim.height * 0.8f; } Collider_UpdateCylinder(&this->actor, &this->cylinder); - if (!(this->stateFlags2 & PLAYER_STATE2_14)) { - if (!(this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_23))) { + if (!(this->stateFlags2 & PLAYER_STATE2_FROZEN)) { + if (!(this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_ON_HORSE))) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->cylinder.base); } - if (!(this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_26)) && (this->invincibilityTimer <= 0)) { + if (!(this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_DAMAGED)) && (this->invincibilityTimer <= 0)) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->cylinder.base); if (this->invincibilityTimer < 0) { @@ -10956,13 +10956,13 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.world.pos); Math_Vec3f_Copy(&this->unk_A88, &this->bodyPartsPos[PLAYER_BODYPART_WAIST]); - if (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29)) { + if (this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE)) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; } else { this->actor.colChkInfo.mass = 50; } - this->stateFlags3 &= ~PLAYER_STATE3_2; + this->stateFlags3 &= ~PLAYER_STATE3_PAUSE_ACTION_FUNC; Collider_ResetCylinderAC(play, &this->cylinder.base); @@ -11010,7 +11010,7 @@ void Player_Update(Actor* thisx, PlayState* play) { func_808323B4(play, this); } - if (this->stateFlags1 & (PLAYER_STATE1_5 | PLAYER_STATE1_29)) { + if (this->stateFlags1 & (PLAYER_STATE1_INPUT_DISABLED | PLAYER_STATE1_IN_CUTSCENE)) { memset(&sp44, 0, sizeof(sp44)); } else { sp44 = play->state.input[0]; @@ -11039,7 +11039,7 @@ void Player_Update(Actor* thisx, PlayState* play) { // Make Link normal size when going through doors and crawlspaces and when climbing ladders. // Otherwise Link can glitch out, being in unloaded rooms or falling OoB. - if (this->stateFlags1 & PLAYER_STATE1_21 || this->stateFlags1 & PLAYER_STATE1_29 || + if (this->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER || this->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE || this->stateFlags2 & PLAYER_STATE2_CRAWLING) { this->actor.scale.x = 0.01f; this->actor.scale.y = 0.01f; @@ -11080,7 +11080,7 @@ void Player_Update(Actor* thisx, PlayState* play) { // Don't apply gravity when Link is in water, otherwise // it makes him sink instead of float. - if (!(this->stateFlags1 & PLAYER_STATE1_27)) { + if (!(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) { switch (GameInteractor_GravityLevel()) { case GI_GRAVITY_LEVEL_HEAVY: this->actor.gravity = -4.0f; @@ -11157,7 +11157,7 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList, if ((this->currentBoots == PLAYER_BOOTS_HOVER || (CVarGetInteger("gIvanCoopModeEnabled", 0) && this->ivanFloating)) && !(this->actor.bgCheckFlags & 1) && - !(this->stateFlags1 & PLAYER_STATE1_23) && (this->hoverBootsTimer != 0)) { + !(this->stateFlags1 & PLAYER_STATE1_ON_HORSE) && (this->hoverBootsTimer != 0)) { s32 sp5C; s32 hoverBootsTimer = this->hoverBootsTimer; @@ -11229,7 +11229,7 @@ void Player_Draw(Actor* thisx, PlayState* play2) { OPEN_DISPS(play->state.gfxCtx); - if (!(this->stateFlags2 & PLAYER_STATE2_29)) { + if (!(this->stateFlags2 & PLAYER_STATE2_DISABLE_DRAW)) { OverrideLimbDrawOpa overrideLimbDraw = func_80090014; s32 lod; s32 pad; @@ -11269,7 +11269,7 @@ void Player_Draw(Actor* thisx, PlayState* play2) { } } - if (this->stateFlags2 & PLAYER_STATE2_26) { + if (this->stateFlags2 & PLAYER_STATE2_REFLECTION) { f32 sp78 = ((u16)(play->gameplayFrames * 600) * M_PI) / 0x8000; f32 sp74 = ((u16)(play->gameplayFrames * 1000) * M_PI) / 0x8000; @@ -11300,7 +11300,7 @@ void Player_Draw(Actor* thisx, PlayState* play2) { POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); } - if (this->stateFlags2 & PLAYER_STATE2_14) { + if (this->stateFlags2 & PLAYER_STATE2_FROZEN) { f32 scale = (this->unk_84F >> 1) * 22.0f; gSPSegment(POLY_XLU_DISP++, 0x08, @@ -11354,7 +11354,7 @@ s16 func_8084ABD8(PlayState* play, Player* this, s32 arg2, s16 arg3) { temp2 = CLAMP(temp2, -3000, 3000); this->actor.focus.rot.y += temp2; } else { - temp1 = (this->stateFlags1 & PLAYER_STATE1_23) ? 3500 : 14000; + temp1 = (this->stateFlags1 & PLAYER_STATE1_ON_HORSE) ? 3500 : 14000; temp3 = ((sControlInput->rel.stick_y >= 0) ? 1 : -1) * (s32)((1.0f - Math_CosS(sControlInput->rel.stick_y * 200)) * 1500.0f * (CVarGetInteger("gInvertAimingYAxis", 1) ? 1 : -1)) * (CVarGetFloat("gFirstPersonCameraSensitivityY", 1.0f)); @@ -11438,7 +11438,7 @@ void func_8084B000(Player* this) { } phi_f18 = -0.1f - phi_f16; } else { - if (!(this->stateFlags1 & PLAYER_STATE1_7) && (this->currentBoots == PLAYER_BOOTS_IRON) && + if (!(this->stateFlags1 & PLAYER_STATE1_DEAD) && (this->currentBoots == PLAYER_BOOTS_IRON) && (this->actor.velocity.y >= -3.0f)) { phi_f18 = -0.2f; } else { @@ -11453,7 +11453,7 @@ void func_8084B000(Player* this) { yDistToWater = this->actor.yDistToWater; if (yDistToWater > 100.0f) { - this->stateFlags2 |= PLAYER_STATE2_10; + this->stateFlags2 |= PLAYER_STATE2_UNDERWATER; } } @@ -11486,7 +11486,7 @@ void func_8084B158(PlayState* play, Player* this, Input* input, f32 arg3) { } void func_8084B1D8(Player* this, PlayState* play) { - if (this->stateFlags1 & PLAYER_STATE1_27) { + if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { func_8084B000(this); func_8084AEEC(this, &this->linearVelocity, 0, this->actor.shape.rot.y); } else { @@ -11533,7 +11533,7 @@ s32 func_8084B3CC(PlayState* play, Player* this) { func_80835F44(play, this, projectileItemToUse); } - this->stateFlags1 |= PLAYER_STATE1_20; + this->stateFlags1 |= PLAYER_STATE1_FIRST_PERSON; func_80832264(play, this, func_80833338(this)); func_80832210(this); func_8083B010(this); @@ -11549,8 +11549,8 @@ void func_8084B498(Player* this) { } s32 func_8084B4D4(PlayState* play, Player* this) { - if (this->stateFlags3 & PLAYER_STATE3_5) { - this->stateFlags3 &= ~PLAYER_STATE3_5; + if (this->stateFlags3 & PLAYER_STATE3_FORCE_PULL_OCARINA) { + this->stateFlags3 &= ~PLAYER_STATE3_FORCE_PULL_OCARINA; func_8084B498(this); this->unk_6AD = 4; func_8083B040(this, play); @@ -11561,21 +11561,21 @@ s32 func_8084B4D4(PlayState* play, Player* this) { } void func_8084B530(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; func_80836670(this, play); if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~ACTOR_FLAG_8; + this->actor.flags &= ~ACTOR_FLAG_PLAYER_TALKED_TO; - if (!CHECK_FLAG_ALL(this->targetActor->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2)) { - this->stateFlags2 &= ~PLAYER_STATE2_13; + if (!CHECK_FLAG_ALL(this->targetActor->flags, ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)) { + this->stateFlags2 &= ~PLAYER_STATE2_SWITCH_TARGETING; } func_8005B1A4(Play_GetCamera(play, 0)); if (!func_8084B4D4(play, this) && !func_8084B3CC(play, this) && !func_8083ADD4(play, this)) { if ((this->targetActor != this->interactRangeActor) || !func_8083E5A8(this, play)) { - if (this->stateFlags1 & PLAYER_STATE1_23) { + if (this->stateFlags1 & PLAYER_STATE1_ON_HORSE) { s32 sp24 = this->unk_850; func_8083A360(play, this); this->unk_850 = sp24; @@ -11591,7 +11591,7 @@ void func_8084B530(Player* this, PlayState* play) { return; } - if (this->stateFlags1 & PLAYER_STATE1_23) { + if (this->stateFlags1 & PLAYER_STATE1_ON_HORSE) { func_8084CC98(this, play); } else if (func_808332B8(this)) { func_8084D610(this, play); @@ -11619,7 +11619,7 @@ void func_8084B78C(Player* this, PlayState* play) { s16 sp32; s32 temp; - this->stateFlags2 |= PLAYER_STATE2_0 | PLAYER_STATE2_6 | PLAYER_STATE2_8; + this->stateFlags2 |= PLAYER_STATE2_DO_ACTION_GRAB | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS | PLAYER_STATE2_GRABBING_DYNAPOLY; func_8083F524(play, this); if (LinkAnimation_Update(play, &this->skelAnime)) { @@ -11655,7 +11655,7 @@ void func_8084B898(Player* this, PlayState* play) { s16 sp32; s32 temp; - this->stateFlags2 |= PLAYER_STATE2_0 | PLAYER_STATE2_6 | PLAYER_STATE2_8; + this->stateFlags2 |= PLAYER_STATE2_DO_ACTION_GRAB | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS | PLAYER_STATE2_GRABBING_DYNAPOLY; if (func_80832CB0(play, this, &gPlayerAnim_link_normal_pushing)) { this->unk_850 = 1; @@ -11676,11 +11676,11 @@ void func_8084B898(Player* this, PlayState* play) { } else if (temp == 0) { func_8083F72C(this, &gPlayerAnim_link_normal_push_end, play); } else { - this->stateFlags2 |= PLAYER_STATE2_4; + this->stateFlags2 |= PLAYER_STATE2_MOVING_DYNAPOLY; } } - if (this->stateFlags2 & PLAYER_STATE2_4) { + if (this->stateFlags2 & PLAYER_STATE2_MOVING_DYNAPOLY) { func_8084B840(play, this, 2.0f); this->linearVelocity = 2.0f; } @@ -11706,7 +11706,7 @@ void func_8084B9E4(Player* this, PlayState* play) { Vec3f sp38; anim = D_80853914[PLAYER_ANIMGROUP_36][this->modelAnimType]; - this->stateFlags2 |= PLAYER_STATE2_0 | PLAYER_STATE2_6 | PLAYER_STATE2_8; + this->stateFlags2 |= PLAYER_STATE2_DO_ACTION_GRAB | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS | PLAYER_STATE2_GRABBING_DYNAPOLY; if (func_80832CB0(play, this, anim)) { this->unk_850 = 1; @@ -11730,11 +11730,11 @@ void func_8084B9E4(Player* this, PlayState* play) { } else if (temp1 == 0) { func_8083F72C(this, D_80853914[PLAYER_ANIMGROUP_37][this->modelAnimType], play); } else { - this->stateFlags2 |= PLAYER_STATE2_4; + this->stateFlags2 |= PLAYER_STATE2_MOVING_DYNAPOLY; } } - if (this->stateFlags2 & PLAYER_STATE2_4) { + if (this->stateFlags2 & PLAYER_STATE2_MOVING_DYNAPOLY) { temp2 = func_8083973C(play, this, &D_80854880, &sp5C) - this->actor.world.pos.y; if (fabsf(temp2) < 20.0f) { sp44.x = this->actor.world.pos.x; @@ -11746,7 +11746,7 @@ void func_8084B9E4(Player* this, PlayState* play) { return; } } - this->stateFlags2 &= ~PLAYER_STATE2_4; + this->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY; } } @@ -11756,7 +11756,7 @@ void func_8084BBE4(Player* this, PlayState* play) { LinkAnimationHeader* anim; f32 temp; - this->stateFlags2 |= PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; if (LinkAnimation_Update(play, &this->skelAnime)) { // clang-format off @@ -11801,13 +11801,13 @@ void func_8084BBE4(Player* this, PlayState* play) { this->linearVelocity = 0.8f; } func_80837B9C(this, play); - this->stateFlags1 &= ~(PLAYER_STATE1_13 | PLAYER_STATE1_14); + this->stateFlags1 &= ~(PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE); } } } void func_8084BDFC(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; if (LinkAnimation_Update(play, &this->skelAnime)) { func_80832E48(this, 1); @@ -11818,7 +11818,7 @@ void func_8084BDFC(Player* this, PlayState* play) { if (LinkAnimation_OnFrame(&this->skelAnime, this->skelAnime.endFrame - 6.0f)) { func_808328A0(this); } else if (LinkAnimation_OnFrame(&this->skelAnime, this->skelAnime.endFrame - 34.0f)) { - this->stateFlags1 &= ~(PLAYER_STATE1_13 | PLAYER_STATE1_14); + this->stateFlags1 &= ~(PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE); func_8002F7DC(&this->actor, NA_SE_PL_CLIMB_CLIFF); func_80832698(this, NA_SE_VO_LI_CLIMB_END); } @@ -11845,7 +11845,7 @@ void func_8084BF1C(Player* this, PlayState* play) { sp80 = sControlInput->rel.stick_x; this->fallStartHeight = this->actor.world.pos.y; - this->stateFlags2 |= PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; if ((this->unk_84F != 0) && (ABS(sp84) < ABS(sp80))) { phi_f0 = ABS(sp80) * 0.0325f; @@ -11899,13 +11899,13 @@ void func_8084BF1C(Player* this, PlayState* play) { if (this->actor.world.pos.y < temp_f0) { if (this->unk_84F != 0) { this->actor.world.pos.y = temp_f0; - this->stateFlags1 &= ~PLAYER_STATE1_21; + this->stateFlags1 &= ~PLAYER_STATE1_CLIMBING_LADDER; func_8083A5C4(play, this, this->actor.wallPoly, this->ageProperties->unk_3C, &gPlayerAnim_link_normal_jump_climb_up_free); this->currentYaw += 0x8000; this->actor.shape.rot.y = this->currentYaw; func_8083A9B8(this, &gPlayerAnim_link_normal_jump_climb_up_free, play); - this->stateFlags1 |= PLAYER_STATE1_14; + this->stateFlags1 |= PLAYER_STATE1_CLIMBING_LEDGE; } else { func_8083F070(this, this->ageProperties->unk_CC[this->unk_850], play); } @@ -11946,7 +11946,7 @@ void func_8084BF1C(Player* this, PlayState* play) { 0.0f, ANIMMODE_ONCE, 0.0f); } } else { - this->stateFlags2 |= PLAYER_STATE2_12; + this->stateFlags2 |= PLAYER_STATE2_STATIONARY_LADDER; } } @@ -11986,18 +11986,18 @@ void func_8084C5F8(Player* this, PlayState* play) { s32 sp30; Vec3f sp24; - this->stateFlags2 |= PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; temp = func_808374A0(play, this, &this->skelAnime, 4.0f); if (temp == 0) { - this->stateFlags1 &= ~PLAYER_STATE1_21; + this->stateFlags1 &= ~PLAYER_STATE1_CLIMBING_LADDER; return; } if ((temp > 0) || LinkAnimation_Update(play, &this->skelAnime)) { func_8083C0E8(this, play); - this->stateFlags1 &= ~PLAYER_STATE1_21; + this->stateFlags1 &= ~PLAYER_STATE1_CLIMBING_LADDER; return; } @@ -12025,10 +12025,10 @@ static struct_80832924 D_808548B4[] = { }; void func_8084C760(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; if (LinkAnimation_Update(play, &this->skelAnime)) { - if (!(this->stateFlags1 & PLAYER_STATE1_0)) { + if (!(this->stateFlags1 & PLAYER_STATE1_LOADING)) { if (this->skelAnime.moveFlags != 0) { this->skelAnime.moveFlags = 0; return; @@ -12050,7 +12050,7 @@ static struct_80832924 D_808548D8[] = { }; void func_8084C81C(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; if (LinkAnimation_Update(play, &this->skelAnime)) { func_8083C0E8(this, play); @@ -12115,7 +12115,7 @@ s32 func_8084C9BC(Player* this, PlayState* play) { if ((play->csCtx.state == CS_STATE_IDLE) && (play->transitionMode == 0) && (EN_HORSE_CHECK_1(rideActor) || EN_HORSE_CHECK_4(rideActor))) { - this->stateFlags2 |= PLAYER_STATE2_22; + this->stateFlags2 |= PLAYER_STATE2_DO_ACTION_DOWN; if (EN_HORSE_CHECK_1(rideActor) || (EN_HORSE_CHECK_4(rideActor) && CHECK_BTN_ALL(sControlInput->press.button, BTN_A))) { @@ -12200,7 +12200,7 @@ void func_8084CC98(Player* this, PlayState* play) { EnHorse* rideActor = (EnHorse*)this->rideActor; u8* arr; - this->stateFlags2 |= PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; func_8084CBF4(this, 1.0f, 10.0f); @@ -12333,11 +12333,11 @@ void func_8084CC98(Player* this, PlayState* play) { } } - if (this->stateFlags1 & PLAYER_STATE1_20) { + if (this->stateFlags1 & PLAYER_STATE1_FIRST_PERSON) { if (!func_8083AD4C(play, this) || CHECK_BTN_ANY(sControlInput->press.button, BTN_A) || func_80833BCC(this)) { this->unk_6AD = 0; - this->stateFlags1 &= ~PLAYER_STATE1_20; + this->stateFlags1 &= ~PLAYER_STATE1_FIRST_PERSON; } else { this->unk_6BE = func_8084ABD8(play, this, 1, -5000) - this->actor.shape.rot.y; this->unk_6BE += 5000; @@ -12375,14 +12375,14 @@ static struct_80832924 D_808549C4[] = { }; void func_8084D3E4(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; func_8084CBF4(this, 1.0f, 10.0f); if (LinkAnimation_Update(play, &this->skelAnime)) { EnHorse* rideActor = (EnHorse*)this->rideActor; func_8083C0E8(this, play); - this->stateFlags1 &= ~PLAYER_STATE1_23; + this->stateFlags1 &= ~PLAYER_STATE1_ON_HORSE; this->actor.parent = NULL; AREG(6) = 0; @@ -12469,7 +12469,7 @@ void func_8084D610(Player* this, PlayState* play) { void func_8084D7C4(Player* this, PlayState* play) { if (!func_8083B040(this, play)) { - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; func_8084B158(play, this, NULL, this->linearVelocity); func_8084B000(this); @@ -12485,7 +12485,7 @@ void func_8084D84C(Player* this, PlayState* play) { s16 sp32; s16 temp; - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; func_8084B158(play, this, sControlInput, this->linearVelocity); func_8084B000(this); @@ -12576,7 +12576,7 @@ void func_8084DBC4(PlayState* play, Player* this, f32 arg2) { void func_8084DC48(Player* this, PlayState* play) { f32 sp2C; - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; this->actor.gravity = 0.0f; func_80836670(this, play); @@ -12621,7 +12621,7 @@ void func_8084DC48(Player* this, PlayState* play) { } else if (!func_8083D12C(play, this, sControlInput)) { sp2C = (this->unk_850 * 0.018f) + 4.0f; - if (this->stateFlags1 & PLAYER_STATE1_11) { + if (this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { sControlInput = NULL; } @@ -12639,7 +12639,7 @@ void func_8084DC48(Player* this, PlayState* play) { void func_8084DF6C(PlayState* play, Player* this) { this->unk_862 = 0; - this->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_11); + this->stateFlags1 &= ~(PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD); this->getItemId = GI_NONE; this->getItemEntry = (GetItemEntry)GET_ITEM_NONE; func_8005B1A4(Play_GetCamera(play, 0)); @@ -12756,7 +12756,7 @@ s32 func_8084DFF4(PlayState* play, Player* this) { play->sceneLoadFlag = 0x14; gSaveContext.nextCutsceneIndex = 0xFFF1; play->fadeTransition = 0xF; - this->stateFlags1 &= ~PLAYER_STATE1_29; + this->stateFlags1 &= ~PLAYER_STATE1_IN_CUTSCENE; func_80852FFC(play, NULL, 8); } @@ -12783,16 +12783,16 @@ s32 func_8084DFF4(PlayState* play, Player* this) { } void func_8084E1EC(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; if (LinkAnimation_Update(play, &this->skelAnime)) { - if (!(this->stateFlags1 & PLAYER_STATE1_10) || func_8084DFF4(play, this)) { + if (!(this->stateFlags1 & PLAYER_STATE1_GETTING_ITEM) || func_8084DFF4(play, this)) { func_8084DF6C(play, this); func_80838F18(play, this); func_80832340(play, this); } } else { - if ((this->stateFlags1 & PLAYER_STATE1_10) && LinkAnimation_OnFrame(&this->skelAnime, 10.0f)) { + if ((this->stateFlags1 & PLAYER_STATE1_GETTING_ITEM) && LinkAnimation_OnFrame(&this->skelAnime, 10.0f)) { func_808332F4(this, play); func_80832340(play, this); func_80835EA4(play, 8); @@ -12831,8 +12831,8 @@ void func_8084E3C4(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime)) { func_808322A4(play, this, &gPlayerAnim_link_normal_okarina_swing); this->unk_850 = 1; - if (this->stateFlags2 & (PLAYER_STATE2_23 | PLAYER_STATE2_25)) { - this->stateFlags2 |= PLAYER_STATE2_24; + if (this->stateFlags2 & (PLAYER_STATE2_NEAR_OCARINA_ACTOR | PLAYER_STATE2_PLAY_FOR_ACTOR)) { + this->stateFlags2 |= PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR; } else { func_8010BD58(play, OCARINA_ACTION_FREE_PLAY); } @@ -12856,7 +12856,7 @@ void func_8084E3C4(Player* this, PlayState* play) { func_8083A098(this, &gPlayerAnim_link_normal_okarina_end, play); } - this->stateFlags2 &= ~(PLAYER_STATE2_23 | PLAYER_STATE2_24 | PLAYER_STATE2_25); + this->stateFlags2 &= ~(PLAYER_STATE2_NEAR_OCARINA_ACTOR | PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR | PLAYER_STATE2_PLAY_FOR_ACTOR); this->unk_6A8 = NULL; } else if (play->msgCtx.ocarinaMode == OCARINA_MODE_02) { gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex = D_808549D4[play->msgCtx.lastPlayedSong]; @@ -12864,13 +12864,13 @@ void func_8084E3C4(Player* this, PlayState* play) { gSaveContext.respawn[RESPAWN_MODE_RETURN].data = play->msgCtx.lastPlayedSong; this->csMode = 0; - this->stateFlags1 &= ~PLAYER_STATE1_29; + this->stateFlags1 &= ~PLAYER_STATE1_IN_CUTSCENE; func_80852FFC(play, NULL, 8); play->mainCamera.unk_14C &= ~8; - this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; - this->stateFlags2 |= PLAYER_STATE2_27; + this->stateFlags1 |= PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE; + this->stateFlags2 |= PLAYER_STATE2_OCARINA_PLAYING; if (Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0xF, true) == NULL) { Environment_WarpSongLeave(play); @@ -12913,7 +12913,7 @@ void func_8084E6D4(Player* this, PlayState* play) { if (func_8084DFF4(play, this) && (this->unk_850 == 1)) { cond = ((this->targetActor != NULL) && (this->exchangeItemId < 0)) || - (this->stateFlags3 & PLAYER_STATE3_5); + (this->stateFlags3 & PLAYER_STATE3_FORCE_PULL_OCARINA); if (cond || (gSaveContext.healthAccumulator == 0)) { if (cond) { @@ -12933,7 +12933,7 @@ void func_8084E6D4(Player* this, PlayState* play) { if ((this->getItemId == GI_ICE_TRAP && !gSaveContext.n64ddFlag) || (gSaveContext.n64ddFlag && (this->getItemId == RG_ICE_TRAP || this->getItemEntry.getItemId == RG_ICE_TRAP))) { - this->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_11); + this->stateFlags1 &= ~(PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD); if ((this->getItemId != GI_ICE_TRAP && !gSaveContext.n64ddFlag) || (gSaveContext.n64ddFlag && (this->getItemId != RG_ICE_TRAP || this->getItemEntry.getItemId != RG_ICE_TRAP))) { @@ -13206,7 +13206,7 @@ void func_8084ECA4(Player* this, PlayState* play) { this->interactRangeActor->parent = &this->actor; Player_UpdateBottleHeld(play, this, catchInfo->itemId, ABS(catchInfo->actionParam)); if (!CVarGetInteger("gFastDrops", 0)) { - this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE; func_808322D0(play, this, sp24->unk_04); func_80835EA4(play, 4); } @@ -13290,7 +13290,7 @@ static struct_80832924 D_80854A3C[] = { }; void func_8084F104(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; if (LinkAnimation_Update(play, &this->skelAnime)) { if (this->unk_850 < 0) { @@ -13300,7 +13300,7 @@ void func_8084F104(Player* this, PlayState* play) { this->unk_862 = 0; if (targetActor->textId != 0xFFFF) { - this->actor.flags |= ACTOR_FLAG_8; + this->actor.flags |= ACTOR_FLAG_PLAYER_TALKED_TO; } func_80853148(play, targetActor); @@ -13324,7 +13324,7 @@ void func_8084F104(Player* this, PlayState* play) { this->unk_850 = 1; } else if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~ACTOR_FLAG_8; + this->actor.flags &= ~ACTOR_FLAG_PLAYER_TALKED_TO; this->unk_862 = 0; if (this->unk_84F == 1) { @@ -13347,7 +13347,7 @@ void func_8084F104(Player* this, PlayState* play) { } void func_8084F308(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_5 | PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; if (LinkAnimation_Update(play, &this->skelAnime)) { func_80832284(play, this, &gPlayerAnim_link_normal_re_dead_attack_wait); @@ -13355,7 +13355,7 @@ void func_8084F308(Player* this, PlayState* play) { if (func_80832594(this, 0, 100)) { func_80839F90(this, play); - this->stateFlags2 &= ~PLAYER_STATE2_7; + this->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY; } } @@ -13368,7 +13368,7 @@ void func_8084F390(Player* this, PlayState* play) { s16 sp44; Vec3f sp38; - this->stateFlags2 |= PLAYER_STATE2_5 | PLAYER_STATE2_6; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; LinkAnimation_Update(play, &this->skelAnime); func_8084269C(play, this); func_800F4138(&this->actor.projectedPos, NA_SE_PL_SLIP_LEVEL - SFX_FLAG, this->actor.speedXZ); @@ -13547,7 +13547,7 @@ void func_8084FB10(Player* this, PlayState* play) { EffectSsIcePiece_SpawnBurst(play, &this->actor.world.pos, this->actor.scale.x); func_8002F7DC(&this->actor, NA_SE_PL_ICE_BROKEN); } else { - this->stateFlags2 |= PLAYER_STATE2_14; + this->stateFlags2 |= PLAYER_STATE2_FROZEN; } if ((play->gameplayFrames % 4) == 0) { @@ -13708,7 +13708,7 @@ s32 func_80850224(Player* this, PlayState* play) { func_80837948(play, this, sp24); if (sp24 >= 0x18) { - this->stateFlags2 |= PLAYER_STATE2_17; + this->stateFlags2 |= PLAYER_STATE2_SPIN_ATTACKING; func_80837530(play, this, 0); return 1; } @@ -13725,15 +13725,15 @@ static Vec3f D_80854A40 = { 0.0f, 40.0f, 45.0f }; void func_808502D0(Player* this, PlayState* play) { struct_80854190* sp44 = &D_80854190[this->meleeWeaponAnimation]; - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; if (!func_80842DF4(play, this)) { func_8084285C(this, 0.0f, sp44->unk_0C, sp44->unk_0D); - if ((this->stateFlags2 & PLAYER_STATE2_30) && (this->heldItemAction != PLAYER_IA_HAMMER) && + if ((this->stateFlags2 & PLAYER_STATE2_SWORD_LUNGE) && (this->heldItemAction != PLAYER_IA_HAMMER) && LinkAnimation_OnFrame(&this->skelAnime, 0.0f)) { this->linearVelocity = 15.0f; - this->stateFlags2 &= ~PLAYER_STATE2_30; + this->stateFlags2 &= ~PLAYER_STATE2_SWORD_LUNGE; } if (this->linearVelocity > 12.0f) { @@ -13765,7 +13765,7 @@ void func_808502D0(Player* this, PlayState* play) { func_8083A098(this, sp3C, play); this->skelAnime.moveFlags = sp43; - this->stateFlags3 |= PLAYER_STATE3_3; + this->stateFlags3 |= PLAYER_STATE3_FINISHED_ATTACKING; } } else if (this->heldItemAction == PLAYER_IA_HAMMER) { if ((this->meleeWeaponAnimation == 0x16) || (this->meleeWeaponAnimation == 0x13)) { @@ -13800,7 +13800,7 @@ void func_808505DC(Player* this, PlayState* play) { } void func_8085063C(Player* this, PlayState* play) { - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; LinkAnimation_Update(play, &this->skelAnime); func_80836670(this, play); @@ -13904,7 +13904,7 @@ void func_808507F4(Player* this, PlayState* play) { LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80854A58[this->unk_84F], 0.83f * (isFastFarores ? 2 : 1)); if (func_80846A00(play, this, this->unk_84F) != NULL) { - this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE; if ((this->unk_84F != 0) || (gSaveContext.respawn[RESPAWN_MODE_TOP].data <= 0)) { gSaveContext.magicState = 1; } @@ -13946,7 +13946,7 @@ void func_808507F4(Player* this, PlayState* play) { } else if (this->unk_850 == 1) { func_80832924(this, D_80854A8C[this->unk_84F]); if ((this->unk_84F == 2) && LinkAnimation_OnFrame(&this->skelAnime, 30.0f)) { - this->stateFlags1 &= ~(PLAYER_STATE1_28 | PLAYER_STATE1_29); + this->stateFlags1 &= ~(PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE); } } else if ((isFastFarores ? 10 : D_80854A7C[this->unk_84F]) < this->unk_850++) { LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80854A70[this->unk_84F], 0.83f * (isFastFarores ? 2 : 1)); @@ -13962,7 +13962,7 @@ void func_808507F4(Player* this, PlayState* play) { void func_80850AEC(Player* this, PlayState* play) { f32 temp; - this->stateFlags2 |= PLAYER_STATE2_5; + this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET; if (LinkAnimation_Update(play, &this->skelAnime)) { func_80832284(play, this, &gPlayerAnim_link_hook_fly_wait); @@ -13984,9 +13984,9 @@ void func_80850AEC(Player* this, PlayState* play) { this->linearVelocity = 1.0f; this->actor.velocity.y = 0.0f; func_80837B9C(this, play); - this->stateFlags2 &= ~PLAYER_STATE2_10; + this->stateFlags2 &= ~PLAYER_STATE2_UNDERWATER; this->actor.bgCheckFlags |= 1; - this->stateFlags1 |= PLAYER_STATE1_2; + this->stateFlags1 |= PLAYER_STATE1_HOOKSHOT_FALLING; return; } @@ -14386,9 +14386,9 @@ void func_80851314(Player* this) { } void func_80851368(PlayState* play, Player* this, CsCmdActorAction* arg2) { - this->stateFlags1 |= PLAYER_STATE1_27; - this->stateFlags2 |= PLAYER_STATE2_10; - this->stateFlags1 &= ~(PLAYER_STATE1_18 | PLAYER_STATE1_19); + this->stateFlags1 |= PLAYER_STATE1_IN_WATER; + this->stateFlags2 |= PLAYER_STATE2_UNDERWATER; + this->stateFlags1 &= ~(PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL); func_80832284(play, this, &gPlayerAnim_link_swimer_swim); } @@ -14429,7 +14429,7 @@ void func_808514C0(PlayState* play, Player* this, CsCmdActorAction* arg2) { LinkAnimation_Update(play, &this->skelAnime); - if (func_8008F128(this) || (this->stateFlags1 & PLAYER_STATE1_11)) { + if (func_8008F128(this) || (this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD)) { func_80836670(this, play); return; } @@ -14478,7 +14478,7 @@ void func_80851688(PlayState* play, Player* this, CsCmdActorAction* arg2) { LinkAnimation_Update(play, &this->skelAnime); - if (func_8008F128(this) || (this->stateFlags1 & PLAYER_STATE1_11)) { + if (func_8008F128(this) || (this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD)) { func_80836670(this, play); } } @@ -14495,7 +14495,7 @@ void func_80851750(PlayState* play, Player* this, CsCmdActorAction* arg2) { } void func_80851788(PlayState* play, Player* this, CsCmdActorAction* arg2) { - this->stateFlags1 &= ~PLAYER_STATE1_25; + this->stateFlags1 &= ~PLAYER_STATE1_THREW_BOOMERANG; this->currentYaw = this->actor.shape.rot.y = this->actor.world.rot.y = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_450); @@ -14877,7 +14877,7 @@ void func_80852554(PlayState* play, Player* this, CsCmdActorAction* arg2) { } void func_80852564(PlayState* play, Player* this, CsCmdActorAction* arg2) { - this->stateFlags3 |= PLAYER_STATE3_1; + this->stateFlags3 |= PLAYER_STATE3_MIDAIR; this->linearVelocity = 2.0f; this->actor.velocity.y = -1.0f; @@ -15044,7 +15044,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorAction* arg2) { } if (linkCsAction == NULL) { - this->actor.flags &= ~ACTOR_FLAG_6; + this->actor.flags &= ~ACTOR_FLAG_ACTIVE; return; } @@ -15115,11 +15115,11 @@ s32 Player_StartFishing(PlayState* play) { s32 func_80852F38(PlayState* play, Player* this) { if (!Player_InBlockingCsMode(play, this) && (this->invincibilityTimer >= 0) && !func_8008F128(this) && - !(this->stateFlags3 & PLAYER_STATE3_7)) { + !(this->stateFlags3 & PLAYER_STATE3_HOOKSHOT_TRAVELLING)) { func_80832564(play, this); func_80835C58(play, this, func_8084F308, 0); func_80832264(play, this, &gPlayerAnim_link_normal_re_dead_attack); - this->stateFlags2 |= PLAYER_STATE2_7; + this->stateFlags2 |= PLAYER_STATE2_GRABBED_BY_ENEMY; func_80832224(this); func_80832698(this, NA_SE_VO_LI_HELD); return true; @@ -15158,7 +15158,7 @@ s32 Player_InflictDamageModified(PlayState* play, s32 damage, u8 modified) { Player* this = GET_PLAYER(play); if (!Player_InBlockingCsMode(play, this) && !func_80837B18_modified(play, this, damage, modified)) { - this->stateFlags2 &= ~PLAYER_STATE2_7; + this->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY; return 1; } @@ -15171,8 +15171,8 @@ void func_80853148(PlayState* play, Actor* actor) { s32 pad; if ((this->targetActor != NULL) || (actor == this->naviActor) || - CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0 | ACTOR_FLAG_18)) { - actor->flags |= ACTOR_FLAG_8; + CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_NAVI_HAS_INFO)) { + actor->flags |= ACTOR_FLAG_PLAYER_TALKED_TO; } this->targetActor = actor; @@ -15180,17 +15180,17 @@ void func_80853148(PlayState* play, Actor* actor) { if (actor->textId == 0xFFFF) { func_8002DF54(play, actor, 1); - actor->flags |= ACTOR_FLAG_8; + actor->flags |= ACTOR_FLAG_PLAYER_TALKED_TO; func_80832528(play, this); } else { - if (this->actor.flags & ACTOR_FLAG_8) { + if (this->actor.flags & ACTOR_FLAG_PLAYER_TALKED_TO) { this->actor.textId = 0; } else { - this->actor.flags |= ACTOR_FLAG_8; + this->actor.flags |= ACTOR_FLAG_PLAYER_TALKED_TO; this->actor.textId = actor->textId; } - if (this->stateFlags1 & PLAYER_STATE1_23) { + if (this->stateFlags1 & PLAYER_STATE1_ON_HORSE) { s32 sp24 = this->unk_850; func_80832528(play, this); @@ -15225,11 +15225,11 @@ void func_80853148(PlayState* play, Actor* actor) { func_80832224(this); } - this->stateFlags1 |= PLAYER_STATE1_6 | PLAYER_STATE1_29; + this->stateFlags1 |= PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_IN_CUTSCENE; } if ((this->naviActor == this->targetActor) && ((this->targetActor->textId & 0xFF00) != 0x200)) { - this->naviActor->flags |= ACTOR_FLAG_8; + this->naviActor->flags |= ACTOR_FLAG_PLAYER_TALKED_TO; func_80835EA4(play, 0xB); } }