mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Documentation pass for the Target system (#1281)
* cleanup * import bss * sActorHiliteMtx * some cleanups on func_800BB604 * Actor_IsInTargetableRange * rematch func_800BB604 Co-authored-by: engineer124 <engineer124engineer124@gmail.com> * Name ACTOR_FLAG_UNFRIENDLY and ACTOR_FLAG_FRIENDLY * Rename some Target_ functions * cleanusp * TargetMode enum * Target_800B82EC * sNaming * more * more naming * fairyHintPos * rotation * ACTOR_FLAG_TARGETABLE * update namefixer * remove trailing comma * bss * Wall of text for Target_800BB604 * function naming * cleanups * Target_GetAdjustedDistSq * NotLeash * more comments * minor comment * review * fix * rotZTick * review * name last members * fix * review * review * more namefixer * swap members * comment * Update src/code/z_actor.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/code/z_actor.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review * format * Update src/code/z_actor.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update include/z64actor.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * review * review * fix * fix --------- Co-authored-by: engineer124 <engineer124engineer124@gmail.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
co-authored by
engineer124
Derek Hensley
engineer124
parent
cbf9d98dba
commit
9cceea48f3
+1
-1
@@ -140,7 +140,7 @@ Damage flag enums are not being used at present: we want to wait until we have a
|
||||
|
||||
Pre-C99, commas at the end of the last item in an enum will cause a compiler warning, so leave them off.
|
||||
|
||||
All compound flag lists (e.g. `ACTOR_FLAG_4 | ACTOR_FLAG_8`) should be listed in *ascending* order
|
||||
All compound flag lists (e.g. `ACTOR_FLAG_UNFRIENDLY | ACTOR_FLAG_FRIENDLY`) should be listed in *ascending* order
|
||||
|
||||
## Arrays
|
||||
|
||||
|
||||
+3
-3
@@ -477,7 +477,7 @@ void func_800B4AEC(PlayState* play, Actor* actor, f32 y);
|
||||
void func_800B4B50(Actor* actor, Lights* mapper, PlayState* play);
|
||||
void Actor_GetProjectedPos(PlayState* play, Vec3f* worldPos, Vec3f* projectedPos, f32* invW);
|
||||
|
||||
void Actor_DrawZTarget(TargetContext* targetCtx, PlayState* play);
|
||||
void Target_Draw(TargetContext* targetCtx, PlayState* play);
|
||||
|
||||
s32 Flags_GetSwitch(PlayState* play, s32 flag);
|
||||
void Flags_SetSwitch(PlayState* play, s32 flag);
|
||||
@@ -558,7 +558,7 @@ PosRot* Actor_GetFocus(PosRot* dest, Actor* actor);
|
||||
PosRot* Actor_GetWorld(PosRot* dest, Actor* actor);
|
||||
PosRot* Actor_GetWorldPosShapeRot(PosRot* dest, Actor* actor);
|
||||
|
||||
s32 func_800B83F8(Actor* actor, Player* player, s32 flag);
|
||||
s32 Target_OutsideLeashRange(Actor* actor, Player* player, s32 ignoreLeash);
|
||||
s32 Actor_ProcessTalkRequest(Actor* actor, GameState* gameState);
|
||||
s32 Actor_OfferTalkExchange(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, PlayerItemAction exchangeItemAction);
|
||||
s32 Actor_OfferTalkExchangeEquiCylinder(Actor* actor, PlayState* play, f32 radius, PlayerItemAction exchangeItemAction);
|
||||
@@ -1119,7 +1119,7 @@ void Player_SetModelGroup(Player* player, PlayerModelGroup modelGroup);
|
||||
void func_80123C58(Player* player);
|
||||
void Player_SetEquipmentData(PlayState* play, Player* player);
|
||||
void Player_UpdateBottleHeld(PlayState* play, Player* player, ItemId itemId, PlayerItemAction itemAction);
|
||||
void func_80123DA4(Player* player);
|
||||
void Player_Untarget(Player* player);
|
||||
void func_80123DC0(Player* player);
|
||||
void func_80123E90(PlayState* play, Actor* actor);
|
||||
s32 func_80123F2C(PlayState* play, s32 ammo);
|
||||
|
||||
@@ -1907,20 +1907,6 @@ extern u8 gSampleBankTable[];
|
||||
|
||||
// bss
|
||||
// extern UNK_TYPE1 D_801ED894;
|
||||
extern CollisionPoly* D_801ED8B0;
|
||||
extern s32 D_801ED8B4;
|
||||
// extern UNK_TYPE1 D_801ED8B8;
|
||||
// extern UNK_TYPE1 D_801ED8BC;
|
||||
// extern UNK_TYPE1 D_801ED8C0;
|
||||
// extern UNK_TYPE1 D_801ED8C4;
|
||||
extern f32 D_801ED8C8;
|
||||
extern f32 sBgmEnemyDistSq;
|
||||
extern f32 D_801ED8D0;
|
||||
// extern UNK_TYPE1 D_801ED8D4;
|
||||
// extern UNK_TYPE1 D_801ED8D8;
|
||||
// extern UNK_TYPE1 D_801ED8DC;
|
||||
extern Mtx D_801ED8E0;
|
||||
extern Actor* D_801ED920;
|
||||
|
||||
extern Vec3f D_801EDE00;
|
||||
extern Vec3f D_801EDE10;
|
||||
|
||||
+46
-30
@@ -150,7 +150,7 @@ typedef struct Actor {
|
||||
/* 0x100 */ f32 uncullZoneScale; // Amount to increase the uncull zone scale by (in projected space)
|
||||
/* 0x104 */ f32 uncullZoneDownward; // Amount to increase uncull zone downward by (in projected space)
|
||||
/* 0x108 */ Vec3f prevPos; // World position from the previous update cycle
|
||||
/* 0x114 */ u8 isTargeted; // Set to true if the actor is currently being targeted by the player
|
||||
/* 0x114 */ u8 isLockedOn; // Set to true if the actor is currently being targeted by the player
|
||||
/* 0x115 */ u8 targetPriority; // Lower values have higher priority. Resets to 0 when player stops targeting
|
||||
/* 0x116 */ u16 textId; // Text ID to pass to link/display when interacting with the actor
|
||||
/* 0x118 */ u16 freezeTimer; // Actor does not update when set. Timer decrements automatically
|
||||
@@ -296,33 +296,47 @@ typedef enum {
|
||||
#define ACTORCTX_FLAG_6 (1 << 6)
|
||||
#define ACTORCTX_FLAG_7 (1 << 7)
|
||||
|
||||
|
||||
typedef struct {
|
||||
// A set of 4 triangles which appear around an actor when the player Z-Targets it
|
||||
typedef struct LockOnTriangleSet {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ f32 unkC;
|
||||
/* 0x0C */ f32 radius; // distance towards the center of the locked on
|
||||
/* 0x10 */ Color_RGBA8 color;
|
||||
} TargetContextEntry; // size = 0x14
|
||||
} LockOnTriangleSet; // size = 0x14
|
||||
|
||||
typedef struct TargetContext {
|
||||
/* 0x00 */ Vec3f unk0;
|
||||
/* 0x0C */ Vec3f targetCenterPos;
|
||||
/* 0x18 */ Color_RGBAf fairyInner;
|
||||
/* 0x28 */ Color_RGBAf fairyOuter;
|
||||
/* 0x38 */ Actor* arrowPointedActor;
|
||||
/* 0x3C */ Actor* targetedActor;
|
||||
/* 0x40 */ f32 unk40;
|
||||
/* 0x44 */ f32 unk44;
|
||||
/* 0x48 */ s16 unk48; // alpha
|
||||
/* 0x4A */ u8 unk4A;
|
||||
/* 0x4B */ u8 unk4B;
|
||||
/* 0x4C */ s8 unk4C;
|
||||
/* 0x4D */ UNK_TYPE1 pad4D[0x3];
|
||||
/* 0x50 */ TargetContextEntry unk50[3];
|
||||
/* 0x8C */ Actor* unk8C;
|
||||
/* 0x00 */ Vec3f fairyPos; // Used by Tatl to indicate a targetable actor or general hint
|
||||
/* 0x0C */ Vec3f lockOnPos;
|
||||
/* 0x18 */ Color_RGBAf fairyInnerColor;
|
||||
/* 0x28 */ Color_RGBAf fairyOuterColor;
|
||||
/* 0x38 */ Actor* fairyActor;
|
||||
/* 0x3C */ Actor* lockOnActor;
|
||||
/* 0x40 */ f32 fairyMoveProgressFactor; // Controls Tatl so she can smootly transition to the target actor
|
||||
/* 0x44 */ f32 lockOnRadius; // Control the circle lock-on triangles coming in from offscreen when you first target
|
||||
/* 0x48 */ s16 lockOnAlpha;
|
||||
/* 0x4A */ u8 fairyActorCategory;
|
||||
/* 0x4B */ u8 rotZTick;
|
||||
/* 0x4C */ s8 lockOnIndex;
|
||||
/* 0x50 */ LockOnTriangleSet lockOnTriangleSets[3];
|
||||
/* 0x8C */ Actor* forcedTargetActor; // Never set to non-NULL
|
||||
/* 0x90 */ Actor* bgmEnemy;
|
||||
/* 0x94 */ Actor* unk_94;
|
||||
/* 0x94 */ Actor* arrowPointedActor;
|
||||
} TargetContext; // size = 0x98
|
||||
|
||||
typedef enum TargetMode {
|
||||
/* 0 */ TARGET_MODE_0,
|
||||
/* 1 */ TARGET_MODE_1,
|
||||
/* 2 */ TARGET_MODE_2,
|
||||
/* 3 */ TARGET_MODE_3,
|
||||
/* 4 */ TARGET_MODE_4,
|
||||
/* 5 */ TARGET_MODE_5,
|
||||
/* 6 */ TARGET_MODE_6,
|
||||
/* 7 */ TARGET_MODE_7,
|
||||
/* 8 */ TARGET_MODE_8,
|
||||
/* 9 */ TARGET_MODE_9,
|
||||
/* 10 */ TARGET_MODE_10,
|
||||
/* 11 */ TARGET_MODE_MAX
|
||||
} TargetMode;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ TexturePtr texture;
|
||||
/* 0x4 */ s16 x;
|
||||
@@ -407,7 +421,7 @@ typedef struct ActorContext {
|
||||
/* 0x00F */ u8 numLensActors;
|
||||
/* 0x010 */ ActorListEntry actorLists[ACTORCAT_MAX];
|
||||
/* 0x0A0 */ Actor* lensActors[LENS_ACTOR_MAX]; // Draws up to LENS_ACTOR_MAX number of invisible actors
|
||||
/* 0x120 */ TargetContext targetContext;
|
||||
/* 0x120 */ TargetContext targetCtx;
|
||||
/* 0x1B8 */ ActorContextSceneFlags sceneFlags;
|
||||
/* 0x1E4 */ TitleCardContext titleCtxt;
|
||||
/* 0x1F4 */ PlayerImpact playerImpact;
|
||||
@@ -454,14 +468,14 @@ typedef enum {
|
||||
/* 3 */ DOORLOCK_MAX
|
||||
} DoorLockType;
|
||||
|
||||
// Targetability / ACTOR_FLAG_TARGETABLE?
|
||||
#define ACTOR_FLAG_1 (1 << 0)
|
||||
//
|
||||
// Allows Tatl to fly over the actor and lock-on it (using the Z-target)
|
||||
#define ACTOR_FLAG_TARGETABLE (1 << 0)
|
||||
// Unused
|
||||
#define ACTOR_FLAG_2 (1 << 1)
|
||||
//
|
||||
#define ACTOR_FLAG_4 (1 << 2)
|
||||
//
|
||||
#define ACTOR_FLAG_8 (1 << 3)
|
||||
// Changes the targeting behaviour for unfriendly actors (sound effects, Player's stance, etc)
|
||||
#define ACTOR_FLAG_UNFRIENDLY (1 << 2)
|
||||
// Opposite of the UNFRIENDLY flag. It is not checked explictly in the original game.
|
||||
#define ACTOR_FLAG_FRIENDLY (1 << 3)
|
||||
//
|
||||
#define ACTOR_FLAG_10 (1 << 4)
|
||||
//
|
||||
@@ -680,9 +694,11 @@ typedef struct BlinkInfo {
|
||||
/* 0x2 */ s16 blinkTimer;
|
||||
} BlinkInfo; // size = 0x4
|
||||
|
||||
extern TargetRangeParams gTargetRanges[];
|
||||
extern TargetRangeParams gTargetRanges[TARGET_MODE_MAX];
|
||||
extern s16 D_801AED48[8];
|
||||
extern Gfx D_801AEF88[];
|
||||
extern Gfx D_801AEFA0[];
|
||||
|
||||
extern Actor* D_801ED920;
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -1168,7 +1168,7 @@ typedef struct Player {
|
||||
/* 0x564 */ ColliderQuad meleeWeaponQuads[2];
|
||||
/* 0x664 */ ColliderQuad shieldQuad;
|
||||
/* 0x6E4 */ ColliderCylinder shieldCylinder;
|
||||
/* 0x730 */ Actor* targetedActor; // Z/L-Targeted actor
|
||||
/* 0x730 */ Actor* lockOnActor; // Z/L-Targeted actor
|
||||
/* 0x734 */ char unk_734[4];
|
||||
/* 0x738 */ s32 unk_738;
|
||||
/* 0x73C */ s32 meleeWeaponEffectIndex[3];
|
||||
|
||||
@@ -445,7 +445,6 @@ beginseg
|
||||
include "build/src/code/flg_set.o"
|
||||
include "build/src/code/z_DLF.o"
|
||||
include "build/src/code/z_actor.o"
|
||||
include "build/data/code/z_actor.bss.o"
|
||||
include "build/src/code/z_actor_dlftbls.o"
|
||||
include "build/src/code/z_bgcheck.o"
|
||||
include "build/src/code/z_bg_collect.o"
|
||||
|
||||
+457
-364
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8)
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY)
|
||||
|
||||
#define THIS ((EnAObj*)thisx)
|
||||
|
||||
@@ -46,7 +46,7 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_U8(targetMode, 0, ICHAIN_STOP),
|
||||
ICHAIN_U8(targetMode, TARGET_MODE_0, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
void EnAObj_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
@@ -231,7 +231,7 @@ s32 func_800F0DD4(EnHy* enHy, PlayState* play, s16 arg2, s16 arg3) {
|
||||
enHy->actor.shape.rot.y = Math_Vec3f_Yaw(&enHy->actor.world.pos, &door->knobDoor.dyna.actor.world.pos);
|
||||
enHy->actor.world.rot.y = enHy->actor.shape.rot.y;
|
||||
enHy->actor.gravity = 0.0f;
|
||||
enHy->actor.flags &= ~ACTOR_FLAG_1;
|
||||
enHy->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
@@ -239,7 +239,7 @@ s32 func_800F0DD4(EnHy* enHy, PlayState* play, s16 arg2, s16 arg3) {
|
||||
|
||||
s32 EnHy_SetPointFowards(EnHy* enHy, PlayState* play, f32 gravity, s16 animIndex) {
|
||||
enHy->actor.gravity = gravity;
|
||||
enHy->actor.flags |= ACTOR_FLAG_1;
|
||||
enHy->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
EnHy_ChangeObjectAndAnim(enHy, play, animIndex);
|
||||
enHy->curPoint++;
|
||||
return false;
|
||||
|
||||
@@ -6400,7 +6400,7 @@ void Interface_Draw(PlayState* play) {
|
||||
Minimap_Draw(play);
|
||||
|
||||
if ((R_PAUSE_BG_PRERENDER_STATE != 2) && (R_PAUSE_BG_PRERENDER_STATE != 3)) {
|
||||
Actor_DrawZTarget(&play->actorCtx.targetContext, play);
|
||||
Target_Draw(&play->actorCtx.targetCtx, play);
|
||||
}
|
||||
|
||||
Gfx_SetupDL39_Overlay(play->state.gfxCtx);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
#define FLAGS \
|
||||
(ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_200000 | ACTOR_FLAG_2000000 | \
|
||||
ACTOR_FLAG_CAN_PRESS_SWITCH | ACTOR_FLAG_80000000)
|
||||
#define FLAGS \
|
||||
(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_200000 | \
|
||||
ACTOR_FLAG_2000000 | ACTOR_FLAG_CAN_PRESS_SWITCH | ACTOR_FLAG_80000000)
|
||||
|
||||
ActorFunc sPlayerCallInitFunc;
|
||||
ActorFunc sPlayerCallDestroyFunc;
|
||||
|
||||
@@ -518,7 +518,7 @@ s32 func_80123448(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
return (player->stateFlags1 & PLAYER_STATE1_400000) &&
|
||||
(player->transformation != PLAYER_FORM_HUMAN || (!func_80123434(player) && player->targetedActor == NULL));
|
||||
(player->transformation != PLAYER_FORM_HUMAN || (!func_80123434(player) && player->lockOnActor == NULL));
|
||||
}
|
||||
|
||||
// TODO: Player_IsGoronOrDeku is a temporary name until we have more info on this function.
|
||||
@@ -1315,9 +1315,8 @@ void Player_UpdateBottleHeld(PlayState* play, Player* player, ItemId itemId, Pla
|
||||
player->itemAction = itemAction;
|
||||
}
|
||||
|
||||
// Player_Untarget / Player_StopTargeting?
|
||||
void func_80123DA4(Player* player) {
|
||||
player->targetedActor = NULL;
|
||||
void Player_Untarget(Player* player) {
|
||||
player->lockOnActor = NULL;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_2000;
|
||||
}
|
||||
|
||||
@@ -1335,14 +1334,14 @@ void func_80123DC0(Player* player) {
|
||||
~(PLAYER_STATE1_8000 | PLAYER_STATE1_10000 | PLAYER_STATE1_20000 | PLAYER_STATE1_40000000);
|
||||
}
|
||||
|
||||
func_80123DA4(player);
|
||||
Player_Untarget(player);
|
||||
}
|
||||
|
||||
void func_80123E90(PlayState* play, Actor* actor) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
func_80123DC0(player);
|
||||
player->targetedActor = actor;
|
||||
player->lockOnActor = actor;
|
||||
player->unk_A78 = actor;
|
||||
player->stateFlags1 |= PLAYER_STATE1_10000;
|
||||
Camera_SetViewParam(Play_GetCamera(play, CAM_ID_MAIN), CAM_VIEW_TARGET, actor);
|
||||
|
||||
+1
-1
@@ -865,7 +865,7 @@ s32 SubS_Offer(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, s32 itemI
|
||||
case SUBS_OFFER_MODE_AUTO_TARGETED:
|
||||
//! @bug: Both x and y conditionals are always true, || should be an &&
|
||||
if (((x >= 0) || (x < SCREEN_WIDTH)) && ((y >= 0) || (y < SCREEN_HEIGHT)) &&
|
||||
(fabsf(actor->playerHeightRel) <= yRange) && (actor->xzDistToPlayer <= xzRange) && actor->isTargeted) {
|
||||
(fabsf(actor->playerHeightRel) <= yRange) && (actor->xzDistToPlayer <= xzRange) && actor->isLockedOn) {
|
||||
actor->flags |= ACTOR_FLAG_10000;
|
||||
canAccept = Actor_OfferTalkExchange(actor, play, xzRange, yRange, itemId);
|
||||
}
|
||||
|
||||
@@ -83,16 +83,16 @@ void func_80BD66AC(BgHakaTomb* this, PlayState* play) {
|
||||
s16 csId;
|
||||
|
||||
if (Flags_GetClear(play, this->dyna.actor.room)) {
|
||||
this->dyna.actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8);
|
||||
this->dyna.actor.flags |= (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY);
|
||||
}
|
||||
if (!func_80BD6638(&csId, this->csIdList, ARRAY_COUNT(this->csIdList)) && (csId <= CS_ID_NONE) &&
|
||||
Flags_GetClear(play, this->dyna.actor.room)) {
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_1;
|
||||
if (this->dyna.actor.isTargeted) {
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
if (this->dyna.actor.isLockedOn) {
|
||||
func_80BD6754(this);
|
||||
}
|
||||
} else {
|
||||
this->dyna.actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->dyna.actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "z64rumble.h"
|
||||
#include "z64shrink_window.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
||||
#define THIS ((Boss01*)thisx)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "overlays/actors/ovl_Item_B_Heart/z_item_b_heart.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
||||
#define THIS ((Boss02*)thisx)
|
||||
|
||||
@@ -593,7 +593,7 @@ void Boss02_Init(Actor* thisx, PlayState* play) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, 0.0f, 30.0f, -150.0f, 0, 1, 0, BHEART_PARAM_NORMAL);
|
||||
}
|
||||
|
||||
this->actor.targetMode = 10;
|
||||
this->actor.targetMode = TARGET_MODE_10;
|
||||
this->subCamUp.z = this->subCamUp.x = 0.0f;
|
||||
this->subCamUp.y = 1.0f;
|
||||
if (TWINMOLD_GET_TYPE(&this->actor) == TWINMOLD_TYPE_STATIC) {
|
||||
@@ -601,7 +601,7 @@ void Boss02_Init(Actor* thisx, PlayState* play) {
|
||||
play->specialEffects = (void*)sEffects;
|
||||
this->actor.update = Boss02_Static_Update;
|
||||
this->actor.draw = Boss02_Static_Draw;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
this->playerScale = 0.01f;
|
||||
if ((KREG(64) != 0) || CHECK_EVENTINF(EVENTINF_55) || (sBlueWarp != NULL)) {
|
||||
this->unk_1D20 = 0;
|
||||
@@ -772,7 +772,7 @@ void func_809DAB78(Boss02* this, PlayState* play) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_INBOSS_ROAR_OLD);
|
||||
}
|
||||
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
if (this->unk_0195 != 0) {
|
||||
this->actor.world.rot.z = Math_SinS(this->unk_014C * 0x1200) * 0xE00;
|
||||
} else {
|
||||
@@ -1192,9 +1192,9 @@ void Boss02_Tail_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((this->actor.focus.pos.y < BgCheck_EntityRaycastFloor1(&play->colCtx, &outPoly, &pos)) || sIsInGiantMode) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
} else {
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1816,7 +1816,7 @@ void Boss02_HandleGiantsMaskCutscene(Boss02* this, PlayState* play) {
|
||||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_StopManual(play, &play->csCtx);
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_100;
|
||||
this->playerScale = 0.01f;
|
||||
Play_DisableMotionBlur();
|
||||
@@ -2227,7 +2227,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_StopManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
this->unk_1D20 = 0;
|
||||
sRedTwinmold->unk_0144 = sBlueTwinmold->unk_0144 = 3;
|
||||
sRedTwinmold->unk_0146[0] = sBlueTwinmold->unk_0146[0] = 60;
|
||||
@@ -2289,7 +2289,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
|
||||
Cutscene_StopManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
|
||||
this->unk_1D20 = 0;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
sp68->unk_0144 = 10;
|
||||
if ((sRedTwinmold->unk_0144 >= 10) && (sBlueTwinmold->unk_0144 >= 10)) {
|
||||
f32 phi_f0;
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_water_effect/object_water_effect.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
||||
#define THIS ((Boss03*)thisx)
|
||||
|
||||
@@ -477,7 +477,7 @@ void Boss03_Init(Actor* thisx, PlayState* play2) {
|
||||
this->jointTable[i].z = Math_SinS(this->unk_240 * 0x10 + i * 19000) * 4000.0f;
|
||||
}
|
||||
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -508,7 +508,7 @@ void Boss03_Init(Actor* thisx, PlayState* play2) {
|
||||
sGyorgEffects[i].type = GYORG_EFFECT_NONE;
|
||||
}
|
||||
|
||||
this->actor.targetMode = 5;
|
||||
this->actor.targetMode = TARGET_MODE_5;
|
||||
this->actor.colChkInfo.mass = MASS_HEAVY;
|
||||
this->actor.colChkInfo.health = 10;
|
||||
|
||||
@@ -546,7 +546,7 @@ void func_809E344C(Boss03* this, PlayState* play) {
|
||||
this->actionFunc = func_809E34B8;
|
||||
Animation_MorphToLoop(&this->skelAnime, &gGyorgFastSwimmingAnim, -15.0f);
|
||||
this->unk_274 = 0;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -756,7 +756,7 @@ void Boss03_CatchPlayer(Boss03* this, PlayState* play) {
|
||||
this->unk_276 = 0x1000;
|
||||
this->unk_2BD = true;
|
||||
this->unk_278 = 15.0f;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
@@ -1169,7 +1169,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
|
||||
this->subCamAt.y = player->actor.world.pos.y + 30.0f;
|
||||
this->csState = 1;
|
||||
this->csTimer = 0;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
this->unk_2D5 = true;
|
||||
|
||||
this->subCamFov = KREG(14) + 60.0f;
|
||||
@@ -1423,7 +1423,7 @@ void Boss03_SetupDeathCutscene(Boss03* this, PlayState* play) {
|
||||
this->workTimer[WORK_TIMER_UNK0_C] = 0;
|
||||
this->unk_242 = 0;
|
||||
this->csState = 0;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
}
|
||||
|
||||
void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "z64shrink_window.h"
|
||||
#include "overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
||||
#define THIS ((Boss04*)thisx)
|
||||
|
||||
@@ -164,7 +164,7 @@ void Boss04_Init(Actor* thisx, PlayState* play2) {
|
||||
|
||||
this->actor.params = 0x64;
|
||||
Actor_SetScale(&this->actor, 0.1f);
|
||||
this->actor.targetMode = 5;
|
||||
this->actor.targetMode = TARGET_MODE_5;
|
||||
this->actor.hintId = TATL_HINT_ID_WART;
|
||||
this->actor.colChkInfo.health = 20;
|
||||
this->actor.colChkInfo.damageTable = &sDamageTable;
|
||||
@@ -232,7 +232,7 @@ void Boss04_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
||||
void func_809EC544(Boss04* this) {
|
||||
this->actionFunc = func_809EC568;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
}
|
||||
|
||||
void func_809EC568(Boss04* this, PlayState* play) {
|
||||
@@ -522,7 +522,7 @@ void func_809ED224(Boss04* this) {
|
||||
this->unk_2D0 = 10000.0f;
|
||||
this->unk_2C8 = 200;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_ME_DEAD);
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
Audio_RestorePrevBgm();
|
||||
this->unk_1F6 = 10;
|
||||
}
|
||||
@@ -543,7 +543,7 @@ void func_809ED2A0(Boss04* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->unk_1F8 == 3) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
this->unk_700 = 0.0f;
|
||||
this->unk_6FC = 0.0f;
|
||||
this->unk_6F8 = 0.0f;
|
||||
@@ -749,9 +749,9 @@ void Boss04_Update(Actor* thisx, PlayState* play2) {
|
||||
func_809ED45C(this, play);
|
||||
if (this->unk_2CC > 3000.0f) {
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider1.base);
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
} else {
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
}
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider2.base);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider2.base);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "z_boss_05.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4)
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY)
|
||||
|
||||
#define THIS ((Boss05*)thisx)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_knight/object_knight.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
||||
#define THIS ((Boss06*)thisx)
|
||||
|
||||
@@ -152,7 +152,7 @@ void Boss06_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_200[i] = temp_v0[i];
|
||||
}
|
||||
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
}
|
||||
|
||||
void Boss06_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user