mirror of https://github.com/zeldaret/mm.git
`z_actor` documentation pass (#1154)
* ActorContext_unk_1F4 * a * ACTOR_FLAG_IGNORE_QUAKE * ACTOR_FLAG_TALK_REQUESTED and ACTOR_FLAG_CANT_LOCK_ON * actorCtx->unkC => ctorCtx->halfDaysBit * HALFDAYBIT defines * actor.halfDaysBits * format * Actor_InitHalfDaysBit * Name actor-killing functions * cleanup variables.h a bit * DAWN * bss * Actor_RequestRumble and Actor_GetArrowDmgFlags * name vars of func_800BC620 * format * fix missing PLAYER_IA * Actor_OfferGetItem * Actor_SetClosestSecretDistance * freezeCategoryPlayerFlags1 Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * DROPFLAG_ * a * COLORFILTER * format * sCategoryFreezeMasks * Actor_OfferCarry * review Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * change hex to dec * COLORFILTER_INTENSITY_FLAG * format * review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * shiftedHalfDaysBit Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * cleanup * Undo Actor_RequestRumble * Undo ACTOR_FLAG_IGNORE_QUAKE * format * Remove COLORFILTER_GET_BUFFLAG * Undo Actor_KillAllFromUnloadedRooms * format * Update Actor_OfferGetItem comment * Update Actor_OfferGetItem description * diving * bss * namefixer * format * speed * review --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
parent
496b4928ea
commit
c833969ea7
|
|
@ -107,7 +107,7 @@ void func_809529AC(EnMs* this, PlayState* play) {
|
|||
func_800B8500(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0);
|
||||
this->actionFunc = func_80952A1C;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem(&this->actor, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ void func_809527F8(EnMs* this, PlayState* play) {
|
|||
}
|
||||
if (Message_ShouldAdvance(play) != 0) {
|
||||
func_801477B4(play);
|
||||
Actor_PickUp((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
}
|
||||
|
|
@ -198,7 +198,7 @@ void func_809527F8(EnMs* this, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
func_8019F208();
|
||||
Actor_PickUp((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Rupees_ChangeBy(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
|
|
@ -257,7 +257,7 @@ block_5:
|
|||
goto block_17;
|
||||
}
|
||||
func_801477B4(play);
|
||||
Actor_PickUp((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
block_7:
|
||||
|
|
@ -289,7 +289,7 @@ block_13:
|
|||
return;
|
||||
block_15:
|
||||
func_8019F208();
|
||||
Actor_PickUp((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Rupees_ChangeBy(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
|
|
@ -360,7 +360,7 @@ block_5:
|
|||
goto block_17;
|
||||
}
|
||||
func_801477B4(play);
|
||||
Actor_PickUp((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
block_7:
|
||||
|
|
@ -390,7 +390,7 @@ block_11:
|
|||
}
|
||||
|
||||
func_8019F208();
|
||||
Actor_PickUp((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Rupees_ChangeBy(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
|
|
@ -429,7 +429,7 @@ block_5:
|
|||
return;
|
||||
}
|
||||
func_801477B4(play);
|
||||
Actor_PickUp((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
block_7:
|
||||
|
|
@ -459,7 +459,7 @@ block_11:
|
|||
}
|
||||
|
||||
func_8019F208();
|
||||
Actor_PickUp((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Rupees_ChangeBy(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
|
|
@ -509,7 +509,7 @@ So let us rewrite the entire second half as a switch:
|
|||
}
|
||||
|
||||
func_8019F208();
|
||||
Actor_PickUp((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Rupees_ChangeBy(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
|
|
@ -541,7 +541,7 @@ There's a couple of other obvious things here:
|
|||
func_80151938(play, 0x937U);
|
||||
} else {
|
||||
func_8019F208();
|
||||
Actor_PickUp((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Rupees_ChangeBy(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
|
|
@ -589,7 +589,7 @@ block_5:
|
|||
return;
|
||||
}
|
||||
func_801477B4(play);
|
||||
Actor_PickUp((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
block_7:
|
||||
|
|
@ -606,7 +606,7 @@ block_7:
|
|||
func_80151938(play, 0x937U);
|
||||
} else {
|
||||
func_8019F208();
|
||||
Actor_PickUp((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Rupees_ChangeBy(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
|
|
@ -653,7 +653,7 @@ void func_809527F8(EnMs* this, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
func_801477B4(play);
|
||||
Actor_PickUp((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
break;
|
||||
|
||||
|
|
@ -671,7 +671,7 @@ void func_809527F8(EnMs* this, PlayState* play) {
|
|||
func_80151938(play, 0x937U);
|
||||
} else {
|
||||
func_8019F208();
|
||||
Actor_PickUp((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Rupees_ChangeBy(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
|
|
@ -704,7 +704,7 @@ void func_809527F8(EnMs* this, PlayState* play) {
|
|||
case 5:
|
||||
if (Message_ShouldAdvance(play) != 0) {
|
||||
func_801477B4(play);
|
||||
Actor_PickUp((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
break;
|
||||
|
|
@ -723,7 +723,7 @@ void func_809527F8(EnMs* this, PlayState* play) {
|
|||
func_80151938(play, 0x937U);
|
||||
} else {
|
||||
func_8019F208();
|
||||
Actor_PickUp((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
|
||||
Rupees_ChangeBy(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ glabel func_809529AC
|
|||
/* 0003D8 809529F8 C484009C */ lwc1 $f4, 0x9c($a0)
|
||||
/* 0003DC 809529FC 8C870098 */ lw $a3, 0x98($a0)
|
||||
/* 0003E0 80952A00 24060035 */ addiu $a2, $zero, 0x35
|
||||
/* 0003E4 80952A04 0C02E287 */ jal Actor_PickUp
|
||||
/* 0003E4 80952A04 0C02E287 */ jal Actor_OfferGetItem
|
||||
/* 0003E8 80952A08 E7A40010 */ swc1 $f4, 0x10($sp)
|
||||
.L80952A0C:
|
||||
/* 0003EC 80952A0C 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
|
|
@ -46,7 +46,7 @@ void func_809529AC(EnMs* this, PlayState* play) {
|
|||
func_800B8500(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0);
|
||||
this->actionFunc = func_80952A1C;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem(&this->actor, play, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@ void Flags_SetCollectible(PlayState* play, s32 flag);
|
|||
|
||||
void TitleCard_InitBossName(GameState* gameState, TitleCardContext* titleCtx, TexturePtr texture, s16 x, s16 y, u8 width, u8 height);
|
||||
|
||||
s32 func_800B648C(PlayState* play, s32 arg1, s32 arg2, f32 arg3, Vec3f* arg4);
|
||||
s32 func_800B648C(PlayState* play, s32 arg1, s32 timer, f32 arg3, Vec3f* arg4);
|
||||
f32 func_800B64FC(PlayState* play, f32 arg1, Vec3f* arg2, u32* arg3);
|
||||
void* func_800B6584(PlayState* play, s16 id, void* arg2, size_t size);
|
||||
void* func_800B6608(PlayState* play, s16 id);
|
||||
|
|
@ -691,13 +691,13 @@ s32 func_800B886C(Actor* actor, PlayState* play);
|
|||
void Actor_GetScreenPos(PlayState* play, Actor* actor, s16* x, s16* y);
|
||||
s32 Actor_OnScreen(PlayState* play, Actor* actor);
|
||||
s32 Actor_HasParent(Actor* actor, PlayState* play);
|
||||
s32 Actor_PickUp(Actor* actor, PlayState* play, GetItemId getItemId, f32 xzRange, f32 yRange);
|
||||
s32 Actor_PickUpNearby(Actor* actor, PlayState* play, GetItemId getItemId);
|
||||
s32 Actor_LiftActor(Actor* actor, PlayState* play);
|
||||
s32 Actor_PickUpFar(Actor* actor, PlayState* play, GetItemId getItemId);
|
||||
s32 Actor_OfferGetItem(Actor* actor, PlayState* play, GetItemId getItemId, f32 xzRange, f32 yRange);
|
||||
s32 Actor_OfferGetItemNearby(Actor* actor, PlayState* play, GetItemId getItemId);
|
||||
s32 Actor_OfferCarry(Actor* actor, PlayState* play);
|
||||
s32 Actor_OfferGetItemFar(Actor* actor, PlayState* play, GetItemId getItemId);
|
||||
s32 Actor_HasNoParent(Actor* actor, PlayState* play);
|
||||
void func_800B8C20(Actor* actorA, Actor* actorB, PlayState* play);
|
||||
void func_800B8C50(Actor* actor, PlayState* play);
|
||||
void Actor_SetClosestSecretDistance(Actor* actor, PlayState* play);
|
||||
s32 Actor_HasRider(PlayState* play, Actor* horse);
|
||||
s32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide);
|
||||
s32 Actor_HasNoRider(PlayState* play, Actor* horse);
|
||||
|
|
@ -718,37 +718,37 @@ void func_800B9084(Actor* actor);
|
|||
void func_800B9098(Actor* actor);
|
||||
s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 bgId, Vec3f* arg4);
|
||||
void Actor_DeactivateLens(PlayState* play);
|
||||
void func_800B9120(ActorContext* actorCtx);
|
||||
void Actor_InitHalfDaysBit(ActorContext* actorCtx);
|
||||
void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEntry);
|
||||
void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx);
|
||||
s32 Actor_AddToLensActors(PlayState* play, Actor* actor);
|
||||
void Actor_DrawAll(PlayState* play, ActorContext* actorCtx);
|
||||
void func_800BA6FC(PlayState* play, ActorContext* actorCtx);
|
||||
void Actor_KillAllWithMissingObject(PlayState* play, ActorContext* actorCtx);
|
||||
void func_800BA798(PlayState* play, ActorContext* actorCtx);
|
||||
void Actor_CleanupContext(ActorContext* actorCtx, PlayState* play);
|
||||
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s32 params);
|
||||
Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s16 index, f32 x, f32 y, f32 z, s16 rotX, s16 rotY, s16 rotZ, s32 params, u32 cutscene, s32 arg11, Actor* parent);
|
||||
Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s16 index, f32 x, f32 y, f32 z, s16 rotX, s16 rotY, s16 rotZ, s32 params, u32 cutscene, u32 halfDaysBits, Actor* parent);
|
||||
Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s32 params);
|
||||
void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx);
|
||||
void Enemy_StartFinishingBlow(PlayState* play, Actor* actor);
|
||||
s16 func_800BBAC0(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3);
|
||||
s16 func_800BBB74(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3);
|
||||
void Actor_SpawnBodyParts(Actor* actor, PlayState* play, s32 arg2, Gfx** dList);
|
||||
void Actor_SpawnBodyParts(Actor* actor, PlayState* play, s32 partParams, Gfx** dList);
|
||||
void Actor_SpawnFloorDustRing(PlayState* play, Actor* actor, Vec3f* posXZ, f32 radius, s32 countMinusOne, f32 randAccelWeight, s16 scale, s16 scaleStep, u8 useLighting);
|
||||
void func_800BBFB0(PlayState* play, Vec3f* position, f32 arg2, s32 arg3, s16 arg4, s16 scaleStep, u8 arg6);
|
||||
void func_800BC154(PlayState* play, ActorContext* actorCtx, Actor* actor, u8 actorCategory);
|
||||
s32 func_800BC188(s32 index);
|
||||
Actor* func_800BC270(PlayState* play, Actor* actor, f32 arg2, s32 arg3);
|
||||
Actor* func_800BC444(PlayState* play, Actor* actor, f32 arg2);
|
||||
u32 Actor_GetArrowDmgFlags(s32 params);
|
||||
Actor* func_800BC270(PlayState* play, Actor* actor, f32 distance, u32 dmgFlags);
|
||||
Actor* func_800BC444(PlayState* play, Actor* actor, f32 distance);
|
||||
s16 Actor_TestFloorInDirection(Actor* actor, PlayState* play, f32 distance, s16 angle);
|
||||
s32 Actor_IsTargeted(PlayState* play, Actor* actor);
|
||||
s32 Actor_OtherIsTargeted(PlayState* play, Actor* actor);
|
||||
void func_800BC620(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play);
|
||||
void func_800BC620(Vec3f* pos, Vec3f* scale, u8 alpha, PlayState* play);
|
||||
void Actor_AddQuake(PlayState* play, s16 verticalMag, s16 countdown);
|
||||
void Actor_AddQuakeWithSpeed(PlayState* play, s16 verticalMag, s16 countdown, s16 speed);
|
||||
void func_800BC848(Actor* actor, PlayState* play, s16 y, s16 countdown);
|
||||
void Actor_DrawDoorLock(PlayState* play, s32 frame, s32 type);
|
||||
void Actor_SetColorFilter(Actor* actor, u16 colorFlag, u16 colorIntensityMax, u16 xluFlag, u16 duration);
|
||||
void Actor_SetColorFilter(Actor* actor, u16 colorFlag, u16 colorIntensityMax, u16 bufFlag, u16 duration);
|
||||
Hilite* func_800BCBF4(Vec3f* arg0, PlayState* play);
|
||||
Hilite* func_800BCC68(Vec3f* arg0, PlayState* play);
|
||||
void Actor_GetClosestPosOnPath(Vec3s* points, s32 numPoints, Vec3f* srcPos, Vec3f* dstPos, s32 isPathLoop);
|
||||
|
|
@ -767,7 +767,7 @@ s32 func_800BE184(PlayState* play, Actor* actor, f32 xzDist, s16 arg3, s16 arg4,
|
|||
u8 Actor_ApplyDamage(Actor* actor);
|
||||
void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo);
|
||||
void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSphere);
|
||||
void func_800BE33C(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3);
|
||||
void func_800BE33C(Vec3f* arg0, Vec3f* arg1, Vec3s* dst, s32 arg3);
|
||||
void func_800BE3D0(Actor* actor, s16 angle, Vec3s* arg2);
|
||||
void func_800BE504(Actor* actor, ColliderCylinder* collider);
|
||||
void func_800BE568(Actor* actor, ColliderSphere* collider);
|
||||
|
|
|
|||
|
|
@ -378,23 +378,7 @@ extern EffectSsOverlay gParticleOverlayTable[39];
|
|||
// extern s32 sEntryIndex;
|
||||
// extern u32 sCurrentBit;
|
||||
// extern s32 sTimer;
|
||||
extern f32 actorMovementScale;
|
||||
extern TargetRangeParams gTargetRanges[];
|
||||
extern s16 D_801AED48[8];
|
||||
extern Color_RGBA8 actorDefaultHitColor;
|
||||
// extern UNK_TYPE1 D_801AED8C;
|
||||
// extern UNK_TYPE4 D_801AED98;
|
||||
// extern UNK_TYPE4 D_801AEDA4;
|
||||
// extern UNK_TYPE1 D_801AEDB0;
|
||||
// extern UNK_TYPE4 D_801AEDD4;
|
||||
// extern UNK_TYPE4 D_801AEE28;
|
||||
// extern UNK_TYPE4 D_801AEE30;
|
||||
// extern UNK_TYPE2 D_801AEE4C;
|
||||
extern Gfx D_801AEF88[];
|
||||
extern Gfx D_801AEFA0[];
|
||||
// extern UNK_TYPE1 D_801AEFB8;
|
||||
// extern UNK_TYPE1 D_801AEFBC;
|
||||
// extern UNK_TYPE1 D_801AEFC0;
|
||||
|
||||
extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX];
|
||||
extern ActorId gMaxActorId;
|
||||
extern BgCheckSceneSubdivisionEntry sSceneSubdivisionList[];
|
||||
|
|
|
|||
|
|
@ -815,11 +815,6 @@ typedef struct {
|
|||
/* 0x14 */ Gfx* dList;
|
||||
} VisMono; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ f32 rangeSq;
|
||||
/* 0x4 */ f32 leashScale;
|
||||
} TargetRangeParams; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8* value;
|
||||
/* 0x4 */ const char* name;
|
||||
|
|
|
|||
|
|
@ -101,13 +101,13 @@ typedef struct {
|
|||
/* 0x1C */ ActorFunc draw;
|
||||
} ActorInit; // size = 0x20
|
||||
|
||||
typedef enum {
|
||||
ALLOCTYPE_NORMAL,
|
||||
ALLOCTYPE_ABSOLUTE,
|
||||
ALLOCTYPE_PERMANENT
|
||||
typedef enum AllocType {
|
||||
/* 0 */ ALLOCTYPE_NORMAL,
|
||||
/* 1 */ ALLOCTYPE_ABSOLUTE,
|
||||
/* 2 */ ALLOCTYPE_PERMANENT
|
||||
} AllocType;
|
||||
|
||||
typedef struct {
|
||||
typedef struct ActorOverlay {
|
||||
/* 0x00 */ uintptr_t vromStart;
|
||||
/* 0x04 */ uintptr_t vromEnd;
|
||||
/* 0x08 */ void* vramStart;
|
||||
|
|
@ -157,7 +157,7 @@ typedef struct Actor {
|
|||
/* 0x01C */ s16 params; // Configurable variable set by the actor's spawn data; original name: "args_data"
|
||||
/* 0x01E */ s8 objBankIndex; // Object bank index of the actor's object dependency; original name: "bank"
|
||||
/* 0x01F */ s8 targetMode; // Controls how far the actor can be targeted from and how far it can stay locked on
|
||||
/* 0x020 */ s16 unk20;
|
||||
/* 0x020 */ s16 halfDaysBits; // Bitmask indicating which half-days this actor is allowed to not be killed(?) (TODO: not sure how to word this). If the current halfDayBit is not part of this mask then the actor is killed when spawning the setup actors
|
||||
/* 0x024 */ PosRot world; // Position/rotation in the world
|
||||
/* 0x038 */ s8 cutscene;
|
||||
/* 0x039 */ u8 audioFlags; // Another set of flags? Seems related to sfx or bgm
|
||||
|
|
@ -366,6 +366,13 @@ typedef struct {
|
|||
/* 0xE */ s16 intensity;
|
||||
} TitleCardContext; // size = 0x10
|
||||
|
||||
typedef struct ActorContext_unk_1F4 {
|
||||
/* 0x00 */ u8 unk_00;
|
||||
/* 0x01 */ u8 timer;
|
||||
/* 0x04 */ f32 unk_04;
|
||||
/* 0x08 */ Vec3f unk_08;
|
||||
} ActorContext_unk_1F4; // size = 0x14
|
||||
|
||||
typedef struct ActorContext_unk_20C {
|
||||
/* 0x0 */ s16 id;
|
||||
/* 0x2 */ s8 isDynamicallyInitialised;
|
||||
|
|
@ -396,6 +403,21 @@ typedef enum {
|
|||
// Target size when activated
|
||||
#define LENS_MASK_ACTIVE_SIZE 100
|
||||
|
||||
#define HALFDAYBIT_DAY0_DAWN (1 << 9)
|
||||
#define HALFDAYBIT_DAY0_NIGHT (1 << 8)
|
||||
#define HALFDAYBIT_DAY1_DAWN (1 << 7)
|
||||
#define HALFDAYBIT_DAY1_NIGHT (1 << 6)
|
||||
#define HALFDAYBIT_DAY2_DAWN (1 << 5)
|
||||
#define HALFDAYBIT_DAY2_NIGHT (1 << 4)
|
||||
#define HALFDAYBIT_DAY3_DAWN (1 << 3)
|
||||
#define HALFDAYBIT_DAY3_NIGHT (1 << 2)
|
||||
#define HALFDAYBIT_DAY4_DAWN (1 << 1)
|
||||
#define HALFDAYBIT_DAY4_NIGHT (1 << 0)
|
||||
|
||||
#define HALFDAYBIT_DAWNS (HALFDAYBIT_DAY0_DAWN | HALFDAYBIT_DAY1_DAWN | HALFDAYBIT_DAY2_DAWN | HALFDAYBIT_DAY3_DAWN | HALFDAYBIT_DAY4_DAWN)
|
||||
#define HALFDAYBIT_NIGHTS (HALFDAYBIT_DAY0_NIGHT | HALFDAYBIT_DAY1_NIGHT | HALFDAYBIT_DAY2_NIGHT | HALFDAYBIT_DAY3_NIGHT | HALFDAYBIT_DAY4_NIGHT)
|
||||
#define HALFDAYBIT_ALL (HALFDAYBIT_DAWNS | HALFDAYBIT_NIGHTS)
|
||||
|
||||
typedef struct ActorContext {
|
||||
/* 0x000 */ u8 freezeFlashTimer;
|
||||
/* 0x001 */ UNK_TYPE1 pad1;
|
||||
|
|
@ -405,7 +427,7 @@ typedef struct ActorContext {
|
|||
/* 0x005 */ u8 flags;
|
||||
/* 0x006 */ UNK_TYPE1 pad6[0x5];
|
||||
/* 0x00B */ s8 lensActorsDrawn;
|
||||
/* 0x00C */ s16 unkC;
|
||||
/* 0x00C */ s16 halfDaysBit; // A single bit indicating the current half-day. It is one of HALFDAYBIT_DAYX_ macro values
|
||||
/* 0x00E */ u8 totalLoadedActors;
|
||||
/* 0x00F */ u8 numLensActors;
|
||||
/* 0x010 */ ActorListEntry actorLists[ACTORCAT_MAX];
|
||||
|
|
@ -413,11 +435,7 @@ typedef struct ActorContext {
|
|||
/* 0x120 */ TargetContext targetContext;
|
||||
/* 0x1B8 */ ActorContextSceneFlags sceneFlags;
|
||||
/* 0x1E4 */ TitleCardContext titleCtxt;
|
||||
/* 0x1F4 */ u8 unk1F4;
|
||||
/* 0x1F5 */ u8 unk1F5;
|
||||
/* 0x1F6 */ UNK_TYPE1 pad1F6[0x2];
|
||||
/* 0x1F8 */ f32 unk1F8;
|
||||
/* 0x1FC */ Vec3f unk1FC;
|
||||
/* 0x1F4 */ ActorContext_unk_1F4 unk_1F4;
|
||||
/* 0x208 */ UNK_TYPE1 unk_208[0x4];
|
||||
/* 0x20C */ ActorContext_unk_20C unk_20C[8];
|
||||
/* 0x24C */ UNK_TYPE1 unk_24C[0x4];
|
||||
|
|
@ -477,8 +495,8 @@ typedef enum {
|
|||
#define ACTOR_FLAG_40 (1 << 6)
|
||||
// hidden or revealed by Lens of Truth (depending on room lensMode)
|
||||
#define ACTOR_FLAG_REACT_TO_LENS (1 << 7)
|
||||
// Related to talk
|
||||
#define ACTOR_FLAG_100 (1 << 8)
|
||||
// Player has requested to talk to the actor; Player uses this flag differently than every other actor
|
||||
#define ACTOR_FLAG_TALK_REQUESTED (1 << 8)
|
||||
//
|
||||
#define ACTOR_FLAG_200 (1 << 9)
|
||||
//
|
||||
|
|
@ -515,8 +533,8 @@ typedef enum {
|
|||
#define ACTOR_FLAG_2000000 (1 << 25)
|
||||
//
|
||||
#define ACTOR_FLAG_4000000 (1 << 26)
|
||||
//
|
||||
#define ACTOR_FLAG_8000000 (1 << 27)
|
||||
// Prevents locking on with Z targeting an actor even if Tatl is floating over it
|
||||
#define ACTOR_FLAG_CANT_LOCK_ON (1 << 27)
|
||||
//
|
||||
#define ACTOR_FLAG_10000000 (1 << 28)
|
||||
//
|
||||
|
|
@ -526,6 +544,25 @@ typedef enum {
|
|||
//
|
||||
#define ACTOR_FLAG_80000000 (1 << 31)
|
||||
|
||||
#define DROPFLAG_NONE (0)
|
||||
#define DROPFLAG_1 (1 << 0)
|
||||
#define DROPFLAG_2 (1 << 1)
|
||||
#define DROPFLAG_20 (1 << 5)
|
||||
|
||||
#define COLORFILTER_GET_COLORFLAG(colorFilterParams) ((colorFilterParams) & 0xC000)
|
||||
#define COLORFILTER_GET_COLORINTENSITY(colorFilterParams) (((colorFilterParams) & 0x1F00) >> 5)
|
||||
#define COLORFILTER_GET_DURATION(colorFilterParams) ((colorFilterParams) & 0xFF)
|
||||
|
||||
#define COLORFILTER_COLORFLAG_NONE 0xC000
|
||||
#define COLORFILTER_COLORFLAG_GRAY 0x8000
|
||||
#define COLORFILTER_COLORFLAG_RED 0x4000
|
||||
#define COLORFILTER_COLORFLAG_BLUE 0x0000
|
||||
|
||||
#define COLORFILTER_INTENSITY_FLAG 0x8000
|
||||
|
||||
#define COLORFILTER_BUFFLAG_XLU 0x2000
|
||||
#define COLORFILTER_BUFFLAG_OPA 0x0000
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ CLEAR_TAG_SMALL_EXPLOSION,
|
||||
/* 0x01 */ CLEAR_TAG_LARGE_EXPLOSION,
|
||||
|
|
@ -641,6 +678,11 @@ typedef enum {
|
|||
/* 0xFF */ TATL_HINT_ID_NONE = 0xFF
|
||||
} TatlHintId;
|
||||
|
||||
typedef struct TargetRangeParams {
|
||||
/* 0x0 */ f32 rangeSq;
|
||||
/* 0x4 */ f32 leashScale;
|
||||
} TargetRangeParams; // size = 0x8
|
||||
|
||||
typedef enum NpcTalkState {
|
||||
/* 0 */ NPC_TALK_STATE_IDLE, // NPC not currently talking to player
|
||||
/* 1 */ NPC_TALK_STATE_TALKING, // NPC is currently talking to player
|
||||
|
|
@ -668,4 +710,9 @@ typedef struct NpcInteractInfo {
|
|||
/* 0x24 */ UNK_TYPE1 unk_24[0x4];
|
||||
} NpcInteractInfo; // size = 0x28
|
||||
|
||||
extern TargetRangeParams gTargetRanges[];
|
||||
extern s16 D_801AED48[8];
|
||||
extern Gfx D_801AEF88[];
|
||||
extern Gfx D_801AEFA0[];
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ extern Mtx D_801ED8E0; // 1 func
|
|||
extern Actor* D_801ED920; // 2 funcs. 1 out of z_actor
|
||||
|
||||
// Internal forward declarations
|
||||
void func_800BA8B8(PlayState* play, ActorContext* actorCtx);
|
||||
void Actor_KillAllOnHalfDayChange(PlayState* play, ActorContext* actorCtx);
|
||||
Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, PlayState* play);
|
||||
Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play);
|
||||
void func_800BB8EC(GameState* gameState, ActorContext* actorCtx, Actor** arg2, Actor** arg3, Player* player);
|
||||
|
|
@ -129,9 +129,9 @@ void ActorShadow_DrawSquare(Actor* actor, Lights* lights, PlayState* play) {
|
|||
}
|
||||
|
||||
void ActorShadow_DrawWhiteCircle(Actor* actor, Lights* lights, PlayState* play) {
|
||||
static Color_RGBA8 color = { 255, 255, 255, 255 };
|
||||
static Color_RGBA8 sColor = { 255, 255, 255, 255 };
|
||||
|
||||
ActorShadow_Draw(actor, lights, play, gCircleShadowDL, &color);
|
||||
ActorShadow_Draw(actor, lights, play, gCircleShadowDL, &sColor);
|
||||
}
|
||||
|
||||
void ActorShadow_DrawHorse(Actor* actor, Lights* lights, PlayState* play) {
|
||||
|
|
@ -195,7 +195,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* mapper, PlayState* play) {
|
|||
if (distToFloor < 200.0f) {
|
||||
MtxF sp13C;
|
||||
MtxF spFC;
|
||||
CollisionPoly* spF8;
|
||||
CollisionPoly* poly;
|
||||
s32 bgId;
|
||||
f32 floorHeight[2];
|
||||
Light* firstLight = &mapper->l.l[0];
|
||||
|
|
@ -224,7 +224,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* mapper, PlayState* play) {
|
|||
|
||||
for (i = 0; i < ARRAY_COUNT(floorHeight); i++, spB8 >>= 1) {
|
||||
feetPosPtr->y += 50.0f;
|
||||
*floorHeightPtr = Play_GetFloorSurfaceImpl(play, &sp13C, &spF8, &bgId, feetPosPtr);
|
||||
*floorHeightPtr = Play_GetFloorSurfaceImpl(play, &sp13C, &poly, &bgId, feetPosPtr);
|
||||
feetPosPtr->y -= 50.0f;
|
||||
|
||||
distToFloor = feetPosPtr->y - *floorHeightPtr;
|
||||
|
|
@ -235,7 +235,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* mapper, PlayState* play) {
|
|||
actor->shape.feetFloorFlags |= spB8;
|
||||
|
||||
if ((actor->depthInWater < 0.0f) && (bgId == 0x32) && ((actor->shape.unk_17 & spB8) != 0)) {
|
||||
if (func_800C9C24(&play->colCtx, spF8, bgId, 1) != 0) {
|
||||
if (func_800C9C24(&play->colCtx, poly, bgId, 1)) {
|
||||
SkinMatrix_MtxFCopy(&sp13C, &spFC);
|
||||
SkinMatrix_MulYRotation(&spFC, actor->shape.rot.y);
|
||||
EffFootmark_Add(play, &spFC, actor, i, feetPosPtr, (actor->shape.shadowScale * 0.3f),
|
||||
|
|
@ -560,7 +560,7 @@ void Actor_DrawZTarget(TargetContext* targetCtx, PlayState* play) {
|
|||
}
|
||||
|
||||
actor = targetCtx->unk_94;
|
||||
if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_8000000)) {
|
||||
if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_CANT_LOCK_ON)) {
|
||||
TatlColor* color = &sTatlColorList[actor->category];
|
||||
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x07);
|
||||
|
|
@ -907,39 +907,41 @@ s32 func_800B6434(PlayState* play, TitleCardContext* titleCtx) {
|
|||
return true;
|
||||
}
|
||||
|
||||
// ActorContext_1F4 Init
|
||||
void func_800B6468(PlayState* play) {
|
||||
play->actorCtx.unk1F5 = 0;
|
||||
play->actorCtx.unk_1F4.timer = 0;
|
||||
}
|
||||
|
||||
// ActorContext_1F4 Update
|
||||
void func_800B6474(PlayState* play) {
|
||||
if (play->actorCtx.unk1F5 != 0) {
|
||||
play->actorCtx.unk1F5--;
|
||||
}
|
||||
DECR(play->actorCtx.unk_1F4.timer);
|
||||
}
|
||||
|
||||
s32 func_800B648C(PlayState* play, s32 arg1, s32 arg2, f32 arg3, Vec3f* arg4) {
|
||||
if ((play->actorCtx.unk1F5 != 0) && (arg3 < play->actorCtx.unk1F8)) {
|
||||
// ActorContext_1F4 setter something
|
||||
s32 func_800B648C(PlayState* play, s32 arg1, s32 timer, f32 arg3, Vec3f* arg4) {
|
||||
if ((play->actorCtx.unk_1F4.timer != 0) && (arg3 < play->actorCtx.unk_1F4.unk_04)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
play->actorCtx.unk1F4 = arg1;
|
||||
play->actorCtx.unk1F5 = arg2;
|
||||
play->actorCtx.unk1F8 = arg3;
|
||||
Math_Vec3f_Copy(&play->actorCtx.unk1FC, arg4);
|
||||
play->actorCtx.unk_1F4.unk_00 = arg1;
|
||||
play->actorCtx.unk_1F4.timer = timer;
|
||||
play->actorCtx.unk_1F4.unk_04 = arg3;
|
||||
Math_Vec3f_Copy(&play->actorCtx.unk_1F4.unk_08, arg4);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ActorContext_1F4 getter something
|
||||
f32 func_800B64FC(PlayState* play, f32 arg1, Vec3f* arg2, u32* arg3) {
|
||||
f32 temp_f8;
|
||||
|
||||
if ((play->actorCtx.unk1F5 == 0) || (arg1 == 0.0f)) {
|
||||
if ((play->actorCtx.unk_1F4.timer == 0) || (arg1 == 0.0f)) {
|
||||
return -1.0f;
|
||||
}
|
||||
|
||||
temp_f8 = Math_Vec3f_DistXYZ(&play->actorCtx.unk1FC, arg2) / arg1;
|
||||
*arg3 = play->actorCtx.unk1F4;
|
||||
return play->actorCtx.unk1F8 - temp_f8;
|
||||
temp_f8 = Math_Vec3f_DistXYZ(&play->actorCtx.unk_1F4.unk_08, arg2) / arg1;
|
||||
*arg3 = play->actorCtx.unk_1F4.unk_00;
|
||||
return play->actorCtx.unk_1F4.unk_04 - temp_f8;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1010,7 +1012,7 @@ void* func_800B6608(PlayState* play, s16 id) {
|
|||
* Retrieves the first pointer stored with the id `id`.
|
||||
* If there's no pointer stored with that id, NULL is returned.
|
||||
*
|
||||
* Used only by EnLiftNuts.
|
||||
* Used only by EnGamelupy.
|
||||
*/
|
||||
void* func_800B6680(PlayState* play, s16 id) {
|
||||
ActorContext_unk_20C* entry = play->actorCtx.unk_20C;
|
||||
|
|
@ -1101,17 +1103,17 @@ void Actor_Destroy(Actor* actor, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
f32 actorMovementScale = 1.0f;
|
||||
f32 sActorMovementScale = 1.0f;
|
||||
|
||||
void Actor_SetMovementScale(s32 scale) {
|
||||
actorMovementScale = scale * 0.5f;
|
||||
sActorMovementScale = scale * 0.5f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update actor position using velocity and any push from z_collision_check.
|
||||
*/
|
||||
void Actor_UpdatePos(Actor* actor) {
|
||||
f32 speedRate = actorMovementScale;
|
||||
f32 speedRate = sActorMovementScale;
|
||||
|
||||
actor->world.pos.x += (actor->velocity.x * speedRate) + actor->colChkInfo.displacement.x;
|
||||
actor->world.pos.y += (actor->velocity.y * speedRate) + actor->colChkInfo.displacement.y;
|
||||
|
|
@ -1302,12 +1304,16 @@ f32 Player_GetHeight(Player* player) {
|
|||
default:
|
||||
case PLAYER_FORM_FIERCE_DEITY:
|
||||
return extraHeight + 124.0f;
|
||||
|
||||
case PLAYER_FORM_GORON:
|
||||
return extraHeight + ((player->stateFlags3 & PLAYER_STATE3_1000) ? 34.0f : 80.0f);
|
||||
|
||||
case PLAYER_FORM_ZORA:
|
||||
return extraHeight + 68.0f;
|
||||
|
||||
case PLAYER_FORM_DEKU:
|
||||
return extraHeight + 36.0f;
|
||||
|
||||
case PLAYER_FORM_HUMAN:
|
||||
return extraHeight + 44.0f;
|
||||
}
|
||||
|
|
@ -1785,7 +1791,7 @@ f32 func_800B82EC(Actor* actor, Player* player, s16 angle) {
|
|||
s16 yaw = ABS_ALT(temp_v0);
|
||||
|
||||
if (player->targetedActor != NULL) {
|
||||
if ((yaw > 0x4000) || ((actor->flags & ACTOR_FLAG_8000000))) {
|
||||
if ((yaw > 0x4000) || ((actor->flags & ACTOR_FLAG_CANT_LOCK_ON))) {
|
||||
return FLT_MAX;
|
||||
}
|
||||
|
||||
|
|
@ -1813,7 +1819,7 @@ s32 func_800B83BC(Actor* actor, f32 arg1) {
|
|||
}
|
||||
|
||||
s32 func_800B83F8(Actor* actor, Player* player, s32 flag) {
|
||||
if ((actor->update == NULL) || !(actor->flags & ACTOR_FLAG_1) || (actor->flags & ACTOR_FLAG_8000000)) {
|
||||
if ((actor->update == NULL) || !(actor->flags & ACTOR_FLAG_1) || (actor->flags & ACTOR_FLAG_CANT_LOCK_ON)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1835,24 +1841,34 @@ s32 func_800B83F8(Actor* actor, Player* player, s32 flag) {
|
|||
}
|
||||
|
||||
s16 D_801AED48[] = {
|
||||
0x101, 0x141, 0x111, 0x151, 0x105, 0x145, 0x115, 0x155,
|
||||
HALFDAYBIT_DAY0_NIGHT | HALFDAYBIT_DAY4_NIGHT,
|
||||
HALFDAYBIT_DAY0_NIGHT | HALFDAYBIT_DAY1_NIGHT | HALFDAYBIT_DAY4_NIGHT,
|
||||
HALFDAYBIT_DAY0_NIGHT | HALFDAYBIT_DAY2_NIGHT | HALFDAYBIT_DAY4_NIGHT,
|
||||
HALFDAYBIT_DAY0_NIGHT | HALFDAYBIT_DAY1_NIGHT | HALFDAYBIT_DAY2_NIGHT | HALFDAYBIT_DAY4_NIGHT,
|
||||
HALFDAYBIT_DAY0_NIGHT | HALFDAYBIT_DAY3_NIGHT | HALFDAYBIT_DAY4_NIGHT,
|
||||
HALFDAYBIT_DAY0_NIGHT | HALFDAYBIT_DAY1_NIGHT | HALFDAYBIT_DAY3_NIGHT | HALFDAYBIT_DAY4_NIGHT,
|
||||
HALFDAYBIT_DAY0_NIGHT | HALFDAYBIT_DAY2_NIGHT | HALFDAYBIT_DAY3_NIGHT | HALFDAYBIT_DAY4_NIGHT,
|
||||
HALFDAYBIT_DAY0_NIGHT | HALFDAYBIT_DAY1_NIGHT | HALFDAYBIT_DAY2_NIGHT | HALFDAYBIT_DAY3_NIGHT |
|
||||
HALFDAYBIT_DAY4_NIGHT,
|
||||
};
|
||||
|
||||
s32 Actor_ProcessTalkRequest(Actor* actor, GameState* gameState) {
|
||||
if (actor->flags & ACTOR_FLAG_100) {
|
||||
actor->flags &= ~ACTOR_FLAG_100;
|
||||
if (actor->flags & ACTOR_FLAG_TALK_REQUESTED) {
|
||||
actor->flags &= ~ACTOR_FLAG_TALK_REQUESTED;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Actor_PickUpExchange? Seems to be called with exchangeItemId -1 if the same actor used Actor_PickUp
|
||||
// Actor_OfferTalk / Actor_OfferGetItemExchange? Seems to be called with PLAYER_IA_MINUS1 if the same actor used
|
||||
// Actor_OfferGetItem.
|
||||
// This function is also used to toggle the "Speak" action on the A button
|
||||
s32 func_800B8500(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, PlayerItemAction exchangeItemId) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((player->actor.flags & ACTOR_FLAG_100) || ((exchangeItemId > PLAYER_IA_NONE) && Player_InCsMode(play)) ||
|
||||
if ((player->actor.flags & ACTOR_FLAG_TALK_REQUESTED) ||
|
||||
((exchangeItemId > PLAYER_IA_NONE) && Player_InCsMode(play)) ||
|
||||
(!actor->isTargeted &&
|
||||
((fabsf(actor->playerHeightRel) > fabsf(yRange)) || (actor->xzDistToPlayer > player->talkActorDistance) ||
|
||||
(xzRange < actor->xzDistToPlayer)))) {
|
||||
|
|
@ -1883,7 +1899,7 @@ s32 func_800B863C(Actor* actor, PlayState* play) {
|
|||
|
||||
s32 Actor_TextboxIsClosing(Actor* actor, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
actor->flags &= ~ACTOR_FLAG_100;
|
||||
actor->flags &= ~ACTOR_FLAG_TALK_REQUESTED;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1900,7 +1916,7 @@ s32 Actor_ChangeFocus(Actor* actor1, PlayState* play, Actor* actor2) {
|
|||
|
||||
talkActor = player->talkActor;
|
||||
|
||||
if ((player->actor.flags & ACTOR_FLAG_100) && (talkActor != NULL)) {
|
||||
if ((player->actor.flags & ACTOR_FLAG_TALK_REQUESTED) && (talkActor != NULL)) {
|
||||
player->talkActor = actor2;
|
||||
player->targetedActor = actor2;
|
||||
return true;
|
||||
|
|
@ -1987,13 +2003,29 @@ s32 Actor_HasParent(Actor* actor, PlayState* play) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Allows to pick up an item (GetItem or GI), lift an actor or catch various actors in bottles
|
||||
* within the specified range.
|
||||
* This function covers various interactions with the player actor, using Get Item IDs (see `GetItemID` enum).
|
||||
* It is typically used to give items to the player, but also has other purposes.
|
||||
*
|
||||
* GI_NONE is usually used as a special case to lift an actor
|
||||
* GI_MAX is usually used to catch an actor in a bottle
|
||||
* This function carries a get item request to the player actor if context allows it (e.g. the player is in range and
|
||||
* not busy with certain things). The player actor performs the requested action itself.
|
||||
*
|
||||
* The following description of what the `getItemId` values can do is provided here for completeness, but these
|
||||
* behaviors are entirely out of the scope of this function. All behavior is defined by the player actor.
|
||||
*
|
||||
* - Positive values (`GI_NONE < getItemId < GI_MAX`):
|
||||
* Give an item to the player. The player may not get it immediately (for example if diving), but is expected to
|
||||
* in the near future.
|
||||
* - Negative values (`-GI_MAX < getItemId < GI_NONE`):
|
||||
* Used by treasure chests to indicate the chest can be opened (by pressing A).
|
||||
* The item gotten corresponds to the positive Get Item ID `abs(getItemId)`.
|
||||
* - `GI_NONE`:
|
||||
* Allows the player to pick up the actor (by pressing A), to carry it around.
|
||||
* - `GI_MAX`:
|
||||
* Allows the player to catch specific actors in a bottle.
|
||||
*
|
||||
* @return true If the player actor is capable of accepting the offer.
|
||||
*/
|
||||
s32 Actor_PickUp(Actor* actor, PlayState* play, GetItemId getItemId, f32 xzRange, f32 yRange) {
|
||||
s32 Actor_OfferGetItem(Actor* actor, PlayState* play, GetItemId getItemId, f32 xzRange, f32 yRange) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 &
|
||||
|
|
@ -2027,16 +2059,16 @@ s32 Actor_PickUp(Actor* actor, PlayState* play, GetItemId getItemId, f32 xzRange
|
|||
return false;
|
||||
}
|
||||
|
||||
s32 Actor_PickUpNearby(Actor* actor, PlayState* play, GetItemId getItemId) {
|
||||
return Actor_PickUp(actor, play, getItemId, 50.0f, 10.0f);
|
||||
s32 Actor_OfferGetItemNearby(Actor* actor, PlayState* play, GetItemId getItemId) {
|
||||
return Actor_OfferGetItem(actor, play, getItemId, 50.0f, 10.0f);
|
||||
}
|
||||
|
||||
s32 Actor_LiftActor(Actor* actor, PlayState* play) {
|
||||
return Actor_PickUpNearby(actor, play, GI_NONE);
|
||||
s32 Actor_OfferCarry(Actor* actor, PlayState* play) {
|
||||
return Actor_OfferGetItemNearby(actor, play, GI_NONE);
|
||||
}
|
||||
|
||||
s32 Actor_PickUpFar(Actor* actor, PlayState* play, GetItemId getItemId) {
|
||||
return Actor_PickUp(actor, play, getItemId, 9999.9f, 9999.9f);
|
||||
s32 Actor_OfferGetItemFar(Actor* actor, PlayState* play, GetItemId getItemId) {
|
||||
return Actor_OfferGetItem(actor, play, getItemId, 9999.9f, 9999.9f);
|
||||
}
|
||||
|
||||
s32 Actor_HasNoParent(Actor* actor, PlayState* play) {
|
||||
|
|
@ -2066,7 +2098,7 @@ void func_800B8C20(Actor* actorA, Actor* actorB, PlayState* play) {
|
|||
* Sets closest secret distance to the distance to the actor. Calling this function on `actor` is the way to make it a
|
||||
* 'secret' for that update cycle, i.e. something that the controller will rumble for.
|
||||
*/
|
||||
void func_800B8C50(Actor* actor, PlayState* play) {
|
||||
void Actor_SetClosestSecretDistance(Actor* actor, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (actor->xyzDistToPlayerSq < player->closestSecretDistSq) {
|
||||
|
|
@ -2230,14 +2262,14 @@ void Actor_DeactivateLens(PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_800B9120(ActorContext* actorCtx) {
|
||||
s32 phi_v0 = CURRENT_DAY * 2;
|
||||
void Actor_InitHalfDaysBit(ActorContext* actorCtx) {
|
||||
s32 halfDayCount = CURRENT_DAY * 2;
|
||||
|
||||
if (gSaveContext.save.time < CLOCK_TIME(6, 0) || gSaveContext.save.time > CLOCK_TIME(18, 0)) {
|
||||
phi_v0++;
|
||||
if ((gSaveContext.save.time < CLOCK_TIME(6, 0)) || (gSaveContext.save.time > CLOCK_TIME(18, 0))) {
|
||||
halfDayCount++;
|
||||
}
|
||||
|
||||
actorCtx->unkC = 0x200 >> phi_v0;
|
||||
actorCtx->halfDaysBit = HALFDAYBIT_DAY0_DAWN >> halfDayCount;
|
||||
}
|
||||
|
||||
void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEntry) {
|
||||
|
|
@ -2276,7 +2308,7 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* acto
|
|||
|
||||
Actor_SpawnEntry(actorCtx, actorEntry, play);
|
||||
Actor_TargetContextInit(&actorCtx->targetContext, actorCtx->actorLists[ACTORCAT_PLAYER].first, play);
|
||||
func_800B9120(actorCtx);
|
||||
Actor_InitHalfDaysBit(actorCtx);
|
||||
Fault_AddClient(&sActorFaultClient, (void*)Actor_PrintLists, actorCtx, NULL);
|
||||
func_800B722C(&play->state, (Player*)actorCtx->actorLists[ACTORCAT_PLAYER].first);
|
||||
}
|
||||
|
|
@ -2288,24 +2320,27 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* acto
|
|||
void Actor_SpawnSetupActors(PlayState* play, ActorContext* actorCtx) {
|
||||
if (play->numSetupActors > 0) {
|
||||
ActorEntry* actorEntry = play->setupActorList;
|
||||
s32 temp_fp = actorCtx->unkC;
|
||||
s32 temp_s1;
|
||||
s32 phi_v0;
|
||||
s32 prevHalfDaysBitValue = actorCtx->halfDaysBit;
|
||||
s32 shiftedHalfDaysBit;
|
||||
s32 actorEntryHalfDayBit;
|
||||
s32 i;
|
||||
|
||||
func_800B9120(actorCtx);
|
||||
func_800BA8B8(play, &play->actorCtx);
|
||||
Actor_InitHalfDaysBit(actorCtx);
|
||||
Actor_KillAllOnHalfDayChange(play, &play->actorCtx);
|
||||
|
||||
temp_s1 = (actorCtx->unkC * 2) & 0x2FF;
|
||||
// Shift to previous halfDay bit, but ignoring DAY0_NIGHT.
|
||||
// In other words, if the current halfDay is DAY1_DAY then this logic is ignored and this variable is zero
|
||||
shiftedHalfDaysBit = (actorCtx->halfDaysBit << 1) & (HALFDAYBIT_ALL & ~HALFDAYBIT_DAY0_NIGHT);
|
||||
|
||||
for (i = 0; i < play->numSetupActors; i++) {
|
||||
phi_v0 = ((actorEntry->rot.x & 7) << 7) | (actorEntry->rot.z & 0x7F);
|
||||
if (phi_v0 == 0) {
|
||||
phi_v0 = 0x3FF;
|
||||
actorEntryHalfDayBit = ((actorEntry->rot.x & 7) << 7) | (actorEntry->rot.z & 0x7F);
|
||||
if (actorEntryHalfDayBit == 0) {
|
||||
actorEntryHalfDayBit = HALFDAYBIT_ALL;
|
||||
}
|
||||
|
||||
if (!(phi_v0 & temp_fp) && (phi_v0 & actorCtx->unkC) &&
|
||||
(!CHECK_EVENTINF(EVENTINF_17) || !(phi_v0 & temp_s1) || !(actorEntry->id & 0x800))) {
|
||||
if (!(actorEntryHalfDayBit & prevHalfDaysBitValue) && (actorEntryHalfDayBit & actorCtx->halfDaysBit) &&
|
||||
(!CHECK_EVENTINF(EVENTINF_17) || !(actorEntryHalfDayBit & shiftedHalfDaysBit) ||
|
||||
!(actorEntry->id & 0x800))) {
|
||||
Actor_SpawnEntry(&play->actorCtx, actorEntry, play);
|
||||
}
|
||||
actorEntry++;
|
||||
|
|
@ -2319,9 +2354,9 @@ void Actor_SpawnSetupActors(PlayState* play, ActorContext* actorCtx) {
|
|||
typedef struct {
|
||||
/* 0x00 */ PlayState* play;
|
||||
/* 0x04 */ Actor* actor;
|
||||
/* 0x08 */ u32 unk_08;
|
||||
/* 0x0C */ u32 unkC;
|
||||
/* 0x10 */ Actor* unk10;
|
||||
/* 0x08 */ u32 requiredActorFlag;
|
||||
/* 0x0C */ u32 canFreezeCategory;
|
||||
/* 0x10 */ Actor* talkActor;
|
||||
/* 0x14 */ Player* player;
|
||||
/* 0x18 */ u32 unk_18; // Bitmask of actor flags. The actor will only have main called if it has at least 1
|
||||
// flag set that matches this bitmask
|
||||
|
|
@ -2356,53 +2391,51 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
|
|||
} else {
|
||||
if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
|
||||
Actor_Kill(actor);
|
||||
} else if (((params->requiredActorFlag) && !(actor->flags & params->requiredActorFlag)) ||
|
||||
((((!params->requiredActorFlag) != 0)) &&
|
||||
(!(actor->flags & ACTOR_FLAG_100000) ||
|
||||
((actor->category == ACTORCAT_EXPLOSIVES) && (params->player->stateFlags1 & PLAYER_STATE1_200))) &&
|
||||
params->canFreezeCategory && (actor != params->talkActor) &&
|
||||
((actor != params->player->heldActor)) && (actor->parent != ¶ms->player->actor))) {
|
||||
CollisionCheck_ResetDamage(&actor->colChkInfo);
|
||||
} else {
|
||||
if (((params->unk_08) && !(actor->flags & params->unk_08)) ||
|
||||
((((!params->unk_08) != 0)) &&
|
||||
(!(actor->flags & ACTOR_FLAG_100000) ||
|
||||
((actor->category == ACTORCAT_EXPLOSIVES) && (params->player->stateFlags1 & PLAYER_STATE1_200))) &&
|
||||
(params->unkC != 0) && (actor != params->unk10) && ((actor != params->player->heldActor)) &&
|
||||
(actor->parent != ¶ms->player->actor))) {
|
||||
CollisionCheck_ResetDamage(&actor->colChkInfo);
|
||||
} else {
|
||||
Math_Vec3f_Copy(&actor->prevPos, &actor->world.pos);
|
||||
actor->xzDistToPlayer = Actor_WorldDistXZToActor(actor, ¶ms->player->actor);
|
||||
actor->playerHeightRel = Actor_HeightDiff(actor, ¶ms->player->actor);
|
||||
actor->xyzDistToPlayerSq = SQ(actor->xzDistToPlayer) + SQ(actor->playerHeightRel);
|
||||
Math_Vec3f_Copy(&actor->prevPos, &actor->world.pos);
|
||||
actor->xzDistToPlayer = Actor_WorldDistXZToActor(actor, ¶ms->player->actor);
|
||||
actor->playerHeightRel = Actor_HeightDiff(actor, ¶ms->player->actor);
|
||||
actor->xyzDistToPlayerSq = SQ(actor->xzDistToPlayer) + SQ(actor->playerHeightRel);
|
||||
|
||||
actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, ¶ms->player->actor);
|
||||
actor->flags &= ~ACTOR_FLAG_1000000;
|
||||
actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, ¶ms->player->actor);
|
||||
actor->flags &= ~ACTOR_FLAG_1000000;
|
||||
|
||||
if ((DECR(actor->freezeTimer) == 0) && (actor->flags & params->unk_18)) {
|
||||
if (actor == params->player->targetedActor) {
|
||||
actor->isTargeted = true;
|
||||
} else {
|
||||
actor->isTargeted = false;
|
||||
}
|
||||
|
||||
if ((actor->targetPriority != 0) && (params->player->targetedActor == NULL)) {
|
||||
actor->targetPriority = 0;
|
||||
}
|
||||
|
||||
Actor_SetObjectDependency(play, actor);
|
||||
|
||||
if (actor->colorFilterTimer != 0) {
|
||||
actor->colorFilterTimer--;
|
||||
}
|
||||
|
||||
actor->update(actor, play);
|
||||
BgCheck_ResetFlagsIfLoadedActor(play, &play->colCtx.dyna, actor);
|
||||
if ((DECR(actor->freezeTimer) == 0) && (actor->flags & params->unk_18)) {
|
||||
if (actor == params->player->targetedActor) {
|
||||
actor->isTargeted = true;
|
||||
} else {
|
||||
actor->isTargeted = false;
|
||||
}
|
||||
|
||||
CollisionCheck_ResetDamage(&actor->colChkInfo);
|
||||
if ((actor->targetPriority != 0) && (params->player->targetedActor == NULL)) {
|
||||
actor->targetPriority = 0;
|
||||
}
|
||||
|
||||
Actor_SetObjectDependency(play, actor);
|
||||
|
||||
if (actor->colorFilterTimer != 0) {
|
||||
actor->colorFilterTimer--;
|
||||
}
|
||||
|
||||
actor->update(actor, play);
|
||||
BgCheck_ResetFlagsIfLoadedActor(play, &play->colCtx.dyna, actor);
|
||||
}
|
||||
|
||||
CollisionCheck_ResetDamage(&actor->colChkInfo);
|
||||
}
|
||||
nextActor = actor->next;
|
||||
}
|
||||
return nextActor;
|
||||
}
|
||||
|
||||
u32 D_801AED58[ACTORCAT_MAX] = {
|
||||
u32 sCategoryFreezeMasks[ACTORCAT_MAX] = {
|
||||
/* ACTORCAT_SWITCH */
|
||||
PLAYER_STATE1_2 | PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_10000000,
|
||||
/* ACTORCAT_BG */
|
||||
|
|
@ -2437,7 +2470,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
|||
s32 i;
|
||||
Actor* actor;
|
||||
Player* player = GET_PLAYER(play);
|
||||
u32* tmp;
|
||||
u32* categoryFreezeMaskP;
|
||||
s32 cat;
|
||||
Actor* next;
|
||||
ActorListEntry* entry;
|
||||
|
|
@ -2458,22 +2491,23 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
|||
actorCtx->unk2--;
|
||||
}
|
||||
|
||||
tmp = D_801AED58;
|
||||
categoryFreezeMaskP = sCategoryFreezeMasks;
|
||||
|
||||
if (player->stateFlags2 & PLAYER_STATE2_8000000) {
|
||||
params.unk_08 = 0x2000000;
|
||||
params.requiredActorFlag = ACTOR_FLAG_2000000;
|
||||
} else {
|
||||
params.unk_08 = 0;
|
||||
params.requiredActorFlag = 0;
|
||||
}
|
||||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_40) && ((player->actor.textId & 0xFF00) != 0x1900)) {
|
||||
params.unk10 = player->talkActor;
|
||||
params.talkActor = player->talkActor;
|
||||
} else {
|
||||
params.unk10 = NULL;
|
||||
params.talkActor = NULL;
|
||||
}
|
||||
|
||||
for (i = 0, entry = actorCtx->actorLists; i < ARRAY_COUNT(actorCtx->actorLists); entry++, tmp++, i++) {
|
||||
params.unkC = *tmp & player->stateFlags1;
|
||||
for (i = 0, entry = actorCtx->actorLists; i < ARRAY_COUNT(actorCtx->actorLists);
|
||||
entry++, categoryFreezeMaskP++, i++) {
|
||||
params.canFreezeCategory = *categoryFreezeMaskP & player->stateFlags1;
|
||||
params.actor = entry->first;
|
||||
|
||||
while (params.actor != NULL) {
|
||||
|
|
@ -2559,31 +2593,33 @@ void Actor_Draw(PlayState* play, Actor* actor) {
|
|||
gSPSegment(POLY_XLU_DISP++, 0x06, play->objectCtx.status[actor->objBankIndex].segment);
|
||||
|
||||
if (actor->colorFilterTimer != 0) {
|
||||
s32 temp_v0_2 = actor->colorFilterParams & 0xC000;
|
||||
s32 colorFlag = COLORFILTER_GET_COLORFLAG(actor->colorFilterParams);
|
||||
Color_RGBA8 actorDefaultHitColor = { 0, 0, 0, 255 };
|
||||
|
||||
if (temp_v0_2 == 0x8000) {
|
||||
if (colorFlag == COLORFILTER_COLORFLAG_GRAY) {
|
||||
actorDefaultHitColor.r = actorDefaultHitColor.g = actorDefaultHitColor.b =
|
||||
((actor->colorFilterParams & 0x1F00) >> 5) | 7;
|
||||
} else if (temp_v0_2 == 0x4000) {
|
||||
actorDefaultHitColor.r = ((actor->colorFilterParams & 0x1F00) >> 5) | 7;
|
||||
} else if (temp_v0_2 == 0xC000) {
|
||||
COLORFILTER_GET_COLORINTENSITY(actor->colorFilterParams) | 7;
|
||||
} else if (colorFlag == COLORFILTER_COLORFLAG_RED) {
|
||||
actorDefaultHitColor.r = COLORFILTER_GET_COLORINTENSITY(actor->colorFilterParams) | 7;
|
||||
} else if (colorFlag == COLORFILTER_COLORFLAG_NONE) {
|
||||
actorDefaultHitColor.b = actorDefaultHitColor.g = actorDefaultHitColor.r = 0;
|
||||
} else {
|
||||
actorDefaultHitColor.b = ((actor->colorFilterParams & 0x1F00) >> 5) | 7;
|
||||
actorDefaultHitColor.b = COLORFILTER_GET_COLORINTENSITY(actor->colorFilterParams) | 7;
|
||||
}
|
||||
|
||||
if (actor->colorFilterParams & 0x2000) {
|
||||
func_800AE778(play, &actorDefaultHitColor, actor->colorFilterTimer, actor->colorFilterParams & 0xFF);
|
||||
if (actor->colorFilterParams & COLORFILTER_BUFFLAG_XLU) {
|
||||
func_800AE778(play, &actorDefaultHitColor, actor->colorFilterTimer,
|
||||
COLORFILTER_GET_DURATION(actor->colorFilterParams));
|
||||
} else {
|
||||
func_800AE434(play, &actorDefaultHitColor, actor->colorFilterTimer, actor->colorFilterParams & 0xFF);
|
||||
func_800AE434(play, &actorDefaultHitColor, actor->colorFilterTimer,
|
||||
COLORFILTER_GET_DURATION(actor->colorFilterParams));
|
||||
}
|
||||
}
|
||||
|
||||
actor->draw(actor, play);
|
||||
|
||||
if (actor->colorFilterTimer != 0) {
|
||||
if (actor->colorFilterParams & 0x2000) {
|
||||
if (actor->colorFilterParams & COLORFILTER_BUFFLAG_XLU) {
|
||||
func_800AE8EC(play);
|
||||
} else {
|
||||
func_800AE5A0(play);
|
||||
|
|
@ -2897,9 +2933,9 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Kills every actor which its object is not loaded
|
||||
* Kill every actor which depends on an object that is not loaded.
|
||||
*/
|
||||
void func_800BA6FC(PlayState* play, ActorContext* actorCtx) {
|
||||
void Actor_KillAllWithMissingObject(PlayState* play, ActorContext* actorCtx) {
|
||||
Actor* actor;
|
||||
s32 i;
|
||||
|
||||
|
|
@ -2949,15 +2985,19 @@ void func_800BA798(PlayState* play, ActorContext* actorCtx) {
|
|||
play->msgCtx.unk_12030 = 0;
|
||||
}
|
||||
|
||||
void func_800BA8B8(PlayState* play, ActorContext* actorCtx) {
|
||||
/**
|
||||
* Kill every actor which does not have the current halfDayBit enabled
|
||||
*/
|
||||
void Actor_KillAllOnHalfDayChange(PlayState* play, ActorContext* actorCtx) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(actorCtx->actorLists); i++) {
|
||||
Actor* actor = actorCtx->actorLists[i].first;
|
||||
|
||||
while (actor != NULL) {
|
||||
if (!(actor->unk20 & actorCtx->unkC)) {
|
||||
if (!(actor->halfDaysBits & actorCtx->halfDaysBit)) {
|
||||
func_80123590(play, actor);
|
||||
|
||||
if (!actor->isDrawn) {
|
||||
actor = Actor_Delete(actorCtx, actor, play);
|
||||
} else {
|
||||
|
|
@ -3085,8 +3125,8 @@ void Actor_FreeOverlay(ActorOverlay* entry) {
|
|||
|
||||
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX,
|
||||
s16 rotY, s16 rotZ, s32 params) {
|
||||
return Actor_SpawnAsChildAndCutscene(actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params, -1, 0x3FF,
|
||||
NULL);
|
||||
return Actor_SpawnAsChildAndCutscene(actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params, -1,
|
||||
HALFDAYBIT_ALL, NULL);
|
||||
}
|
||||
|
||||
ActorInit* Actor_LoadOverlay(ActorContext* actorCtx, s16 index) {
|
||||
|
|
@ -3130,7 +3170,7 @@ ActorInit* Actor_LoadOverlay(ActorContext* actorCtx, s16 index) {
|
|||
}
|
||||
|
||||
Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s16 index, f32 x, f32 y, f32 z, s16 rotX,
|
||||
s16 rotY, s16 rotZ, s32 params, u32 cutscene, s32 arg11, Actor* parent) {
|
||||
s16 rotY, s16 rotZ, s32 params, u32 cutscene, u32 halfDaysBits, Actor* parent) {
|
||||
s32 pad;
|
||||
Actor* actor;
|
||||
ActorInit* actorInit;
|
||||
|
|
@ -3202,10 +3242,10 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
|||
actor->cutscene = -1;
|
||||
}
|
||||
|
||||
if (arg11 != 0) {
|
||||
actor->unk20 = arg11;
|
||||
if (halfDaysBits != 0) {
|
||||
actor->halfDaysBits = halfDaysBits;
|
||||
} else {
|
||||
actor->unk20 = 0x3FF;
|
||||
actor->halfDaysBits = HALFDAYBIT_ALL;
|
||||
}
|
||||
|
||||
Actor_AddToCategory(actorCtx, actor, actorInit->type);
|
||||
|
|
@ -3223,7 +3263,7 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
|||
Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play, s16 actorId, f32 posX, f32 posY,
|
||||
f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s32 params) {
|
||||
return Actor_SpawnAsChildAndCutscene(actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params, -1,
|
||||
parent->unk20, parent);
|
||||
parent->halfDaysBits, parent);
|
||||
}
|
||||
|
||||
void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx) {
|
||||
|
|
@ -3239,13 +3279,13 @@ void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx) {
|
|||
(transitionActorList->sides[1].room >= 0 &&
|
||||
(play->roomCtx.curRoom.num == transitionActorList->sides[1].room ||
|
||||
play->roomCtx.prevRoom.num == transitionActorList->sides[1].room))) {
|
||||
s16 rotY = ((transitionActorList->rotY >> 7) & 0x1FF) * (0x10000 / 360.0f);
|
||||
s16 rotY = DEG_TO_BINANG((transitionActorList->rotY >> 7) & 0x1FF);
|
||||
|
||||
if (Actor_SpawnAsChildAndCutscene(actorCtx, play, transitionActorList->id & 0x1FFF,
|
||||
transitionActorList->pos.x, transitionActorList->pos.y,
|
||||
transitionActorList->pos.z, 0, rotY, 0,
|
||||
(i << 0xA) + (transitionActorList->params & 0x3FF),
|
||||
transitionActorList->rotY & 0x7F, 0x3FF, 0) != NULL) {
|
||||
transitionActorList->rotY & 0x7F, HALFDAYBIT_ALL, 0) != NULL) {
|
||||
transitionActorList->id = -transitionActorList->id;
|
||||
}
|
||||
numTransitionActors = play->doorCtx.numTransitionActors;
|
||||
|
|
@ -3260,19 +3300,19 @@ Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, PlayStat
|
|||
s16 rotZ = (actorEntry->rot.z >> 7) & 0x1FF;
|
||||
|
||||
if (!(actorEntry->id & 0x8000)) {
|
||||
rotY *= 0x10000 / 360.0f;
|
||||
rotY = DEG_TO_BINANG(rotY);
|
||||
} else if (rotY > 180) {
|
||||
rotY -= 360;
|
||||
}
|
||||
|
||||
if (!(actorEntry->id & 0x4000)) {
|
||||
rotX *= 0x10000 / 360.0f;
|
||||
rotX = DEG_TO_BINANG(rotX);
|
||||
} else if (rotX > 180) {
|
||||
rotX -= 360;
|
||||
}
|
||||
|
||||
if (!(actorEntry->id & 0x2000)) {
|
||||
rotZ *= 0x10000 / 360.0f;
|
||||
rotZ = DEG_TO_BINANG(rotZ);
|
||||
} else if (rotZ > 180) {
|
||||
rotZ -= 360;
|
||||
}
|
||||
|
|
@ -3497,16 +3537,16 @@ s16 func_800BBC20(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3) {
|
|||
return arg0[0];
|
||||
}
|
||||
|
||||
void Actor_SpawnBodyParts(Actor* actor, PlayState* play, s32 arg2, Gfx** dList) {
|
||||
EnPart* part;
|
||||
Actor* spawnedPart;
|
||||
MtxF* currentMatrix;
|
||||
|
||||
void Actor_SpawnBodyParts(Actor* actor, PlayState* play, s32 partParams, Gfx** dList) {
|
||||
if (*dList != NULL) {
|
||||
currentMatrix = Matrix_GetCurrent();
|
||||
EnPart* part;
|
||||
Actor* spawnedPart;
|
||||
MtxF* currentMatrix = Matrix_GetCurrent();
|
||||
|
||||
spawnedPart =
|
||||
Actor_SpawnAsChild(&play->actorCtx, actor, play, ACTOR_EN_PART, currentMatrix->mf[3][0],
|
||||
currentMatrix->mf[3][1], currentMatrix->mf[3][2], 0, 0, actor->objBankIndex, arg2);
|
||||
currentMatrix->mf[3][1], currentMatrix->mf[3][2], 0, 0, actor->objBankIndex, partParams);
|
||||
|
||||
if (spawnedPart != NULL) {
|
||||
part = (EnPart*)spawnedPart;
|
||||
|
||||
|
|
@ -3575,21 +3615,29 @@ void func_800BC154(PlayState* play, ActorContext* actorCtx, Actor* actor, u8 act
|
|||
}
|
||||
|
||||
// Damage flags for EnArrow
|
||||
s32 D_801AEDB0[] = {
|
||||
0x800, 0x20, 0x20, 0x800, 0x1000, 0x2000, 0x1, 0x10000, 0x1,
|
||||
u32 sArrowDmgFlags[] = {
|
||||
DMG_FIRE_ARROW, // ENARROW_0
|
||||
DMG_NORMAL_ARROW, // ENARROW_1
|
||||
DMG_NORMAL_ARROW, // ENARROW_2
|
||||
DMG_FIRE_ARROW, // ENARROW_3
|
||||
DMG_ICE_ARROW, // ENARROW_4
|
||||
DMG_LIGHT_ARROW, // ENARROW_5
|
||||
DMG_DEKU_NUT, // ENARROW_6
|
||||
DMG_DEKU_BUBBLE, // ENARROW_7
|
||||
DMG_DEKU_NUT, // ENARROW_8
|
||||
};
|
||||
|
||||
s32 func_800BC188(s32 index) {
|
||||
if ((index < 0) || (index >= ARRAY_COUNT(D_801AEDB0))) {
|
||||
u32 Actor_GetArrowDmgFlags(s32 params) {
|
||||
if ((params < 0) || (params >= ARRAY_COUNT(sArrowDmgFlags))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return D_801AEDB0[index];
|
||||
return sArrowDmgFlags[params];
|
||||
}
|
||||
|
||||
s32 func_800BC1B4(Actor* actor, Actor* arg1, f32 arg2, f32 arg3) {
|
||||
if ((arg3 > 0.0f) && (Actor_WorldDistXYZToActor(arg1, actor) < ((arg3 * 2.5f) + arg2))) {
|
||||
s16 temp_v1 = BINANG_SUB(Actor_WorldYawTowardActor(arg1, actor), arg1->world.rot.y);
|
||||
s32 func_800BC1B4(Actor* actor, Actor* projectile, f32 distance, f32 speed) {
|
||||
if ((speed > 0.0f) && (Actor_WorldDistXYZToActor(projectile, actor) < ((speed * 2.5f) + distance))) {
|
||||
s16 temp_v1 = BINANG_SUB(Actor_WorldYawTowardActor(projectile, actor), projectile->world.rot.y);
|
||||
|
||||
if (ABS_ALT(temp_v1) < 0x1400) {
|
||||
return true;
|
||||
|
|
@ -3599,36 +3647,36 @@ s32 func_800BC1B4(Actor* actor, Actor* arg1, f32 arg2, f32 arg3) {
|
|||
return false;
|
||||
}
|
||||
|
||||
Actor* func_800BC270(PlayState* play, Actor* actor, f32 arg2, s32 arg3) {
|
||||
Actor* func_800BC270(PlayState* play, Actor* actor, f32 distance, u32 dmgFlags) {
|
||||
Actor* itemAction = play->actorCtx.actorLists[ACTORCAT_ITEMACTION].first;
|
||||
|
||||
while (itemAction != NULL) {
|
||||
if (((itemAction->id == ACTOR_ARMS_HOOK) && (arg3 & 0x80)) ||
|
||||
((itemAction->id == ACTOR_EN_BOOM) && (arg3 & 0x10)) ||
|
||||
((itemAction->id == ACTOR_EN_ARROW) && (func_800BC188(itemAction->params) & arg3))) {
|
||||
f32 speedXZ;
|
||||
if (((itemAction->id == ACTOR_ARMS_HOOK) && (dmgFlags & DMG_HOOKSHOT)) ||
|
||||
((itemAction->id == ACTOR_EN_BOOM) && (dmgFlags & DMG_ZORA_BOOMERANG)) ||
|
||||
((itemAction->id == ACTOR_EN_ARROW) && (Actor_GetArrowDmgFlags(itemAction->params) & dmgFlags))) {
|
||||
f32 speed;
|
||||
|
||||
if ((itemAction->speed <= 0.0f) && (GET_PLAYER(play)->unk_D57 != 0)) {
|
||||
if (itemAction->id == ACTOR_ARMS_HOOK) {
|
||||
speedXZ = 20.0f;
|
||||
speed = 20.0f;
|
||||
} else if (itemAction->id == ACTOR_EN_BOOM) {
|
||||
speedXZ = 12.0f;
|
||||
speed = 12.0f;
|
||||
} else {
|
||||
s32 temp_v0_3 = func_800BC188(itemAction->params);
|
||||
u32 arrowDmgFlags = Actor_GetArrowDmgFlags(itemAction->params);
|
||||
|
||||
if (temp_v0_3 == 1) {
|
||||
speedXZ = 80.0f;
|
||||
} else if (temp_v0_3 == 0x10000) {
|
||||
speedXZ = 60.0f;
|
||||
if (arrowDmgFlags == DMG_DEKU_NUT) {
|
||||
speed = 80.0f;
|
||||
} else if (arrowDmgFlags == DMG_DEKU_BUBBLE) {
|
||||
speed = 60.0f;
|
||||
} else {
|
||||
speedXZ = 150.0f;
|
||||
speed = 150.0f;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
speedXZ = itemAction->speed;
|
||||
speed = itemAction->speed;
|
||||
}
|
||||
|
||||
if (func_800BC1B4(actor, itemAction, arg2, speedXZ)) {
|
||||
if (func_800BC1B4(actor, itemAction, distance, speed)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -3639,13 +3687,13 @@ Actor* func_800BC270(PlayState* play, Actor* actor, f32 arg2, s32 arg3) {
|
|||
return itemAction;
|
||||
}
|
||||
|
||||
Actor* func_800BC444(PlayState* play, Actor* actor, f32 arg2) {
|
||||
Actor* func_800BC444(PlayState* play, Actor* actor, f32 distance) {
|
||||
Actor* explosive = play->actorCtx.actorLists[ACTORCAT_EXPLOSIVES].first;
|
||||
|
||||
while (explosive != NULL) {
|
||||
if (((explosive->id == ACTOR_EN_BOM) || (explosive->id == ACTOR_EN_BOM_CHU) ||
|
||||
(explosive->id == ACTOR_EN_BOMBF))) {
|
||||
if (func_800BC1B4(actor, explosive, arg2, explosive->speed)) {
|
||||
if (func_800BC1B4(actor, explosive, distance, explosive->speed)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -3714,29 +3762,30 @@ s32 Actor_OtherIsTargeted(PlayState* play, Actor* actor) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void func_800BC620(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) {
|
||||
MtxF sp58;
|
||||
f32 sp54;
|
||||
Vec3f sp48;
|
||||
CollisionPoly* sp44;
|
||||
void func_800BC620(Vec3f* pos, Vec3f* scale, u8 alpha, PlayState* play) {
|
||||
MtxF mf;
|
||||
f32 yIntersect;
|
||||
Vec3f adjustedPos;
|
||||
CollisionPoly* poly;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, alpha);
|
||||
|
||||
sp48.x = arg0->x;
|
||||
sp48.y = arg0->y + 1.0f;
|
||||
sp48.z = arg0->z;
|
||||
adjustedPos.x = pos->x;
|
||||
adjustedPos.y = pos->y + 1.0f;
|
||||
adjustedPos.z = pos->z;
|
||||
|
||||
sp54 = BgCheck_EntityRaycastFloor2(play, &play->colCtx, &sp44, &sp48);
|
||||
if (sp44 != NULL) {
|
||||
func_800C0094(sp44, arg0->x, sp54, arg0->z, &sp58);
|
||||
Matrix_Put(&sp58);
|
||||
yIntersect = BgCheck_EntityRaycastFloor2(play, &play->colCtx, &poly, &adjustedPos);
|
||||
if (poly != NULL) {
|
||||
func_800C0094(poly, pos->x, yIntersect, pos->z, &mf);
|
||||
Matrix_Put(&mf);
|
||||
} else {
|
||||
Matrix_Translate(arg0->x, arg0->y, arg0->z, MTXMODE_NEW);
|
||||
Matrix_Translate(pos->x, pos->y, pos->z, MTXMODE_NEW);
|
||||
}
|
||||
Matrix_Scale(arg1->x, 1.0f, arg1->z, MTXMODE_APPLY);
|
||||
|
||||
Matrix_Scale(scale->x, 1.0f, scale->z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gCircleShadowDL);
|
||||
|
|
@ -3841,12 +3890,12 @@ void Actor_SpawnShieldParticlesMetal(PlayState* play, Vec3f* pos) {
|
|||
CollisionCheck_SpawnShieldParticlesMetal(play, pos);
|
||||
}
|
||||
|
||||
void Actor_SetColorFilter(Actor* actor, u16 colorFlag, u16 colorIntensityMax, u16 xluFlag, u16 duration) {
|
||||
if ((colorFlag == 0x8000) && !(colorIntensityMax & 0x8000)) {
|
||||
void Actor_SetColorFilter(Actor* actor, u16 colorFlag, u16 colorIntensityMax, u16 bufFlag, u16 duration) {
|
||||
if ((colorFlag == COLORFILTER_COLORFLAG_GRAY) && !(colorIntensityMax & COLORFILTER_INTENSITY_FLAG)) {
|
||||
Actor_PlaySfx(actor, NA_SE_EN_LIGHT_ARROW_HIT);
|
||||
}
|
||||
|
||||
actor->colorFilterParams = colorFlag | xluFlag | ((colorIntensityMax & 0xF8) << 5) | duration;
|
||||
actor->colorFilterParams = colorFlag | bufFlag | ((colorIntensityMax & 0xF8) << 5) | duration;
|
||||
actor->colorFilterTimer = duration;
|
||||
}
|
||||
|
||||
|
|
@ -4151,7 +4200,7 @@ void Npc_TrackPointWithLimits(Actor* actor, NpcInteractInfo* interactInfo, s16 m
|
|||
}
|
||||
|
||||
temp = CLAMP(pitchTowardsTarget, minHeadPitch, (s16)(u16)maxHeadPitch);
|
||||
Math_SmoothStepToS(&interactInfo->headRot.x, temp, 6, 0x7D0, 1);
|
||||
Math_SmoothStepToS(&interactInfo->headRot.x, temp, 6, 2000, 1);
|
||||
|
||||
torsoPitch = pitchTowardsTarget - interactInfo->headRot.x;
|
||||
|
||||
|
|
@ -4452,15 +4501,15 @@ void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo) {
|
|||
ColliderInfo* acHitInfo = colInfo->acHitInfo;
|
||||
|
||||
if (acHitInfo == NULL) {
|
||||
actor->dropFlag = 0;
|
||||
} else if (acHitInfo->toucher.dmgFlags & 0x800) { // DMG_FIRE_ARROW
|
||||
actor->dropFlag = 1;
|
||||
} else if (acHitInfo->toucher.dmgFlags & 0x1000) { // DMG_ICE_ARROW
|
||||
actor->dropFlag = 2;
|
||||
} else if (acHitInfo->toucher.dmgFlags & 0x2000) { // DMG_LIGHT_ARROW
|
||||
actor->dropFlag = 0x20;
|
||||
actor->dropFlag = DROPFLAG_NONE;
|
||||
} else if (acHitInfo->toucher.dmgFlags & DMG_FIRE_ARROW) {
|
||||
actor->dropFlag = DROPFLAG_1;
|
||||
} else if (acHitInfo->toucher.dmgFlags & DMG_ICE_ARROW) {
|
||||
actor->dropFlag = DROPFLAG_2;
|
||||
} else if (acHitInfo->toucher.dmgFlags & DMG_LIGHT_ARROW) {
|
||||
actor->dropFlag = DROPFLAG_20;
|
||||
} else {
|
||||
actor->dropFlag = 0;
|
||||
actor->dropFlag = DROPFLAG_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4470,23 +4519,23 @@ void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSphere) {
|
|||
ColliderInfo* acHitInfo;
|
||||
s32 flag;
|
||||
|
||||
actor->dropFlag = 0;
|
||||
actor->dropFlag = DROPFLAG_NONE;
|
||||
|
||||
for (i = jntSphere->count - 1; i >= 0; i--) {
|
||||
jntElement = &jntSphere->elements[i];
|
||||
acHitInfo = jntElement->info.acHitInfo;
|
||||
|
||||
if (acHitInfo == NULL) {
|
||||
flag = 0;
|
||||
flag = DROPFLAG_NONE;
|
||||
} else {
|
||||
s32 dmgFlags = acHitInfo->toucher.dmgFlags;
|
||||
|
||||
if (dmgFlags & 0x800) {
|
||||
flag = 1;
|
||||
} else if (dmgFlags & 0x1000) {
|
||||
flag = 2;
|
||||
if (dmgFlags & DMG_FIRE_ARROW) {
|
||||
flag = DROPFLAG_1;
|
||||
} else if (dmgFlags & DMG_ICE_ARROW) {
|
||||
flag = DROPFLAG_2;
|
||||
} else {
|
||||
flag = (dmgFlags & 0x2000) ? 0x20 : 0;
|
||||
flag = (dmgFlags & DMG_LIGHT_ARROW) ? DROPFLAG_20 : DROPFLAG_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4494,19 +4543,19 @@ void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSphere) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_800BE33C(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3) {
|
||||
void func_800BE33C(Vec3f* arg0, Vec3f* arg1, Vec3s* dst, s32 arg3) {
|
||||
f32 xDiff = arg1->x - arg0->x;
|
||||
f32 zDiff = arg1->z - arg0->z;
|
||||
f32 yDiff = arg3 ? (arg1->y - arg0->y) : (arg0->y - arg1->y);
|
||||
|
||||
arg2->y = Math_Atan2S_XY(zDiff, xDiff);
|
||||
arg2->x = Math_Atan2S_XY(sqrtf(SQ(xDiff) + SQ(zDiff)), yDiff);
|
||||
dst->y = Math_Atan2S_XY(zDiff, xDiff);
|
||||
dst->x = Math_Atan2S_XY(sqrtf(SQ(xDiff) + SQ(zDiff)), yDiff);
|
||||
}
|
||||
|
||||
void func_800BE3D0(Actor* actor, s16 angle, Vec3s* arg2) {
|
||||
f32 sp44;
|
||||
f32 sp40;
|
||||
f32 sp3C;
|
||||
f32 floorPolyNormalX;
|
||||
f32 floorPolyNormalY;
|
||||
f32 floorPolyNormalZ;
|
||||
f32 sp38;
|
||||
f32 sp34;
|
||||
f32 sp30;
|
||||
|
|
@ -4516,17 +4565,17 @@ void func_800BE3D0(Actor* actor, s16 angle, Vec3s* arg2) {
|
|||
if (actor->floorPoly != NULL) {
|
||||
CollisionPoly* floorPoly = actor->floorPoly;
|
||||
|
||||
sp44 = COLPOLY_GET_NORMAL(floorPoly->normal.x);
|
||||
sp40 = COLPOLY_GET_NORMAL(floorPoly->normal.y);
|
||||
sp3C = COLPOLY_GET_NORMAL(floorPoly->normal.z);
|
||||
floorPolyNormalX = COLPOLY_GET_NORMAL(floorPoly->normal.x);
|
||||
floorPolyNormalY = COLPOLY_GET_NORMAL(floorPoly->normal.y);
|
||||
floorPolyNormalZ = COLPOLY_GET_NORMAL(floorPoly->normal.z);
|
||||
|
||||
sp38 = Math_SinS(angle);
|
||||
sp34 = Math_CosS(angle);
|
||||
arg2->x = (s16)-Math_Atan2S((-(sp44 * sp38) - (sp3C * sp34)) * sp40, 1.0f);
|
||||
arg2->x = (s16)-Math_Atan2S((-(floorPolyNormalX * sp38) - (floorPolyNormalZ * sp34)) * floorPolyNormalY, 1.0f);
|
||||
|
||||
sp2C = Math_SinS(angle - 0x3FF7);
|
||||
sp30 = Math_CosS(angle - 0x3FF7);
|
||||
arg2->z = (s16)-Math_Atan2S((-(sp44 * sp2C) - (sp3C * sp30)) * sp40, 1.0f);
|
||||
arg2->z = (s16)-Math_Atan2S((-(floorPolyNormalX * sp2C) - (floorPolyNormalZ * sp30)) * floorPolyNormalY, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
|
||||
Actor_PickUp(&this->actor, play, getItemId, 50.0f, 20.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, getItemId, 50.0f, 20.0f);
|
||||
}
|
||||
|
||||
this->actionFunc = func_800A6A40;
|
||||
|
|
@ -456,7 +456,7 @@ void func_800A6A40(EnItem00* this, PlayState* play) {
|
|||
|
||||
if (this->getItemId != GI_NONE) {
|
||||
if (!Actor_HasParent(&this->actor, play)) {
|
||||
Actor_PickUp(&this->actor, play, this->getItemId, 50.0f, 80.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, this->getItemId, 50.0f, 80.0f);
|
||||
this->unk152++;
|
||||
} else {
|
||||
this->getItemId = GI_NONE;
|
||||
|
|
@ -646,7 +646,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (getItemId != GI_NONE) {
|
||||
if (!Actor_HasParent(&this->actor, play)) {
|
||||
Actor_PickUp(&this->actor, play, getItemId, 50.0f, 20.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, getItemId, 50.0f, 20.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1128,16 +1128,17 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
|
|||
|
||||
if (fromActor != NULL) {
|
||||
dropFlag = fromActor->dropFlag;
|
||||
if (dropFlag != 0) {
|
||||
if (fromActor->dropFlag & 1) {
|
||||
|
||||
if (dropFlag != DROPFLAG_NONE) {
|
||||
if (fromActor->dropFlag & DROPFLAG_1) {
|
||||
params = 0x10;
|
||||
dropId = ITEM00_ARROWS_30;
|
||||
dropQuantity = 1;
|
||||
} else if (fromActor->dropFlag & 2) {
|
||||
} else if (fromActor->dropFlag & DROPFLAG_2) {
|
||||
params = 0x10;
|
||||
dropId = ITEM00_RECOVERY_HEART;
|
||||
dropQuantity = 1;
|
||||
} else if (fromActor->dropFlag & 0x20) {
|
||||
} else if (fromActor->dropFlag & DROPFLAG_20) {
|
||||
dropId = ITEM00_RUPEE_PURPLE;
|
||||
dropQuantity = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ void Scene_HeaderCmdSpawnList(PlayState* play, SceneCmd* cmd) {
|
|||
void Scene_HeaderCmdActorList(PlayState* play, SceneCmd* cmd) {
|
||||
play->numSetupActors = cmd->actorList.num;
|
||||
play->setupActorList = Lib_SegmentedToVirtual(cmd->actorList.segment);
|
||||
play->actorCtx.unkC = 0;
|
||||
play->actorCtx.halfDaysBit = 0;
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x02: List of camera data for actor cutscenes
|
||||
|
|
@ -277,7 +277,7 @@ void Scene_HeaderCmdObjectList(PlayState* play, SceneCmd* cmd) {
|
|||
}
|
||||
|
||||
play->objectCtx.num = i;
|
||||
func_800BA6FC(play, &play->actorCtx);
|
||||
Actor_KillAllWithMissingObject(play, &play->actorCtx);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -828,7 +828,7 @@ s32 func_8013C964(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, s32 it
|
|||
case 1:
|
||||
yRange = fabsf(actor->playerHeightRel) + 1.0f;
|
||||
xzRange = actor->xzDistToPlayer + 1.0f;
|
||||
ret = Actor_PickUp(actor, play, itemId, xzRange, yRange);
|
||||
ret = Actor_OfferGetItem(actor, play, itemId, xzRange, yRange);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) {
|
|||
Player* player = (Player*)this->actor.parent;
|
||||
|
||||
if (Player_IsHoldingHookshot(player)) {
|
||||
if ((player->itemAction != player->heldItemAction) || (player->actor.flags & ACTOR_FLAG_100) ||
|
||||
if ((player->itemAction != player->heldItemAction) || (player->actor.flags & ACTOR_FLAG_TALK_REQUESTED) ||
|
||||
(player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_4000000))) {
|
||||
this->timer = 0;
|
||||
ArmsHook_DetachHookFromActor(this);
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) {
|
|||
} else {
|
||||
this->unk_18C = 0;
|
||||
}
|
||||
this->dyna.actor.shape.rot.y += (s16)((this->unk_18C / 10.0f) * (0x10000 / 360.0f));
|
||||
this->dyna.actor.shape.rot.y += DEG_TO_BINANG(this->unk_18C / 10.0f);
|
||||
this->actionFunc = func_80A2A714;
|
||||
break;
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) {
|
|||
this->dyna.actor.draw = func_80A2B308;
|
||||
this->unk_17E = 0;
|
||||
this->unk_184 = 0.0f;
|
||||
this->dyna.actor.shape.rot.y += (s16)((this->unk_18C / 10.0f) * (0x10000 / 360.0f));
|
||||
this->dyna.actor.shape.rot.y += DEG_TO_BINANG(this->unk_18C / 10.0f);
|
||||
this->actionFunc = func_80A2A32C;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ void func_80B401F8(BgGoronOyu* this, PlayState* play) {
|
|||
|
||||
if (dist.x >= 0.0f && dist.x <= this->waterBoxXLength && dist.z >= 0.0f && dist.z <= this->waterBoxZLength &&
|
||||
fabsf(dist.y) < 100.0f && player->actor.depthInWater > 12.0f) {
|
||||
Actor_PickUp(&this->dyna.actor, play, GI_MAX, this->dyna.actor.xzDistToPlayer,
|
||||
fabsf(this->dyna.actor.playerHeightRel));
|
||||
Actor_OfferGetItem(&this->dyna.actor, play, GI_MAX, this->dyna.actor.xzDistToPlayer,
|
||||
fabsf(this->dyna.actor.playerHeightRel));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ void BgIkanaDharma_Init(Actor* thisx, PlayState* play2) {
|
|||
segmentY, this->dyna.actor.world.pos.z, this->dyna.actor.shape.rot.x,
|
||||
this->dyna.actor.shape.rot.y, this->dyna.actor.shape.rot.z,
|
||||
BGIKANADHARMA_PARAMS(0, true, 0), this->dyna.actor.cutscene,
|
||||
this->dyna.actor.unk20, NULL);
|
||||
this->dyna.actor.halfDaysBits, NULL);
|
||||
}
|
||||
|
||||
this->dyna.actor.bgCheckFlags |= BGCHECKFLAG_GROUND;
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ void func_80B80440(BgIkanaRotaryroom* this, PlayState* play) {
|
|||
this->unk_204.unk_00 = Actor_SpawnAsChildAndCutscene(
|
||||
&play->actorCtx, play, ACTOR_BG_IKANA_BLOCK, sp50.x, sp50.y, sp50.z, this->dyna.actor.shape.rot.x,
|
||||
this->dyna.actor.shape.rot.y, this->dyna.actor.shape.rot.z, -1,
|
||||
ActorCutscene_GetAdditionalCutscene(this->dyna.actor.cutscene), this->dyna.actor.unk20, NULL);
|
||||
ActorCutscene_GetAdditionalCutscene(this->dyna.actor.cutscene), this->dyna.actor.halfDaysBits, NULL);
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void BgSinkaiKabe_Init(Actor* thisx, PlayState* play) {
|
|||
if (shouldSpawnSeahorse) {
|
||||
Actor_SpawnAsChildAndCutscene(&play->actorCtx, play, ACTOR_EN_OT, pos.x, pos.y, pos.z, 0,
|
||||
this->dyna.actor.shape.rot.y, 0, 0x4000, this->dyna.actor.cutscene,
|
||||
this->dyna.actor.unk20, NULL);
|
||||
this->dyna.actor.halfDaysBits, NULL);
|
||||
}
|
||||
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ void BgTobira01_Open(BgTobira01* this, PlayState* play) {
|
|||
} else {
|
||||
ActorCutscene_SetIntentToPlay(cutsceneId);
|
||||
}
|
||||
} else if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_88_40) && (this->timer == 0) && (play->actorCtx.unk1F5 != 0) &&
|
||||
(play->actorCtx.unk1F4 == 0) &&
|
||||
} else if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_88_40) && (this->timer == 0) && (play->actorCtx.unk_1F4.timer != 0) &&
|
||||
(play->actorCtx.unk_1F4.unk_00 == 0) &&
|
||||
(SurfaceType_GetSceneExitIndex(&play->colCtx, player->actor.floorPoly, player->actor.floorBgId) == 6)) {
|
||||
this->playCutscene = true;
|
||||
this->unk_16C = 0; // this variable is not used anywhere else
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ void DmChar02_Update(Actor* thisx, PlayState* play) {
|
|||
this->unk_2F0 = this->unk_2F0;
|
||||
this->actionFunc(this, play);
|
||||
if (!Actor_HasParent(&this->actor, play)) {
|
||||
Actor_PickUp(&this->actor, play, GI_OCARINA, 30.0f, 80.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_OCARINA, 30.0f, 80.0f);
|
||||
} else {
|
||||
gSaveContext.save.playerForm = PLAYER_FORM_HUMAN;
|
||||
Actor_Kill(&this->actor);
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ void DoorAna_WaitClosed(DoorAna* this, PlayState* play) {
|
|||
play_sound(NA_SE_SY_CORRECT_CHIME);
|
||||
}
|
||||
|
||||
func_800B8C50(&this->actor, play);
|
||||
Actor_SetClosestSecretDistance(&this->actor, play);
|
||||
}
|
||||
|
||||
void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Description: Blue warp portal and crystal, and the Majora's Mask-shaped boss warp platform
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_door_warp1.h"
|
||||
#include "objects/object_warp1/object_warp1.h"
|
||||
|
||||
|
|
@ -547,7 +548,7 @@ void func_808B9CE8(DoorWarp1* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (!Actor_HasParent(&this->dyna.actor, play)) {
|
||||
Actor_PickUp(&this->dyna.actor, play, (GI_REMAINS_ODOLWA - 1) + func_808B849C(this, play), 30.0f, 80.0f);
|
||||
Actor_OfferGetItem(&this->dyna.actor, play, (GI_REMAINS_ODOLWA - 1) + func_808B849C(this, play), 30.0f, 80.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1330,19 +1330,19 @@ void func_80BEF360(EnAkindonuts* this, PlayState* play) {
|
|||
this->unk_32C &= ~0x40;
|
||||
this->actionFunc = func_80BEF450;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, func_80BED034(this), 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, func_80BED034(this), 300.0f, 300.0f);
|
||||
}
|
||||
} else if (Actor_HasParent(&this->actor, play)) {
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = func_80BEF450;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, func_80BECFBC(this), 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, func_80BECFBC(this), 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BEF450(EnAkindonuts* this, PlayState* play) {
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
||||
func_800B85E0(&this->actor, play, 400.0f, -1);
|
||||
func_800B85E0(&this->actor, play, 400.0f, PLAYER_IA_MINUS1);
|
||||
this->actionFunc = func_80BEF4B8;
|
||||
}
|
||||
}
|
||||
|
|
@ -1352,7 +1352,7 @@ void func_80BEF4B8(EnAkindonuts* this, PlayState* play) {
|
|||
this->unk_2DC(this, play);
|
||||
this->actionFunc = func_80BEEFA8;
|
||||
} else {
|
||||
func_800B85E0(&this->actor, play, 400.0f, -1);
|
||||
func_800B85E0(&this->actor, play, 400.0f, PLAYER_IA_MINUS1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -383,7 +383,8 @@ void EnAm_TakeDamage(EnAm* this, PlayState* play) {
|
|||
Animation_GetLastFrame(&gArmosTakeDamageAnim) - 6, ANIMMODE_ONCE, 0.0f);
|
||||
func_800BE504(&this->actor, &this->enemyCollider);
|
||||
this->actor.speed = 6.0f;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, Animation_GetLastFrame(&gArmosTakeDamageAnim) - 10);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA,
|
||||
Animation_GetLastFrame(&gArmosTakeDamageAnim) - 10);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_DAMAGE);
|
||||
this->enemyCollider.base.acFlags &= ~AC_ON;
|
||||
this->textureBlend = 255;
|
||||
|
|
@ -440,7 +441,7 @@ void func_808B0894(EnAm* this, PlayState* play) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
} else if (!(this->explodeTimer & 3)) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 4);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 4);
|
||||
}
|
||||
if (this->actor.world.rot.z < 0x1F40) {
|
||||
this->actor.world.rot.z += 0x320;
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ void func_809C11EC(EnAob01* this, PlayState* play) {
|
|||
|
||||
this->unk_3F8[i] = Actor_SpawnAsChildAndCutscene(
|
||||
&play->actorCtx, play, ACTOR_EN_DG, D_809C384C[i].unk_00.x, D_809C384C[i].unk_00.y, D_809C384C[i].unk_00.z,
|
||||
0, D_809C384C[i].unk_04 * 182.04445f, 0, enDgParams, 0xFFFF, this->actor.unk20, NULL);
|
||||
0, DEG_TO_BINANG(D_809C384C[i].unk_04), 0, enDgParams, 0xFFFF, this->actor.halfDaysBits, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ void func_809C1304(EnAob01* this, PlayState* play) {
|
|||
for (i = 0; i < ARRAY_COUNT(this->unk_3F8); i++) {
|
||||
this->unk_3F8[i] = Actor_SpawnAsChildAndCutscene(
|
||||
&play->actorCtx, play, ACTOR_EN_RACEDOG, (i * 15.0f) + -3897.0f, 130.0f, 1290.0f - (i * 10.0f), 0, 0x1555,
|
||||
0, (i << 5) | ENAOB01_GET_7E00_1(&this->actor), 0xFFFF, this->actor.unk20, NULL);
|
||||
0, (i << 5) | ENAOB01_GET_7E00_1(&this->actor), 0xFFFF, this->actor.halfDaysBits, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -770,9 +770,9 @@ void func_809C2A64(EnAob01* this, PlayState* play) {
|
|||
this->actionFunc = func_809C2BE4;
|
||||
}
|
||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_08_20)) {
|
||||
Actor_PickUp(&this->actor, play, GI_RUPEE_RED, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_RUPEE_RED, 300.0f, 300.0f);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_HEART_PIECE, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -790,7 +790,7 @@ void func_809C2BE4(EnAob01* this, PlayState* play) {
|
|||
}
|
||||
|
||||
this->unk_210 = 0;
|
||||
func_800B85E0(&this->actor, play, 400.0f, -1);
|
||||
func_800B85E0(&this->actor, play, 400.0f, PLAYER_IA_MINUS1);
|
||||
gSaveContext.eventInf[0] &= (u8)~7;
|
||||
this->actionFunc = func_809C2C9C;
|
||||
}
|
||||
|
|
@ -802,7 +802,7 @@ void func_809C2C9C(EnAob01* this, PlayState* play) {
|
|||
func_80151938(play, this->unk_210);
|
||||
this->actionFunc = func_809C1D64;
|
||||
} else {
|
||||
func_800B85E0(&this->actor, play, 400.0f, -1);
|
||||
func_800B85E0(&this->actor, play, 400.0f, PLAYER_IA_MINUS1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1034,8 +1034,8 @@ void EnAob01_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
|
|||
void EnAob01_Draw(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnAob01* this = THIS;
|
||||
Vec3f sp5C;
|
||||
Vec3f sp50;
|
||||
Vec3f pos;
|
||||
Vec3f scale;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
|
|
@ -1051,11 +1051,11 @@ void EnAob01_Draw(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->actor.draw != NULL) {
|
||||
func_8012C2DC(play->state.gfxCtx);
|
||||
sp5C = this->actor.world.pos;
|
||||
sp50.x = 0.5f;
|
||||
sp50.y = 0.5f;
|
||||
sp50.z = 0.5f;
|
||||
func_800BC620(&sp5C, &sp50, 0xFF, play);
|
||||
pos = this->actor.world.pos;
|
||||
scale.x = 0.5f;
|
||||
scale.y = 0.5f;
|
||||
scale.z = 0.5f;
|
||||
func_800BC620(&pos, &scale, 255, play);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
|
|||
EnArrow* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
if (this->actor.params == ENARROW_MINUS8) {
|
||||
if (this->actor.params == -ENARROW_8) {
|
||||
this->unk_263 = 1;
|
||||
this->actor.params = 8;
|
||||
this->actor.params = ENARROW_8;
|
||||
}
|
||||
|
||||
if (this->actor.params < ENARROW_6) {
|
||||
|
|
@ -113,7 +113,7 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
|
|||
if (this->actor.params < ENARROW_0) {
|
||||
this->collider.base.atFlags = (AT_TYPE_ENEMY | AT_ON);
|
||||
} else {
|
||||
this->collider.info.toucher.dmgFlags = func_800BC188(this->actor.params);
|
||||
this->collider.info.toucher.dmgFlags = Actor_GetArrowDmgFlags(this->actor.params);
|
||||
if (this->actor.params == ENARROW_8) {
|
||||
this->collider.info.toucher.damage = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,16 +8,15 @@ struct EnArrow;
|
|||
typedef void (*EnArrowActionFunc)(struct EnArrow*, PlayState*);
|
||||
|
||||
enum {
|
||||
/* -8 */ ENARROW_MINUS8 = -8,
|
||||
/* 0 */ ENARROW_0 = 0,
|
||||
/* 1 */ ENARROW_1,
|
||||
/* 2 */ ENARROW_2,
|
||||
/* 3 */ ENARROW_3,
|
||||
/* 4 */ ENARROW_4,
|
||||
/* 5 */ ENARROW_5,
|
||||
/* 6 */ ENARROW_6,
|
||||
/* 7 */ ENARROW_7,
|
||||
/* 8 */ ENARROW_8,
|
||||
/* 0 */ ENARROW_0, // Lit arrow
|
||||
/* 1 */ ENARROW_1, // Horse arrow
|
||||
/* 2 */ ENARROW_2, // Normal arrow
|
||||
/* 3 */ ENARROW_3, // Fire arrow
|
||||
/* 4 */ ENARROW_4, // Ice arrow
|
||||
/* 5 */ ENARROW_5, // Light arrow
|
||||
/* 6 */ ENARROW_6, // ?
|
||||
/* 7 */ ENARROW_7, // Deku bubble
|
||||
/* 8 */ ENARROW_8, // Deku Nut
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
|
|
@ -641,7 +641,7 @@ void func_80A95E88(EnAz* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80A95F94(EnAz* this, PlayState* play) {
|
||||
func_800BE33C(&this->actor.world.pos, &this->actor.home.pos, &this->actor.world.rot, 0);
|
||||
func_800BE33C(&this->actor.world.pos, &this->actor.home.pos, &this->actor.world.rot, false);
|
||||
this->unk_39E = 0;
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
this->actionFunc = func_80A95FE8;
|
||||
|
|
@ -656,7 +656,7 @@ void func_80A95FE8(EnAz* this, PlayState* play) {
|
|||
}
|
||||
if (Actor_WorldDistXYZToPoint(&this->actor, &this->actor.home.pos) > 20.0f) {
|
||||
func_800B9010(&this->actor, NA_SE_EV_BEAVER_SWIM_MOTOR - SFX_FLAG);
|
||||
func_800BE33C(&this->actor.world.pos, &this->actor.home.pos, &this->actor.world.rot, 0);
|
||||
func_800BE33C(&this->actor.world.pos, &this->actor.home.pos, &this->actor.world.rot, false);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, this->actor.world.rot.x, 3, 0xE38, 0x38E);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.world.rot.y, 3, 0xE38, 0x38E);
|
||||
this->actor.shape.rot.z = 0;
|
||||
|
|
@ -1309,8 +1309,8 @@ void func_80A97410(EnAz* this, PlayState* play) {
|
|||
this->unk_378 = 0;
|
||||
}
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer,
|
||||
this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer,
|
||||
this->actor.playerHeightRel);
|
||||
}
|
||||
}
|
||||
if (this->unk_378 == 9) {
|
||||
|
|
@ -1370,7 +1370,7 @@ void func_80A97410(EnAz* this, PlayState* play) {
|
|||
} else {
|
||||
Actor_GetScreenPos(play, &this->actor, &sp56, &sp54);
|
||||
if ((sp56 >= 0) && (sp56 <= SCREEN_WIDTH) && (sp54 >= 0) && (sp54 <= SCREEN_HEIGHT) &&
|
||||
func_800B8500(&this->actor, play, 120.0f, 120.0f, 0)) {
|
||||
func_800B8500(&this->actor, play, 120.0f, 120.0f, PLAYER_IA_NONE)) {
|
||||
this->unk_3D2 = func_80A97274(this, play);
|
||||
if ((this->unk_3D2 == 0x10CE) || (this->unk_3D2 == 0x10D4)) {
|
||||
this->actor.textId = 0;
|
||||
|
|
@ -1515,7 +1515,7 @@ void func_80A97EAC(EnAz* this, PlayState* play) {
|
|||
this->actor.velocity.y = 6.0f;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_SWIM_WITH_SPINNING_TAIL,
|
||||
&this->animIndex);
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8);
|
||||
this->actor.bgCheckFlags &= ~(BGCHECKFLAG_GROUND | BGCHECKFLAG_WATER);
|
||||
this->unk_374 |= 0x1000;
|
||||
|
|
|
|||
|
|
@ -638,7 +638,7 @@ void EnBaba_GiveBlastMask(EnBaba* this, PlayState* play) {
|
|||
this->stateFlags |= BOMB_SHOP_LADY_STATE_GAVE_BLAST_MASK;
|
||||
this->actionFunc = EnBaba_GaveBlastMask;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_MASK_BLAST, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MASK_BLAST, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ void EnBaguo_Init(Actor* thisx, PlayState* play) {
|
|||
this->actor.shape.yOffset = -3000.0f;
|
||||
this->actor.gravity = -3.0f;
|
||||
this->actor.colChkInfo.damageTable = &sDamageTable;
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->collider.base.acFlags |= AC_HARD;
|
||||
this->actionFunc = EnBaguo_UndergroundIdle;
|
||||
|
|
@ -163,7 +163,7 @@ void EnBaguo_UndergroundIdle(EnBaguo* this, PlayState* play) {
|
|||
Actor_PlaySfx(&this->actor, NA_SE_EN_BAKUO_APPEAR);
|
||||
this->actor.world.rot.z = 0;
|
||||
this->actor.world.rot.x = this->actor.world.rot.z;
|
||||
this->actor.flags &= ~ACTOR_FLAG_8000000;
|
||||
this->actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->actionFunc = EnBaguo_EmergeFromUnderground;
|
||||
}
|
||||
|
|
@ -291,7 +291,7 @@ void EnBaguo_RetreatUnderground(EnBaguo* this, PlayState* play) {
|
|||
this->actor.draw = EnBaguo_DrawBody;
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.home.pos);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_BAKUO_APPEAR);
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actionFunc = EnBaguo_UndergroundIdle;
|
||||
}
|
||||
|
|
@ -330,7 +330,7 @@ void EnBaguo_CheckForDetonation(EnBaguo* this, PlayState* play) {
|
|||
if ((this->collider.base.acFlags & AC_HIT || i)) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
if (i || this->actor.colChkInfo.damageEffect == NEJIRON_DMGEFF_KILL) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
this->action = NEJIRON_ACTION_EXPLODING;
|
||||
this->actor.speed = 0.0f;
|
||||
this->actor.shape.shadowScale = 0.0f;
|
||||
|
|
@ -352,7 +352,7 @@ void EnBaguo_CheckForDetonation(EnBaguo* this, PlayState* play) {
|
|||
Actor_PlaySfx(&this->actor, NA_SE_EN_BAKUO_DEAD);
|
||||
|
||||
this->timer = 30;
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
Actor_SetScale(&this->actor, 0.0f);
|
||||
this->collider.elements->dim.scale = 3.0f;
|
||||
|
|
|
|||
|
|
@ -164,8 +164,8 @@ void EnBat_Init(Actor* thisx, PlayState* play) {
|
|||
&play->actorCtx, play, ACTOR_EN_BAT, thisx->world.pos.x + randPlusMinusPoint5Scaled(200.0f),
|
||||
thisx->world.pos.y + randPlusMinusPoint5Scaled(100.0f),
|
||||
thisx->world.pos.z + randPlusMinusPoint5Scaled(200.0f), randPlusMinusPoint5Scaled(0x2000),
|
||||
0xFFFF * Rand_ZeroOne(), 0, BAD_BAT_PARAMS(this->switchFlag, this->paramFlags, 0), -1, thisx->unk20,
|
||||
NULL);
|
||||
0xFFFF * Rand_ZeroOne(), 0, BAD_BAT_PARAMS(this->switchFlag, this->paramFlags, 0), -1,
|
||||
thisx->halfDaysBits, NULL);
|
||||
BAD_BAT_GET_NUMBER_TO_SPAWN(thisx)--;
|
||||
}
|
||||
}
|
||||
|
|
@ -340,7 +340,7 @@ void EnBat_SetupDie(EnBat* this, PlayState* play) {
|
|||
this->drawDmgEffScale = 0.45f;
|
||||
}
|
||||
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
|
||||
if (this->actor.flags & ACTOR_FLAG_8000) {
|
||||
this->actor.speed = 0.0f;
|
||||
|
|
@ -400,8 +400,9 @@ void EnBat_SetupStunned(EnBat* this) {
|
|||
this->actor.speed = 0.0f;
|
||||
this->actor.world.pos.y += 13.0f;
|
||||
}
|
||||
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, this->timer);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, this->timer);
|
||||
this->actionFunc = EnBat_Stunned;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ void EnBb_Freeze(EnBb* this) {
|
|||
this->timer = 80;
|
||||
this->drawDmgEffAlpha = 1.0f;
|
||||
this->actor.flags &= ~ACTOR_FLAG_200;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 80);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 80);
|
||||
}
|
||||
|
||||
void EnBb_Thaw(EnBb* this, PlayState* play) {
|
||||
|
|
@ -416,17 +416,17 @@ void EnBb_SetupDamage(EnBb* this) {
|
|||
func_800BE568(&this->actor, &this->collider);
|
||||
|
||||
if (this->actor.colChkInfo.damageEffect == EN_BB_DMGEFF_ZORA_MAGIC) {
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_ELECTRIC_SPARKS_LARGE;
|
||||
this->drawDmgEffAlpha = 2.0f;
|
||||
this->drawDmgEffScale = 0.4f;
|
||||
} else if (this->actor.colChkInfo.damageEffect == EN_BB_DMGEFF_STUN) {
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 20);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 20);
|
||||
this->actor.speed = 0.0f;
|
||||
} else if (this->actor.colChkInfo.damageEffect == EN_BB_DMGEFF_HOOKSHOT) {
|
||||
this->actor.speed = 0.0f;
|
||||
} else {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 20);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 20);
|
||||
this->actor.speed = 7.0f;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ void EnBbfall_Freeze(EnBbfall* this) {
|
|||
this->timer = 80;
|
||||
this->drawDmgEffAlpha = 1.0f;
|
||||
this->actor.flags &= ~ACTOR_FLAG_200;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 80);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 80);
|
||||
}
|
||||
|
||||
void EnBbfall_Thaw(EnBbfall* this, PlayState* play) {
|
||||
|
|
@ -482,17 +482,17 @@ void EnBbfall_SetupDamage(EnBbfall* this) {
|
|||
func_800BE5CC(&this->actor, &this->collider, 0);
|
||||
|
||||
if (this->actor.colChkInfo.damageEffect == EN_BBFALL_DMGEFF_ZORA_MAGIC) {
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_ELECTRIC_SPARKS_LARGE;
|
||||
this->drawDmgEffAlpha = 2.0f;
|
||||
this->drawDmgEffScale = 0.4f;
|
||||
} else if (this->actor.colChkInfo.damageEffect == EN_BBFALL_DMGEFF_STUN) {
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 20);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 20);
|
||||
this->actor.speed = 0.0f;
|
||||
} else if (this->actor.colChkInfo.damageEffect == EN_BBFALL_DMGEFF_HOOKSHOT) {
|
||||
this->actor.speed = 0.0f;
|
||||
} else {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 20);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 20);
|
||||
this->actor.speed = 7.0f;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -506,7 +506,8 @@ void EnBigokuta_CheckOneHitKill(EnBigokuta* this, PlayState* play) {
|
|||
}
|
||||
|
||||
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetColorFilter(&this->picto.actor, 0x4000, 255, 0, Animation_GetLastFrame(&gBigOctoDeathAnim));
|
||||
Actor_SetColorFilter(&this->picto.actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA,
|
||||
Animation_GetLastFrame(&gBigOctoDeathAnim));
|
||||
EnBigokuta_ShootPlayer(this, play);
|
||||
EnBigokuta_SetupDeathCutscene(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -645,7 +645,7 @@ void EnBigpo_SpinningDown(EnBigpo* this, PlayState* play) {
|
|||
*/
|
||||
void EnBigpo_HitStun(EnBigpo* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gBigpoShockAnim, -6.0f);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x10);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16);
|
||||
this->collider.base.acFlags &= ~AC_ON;
|
||||
func_800BE504(&this->actor, &this->collider);
|
||||
this->actionFunc = EnBigpo_CheckHealth;
|
||||
|
|
@ -827,7 +827,7 @@ void EnBigpo_ScoopSoulIdle(EnBigpo* this, PlayState* play) {
|
|||
Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH);
|
||||
EnBigpo_SetupScoopSoulLeaving(this);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_MAX, 35.0f, 60.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MAX, 35.0f, 60.0f);
|
||||
this->actor.world.pos.y = (sin_rad(this->idleTimer * (M_PI / 20)) * 5.0f) + this->savedHeight;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ void EnBjt_Talk(EnBjt* this, PlayState* play) {
|
|||
s16 yaw = this->actor.yawTowardsPlayer;
|
||||
|
||||
if (func_8010BF58(&this->actor, play, sMsgEventScript, this->msgEventCallback, &this->msgEventArg4)) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_100;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TALK_REQUESTED;
|
||||
SubS_UpdateFlags(&this->stateFlags, 3, 7);
|
||||
this->stateFlags &= ~TOILET_HAND_STATE_TALKING;
|
||||
this->msgEventArg4 = 0;
|
||||
|
|
@ -406,7 +406,7 @@ void EnBjt_FollowSchedule(EnBjt* this, PlayState* play) {
|
|||
}
|
||||
this->scheduleResult = scheduleOutput.result;
|
||||
} else {
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
Actor_SetScale(&this->actor, 0.0f);
|
||||
this->stateFlags = 0;
|
||||
this->msgEventCallback = NULL;
|
||||
|
|
@ -426,7 +426,7 @@ void EnBjt_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit);
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
Actor_SetScale(&this->actor, 0.0f);
|
||||
|
||||
this->scheduleResult = TOILET_HAND_SCH_NONE;
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ void func_80871058(EnBom* this, PlayState* play) {
|
|||
this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND;
|
||||
}
|
||||
} else if (this->timer >= 4) {
|
||||
Actor_LiftActor(&this->actor, play);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ void func_809C51B4(EnBomBowlMan* this, PlayState* play) {
|
|||
void func_809C52B4(EnBomBowlMan* this) {
|
||||
this->actor.draw = NULL;
|
||||
this->actor.flags |= ACTOR_FLAG_10;
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.world.pos.x = 1340.0f;
|
||||
this->actor.world.pos.z = -1795.0f;
|
||||
|
|
@ -496,7 +496,7 @@ void func_809C5738(EnBomBowlMan* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_809C59A4(EnBomBowlMan* this, PlayState* play) {
|
||||
Actor_PickUp(&this->actor, play, GI_BOMBERS_NOTEBOOK, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_BOMBERS_NOTEBOOK, 300.0f, 300.0f);
|
||||
this->unk_29C = 1;
|
||||
this->actionFunc = func_809C59F0;
|
||||
}
|
||||
|
|
@ -513,7 +513,7 @@ void func_809C59F0(EnBomBowlMan* this, PlayState* play) {
|
|||
func_800B8500(&this->actor, play, 400.0f, 400.0f, PLAYER_IA_MINUS1);
|
||||
this->actionFunc = func_809C5AA4;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_BOMBERS_NOTEBOOK, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_BOMBERS_NOTEBOOK, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ void func_808AEAE0(EnBombf* this, PlayState* play) {
|
|||
}
|
||||
} else {
|
||||
if (!Actor_HasParent(&this->actor, play)) {
|
||||
Actor_LiftActor(&this->actor, play);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
return;
|
||||
}
|
||||
player->actor.child = NULL;
|
||||
|
|
@ -245,7 +245,7 @@ void func_808AEE3C(EnBombf* this, PlayState* play) {
|
|||
this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND;
|
||||
}
|
||||
} else if (this->timer >= 4) {
|
||||
Actor_LiftActor(&this->actor, play);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ void EnBox_Fall(EnBox* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnBox_FallOnSwitchFlag(EnBox* this, PlayState* play) {
|
||||
func_800B8C50(&this->dyna.actor, play);
|
||||
Actor_SetClosestSecretDistance(&this->dyna.actor, play);
|
||||
if (this->unk_1A0 >= 0) {
|
||||
EnBox_SetupAction(this, EnBox_Fall);
|
||||
func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
|
|
@ -386,7 +386,7 @@ void EnBox_FallOnSwitchFlag(EnBox* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnBox_AppearSwitchFlag(EnBox* this, PlayState* play) {
|
||||
func_800B8C50(&this->dyna.actor, play);
|
||||
Actor_SetClosestSecretDistance(&this->dyna.actor, play);
|
||||
if (Flags_GetSwitch(play, this->switchFlag)) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->cutsceneIdxA)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->cutsceneIdxA, &this->dyna.actor);
|
||||
|
|
@ -399,7 +399,7 @@ void EnBox_AppearSwitchFlag(EnBox* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnBox_AppearOnRoomClear(EnBox* this, PlayState* play) {
|
||||
func_800B8C50(&this->dyna.actor, play);
|
||||
Actor_SetClosestSecretDistance(&this->dyna.actor, play);
|
||||
if (Flags_GetClearTemp(play, this->dyna.actor.room)) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->cutsceneIdxA)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->cutsceneIdxA, &this->dyna.actor);
|
||||
|
|
@ -508,7 +508,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
|
|||
if ((this->getItemId == GI_MASK_GIANT) && (INV_CONTENT(ITEM_MASK_GIANT) == ITEM_MASK_GIANT)) {
|
||||
this->getItemId = GI_RECOVERY_HEART;
|
||||
}
|
||||
Actor_PickUpNearby(&this->dyna.actor, play, -this->getItemId);
|
||||
Actor_OfferGetItemNearby(&this->dyna.actor, play, -this->getItemId);
|
||||
}
|
||||
if (Flags_GetTreasure(play, ENBOX_GET_CHEST_FLAG(&this->dyna.actor))) {
|
||||
EnBox_SetupAction(this, EnBox_Open);
|
||||
|
|
|
|||
|
|
@ -131,9 +131,9 @@ void func_80AFDE00(EnColMan* this, PlayState* play) {
|
|||
this->actor.draw = NULL;
|
||||
this->actionFunc = EnColMan_SetHeartPieceCollectedAndKill;
|
||||
} else if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_56_02)) {
|
||||
Actor_PickUp(&this->actor, play, GI_HEART_PIECE, 40.0f, 40.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 40.0f, 40.0f);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_RECOVERY_HEART, 40.0f, 40.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_RECOVERY_HEART, 40.0f, 40.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ void EnCow_GiveMilkWait(EnCow* this, PlayState* play) {
|
|||
this->actor.parent = NULL;
|
||||
this->actionFunc = EnCow_GiveMilkEnd;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_MILK, 10000.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 10000.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ void EnCow_GiveMilk(EnCow* this, PlayState* play) {
|
|||
this->actor.flags &= ~ACTOR_FLAG_10000;
|
||||
func_801477B4(play);
|
||||
this->actionFunc = EnCow_GiveMilkWait;
|
||||
Actor_PickUp(&this->actor, play, GI_MILK, 10000.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 10000.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) {
|
|||
this->drawDmgEffFrozenSteamScale = 0.5f;
|
||||
}
|
||||
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
if (this->actor.flags & ACTOR_FLAG_8000) {
|
||||
this->actor.speed = 0.0f;
|
||||
}
|
||||
|
|
@ -390,9 +390,9 @@ void EnCrow_SetupTurnAway(EnCrow* this) {
|
|||
this->yawTarget = this->actor.yawTowardsPlayer + 0x8000;
|
||||
this->skelAnime.playSpeed = 2.0f;
|
||||
if (this->actor.colChkInfo.damageEffect == GUAY_DMGEFF_STUN) {
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
} else {
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
}
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
|
||||
this->actionFunc = EnCrow_TurnAway;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ void EnDaiku_Init(Actor* thisx, PlayState* play) {
|
|||
this->collider.dim.radius = 30;
|
||||
this->collider.dim.height = 60;
|
||||
this->collider.dim.yShift = 0;
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_63_80) || ((gSaveContext.save.day == 3) && gSaveContext.save.isNight)) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1059,7 +1059,7 @@ void EnDekubaba_DeadStickDrop(EnDekubaba* this, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
|
||||
Actor_PickUpNearby(&this->actor, play, GI_STICKS_1);
|
||||
Actor_OfferGetItemNearby(&this->actor, play, GI_STICKS_1);
|
||||
}
|
||||
|
||||
/* Update and associated functions */
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ void func_808BD348(EnDekunuts* this) {
|
|||
this->drawDmgEffAlpha = 1.0f;
|
||||
this->collider.base.colType = COLTYPE_HIT3;
|
||||
this->unk_190 = 80;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 80);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 80);
|
||||
}
|
||||
|
||||
void func_808BD3B4(EnDekunuts* this, PlayState* play) {
|
||||
|
|
@ -479,7 +479,8 @@ void func_808BE294(EnDekunuts* this, s32 arg1) {
|
|||
this->actionFunc = func_808BE358;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_DAMAGE);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_CUTBODY);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, Animation_GetLastFrame(&gDekuScrubDamageAnim));
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA,
|
||||
Animation_GetLastFrame(&gDekuScrubDamageAnim));
|
||||
}
|
||||
|
||||
void func_808BE358(EnDekunuts* this, PlayState* play) {
|
||||
|
|
@ -593,7 +594,7 @@ void func_808BE73C(EnDekunuts* this, PlayState* play) {
|
|||
|
||||
if (this->actor.colChkInfo.damageEffect == 1) {
|
||||
this->unk_190 = 40;
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
|
||||
func_808BE3A8(this);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ void EnDemoheishi_Idle(EnDemoheishi* this, PlayState* play) {
|
|||
s32 absYawDiff;
|
||||
s16 yawDiff;
|
||||
|
||||
this->actor.flags &= ~ACTOR_FLAG_8000000;
|
||||
this->actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
|
||||
absYawDiff = ABS_ALT(yawDiff);
|
||||
|
||||
|
|
|
|||
|
|
@ -473,10 +473,10 @@ void EnDg_StartTextBox(EnDg* this, PlayState* play) {
|
|||
*/
|
||||
void EnDg_TryPickUp(EnDg* this, PlayState* play) {
|
||||
if (sIsAnyDogHeld && !(this->dogFlags & DOG_FLAG_HELD)) {
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->dogFlags |= DOG_FLAG_HELD;
|
||||
} else if (!sIsAnyDogHeld && (this->dogFlags & DOG_FLAG_HELD)) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_8000000;
|
||||
this->actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->dogFlags &= ~DOG_FLAG_HELD;
|
||||
}
|
||||
|
||||
|
|
@ -485,7 +485,7 @@ void EnDg_TryPickUp(EnDg* this, PlayState* play) {
|
|||
this->grabState = DOG_GRAB_STATE_HELD;
|
||||
sSelectedRacetrackDogInfo = sRacetrackDogInfo[this->index];
|
||||
if (!sIsAnyDogHeld) {
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
sIsAnyDogHeld = true;
|
||||
this->dogFlags |= DOG_FLAG_HELD;
|
||||
}
|
||||
|
|
@ -501,7 +501,7 @@ void EnDg_TryPickUp(EnDg* this, PlayState* play) {
|
|||
this->actionFunc = EnDg_Held;
|
||||
}
|
||||
} else {
|
||||
Actor_LiftActor(&this->actor, play);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1243,7 +1243,7 @@ void EnDg_Held(EnDg* this, PlayState* play) {
|
|||
this->grabState = DOG_GRAB_STATE_THROWN_OR_SITTING_AFTER_THROW;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
if (sIsAnyDogHeld) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_8000000;
|
||||
this->actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
sIsAnyDogHeld = false;
|
||||
this->dogFlags &= ~DOG_FLAG_HELD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ void func_8089AC70(EnDinofos* this) {
|
|||
this->drawDmgEffAlpha = 1.0f;
|
||||
this->unk_290 = 80;
|
||||
this->actor.flags &= ~ACTOR_FLAG_400;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 80);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 80);
|
||||
}
|
||||
|
||||
void func_8089ACEC(EnDinofos* this, PlayState* play) {
|
||||
|
|
@ -996,7 +996,7 @@ void func_8089C87C(EnDinofos* this, s32 arg1) {
|
|||
this->unk_28E = 0;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_RIZA_DAMAGE);
|
||||
this->colliderJntSph.base.acFlags &= ~AC_ON;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 18);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 18);
|
||||
this->actionFunc = func_8089C938;
|
||||
}
|
||||
|
||||
|
|
@ -1303,7 +1303,7 @@ s32 func_8089D60C(EnDinofos* this, PlayState* play) {
|
|||
|
||||
if (this->actor.colChkInfo.damageEffect == 1) {
|
||||
this->unk_290 = 40;
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
|
||||
func_8089C784(this);
|
||||
return true;
|
||||
|
|
@ -1311,7 +1311,7 @@ s32 func_8089D60C(EnDinofos* this, PlayState* play) {
|
|||
|
||||
if (this->actor.colChkInfo.damageEffect == 5) {
|
||||
this->unk_290 = 40;
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
this->drawDmgEffScale = 0.55f;
|
||||
this->drawDmgEffAlpha = 2.0f;
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_ELECTRIC_SPARKS_MEDIUM;
|
||||
|
|
|
|||
|
|
@ -675,7 +675,7 @@ void func_80A725F8(EnDno* this, PlayState* play) {
|
|||
} else {
|
||||
this->getItemId = GI_MASK_SCENTS;
|
||||
}
|
||||
Actor_PickUp(&this->actor, play, this->getItemId, 60.0f, 60.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, this->getItemId, 60.0f, 60.0f);
|
||||
func_801477B4(play);
|
||||
func_80A72B84(this, play);
|
||||
}
|
||||
|
|
@ -741,13 +741,13 @@ void func_80A72BA4(EnDno* this, PlayState* play) {
|
|||
this->actor.parent = NULL;
|
||||
this->actionFunc = func_80A72598;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, this->getItemId, 60.0f, 60.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, this->getItemId, 60.0f, 60.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A72C04(EnDno* this, PlayState* play) {
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, EN_DNO_ANIM_START_RACE_START, &this->animIndex);
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8);
|
||||
Math_Vec3f_Copy(&this->unk_334, &this->actor.world.pos);
|
||||
SubS_ActorPathing_Init(play, &this->unk_334, &this->actor, &this->actorPath, play->setupPathList,
|
||||
|
|
@ -873,7 +873,7 @@ void func_80A730A0(EnDno* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80A73244(EnDno* this, PlayState* play) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_8000000;
|
||||
this->actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8);
|
||||
this->unk_328 = 2;
|
||||
this->actor.speed = 0.0f;
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ void EnDnp_Update(Actor* thisx, PlayState* play) {
|
|||
sp2C = this->collider.dim.radius + 50;
|
||||
sp28 = this->collider.dim.height + 30;
|
||||
if ((this->unk_322 & 0x400) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_23_20)) {
|
||||
Actor_PickUp(&this->actor, play, GI_MAX, sp2C, sp28);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MAX, sp2C, sp28);
|
||||
}
|
||||
func_8013C964(&this->actor, play, sp2C, sp28, PLAYER_IA_NONE, this->unk_322 & 7);
|
||||
Actor_SetFocus(&this->actor, 30.0f);
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ void func_80876CAC(EnDodongo* this) {
|
|||
this->drawDmgEffAlpha = 1.0f;
|
||||
this->timer = 80;
|
||||
this->actor.flags &= ~ACTOR_FLAG_400;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 80);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 80);
|
||||
}
|
||||
|
||||
void func_80876D28(EnDodongo* this, PlayState* play) {
|
||||
|
|
@ -758,7 +758,7 @@ void func_80877E60(EnDodongo* this, PlayState* play) {
|
|||
} else {
|
||||
this->actor.colChkInfo.health -= 4;
|
||||
}
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0x78, 0, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 120, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
}
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 24.0f)) {
|
||||
this->timer--;
|
||||
|
|
@ -875,7 +875,7 @@ void func_8087864C(EnDodongo* this) {
|
|||
this->timer = 0;
|
||||
this->unk_304 = 0;
|
||||
this->actor.speed = 0.0f;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
this->actionFunc = func_808786C8;
|
||||
}
|
||||
|
||||
|
|
@ -896,7 +896,7 @@ void func_80878724(EnDodongo* this) {
|
|||
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_J_DEAD);
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.speed = 0.0f;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
this->actionFunc = func_808787B0;
|
||||
}
|
||||
|
||||
|
|
@ -908,7 +908,7 @@ void func_808787B0(EnDodongo* this, PlayState* play) {
|
|||
func_80876DC4(this, play);
|
||||
}
|
||||
} else if (this->actor.colorFilterTimer == 0) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0x78, 0, 4);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 120, COLORFILTER_BUFFLAG_OPA, 4);
|
||||
}
|
||||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
|
|
@ -994,12 +994,12 @@ void EnDodongo_UpdateDamage(EnDodongo* this, PlayState* play) {
|
|||
}
|
||||
} else if (this->actor.colChkInfo.damageEffect == 1) {
|
||||
this->timer = 40;
|
||||
Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
|
||||
func_80878594(this);
|
||||
} else if (this->actor.colChkInfo.damageEffect == 5) {
|
||||
this->timer = 40;
|
||||
Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_ELECTRIC_SPARKS_SMALL;
|
||||
this->drawDmgEffScale = 0.75f;
|
||||
|
|
|
|||
|
|
@ -467,12 +467,6 @@ void func_80866A5C(EnDoor* this, PlayState* play) {
|
|||
void func_80866B20(EnDoor* this, PlayState* play) {
|
||||
static s32 D_80867BC0;
|
||||
Player* player = GET_PLAYER(play);
|
||||
Vec3f playerPosRelToDoor;
|
||||
s16 temp_a2;
|
||||
s16 yawDiff;
|
||||
s32 temp_a1_2;
|
||||
s32 temp_t0;
|
||||
u8 temp_a1;
|
||||
|
||||
if (Actor_ProcessTalkRequest(&this->dyna.actor, &play->state) && (this->dyna.actor.textId == 0x1821)) {
|
||||
D_80867BC0 = true;
|
||||
|
|
@ -490,10 +484,13 @@ void func_80866B20(EnDoor* this, PlayState* play) {
|
|||
this->actionFunc = func_80866F94;
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_DOOR_OPEN);
|
||||
} else if (!Player_InCsMode(play)) {
|
||||
Vec3f playerPosRelToDoor;
|
||||
|
||||
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &playerPosRelToDoor, &player->actor.world.pos);
|
||||
if (D_80867BC0 || ((fabsf(playerPosRelToDoor.y) < 20.0f) && (fabsf(playerPosRelToDoor.x) < 20.0f) &&
|
||||
(fabsf(playerPosRelToDoor.z) < 50.0f))) {
|
||||
yawDiff = player->actor.shape.rot.y - this->dyna.actor.shape.rot.y;
|
||||
s16 yawDiff = player->actor.shape.rot.y - this->dyna.actor.shape.rot.y;
|
||||
|
||||
if (playerPosRelToDoor.z > 0.0f) {
|
||||
yawDiff = (0x8000 - yawDiff);
|
||||
}
|
||||
|
|
@ -512,15 +509,14 @@ void func_80866B20(EnDoor* this, PlayState* play) {
|
|||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->dyna.actor.textId = 0x1800;
|
||||
} else if ((this->unk_1A4 == 0) || (this->unk_1A4 == 2) || (this->unk_1A4 == 3)) {
|
||||
s32 textIdOffset;
|
||||
s32 halfDaysDayBit = (play->actorCtx.halfDaysBit & HALFDAYBIT_DAWNS) >> 1;
|
||||
s32 halfDaysNightBit = play->actorCtx.halfDaysBit & HALFDAYBIT_NIGHTS;
|
||||
s16 temp_a2 = D_801AED48[this->switchFlag & 7];
|
||||
s32 textIdOffset = (this->switchFlag >> 3) & 0xF;
|
||||
|
||||
temp_t0 = (play->actorCtx.unkC & 0x2AA) >> 1;
|
||||
temp_a2 = D_801AED48[this->switchFlag & 7];
|
||||
temp_a1_2 = play->actorCtx.unkC & 0x155;
|
||||
textIdOffset = (this->switchFlag >> 3) & 0xF;
|
||||
if (((this->unk_1A4 == 0) && (((temp_t0 | temp_a1_2) & temp_a2) == 0)) ||
|
||||
((this->unk_1A4 == 2) && ((temp_a2 & temp_a1_2) == 0)) ||
|
||||
((this->unk_1A4 == 3) && ((temp_a2 & temp_t0) == 0))) {
|
||||
if (((this->unk_1A4 == 0) && !((halfDaysDayBit | halfDaysNightBit) & temp_a2)) ||
|
||||
((this->unk_1A4 == 2) && !(halfDaysNightBit & temp_a2)) ||
|
||||
((this->unk_1A4 == 3) && !(halfDaysDayBit & temp_a2))) {
|
||||
s16 baseTextId = 0x182D;
|
||||
|
||||
if (this->unk_1A4 == 3) {
|
||||
|
|
@ -532,10 +528,10 @@ void func_80866B20(EnDoor* this, PlayState* play) {
|
|||
this->dyna.actor.textId = baseTextId + textIdOffset;
|
||||
}
|
||||
} else if ((this->unk_1A4 == 5) && (playerPosRelToDoor.z > 0.0f)) {
|
||||
ScheduleOutput sp30;
|
||||
ScheduleOutput scheduleOutput;
|
||||
|
||||
if (Schedule_RunScript(play, D_8086778C[this->switchFlag], &sp30)) {
|
||||
this->dyna.actor.textId = sp30.result + 0x1800;
|
||||
if (Schedule_RunScript(play, D_8086778C[this->switchFlag], &scheduleOutput)) {
|
||||
this->dyna.actor.textId = scheduleOutput.result + 0x1800;
|
||||
|
||||
player->doorType = ((this->dyna.actor.textId == 0x1821) && D_80867BC0)
|
||||
? PLAYER_DOORTYPE_PROXIMITY
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ void EnDragon_Init(Actor* thisx, PlayState* play) {
|
|||
this->action = DEEP_PYTHON_ACTION_IDLE;
|
||||
this->actor.hintId = TATL_HINT_ID_DEEP_PYTHON;
|
||||
this->scale = 0.5f;
|
||||
this->actor.flags &= ~ACTOR_FLAG_8000000;
|
||||
this->actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
|
||||
EnDragon_SetupRetreatOrIdle(this);
|
||||
}
|
||||
|
|
@ -683,7 +683,7 @@ void EnDragon_Dead(EnDragon* this, PlayState* play) {
|
|||
seahorsePos.z += (Math_CosS((this->actor.parent->world.rot.y + 0x8000)) * (500.0f + BREG(38)));
|
||||
if (Actor_SpawnAsChildAndCutscene(&play->actorCtx, play, ACTOR_EN_OT, seahorsePos.x, seahorsePos.y,
|
||||
seahorsePos.z, 0, this->actor.shape.rot.y, 0, 0x4000, this->actor.cutscene,
|
||||
this->actor.unk20, NULL)) {
|
||||
this->actor.halfDaysBits, NULL)) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_13_01);
|
||||
switch (this->pythonIndex) {
|
||||
case 0:
|
||||
|
|
@ -735,14 +735,14 @@ void EnDragon_UpdateDamage(EnDragon* this, PlayState* play) {
|
|||
(this->collider.elements[6].info.bumperFlags & BUMP_HIT) ||
|
||||
(this->collider.elements[7].info.bumperFlags & BUMP_HIT)) {
|
||||
Actor_ApplyDamage(&this->actor);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 25);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 25);
|
||||
if (this->actor.colChkInfo.health > 0) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_UTSUBO_DAMAGE);
|
||||
this->action = DEEP_PYTHON_ACTION_DAMAGE;
|
||||
} else {
|
||||
Enemy_StartFinishingBlow(play, &this->actor);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_UTSUBO_DEAD);
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags |= ACTOR_FLAG_100000;
|
||||
this->action = DEEP_PYTHON_ACTION_SETUP_DEAD;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include "z_en_egblock.h"
|
||||
#include "objects/object_eg/object_eg.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_8000000)
|
||||
#define FLAGS (ACTOR_FLAG_CANT_LOCK_ON)
|
||||
|
||||
#define THIS ((EnEgblock*)thisx)
|
||||
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ void EnEgol_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnEgol_SetupWait(EnEgol* this) {
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->action = EYEGORE_ACTION_WAIT;
|
||||
this->actionFunc = EnEgol_Wait;
|
||||
}
|
||||
|
|
@ -493,7 +493,7 @@ void EnEgol_Wait(EnEgol* this, PlayState* play) {
|
|||
|
||||
void EnEgol_SetupStand(EnEgol* this) {
|
||||
EnEgol_ChangeAnim(this, EYEGORE_ANIM_STAND);
|
||||
this->actor.flags &= ~ACTOR_FLAG_8000000;
|
||||
this->actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->action = EYEGORE_ACTION_STAND;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_STAND);
|
||||
this->actionFunc = EnEgol_Stand;
|
||||
|
|
@ -1034,7 +1034,7 @@ void EnEgol_Damaged(EnEgol* this, PlayState* play) {
|
|||
} else {
|
||||
Enemy_StartFinishingBlow(play, &this->actor);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_DEAD);
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags |= ACTOR_FLAG_100000;
|
||||
this->actionFunc = EnEgol_StartDeathCutscene;
|
||||
|
|
@ -1145,7 +1145,8 @@ void EnEgol_CollisionCheck(EnEgol* this, PlayState* play) {
|
|||
Math_Vec3f_Copy(&this->laserCollider.dim.quad[3], &this->laserBase);
|
||||
Math_Vec3f_Copy(&this->laserCollider.dim.quad[0], &this->laserBase);
|
||||
Math_Vec3f_Copy(&this->laserCollider.dim.quad[2], &this->laserBase);
|
||||
Actor_SetColorFilter(&this->actor, 0, 120, false, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA,
|
||||
40);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
|
||||
EnEgol_SetupStunned(this);
|
||||
}
|
||||
|
|
@ -1167,7 +1168,7 @@ void EnEgol_CollisionCheck(EnEgol* this, PlayState* play) {
|
|||
CollisionCheck_BlueBlood(play, NULL, &this->eyePos);
|
||||
CollisionCheck_BlueBlood(play, NULL, &this->eyePos);
|
||||
CollisionCheck_BlueBlood(play, NULL, &this->eyePos);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, false, 25);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 25);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_DAMAGE);
|
||||
EnEgol_SetupDamaged(this);
|
||||
} else if (reaction == EYEGORE_HIT_IMMUNE) {
|
||||
|
|
|
|||
|
|
@ -700,7 +700,7 @@ void func_8088DD34(EnElf* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->fairyFlags & 0x2000) {
|
||||
Actor_PickUp(&this->actor, play, GI_MAX, 80.0f, 60.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MAX, 80.0f, 60.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1482,7 +1482,7 @@ void func_8089010C(Actor* thisx, PlayState* play) {
|
|||
thisx->update = func_8088FE64;
|
||||
func_8088C51C(this, 3);
|
||||
if (this->elfMsg != NULL) {
|
||||
this->elfMsg->flags |= ACTOR_FLAG_100;
|
||||
this->elfMsg->flags |= ACTOR_FLAG_TALK_REQUESTED;
|
||||
thisx->cutscene = this->elfMsg->cutscene;
|
||||
if (thisx->cutscene != -1) {
|
||||
func_8088FD04(this);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "z_en_encount1.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_100000 | ACTOR_FLAG_8000000)
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_100000 | ACTOR_FLAG_CANT_LOCK_ON)
|
||||
|
||||
#define THIS ((EnEncount1*)thisx)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "z_en_encount3.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_8000000)
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_CANT_LOCK_ON)
|
||||
|
||||
#define THIS ((EnEncount3*)thisx)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "z_en_encount4.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_8000000)
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_CANT_LOCK_ON)
|
||||
|
||||
#define THIS ((EnEncount4*)thisx)
|
||||
|
||||
|
|
|
|||
|
|
@ -652,7 +652,7 @@ void EnFamos_SetupDeathSlam(EnFamos* this) {
|
|||
this->emblemCollider.base.acFlags &= ~AC_ON;
|
||||
this->stateTimer = 20;
|
||||
this->actor.speed = 0.0f;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 20);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 20);
|
||||
this->flippedTimer = -1;
|
||||
this->actor.world.pos.y = this->actor.floorHeight - 60.0f;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_DEAD);
|
||||
|
|
@ -673,7 +673,7 @@ void EnFamos_DeathSlam(EnFamos* this, PlayState* play) {
|
|||
|
||||
void EnFamos_SetupDeathExplosion(EnFamos* this) {
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, false, 4);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 4);
|
||||
this->stateTimer = 25;
|
||||
Math_Vec3f_Copy(&this->targetDest, &this->actor.world.pos);
|
||||
this->actor.flags |= ACTOR_FLAG_10;
|
||||
|
|
@ -683,7 +683,7 @@ void EnFamos_SetupDeathExplosion(EnFamos* this) {
|
|||
void EnFamos_DeathExplosion(EnFamos* this, PlayState* play) {
|
||||
Math_StepToF(&this->actor.speed, 3.0f, 0.3f);
|
||||
if (this->actor.colorFilterTimer == 0) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, false, 4);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 4);
|
||||
}
|
||||
|
||||
this->actor.world.pos.x = randPlusMinusPoint5Scaled(5.0f) + this->targetDest.x;
|
||||
|
|
|
|||
|
|
@ -345,9 +345,9 @@ void EnFirefly_SetupFall(EnFirefly* this, PlayState* play) {
|
|||
this->actor.flags |= ACTOR_FLAG_10;
|
||||
|
||||
if (this->isInvisible) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0x2000, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 40);
|
||||
} else {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
}
|
||||
|
||||
if (this->actor.colChkInfo.damageEffect == KEESE_DMGEFF_ICE) {
|
||||
|
|
@ -544,9 +544,9 @@ void EnFirefly_FlyAway(EnFirefly* this, PlayState* play) {
|
|||
|
||||
void EnFirefly_SetupStunned(EnFirefly* this) {
|
||||
if (this->isInvisible) {
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0x2000, this->timer);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, this->timer);
|
||||
} else {
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, this->timer);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, this->timer);
|
||||
}
|
||||
|
||||
if (this->actionFunc != EnFirefly_Stunned) {
|
||||
|
|
|
|||
|
|
@ -888,7 +888,7 @@ void func_8091F5A4(Actor* thisx, PlayState* play) {
|
|||
|
||||
func_8091D904(this);
|
||||
} else if (func_8091DDF4(this, play)) {
|
||||
Actor_PickUp(&this->actor, play, GI_MAX, 80.0f, 25.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MAX, 80.0f, 25.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ void EnFish2_Init(Actor* thisx, PlayState* play) {
|
|||
} else if (this->actor.params != 0) {
|
||||
this->unk_2B4 = 10;
|
||||
this->actor.draw = NULL;
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actionFunc = func_80B2A01C;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4953,7 +4953,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
|
|||
}
|
||||
|
||||
this->actor.parent = NULL;
|
||||
Actor_PickUp(&this->actor, play, getItemId, 2000.0f, 1000.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, getItemId, 2000.0f, 1000.0f);
|
||||
this->unk_154 = 23;
|
||||
}
|
||||
break;
|
||||
|
|
@ -5002,7 +5002,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, PlayState* play) {
|
|||
if (Actor_HasParent(&this->actor, play)) {
|
||||
this->unk_154 = 24;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_SKULL_TOKEN, 2000.0f, 1000.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_SKULL_TOKEN, 2000.0f, 1000.0f);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) {
|
|||
|
||||
this->actor.parent = Actor_SpawnAsChildAndCutscene(
|
||||
&play->actorCtx, play, ACTOR_EN_FLOORMAS, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 0, 0, 0, params + 0x10, -1, this->actor.unk20, NULL);
|
||||
this->actor.world.pos.z, 0, 0, 0, params + 0x10, -1, this->actor.halfDaysBits, NULL);
|
||||
if (this->actor.parent == NULL) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
|
@ -184,7 +184,7 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) {
|
|||
|
||||
this->actor.child = Actor_SpawnAsChildAndCutscene(&play->actorCtx, play, ACTOR_EN_FLOORMAS, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0,
|
||||
params + 0x10, -1, this->actor.unk20, NULL);
|
||||
params + 0x10, -1, this->actor.halfDaysBits, NULL);
|
||||
if (this->actor.child == NULL) {
|
||||
Actor_Kill(this->actor.parent);
|
||||
Actor_Kill(&this->actor);
|
||||
|
|
@ -239,7 +239,7 @@ void func_808D09CC(EnFloormas* this) {
|
|||
this->collider.base.colType = COLTYPE_HIT3;
|
||||
this->unk_18E = 80;
|
||||
this->actor.flags &= ~(ACTOR_FLAG_200 | ACTOR_FLAG_400);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 80);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 80);
|
||||
}
|
||||
|
||||
void func_808D0A48(EnFloormas* this, PlayState* play) {
|
||||
|
|
@ -923,7 +923,7 @@ void func_808D2AF4(EnFloormas* this, PlayState* play) {
|
|||
void func_808D2B18(EnFloormas* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterDamageAnim, -3.0f);
|
||||
func_800BE504(&this->actor, &this->collider);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 20);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 20);
|
||||
this->actor.speed = 5.0f;
|
||||
this->actor.velocity.y = 5.5f;
|
||||
if (this->actor.params == ENFLOORMAS_GET_7FFF_40) {
|
||||
|
|
@ -1044,12 +1044,14 @@ void func_808D2E34(EnFloormas* this, PlayState* play) {
|
|||
func_808D2D6C(this);
|
||||
} else if (this->actor.colChkInfo.damageEffect == 1) {
|
||||
this->unk_18E = 40;
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA,
|
||||
40);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
|
||||
func_808D2D6C(this);
|
||||
} else if (this->actor.colChkInfo.damageEffect == 5) {
|
||||
this->unk_18E = 40;
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA,
|
||||
40);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
|
||||
this->drawDmgEffScale = 0.55f;
|
||||
this->drawDmgEffAlpha = 2.0f;
|
||||
|
|
|
|||
|
|
@ -1001,9 +1001,9 @@ void EnFsn_GiveItem(EnFsn* this, PlayState* play) {
|
|||
}
|
||||
this->actionFunc = EnFsn_SetupResumeInteraction;
|
||||
} else if (this->isSelling == true) {
|
||||
Actor_PickUp(&this->actor, play, this->items[this->cursorIndex]->getItemId, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, this->items[this->cursorIndex]->getItemId, 300.0f, 300.0f);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, this->getItemId, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, this->getItemId, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1154,7 +1154,7 @@ void EnFsn_HandleCanPlayerBuyItem(EnFsn* this, PlayState* play) {
|
|||
func_8019F208();
|
||||
item = this->items[this->cursorIndex];
|
||||
item->buyFanfareFunc(play, item);
|
||||
Actor_PickUp(&this->actor, play, this->items[this->cursorIndex]->getItemId, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, this->items[this->cursorIndex]->getItemId, 300.0f, 300.0f);
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include "objects/object_mu/object_mu.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10 | ACTOR_FLAG_2000000 | ACTOR_FLAG_8000000)
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10 | ACTOR_FLAG_2000000 | ACTOR_FLAG_CANT_LOCK_ON)
|
||||
|
||||
#define THIS ((EnFu*)thisx)
|
||||
|
||||
|
|
@ -879,9 +879,9 @@ void func_80963560(EnFu* this, PlayState* play) {
|
|||
this->actor.parent = NULL;
|
||||
func_80963610(this);
|
||||
} else if ((this->unk_552 == 0x2880) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_22_80)) {
|
||||
Actor_PickUp(&this->actor, play, GI_HEART_PIECE, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 500.0f, 100.0f);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_RUPEE_PURPLE, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_RUPEE_PURPLE, 500.0f, 100.0f);
|
||||
}
|
||||
this->actor.child->freezeTimer = 10;
|
||||
}
|
||||
|
|
@ -1176,7 +1176,7 @@ void func_80963FF8(EnFu* this, PlayState* play) {
|
|||
|
||||
if (player->stateFlags1 & PLAYER_STATE1_100000) {
|
||||
play->actorCtx.unk268 = 1;
|
||||
play->actorCtx.unk_26C.press.button = 0x8000;
|
||||
play->actorCtx.unk_26C.press.button = BTN_A;
|
||||
} else {
|
||||
play->actorCtx.unk268 = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ void func_80932C98(EnFz* this, PlayState* play) {
|
|||
|
||||
case 15:
|
||||
Actor_ApplyDamage(&this->actor);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 8);
|
||||
if (this->actor.colChkInfo.health != 0) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_FREEZAD_DAMAGE);
|
||||
sp3C.x = this->actor.world.pos.x;
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ void func_80AF6994(EnGamelupy* this) {
|
|||
|
||||
void func_80AF69A8(EnGamelupy* this, PlayState* play) {
|
||||
if (this->collider.base.ocFlags1 & OC1_HIT) {
|
||||
*this->unk_198 += 0x32;
|
||||
*this->unk_198 += 50;
|
||||
if (this->rupeeIndex == 1) {
|
||||
Rupees_ChangeBy(5);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -632,7 +632,7 @@ void func_80B10924(EnGb2* this, PlayState* play) {
|
|||
}
|
||||
this->actionFunc = func_80B109DC;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, sp24, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, sp24, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -641,7 +641,7 @@ void func_80B109DC(EnGb2* this, PlayState* play) {
|
|||
Message_StartTextbox(play, this->unk_26E, &this->actor);
|
||||
this->actionFunc = func_80B10634;
|
||||
} else {
|
||||
func_800B85E0(&this->actor, play, 300.0f, -1);
|
||||
func_800B85E0(&this->actor, play, 300.0f, PLAYER_IA_MINUS1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -832,7 +832,7 @@ void func_80B111AC(EnGb2* this, PlayState* play) {
|
|||
this->actor.world.pos.x = D_80B11A00[index][0];
|
||||
this->actor.world.pos.y = D_80B11A00[index][1];
|
||||
this->actor.world.pos.z = D_80B11A00[index][2];
|
||||
this->actor.world.rot.y = D_80B11A00[index][3] * 182.04445f;
|
||||
this->actor.world.rot.y = DEG_TO_BINANG(D_80B11A00[index][3]);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
this->actionFunc = func_80B11268;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -804,7 +804,7 @@ void func_80BB31B8(EnGeg* this, PlayState* play) {
|
|||
}
|
||||
this->actionFunc = func_80BB32AC;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, getItemId, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, getItemId, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -813,7 +813,7 @@ void func_80BB32AC(EnGeg* this, PlayState* play) {
|
|||
Message_StartTextbox(play, this->unk_496, &this->actor);
|
||||
this->actionFunc = func_80BB27D4;
|
||||
} else {
|
||||
func_800B85E0(&this->actor, play, 400.0f, -1);
|
||||
func_800B85E0(&this->actor, play, 400.0f, PLAYER_IA_MINUS1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -525,16 +525,16 @@ void EnGinkoMan_BankAward(EnGinkoMan* this, PlayState* play) {
|
|||
EnGinkoMan_SetupBankAward2(this);
|
||||
} else if (this->curTextId == 0x45B) { // "Whats this, you already saved up 200?"
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_10_08)) {
|
||||
Actor_PickUp(&this->actor, play, GI_WALLET_ADULT + CUR_UPG_VALUE(UPG_WALLET), 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_WALLET_ADULT + CUR_UPG_VALUE(UPG_WALLET), 500.0f, 100.0f);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_RUPEE_BLUE, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_RUPEE_BLUE, 500.0f, 100.0f);
|
||||
}
|
||||
} else if (this->curTextId == 0x45C) { // "Whats this, you already saved up 5000?"
|
||||
Actor_PickUp(&this->actor, play, GI_RUPEE_BLUE, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_RUPEE_BLUE, 500.0f, 100.0f);
|
||||
} else if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_59_08)) {
|
||||
Actor_PickUp(&this->actor, play, GI_HEART_PIECE, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 500.0f, 100.0f);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_RUPEE_BLUE, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_RUPEE_BLUE, 500.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -968,7 +968,7 @@ void func_80B5253C(EnGk* this, PlayState* play) {
|
|||
}
|
||||
this->actionFunc = func_80B525E0;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, sp24, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, sp24, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -978,7 +978,7 @@ void func_80B525E0(EnGk* this, PlayState* play) {
|
|||
Message_StartTextbox(play, this->unk_31C, &this->actor);
|
||||
this->actionFunc = func_80B52430;
|
||||
} else {
|
||||
func_800B85E0(&this->actor, play, 400.0f, -1);
|
||||
func_800B85E0(&this->actor, play, 400.0f, PLAYER_IA_MINUS1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1226,8 +1226,8 @@ TexturePtr D_80B533E4[] = {
|
|||
void EnGk_Draw(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnGk* this = THIS;
|
||||
Vec3f sp5C;
|
||||
Vec3f sp50;
|
||||
Vec3f pos;
|
||||
Vec3f scale;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
|
|
@ -1242,12 +1242,12 @@ void EnGk_Draw(Actor* thisx, PlayState* play) {
|
|||
|
||||
func_8012C2DC(play->state.gfxCtx);
|
||||
|
||||
sp5C = this->actor.world.pos;
|
||||
sp50.x = 0.2f;
|
||||
sp50.y = 0.2f;
|
||||
sp50.z = 0.2f;
|
||||
pos = this->actor.world.pos;
|
||||
scale.x = 0.2f;
|
||||
scale.y = 0.2f;
|
||||
scale.z = 0.2f;
|
||||
|
||||
func_800BC620(&sp5C, &sp50, 255, play);
|
||||
func_800BC620(&pos, &scale, 255, play);
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80B533E4[this->unk_2E0]));
|
||||
|
||||
|
|
@ -1259,20 +1259,21 @@ void EnGk_Draw(Actor* thisx, PlayState* play) {
|
|||
func_8012C2DC(play->state.gfxCtx);
|
||||
if ((this->unk_2E4 == 0) || (this->unk_2E4 == 1) || (this->unk_2E4 == 2) || (this->unk_2E4 == 3) ||
|
||||
(this->unk_2E4 == 4)) {
|
||||
sp5C.x = this->actor.world.pos.x - 15.0f;
|
||||
sp5C.y = this->actor.world.pos.y;
|
||||
sp5C.z = this->actor.world.pos.z;
|
||||
pos.x = this->actor.world.pos.x - 15.0f;
|
||||
pos.y = this->actor.world.pos.y;
|
||||
pos.z = this->actor.world.pos.z;
|
||||
|
||||
sp50.x = 0.2f;
|
||||
sp50.y = 0.2f;
|
||||
sp50.z = 0.2f;
|
||||
scale.x = 0.2f;
|
||||
scale.y = 0.2f;
|
||||
scale.z = 0.2f;
|
||||
} else {
|
||||
sp5C = this->actor.world.pos;
|
||||
sp50.x = 0.2f;
|
||||
sp50.y = 0.2f;
|
||||
sp50.z = 0.2f;
|
||||
pos = this->actor.world.pos;
|
||||
scale.x = 0.2f;
|
||||
scale.y = 0.2f;
|
||||
scale.z = 0.2f;
|
||||
}
|
||||
func_800BC620(&sp5C, &sp50, 255, play);
|
||||
|
||||
func_800BC620(&pos, &scale, 255, play);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -713,7 +713,7 @@ void EnGrasshopper_SetupDamaged(EnGrasshopper* this, PlayState* play) {
|
|||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FIRE;
|
||||
}
|
||||
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
this->action = EN_GRASSHOPPER_ACTION_DAMAGED;
|
||||
this->actionFunc = EnGrasshopper_Damaged;
|
||||
}
|
||||
|
|
@ -727,7 +727,7 @@ void EnGrasshopper_Damaged(EnGrasshopper* this, PlayState* play) {
|
|||
|
||||
void EnGrasshopper_SetupDead(EnGrasshopper* this, PlayState* play) {
|
||||
EnGrasshopper_ChangeAnim(this, EN_GRASSHOPPER_ANIM_DEAD);
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.speed = 0.0f;
|
||||
this->approachSpeed = 0.0f;
|
||||
this->actor.velocity.y = 5.0f;
|
||||
|
|
@ -738,7 +738,7 @@ void EnGrasshopper_SetupDead(EnGrasshopper* this, PlayState* play) {
|
|||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FIRE;
|
||||
}
|
||||
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 25);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 25);
|
||||
Enemy_StartFinishingBlow(play, &this->actor);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_BATTA_DEAD);
|
||||
this->action = EN_GRASSHOPPER_ACTION_DEAD;
|
||||
|
|
@ -875,7 +875,7 @@ void EnGrasshopper_UpdateDamage(EnGrasshopper* this, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
} else if (this->actor.colChkInfo.damageEffect == EN_GRASSHOPPER_DMGEFF_LIGHT_ORB) {
|
||||
Actor_SetColorFilter(&this->actor, 0x8000, 255, 0, 25);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 255, COLORFILTER_BUFFLAG_OPA, 25);
|
||||
this->drawDmgEffTimer = 20;
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.focus.pos.x, this->actor.focus.pos.y,
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ void func_8099874C(EnGs* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_809989B4(EnGs* this, PlayState* play) {
|
||||
Actor_PickUp(&this->actor, play, this->unk_20C, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem(&this->actor, play, this->unk_20C, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809989F4;
|
||||
}
|
||||
|
||||
|
|
@ -509,7 +509,7 @@ void func_809989F4(EnGs* this, PlayState* play) {
|
|||
this->actor.parent = NULL;
|
||||
func_80997D14(this, play);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, this->unk_20C, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem(&this->actor, play, this->unk_20C, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -563,7 +563,7 @@ s32 func_80998BBC(EnGs* this, PlayState* play) {
|
|||
this->unk_197 &= 0xF;
|
||||
this->unk_19D = 1;
|
||||
} else if (this->unk_19D == 1) {
|
||||
this->unk_19E[0].z = (this->unk_1D4 % 8) * 0.125f * 360.0f * (0x10000 / 360.0f);
|
||||
this->unk_19E[0].z = DEG_TO_BINANG((this->unk_1D4 % 8) * 0.125f * 360.0f);
|
||||
this->unk_19E[1].z = -this->unk_19E[0].z;
|
||||
if (func_80998334(this, play, &this->unk_1DC, &this->unk_1E0, &this->unk_1D4, 0.8f, 0.005f, 0.001f, 7, 0) ==
|
||||
0.0f) {
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ void EnGuardNuts_Burrow(EnGuardNuts* this, PlayState* play) {
|
|||
digPos.y = this->actor.floorHeight;
|
||||
EffectSsHahen_SpawnBurst(play, &digPos, 4.0f, 0, 10, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
this->targetHeadPos.y = 0;
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->targetHeadPos.x = this->targetHeadPos.y;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_DOWN);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_UP);
|
||||
|
|
@ -311,7 +311,7 @@ void EnGuardNuts_Unburrow(EnGuardNuts* this, PlayState* play) {
|
|||
if (this->guardTextIndex == 9) {
|
||||
this->hasCompletedConversation = true;
|
||||
}
|
||||
this->actor.flags &= ~ACTOR_FLAG_8000000;
|
||||
this->actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
EnGuardNuts_SetupWait(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ void EnGuruguru_Init(Actor* thisx, PlayState* play) {
|
|||
if (this->actor.params == 0) {
|
||||
func_80BC6E10(this);
|
||||
} else if (this->actor.params == 2) {
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.draw = NULL;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actionFunc = EnGuruguru_DoNothing;
|
||||
|
|
@ -300,7 +300,7 @@ void func_80BC7440(EnGuruguru* this, PlayState* play) {
|
|||
SET_WEEKEVENTREG(WEEKEVENTREG_38_40);
|
||||
this->actionFunc = func_80BC7520;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_MASK_BREMEN, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MASK_BREMEN, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ void EnHeishi_Init(Actor* thisx, PlayState* play) {
|
|||
this->actor.targetMode = 6;
|
||||
this->actor.gravity = -3.0f;
|
||||
Collider_InitAndSetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInit);
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
EnHeishi_SetupIdle(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ void func_80BDB59C(EnHiddenNuts* this, PlayState* play) {
|
|||
|
||||
void func_80BDB788(EnHiddenNuts* this) {
|
||||
this->actor.flags |= ACTOR_FLAG_10;
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_UP);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_DEAD);
|
||||
this->unk_21A = 2;
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ void func_80C20590(EnHintSkb* this, PlayState* play) {
|
|||
this->drawDmgEffScale = 0.0f;
|
||||
this->drawDmgEffAlpha = 0.0f;
|
||||
if (this->actor.colChkInfo.health != 0) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_STALKID_DAMAGE);
|
||||
this->unk_3E8 |= 1;
|
||||
|
|
@ -375,7 +375,7 @@ void func_80C2069C(EnHintSkb* this, PlayState* play) {
|
|||
this->drawDmgEffScale = 0.0f;
|
||||
this->drawDmgEffAlpha = 0.0f;
|
||||
if (this->actor.colChkInfo.health != 0) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_STALKID_DAMAGE);
|
||||
this->unk_3E8 |= 1;
|
||||
|
|
@ -663,12 +663,12 @@ void func_80C20E90(EnHintSkb* this, PlayState* play) {
|
|||
this->drawDmgEffTimer = 40;
|
||||
this->drawDmgEffAlpha = 1.0f;
|
||||
this->drawDmgEffScale = 0.0f;
|
||||
Actor_SetColorFilter(&this->actor, 0, 120, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
func_80C2011C(this);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Actor_SetColorFilter(&this->actor, 0, 120, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
func_80C2011C(this);
|
||||
break;
|
||||
|
||||
|
|
@ -677,7 +677,7 @@ void func_80C20E90(EnHintSkb* this, PlayState* play) {
|
|||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FIRE;
|
||||
this->drawDmgEffAlpha = 1.0f;
|
||||
this->drawDmgEffScale = 0.0f;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_STALKID_DAMAGE);
|
||||
this->unk_3E8 |= 1;
|
||||
func_80C20274(this);
|
||||
|
|
@ -692,7 +692,7 @@ void func_80C20E90(EnHintSkb* this, PlayState* play) {
|
|||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FROZEN_SFX;
|
||||
this->drawDmgEffAlpha = 1.0f;
|
||||
this->drawDmgEffScale = 0.5f;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
func_80C20540(this);
|
||||
break;
|
||||
case 4:
|
||||
|
|
@ -700,7 +700,7 @@ void func_80C20E90(EnHintSkb* this, PlayState* play) {
|
|||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS;
|
||||
this->drawDmgEffAlpha = 1.0f;
|
||||
this->drawDmgEffScale = 0.5f;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_STALKID_DAMAGE);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3);
|
||||
func_80C2066C(this);
|
||||
|
|
@ -719,7 +719,7 @@ void func_80C20E90(EnHintSkb* this, PlayState* play) {
|
|||
}
|
||||
|
||||
case 13:
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_STALKID_DAMAGE);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3);
|
||||
func_80C20274(this);
|
||||
|
|
|
|||
|
|
@ -151,13 +151,15 @@ void EnHoll_VisibleIdle(EnHoll* this, PlayState* play) {
|
|||
f32 playerDistFromCentralPlane;
|
||||
|
||||
if (this->type == EN_HOLL_TYPE_DEFAULT) {
|
||||
u32 actorCtxBitmask = (play->actorCtx.unkC & 0x2AA) >> 1 | (play->actorCtx.unkC & 0x155);
|
||||
u32 halfDaysBit =
|
||||
((play->actorCtx.halfDaysBit & HALFDAYBIT_DAWNS) >> 1) | (play->actorCtx.halfDaysBit & HALFDAYBIT_NIGHTS);
|
||||
u32 zActorBitmask = D_801AED48[EN_HOLL_GET_Z_ACTOR_BITMASK_INDEX(&this->actor)];
|
||||
|
||||
if (!(actorCtxBitmask & zActorBitmask)) {
|
||||
if (!(halfDaysBit & zActorBitmask)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this == sInstancePlayingSound) {
|
||||
func_800B9010(&this->actor, NA_SE_EV_INVISIBLE_MONKEY - SFX_FLAG);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -672,7 +672,7 @@ s32 EnHorse_PlayerCanMove(EnHorse* this, PlayState* play) {
|
|||
if ((player->stateFlags1 & PLAYER_STATE1_1) || (func_800B7128(GET_PLAYER(play)) == true) ||
|
||||
(player->stateFlags1 & PLAYER_STATE1_100000) ||
|
||||
(((this->stateFlags & ENHORSE_FLAG_19) || (this->stateFlags & ENHORSE_FLAG_29)) && !this->inRace) ||
|
||||
(this->action == ENHORSE_ACTION_HBA) || (player->actor.flags & ACTOR_FLAG_100) ||
|
||||
(this->action == ENHORSE_ACTION_HBA) || (player->actor.flags & ACTOR_FLAG_TALK_REQUESTED) ||
|
||||
(play->csCtx.state != CS_STATE_0) || (ActorCutscene_GetCurrentIndex() != -1) ||
|
||||
(player->stateFlags1 & PLAYER_STATE1_20) || (player->csMode != PLAYER_CSMODE_0)) {
|
||||
return false;
|
||||
|
|
@ -1642,7 +1642,7 @@ void EnHorse_Reverse(EnHorse* this, PlayState* play) {
|
|||
} else if (stickMag < 10.0f) {
|
||||
stickAngle = -0x7FFF;
|
||||
}
|
||||
} else if ((player->actor.flags & ACTOR_FLAG_100) || (play->csCtx.state != CS_STATE_0) ||
|
||||
} else if ((player->actor.flags & ACTOR_FLAG_TALK_REQUESTED) || (play->csCtx.state != CS_STATE_0) ||
|
||||
(ActorCutscene_GetCurrentIndex() != -1) || (player->stateFlags1 & PLAYER_STATE1_20)) {
|
||||
EnHorse_StartMountedIdleResetAnim(this);
|
||||
this->actor.speed = 0.0f;
|
||||
|
|
|
|||
|
|
@ -166,9 +166,9 @@ void func_80953098(EnHs* this, PlayState* play) {
|
|||
} else {
|
||||
this->stateFlags |= 8;
|
||||
if (INV_CONTENT(ITEM_MASK_BUNNY) == ITEM_MASK_BUNNY) {
|
||||
Actor_PickUp(&this->actor, play, GI_RUPEE_RED, 10000.0f, 50.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_RUPEE_RED, 10000.0f, 50.0f);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_MASK_BUNNY, 10000.0f, 50.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MASK_BUNNY, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ void EnIk_Freeze(EnIk* this) {
|
|||
this->drawDmgEffAlpha = 1.0f;
|
||||
this->timer = 80;
|
||||
this->actor.flags &= ~ACTOR_FLAG_400;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 80);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 80);
|
||||
}
|
||||
|
||||
void EnIk_Thaw(EnIk* this, PlayState* play) {
|
||||
|
|
@ -776,7 +776,7 @@ void EnIk_UpdateDamage(EnIk* this, PlayState* play) {
|
|||
if ((this->actor.colChkInfo.damageEffect != DMG_EFF_IMMUNE) &&
|
||||
((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
|
||||
(!(this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)))) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 12);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 12);
|
||||
this->invincibilityFrames = 12;
|
||||
EnIk_Thaw(this, play);
|
||||
this->colliderQuad.base.atFlags &= ~AT_ON;
|
||||
|
|
@ -1064,7 +1064,7 @@ void EnIk_UpdateArmorDraw(EnIk* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnIk_Draw(Actor* thisx, PlayState* play) {
|
||||
static Vec3f D_8092C200 = { 0.53f, 0.53f, 0.53f };
|
||||
static Vec3f sScale = { 0.53f, 0.53f, 0.53f };
|
||||
EnIk* this = THIS;
|
||||
Gfx* gfx;
|
||||
Gfx** gfxArmorType;
|
||||
|
|
@ -1091,7 +1091,7 @@ void EnIk_Draw(Actor* thisx, PlayState* play) {
|
|||
if (this->actor.colorFilterTimer != 0) {
|
||||
func_800AE5A0(play);
|
||||
}
|
||||
func_800BC620(&this->actor.focus.pos, &D_8092C200, 255, play);
|
||||
func_800BC620(&this->actor.focus.pos, &sScale, 255, play);
|
||||
Actor_DrawDamageEffects(play, &this->actor, this->limbPos, ARRAY_COUNT(this->limbPos), this->drawDmgEffScale,
|
||||
this->drawDmgEffFrozenSteamScale, this->drawDmgEffAlpha, this->drawDmgEffType);
|
||||
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ void func_808F3B40(EnIn* this, PlayState* play) {
|
|||
textId = gSaveContext.save.day != 3 ? 0x3481 : 0x34A4;
|
||||
this->actor.textId = textId;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -426,7 +426,7 @@ void func_808F3C40(EnIn* this, PlayState* play) {
|
|||
textId = gSaveContext.save.day != 3 ? 0x346A : 0x3492;
|
||||
this->actor.textId = textId;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -450,7 +450,7 @@ void func_808F3D40(EnIn* this, PlayState* play) {
|
|||
this->actor.textId = textId;
|
||||
this->actor.flags |= ACTOR_FLAG_10000;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_MASK_GARO, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MASK_GARO, 500.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -750,7 +750,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
if (gSaveContext.save.playerData.rupees >= play->msgCtx.unk1206C) {
|
||||
if (Inventory_HasEmptyBottle()) {
|
||||
this->actionFunc = func_808F3C40;
|
||||
Actor_PickUp(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
||||
ret = true;
|
||||
} else {
|
||||
|
|
@ -896,7 +896,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
func_808F35D8(this, play);
|
||||
if (Inventory_HasEmptyBottle()) {
|
||||
this->actionFunc = func_808F3B40;
|
||||
Actor_PickUp(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
ret = true;
|
||||
} else {
|
||||
Actor_ContinueText(play, &this->actor, 0x347F);
|
||||
|
|
@ -920,7 +920,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
break;
|
||||
case 0x347C:
|
||||
this->actionFunc = func_808F3D40;
|
||||
Actor_PickUp(&this->actor, play, GI_MASK_GARO, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MASK_GARO, 500.0f, 100.0f);
|
||||
func_808F35D8(this, play);
|
||||
ret = true;
|
||||
break;
|
||||
|
|
@ -1002,7 +1002,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
if (gSaveContext.save.playerData.rupees >= play->msgCtx.unk1206C) {
|
||||
if (Inventory_HasEmptyBottle()) {
|
||||
this->actionFunc = func_808F3C40;
|
||||
Actor_PickUp(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
||||
ret = true;
|
||||
} else {
|
||||
|
|
@ -1085,7 +1085,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
break;
|
||||
case 0x349F:
|
||||
this->actionFunc = func_808F3D40;
|
||||
Actor_PickUp(&this->actor, play, GI_MASK_GARO, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MASK_GARO, 500.0f, 100.0f);
|
||||
func_808F35D8(this, play);
|
||||
ret = true;
|
||||
break;
|
||||
|
|
@ -1100,7 +1100,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
func_808F35D8(this, play);
|
||||
if (Inventory_HasEmptyBottle()) {
|
||||
this->actionFunc = func_808F3B40;
|
||||
Actor_PickUp(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
ret = true;
|
||||
} else {
|
||||
Actor_ContinueText(play, &this->actor, 0x34A2);
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ void EnInsect_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (!(this->unk_30C & 8) && (D_8091BD60 < 4) && EnInsect_InBottleRange(this, play) &&
|
||||
Actor_PickUp(&this->actor, play, GI_MAX, 60.0f, 30.0f)) {
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MAX, 60.0f, 30.0f)) {
|
||||
D_8091BD60++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2186,7 +2186,7 @@ void func_80B47830(EnInvadepoh* this) {
|
|||
this->collider.base.acFlags &= ~AC_ON;
|
||||
this->collider.base.ocFlags1 |= OC1_ON;
|
||||
Animation_PlayLoop(&this->skelAnime, &gAlienJerkingAnim);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 16);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16);
|
||||
this->alienAlpha = 255;
|
||||
this->actor.draw = func_80B4DB14;
|
||||
this->drawAlien = true;
|
||||
|
|
@ -3438,7 +3438,7 @@ void func_80B4AEDC(EnInvadepoh* this, PlayState* play) {
|
|||
SET_WEEKEVENTREG(WEEKEVENTREG_22_02);
|
||||
func_80B4AF80(this);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_MILK_BOTTLE, 2000.0f, 2000.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MILK_BOTTLE, 2000.0f, 2000.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ void func_8095E204(EnIshi* this, PlayState* play) {
|
|||
for (i = 0; i < 3; i++) {
|
||||
if (Actor_SpawnAsChildAndCutscene(&play->actorCtx, play, ACTOR_EN_INSECT, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 1,
|
||||
this->actor.cutscene, this->actor.unk20, NULL) == NULL) {
|
||||
this->actor.cutscene, this->actor.halfDaysBits, NULL) == NULL) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -513,9 +513,9 @@ void func_8095E660(EnIshi* this, PlayState* play) {
|
|||
|
||||
if ((this->actor.xzDistToPlayer < 90.0f) && (sp30 == 0)) {
|
||||
if (sp38 == 1) {
|
||||
Actor_PickUp(&this->actor, play, GI_NONE, 80.0f, 20.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_NONE, 80.0f, 20.0f);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_NONE, 50.0f, 10.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_NONE, 50.0f, 10.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -687,7 +687,7 @@ void EnJg_LullabyIntroCutsceneAction(EnJg* this, PlayState* play) {
|
|||
this->drum = Actor_SpawnAsChildAndCutscene(
|
||||
&play->actorCtx, play, ACTOR_OBJ_JG_GAKKI, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z,
|
||||
this->actor.params, this->actor.cutscene, this->actor.unk20, NULL);
|
||||
this->actor.params, this->actor.cutscene, this->actor.halfDaysBits, NULL);
|
||||
}
|
||||
|
||||
if (this->cutsceneAnimIndex == EN_JG_ANIM_TAKING_OUT_DRUM) {
|
||||
|
|
|
|||
|
|
@ -386,9 +386,9 @@ void func_80C14554(EnJgameTsn* this, PlayState* play) {
|
|||
}
|
||||
func_80C145FC(this);
|
||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_82_10)) {
|
||||
Actor_PickUp(&this->actor, play, GI_RUPEE_PURPLE, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_RUPEE_PURPLE, 500.0f, 100.0f);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_HEART_PIECE, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 500.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -402,7 +402,7 @@ void func_80C14610(EnJgameTsn* this, PlayState* play) {
|
|||
this->unk_300 = 0x10A4;
|
||||
func_80C14030(this);
|
||||
} else {
|
||||
func_800B85E0(&this->actor, play, 200.0f, -1);
|
||||
func_800B85E0(&this->actor, play, 200.0f, PLAYER_IA_MINUS1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -476,19 +476,19 @@ void func_80969400(s32 arg0) {
|
|||
void func_80969494(EnJs* this, PlayState* play) {
|
||||
func_80968A5C(this);
|
||||
func_801477B4(play);
|
||||
this->actor.flags &= ~ACTOR_FLAG_100;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TALK_REQUESTED;
|
||||
this->actionFunc = func_80969B5C;
|
||||
}
|
||||
|
||||
void func_809694E8(EnJs* this, PlayState* play) {
|
||||
func_801477B4(play);
|
||||
this->actor.flags &= ~ACTOR_FLAG_100;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TALK_REQUESTED;
|
||||
this->actionFunc = func_8096A104;
|
||||
}
|
||||
|
||||
void func_80969530(EnJs* this, PlayState* play) {
|
||||
func_801477B4(play);
|
||||
this->actor.flags &= ~ACTOR_FLAG_100;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TALK_REQUESTED;
|
||||
this->actionFunc = func_8096A6F4;
|
||||
if ((this->actor.home.rot.y == this->actor.shape.rot.y) && (this->unk_2B8 & 0x10)) {
|
||||
Animation_Change(&this->skelAnime, &gMoonChildGettingUpAnim, -1.0f,
|
||||
|
|
@ -872,7 +872,7 @@ void func_8096A2C0(EnJs* this, PlayState* play) {
|
|||
this->actionFunc = func_8096A1E8;
|
||||
func_800B8500(&this->actor, play, 1000.0f, 1000.0f, PLAYER_IA_MINUS1);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_MASK_FIERCE_DEITY, 10000.0f, 1000.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MASK_FIERCE_DEITY, 10000.0f, 1000.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ void EnKaizoku_Init(Actor* thisx, PlayState* play) {
|
|||
blureInit.calcMode = 2;
|
||||
Effect_Add(play, &this->blureIndex, EFFECT_BLURE1, 0, 0, &blureInit);
|
||||
Actor_SetScale(&this->picto.actor, 0.0125f);
|
||||
this->picto.actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->picto.actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->picto.actor.flags &= ~ACTOR_FLAG_1;
|
||||
if (this->switchFlag == 127) {
|
||||
this->switchFlag = -1;
|
||||
|
|
@ -613,7 +613,7 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) {
|
|||
this->unk_59C = 0;
|
||||
this->subCamId = 0;
|
||||
this->picto.actor.flags &= ~ACTOR_FLAG_100000;
|
||||
this->picto.actor.flags &= ~ACTOR_FLAG_8000000;
|
||||
this->picto.actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->picto.actor.flags |= ACTOR_FLAG_1;
|
||||
func_80B872A4(this);
|
||||
}
|
||||
|
|
@ -1681,7 +1681,7 @@ void func_80B8960C(EnKaizoku* this, PlayState* play) {
|
|||
func_800B7298(play, &this->picto.actor, 0x7B);
|
||||
Enemy_StartFinishingBlow(play, &this->picto.actor);
|
||||
Actor_PlaySfx(&this->picto.actor, NA_SE_EN_PIRATE_DEAD);
|
||||
this->picto.actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->picto.actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->picto.actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->picto.actor.flags &= ~ACTOR_FLAG_400;
|
||||
this->unk_598 = 0;
|
||||
|
|
@ -1836,7 +1836,8 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) {
|
|||
if (((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_SFX) &&
|
||||
(this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX)) ||
|
||||
this->unk_2B8 == 0) {
|
||||
Actor_SetColorFilter(&this->picto.actor, 0, 120, 0, 40);
|
||||
Actor_SetColorFilter(&this->picto.actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA,
|
||||
40);
|
||||
this->bodyCollider.info.elemType = ELEMTYPE_UNK1;
|
||||
this->bodyCollider.base.colType = COLTYPE_HIT3;
|
||||
this->swordCollider.info.elemType = ELEMTYPE_UNK2;
|
||||
|
|
@ -1908,7 +1909,7 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (sp64) {
|
||||
Actor_SetColorFilter(&this->picto.actor, 0x4000, 255, 0, 8);
|
||||
Actor_SetColorFilter(&this->picto.actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
|
||||
Actor_ApplyDamage(&this->picto.actor);
|
||||
if (this->picto.actor.colChkInfo.health <= 0) {
|
||||
func_80B8960C(this, play);
|
||||
|
|
|
|||
|
|
@ -1025,7 +1025,7 @@ void EnKakasi_DiggingAway(EnKakasi* this, PlayState* play) {
|
|||
void EnKakasi_SetupIdleUnderground(EnKakasi* this) {
|
||||
this->picto.actor.shape.yOffset = -7000.0;
|
||||
this->picto.actor.draw = NULL;
|
||||
this->picto.actor.flags |= ACTOR_FLAG_8000000;
|
||||
this->picto.actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->unkState196 = 5;
|
||||
this->actionFunc = EnKakasi_IdleUnderground;
|
||||
}
|
||||
|
|
@ -1033,7 +1033,7 @@ void EnKakasi_SetupIdleUnderground(EnKakasi* this) {
|
|||
void EnKakasi_IdleUnderground(EnKakasi* this, PlayState* play) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_79_08) && this->picto.actor.xzDistToPlayer < this->songSummonDist &&
|
||||
(BREG(1) != 0 || play->msgCtx.ocarinaMode == 0xD)) {
|
||||
this->picto.actor.flags &= ~ACTOR_FLAG_8000000;
|
||||
this->picto.actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
play->msgCtx.ocarinaMode = 4;
|
||||
this->actionFunc = EnKakasi_SetupRiseOutOfGround;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ void func_80AD6F9C(EnKame* this) {
|
|||
this->collider.base.colType = COLTYPE_HIT3;
|
||||
this->unk_2A2 = 80;
|
||||
this->actor.flags &= ~ACTOR_FLAG_400;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 80);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 80);
|
||||
}
|
||||
|
||||
void func_80AD7018(EnKame* this, PlayState* play) {
|
||||
|
|
@ -523,10 +523,10 @@ void func_80AD7FF8(EnKame* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80AD8060(EnKame* this) {
|
||||
s16 sp36 = Animation_GetLastFrame(&object_tl_Anim_0008B4);
|
||||
s16 lastFrame = Animation_GetLastFrame(&object_tl_Anim_0008B4);
|
||||
|
||||
Animation_Change(&this->skelAnime1, &object_tl_Anim_0008B4, 1.0f, 0.0f, sp36, ANIMMODE_ONCE, -3.0f);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, sp36);
|
||||
Animation_Change(&this->skelAnime1, &object_tl_Anim_0008B4, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE, -3.0f);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, lastFrame);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_PAMET_DAMAGE);
|
||||
this->collider.base.acFlags &= ~AC_ON;
|
||||
this->actionFunc = func_80AD810C;
|
||||
|
|
@ -540,7 +540,7 @@ void func_80AD810C(EnKame* this, PlayState* play) {
|
|||
|
||||
void func_80AD8148(EnKame* this, PlayState* play) {
|
||||
Animation_PlayLoop(&this->skelAnime1, &object_tl_Anim_000AF4);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 20);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 20);
|
||||
this->collider.base.acFlags &= ~AC_ON;
|
||||
this->collider.base.atFlags &= ~AT_ON;
|
||||
this->collider.base.atFlags &= ~(AC_HARD | AC_HIT);
|
||||
|
|
@ -571,7 +571,7 @@ void func_80AD825C(EnKame* this, PlayState* play) {
|
|||
if (this->unk_29E == 1) {
|
||||
this->actor.colorFilterTimer = 100;
|
||||
} else if (this->actor.colorFilterTimer == 0) {
|
||||
Actor_SetColorFilter(&this->actor, 0xC000, 255, 0, 100);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_NONE, 255, COLORFILTER_BUFFLAG_OPA, 100);
|
||||
}
|
||||
this->actor.shape.rot.x += Rand_S16Offset(0x700, 0x1400);
|
||||
this->actor.shape.rot.y += (s16)Rand_ZeroFloat(5120.0f);
|
||||
|
|
@ -643,7 +643,7 @@ void func_80AD84C0(EnKame* this, PlayState* play) {
|
|||
} else if (!(this->collider.base.acFlags & AC_HARD)) {
|
||||
if (this->actor.colChkInfo.damageEffect == 5) {
|
||||
this->unk_2A2 = 40;
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
|
||||
this->drawDmgEffScale = 0.6f;
|
||||
this->drawDmgEffAlpha = 2.0f;
|
||||
|
|
@ -651,7 +651,7 @@ void func_80AD84C0(EnKame* this, PlayState* play) {
|
|||
func_80AD7FA4(this);
|
||||
} else if (this->actor.colChkInfo.damageEffect == 1) {
|
||||
this->unk_2A2 = 40;
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
|
||||
func_80AD7FA4(this);
|
||||
} else if (this->actor.colChkInfo.damageEffect == 3) {
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ void EnKarebaba_DeadItemDrop(EnKarebaba* this, PlayState* play) {
|
|||
if (Actor_HasParent(&this->actor, play) || (this->timer == 0)) {
|
||||
EnKarebaba_SetupDead(this);
|
||||
} else {
|
||||
Actor_PickUpNearby(&this->actor, play, GI_STICKS_1);
|
||||
Actor_OfferGetItemNearby(&this->actor, play, GI_STICKS_1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include "overlays/actors/ovl_En_Maruta/z_en_maruta.h"
|
||||
#include "objects/object_js/object_js.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10 | ACTOR_FLAG_2000000 | ACTOR_FLAG_8000000)
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10 | ACTOR_FLAG_2000000 | ACTOR_FLAG_CANT_LOCK_ON)
|
||||
|
||||
#define THIS ((EnKendoJs*)thisx)
|
||||
|
||||
|
|
@ -649,9 +649,9 @@ void func_80B276D8(EnKendoJs* this, PlayState* play) {
|
|||
this->actor.parent = NULL;
|
||||
func_80B27760(this);
|
||||
} else if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_63_20)) {
|
||||
Actor_PickUp(&this->actor, play, GI_HEART_PIECE, 800.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 800.0f, 100.0f);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_RUPEE_RED, 800.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_RUPEE_RED, 800.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -674,7 +674,7 @@ void func_80B27774(EnKendoJs* this, PlayState* play) {
|
|||
func_80B26AE8(this);
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_20;
|
||||
} else {
|
||||
func_800B85E0(&this->actor, play, 1000.0f, -1);
|
||||
func_800B85E0(&this->actor, play, 1000.0f, PLAYER_IA_MINUS1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ void func_80B417B8(EnKgy* this, PlayState* play) {
|
|||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
func_801477B4(play);
|
||||
func_80B413C8(this);
|
||||
this->actor.flags &= ~ACTOR_FLAG_100;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TALK_REQUESTED;
|
||||
this->actionFunc = func_80B419B0;
|
||||
func_80B40E18(this, 7);
|
||||
}
|
||||
|
|
@ -486,7 +486,7 @@ void func_80B418C4(EnKgy* this, PlayState* play) {
|
|||
func_80B413C8(this);
|
||||
ActorCutscene_SetIntentToPlay(this->unk_2D4[5]);
|
||||
this->actionFunc = func_80B41858;
|
||||
this->actor.flags &= ~ACTOR_FLAG_100;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TALK_REQUESTED;
|
||||
}
|
||||
func_80B40EE8(this, play);
|
||||
}
|
||||
|
|
@ -573,7 +573,7 @@ void func_80B41C54(EnKgy* this, PlayState* play) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
if (Actor_TextboxIsClosing(&this->actor, play)) {
|
||||
this->actionFunc = func_80B41C30;
|
||||
this->actor.flags &= ~ACTOR_FLAG_100;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TALK_REQUESTED;
|
||||
}
|
||||
func_80B40EE8(this, play);
|
||||
}
|
||||
|
|
@ -597,7 +597,7 @@ void func_80B41D64(EnKgy* this, PlayState* play) {
|
|||
this->actor.flags |= ACTOR_FLAG_10000;
|
||||
func_800B8500(&this->actor, play, 1000.0f, 1000.0f, PLAYER_IA_MINUS1);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, this->unk_2EA, 2000.0f, 1000.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, this->unk_2EA, 2000.0f, 1000.0f);
|
||||
}
|
||||
func_80B40EE8(this, play);
|
||||
}
|
||||
|
|
@ -798,7 +798,7 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
|
|||
func_801477B4(play);
|
||||
this->actionFunc = func_80B41D64;
|
||||
func_80B413C8(this);
|
||||
Actor_PickUp(&this->actor, play, this->unk_2EA, 2000.0f, 1000.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, this->unk_2EA, 2000.0f, 1000.0f);
|
||||
break;
|
||||
|
||||
case 0xC51:
|
||||
|
|
@ -857,7 +857,7 @@ void func_80B42660(EnKgy* this, PlayState* play) {
|
|||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
func_801477B4(play);
|
||||
func_80B413C8(this);
|
||||
this->actor.flags &= ~ACTOR_FLAG_100;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TALK_REQUESTED;
|
||||
this->actionFunc = func_80B42714;
|
||||
func_80B40E18(this, 7);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include "z_en_kujiya.h"
|
||||
#include "objects/object_kujiya/object_kujiya.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_8000000)
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_CANT_LOCK_ON)
|
||||
|
||||
#define THIS ((EnKujiya*)thisx)
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ void EnKujiya_GivePrize(EnKujiya* this, PlayState* play) {
|
|||
if (Actor_HasParent(&this->actor, play)) {
|
||||
EnKujiya_SetupFinishGivePrize(this);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_RUPEE_PURPLE, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_RUPEE_PURPLE, 500.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ void EnKusa_SpawnBugs(EnKusa* this, PlayState* play) {
|
|||
for (numBugs = 0; numBugs < 3; numBugs++) {
|
||||
Actor* bug = Actor_SpawnAsChildAndCutscene(&play->actorCtx, play, ACTOR_EN_INSECT, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 1,
|
||||
this->actor.cutscene, this->actor.unk20, 0);
|
||||
this->actor.cutscene, this->actor.halfDaysBits, 0);
|
||||
|
||||
if (bug == NULL) {
|
||||
break;
|
||||
|
|
@ -490,7 +490,7 @@ void EnKusa_WaitForInteract(EnKusa* this, PlayState* play) {
|
|||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
if (this->actor.xzDistToPlayer < 100.0f) {
|
||||
if (KUSA_GET_TYPE(&this->actor) != ENKUSA_TYPE_GRASS_2) {
|
||||
Actor_LiftActor(&this->actor, play);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,9 +100,10 @@ void func_80A5B160(EnKusa2* this, PlayState* play) {
|
|||
|
||||
if (this->unk_194[0] == NULL) {
|
||||
ptr = this->unk_194;
|
||||
actor = (EnKusa2*)Actor_SpawnAsChildAndCutscene(
|
||||
&play->actorCtx, play, ACTOR_EN_KUSA2, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 0, Rand_Next() >> 0x10, 0, 1, this->actor.cutscene, this->actor.unk20, NULL);
|
||||
actor = (EnKusa2*)Actor_SpawnAsChildAndCutscene(&play->actorCtx, play, ACTOR_EN_KUSA2, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0,
|
||||
Rand_Next() >> 0x10, 0, 1, this->actor.cutscene,
|
||||
this->actor.halfDaysBits, NULL);
|
||||
*ptr = actor;
|
||||
|
||||
if (*ptr != NULL) {
|
||||
|
|
@ -118,7 +119,7 @@ void func_80A5B160(EnKusa2* this, PlayState* play) {
|
|||
actor = (EnKusa2*)Actor_SpawnAsChildAndCutscene(
|
||||
&play->actorCtx, play, ACTOR_EN_KUSA2, (Math_SinS(temp_s1) * 80.0f) + this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, (Math_CosS(temp_s1) * 80.0f) + this->actor.world.pos.z, 0, Rand_Next() >> 0x10,
|
||||
0, 1, this->actor.cutscene, this->actor.unk20, NULL);
|
||||
0, 1, this->actor.cutscene, this->actor.halfDaysBits, NULL);
|
||||
*ptr = actor;
|
||||
if (*ptr != NULL) {
|
||||
(*ptr)->actor.room = this->actor.room;
|
||||
|
|
@ -159,7 +160,8 @@ void func_80A5B3BC(EnKusa2* this) {
|
|||
void func_80A5B490(EnKusa2* this, PlayState* play) {
|
||||
Actor_SpawnAsChildAndCutscene(&play->actorCtx, play, ACTOR_EN_KITAN, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0,
|
||||
ENKUSA2_GET_7F00(&this->actor) << 9, this->actor.cutscene, this->actor.unk20, NULL);
|
||||
ENKUSA2_GET_7F00(&this->actor) << 9, this->actor.cutscene, this->actor.halfDaysBits,
|
||||
NULL);
|
||||
}
|
||||
|
||||
void func_80A5B508(void) {
|
||||
|
|
@ -990,7 +992,7 @@ void func_80A5D7C4(EnKusa2* this, PlayState* play) {
|
|||
if (this->actor.xzDistToPlayer < 400.0f) {
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
if (this->actor.xzDistToPlayer < 100.0f) {
|
||||
Actor_LiftActor(&this->actor, play);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -839,9 +839,9 @@ void func_80AEB598(EnLiftNuts* this, PlayState* play) {
|
|||
}
|
||||
func_80AEB684(this);
|
||||
} else if ((this->textId == 0x27F4) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_14_80)) {
|
||||
Actor_PickUp(&this->actor, play, GI_HEART_PIECE, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 500.0f, 100.0f);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_RUPEE_PURPLE, 500.0f, 100.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, GI_RUPEE_PURPLE, 500.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -882,7 +882,7 @@ void func_80AEB698(EnLiftNuts* this, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
func_800B85E0(&this->actor, play, 200.0f, -1);
|
||||
func_800B85E0(&this->actor, play, 200.0f, PLAYER_IA_MINUS1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue