z_player_lib: Part 2 (#938)

* preparations

* import data

* PLAYER_STATE1

* PLAYER_STATE2

* PLAYER_STATE3

* import bss

* format stuff

* bss cleanup

* more cleaning and some naming

* face

* cleaning up link human object a bit

* Remove PHYSICAL_TO_VIRTUAL2

* Update src/code/z_player_lib.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* review

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* format

* /* CAT */

Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com>

* naming some stuff on objects

* format

* invert flags endian

* review

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* format

* drawmask

Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com>

* naming

* another round of human object naming

* enum renames

* sActionModelGroups and use enum as types

* PlayerAnimType

* PLAYER_MODELTYPE_

* determined ranges of PlayerModelType

* name PLAYER_MODELGROUP_DEFAULT

* format

* sheath

* dlist groups placeholder namse

* PLAYER_MODELGROUP_BOTTLE

* Some fierce deity naming

* Right hands

* zora skel dlists

* deku limb dlists

* left hands

* name most modelgroups

* more hand naming

* regs as dec

* fix in horse

* Use BUTTON_ITEM_EQUIP macro

* review

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* reformat D_801AED58

* Sword sheaths

* swords and shields

* Update src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* playerForm on Player_DrawImpl

* fomat

* Update src/code/z_player_lib.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Update assets/xml/objects/gameplay_keep.xml

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* review

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* VIRTUAL_TO_PHYSICAL(SEGMENTED_TO_VIRTUAL(gEffBubble1Tex))

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* singular limb enum names

* fix bss

* Update src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* review

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* name goron shielding limbs

* name limb

* Update src/code/z_player_lib.c

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* bss

* bss

* format

* namefixer

* bss

* bss

* bss

* bss

* format

* bss

* review

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* fix bss

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com>
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
Anghelo Carvajal
2022-10-15 19:12:01 -03:00
committed by GitHub
parent 638f5062cb
commit bd373940ac
139 changed files with 2323 additions and 1061 deletions
-1
View File
@@ -1,4 +1,3 @@
#include "prevent_bss_reordering.h"
#include "global.h"
u8 D_80096B20 = 1;
+56 -25
View File
@@ -172,7 +172,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* mapper, PlayState* play) {
u8 shadowAlpha = actor->shape.shadowAlpha;
f32 alphaRatio;
if ((actor->id == ACTOR_PLAYER) && (((Player*)actor)->stateFlags3 & 0x8000)) {
if ((actor->id == ACTOR_PLAYER) && (((Player*)actor)->stateFlags3 & PLAYER_STATE3_8000)) {
f32 prevScaleZ = actor->scale.z;
actor->scale.z += 0.03f * fabsf(Math_CosS(((Player*)actor)->unk_AAA));
@@ -469,7 +469,8 @@ void Actor_TargetContextInit(TargetContext* targetCtx, Actor* actor, PlayState*
void Actor_DrawZTarget(TargetContext* targetCtx, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & 0x300006C2)) {
if (!(player->stateFlags1 & (PLAYER_STATE1_2 | PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_200 |
PLAYER_STATE1_400 | PLAYER_STATE1_10000000 | PLAYER_STATE1_20000000))) {
Actor* actor = targetCtx->targetedActor;
OPEN_DISPS(play->state.gfxCtx);
@@ -519,7 +520,7 @@ void Actor_DrawZTarget(TargetContext* targetCtx, PlayState* play) {
Target_SetPos(targetCtx, targetCtx->unk4C, projectedPos.x, projectedPos.y, projectedPos.z);
if ((!(player->stateFlags1 & 0x40)) || (actor != player->unk_730)) {
if ((!(player->stateFlags1 & PLAYER_STATE1_40)) || (actor != player->unk_730)) {
OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x39);
for (spB0 = 0, spAC = targetCtx->unk4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) {
@@ -1291,7 +1292,7 @@ void func_800B6F20(PlayState* play, Input* input, f32 magnitude, s16 baseYaw) {
f32 Player_GetHeight(Player* player) {
f32 extraHeight;
if (player->stateFlags1 & 0x800000) {
if (player->stateFlags1 & PLAYER_STATE1_800000) {
extraHeight = 32.0f;
} else {
extraHeight = 0.0f;
@@ -1302,8 +1303,7 @@ f32 Player_GetHeight(Player* player) {
case PLAYER_FORM_FIERCE_DEITY:
return extraHeight + 124.0f;
case PLAYER_FORM_GORON:
// (player->stateFlags3 & 0x1000): being curled?
return extraHeight + ((player->stateFlags3 & 0x1000) ? 34.0f : 80.0f);
return extraHeight + ((player->stateFlags3 & PLAYER_STATE3_1000) ? 34.0f : 80.0f);
case PLAYER_FORM_ZORA:
return extraHeight + 68.0f;
case PLAYER_FORM_DEKU:
@@ -1314,9 +1314,9 @@ f32 Player_GetHeight(Player* player) {
}
f32 Player_GetRunSpeedLimit(Player* player) {
if (player->stateFlags1 & 0x800000) {
if (player->stateFlags1 & PLAYER_STATE1_800000) {
return 15.0f;
} else if (player->stateFlags1 & 0x8000000) {
} else if (player->stateFlags1 & PLAYER_STATE1_8000000) {
return (R_RUN_SPEED_LIMIT / 100.0f) * 0.6f;
} else {
return R_RUN_SPEED_LIMIT / 100.0f;
@@ -1324,7 +1324,7 @@ f32 Player_GetRunSpeedLimit(Player* player) {
}
s32 func_800B7118(Player* player) {
return player->stateFlags1 & 0x8;
return player->stateFlags1 & PLAYER_STATE1_8;
}
s32 func_800B7128(Player* player) {
@@ -1334,7 +1334,7 @@ s32 func_800B7128(Player* player) {
s32 func_800B715C(PlayState* play) {
Player* player = GET_PLAYER(play);
return player->stateFlags2 & 0x8;
return player->stateFlags2 & PLAYER_STATE2_8;
}
void Actor_SetCameraHorseSetting(PlayState* play, Player* player) {
@@ -1349,12 +1349,12 @@ void Actor_SetCameraHorseSetting(PlayState* play, Player* player) {
void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) {
player->rideActor = horse;
player->stateFlags1 |= 0x800000;
player->stateFlags1 |= PLAYER_STATE1_800000;
horse->child = &player->actor;
}
s32 func_800B7200(Player* player) {
return (player->stateFlags1 & 0x20000080) || (player->csMode != 0);
return (player->stateFlags1 & (PLAYER_STATE1_20000000 | PLAYER_STATE1_80)) || (player->csMode != 0);
}
void func_800B722C(GameState* gameState, Player* player) {
@@ -1999,13 +1999,16 @@ s32 Actor_HasParent(Actor* actor, PlayState* play) {
s32 Actor_PickUp(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
if (!(player->stateFlags1 &
(PLAYER_STATE1_80 | PLAYER_STATE1_1000 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_40000 |
PLAYER_STATE1_80000 | PLAYER_STATE1_100000 | PLAYER_STATE1_200000)) &&
Player_GetExplosiveHeld(player) < 0) {
if ((actor->xzDistToPlayer <= xzRange) && (fabsf(actor->playerHeightRel) <= fabsf(yRange))) {
if ((getItemId == GI_MASK_CIRCUS_LEADER || getItemId == GI_PENDANT_OF_MEMORIES ||
getItemId == GI_DEED_LAND ||
((player->heldActor != NULL || actor == player->targetActor) &&
(getItemId > GI_NONE && getItemId < GI_MAX))) ||
!(player->stateFlags1 & 0x20000800)) {
!(player->stateFlags1 & (PLAYER_STATE1_800 | PLAYER_STATE1_20000000))) {
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
s32 absYawDiff = ABS_ALT(yawDiff);
@@ -2081,7 +2084,9 @@ s32 Actor_HasRider(PlayState* play, Actor* horse) {
s32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & 0x003C7880)) {
if (!(player->stateFlags1 &
(PLAYER_STATE1_80 | PLAYER_STATE1_800 | PLAYER_STATE1_1000 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 |
PLAYER_STATE1_40000 | PLAYER_STATE1_80000 | PLAYER_STATE1_100000 | PLAYER_STATE1_200000))) {
player->rideActor = horse;
player->mountSide = mountSide;
ActorCutscene_SetIntentToPlay(0x7C);
@@ -2353,7 +2358,7 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
if (((params->unk_08) && !(actor->flags & params->unk_08)) ||
((tmp = (params->unk_08 == 0)) &&
(!(actor->flags & ACTOR_FLAG_100000) ||
((actor->category == ACTORCAT_EXPLOSIVES) && (params->player->stateFlags1 & 0x200))) &&
((actor->category == ACTORCAT_EXPLOSIVES) && (params->player->stateFlags1 & PLAYER_STATE1_200))) &&
(params->unkC != 0) && (actor != params->unk10) && ((actor != params->player->heldActor)) &&
(actor->parent != &params->player->actor))) {
CollisionCheck_ResetDamage(&actor->colChkInfo);
@@ -2395,9 +2400,35 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
return nextActor;
}
u32 D_801AED58[] = {
0x100002C2, 0x100002C2, 0x00000200, 0x100006C2, 0x00000282, 0x300002C2,
0x10000282, 0x00000002, 0x300002C2, 0x100006C2, 0x00000002, 0x100002C2,
u32 D_801AED58[ACTORCAT_MAX] = {
/* ACTORCAT_SWITCH */
PLAYER_STATE1_2 | PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_10000000,
/* ACTORCAT_BG */
PLAYER_STATE1_2 | PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_10000000,
/* ACTORCAT_PLAYER */
PLAYER_STATE1_200,
/* ACTORCAT_EXPLOSIVES */
PLAYER_STATE1_2 | PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_400 |
PLAYER_STATE1_10000000,
/* ACTORCAT_NPC */
PLAYER_STATE1_2 | PLAYER_STATE1_80 | PLAYER_STATE1_200,
/* ACTORCAT_ENEMY */
PLAYER_STATE1_2 | PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_10000000 |
PLAYER_STATE1_20000000,
/* ACTORCAT_PROP */
PLAYER_STATE1_2 | PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_10000000,
/* ACTORCAT_ITEMACTION */
PLAYER_STATE1_2,
/* ACTORCAT_MISC */
PLAYER_STATE1_2 | PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_10000000 |
PLAYER_STATE1_20000000,
/* ACTORCAT_BOSS */
PLAYER_STATE1_2 | PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_400 |
PLAYER_STATE1_10000000,
/* ACTORCAT_DOOR */
PLAYER_STATE1_2,
/* ACTORCAT_CHEST */
PLAYER_STATE1_2 | PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_10000000,
};
void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
@@ -2427,13 +2458,13 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
tmp = D_801AED58;
if (player->stateFlags2 & 0x8000000) {
if (player->stateFlags2 & PLAYER_STATE2_8000000) {
params.unk_08 = 0x2000000;
} else {
params.unk_08 = 0;
}
if ((player->stateFlags1 & 0x40) && ((player->actor.textId & 0xFF00) != 0x1900)) {
if ((player->stateFlags1 & PLAYER_STATE1_40) && ((player->actor.textId & 0xFF00) != 0x1900)) {
params.unk10 = player->targetActor;
} else {
params.unk10 = NULL;
@@ -2486,7 +2517,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
}
}
if (!(player->stateFlags1 & 2)) {
if (!(player->stateFlags1 & PLAYER_STATE1_2)) {
func_800B5814(&actorCtx->targetContext, player, actor, &play->state);
}
@@ -2835,7 +2866,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
if (play->actorCtx.lensActive) {
Math_StepToC(&play->actorCtx.lensMaskSize, LENS_MASK_ACTIVE_SIZE, 20);
if (GET_PLAYER(play)->stateFlags2 & 0x8000000) {
if (GET_PLAYER(play)->stateFlags2 & PLAYER_STATE2_8000000) {
Actor_DeactivateLens(play);
}
} else {
@@ -3658,7 +3689,7 @@ s16 Actor_TestFloorInDirection(Actor* actor, PlayState* play, f32 distance, s16
s32 Actor_IsTargeted(PlayState* play, Actor* actor) {
Player* player = GET_PLAYER(play);
if ((player->stateFlags3 & 0x80000000) && actor->isTargeted) {
if ((player->stateFlags3 & PLAYER_STATE3_80000000) && actor->isTargeted) {
return true;
}
@@ -3671,7 +3702,7 @@ s32 Actor_IsTargeted(PlayState* play, Actor* actor) {
s32 Actor_OtherIsTargeted(PlayState* play, Actor* actor) {
Player* player = GET_PLAYER(play);
if ((player->stateFlags3 & 0x80000000) && !actor->isTargeted) {
if ((player->stateFlags3 & PLAYER_STATE3_80000000) && !actor->isTargeted) {
return true;
}
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
Vec3f D_801EDE00;
+3 -2
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
#include "z64quake.h"
#include "z64rumble.h"
@@ -270,10 +271,10 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c
gSaveContext.save.playerForm = PLAYER_FORM_DEKU;
break;
case 0x17:
player->stateFlags2 |= 0x4000000;
player->stateFlags2 |= PLAYER_STATE2_4000000;
break;
case 0x18:
player->stateFlags2 &= ~0x4000000;
player->stateFlags2 &= ~PLAYER_STATE2_4000000;
break;
case 0x19:
sCutsceneStoredPlayerForm = gSaveContext.save.playerForm;
+1 -1
View File
@@ -487,7 +487,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
EnItem00* this = THIS;
s32 pad;
Player* player = GET_PLAYER(play);
s32 sp38 = player->stateFlags3 & 0x1000;
s32 sp38 = player->stateFlags3 & PLAYER_STATE3_1000;
s32 getItemId = GI_NONE;
s32 params;
+1 -1
View File
@@ -79,7 +79,7 @@ void KaleidoSetup_Update(PlayState* play) {
if (!Play_InCsMode(play) || ((msgCtx->msgMode != 0) && (msgCtx->currentTextId == 0xFF))) {
if ((play->unk_1887C < 2) && (gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY) &&
(gSaveContext.magicState != MAGIC_STATE_FILL)) {
if (!(gSaveContext.eventInf[1] & 0x80) && !(player->stateFlags1 & 0x20)) {
if (!(gSaveContext.eventInf[1] & 0x80) && !(player->stateFlags1 & PLAYER_STATE1_20)) {
if (!(play->actorCtx.flags & ACTORCTX_FLAG_1) &&
!(play->actorCtx.flags & ACTORCTX_FLAG_2)) {
if ((play->actorCtx.unk268 == 0) && CHECK_BTN_ALL(input->press.button, BTN_START)) {
+1252 -104
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -2,7 +2,7 @@
* File: z_shrink_window.c
* Description: Draws black top/bottom/side borders on the viewing window (e.g. Z-targeting, talking to NPC)
*/
#include "prevent_bss_reordering.h"
#include "global.h"
#include "z64shrink_window.h"
+30 -34
View File
@@ -107,9 +107,10 @@ void ArmsHook_DetachHookFromActor(ArmsHook* this) {
s32 ArmsHook_CheckForCancel(ArmsHook* this) {
Player* player = (Player*)this->actor.parent;
if (Player_IsHoldingHookshot(player)) {
if ((player->heldItemActionParam != player->itemActionParam) || ((player->actor.flags & ACTOR_FLAG_100)) ||
((player->stateFlags1 & 0x4000080))) {
if ((player->heldItemActionParam != player->itemActionParam) || (player->actor.flags & ACTOR_FLAG_100) ||
(player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_4000000))) {
this->timer = 0;
ArmsHook_DetachHookFromActor(this);
Math_Vec3f_Copy(&this->actor.world.pos, &player->rightHandWorld.pos);
@@ -143,7 +144,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_200 | ACTOR_FLAG_400))) {
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
ArmsHook_AttachHookToActor(this, touchedActor);
if ((touchedActor->flags & ACTOR_FLAG_400) == ACTOR_FLAG_400) {
if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_400)) {
func_808C1154(this);
}
}
@@ -155,28 +156,25 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
}
if (DECR(this->timer) == 0) {
Actor* grabbed;
Actor* grabbed = this->grabbed;
Vec3f bodyDistDiffVec;
Vec3f newPos;
f32 bodyDistDiff;
f32 phi_f16;
s32 pad;
grabbed = this->grabbed;
if (grabbed != NULL) {
if ((grabbed->update == NULL) || !CHECK_FLAG_ALL(grabbed->flags, ACTOR_FLAG_2000)) {
grabbed = NULL;
this->grabbed = NULL;
} else {
if (this->actor.child != NULL) {
f32 sp94 = Actor_DistanceBetweenActors(&this->actor, grabbed);
f32 sp90 = sqrtf(SQXYZ(this->unk1FC));
} else if (this->actor.child != NULL) {
f32 sp94 = Actor_DistanceBetweenActors(&this->actor, grabbed);
f32 sp90 = sqrtf(SQXYZ(this->unk1FC));
Math_Vec3f_Diff(&grabbed->world.pos, &this->unk1FC, &this->actor.world.pos);
if (50.0f < (sp94 - sp90)) {
ArmsHook_DetachHookFromActor(this);
grabbed = NULL;
}
Math_Vec3f_Diff(&grabbed->world.pos, &this->unk1FC, &this->actor.world.pos);
if (50.0f < (sp94 - sp90)) {
ArmsHook_DetachHookFromActor(this);
grabbed = NULL;
}
}
}
@@ -257,11 +255,10 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
this->actor.world.pos.z += 10.0f * nz;
this->timer = 1;
if (SurfaceType_IsHookshotSurface(&play->colCtx, poly, bgId)) {
{
DynaPolyActor* dynaPolyActor;
if (bgId != BGCHECK_SCENE && (dynaPolyActor = DynaPoly_GetActor(&play->colCtx, bgId)) != NULL) {
ArmsHook_AttachHookToActor(this, &dynaPolyActor->actor);
}
DynaPolyActor* dynaPolyActor;
if ((bgId != BGCHECK_SCENE) && (dynaPolyActor = DynaPoly_GetActor(&play->colCtx, bgId)) != NULL) {
ArmsHook_AttachHookToActor(this, &dynaPolyActor->actor);
}
func_808C1154(this);
Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_STICK_OBJ);
@@ -269,12 +266,11 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
CollisionCheck_SpawnShieldParticlesMetal(play, &this->actor.world.pos);
Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_REFLECT);
}
} else {
if (CHECK_BTN_ANY(CONTROLLER1(&play->state)->press.button,
BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)) {
s32 pad;
this->timer = 1;
}
} else if (CHECK_BTN_ANY(CONTROLLER1(&play->state)->press.button,
BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)) {
s32 pad;
this->timer = 1;
}
}
}
@@ -286,19 +282,19 @@ void ArmsHook_Update(Actor* thisx, PlayState* play) {
this->unk1EC = this->unk1E0;
}
static Vec3f D_808C1C10 = { 0.0f, 0.0f, 0.0f };
static Vec3f D_808C1C1C = { 0.0f, 0.0f, 900.0f };
static Vec3f D_808C1C28 = { 0.0f, 500.0f, -3000.0f };
static Vec3f D_808C1C34 = { 0.0f, -500.0f, -3000.0f };
static Vec3f D_808C1C40 = { 0.0f, 500.0f, 0.0f };
static Vec3f D_808C1C4C = { 0.0f, -500.0f, 0.0f };
Vec3f D_808C1C10 = { 0.0f, 0.0f, 0.0f };
Vec3f D_808C1C1C = { 0.0f, 0.0f, 900.0f };
Vec3f D_808C1C28 = { 0.0f, 500.0f, -3000.0f };
Vec3f D_808C1C34 = { 0.0f, -500.0f, -3000.0f };
Vec3f D_808C1C40 = { 0.0f, 500.0f, 0.0f };
Vec3f D_808C1C4C = { 0.0f, -500.0f, 0.0f };
void ArmsHook_Draw(Actor* thisx, PlayState* play) {
ArmsHook* this = THIS;
f32 f0;
Player* player = GET_PLAYER(play);
if (player->actor.draw != NULL && player->rightHandType == 0xB) {
if ((player->actor.draw != NULL) && (player->rightHandType == PLAYER_MODELTYPE_RH_HOOKSHOT)) {
Vec3f sp68;
Vec3f sp5C;
Vec3f sp50;
@@ -311,13 +307,13 @@ void ArmsHook_Draw(Actor* thisx, PlayState* play) {
Matrix_MultVec3f(&D_808C1C10, &this->unk1E0);
Matrix_MultVec3f(&D_808C1C28, &sp5C);
Matrix_MultVec3f(&D_808C1C34, &sp50);
this->unk_1C4.active = false;
this->weaponInfo.active = false;
} else {
Matrix_MultVec3f(&D_808C1C1C, &this->unk1E0);
Matrix_MultVec3f(&D_808C1C40, &sp5C);
Matrix_MultVec3f(&D_808C1C4C, &sp50);
}
func_80126440(play, &this->collider, &this->unk_1C4, &sp5C, &sp50);
func_80126440(play, &this->collider, &this->weaponInfo, &sp5C, &sp50);
func_8012C28C(play->state.gfxCtx);
func_80122868(play, player);
@@ -10,7 +10,7 @@ typedef void (*ArmsHookActionFunc)(struct ArmsHook*, PlayState*);
typedef struct ArmsHook {
/* 0x000 */ Actor actor;
/* 0x144 */ ColliderQuad collider;
/* 0x1C4 */ WeaponInfo unk_1C4;
/* 0x1C4 */ WeaponInfo weaponInfo;
/* 0x1E0 */ Vec3f unk1E0;
/* 0x1EC */ Vec3f unk1EC;
/* 0x1F8 */ Actor* grabbed;
@@ -390,7 +390,7 @@ void func_80A2A32C(BgDblueMovebg* this, PlayState* play) {
this->unk_172 |= 8;
this->actionFunc = func_80A2A444;
} else {
player->stateFlags2 &= ~0x10;
player->stateFlags2 &= ~PLAYER_STATE2_10;
this->dyna.pushForce = 0.0f;
}
}
@@ -410,7 +410,7 @@ void func_80A2A444(BgDblueMovebg* this, PlayState* play) {
this->dyna.actor.shape.rot.y =
(s32)((this->unk_18C + temp_v0) * 0.1f * (0x10000 / 360.0f)) + this->dyna.actor.home.rot.y;
if ((player->stateFlags2 & 0x10) && (this->unk_184 > 0.0f)) {
if ((player->stateFlags2 & PLAYER_STATE2_10) && (this->unk_184 > 0.0f)) {
player->actor.world.pos.x =
(Math_SinS(this->dyna.actor.shape.rot.y - this->unk_18E) * this->unk_184) + this->dyna.actor.home.pos.x;
player->actor.world.pos.z =
@@ -420,7 +420,7 @@ void func_80A2A444(BgDblueMovebg* this, PlayState* play) {
}
if (sp20) {
player->stateFlags2 &= ~0x10;
player->stateFlags2 &= ~PLAYER_STATE2_10;
this->dyna.pushForce = 0.0f;
Flags_SetSwitch(play, this->unk_1C0);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
@@ -498,7 +498,7 @@ void func_80A2A7F8(BgDblueMovebg* this, PlayState* play) {
this->dyna.actor.shape.rot.y =
(s32)((this->unk_18C + sp26) * 0.1f * (0x10000 / 360.0f)) + this->dyna.actor.home.rot.y;
if ((player->stateFlags2 & 0x10) && (this->unk_184 > 0.0f)) {
if ((player->stateFlags2 & PLAYER_STATE2_10) && (this->unk_184 > 0.0f)) {
player->actor.world.pos.x =
(Math_SinS(this->dyna.actor.shape.rot.y - this->unk_18E) * this->unk_184) + this->dyna.actor.home.pos.x;
player->actor.world.pos.z =
@@ -516,8 +516,8 @@ void func_80A2A7F8(BgDblueMovebg* this, PlayState* play) {
Flags_UnsetSwitch(play, this->unk_1C0);
}
player->stateFlags1 |= 0x20;
player->stateFlags2 &= ~0x10;
player->stateFlags1 |= PLAYER_STATE1_20;
player->stateFlags2 &= ~PLAYER_STATE2_10;
this->dyna.pushForce = 0.0f;
this->unk_18C = (this->unk_18C + sp26 + 3600) % 3600;
@@ -565,12 +565,12 @@ void func_80A2AAB8(BgDblueMovebg* this, PlayState* play) {
if (this->unk_1D0 == 1) {
this->dyna.pushForce = 0.0f;
player->stateFlags1 |= 0x20;
player->stateFlags2 &= ~0x10;
player->stateFlags1 |= PLAYER_STATE1_20;
player->stateFlags2 &= ~PLAYER_STATE2_10;
}
if (this->unk_1D0 <= 0) {
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
this->actionFunc = func_80A2A714;
}
}
@@ -240,7 +240,7 @@ void func_80B7F0D0(BgIkanaBlock* this, PlayState* play) {
if ((sp24 != 2) && (this->unk_17A & (0x8 | 0x4 | 0x2 | 0x1))) {
Player* player = GET_PLAYER(play);
player->stateFlags2 &= ~0x10;
player->stateFlags2 &= ~PLAYER_STATE2_10;
this->dyna.pushForce = 0.0f;
}
@@ -297,7 +297,7 @@ void func_80B7F290(BgIkanaBlock* this, PlayState* play) {
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
}
player->stateFlags2 &= ~0x10;
player->stateFlags2 &= ~PLAYER_STATE2_10;
this->dyna.pushForce = 0.0f;
if (func_80B7EDC4(this, play)) {
@@ -226,7 +226,8 @@ void BgIkninSusceil_Update(Actor* thisx, PlayState* play) {
BgIkninSusceil* this = THIS;
Player* player = GET_PLAYER(play);
if ((this->unk168 == 0) && (this->unk166 > 0) && (player->stateFlags3 & 0x100) && (player->unk_B48 > 1000.0f)) {
if ((this->unk168 == 0) && (this->unk166 > 0) && (player->stateFlags3 & PLAYER_STATE3_100) &&
(player->unk_B48 > 1000.0f)) {
this->unk168 = 2;
if ((func_80C0A95C(this, play) != 0) && (this->actionFunc != func_80C0AE5C)) {
func_800B8E58(player, NA_SE_PL_BODY_HIT);
@@ -242,7 +243,7 @@ void BgIkninSusceil_Update(Actor* thisx, PlayState* play) {
if ((this->dyna.actor.home.pos.y + 70.0f) < this->dyna.actor.world.pos.y) {
this->unk166 = 0;
} else if (player->stateFlags3 & 0x100) {
} else if (player->stateFlags3 & PLAYER_STATE3_100) {
this->unk166 = 3;
} else {
if (this->unk166 > 0) {
@@ -215,11 +215,11 @@ void func_80953F9C(BgIngate* this, PlayState* play) {
if (ActorCutscene_GetCurrentIndex() != this->unk16E) {
if (ActorCutscene_GetCurrentIndex() != -1) {
Camera_ChangeSetting(mainCam, CAM_SET_NORMAL0);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
play->actorCtx.flags &= ~ACTORCTX_FLAG_2;
} else {
Camera_ChangeSetting(mainCam, CAM_SET_BOAT_CRUISE);
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
}
}
this->unk16E = ActorCutscene_GetCurrentIndex();
@@ -260,7 +260,7 @@ void func_80B700C0(BgKin2Shelf* this, PlayState* play) {
} else {
Player* player = GET_PLAYER(play);
player->stateFlags2 &= ~0x10;
player->stateFlags2 &= ~PLAYER_STATE2_10;
this->dyna.pushForce = 0.0f;
}
} else {
@@ -292,7 +292,7 @@ void func_80B70230(BgKin2Shelf* this, PlayState* play) {
Player* player = GET_PLAYER(play);
this->unk_160 = 1.0f;
player->stateFlags2 &= ~0x10;
player->stateFlags2 &= ~PLAYER_STATE2_10;
this->dyna.pushForce = 0.0f;
if (this->unk_164 & 8) {
@@ -339,7 +339,7 @@ void func_80B704B4(BgKin2Shelf* this, PlayState* play) {
Player* player = GET_PLAYER(play);
this->unk_160 = 1.0f;
player->stateFlags2 &= ~0x10;
player->stateFlags2 &= ~PLAYER_STATE2_10;
this->dyna.pushForce = 0.0f;
if (this->unk_164 & 4) {
@@ -311,7 +311,7 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) {
this->unk_164 = temp_f12;
this->unk_162 = 12;
if (sp3A > 50) {
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
this->unk_161 = 1;
}
} else if (player->actor.speedXZ != 0.0f) {
@@ -332,7 +332,7 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) {
player->actor.velocity.y = this->unk_164 * 0.7f;
player->unk_B68 = (SQ(this->unk_164) * 0.15f) + this->dyna.actor.world.pos.y;
this->unk_161 = 0;
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
}
} else if (this->unk_162 == 11) {
if (this->unk_164 > 3.0f) {
@@ -67,7 +67,8 @@ void BgTobira01_Open(BgTobira01* this, PlayState* play) {
this->timer2 = 180;
}
if (!(player->stateFlags1 & 0x40) && (gSaveContext.save.weekEventReg[88] & 0x40) && (DECR(this->timer2) == 0)) {
if (!(player->stateFlags1 & PLAYER_STATE1_40) && (gSaveContext.save.weekEventReg[88] & 0x40) &&
(DECR(this->timer2) == 0)) {
gSaveContext.save.weekEventReg[88] &= (u8)~0x40;
}
}
+2 -2
View File
@@ -1632,7 +1632,7 @@ void func_809DD934(Boss02* this, PlayState* play) {
switch (this->unk_1D18) {
case 0:
if (player->stateFlags1 & 0x100) {
if (player->stateFlags1 & PLAYER_STATE1_100) {
Cutscene_Start(play, &play->csCtx);
this->subCamId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
@@ -1755,7 +1755,7 @@ void func_809DD934(Boss02* this, PlayState* play) {
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_End(play, &play->csCtx);
this->actor.flags |= ACTOR_FLAG_1;
player->stateFlags1 &= ~0x100;
player->stateFlags1 &= ~PLAYER_STATE1_100;
this->unk_1D70 = 0.01f;
func_80165690();
break;
+1 -1
View File
@@ -252,7 +252,7 @@ void func_809EC568(Boss04* this, PlayState* play) {
case 0:
this->unk_2C8 = 50;
this->unk_2D0 = 2000.0f;
if ((player->stateFlags1 & 0x100000) && (this->actor.projectedPos.z > 0.0f) &&
if ((player->stateFlags1 & PLAYER_STATE1_100000) && (this->actor.projectedPos.z > 0.0f) &&
(fabsf(this->actor.projectedPos.x) < 300.0f) && (fabsf(this->actor.projectedPos.y) < 300.0f)) {
if ((this->unk_704 >= 15) && (ActorCutscene_GetCurrentIndex() == -1)) {
Actor* boss;
+6 -7
View File
@@ -4,7 +4,6 @@
* Description: Igos du Ikana window - curtains and ray effects
*/
#include "prevent_bss_reordering.h"
#include "z_boss_06.h"
#include "z64shrink_window.h"
#include "overlays/actors/ovl_En_Knight/z_en_knight.h"
@@ -29,11 +28,11 @@ void func_809F2E34(Boss06* this, PlayState* play);
void func_809F2ED0(Boss06* this, PlayState* play);
void func_809F2EE8(Boss06* this, PlayState* play);
static Vec3f D_809F4370[128];
static EnKnight* D_809F4970;
static s32 D_809F4974;
static s32 D_809F4978;
static s32 D_809F497C;
Vec3f D_809F4370[128];
EnKnight* D_809F4970;
s32 D_809F4974;
s32 D_809F4978;
s32 D_809F497C;
static DamageTable sDamageTable = {
/* Deku Nut */ DMG_ENTRY(0, 0xF),
@@ -102,7 +101,7 @@ static ColliderCylinderInit sCylinderInit = {
{ 90, 140, 10, { 0, 0, 0 } },
};
static Vec3f D_809F40EC[] = {
Vec3f D_809F40EC[] = {
{ 1081.0f, 235.0f, 3224.0f },
{ 676.0f, 235.0f, 3224.0f },
};
@@ -164,7 +164,7 @@ void func_80AA8698(DmChar01* this, PlayState* play) {
return;
}
if ((player->stateFlags2 & 0x8000000) && (player2->actor.world.pos.x > -40.0f) &&
if ((player->stateFlags2 & PLAYER_STATE2_8000000) && (player2->actor.world.pos.x > -40.0f) &&
(player2->actor.world.pos.x < 40.0f) && (player2->actor.world.pos.z > 1000.0f) &&
(player2->actor.world.pos.z < 1078.0f)) {
if (!D_80AAAAB4) {
+2 -2
View File
@@ -1272,7 +1272,7 @@ void DmStk_ClockTower_DeflectHit(DmStk* this, PlayState* play) {
this->deflectCount++;
if (this->deflectCount >= 3) {
this->deflectCount = 0;
if (!(player->stateFlags2 & 0x8000000)) {
if (!(player->stateFlags2 & PLAYER_STATE2_8000000)) {
// That won't do you any good
Message_StartTextbox(play, 0x2013, &this->actor);
}
@@ -1720,7 +1720,7 @@ void DmStk_ClockTower_IdleWithOcarina(DmStk* this, PlayState* play) {
this->tatlMessageTimer++;
if (this->tatlMessageTimer > 800) {
this->tatlMessageTimer = 0;
if (!(player->stateFlags2 & 0x8000000)) {
if (!(player->stateFlags2 & PLAYER_STATE2_8000000)) {
// Why are you just standing around?
Message_StartTextbox(play, 0x2014, &this->actor);
}
@@ -131,7 +131,8 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
if (Math_StepToF(&this->actor.scale.x, 0.01f, 0.001f)) {
if ((this->actor.targetMode != 0) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
(play->transitionMode == TRANS_MODE_OFF) && (player->stateFlags1 & 0x80000000) && (player->unk_AE7 == 0)) {
(play->transitionMode == TRANS_MODE_OFF) && (player->stateFlags1 & PLAYER_STATE1_80000000) &&
(player->unk_AE7 == 0)) {
if (grottoType == DOORANA_TYPE_VISIBLE_SCENE_EXIT) {
s32 exitIndex = DOORANA_GET_EXIT_INDEX(&this->actor);
@@ -157,10 +158,10 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
DoorAna_SetupAction(this, DoorAna_GrabLink);
} else if (!Play_InCsMode(play) && !(player->stateFlags1 & 0x08800000) &&
} else if (!Play_InCsMode(play) && !(player->stateFlags1 & (PLAYER_STATE1_8000000 | PLAYER_STATE1_800000)) &&
(this->actor.xzDistToPlayer <= 20.0f) && (this->actor.playerHeightRel >= -50.0f) &&
(this->actor.playerHeightRel <= 15.0f)) {
player->stateFlags1 |= 0x80000000;
player->stateFlags1 |= PLAYER_STATE1_80000000;
this->actor.targetMode = 1;
} else {
@@ -566,7 +566,7 @@ void func_808A1884(DoorShutter* this, PlayState* play) {
this->unk_15C = 0;
this->actor.velocity.y = 0.0f;
if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & 0x800)) {
if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & PLAYER_STATE1_800)) {
DoorShutter_SetupAction(this, func_808A1C50);
if (ActorCutscene_GetCurrentIndex() == 0x7D) {
func_801226E0(play, ((void)0, gSaveContext.respawn[RESPAWN_MODE_DOWN].data));
@@ -633,7 +633,8 @@ void DoorShutter_Update(Actor* thisx, PlayState* play) {
DoorShutter* this = THIS;
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & 0x100004C0) || (this->actionFunc == DoorShutter_SetupType)) {
if (!(player->stateFlags1 & (PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_400 | PLAYER_STATE1_10000000)) ||
(this->actionFunc == DoorShutter_SetupType)) {
this->actionFunc(this, play);
if (this->unk_163 == 7) {
@@ -290,7 +290,7 @@ void DoorSpiral_Wait(DoorSpiral* this, PlayState* play) {
void DoorSpiral_PlayerClimb(DoorSpiral* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & 0x20000000)) {
if (!(player->stateFlags1 & PLAYER_STATE1_20000000)) {
DoorSpiral_SetupAction(this, DoorSpiral_WaitForObject);
this->shouldClimb = 0;
}
@@ -301,7 +301,8 @@ void DoorSpiral_Update(Actor* thisx, PlayState* play) {
s32 pad;
Player* player = GET_PLAYER(play);
if ((!(player->stateFlags1 & 0x100004C0)) || (this->actionFunc == DoorSpiral_WaitForObject)) {
if (!(player->stateFlags1 & (PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_400 | PLAYER_STATE1_10000000)) ||
(this->actionFunc == DoorSpiral_WaitForObject)) {
this->actionFunc(this, play);
}
}
@@ -171,7 +171,7 @@ void func_80919230(EffDust* this, PlayState* play) {
s32 i;
s32 j;
if (parent == NULL || parent->update == NULL || !(player->stateFlags1 & 0x1000)) {
if (parent == NULL || parent->update == NULL || !(player->stateFlags1 & PLAYER_STATE1_1000)) {
if (this->life != 0) {
this->life--;
} else {
@@ -4,6 +4,7 @@
* Description: Wave Created by Turtle Awakening
*/
#include "prevent_bss_reordering.h"
#include "z_eff_kamejima_wave.h"
#include "objects/object_kamejima/object_kamejima.h"
+1 -1
View File
@@ -307,7 +307,7 @@ s32 func_80BD3198(EnAh* this, PlayState* play) {
Player* player = GET_PLAYER(play);
u16 temp = play->msgCtx.currentTextId;
if (player->stateFlags1 & 0x40) {
if (player->stateFlags1 & PLAYER_STATE1_40) {
if (this->unk_2DA != temp) {
if (temp == 0x2954) {
this->unk_18C = func_80BD3118;
+1 -1
View File
@@ -575,7 +575,7 @@ s32 func_80BDF064(EnAl* this, PlayState* play) {
Actor* sp1C = func_80BDE1A0(this, play, 4, 0xA4);
Actor* temp_v0 = func_80BDE1A0(this, play, 4, 0x234);
if (player->stateFlags1 & 0x40) {
if (player->stateFlags1 & PLAYER_STATE1_40) {
this->unk_4C2 |= 0x400;
if (this->unk_4C4 != sp22) {
switch (sp22) {
@@ -489,7 +489,7 @@ void func_809C1EC8(EnAob01* this, PlayState* play) {
func_809C10B0(this, 3);
SubS_FillLimbRotTables(play, this->unk_2F8, this->unk_318, ARRAY_COUNT(this->unk_2F8));
func_809C165C(this, play);
if (player->stateFlags1 & 0x20) {
if (player->stateFlags1 & PLAYER_STATE1_20) {
func_809C1124();
}
}
@@ -876,7 +876,7 @@ void func_809C2F34(EnAob01* this, PlayState* play) {
player->actor.world.pos.z = 1464.0f;
player->actor.shape.rot.y = player->actor.world.rot.y;
player->actor.draw = NULL;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
this->actor.world.pos.x = -4308.0f;
this->actor.world.pos.z = 1620.0f;
this->actor.prevPos = this->actor.world.pos;
@@ -381,7 +381,7 @@ void EnBigokuta_PlayDeathCutscene(EnBigokuta* this, PlayState* play) {
func_800B724C(play, &this->picto.actor, 7);
} else {
player = GET_PLAYER(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
}
if (this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) {
@@ -458,7 +458,7 @@ void EnBigokuta_PlayDeathEffects(EnBigokuta* this, PlayState* play) {
} else {
Player* player = GET_PLAYER(play);
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
}
}
@@ -728,7 +728,7 @@ void EnBigslime_SetMinislimeBreakLocation(EnBigslime* this) {
void EnBigslime_SetPlayerParams(EnBigslime* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (player->stateFlags2 & 0x80) {
if (player->stateFlags2 & PLAYER_STATE2_80) {
player->actor.parent = NULL;
player->unk_AE8 = 100;
func_800B8D98(play, &this->actor, 10.0f, this->actor.world.rot.y, 10.0f);
@@ -1709,7 +1709,7 @@ void EnBigslime_WindupThrowPlayer(EnBigslime* this, PlayState* play) {
scale = 0.5f - cos_rad(-this->windupPunchTimer * (M_PI / 5)) * 0.5f;
if (this->windupPunchTimer == -5) {
if (player->stateFlags2 & 0x80) {
if (player->stateFlags2 & PLAYER_STATE2_80) {
player->actor.parent = NULL;
player->unk_AE8 = 100;
}
+1 -1
View File
@@ -433,7 +433,7 @@ void EnBom_Update(Actor* thisx, PlayState* play) {
s32 pad;
Player* player = GET_PLAYER(play);
if (player->stateFlags1 & 2) {
if (player->stateFlags1 & PLAYER_STATE1_2) {
return;
}
@@ -163,7 +163,7 @@ void func_808AEAE0(EnBombf* this, PlayState* play) {
player->heldActor = NULL;
player->interactRangeActor = NULL;
this->actor.parent = NULL;
player->stateFlags1 &= ~0x800;
player->stateFlags1 &= ~PLAYER_STATE1_800;
}
} else if ((this->colliderCylinder.base.acFlags & AC_HIT) &&
((this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & 0x13828) ||
@@ -200,7 +200,7 @@ void func_808AEAE0(EnBombf* this, PlayState* play) {
player->heldActor = NULL;
player->interactRangeActor = NULL;
this->actor.parent = NULL;
player->stateFlags1 &= ~0x800;
player->stateFlags1 &= ~PLAYER_STATE1_800;
this->actor.world.pos = this->actor.home.pos;
}
}
@@ -217,7 +217,7 @@ void func_808AEAE0(EnBombf* this, PlayState* play) {
player->heldActor = NULL;
player->interactRangeActor = NULL;
this->actor.parent = NULL;
player->stateFlags1 &= ~0x800;
player->stateFlags1 &= ~PLAYER_STATE1_800;
this->actor.world.pos = this->actor.home.pos;
}
}
@@ -299,11 +299,11 @@ void func_808AEFD4(EnBombf* this, PlayState* play) {
if (this->timer == 0) {
Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & 0x800) && (&this->actor == player->heldActor)) {
if ((player->stateFlags1 & PLAYER_STATE1_800) && (&this->actor == player->heldActor)) {
player->actor.child = NULL;
player->heldActor = NULL;
player->interactRangeActor = NULL;
player->stateFlags1 &= ~0x800;
player->stateFlags1 &= ~PLAYER_STATE1_800;
}
Actor_Kill(&this->actor);
}
@@ -471,7 +471,7 @@ void func_80BFF03C(EnBomjima* this, PlayState* play) {
} else if (!ActorCutscene_GetCanPlayNext(this->cutscenes[0])) {
ActorCutscene_SetIntentToPlay(this->cutscenes[0]);
} else {
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
gSaveContext.save.weekEventReg[83] &= (u8)~4;
this->actor.world.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play));
this->unk_2DC = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play));
@@ -935,8 +935,8 @@ void func_80C00284(EnBomjima* this, PlayState* play) {
if ((this->action == EN_BOMJIMA_ACTION_4) || (this->unk_2CA == 1) ||
((this->unk_2CA == 3) && (this->unk_2C8 >= 2))) {
this->unk_28E = 0;
if (player->stateFlags1 & 0x20) {
player->stateFlags1 &= ~0x20;
if (player->stateFlags1 & PLAYER_STATE1_20) {
player->stateFlags1 &= ~PLAYER_STATE1_20;
}
if ((this->bombal == 0) || (this->bombal->actor.update == NULL) ||
@@ -333,7 +333,7 @@ void func_80C014E4(EnBomjimb* this, PlayState* play) {
break;
}
if (player->stateFlags3 != 0x1000000) {
if (player->stateFlags3 != PLAYER_STATE3_1000000) {
phi_f0 = 200.0f;
abs = ABS_ALT(BINANG_SUB(this->actor.yawTowardsPlayer, this->actor.world.rot.y));
@@ -538,7 +538,7 @@ void func_80C0217C(EnBomjimb* this, PlayState* play) {
return;
}
if (player->stateFlags3 == 0x1000000) {
if (player->stateFlags3 == PLAYER_STATE3_1000000) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 3000, 0);
func_80C01494(this);
return;
@@ -631,7 +631,7 @@ void func_80C02570(EnBomjimb* this, PlayState* play) {
this->unk_2D6 = BINANG_ROT180(this->actor.yawTowardsPlayer);
func_80C0113C(this, 19, 2.0f);
this->actionFunc = func_80C0217C;
} else if ((player->stateFlags3 == 0x1000000) || (this->actor.xzDistToPlayer > 410.0f)) {
} else if ((player->stateFlags3 == PLAYER_STATE3_1000000) || (this->actor.xzDistToPlayer > 410.0f)) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 3000, 0);
func_80C01494(this);
}
@@ -666,7 +666,7 @@ void func_80C02740(EnBomjimb* this, PlayState* play) {
if ((player->transformation != PLAYER_FORM_DEKU) && (player->transformation != PLAYER_FORM_HUMAN)) {
func_80C0113C(this, 17, 1.0f);
Message_StartTextbox(play, 0x72E, &this->actor);
player->stateFlags1 |= 0x10000000;
player->stateFlags1 |= PLAYER_STATE1_10000000;
player->actor.freezeTimer = 3;
func_80C012E0(this);
this->unk_2CA = 9;
@@ -678,7 +678,7 @@ void func_80C02740(EnBomjimb* this, PlayState* play) {
((player->transformation == PLAYER_FORM_HUMAN) && !(gSaveContext.save.weekEventReg[85] & 2))) {
func_80C0113C(this, 17, 1.0f);
Message_StartTextbox(play, 0x72E, &this->actor);
player->stateFlags1 |= 0x10000000;
player->stateFlags1 |= PLAYER_STATE1_10000000;
player->actor.freezeTimer = 3;
func_80C012E0(this);
this->unk_2CA = 9;
@@ -726,7 +726,7 @@ void func_80C02740(EnBomjimb* this, PlayState* play) {
if (!Play_InCsMode(play)) {
Player* player = GET_PLAYER(play);
player->stateFlags1 |= 0x10000000;
player->stateFlags1 |= PLAYER_STATE1_10000000;
player->actor.freezeTimer = 3;
}
this->unk_2CA = 8;
@@ -765,7 +765,7 @@ void func_80C02A14(EnBomjimb* this, PlayState* play) {
func_80C02CA4(this, play);
} else {
if (this->unk_2CA == 8) {
player->stateFlags1 &= ~0x10000000;
player->stateFlags1 &= ~PLAYER_STATE1_10000000;
}
func_80C01FD4(this);
}
@@ -781,7 +781,7 @@ void func_80C02BCC(EnBomjimb* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
func_801477B4(play);
this->unk_2C0 = 1;
player->stateFlags1 &= ~0x10000000;
player->stateFlags1 &= ~PLAYER_STATE1_10000000;
}
} else if (this->actor.xzDistToPlayer > 200.0f) {
func_80C01494(this);
+3 -3
View File
@@ -155,10 +155,10 @@ void EnBoom_Destroy(Actor* thisx, PlayState* play) {
temp->child = NULL;
} else {
player->boomerangActor = NULL;
player->stateFlags1 &= ~0x2000000;
player->stateFlags1 &= ~PLAYER_STATE1_2000000;
}
}
player->stateFlags3 |= 0x800000;
player->stateFlags3 |= PLAYER_STATE3_800000;
}
}
@@ -286,7 +286,7 @@ void EnBoom_Update(Actor* thisx, PlayState* play) {
Player* player = GET_PLAYER(play);
Actor* actor;
if (!(player->stateFlags1 & 0x20000000)) {
if (!(player->stateFlags1 & PLAYER_STATE1_20000000)) {
this->actionFunc(this, play);
if (((actor = this->actor.child) != NULL) || ((actor = this->actor.parent) != NULL)) {
+2 -2
View File
@@ -415,7 +415,7 @@ void func_80B3EEDC(EnDai* this, PlayState* play) {
(play->msgCtx.lastPlayedSong == OCARINA_SONG_GORON_LULLABY)) {
func_80B3E5DC(this, 1);
this->actionFunc = func_80B3EE8C;
} else if (!(player->stateFlags2 & 0x08000000)) {
} else if (!(player->stateFlags2 & PLAYER_STATE2_8000000)) {
func_80B3E96C(this, play);
this->unk_A6C = 0;
} else if (this->unk_A6C == 0) {
@@ -557,7 +557,7 @@ void EnDai_Update(Actor* thisx, PlayState* play) {
func_80B3E460(this);
} else {
this->actionFunc(this, play);
if (!(player->stateFlags2 & 0x8000000)) {
if (!(player->stateFlags2 & PLAYER_STATE2_8000000)) {
SkelAnime_Update(&this->skelAnime);
func_80B3E834(this);
if (!(this->unk_1CE & 0x200)) {
+4 -4
View File
@@ -547,7 +547,7 @@ s32 EnDg_FindFollowerForBremenMask(PlayState* play) {
void EnDg_CheckForBremenMaskMarch(EnDg* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (player->stateFlags3 & 0x20000000) { // bremen mask march
if (player->stateFlags3 & PLAYER_STATE3_20000000) {
if (sBremenMaskFollowerIndex == ENDG_INDEX_NO_BREMEN_MASK_FOLLOWER) {
EnDg_FindFollowerForBremenMask(play);
}
@@ -865,7 +865,7 @@ void EnDg_SitNextToPlayer(EnDg* this, PlayState* play) {
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xC00);
this->actor.world.rot.y = this->actor.shape.rot.y;
} else {
if (player->stateFlags3 & 0x20000000) { // bremen mask march
if (player->stateFlags3 & PLAYER_STATE3_20000000) {
EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK);
} else {
EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN);
@@ -992,7 +992,7 @@ void EnDg_ApproachPlayer(EnDg* this, PlayState* play) {
if (this->actor.xzDistToPlayer < 40.0f) {
EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_SIT_DOWN);
this->actionFunc = EnDg_SitNextToPlayer;
} else if (player->stateFlags3 & 0x20000000) { // bremen mask march
} else if (player->stateFlags3 & PLAYER_STATE3_20000000) {
if ((this->actor.xzDistToPlayer > 40.0f) && (player->linearVelocity == 0.0f)) {
Math_ApproachF(&this->actor.speedXZ, 1.5f, 0.2f, 1.0f);
} else {
@@ -1340,7 +1340,7 @@ void EnDg_Update(Actor* thisx, PlayState* play) {
Vec3f floorRot = { 0.0f, 0.0f, 0.0f };
this->selectedDogIndex = sSelectedRacetrackDogInfo.index;
if (!(player->stateFlags1 & 0x20) || (play->sceneId != SCENE_CLOCKTOWER)) {
if (!(player->stateFlags1 & PLAYER_STATE1_20) || (play->sceneId != SCENE_CLOCKTOWER)) {
if (EnDg_ShouldReactToNonHumanPlayer(this, play)) {
EnDg_ChooseActionForForm(this, play);
} else if (this->behavior != DOG_BEHAVIOR_DEFAULT) {
+1 -1
View File
@@ -260,7 +260,7 @@ s32 func_80A52B68(EnDnq* this, PlayState* play) {
Player* player = GET_PLAYER(play);
u16 temp = play->msgCtx.currentTextId;
if ((player->stateFlags1 & 0x40) && (player->targetActor == &this->picto.actor)) {
if ((player->stateFlags1 & PLAYER_STATE1_40) && (player->targetActor == &this->picto.actor)) {
switch (temp) {
case 0x89B:
func_80A5257C(this, 18);
+1 -1
View File
@@ -398,7 +398,7 @@ void func_8092D1B8(EnDns* this, PlayState* play) {
if (!ENDNS_GET_4000(&this->actor) || (this->unk_2D2 != 0)) {
if (!(gSaveContext.save.weekEventReg[23] & 0x20) && !(gSaveContext.eventInf[1] & 0x20) && func_8092CC68(play)) {
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
this->unk_2C6 |= 0x100;
SubS_UpdateFlags(&this->unk_2C6, 4, 7);
play_sound(NA_SE_SY_FOUND);
@@ -587,7 +587,7 @@ void func_80877500(EnDodongo* this, PlayState* play) {
Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 0x1F4);
if (this->actor.xzDistToPlayer < (100.0f * this->unk_334)) {
if ((ABS_ALT(temp_v1) < 0x1388) && (this->actor.playerHeightRel < 60.0f) &&
!(player->stateFlags1 & 0x800000)) {
!(player->stateFlags1 & PLAYER_STATE1_800000)) {
func_808777A8(this);
}
}
@@ -823,7 +823,7 @@ void func_80878424(EnDodongo* this, PlayState* play) {
this->timer++;
if (SkelAnime_Update(&this->skelAnime)) {
if (!(player->stateFlags1 & 0x800000) && (Player_GetMask(play) != PLAYER_MASK_STONE)) {
if (!(player->stateFlags1 & PLAYER_STATE1_800000) && (Player_GetMask(play) != PLAYER_MASK_STONE)) {
this->collider1.base.atFlags &= ~AT_ON;
func_808777A8(this);
} else {
+1 -1
View File
@@ -480,7 +480,7 @@ void func_80866B20(EnDoor* this, PlayState* play) {
if (this->unk_1A1 != 0) {
this->actionFunc = func_80867144;
Animation_PlayOnceSetSpeed(&this->skelAnime, sAnimations[this->animIndex],
(player->stateFlags1 & 0x8000000) ? 0.75f : 1.5f);
(player->stateFlags1 & PLAYER_STATE1_8000000) ? 0.75f : 1.5f);
if (this->unk_1A6 != 0) {
gSaveContext.save.inventory.dungeonKeys[gSaveContext.mapIndex]--;
Flags_SetSwitch(play, this->switchFlag);
@@ -612,13 +612,13 @@ void EnDragon_Attack(EnDragon* this, PlayState* play) {
}
if (((this->state != DEEP_PYTHON_ATTACK_STATE_START) && (this->endFrame <= currentFrame)) ||
(!(player->stateFlags2 & 0x80)) || ((this->collider.elements[0].info.bumperFlags & BUMP_HIT)) ||
(!(player->stateFlags2 & PLAYER_STATE2_80)) || ((this->collider.elements[0].info.bumperFlags & BUMP_HIT)) ||
(this->collider.elements[1].info.bumperFlags & BUMP_HIT) ||
(this->collider.elements[2].info.bumperFlags & BUMP_HIT)) {
player->actor.parent = NULL;
this->grabWaitTimer = 30;
ActorCutscene_Stop(this->grabCutsceneIndex);
if (player->stateFlags2 & 0x80) {
if (player->stateFlags2 & PLAYER_STATE2_80) {
player->unk_AE8 = 100;
}
+14 -14
View File
@@ -844,13 +844,13 @@ void func_8088E60C(EnElf* this, PlayState* play) {
s16 glowLightRadius;
Player* player = GET_PLAYER(play);
if (player->stateFlags1 & 0x400) {
if (player->stateFlags1 & PLAYER_STATE1_400) {
glowLightRadius = 200;
} else {
glowLightRadius = 100;
}
if ((this->unk_244 == 6) || (player->stateFlags1 & 2) || (this->fairyFlags & 0x8000)) {
if ((this->unk_244 == 6) || (player->stateFlags1 & PLAYER_STATE1_2) || (this->fairyFlags & 0x8000)) {
glowLightRadius = 0;
}
@@ -967,7 +967,7 @@ void func_8088E850(EnElf* this, PlayState* play) {
default:
arrowPointedActor = play->actorCtx.targetContext.arrowPointedActor;
if ((player->stateFlags1 & 0x40) && (player->targetActor != NULL)) {
if ((player->stateFlags1 & PLAYER_STATE1_40) && (player->targetActor != NULL)) {
Math_Vec3f_Copy(&nextPos, &player->targetActor->focus.pos);
} else {
Math_Vec3f_Copy(&nextPos, &play->actorCtx.targetContext.unk0);
@@ -1133,13 +1133,13 @@ void func_8088F214(EnElf* this, PlayState* play) {
func_800B9010(&this->actor, NA_SE_EV_BELL_ANGER - SFX_FLAG);
} else {
arrowPointedActor = play->actorCtx.targetContext.arrowPointedActor;
if (player->stateFlags1 & 0x400) {
if (player->stateFlags1 & PLAYER_STATE1_400) {
sp34 = 10;
this->unk_25C = 100;
} else if ((arrowPointedActor == NULL) || (arrowPointedActor->category == 4)) {
if (arrowPointedActor != NULL) {
this->unk_25C = 100;
player->stateFlags2 |= 0x100000;
player->stateFlags2 |= PLAYER_STATE2_100000;
sp34 = 0;
} else {
switch (this->unk_244) {
@@ -1147,7 +1147,7 @@ void func_8088F214(EnElf* this, PlayState* play) {
if (this->unk_25C != 0) {
this->unk_25C--;
sp34 = 0;
} else if (!(player->stateFlags1 & 0x40)) {
} else if (!(player->stateFlags1 & PLAYER_STATE1_40)) {
if (this->unk_269 == 0) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_NAVY_VANISH);
}
@@ -1163,7 +1163,7 @@ void func_8088F214(EnElf* this, PlayState* play) {
this->unk_24A--;
sp34 = 5;
} else {
player->stateFlags2 |= 0x100000;
player->stateFlags2 |= PLAYER_STATE2_100000;
sp34 = 0;
}
} else {
@@ -1195,7 +1195,7 @@ void func_8088F214(EnElf* this, PlayState* play) {
switch (sp34) {
case 0:
if (!(player->stateFlags2 & 0x100000)) {
if (!(player->stateFlags2 & PLAYER_STATE2_100000)) {
sp34 = 5;
if (this->unk_269 == 0) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_NAVY_VANISH);
@@ -1204,25 +1204,25 @@ void func_8088F214(EnElf* this, PlayState* play) {
break;
case 6:
if (player->stateFlags2 & 0x100000) {
if (player->stateFlags2 & PLAYER_STATE2_100000) {
sp34 = 9;
this->unk_25C = 0x2A;
if (this->unk_269 == 0) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BELL_DASH_NORMAL);
}
} else if (player->stateFlags1 & 0x40) {
player->stateFlags2 |= 0x100000;
} else if (player->stateFlags1 & PLAYER_STATE1_40) {
player->stateFlags2 |= PLAYER_STATE2_100000;
sp34 = 0;
this->unk_25C = 0;
}
break;
case 5:
player->stateFlags2 &= ~0x100000;
player->stateFlags2 &= ~PLAYER_STATE2_100000;
break;
default:
player->stateFlags2 |= 0x100000;
player->stateFlags2 |= PLAYER_STATE2_100000;
break;
}
}
@@ -1578,7 +1578,7 @@ void EnElf_Draw(Actor* thisx, PlayState* play) {
if (!(this->fairyFlags & 8) &&
(!Cutscene_CheckActorAction(play, 201) ||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 201)]->action != 6)) &&
(!(player->stateFlags1 & 0x100000) || (kREG(90) < this->actor.projectedPos.z))) {
(!(player->stateFlags1 & PLAYER_STATE1_100000) || (kREG(90) < this->actor.projectedPos.z))) {
Gfx* dListHead = GRAPH_ALLOC(play->state.gfxCtx, sizeof(Gfx) * 4);
f32 alphaScale;
s32 envAlpha;
@@ -483,11 +483,11 @@ void func_80A3A610(EnElfgrp* this, PlayState* play) {
if (this->unk_144 > 0) {
player->actor.freezeTimer = 100;
player->stateFlags1 |= 0x20000000;
player->stateFlags1 |= PLAYER_STATE1_20000000;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FAIRY_GROUP_HEAL - SFX_FLAG);
} else {
player->actor.freezeTimer = 0;
player->stateFlags1 &= ~0x20000000;
player->stateFlags1 &= ~PLAYER_STATE1_20000000;
this->actionFunc = func_80A3A600;
this->unk_14A |= 8;
}
@@ -499,7 +499,7 @@ void func_80A3A6F4(EnElfgrp* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
player->actor.freezeTimer = 100;
player->stateFlags1 |= 0x20000000;
player->stateFlags1 |= PLAYER_STATE1_20000000;
this->unk_144 = func_80A39FBC(play);
this->actionFunc = func_80A3A610;
this->unk_14A &= ~8;
@@ -510,7 +510,7 @@ void func_80A3A77C(EnElfgrp* this, PlayState* play) {
Player* player = GET_PLAYER(play);
player->actor.freezeTimer = 100;
player->stateFlags1 |= 0x20000000;
player->stateFlags1 |= PLAYER_STATE1_20000000;
if (Actor_TextboxIsClosing(&this->actor, play)) {
this->unk_144 = func_80A39FBC(play);
this->actionFunc = func_80A3A610;
@@ -558,7 +558,7 @@ void func_80A3A8F8(EnElfgrp* this, PlayState* play) {
if (gSaveContext.save.playerForm == PLAYER_FORM_DEKU) {
this->actor.flags &= ~ACTOR_FLAG_10000;
player->actor.freezeTimer = 100;
player->stateFlags1 |= 0x20000000;
player->stateFlags1 |= PLAYER_STATE1_20000000;
Message_StartTextbox(play, this->actor.textId, &this->actor);
this->actionFunc = func_80A3A77C;
gSaveContext.save.weekEventReg[9] |= this->unk_146;
@@ -425,10 +425,10 @@ void EnElforg_ClockTownFairyCollected(EnElforg* this, PlayState* play) {
EnElforg_CirclePlayer(this, play);
player->actor.freezeTimer = 100;
player->stateFlags1 |= 0x20000000;
player->stateFlags1 |= PLAYER_STATE1_20000000;
if (Actor_TextboxIsClosing(&this->actor, play)) {
player->actor.freezeTimer = 0;
player->stateFlags1 &= ~0x20000000;
player->stateFlags1 &= ~PLAYER_STATE1_20000000;
Actor_Kill(&this->actor);
gSaveContext.save.weekEventReg[8] |= 0x80;
ActorCutscene_Stop(0x7C);
@@ -481,7 +481,7 @@ void EnElforg_FreeFloating(EnElforg* this, PlayState* play) {
if (STRAY_FAIRY_TYPE(&this->actor) == STRAY_FAIRY_TYPE_CLOCK_TOWN) {
player->actor.freezeTimer = 100;
player->stateFlags1 |= 0x20000000;
player->stateFlags1 |= PLAYER_STATE1_20000000;
// Bring me back to North Clock Town!
Message_StartTextbox(play, 0x579, NULL);
this->actionFunc = EnElforg_ClockTownFairyCollected;
@@ -2151,7 +2151,7 @@ void EnFishing_UpdateLure(EnFishing* this, PlayState* play) {
Math_ApproachF(&D_809101C0, 195.0f, 1.0f, 1.0f);
if (player->stateFlags1 & 0x8000000) {
if (player->stateFlags1 & PLAYER_STATE1_8000000) {
D_80917204 = 0;
player->unk_B28 = 0;
}
@@ -745,7 +745,7 @@ void func_808D22C8(EnFloormas* this, PlayState* play) {
Math_Vec3f_Sum(&player->actor.world.pos, &this->actor.home.pos, &this->actor.world.pos);
if (!(player->stateFlags2 & 0x80) || (player->invincibilityTimer < 0)) {
if (!(player->stateFlags2 & PLAYER_STATE2_80) || (player->invincibilityTimer < 0)) {
EnFloormas* parent = (EnFloormas*)this->actor.parent;
EnFloormas* child = (EnFloormas*)this->actor.child;
+12 -12
View File
@@ -410,7 +410,7 @@ void func_80962340(EnFu* this, PlayState* play) {
this->unk_552 = 0x2889;
}
this->actor.flags &= ~ACTOR_FLAG_10000;
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
this->unk_54A = 1;
} else {
Message_StartTextbox(play, 0x283C, &this->actor);
@@ -535,7 +535,7 @@ void func_80962660(EnFu* this, PlayState* play) {
gSaveContext.save.weekEventReg[63] |= 1;
gSaveContext.save.weekEventReg[63] &= (u8)~2;
func_801477B4(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
this->unk_53C = 0;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3);
func_801A2BB8(NA_BGM_TIMED_MINI_GAME);
@@ -644,7 +644,7 @@ void func_80962A10(EnFu* this, PlayState* play) {
}
play_sound(NA_SE_SY_FOUND);
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
Interface_StartTimer(TIMER_ID_MINIGAME_2, 60);
if (this->unk_546 == 1) {
func_809616E0(this, play);
@@ -680,8 +680,8 @@ void func_80962BCC(EnFu* this, PlayState* play) {
}
play_sound(NA_SE_SY_FOUND);
player->stateFlags1 &= ~0x20;
player->stateFlags3 |= 0x400000;
player->stateFlags1 &= ~PLAYER_STATE1_20;
player->stateFlags3 |= PLAYER_STATE3_400000;
Interface_StartTimer(TIMER_ID_MINIGAME_2, 60);
if (this->unk_546 == 1) {
@@ -711,8 +711,8 @@ void func_80962D60(EnFu* this, PlayState* play) {
}
play_sound(NA_SE_SY_FOUND);
player->stateFlags1 &= ~0x20;
player->stateFlags3 |= 0x400000;
player->stateFlags1 &= ~PLAYER_STATE1_20;
player->stateFlags3 |= PLAYER_STATE3_400000;
Interface_StartTimer(TIMER_ID_MINIGAME_2, 60);
if (this->unk_546 == 1) {
@@ -748,7 +748,7 @@ void func_80962F4C(EnFu* this, PlayState* play) {
switch (this->unk_542) {
case 0:
if (gSaveContext.save.playerForm == PLAYER_FORM_HUMAN) {
player->stateFlags3 |= 0x400;
player->stateFlags3 |= PLAYER_STATE3_400;
}
break;
@@ -778,9 +778,9 @@ void func_80962F4C(EnFu* this, PlayState* play) {
if ((!DynaPolyActor_IsInRidingRotatingState((DynaPolyActor*)this->actor.child) &&
(player->actor.bgCheckFlags & 1)) ||
(gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] <= SECONDS_TO_TIMER(0)) || (this->unk_548 == this->unk_54C)) {
player->stateFlags3 &= ~0x400000;
player->stateFlags3 &= ~PLAYER_STATE3_400000;
func_80961E88(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
if (this->unk_548 < this->unk_54C) {
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] == SECONDS_TO_TIMER(0)) {
Message_StartTextbox(play, 0x2885, &this->actor);
@@ -932,7 +932,7 @@ void func_80963630(EnFu* this, PlayState* play) {
break;
}
}
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
} else {
this->actor.child->freezeTimer = 10;
func_800B85E0(&this->actor, play, 500.0f, PLAYER_AP_MINUS1);
@@ -1174,7 +1174,7 @@ void func_80963F88(EnFu* this, PlayState* play) {
void func_80963FF8(EnFu* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (player->stateFlags1 & 0x100000) {
if (player->stateFlags1 & PLAYER_STATE1_100000) {
play->actorCtx.unk268 = 1;
play->actorCtx.unk_26C.press.button = 0x8000;
} else {
+2 -2
View File
@@ -390,11 +390,11 @@ void func_80B359DC(EnGg* this, PlayState* play) {
if (this->actor.xzDistToPlayer < 200.0f) {
if (this->unk_306 == 0) {
if (player->stateFlags2 & 0x8000000) {
if (player->stateFlags2 & PLAYER_STATE2_8000000) {
this->unk_306 = 1;
play_sound(NA_SE_SY_TRE_BOX_APPEAR);
}
} else if (!(player->stateFlags2 & 0x8000000)) {
} else if (!(player->stateFlags2 & PLAYER_STATE2_8000000)) {
this->unk_306 = 0;
}
+2 -2
View File
@@ -247,11 +247,11 @@ s32 func_80B50854(EnGk* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!(this->unk_1E4 & 0x40)) {
if (player->stateFlags2 & 0x8000000) {
if (player->stateFlags2 & PLAYER_STATE2_8000000) {
this->unk_1E4 |= 0x40;
play_sound(NA_SE_SY_TRE_BOX_APPEAR);
}
} else if (!(player->stateFlags2 & 0x8000000)) {
} else if (!(player->stateFlags2 & PLAYER_STATE2_8000000)) {
this->unk_1E4 &= ~0x40;
}
+2 -2
View File
@@ -892,7 +892,7 @@ s32 func_8094F53C(EnGm* this, PlayState* play) {
Actor* al = func_8094DEE0(this, play, ACTORCAT_NPC, ACTOR_EN_AL);
Actor* toto = func_8094DEE0(this, play, ACTORCAT_NPC, ACTOR_EN_TOTO);
if (player->stateFlags1 & 0x440) {
if (player->stateFlags1 & (PLAYER_STATE1_40 | PLAYER_STATE1_400)) {
this->unk_3A4 |= 0x400;
if (this->unk_3A6 != sp32) {
switch (sp32) {
@@ -1412,7 +1412,7 @@ s32 func_80950690(EnGm* this, PlayState* play) {
al = func_8094DEE0(this, play, ACTORCAT_NPC, ACTOR_EN_AL);
toto = func_8094DEE0(this, play, ACTORCAT_NPC, ACTOR_EN_TOTO);
if ((al != NULL) && (al->update != NULL) && (toto != NULL) && (toto->update != NULL) &&
!(player->stateFlags1 & 0x40)) {
!(player->stateFlags1 & PLAYER_STATE1_40)) {
if (DECR(this->unk_3B8) == 0) {
if (al == this->unk_268) {
this->unk_268 = toto;
+3 -3
View File
@@ -525,7 +525,7 @@ void func_80A1213C(EnGo* this, PlayState* play) {
s32 func_80A121F4(PlayState* play) {
Player* player = GET_PLAYER(play);
if ((player->transformation == PLAYER_FORM_GORON) && (player->stateFlags3 & 0x2000000)) {
if ((player->transformation == PLAYER_FORM_GORON) && (player->stateFlags3 & PLAYER_STATE3_2000000)) {
return false;
}
return true;
@@ -637,7 +637,7 @@ void func_80A12660(EnGo* this, PlayState* play) {
void func_80A126BC(EnGo* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags2 & 0x4000)) {
if (!(player->stateFlags2 & PLAYER_STATE2_4000)) {
if (this->unk_3C6 != 0) {
this->unk_3C6--;
}
@@ -830,7 +830,7 @@ s32 func_80A12E80(EnGo* this, PlayState* play) {
return false;
}
if (player->stateFlags1 & 0x40) {
if (player->stateFlags1 & PLAYER_STATE1_40) {
if (this->unk_392 != temp) {
switch (temp) {
case 0xE1A:
@@ -1134,7 +1134,7 @@ void func_80941A10(EnGoroiwa* this, PlayState* play) {
s32 pad2;
if (!func_8094156C(this, play)) {
if ((this->collider.base.atFlags & AT_HIT) && !(player->stateFlags3 & 0x80000)) {
if ((this->collider.base.atFlags & AT_HIT) && !(player->stateFlags3 & PLAYER_STATE3_80000)) {
s32 sp34 = this->actor.home.rot.z & 3;
if (sp34 == 2) {
@@ -1264,7 +1264,7 @@ void func_80941FA4(EnGoroiwa* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (func_8094156C(this, play) == 0) {
if ((this->collider.base.atFlags & AT_HIT) && !(player->stateFlags3 & 0x80000)) {
if ((this->collider.base.atFlags & AT_HIT) && !(player->stateFlags3 & PLAYER_STATE3_80000)) {
func_800B8D50(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 0);
func_800B8E58(player, NA_SE_PL_BODY_HIT);
if (((this->actor.home.rot.z & 3) == 1) || ((this->actor.home.rot.z & 3) == 2)) {
@@ -1292,7 +1292,7 @@ void func_809420F0(EnGoroiwa* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (func_8094156C(this, play) == 0) {
if ((this->collider.base.atFlags & AT_HIT) && !(player->stateFlags3 & 0x80000)) {
if ((this->collider.base.atFlags & AT_HIT) && !(player->stateFlags3 & PLAYER_STATE3_80000)) {
func_800B8D50(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 0);
func_800B8E58(player, NA_SE_PL_BODY_HIT);
if (((this->actor.home.rot.z & 3) == 1) || ((this->actor.home.rot.z & 3) == 2)) {
@@ -1434,7 +1434,8 @@ void EnGoroiwa_Update(Actor* thisx, PlayState* play) {
u32 temp_v0_2;
CollisionPoly* tmp;
if (!(player->stateFlags1 & (0x30000000 | 0x80 | 0x40))) {
if (!(player->stateFlags1 &
(PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_10000000 | PLAYER_STATE1_20000000))) {
if (this->unk_1CC > 0) {
this->unk_1CC--;
}
@@ -1515,7 +1516,7 @@ void EnGoroiwa_Update(Actor* thisx, PlayState* play) {
func_8093E938(this);
if ((this->unk_1E5 & 1) && (this->unk_1CC <= 0) &&
(!(player->stateFlags3 & 0x2000000) || (player->transformation != PLAYER_FORM_GORON) ||
(!(player->stateFlags3 & PLAYER_STATE3_2000000) || (player->transformation != PLAYER_FORM_GORON) ||
((params != ENGOROIWA_C000_1) && (params != ENGOROIWA_C000_2)))) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
} else {
@@ -276,7 +276,8 @@ void func_80B22500(EnHakurock* this, PlayState* play) {
(this->collider.base.oc->params == EN_HAKUROCK_TYPE_UNK_2))) {
func_80B21EA4(this, 3);
func_80B21FFC(this);
} else if ((&player->actor == this->collider.base.oc) && ((player->stateFlags3 & 0x81000) != 0) &&
} else if ((&player->actor == this->collider.base.oc) &&
(player->stateFlags3 & (PLAYER_STATE3_1000 | PLAYER_STATE3_80000)) &&
(player->linearVelocity > 8.0f)) {
player->unk_B08[0] = player->linearVelocity = -5.0f;
player->unk_B08[1] += (player->linearVelocity * 0.05f);
+2 -2
View File
@@ -175,7 +175,7 @@ void func_80BCF4AC(EnHg* this, PlayState* play) {
s32 pad;
this->actor.speedXZ = 1.6f;
if (!(player->stateFlags2 & 0x08000000) && Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
if (!(player->stateFlags2 & PLAYER_STATE2_8000000) && Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
if (((this->skelAnime.curFrame > 9.0f) && (this->skelAnime.curFrame < 16.0f)) ||
((this->skelAnime.curFrame > 44.0f) && (this->skelAnime.curFrame < 51.0f))) {
Actor_MoveWithGravity(&this->actor);
@@ -348,7 +348,7 @@ void func_80BCFC0C(EnHg* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (this->actor.colChkInfo.health == 1 && !(fabsf(this->actor.playerHeightRel) >= 80.0f)) {
if (player->stateFlags2 & 0x08000000) {
if (player->stateFlags2 & PLAYER_STATE2_8000000) {
if (!D_80BD00C8) {
play_sound(NA_SE_SY_TRE_BOX_APPEAR);
}
@@ -147,7 +147,7 @@ void func_80BDB2B8(EnHiddenNuts* this, PlayState* play) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NEMURI_SLEEP - SFX_FLAG);
if (player->stateFlags2 & 0x8000000) {
if (player->stateFlags2 & PLAYER_STATE2_8000000) {
if (this->unk_20A == 0) {
play_sound(NA_SE_SY_TRE_BOX_APPEAR);
this->unk_20A = 1;
+1 -1
View File
@@ -310,7 +310,7 @@ void EnHoll_Update(Actor* thisx, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF) &&
!(player->stateFlags1 & 0x200)) {
!(player->stateFlags1 & PLAYER_STATE1_200)) {
this->actionFunc(this, play);
}
}
@@ -169,7 +169,7 @@ s32 func_808F8EB0(EnHorseGameCheck* this, PlayState* play) {
}
D_801BDA9C = 0;
if (player->stateFlags1 & 0x800000) {
if (player->stateFlags1 & PLAYER_STATE1_800000) {
D_801BDAA0 = 1;
}
play->nextEntrance = ENTRANCE(GORMAN_TRACK, 2);
+1 -1
View File
@@ -469,7 +469,7 @@ s32 func_80BF1B40(EnIg* this, PlayState* play) {
u16 temp = play->msgCtx.currentTextId;
s32 pad;
if (player->stateFlags1 & 0xC40) {
if (player->stateFlags1 & (PLAYER_STATE1_40 | PLAYER_STATE1_400 | PLAYER_STATE1_800)) {
this->unk_3D0 |= 0x400;
if (this->unk_3D2 != temp) {
if ((this->unk_3FC == 2) || (this->unk_3FC == 3)) {
@@ -189,7 +189,7 @@ void func_80C13BB8(EnJgameTsn* this, PlayState* play) {
func_800B8614(&this->actor, play, 80.0f);
}
if ((player->actor.bgCheckFlags & 1) && !(player->stateFlags1 & 0x2000) && (this->unk_2FE == 0) &&
if ((player->actor.bgCheckFlags & 1) && !(player->stateFlags1 & PLAYER_STATE1_2000) && (this->unk_2FE == 0) &&
(gSaveContext.save.playerForm == PLAYER_FORM_HUMAN) && func_80C149B0(play, &this->unk_1F8)) {
this->unk_2FE = 1;
func_80C13E6C(this);
@@ -282,7 +282,7 @@ void func_80C14044(EnJgameTsn* this, PlayState* play) {
void func_80C1410C(EnJgameTsn* this, PlayState* play) {
Player* player = GET_PLAYER(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
func_801A2BB8(0x25);
play->interfaceCtx.unk_280 = 1;
func_80112AFC(play);
@@ -296,7 +296,7 @@ void func_80C1418C(EnJgameTsn* this, PlayState* play) {
if (play->interfaceCtx.unk_280 == 8) {
func_80C141DC(this);
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
}
}
@@ -338,7 +338,7 @@ void func_80C14230(EnJgameTsn* this, PlayState* play) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2);
Message_StartTextbox(play, 0x109F, &this->actor);
this->unk_300 = 0x109F;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
*this->unk_208[this->unk_218] &= ~OBJLUPYGAMELIFT_IGNITE_FIRE;
func_801A2C20();
func_80C14030(this);
@@ -346,7 +346,7 @@ void func_80C14230(EnJgameTsn* this, PlayState* play) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2);
Message_StartTextbox(play, 0x10A0, &this->actor);
this->unk_300 = 0x10A0;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
*this->unk_208[this->unk_218] &= ~OBJLUPYGAMELIFT_IGNITE_FIRE;
func_801A2C20();
func_80C14030(this);
@@ -355,7 +355,7 @@ void func_80C14230(EnJgameTsn* this, PlayState* play) {
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] == SECONDS_TO_TIMER(0)) {
Message_StartTextbox(play, 0x10A1, &this->actor);
this->unk_300 = 0x10A1;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
*this->unk_208[this->unk_218] &= ~OBJLUPYGAMELIFT_IGNITE_FIRE;
func_801A2C20();
func_80C14030(this);
@@ -308,12 +308,12 @@ void EnKakasi_TimeSkipDialogue(EnKakasi* this, PlayState* play) {
this->picto.actor.textId = 0x1653;
gSaveContext.save.weekEventReg[83] &= (u8)~1;
this->talkState = TEXT_STATE_5;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
this->picto.actor.flags |= ACTOR_FLAG_10000;
}
if (Actor_ProcessTalkRequest(&this->picto.actor, &play->state)) {
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
this->unkState196 = 2;
this->picto.actor.flags &= ~ACTOR_FLAG_10000;
this->actionFunc = EnKakasi_RegularDialogue;
+3 -3
View File
@@ -197,7 +197,7 @@ void func_80AD70EC(EnKame* this, PlayState* play) {
this->unk_2A0 = 40;
}
if ((Player_GetMask(play) != PLAYER_MASK_STONE) && !(player->stateFlags1 & 0x800000) &&
if ((Player_GetMask(play) != PLAYER_MASK_STONE) && !(player->stateFlags1 & PLAYER_STATE1_800000) &&
(this->actor.xzDistToPlayer < 240.0f)) {
func_80AD73A8(this);
} else if (SkelAnime_Update(&this->skelAnime1)) {
@@ -218,7 +218,7 @@ void func_80AD71B4(EnKame* this) {
void func_80AD7254(EnKame* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((Player_GetMask(play) != PLAYER_MASK_STONE) && !(player->stateFlags1 & 0x800000) &&
if ((Player_GetMask(play) != PLAYER_MASK_STONE) && !(player->stateFlags1 & PLAYER_STATE1_800000) &&
(this->actor.xzDistToPlayer < 240.0f)) {
func_80AD73A8(this);
return;
@@ -257,7 +257,7 @@ void func_80AD7424(EnKame* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (SkelAnime_Update(&this->skelAnime1)) {
if ((Player_GetMask(play) != PLAYER_MASK_STONE) && !(player->stateFlags1 & 0x800000) &&
if ((Player_GetMask(play) != PLAYER_MASK_STONE) && !(player->stateFlags1 & PLAYER_STATE1_800000) &&
((this->unk_29E == 0) || (this->actor.xzDistToPlayer < 120.0f))) {
func_80AD76CC(this);
} else {
@@ -281,7 +281,7 @@ void func_80B269A4(EnKendoJs* this, PlayState* play) {
case 0x2719:
func_801477B4(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
func_80B2701C(this);
break;
@@ -298,7 +298,7 @@ void func_80B269A4(EnKendoJs* this, PlayState* play) {
case 0x273B:
func_801477B4(play);
func_80112AFC(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
func_80B273D0(this);
break;
@@ -337,7 +337,7 @@ void func_80B26AFC(EnKendoJs* this, PlayState* play) {
gSaveContext.minigameState = 3;
}
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
func_80B26538(this);
}
@@ -358,18 +358,18 @@ s32 func_80B26BF8(EnKendoJs* this, PlayState* play) {
return 0;
}
if ((player->meleeWeaponState != 0) || (player->stateFlags3 & 0x8000000) ||
(player->stateFlags2 & 0x80000)) {
if ((player->meleeWeaponState != 0) || (player->stateFlags3 & PLAYER_STATE3_8000000) ||
(player->stateFlags2 & PLAYER_STATE2_80000)) {
return 1;
}
break;
case 1:
if ((player->stateFlags3 & 0x8000000)) {
if ((player->stateFlags3 & PLAYER_STATE3_8000000)) {
return 0;
}
if ((player->meleeWeaponState != 0) || (player->stateFlags2 & 0x80000)) {
if ((player->meleeWeaponState != 0) || (player->stateFlags2 & PLAYER_STATE2_80000)) {
return 1;
}
break;
@@ -379,8 +379,8 @@ s32 func_80B26BF8(EnKendoJs* this, PlayState* play) {
return 0;
}
if ((player->meleeWeaponState != 0) || (player->stateFlags3 & 0x8000000) ||
(player->stateFlags2 & 0x80000)) {
if ((player->meleeWeaponState != 0) || (player->stateFlags3 & PLAYER_STATE3_8000000) ||
(player->stateFlags2 & PLAYER_STATE2_80000)) {
return 1;
}
this->unk_28E = 0;
@@ -393,7 +393,8 @@ s32 func_80B26BF8(EnKendoJs* this, PlayState* play) {
return 0;
}
if ((this->unk_28E == 1) || (player->stateFlags3 & 0x8000000) || (player->stateFlags2 & 0x80000)) {
if ((this->unk_28E == 1) || (player->stateFlags3 & PLAYER_STATE3_8000000) ||
(player->stateFlags2 & PLAYER_STATE2_80000)) {
this->unk_28E = 0;
return 1;
}
@@ -406,7 +407,8 @@ s32 func_80B26BF8(EnKendoJs* this, PlayState* play) {
return 0;
}
if ((this->unk_28E == 1) || (player->stateFlags3 & 0x8000000) || (player->stateFlags2 & 0x80000)) {
if ((this->unk_28E == 1) || (player->stateFlags3 & PLAYER_STATE3_8000000) ||
(player->stateFlags2 & PLAYER_STATE2_80000)) {
this->unk_28E = 0;
return 1;
}
@@ -418,7 +420,8 @@ s32 func_80B26BF8(EnKendoJs* this, PlayState* play) {
return 0;
}
if ((this->unk_28E == 1) || (player->stateFlags3 & 0x8000000) || (player->stateFlags2 & 0x80000)) {
if ((this->unk_28E == 1) || (player->stateFlags3 & PLAYER_STATE3_8000000) ||
(player->stateFlags2 & PLAYER_STATE2_80000)) {
this->unk_28E = 0;
return 1;
}
@@ -431,7 +434,8 @@ s32 func_80B26BF8(EnKendoJs* this, PlayState* play) {
return 0;
}
if ((this->unk_28E == 1) || (player->stateFlags3 & 0x8000000) || (player->stateFlags2 & 0x80000)) {
if ((this->unk_28E == 1) || (player->stateFlags3 & PLAYER_STATE3_8000000) ||
(player->stateFlags2 & PLAYER_STATE2_80000)) {
this->unk_28E = 0;
return 1;
}
@@ -488,7 +492,7 @@ void func_80B27030(EnKendoJs* this, PlayState* play) {
this->actor.flags |= ACTOR_FLAG_10000;
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
func_80B279F0(this, play, 0);
Message_StartTextbox(play, 0x271A, &this->actor);
this->unk_288 = 0x271A;
@@ -520,7 +524,7 @@ void func_80B27188(EnKendoJs* this, PlayState* play) {
}
this->unk_286 = 2;
func_801477B4(play);
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
}
} else if (this->unk_286 == 2) {
this->unk_286 = 1;
@@ -531,14 +535,14 @@ void func_80B27188(EnKendoJs* this, PlayState* play) {
case 0:
this->unk_286 = 0;
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_TRE_BOX_APPEAR);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
func_80B26EB4(this, play);
break;
case 1:
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_ERROR);
this->unk_286 = 0;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
Message_StartTextbox(play, 0x2729, &this->actor);
this->unk_288 = 0x2729;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2);
@@ -583,7 +587,7 @@ void func_80B2740C(EnKendoJs* this, PlayState* play) {
if (func_80B278C4(play, sp18)) {
this->unk_28C = 0;
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
this->actionFunc = func_80B274BC;
}
}
@@ -600,7 +604,7 @@ void func_80B274BC(EnKendoJs* this, PlayState* play) {
Message_StartTextbox(play, 0x272E, &this->actor);
this->unk_288 = 0x272E;
}
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
gSaveContext.save.weekEventReg[82] &= (u8)~8;
func_80B26AE8(this);
return;
@@ -623,7 +627,7 @@ void func_80B274BC(EnKendoJs* this, PlayState* play) {
(player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_FINISH)) {
play->interfaceCtx.unk_25C = 3;
if (gSaveContext.minigameScore >= 27) {
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
}
} else if (player->meleeWeaponAnimation == PLAYER_MWA_STAB_1H) {
play->interfaceCtx.unk_25C = 2;
@@ -668,7 +672,7 @@ void func_80B27774(EnKendoJs* this, PlayState* play) {
this->unk_288 = 0x2730;
}
func_80B26AE8(this);
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
} else {
func_800B85E0(&this->actor, play, 1000.0f, -1);
}
+2 -2
View File
@@ -1149,10 +1149,10 @@ void func_80B43074(EnKgy* this, PlayState* play) {
gSPMatrix(gfx, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (func_80B40D8C(play)) {
gSPDisplayList(&gfx[1], gameplay_keep_DL_001D00);
gSPDisplayList(&gfx[1], gRazorSwordHandleDL);
gSPDisplayList(&gfx[2], object_kgy_DL_00F180);
} else {
gSPDisplayList(&gfx[1], gameplay_keep_DL_0021A8);
gSPDisplayList(&gfx[1], gKokiriSwordHandleDL);
gSPDisplayList(&gfx[2], object_kgy_DL_00E8F0);
}
POLY_OPA_DISP = &gfx[3];
+13 -13
View File
@@ -44,14 +44,14 @@ void func_80A5E6F0(Actor* thisx, PlayState* play);
void func_80A5E9B4(Actor* thisx, PlayState* play);
void func_80A5EA48(Actor* thisx, PlayState* play);
static EnKusa2UnkBssStruct D_80A5F1C0;
static u32 D_80A60900;
static MtxF D_80A60908[8];
static s16 D_80A60B08;
static s16 D_80A60B0A;
static s16 D_80A60B0C;
static s16 D_80A60B0E;
static s16 D_80A60B10;
EnKusa2UnkBssStruct D_80A5F1C0;
u32 D_80A60900;
MtxF D_80A60908[8];
s16 D_80A60B08;
s16 D_80A60B0A;
s16 D_80A60B0C;
s16 D_80A60B0E;
s16 D_80A60B10;
const ActorInit En_Kusa2_InitVars = {
ACTOR_EN_KUSA2,
@@ -85,11 +85,11 @@ static ColliderCylinderInit sCylinderInit = {
{ 6, 44, 0, { 0, 0, 0 } },
};
static u8 D_80A5EAEC = 1;
static s16 D_80A5EAF0 = 0;
static Vec3s D_80A5EAF4 = { 0, 0, 0 };
static Vec3s D_80A5EAFC = { 0, 0, 0 };
static Vec3s D_80A5EB04 = { 0, 0, 0 };
u8 D_80A5EAEC = 1;
s16 D_80A5EAF0 = 0;
Vec3s D_80A5EAF4 = { 0, 0, 0 };
Vec3s D_80A5EAFC = { 0, 0, 0 };
Vec3s D_80A5EB04 = { 0, 0, 0 };
void func_80A5B160(EnKusa2* this, PlayState* play) {
s32 i;
@@ -355,7 +355,7 @@ void EnLookNuts_Update(Actor* thisx, PlayState* play) {
if ((this->isPlayerDetected == true) || (this->actor.xzDistToPlayer < 20.0f)) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags3 & 0x100) && !Play_InCsMode(play)) {
if (!(player->stateFlags3 & PLAYER_STATE3_100) && !Play_InCsMode(play)) {
Math_Vec3f_Copy(&this->headRotTarget, &gZeroVec3f);
this->state = PALACE_GUARD_RUNNING_TO_PLAYER;
play_sound(NA_SE_SY_FOUND);
+8 -8
View File
@@ -347,7 +347,7 @@ void EnMa4_Wait(EnMa4* this, PlayState* play) {
EnMa4_StartDialogue(this, play);
EnMa4_SetupDialogueHandler(this);
} else if (this->type != MA4_TYPE_ALIENS_WON || ABS_ALT(yaw) < 0x4000) {
if (!(player->stateFlags1 & 0x800000)) {
if (!(player->stateFlags1 & PLAYER_STATE1_800000)) {
func_800B8614(&this->actor, play, 100.0f);
}
}
@@ -596,7 +596,7 @@ void EnMa4_ChooseNextDialogue(EnMa4* this, PlayState* play) {
this->textId = 0x334C;
} else {
func_801477B4(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
EnMa4_SetupBeginEponasSongCs(this);
EnMa4_BeginEponasSongCs(this, play);
}
@@ -692,7 +692,7 @@ void EnMa4_InitHorsebackGame(EnMa4* this, PlayState* play) {
Interface_StartTimer(TIMER_ID_MINIGAME_2, 0);
gSaveContext.save.weekEventReg[8] |= 1;
func_80112AFC(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
this->actionFunc = EnMa4_SetupHorsebackGameWait;
}
@@ -701,7 +701,7 @@ void EnMa4_SetupHorsebackGameWait(EnMa4* this, PlayState* play) {
if (play->interfaceCtx.unk_280 == 8) {
this->actionFunc = EnMa4_HorsebackGameWait;
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
}
}
@@ -709,7 +709,7 @@ void EnMa4_HorsebackGameWait(EnMa4* this, PlayState* play) {
static s16 D_80AC0258 = 0;
Player* player = GET_PLAYER(play);
player->stateFlags3 |= 0x400;
player->stateFlags3 |= PLAYER_STATE3_400;
EnMa4_HorsebackGameCheckPlayerInteractions(this, play);
if (this->poppedBalloonCounter != D_80AC0258) {
@@ -736,7 +736,7 @@ void EnMa4_HorsebackGameEnd(EnMa4* this, PlayState* play) {
static s32 sFrameCounter = 0;
Player* player = GET_PLAYER(play);
if (player->stateFlags1 & 0x100000) {
if (player->stateFlags1 & PLAYER_STATE1_100000) {
play->actorCtx.unk268 = 1;
play->actorCtx.unk_26C.press.button = BTN_A;
} else {
@@ -827,7 +827,7 @@ void EnMa4_EponasSongCs(EnMa4* this, PlayState* play) {
} else {
Player* player = GET_PLAYER(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
func_800B85E0(&this->actor, play, 200.0f, PLAYER_AP_MINUS1);
D_80AC0260 = 99;
this->hasBow = true;
@@ -844,7 +844,7 @@ void EnMa4_EndEponasSongCs(EnMa4* this, PlayState* play) {
this->actor.flags |= ACTOR_FLAG_10000;
if (Actor_ProcessTalkRequest(&this->actor, &play->state) != 0) {
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
Message_StartTextbox(play, 0x334C, &this->actor);
this->textId = 0x334C;
this->actor.flags &= ~ACTOR_FLAG_10000;
+3 -3
View File
@@ -341,7 +341,7 @@ void func_80A6F9DC(EnMm3* this, PlayState* play) {
if (this->unk_2B4 == 0x2790) {
Player* player = GET_PLAYER(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
if (Player_GetMask(play) == PLAYER_MASK_BUNNY) {
Interface_StartPostmanTimer(0, POSTMAN_MINIGAME_BUNNY_HOOD_ON);
} else {
@@ -383,7 +383,7 @@ void func_80A6FBFC(EnMm3* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (gSaveContext.timerStates[TIMER_ID_POSTMAN] == TIMER_STATE_POSTMAN_END) {
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
this->actor.flags |= ACTOR_FLAG_10000;
if (gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] > SECONDS_TO_TIMER(15)) {
gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] = SECONDS_TO_TIMER(15);
@@ -445,7 +445,7 @@ void func_80A6FEEC(EnMm3* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
Message_StartTextbox(play, 0x2794, &this->actor);
this->unk_2B4 = 0x2794;
func_80151BB4(play, 0xB);
@@ -318,7 +318,7 @@ void EnMttag_RaceStart(EnMttag* this, PlayState* play) {
play->interfaceCtx.unk_280 = 1;
Audio_QueueSeqCmd(NA_BGM_GORON_RACE | 0x8000);
play->envCtx.unk_E4 = 0xFE;
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
} else if ((this->timer < 60) && (play->interfaceCtx.unk_280 == 8)) {
this->timer = 0;
gSaveContext.eventInf[1] |= 1;
@@ -480,7 +480,7 @@ void EnMttag_Init(Actor* thisx, PlayState* play) {
if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) {
player = GET_PLAYER(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
this->raceInitialized = false;
this->timer = 100;
@@ -97,7 +97,8 @@ void EnNutsball_Update(Actor* thisx, PlayState* play2) {
s32 bgId;
CollisionPoly* poly;
if (!(player->stateFlags1 & 0x300000C0)) {
if (!(player->stateFlags1 &
(PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_10000000 | PLAYER_STATE1_20000000))) {
this->timer--;
if (this->timer < 0) {
this->actor.velocity.y += this->actor.gravity;
+2 -3
View File
@@ -147,7 +147,7 @@ s32 EnNwc_PlayerReleasedBremanMarch(EnNwc* this, PlayState* play) {
return false;
}
if (player->stateFlags3 & 0x20000000) { // breman mask march
if (player->stateFlags3 & PLAYER_STATE3_20000000) {
return false;
}
@@ -165,8 +165,7 @@ s32 EnNwc_IsFound(EnNwc* this, PlayState* play) {
return false;
}
if (player->stateFlags3 & 0x20000000 && // breman mask march
this->actor.xzDistToPlayer < 100.0f) {
if ((player->stateFlags3 & PLAYER_STATE3_20000000) && this->actor.xzDistToPlayer < 100.0f) {
return true;
}
@@ -306,7 +306,7 @@ void EnOssan_EndInteraction(PlayState* play, EnOssan* this) {
this->drawCursor = 0;
this->stickLeftPrompt.isEnabled = false;
this->stickRightPrompt.isEnabled = false;
player->stateFlags2 &= ~0x20000000;
player->stateFlags2 &= ~PLAYER_STATE2_20000000;
play->interfaceCtx.unk_222 = 0;
play->interfaceCtx.unk_224 = 0;
if (this->cutsceneState == ENOSSAN_CUTSCENESTATE_PLAYING) {
@@ -366,7 +366,7 @@ void EnOssan_Idle(EnOssan* this, PlayState* play) {
SubS_FillLimbRotTables(play, this->limbRotTableY, this->limbRotTableZ, ARRAY_COUNT(this->limbRotTableY));
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
player->stateFlags2 |= 0x20000000;
player->stateFlags2 |= PLAYER_STATE2_20000000;
EnOssan_SetupAction(this, EnOssan_BeginInteraction);
if (this->cutsceneState == ENOSSAN_CUTSCENESTATE_STOPPED) {
if (ActorCutscene_GetCurrentIndex() == 0x7C) {
@@ -984,7 +984,7 @@ void EnOssan_SetupBuyItemWithFanfare(PlayState* play, EnOssan* this) {
Actor_PickUp(&this->actor, play, this->items[this->cursorIndex]->getItemId, 300.0f, 300.0f);
play->msgCtx.msgMode = 0x43;
play->msgCtx.stateTimer = 4;
player->stateFlags2 &= ~0x20000000;
player->stateFlags2 &= ~PLAYER_STATE2_20000000;
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
this->drawCursor = 0;
EnOssan_SetupAction(this, EnOssan_BuyItemWithFanfare);
@@ -1129,7 +1129,7 @@ void EnOssan_ContinueShopping(EnOssan* this, PlayState* play) {
case 0:
func_8019F208();
player->actor.shape.rot.y = BINANG_ROT180(player->actor.shape.rot.y);
player->stateFlags2 |= 0x20000000;
player->stateFlags2 |= PLAYER_STATE2_20000000;
Message_StartTextbox(play, this->textId, &this->actor);
EnOssan_SetupStartShopping(play, this, true);
func_800B85E0(&this->actor, play, 100.0f, PLAYER_AP_MINUS1);
@@ -1147,7 +1147,7 @@ void EnOssan_ContinueShopping(EnOssan* this, PlayState* play) {
item = this->items[this->cursorIndex];
item->restockFunc(play, item);
player->actor.shape.rot.y = BINANG_ROT180(player->actor.shape.rot.y);
player->stateFlags2 |= 0x20000000;
player->stateFlags2 |= PLAYER_STATE2_20000000;
Message_StartTextbox(play, this->textId, &this->actor);
EnOssan_SetupStartShopping(play, this, true);
func_800B85E0(&this->actor, play, 100.0f, PLAYER_AP_MINUS1);
@@ -1160,7 +1160,7 @@ void EnOssan_ItemPurchased(EnOssan* this, PlayState* play) {
if (this->cutsceneState == ENOSSAN_CUTSCENESTATE_STOPPED) {
if (ActorCutscene_GetCanPlayNext(this->cutscene)) {
ActorCutscene_StartAndSetFlag(this->cutscene, &this->actor);
player->stateFlags2 |= 0x20000000;
player->stateFlags2 |= PLAYER_STATE2_20000000;
EnOssan_SetupAction(this, EnOssan_ContinueShopping);
this->cutsceneState = ENOSSAN_CUTSCENESTATE_PLAYING;
} else {
+2 -2
View File
@@ -629,7 +629,7 @@ void func_80B5CCA0(EnOt* this, PlayState* play) {
if (SubS_StartActorCutscene(&this->actor, this->cutscenes[0], 0x7C, SUBS_CUTSCENE_NORMAL)) {
Player* player = GET_PLAYER(play);
player->stateFlags2 |= 0x20000000;
player->stateFlags2 |= PLAYER_STATE2_20000000;
func_80B5CCF4(this, play);
}
}
@@ -666,7 +666,7 @@ void func_80B5CD40(EnOt* this, PlayState* play) {
if (Message_ShouldAdvance(play) && (play->msgCtx.currentTextId == 0x1069)) {
this->unk_32C |= 4;
ActorCutscene_Stop(this->cutscenes[0]);
player->stateFlags2 &= ~0x20000000;
player->stateFlags2 &= ~PLAYER_STATE2_20000000;
func_80B5CE6C(this, play);
}
break;
+2 -2
View File
@@ -478,7 +478,7 @@ void func_8095B3DC(EnOwl* this, PlayState* play) {
void func_8095B480(EnOwl* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (player->stateFlags3 & 0x10000000) {
if (player->stateFlags3 & PLAYER_STATE3_10000000) {
this->actor.textId = 0xBF1;
EnOwl_ChangeMode(this, func_8095BF58, func_8095C484, &this->skelAnime2, &object_owl_Anim_00CDB0, 0.0f);
this->eyeTexIndex = 0;
@@ -1066,7 +1066,7 @@ void func_8095CCF4(Actor* thisx, PlayState* play) {
EnOwl* this = THIS;
Player* player = GET_PLAYER(play);
if (player->stateFlags3 & 0x10000000) {
if (player->stateFlags3 & PLAYER_STATE3_10000000) {
Actor_Kill(&this->actor);
return;
}
+1 -1
View File
@@ -1170,7 +1170,7 @@ s32 func_80AF8DD4(EnPm* this, PlayState* play) {
u16 textId = play->msgCtx.currentTextId;
s32 pad;
if (player->stateFlags1 & (0x400 | 0x40)) {
if (player->stateFlags1 & (PLAYER_STATE1_40 | PLAYER_STATE1_400)) {
this->unk_356 |= 0x400;
if (this->unk_358 != textId) {
if ((this->unk_384 == 0) || (this->unk_384 == 1)) {
+5 -5
View File
@@ -262,7 +262,7 @@ void func_80A32740(EnPr* this, PlayState* play) {
if (this->unk_2C8 < sqrtf(SQ(this->actor.world.pos.x - this->actor.home.pos.x) +
SQ(this->actor.world.pos.z - this->actor.home.pos.z))) {
func_80A32854(this);
} else if ((this->unk_20E == 0) && (player->stateFlags1 & 0x8000000)) {
} else if ((this->unk_20E == 0) && (player->stateFlags1 & PLAYER_STATE1_8000000)) {
if (sqrtf(SQ(player->actor.world.pos.x - this->actor.home.pos.x) +
SQ(player->actor.world.pos.z - this->actor.home.pos.z)) < this->unk_2C8) {
func_80A32AF8(this);
@@ -298,7 +298,7 @@ void func_80A3295C(EnPr* this) {
void func_80A32984(EnPr* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & 0x8000000) && (this->unk_20E == 0)) {
if ((player->stateFlags1 & PLAYER_STATE1_8000000) && (this->unk_20E == 0)) {
this->unk_22C = this->actor.world.rot.y;
func_80A32AF8(this);
} else if (!func_80A325E4(this)) {
@@ -348,7 +348,7 @@ void func_80A32B20(EnPr* this, PlayState* play) {
this->unk_2B8 = D_80A338C0[(void)0, gSaveContext.save.playerForm] + player->actor.world.pos.y;
func_80A324E0(this, play);
if (!(player->stateFlags1 & 0x8000000)) {
if (!(player->stateFlags1 & PLAYER_STATE1_8000000)) {
this->skelAnime.playSpeed = 1.0f;
this->actor.speedXZ = 1.0f;
func_80A32854(this);
@@ -375,7 +375,7 @@ void func_80A32CDC(EnPr* this) {
void func_80A32D28(EnPr* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & 0x8000000)) {
if (!(player->stateFlags1 & PLAYER_STATE1_8000000)) {
this->skelAnime.playSpeed = 1.0f;
this->actor.speedXZ = 1.0f;
func_80A32854(this);
@@ -463,7 +463,7 @@ void func_80A33098(EnPr* this, PlayState* play) {
this->actor.focus.pos.z, 0, 0, 0, CLEAR_TAG_LARGE_LIGHT_RAYS);
}
if ((player->stateFlags1 & 0x8000000) && (this->actor.colChkInfo.damageEffect == 5)) {
if ((player->stateFlags1 & PLAYER_STATE1_8000000) && (this->actor.colChkInfo.damageEffect == 5)) {
this->drawDmgEffAlpha = 40;
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_ELECTRIC_SPARKS_MEDIUM;
}
+3 -3
View File
@@ -206,7 +206,7 @@ s32 func_80A7429C(EnPr2* this, PlayState* play) {
return false;
}
if (!(player->stateFlags1 & 0x8000000)) {
if (!(player->stateFlags1 & PLAYER_STATE1_8000000)) {
return false;
} else {
return true;
@@ -356,7 +356,7 @@ void func_80A748E8(EnPr2* this, PlayState* play) {
temp_f12 = player->actor.world.pos.z - this->unk_228.z;
sqrtXZ = sqrtf(SQ(temp_f2) + SQ(temp_f12));
if (sp48 && (player->stateFlags1 & 0x8000000) && (sqrtXZ < this->unk_208)) {
if (sp48 && (player->stateFlags1 & PLAYER_STATE1_8000000) && (sqrtXZ < this->unk_208)) {
sp4C = true;
func_80A74DEC(this, play);
}
@@ -446,7 +446,7 @@ void func_80A74E90(EnPr2* this, PlayState* play) {
WaterBox* sp40;
Math_ApproachF(&this->unk_204, 0.02f, 0.1f, 0.005f);
if ((this->unk_1D8 == 0) || !(player->stateFlags1 & 0x8000000) || (this->unk_1E0 == 0)) {
if ((this->unk_1D8 == 0) || !(player->stateFlags1 & PLAYER_STATE1_8000000) || (this->unk_1E0 == 0)) {
func_80A74888(this);
return;
}
+3 -3
View File
@@ -234,7 +234,7 @@ void func_80A763E8(EnPrz* this, PlayState* play) {
return;
}
if ((player->stateFlags1 & 0x8000000) && (this->unk_1F2 == 0)) {
if ((player->stateFlags1 & PLAYER_STATE1_8000000) && (this->unk_1F2 == 0)) {
func_80A76748(this);
return;
}
@@ -291,7 +291,7 @@ void func_80A76634(EnPrz* this, PlayState* play) {
if (func_80A762C0(this, play) != 0) {
this->unk_1E4 += 0x1500;
this->unk_1E4 += (s16)Rand_ZeroFloat(5000.0f);
} else if ((player->stateFlags1 & 0x8000000) && (player->actor.floorHeight < 30.0f)) {
} else if ((player->stateFlags1 & PLAYER_STATE1_8000000) && (player->actor.floorHeight < 30.0f)) {
this->actionFunc = func_80A763E8;
} else {
this->unk_1EE = 10;
@@ -325,7 +325,7 @@ void func_80A767A8(EnPrz* this, PlayState* play) {
distXZ = sqrtf(SQ(player->actor.world.pos.x - this->actor.parent->home.pos.x) +
SQ(player->actor.world.pos.z - this->actor.parent->home.pos.z));
if (!(player->stateFlags1 & 0x8000000) || (pr->unk_2C8 < distXZ)) {
if (!(player->stateFlags1 & PLAYER_STATE1_8000000) || (pr->unk_2C8 < distXZ)) {
this->unk_1F2 = 100;
this->skelAnime.playSpeed = 1.0f;
func_80A76388(this);
+4 -4
View File
@@ -310,7 +310,7 @@ void EnRaf_Idle(EnRaf* this, PlayState* play) {
if (this->timer == 0) {
if ((player->transformation != PLAYER_FORM_DEKU) &&
(this->dyna.actor.xzDistToPlayer < (BREG(48) + 80.0f) && (player->invincibilityTimer == 0) &&
DynaPolyActor_IsInRidingMovingState(&this->dyna) && !(player->stateFlags1 & 0x8000000) &&
DynaPolyActor_IsInRidingMovingState(&this->dyna) && !(player->stateFlags1 & PLAYER_STATE1_8000000) &&
play->grabPlayer(play, player))) {
player->actor.parent = &this->dyna.actor;
this->grabTarget = EN_RAF_GRAB_TARGET_PLAYER;
@@ -372,7 +372,7 @@ void EnRaf_Grab(EnRaf* this, PlayState* play) {
Player* player = GET_PLAYER(play);
f32 curFrame = this->skelAnime.curFrame;
if ((this->grabTarget != EN_RAF_GRAB_TARGET_EXPLOSIVE) && (player->stateFlags2 & 0x80) &&
if ((this->grabTarget != EN_RAF_GRAB_TARGET_EXPLOSIVE) && (player->stateFlags2 & PLAYER_STATE2_80) &&
(&this->dyna.actor == player->actor.parent)) {
Math_ApproachF(&player->actor.world.pos.x, this->dyna.actor.world.pos.x, 0.3f, 10.0f);
Math_ApproachF(&player->actor.world.pos.y, this->dyna.actor.world.pos.y, 0.3f, 10.0f);
@@ -414,7 +414,7 @@ void EnRaf_Chew(EnRaf* this, PlayState* play) {
targetChewScale = (BREG(51) / 100.0f) + 0.2f;
Math_ApproachF(&this->chewScale, targetChewScale, 0.2f, 0.03f);
if ((player->stateFlags2 & 0x80) && (this->grabTarget != EN_RAF_GRAB_TARGET_EXPLOSIVE) &&
if ((player->stateFlags2 & PLAYER_STATE2_80) && (this->grabTarget != EN_RAF_GRAB_TARGET_EXPLOSIVE) &&
(&this->dyna.actor == player->actor.parent)) {
Math_ApproachF(&player->actor.world.pos.x, this->dyna.actor.world.pos.x, 0.3f, 10.0f);
Math_ApproachF(&player->actor.world.pos.y, this->dyna.actor.world.pos.y, 0.3f, 10.0f);
@@ -432,7 +432,7 @@ void EnRaf_Chew(EnRaf* this, PlayState* play) {
play->damagePlayer(play, -2);
func_800B8E58((Player*)this, player->ageProperties->unk_92 + NA_SE_VO_LI_DAMAGE_S);
CollisionCheck_GreenBlood(play, NULL, &player->actor.world.pos);
if ((this->chewCount > (BREG(53) + 5)) || !(player->stateFlags2 & 0x80)) {
if ((this->chewCount > (BREG(53) + 5)) || !(player->stateFlags2 & PLAYER_STATE2_80)) {
player->actor.freezeTimer = 10;
EnRaf_SetupThrow(this, play);
return;
@@ -438,7 +438,7 @@ void EnRailgibud_Grab(EnRailgibud* this, PlayState* play) {
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) && (inPositionToAttack == true)) {
this->grabState = EN_RAILGIBUD_GRAB_ATTACK;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_GRAB_ATTACK);
} else if (!(player->stateFlags2 & 0x80)) {
} else if (!(player->stateFlags2 & PLAYER_STATE2_80)) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_GRAB_END);
this->actor.flags |= ACTOR_FLAG_1;
this->grabState = EN_RAILGIBUD_GRAB_RELEASE;
@@ -463,9 +463,9 @@ void EnRailgibud_Grab(EnRailgibud* this, PlayState* play) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_ATTACK);
}
if (!(player->stateFlags2 & 0x80) || (player->unk_B62 != 0)) {
if ((player->unk_B62 != 0) && (player->stateFlags2 & 0x80)) {
player->stateFlags2 &= ~0x80;
if (!(player->stateFlags2 & PLAYER_STATE2_80) || (player->unk_B62 != 0)) {
if ((player->unk_B62 != 0) && (player->stateFlags2 & PLAYER_STATE2_80)) {
player->stateFlags2 &= ~PLAYER_STATE2_80;
player->unk_AE8 = 100;
}
@@ -750,9 +750,10 @@ s32 EnRailgibud_PlayerInRangeWithCorrectState(EnRailgibud* this, PlayState* play
return false;
}
if ((Actor_DistanceToPoint(&player->actor, &this->actor.home.pos) < 100.0f) &&
!(player->stateFlags1 & (0x200000 | 0x80000 | 0x40000 | 0x4000 | 0x2000 | 0x80)) &&
!(player->stateFlags2 & (0x4000 | 0x80))) {
if (Actor_DistanceToPoint(&player->actor, &this->actor.home.pos) < 100.0f &&
!(player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_40000 |
PLAYER_STATE1_80000 | PLAYER_STATE1_200000)) &&
!(player->stateFlags2 & (PLAYER_STATE2_80 | PLAYER_STATE2_4000))) {
return true;
}
+6 -5
View File
@@ -654,8 +654,9 @@ void EnRd_WalkToPlayer(EnRd* this, PlayState* play) {
}
if ((ABS_ALT(yaw) < 0x1554) && (Actor_DistanceBetweenActors(&this->actor, &player->actor) <= 150.0f)) {
if (!(player->stateFlags1 & (0x200000 | 0x80000 | 0x40000 | 0x4000 | 0x2000 | 0x80)) &&
!(player->stateFlags2 & (0x4000 | 0x80))) {
if (!(player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_40000 |
PLAYER_STATE1_80000 | PLAYER_STATE1_200000)) &&
!(player->stateFlags2 & (PLAYER_STATE2_80 | PLAYER_STATE2_4000))) {
if (this->playerStunWaitTimer == 0) {
if (!(this->flags & EN_RD_FLAG_CANNOT_FREEZE_PLAYER)) {
player->actor.freezeTimer = 40;
@@ -838,9 +839,9 @@ void EnRd_Grab(EnRd* this, PlayState* play) {
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 1500, 0);
case EN_RD_GRAB_ATTACK:
if (!(player->stateFlags2 & 0x80) || (player->unk_B62 != 0)) {
if ((player->unk_B62 != 0) && (player->stateFlags2 & 0x80)) {
player->stateFlags2 &= ~0x80;
if (!(player->stateFlags2 & PLAYER_STATE2_80) || (player->unk_B62 != 0)) {
if ((player->unk_B62 != 0) && (player->stateFlags2 & PLAYER_STATE2_80)) {
player->stateFlags2 &= ~PLAYER_STATE2_80;
player->unk_AE8 = 100;
}
Animation_Change(&this->skelAnime, &gGibdoRedeadGrabEndAnim, 0.5f, 0.0f,
+4 -3
View File
@@ -564,8 +564,9 @@ void func_80BF4AB8(EnRg* this, PlayState* play) {
} while (phi_s0 != NULL);
}
if ((phi_s0 == NULL) && (D_80BF5C10 == 0) && (this->unk_326 == 0) && (player->stateFlags3 & 0x80000) &&
(player->invincibilityTimer == 0) && func_80BF4220(this, play, &player->actor)) {
if ((phi_s0 == NULL) && (D_80BF5C10 == 0) && (this->unk_326 == 0) &&
(player->stateFlags3 & PLAYER_STATE3_80000) && (player->invincibilityTimer == 0) &&
func_80BF4220(this, play, &player->actor)) {
this->unk_18C = &player->actor;
this->unk_310 |= 0x800;
D_80BF5C10 = 1;
@@ -586,7 +587,7 @@ void func_80BF4AB8(EnRg* this, PlayState* play) {
this->unk_320 = CLAMP_MAX(this->unk_320, 0x190);
} else if (this->collider2.base.at->id == ACTOR_PLAYER) {
this->unk_326 = 0x28;
if (player->stateFlags3 & 0x1000) {
if (player->stateFlags3 & PLAYER_STATE3_1000) {
player->linearVelocity *= 0.5f;
player->unk_B08[0] = player->linearVelocity;
player->unk_B08[1] += player->linearVelocity * 0.05f;
+4 -3
View File
@@ -296,7 +296,7 @@ void func_808FA4F4(EnRr* this, PlayState* play) {
f32 sp30;
f32 sp2C;
if (player->stateFlags2 & 0x80) {
if (player->stateFlags2 & PLAYER_STATE2_80) {
player->actor.parent = NULL;
player->unk_AE8 = 100;
this->actor.flags |= ACTOR_FLAG_1;
@@ -571,7 +571,8 @@ void func_808FAF94(EnRr* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 10, 500, 0);
this->actor.world.rot.y = this->actor.shape.rot.y;
if ((this->unk_1E6 == 0) && !(player->stateFlags2 & 0x80) && (Player_GetMask(play) != PLAYER_MASK_STONE) &&
if ((this->unk_1E6 == 0) && !(player->stateFlags2 & PLAYER_STATE2_80) &&
(Player_GetMask(play) != PLAYER_MASK_STONE) &&
(this->actor.xzDistToPlayer < (8421.053f * this->actor.scale.x))) {
func_808FA260(this);
} else if ((this->actor.xzDistToPlayer < 400.0f) && (this->actor.speedXZ == 0.0f)) {
@@ -812,7 +813,7 @@ void EnRr_Update(Actor* thisx, PlayState* play) {
if (this->unk_1FC > 0) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags2 & 0x80)) {
if (!(player->stateFlags2 & PLAYER_STATE2_80)) {
this->unk_1FC--;
if (this->unk_1FC == 0) {
this->collider1.base.ocFlags1 |= OC1_TYPE_PLAYER;
@@ -240,7 +240,7 @@ s32 EnRuppecrow_CanSpawnBlueRupees(PlayState* play) {
case PLAYER_FORM_ZORA:
return false;
case PLAYER_FORM_HUMAN:
if (player->stateFlags1 & 0x800000) {
if (player->stateFlags1 & PLAYER_STATE1_800000) {
return true;
} else {
return false;
@@ -268,7 +268,7 @@ void EnRuppecrow_SpawnRupee(EnRuppecrow* this, PlayState* play) {
EnItem00* rupee;
s16 rupeeIndex = this->rupeeIndex;
if (!(player->stateFlags3 & 0x1000)) {
if (!(player->stateFlags3 & PLAYER_STATE3_1000)) {
xOffset = (this->rupeeIndex & 1) ? 10.0f : -10.0f;
} else {
xOffset = 0.0f;
@@ -407,7 +407,7 @@ void EnRuppecrow_UpdateSpeed(EnRuppecrow* this, PlayState* play) {
this->speedModifier = 7.0f;
break;
case PLAYER_FORM_GORON:
if (player->stateFlags3 & 0x1000) { // Goron Link is curled
if (player->stateFlags3 & PLAYER_STATE3_1000) { // Goron Link is curled
this->speedModifier = 19.0f;
} else {
this->speedModifier = 7.0f;
@@ -417,7 +417,7 @@ void EnRuppecrow_UpdateSpeed(EnRuppecrow* this, PlayState* play) {
this->speedModifier = 7.0f;
break;
case PLAYER_FORM_HUMAN:
if (player->stateFlags1 & 0x800000) {
if (player->stateFlags1 & PLAYER_STATE1_800000) {
this->speedModifier = 16.0f;
} else {
this->speedModifier = 7.0f;
@@ -507,7 +507,7 @@ void EnRuppecrow_HandleSong(EnRuppecrow* this, PlayState* play) {
this->actionFunc = EnRuppecrow_HandleSongCutscene;
}
if (player->stateFlags2 & 0x8000000) {
if (player->stateFlags2 & PLAYER_STATE2_8000000) {
Math_ApproachF(&this->actor.speedXZ, 0.0f, 0.1f, 1.0f);
} else {
Math_ApproachF(&this->actor.speedXZ, 6.0f, 0.1f, 0.1f);
+1 -1
View File
@@ -377,7 +377,7 @@ void EnSb_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 25.0f, 20.0f, 5);
EnSb_UpdateDamage(this, play);
if (player->stateFlags1 & 0x8000000) {
if (player->stateFlags1 & PLAYER_STATE1_8000000) {
Collider_UpdateCylinder(&this->actor, &this->collider);
if (this->vulnerableTimer == 0) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
@@ -704,10 +704,10 @@ void func_80ADC5A4(EnSellnuts* this, PlayState* play) {
this->unk_338 |= 1;
this->actor.draw = EnSellnuts_Draw;
D_80ADD940 = 0;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
this->actionFunc = func_80ADC7B4;
} else {
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
this->actionFunc = func_80ADC6D0;
}
} else if (func_80ADB08C(play) < 80.0f) {
+1 -1
View File
@@ -201,7 +201,7 @@ s32 func_80AE65F4(EnShn* this, PlayState* play) {
Player* player = GET_PLAYER(play);
u16 temp = play->msgCtx.currentTextId;
if (player->stateFlags1 & 0x40) {
if (player->stateFlags1 & PLAYER_STATE1_40) {
if (this->unk_1DA != temp) {
if ((this->unk_1D8 & 0x80) || (this->unk_1D8 & 0x100)) {
this->unk_1D8 |= 8;
@@ -395,7 +395,7 @@ void EnSnowman_MoveSnowPile(EnSnowman* this, PlayState* play) {
EnSnowman_SetupCombine(this, play, &combinePos);
} else if ((this->work.timer == 0) && (fabsf(this->actor.playerHeightRel) < 60.0f) &&
(this->actor.xzDistToPlayer < this->attackRange) && (Player_GetMask(play) != PLAYER_MASK_STONE) &&
!(player->stateFlags1 & 0x800000)) {
!(player->stateFlags1 & PLAYER_STATE1_800000)) {
EnSnowman_SetupEmerge(this, play);
} else if (this->snowPileTargetRotY != this->actor.shape.rot.y) {
if (Math_ScaledStepToS(&this->actor.shape.rot.y, this->snowPileTargetRotY, 0x100)) {
@@ -439,7 +439,7 @@ void EnSnowman_Emerge(EnSnowman* this, PlayState* play) {
if (SkelAnime_Update(&this->skelAnime)) {
if (this->combineState == EN_SNOWMAN_COMBINE_STATE_ACTIVE) {
EnSnowman_SetupSubmerge(this, play);
} else if (!(player->stateFlags1 & 0x800000) && (Player_GetMask(play) != PLAYER_MASK_STONE)) {
} else if (!(player->stateFlags1 & PLAYER_STATE1_800000) && (Player_GetMask(play) != PLAYER_MASK_STONE)) {
this->collider.base.acFlags |= AC_ON;
this->work.snowballsToThrowBeforeIdling = 3;
EnSnowman_SetupReadySnowball(this);
@@ -529,7 +529,7 @@ void EnSnowman_ThrowSnowball(EnSnowman* this, PlayState* play) {
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xA, 0x1000);
if (SkelAnime_Update(&this->skelAnime)) {
if ((this->work.snowballsToThrowBeforeIdling != 0) && (Player_GetMask(play) != PLAYER_MASK_STONE) &&
!(player->stateFlags1 & 0x800000)) {
!(player->stateFlags1 & PLAYER_STATE1_800000)) {
EnSnowman_SetupReadySnowball(this);
} else {
this->work.snowballsToThrowBeforeIdling = 0;
+6 -6
View File
@@ -446,7 +446,7 @@ void EnSob1_EndInteraction(PlayState* play, EnSob1* this) {
this->drawCursor = 0;
this->stickLeftPrompt.isEnabled = false;
this->stickRightPrompt.isEnabled = false;
player->stateFlags2 &= ~0x20000000;
player->stateFlags2 &= ~PLAYER_STATE2_20000000;
play->interfaceCtx.unk_222 = 0;
play->interfaceCtx.unk_224 = 0;
EnSob1_SetupAction(this, EnSob1_Idle);
@@ -533,7 +533,7 @@ void EnSob1_Idle(EnSob1* this, PlayState* play) {
ActorCutscene_SetIntentToPlay(this->cutscene);
this->cutsceneState = ENSOB1_CUTSCENESTATE_WAITING;
}
player->stateFlags2 |= 0x20000000;
player->stateFlags2 |= PLAYER_STATE2_20000000;
this->welcomeTextId = EnSob1_GetWelcome(this, play);
Message_StartTextbox(play, this->welcomeTextId, &this->actor);
if (ENSOB1_GET_SHOPTYPE(&this->actor) == BOMB_SHOP) {
@@ -790,7 +790,7 @@ void EnSob1_Walking(EnSob1* this, PlayState* play) {
ActorCutscene_SetIntentToPlay(this->cutscene);
this->cutsceneState = ENSOB1_CUTSCENESTATE_WAITING;
}
player->stateFlags2 |= 0x20000000;
player->stateFlags2 |= PLAYER_STATE2_20000000;
this->welcomeTextId = EnSob1_GetWelcome(this, play);
Message_StartTextbox(play, this->welcomeTextId, &this->actor);
this->wasTalkedToWhileWalking = true;
@@ -810,7 +810,7 @@ void EnSob1_ItemPurchased(EnSob1* this, PlayState* play) {
if (this->cutsceneState == ENSOB1_CUTSCENESTATE_STOPPED) {
if (ActorCutscene_GetCanPlayNext(this->cutscene)) {
ActorCutscene_StartAndSetFlag(this->cutscene, &this->actor);
player->stateFlags2 |= 0x20000000;
player->stateFlags2 |= PLAYER_STATE2_20000000;
EnSob1_SetupAction(this, EnSob1_ContinueShopping);
this->cutsceneState = ENSOB1_CUTSCENESTATE_PLAYING;
} else {
@@ -932,7 +932,7 @@ void EnSob1_SetupBuyItemWithFanfare(PlayState* play, EnSob1* this) {
Actor_PickUp(&this->actor, play, this->items[this->cursorIndex]->getItemId, 300.0f, 300.0f);
play->msgCtx.msgMode = 0x43;
play->msgCtx.stateTimer = 4;
player->stateFlags2 &= ~0x20000000;
player->stateFlags2 &= ~PLAYER_STATE2_20000000;
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
this->drawCursor = 0;
EnSob1_SetupAction(this, EnSob1_BuyItemWithFanfare);
@@ -1093,7 +1093,7 @@ void EnSob1_ContinueShopping(EnSob1* this, PlayState* play) {
item = this->items[this->cursorIndex];
item->restockFunc(play, item);
player->actor.shape.rot.y += 0x8000;
player->stateFlags2 |= 0x20000000;
player->stateFlags2 |= PLAYER_STATE2_20000000;
Message_StartTextbox(play, this->welcomeTextId, &this->actor);
EnSob1_SetupStartShopping(play, this, true);
func_800B85E0(&this->actor, play, 200.0f, PLAYER_AP_MINUS1);
@@ -104,7 +104,7 @@ void EnStream_SuckPlayer(EnStream* this, PlayState* play) {
if (yDistWithOffset > 0.0f) {
Math_SmoothStepToF(&player->actor.velocity.y, -3.0f, 0.7f, yDistWithOffset, 0.0f);
if (posDifference.y < -70.0f) {
player->stateFlags2 |= 0x80000000;
player->stateFlags2 |= PLAYER_STATE2_80000000;
}
}
} else {
@@ -861,9 +861,9 @@ void func_80BAC2FC(EnSuttari* this, PlayState* play) {
if (!(gSaveContext.save.weekEventReg[83] & 4) && !(this->flags1 & 0x1000)) {
if (ActorCutscene_GetCanPlayNext(this->cutscenes[0])) {
ActorCutscene_Start(this->cutscenes[0], &this->actor);
if (!(player->stateFlags1 & 0x10000000)) {
if (!(player->stateFlags1 & PLAYER_STATE1_10000000)) {
this->flags2 |= 0x10;
player->stateFlags1 |= 0x10000000;
player->stateFlags1 |= PLAYER_STATE1_10000000;
}
this->flags1 |= 0x1000;
this->flags2 |= 2;
@@ -926,9 +926,9 @@ void func_80BAC2FC(EnSuttari* this, PlayState* play) {
if (this->flags2 & 2) {
this->flags2 &= ~2;
}
if (!(player->stateFlags1 & 0x10000000)) {
if (!(player->stateFlags1 & PLAYER_STATE1_10000000)) {
this->flags2 |= 0x10;
player->stateFlags1 |= 0x10000000;
player->stateFlags1 |= PLAYER_STATE1_10000000;
}
this->textId = 0x2A30;
Message_StartTextbox(play, this->textId, &this->actor);
@@ -1201,7 +1201,7 @@ void func_80BAD380(EnSuttari* this, PlayState* play) {
u8 talkState = Message_GetState(&play->msgCtx);
Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & 0x40) && (play->msgCtx.currentTextId != 0x2A31)) {
if ((player->stateFlags1 & PLAYER_STATE1_40) && (play->msgCtx.currentTextId != 0x2A31)) {
this->flags1 |= 0x8000;
this->actor.speedXZ = 0.0f;
} else {
@@ -1209,7 +1209,7 @@ void func_80BAD380(EnSuttari* this, PlayState* play) {
func_80BABA90(this, 1, 1);
if ((this->flags1 & 0x4000) && (talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
this->flags2 &= ~0x10;
player->stateFlags1 &= ~0x10000000;
player->stateFlags1 &= ~PLAYER_STATE1_10000000;
this->flags1 &= ~0x4000;
ActorCutscene_Stop(this->cutscenes[1]);
play->msgCtx.msgMode = 0x43;
@@ -1476,7 +1476,7 @@ void EnSuttari_Update(Actor* thisx, PlayState* play) {
Player* player = GET_PLAYER(play);
this->actionFunc(this, play);
if ((this->flags1 & 8) && (this->flags2 & 0x10) && (player->stateFlags1 & 0x10000000)) {
if ((this->flags1 & 8) && (this->flags2 & 0x10) && (player->stateFlags1 & PLAYER_STATE1_10000000)) {
player->actor.freezeTimer = 3;
}
if (!(this->flags1 & 0x8000)) {
+1 -1
View File
@@ -738,7 +738,7 @@ s32 func_808DA08C(EnSw* this, PlayState* play) {
void func_808DA350(EnSw* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & 0x200000) && (this->actor.xyzDistToPlayerSq < 8000.0f)) {
if ((player->stateFlags1 & PLAYER_STATE1_200000) && (this->actor.xyzDistToPlayerSq < 8000.0f)) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALWALL_LAUGH);
Math_Vec3f_Copy(&this->unk_374, &player->actor.world.pos);
this->unk_410 &= ~0x20;
@@ -346,7 +346,7 @@ void EnSyatekiMan_Swamp_HandleChoice(EnSyatekiMan* this, PlayState* play) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.stateTimer = 4;
this->shootingGameState = SG_GAME_STATE_MOVING_PLAYER;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
this->actionFunc = EnSyatekiMan_Swamp_MovePlayerAndExplainRules;
}
} else {
@@ -410,7 +410,7 @@ void EnSyatekiMan_Swamp_HandleNormalMessage(EnSyatekiMan* this, PlayState* play)
case 0xA32: // You have to try harder!
if (gSaveContext.save.weekEventReg[63] & 2) {
func_801477B4(play);
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
gSaveContext.save.weekEventReg[63] &= (u8)~1;
gSaveContext.save.weekEventReg[63] &= (u8)~2;
this->actionFunc = EnSyatekiMan_Swamp_Idle;
@@ -435,7 +435,7 @@ void EnSyatekiMan_Swamp_HandleNormalMessage(EnSyatekiMan* this, PlayState* play)
play->msgCtx.stateTimer = 4;
player->actor.freezeTimer = 0;
gSaveContext.minigameState = 3;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
this->actionFunc = EnSyatekiMan_Swamp_SetupGiveReward;
EnSyatekiMan_Swamp_SetupGiveReward(this, play);
break;
@@ -446,8 +446,8 @@ void EnSyatekiMan_Swamp_HandleNormalMessage(EnSyatekiMan* this, PlayState* play)
void EnSyatekiMan_Swamp_Talk(EnSyatekiMan* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (player->stateFlags1 & 0x20) {
player->stateFlags1 |= 0x20;
if (player->stateFlags1 & PLAYER_STATE1_20) {
player->stateFlags1 |= PLAYER_STATE1_20;
}
switch (Message_GetState(&play->msgCtx)) {
@@ -468,7 +468,7 @@ void EnSyatekiMan_Swamp_Talk(EnSyatekiMan* this, PlayState* play) {
if (Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = 0x43;
play->msgCtx.stateTimer = 4;
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
gSaveContext.save.weekEventReg[63] &= (u8)~1;
gSaveContext.save.weekEventReg[63] &= (u8)~2;
this->actionFunc = EnSyatekiMan_Swamp_Idle;
@@ -640,7 +640,7 @@ void EnSyatekiMan_Town_HandleChoice(EnSyatekiMan* this, PlayState* play) {
}
if (this->shootingGameState == SG_GAME_STATE_ONE_MORE_GAME) {
player->stateFlags3 &= ~0x400;
player->stateFlags3 &= ~PLAYER_STATE3_400;
gSaveContext.minigameState = 3;
}
@@ -676,7 +676,7 @@ void EnSyatekiMan_Town_HandleChoice(EnSyatekiMan* this, PlayState* play) {
}
if (this->shootingGameState == SG_GAME_STATE_ONE_MORE_GAME) {
player->stateFlags3 &= ~0x400;
player->stateFlags3 &= ~PLAYER_STATE3_400;
gSaveContext.minigameState = 3;
}
@@ -746,7 +746,7 @@ void EnSyatekiMan_Town_HandleNormalMessage(EnSyatekiMan* this, PlayState* play)
play->msgCtx.stateTimer = 4;
player->actor.freezeTimer = 0;
this->shootingGameState = SG_GAME_STATE_MOVING_PLAYER;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
gSaveContext.save.weekEventReg[63] |= 1;
gSaveContext.save.weekEventReg[63] &= (u8)~2;
this->actionFunc = EnSyatekiMan_Town_MovePlayerAndSayHighScore;
@@ -819,8 +819,8 @@ void EnSyatekiMan_Town_HandleNormalMessage(EnSyatekiMan* this, PlayState* play)
void EnSyatekiMan_Town_Talk(EnSyatekiMan* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (player->stateFlags1 & 0x20) {
player->stateFlags1 |= 0x20;
if (player->stateFlags1 & PLAYER_STATE1_20) {
player->stateFlags1 |= PLAYER_STATE1_20;
}
switch (Message_GetState(&play->msgCtx)) {
@@ -841,7 +841,7 @@ void EnSyatekiMan_Town_Talk(EnSyatekiMan* this, PlayState* play) {
if (Message_ShouldAdvance(play)) {
gSaveContext.save.weekEventReg[63] &= (u8)~1;
gSaveContext.save.weekEventReg[63] &= (u8)~2;
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
this->actionFunc = EnSyatekiMan_Town_Idle;
this->shootingGameState = SG_GAME_STATE_NONE;
}
@@ -902,7 +902,7 @@ void EnSyatekiMan_Swamp_GiveReward(EnSyatekiMan* this, PlayState* play) {
this->prevTextId = 0xA37;
}
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
this->actor.flags &= ~ACTOR_FLAG_10000;
this->score = 0;
this->shootingGameState = SG_GAME_STATE_NONE;
@@ -955,7 +955,7 @@ void EnSyatekiMan_Town_GiveReward(EnSyatekiMan* this, PlayState* play) {
if (CURRENT_DAY != 3) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
this->score = 0;
this->shootingGameState = SG_GAME_STATE_NONE;
gSaveContext.save.weekEventReg[63] &= (u8)~1;
@@ -966,7 +966,7 @@ void EnSyatekiMan_Town_GiveReward(EnSyatekiMan* this, PlayState* play) {
// This may be our last day in business...
Message_StartTextbox(play, 0x408, &this->actor);
this->prevTextId = 0x408;
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
this->actor.flags &= ~ACTOR_FLAG_10000;
this->score = 0;
this->shootingGameState = SG_GAME_STATE_NONE;
@@ -980,7 +980,7 @@ void EnSyatekiMan_Swamp_MovePlayerAndExplainRules(EnSyatekiMan* this, PlayState*
Player* player = GET_PLAYER(play);
if (EnSyatekiMan_MovePlayerToPos(play, sSwampPlayerPos)) {
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
this->shootingGameState = SG_GAME_STATE_EXPLAINING_RULES;
if (this->talkFlags != TALK_FLAG_SWAMP_HAS_EXPLAINED_THE_RULES) {
this->talkFlags = TALK_FLAG_SWAMP_HAS_EXPLAINED_THE_RULES;
@@ -1011,7 +1011,7 @@ void EnSyatekiMan_Swamp_StartGame(EnSyatekiMan* this, PlayState* play) {
sGameStartTimer = 30;
this->flagsIndex = 0;
this->score = 0;
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_FOUND);
this->dekuScrubFlags = (1 << 4) | (1 << 3) | (1 << 2) | (1 << 1) | (1 << 0);
this->guayFlags = 0;
@@ -1076,7 +1076,7 @@ void EnSyatekiMan_Swamp_RunGame(EnSyatekiMan* this, PlayState* play) {
this->actor.draw = EnSyatekiMan_Draw;
this->flagsIndex = 0;
this->currentWave = 0;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
sHasSpawnedGuaysForThisWave = false;
func_801A2C20();
this->actionFunc = EnSyatekiMan_Swamp_EndGame;
@@ -1085,7 +1085,7 @@ void EnSyatekiMan_Swamp_RunGame(EnSyatekiMan* this, PlayState* play) {
this->actor.draw = EnSyatekiMan_Draw;
this->flagsIndex = 0;
this->currentWave = 0;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
sHasSpawnedGuaysForThisWave = false;
func_801A2C20();
this->shootingGameState = SG_GAME_STATE_GIVING_BONUS;
@@ -1155,7 +1155,7 @@ void EnSyatekiMan_Swamp_AddBonusPoints(EnSyatekiMan* this, PlayState* play) {
static s32 sBonusTimer = 0;
Player* player = GET_PLAYER(play);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
if (play->interfaceCtx.unk_286 == 0) {
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_1] == SECONDS_TO_TIMER(0)) {
gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_1] = SECONDS_TO_TIMER(0);
@@ -1216,14 +1216,14 @@ void EnSyatekiMan_Town_StartGame(EnSyatekiMan* this, PlayState* play) {
player->actor.shape.rot.y = -0x8000;
player->actor.world.rot.y = player->actor.shape.rot.y;
play->unk_18790(play, -0x8000, &this->actor);
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
sGameStartTimer--;
} else if (sGameStartTimer > 0) {
player->actor.shape.rot.y = -0x8000;
player->actor.world.rot.y = player->actor.shape.rot.y;
sGameStartTimer--;
} else if (sGameStartTimer == 0) {
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~PLAYER_STATE1_20;
this->score = 0;
this->flagsIndex = 0;
this->perGameVar1.octorokState = SG_OCTO_STATE_INITIAL;
@@ -1352,7 +1352,7 @@ void EnSyatekiMan_Town_RunGame(EnSyatekiMan* this, PlayState* play) {
this->perGameVar1.octorokState = SG_OCTO_STATE_HIDING;
gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_1] = SECONDS_TO_TIMER(0);
gSaveContext.timerStates[TIMER_ID_MINIGAME_1] = TIMER_STATE_STOP;
player->stateFlags1 |= 0x20;
player->stateFlags1 |= PLAYER_STATE1_20;
sModFromLosingTime = 0;
this->actor.draw = EnSyatekiMan_Draw;
func_801A2C20();
+1 -1
View File
@@ -428,7 +428,7 @@ s32 func_80BE10BC(EnTab* this, PlayState* play) {
switch (this->unk_1D8) {
case 1:
if ((player->stateFlags1 & 0x40) && !(play->msgCtx.currentTextId <= 0x2B00) &&
if ((player->stateFlags1 & PLAYER_STATE1_40) && !(play->msgCtx.currentTextId <= 0x2B00) &&
(play->msgCtx.currentTextId < 0x2B08)) {
this->actor.child = &this->unk_1E4->actor;
this->unk_2FC |= 8;
@@ -420,9 +420,9 @@ void EnTalkGibud_Grab(EnTalkGibud* this, PlayState* play) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_ATTACK);
}
if (!(player->stateFlags2 & 0x80) || (player->unk_B62 != 0)) {
if ((player->unk_B62 != 0) && (player->stateFlags2 & 0x80)) {
player->stateFlags2 &= ~0x80;
if (!(player->stateFlags2 & PLAYER_STATE2_80) || (player->unk_B62 != 0)) {
if ((player->unk_B62 != 0) && (player->stateFlags2 & PLAYER_STATE2_80)) {
player->stateFlags2 &= ~PLAYER_STATE2_80;
player->unk_AE8 = 100;
}
@@ -824,8 +824,8 @@ void EnTalkGibud_Talk(EnTalkGibud* this, PlayState* play) {
} else {
func_80123D50(play, player, ITEM_BOTTLE, PLAYER_AP_BOTTLE);
}
player->stateFlags1 |= 0x20;
player->stateFlags1 |= 0x20000000;
player->stateFlags1 |= PLAYER_STATE1_20;
player->stateFlags1 |= PLAYER_STATE1_20000000;
this->actor.flags |= ACTOR_FLAG_100000;
EnTalkGibud_SetupDisappear(this);
} else {
@@ -868,14 +868,14 @@ void EnTalkGibud_Disappear(EnTalkGibud* this, PlayState* play) {
func_800B3030(play, &pos, &velocity, &accel, 100, 0, 1);
}
func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG);
player->stateFlags1 |= 0x20000000;
player->stateFlags1 |= PLAYER_STATE1_20000000;
this->disappearanceTimer--;
} else {
if (this->switchFlag != -1) {
Flags_SetSwitch(play, this->switchFlag);
}
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~0x20000000;
player->stateFlags1 &= ~PLAYER_STATE1_20;
player->stateFlags1 &= ~PLAYER_STATE1_20000000;
Actor_Kill(&this->actor);
}
}
@@ -895,8 +895,9 @@ s32 EnTalkGibud_PlayerInRangeWithCorrectState(EnTalkGibud* this, PlayState* play
Player* player = GET_PLAYER(play);
if ((Actor_DistanceToPoint(&player->actor, &this->actor.home.pos) < 150.0f) &&
!(player->stateFlags1 & (0x200000 | 0x80000 | 0x40000 | 0x4000 | 0x2000 | 0x80)) &&
!(player->stateFlags2 & (0x4000 | 0x80))) {
!(player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_40000 |
PLAYER_STATE1_80000 | PLAYER_STATE1_200000)) &&
!(player->stateFlags2 & (PLAYER_STATE2_80 | PLAYER_STATE2_4000))) {
return true;
}
@@ -211,7 +211,7 @@ void EnTanron3_Live(EnTanron3* this, PlayState* play) {
// If the player gets eaten by Gyorg, or if the attack timer ran out,
// stop chasing the player for a little bit.
if (this->workTimer[WORK_TIMER_ATTACK] == 0 || (player->stateFlags2 & 0x80)) {
if (this->workTimer[WORK_TIMER_ATTACK] == 0 || (player->stateFlags2 & PLAYER_STATE2_80)) {
this->workTimer[WORK_TIMER_WAIT] = 150;
this->isNonHostile = true;
}
@@ -333,7 +333,7 @@ void EnTest4_Init(Actor* thisx, PlayState* play) {
func_80A41D70(this, play);
if ((gSaveContext.cutsceneTrigger == 0) && (sCutscenes[this->unk_144] >= 0) &&
!(play->actorCtx.flags & ACTORCTX_FLAG_1)) {
player->stateFlags1 |= 0x200;
player->stateFlags1 |= PLAYER_STATE1_200;
}
} else {
if ((gSaveContext.save.time > CLOCK_TIME(18, 0)) || (gSaveContext.save.time < CLOCK_TIME(6, 0))) {
@@ -399,7 +399,7 @@ void func_80A42AB8(EnTest4* this, PlayState* play) {
Play_SetRespawnData(&play->state, RESPAWN_MODE_DOWN, Entrance_CreateFromSpawn(0), player->unk_3CE,
0xBFF, &player->unk_3C0, player->unk_3CC);
func_80169EFC(&play->state);
if (player->stateFlags1 & 0x800000) {
if (player->stateFlags1 & PLAYER_STATE1_800000) {
EnHorse* rideActor = (EnHorse*)player->rideActor;
if ((rideActor->type == HORSE_TYPE_EPONA) || (rideActor->type == HORSE_TYPE_2)) {
@@ -418,7 +418,7 @@ void func_80A42AB8(EnTest4* this, PlayState* play) {
}
if ((sCutscenes[this->unk_144] >= 0) && !(play->actorCtx.flags & ACTORCTX_FLAG_1)) {
player->stateFlags1 |= 0x200;
player->stateFlags1 |= PLAYER_STATE1_200;
this->unk_146 = gSaveContext.save.time;
} else {
if (this->unk_144 == 0) {
@@ -456,7 +456,7 @@ void func_80A42AB8(EnTest4* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0xFFF1;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_02;
player->stateFlags1 |= 0x200;
player->stateFlags1 |= PLAYER_STATE1_200;
Actor_Kill(&this->actor);
}
func_80A42198(this);
@@ -494,7 +494,7 @@ void func_80A42F20(EnTest4* this, PlayState* play) {
gSaveContext.save.time += CLOCK_TIME_MINUTE;
this->unk_146 = gSaveContext.save.time;
play->numSetupActors = -play->numSetupActors;
player->stateFlags1 &= ~0x200;
player->stateFlags1 &= ~PLAYER_STATE1_200;
}
} else {
this->actionFunc = func_80A42AB8;
@@ -563,7 +563,7 @@ void EnTest4_Update(Actor* thisx, PlayState* play) {
EnTest4* this = THIS;
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & 2)) {
if (!(player->stateFlags1 & PLAYER_STATE1_2)) {
this->actionFunc(this, play);
if (func_800FE4B8(play) != 0) {
@@ -418,7 +418,7 @@ void EnTest7_Init(Actor* thisx, PlayState* play2) {
}
ActorCutscene_SetIntentToPlay(play->playerActorCsIds[8]);
player2->stateFlags1 |= 0x20;
player2->stateFlags1 |= PLAYER_STATE1_20;
Lights_PointNoGlowSetInfo(&this->lightInfo, (Math_SinS(this->unk_1E8E) * 90.0f) + player->actor.world.pos.x,
player->actor.world.pos.y + 10.0f,
(Math_CosS(this->unk_1E8E) * 90.0f) + player->actor.world.pos.z, 255, 255, 255, 255);
@@ -759,7 +759,7 @@ void func_80AF2938(EnTest7* this, PlayState* play) {
this->unk_1E98 = player->actor.draw;
player->actor.draw = NULL;
player->stateFlags2 |= 0x20000000;
player->stateFlags2 |= PLAYER_STATE2_20000000;
this->unk_144 |= 2;
this->unk_148.unk_04 = 30.0f;
if (play->roomCtx.curRoom.unk3 != 1) {
@@ -911,7 +911,7 @@ void func_80AF2F98(EnTest7* this, PlayState* play) {
this->unk_148.unk_00 = this->unk_148.unk_04;
this->unk_148.unk_08 = ((this->unk_148.unk_04 * -0.29999998f) / 11.0f) + 0.7f;
this->unk_148.unk_0C = ((this->unk_148.unk_04 * -0.29999998f) / 11.0f) + 0.7f;
player->stateFlags2 &= ~0x20000000;
player->stateFlags2 &= ~PLAYER_STATE2_20000000;
}
}
@@ -919,8 +919,8 @@ void func_80AF30F4(EnTest7* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (this->unk_1E54 > 90) {
player->stateFlags1 &= ~0x20;
player->stateFlags1 &= ~0x20000000;
player->stateFlags1 &= ~PLAYER_STATE1_20;
player->stateFlags1 &= ~PLAYER_STATE1_20000000;
Actor_Kill(&this->actor);
}
}

Some files were not shown because too many files have changed in this diff Show More