diff --git a/include/z64actor.h b/include/z64actor.h index 3f65010806..e73c6f381a 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -569,8 +569,12 @@ typedef enum DoorLockType { // Camera will slowly drift to the actor while approaching it. // Uses the attention system but `ACTOR_FLAG_ATTENTION_ENABLED` is not required. #define ACTOR_FLAG_CAMERA_DRIFT_ENABLED (1 << 30) -// -#define ACTOR_FLAG_80000000 (1 << 31) + +// The actor's location will be marked on the minimap. +// If the actor is a player actor, a compass icon will be drawn. +// If the actor is EN_BOX, the flag has no effect. +// Otherwise a square icon is drawn, with the color determined by it's actor category. +#define ACTOR_FLAG_MINIMAP_ICON_ENABLED (1 << 31) #define DROPFLAG_NONE (0) #define DROPFLAG_1 (1 << 0) diff --git a/src/code/z_map_disp.c b/src/code/z_map_disp.c index e9b6c96bbf..2718160ece 100644 --- a/src/code/z_map_disp.c +++ b/src/code/z_map_disp.c @@ -276,7 +276,7 @@ void MapDisp_Minimap_DrawActorIcon(PlayState* play, Actor* actor) { if ((posX > 0) && (posX < 0x3FF) && (posY > 0) && (posY < 0x3FF)) { OPEN_DISPS(play->state.gfxCtx); - if ((actor->category == ACTORCAT_PLAYER) && (actor->flags & ACTOR_FLAG_80000000)) { + if ((actor->category == ACTORCAT_PLAYER) && (actor->flags & ACTOR_FLAG_MINIMAP_ICON_ENABLED)) { s16 compassRot; Gfx_SetupDL42_Overlay(play->state.gfxCtx); @@ -316,7 +316,7 @@ void MapDisp_Minimap_DrawActorIcon(PlayState* play, Actor* actor) { } else { Gfx_SetupDL39_Overlay(play->state.gfxCtx); gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - if (actor->flags & ACTOR_FLAG_80000000) { + if (actor->flags & ACTOR_FLAG_MINIMAP_ICON_ENABLED) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, sMinimapActorCategoryColors[actor->category].r, sMinimapActorCategoryColors[actor->category].g, sMinimapActorCategoryColors[actor->category].b, play->interfaceCtx.minimapAlpha); @@ -345,7 +345,8 @@ void MapDisp_Minimap_DrawActors(PlayState* play) { while (actor != NULL) { if ((actor->update != NULL) && (actor->init == NULL) && Object_IsLoaded(&play->objectCtx, actor->objectSlot) && - ((actor->id == ACTOR_EN_BOX) || (i == ACTORCAT_PLAYER) || (actor->flags & ACTOR_FLAG_80000000)) && + ((actor->id == ACTOR_EN_BOX) || (i == ACTORCAT_PLAYER) || + (actor->flags & ACTOR_FLAG_MINIMAP_ICON_ENABLED)) && ((sMapDisp.curRoom == actor->room) || (actor->room == -1))) { MapDisp_Minimap_DrawActorIcon(play, actor); } diff --git a/src/code/z_player_call.c b/src/code/z_player_call.c index d426190c3f..e301cf48e3 100644 --- a/src/code/z_player_call.c +++ b/src/code/z_player_call.c @@ -3,7 +3,7 @@ #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_200000 | \ - ACTOR_FLAG_UPDATE_DURING_OCARINA | ACTOR_FLAG_CAN_PRESS_SWITCHES | ACTOR_FLAG_80000000) + ACTOR_FLAG_UPDATE_DURING_OCARINA | ACTOR_FLAG_CAN_PRESS_SWITCHES | ACTOR_FLAG_MINIMAP_ICON_ENABLED) ActorFunc sPlayerCallInitFunc; ActorFunc sPlayerCallDestroyFunc; diff --git a/src/overlays/actors/ovl_En_Az/z_en_az.c b/src/overlays/actors/ovl_En_Az/z_en_az.c index 5ca66c6ceb..fd035f6aa5 100644 --- a/src/overlays/actors/ovl_En_Az/z_en_az.c +++ b/src/overlays/actors/ovl_En_Az/z_en_az.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_En_Twig/z_en_twig.h" #include "overlays/actors/ovl_En_Fish/z_en_fish.h" -#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_80000000) +#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnAz*)thisx) diff --git a/src/overlays/actors/ovl_En_Egol/z_en_egol.c b/src/overlays/actors/ovl_En_Egol/z_en_egol.c index 96ea00d65d..f500df4d14 100644 --- a/src/overlays/actors/ovl_En_Egol/z_en_egol.c +++ b/src/overlays/actors/ovl_En_Egol/z_en_egol.c @@ -15,7 +15,9 @@ #include "overlays/actors/ovl_En_Estone/z_en_estone.h" #include "overlays/effects/ovl_Effect_Ss_Hitmark/z_eff_ss_hitmark.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_80000000) +#define FLAGS \ + (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | \ + ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnEgol*)thisx) diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index ee567d8e85..a085cb90ff 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -6,7 +6,7 @@ #include "z_en_ge2.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_80000000) +#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnGe2*)thisx) diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index 8a68a4f65e..e98b064ec5 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -7,7 +7,7 @@ #include "z_en_ge3.h" #include "attributes.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_80000000) +#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnGe3*)thisx) diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index 1bda9934cb..54e9d2872a 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -9,7 +9,7 @@ #include "assets/objects/object_goroiwa/object_goroiwa.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" -#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_80000000) +#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnGoroiwa*)thisx) diff --git a/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c b/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c index 5fa65e3673..9e12da49c5 100644 --- a/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c +++ b/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c @@ -7,7 +7,7 @@ #include "z_en_guard_nuts.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_100000 | ACTOR_FLAG_80000000) +#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_100000 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnGuardNuts*)thisx) diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index f03ca37c7b..56acf222bd 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -791,10 +791,10 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { this->unk_1EC |= 0x10; } else if (thisx->params == ENHORSE_4) { this->stateFlags = ENHORSE_FLAG_29 | ENHORSE_CANT_JUMP; - thisx->flags |= ACTOR_FLAG_80000000; + thisx->flags |= ACTOR_FLAG_MINIMAP_ICON_ENABLED; } else if (thisx->params == ENHORSE_5) { this->stateFlags = ENHORSE_FLAG_29 | ENHORSE_CANT_JUMP; - thisx->flags |= ACTOR_FLAG_80000000; + thisx->flags |= ACTOR_FLAG_MINIMAP_ICON_ENABLED; } else if (thisx->params == ENHORSE_15) { this->stateFlags = ENHORSE_UNRIDEABLE | ENHORSE_FLAG_7; } else if (thisx->params == ENHORSE_17) { @@ -802,7 +802,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { this->unk_1EC |= 8; } else if (thisx->params == ENHORSE_18) { this->stateFlags = ENHORSE_FLAG_29 | ENHORSE_CANT_JUMP; - thisx->flags |= ACTOR_FLAG_80000000; + thisx->flags |= ACTOR_FLAG_MINIMAP_ICON_ENABLED; } else if (thisx->params == ENHORSE_1) { this->stateFlags = ENHORSE_FLAG_7; } else if ((thisx->params == ENHORSE_19) || (thisx->params == ENHORSE_20)) { diff --git a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c index b38d6bbf1f..408fccb918 100644 --- a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c +++ b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c @@ -2002,7 +2002,7 @@ void EnInvadepoh_Alien_Init(EnInvadepoh* this, PlayState* play) { Collider_InitCylinder(play, &this->collider); ActorShape_Init(&this->actor.shape, 6800.0f, ActorShadow_DrawWhiteCircle, 150.0f); this->actor.shape.shadowAlpha = 140; - this->actor.flags = ACTOR_FLAG_10 | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_80000000; + this->actor.flags = ACTOR_FLAG_10 | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_MINIMAP_ICON_ENABLED; if (EN_INVADEPOH_GET_TYPE(&this->actor) == EN_INVADEPOH_TYPE_ALIEN_ABDUCTOR) { this->actor.update = EnInvadepoh_AlienAbductor_WaitForObject; @@ -2525,7 +2525,7 @@ void EnInvadepoh_Alien_SetupWaitForInvasion(EnInvadepoh* this) { this->collider.base.atFlags &= ~AT_ON; this->collider.base.acFlags &= ~AC_ON; this->collider.base.ocFlags1 &= ~OC1_ON; - this->actor.flags &= ~ACTOR_FLAG_80000000; + this->actor.flags &= ~ACTOR_FLAG_MINIMAP_ICON_ENABLED; this->alpha = 0; this->actor.draw = NULL; this->shouldDraw = false; @@ -2555,7 +2555,7 @@ void EnInvadepoh_Alien_SetupWaitToRespawn(EnInvadepoh* this) { this->collider.base.atFlags &= ~AT_ON; this->collider.base.acFlags &= ~AC_ON; this->collider.base.ocFlags1 &= ~OC1_ON; - this->actor.flags &= ~ACTOR_FLAG_80000000; + this->actor.flags &= ~ACTOR_FLAG_MINIMAP_ICON_ENABLED; this->alpha = 0; this->actor.draw = NULL; this->shouldDraw = false; @@ -2590,7 +2590,7 @@ void EnInvadepoh_Alien_SetupWarpIn(EnInvadepoh* this) { this->shouldDraw = true; this->shouldDrawDeathFlash = false; this->eyeBeamAlpha = 0; - this->actor.flags |= ACTOR_FLAG_80000000; + this->actor.flags |= ACTOR_FLAG_MINIMAP_ICON_ENABLED; this->actionFunc = EnInvadepoh_Alien_WarpIn; } @@ -2643,7 +2643,7 @@ void EnInvadepoh_Alien_SetupFloatForward(EnInvadepoh* this) { this->shouldDraw = true; this->shouldDrawDeathFlash = false; this->eyeBeamAlpha = 255; - this->actor.flags |= ACTOR_FLAG_80000000; + this->actor.flags |= ACTOR_FLAG_MINIMAP_ICON_ENABLED; this->actionFunc = EnInvadepoh_Alien_FloatForward; } @@ -2674,7 +2674,7 @@ void EnInvadepoh_Alien_SetupDamaged(EnInvadepoh* this) { this->eyeBeamAlpha = 0; this->timer = 8; this->frameCounter = 0; - this->actor.flags |= ACTOR_FLAG_80000000; + this->actor.flags |= ACTOR_FLAG_MINIMAP_ICON_ENABLED; this->actionFunc = EnInvadepoh_Alien_Damaged; } @@ -2702,7 +2702,7 @@ void EnInvadepoh_Alien_SetupDead(EnInvadepoh* this) { this->shouldDraw = true; this->shouldDrawDeathFlash = false; this->eyeBeamAlpha = 255; - this->actor.flags |= ACTOR_FLAG_80000000; + this->actor.flags |= ACTOR_FLAG_MINIMAP_ICON_ENABLED; this->actionFunc = EnInvadepoh_Alien_Dead; } diff --git a/src/overlays/actors/ovl_En_Invadepoh_Demo/z_en_invadepoh_demo.c b/src/overlays/actors/ovl_En_Invadepoh_Demo/z_en_invadepoh_demo.c index eaf1c36851..166e58b36a 100644 --- a/src/overlays/actors/ovl_En_Invadepoh_Demo/z_en_invadepoh_demo.c +++ b/src/overlays/actors/ovl_En_Invadepoh_Demo/z_en_invadepoh_demo.c @@ -212,7 +212,7 @@ void EnInvadepohDemo_DoNothing(EnInvadepohDemo* this, PlayState* play) { void EnInvadepohDemo_Alien_Init(EnInvadepohDemo* this, PlayState* play) { Actor_ProcessInitChain(&this->actor, sAlienInitChain); - this->actor.flags = ACTOR_FLAG_10 | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_80000000; + this->actor.flags = ACTOR_FLAG_10 | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_MINIMAP_ICON_ENABLED; this->objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_UCH); if (this->objectSlot <= OBJECT_SLOT_NONE) { Actor_Kill(&this->actor); diff --git a/src/overlays/actors/ovl_En_Jso2/z_en_jso2.c b/src/overlays/actors/ovl_En_Jso2/z_en_jso2.c index ef77181af5..ac5b8216c5 100644 --- a/src/overlays/actors/ovl_En_Jso2/z_en_jso2.c +++ b/src/overlays/actors/ovl_En_Jso2/z_en_jso2.c @@ -14,7 +14,7 @@ #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_100000 | \ - ACTOR_FLAG_80000000) + ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnJso2*)thisx) diff --git a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c index 6170f20cbb..c66036e882 100644 --- a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c +++ b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c @@ -7,7 +7,7 @@ #include "z_en_look_nuts.h" #include "overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.h" -#define FLAGS (ACTOR_FLAG_80000000) +#define FLAGS (ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnLookNuts*)thisx) diff --git a/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c b/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c index 3259755b23..b279071ded 100644 --- a/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c +++ b/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h" #include "overlays/actors/ovl_En_Ma4/z_en_ma4.h" -#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_100000 | ACTOR_FLAG_80000000) +#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_100000 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnPoFusen*)thisx) diff --git a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c index aa918ee7d4..78c15f7aaa 100644 --- a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c +++ b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c @@ -12,7 +12,7 @@ #include "overlays/actors/ovl_En_Aob_01/z_en_aob_01.h" #include "overlays/actors/ovl_En_Dg/z_en_dg.h" -#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_80000000) +#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnRacedog*)thisx) diff --git a/src/overlays/actors/ovl_En_Rg/z_en_rg.c b/src/overlays/actors/ovl_En_Rg/z_en_rg.c index 2638130bfc..81834905d6 100644 --- a/src/overlays/actors/ovl_En_Rg/z_en_rg.c +++ b/src/overlays/actors/ovl_En_Rg/z_en_rg.c @@ -7,7 +7,7 @@ #include "z_en_rg.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" -#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_80000000) +#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnRg*)thisx) diff --git a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c index 8e35524948..e97a3f28b1 100644 --- a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c +++ b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c @@ -7,8 +7,9 @@ #include "z_en_thiefbird.h" #include "overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h" -#define FLAGS \ - (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_200 | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_80000000) +#define FLAGS \ + (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_200 | ACTOR_FLAG_IGNORE_QUAKE | \ + ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnThiefbird*)thisx) diff --git a/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c b/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c index 6c62578070..fa70bf4c92 100644 --- a/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c +++ b/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c @@ -11,7 +11,7 @@ #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_IGNORE_QUAKE | \ - ACTOR_FLAG_100000 | ACTOR_FLAG_LOCK_ON_DISABLED | ACTOR_FLAG_80000000) + ACTOR_FLAG_100000 | ACTOR_FLAG_LOCK_ON_DISABLED | ACTOR_FLAG_MINIMAP_ICON_ENABLED) #define THIS ((EnWiz*)thisx)