Document Minimap Icon Actor Flag (#1747)

* minimap flag

* improve comment
This commit is contained in:
engineer124 2024-11-28 01:00:23 +11:00 committed by GitHub
parent ba693efb08
commit 2f1f0bdaef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 39 additions and 31 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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;

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)) {

View File

@ -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;
}

View File

@ -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);

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -8,7 +8,8 @@
#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)
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_200 | ACTOR_FLAG_IGNORE_QUAKE | \
ACTOR_FLAG_MINIMAP_ICON_ENABLED)
#define THIS ((EnThiefbird*)thisx)

View File

@ -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)