mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Lens docs (#1123)
* match MirRay_ReflectedBeam * match Actor_DrawLensActors * match func_80B9E8D4 * lens docs * more lens docs * fix * cleanup * move define down * Actor_AddToLensActors * small comment adj * add one more comment * fix bss
This commit is contained in:
+1
-1
@@ -721,7 +721,7 @@ void Actor_DeactivateLens(PlayState* play);
|
||||
void func_800B9120(ActorContext* actorCtx);
|
||||
void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEntry);
|
||||
void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx);
|
||||
s32 Actor_RecordUndrawnActor(PlayState* play, Actor* actor);
|
||||
s32 Actor_AddToLensActors(PlayState* play, Actor* actor);
|
||||
void Actor_DrawAll(PlayState* play, ActorContext* actorCtx);
|
||||
void func_800BA6FC(PlayState* play, ActorContext* actorCtx);
|
||||
void func_800BA798(PlayState* play, ActorContext* actorCtx);
|
||||
|
||||
+1
-1
@@ -930,7 +930,7 @@ typedef struct PlayState {
|
||||
/* 0x18E5C */ TexturePtr pictoPhotoI8;
|
||||
/* 0x18E60 */ void* unk_18E60;
|
||||
/* 0x18E64 */ void* unk_18E64;
|
||||
/* 0x18E68 */ void* unk_18E68;
|
||||
/* 0x18E68 */ void* unk_18E68; // framebuffer related to Lens of Truth
|
||||
/* 0x18E6C */ char unk_18E6C[0x3EC];
|
||||
} PlayState; // size = 0x19258
|
||||
|
||||
|
||||
+11
-4
@@ -385,6 +385,13 @@ typedef struct ActorListEntry {
|
||||
/* 0x8 */ s32 unk_08;
|
||||
} ActorListEntry; // size = 0xC
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ LENS_MODE_HIDE_ACTORS, // lens actors are visible by default, and hidden by using lens (for example, fake walls)
|
||||
/* 1 */ LENS_MODE_SHOW_ACTORS // lens actors are invisible by default, and shown by using lens (for example, invisible enemies)
|
||||
} LensMode;
|
||||
|
||||
#define LENS_ACTOR_MAX 32
|
||||
|
||||
// Target size when activated
|
||||
#define LENS_MASK_ACTIVE_SIZE 100
|
||||
|
||||
@@ -399,9 +406,9 @@ typedef struct ActorContext {
|
||||
/* 0x00B */ s8 lensActorsDrawn;
|
||||
/* 0x00C */ s16 unkC;
|
||||
/* 0x00E */ u8 totalLoadedActors;
|
||||
/* 0x00F */ u8 undrawnActorCount;
|
||||
/* 0x00F */ u8 numLensActors;
|
||||
/* 0x010 */ ActorListEntry actorLists[ACTORCAT_MAX];
|
||||
/* 0x0A0 */ Actor* undrawnActors[32]; // Records the first 32 actors drawn each frame
|
||||
/* 0x0A0 */ Actor* lensActors[LENS_ACTOR_MAX]; // Draws up to LENS_ACTOR_MAX number of invisible actors
|
||||
/* 0x120 */ TargetContext targetContext;
|
||||
/* 0x1B8 */ ActorContextSceneFlags sceneFlags;
|
||||
/* 0x1E4 */ TitleCardContext titleCtxt;
|
||||
@@ -467,8 +474,8 @@ typedef enum {
|
||||
#define ACTOR_FLAG_20 (1 << 5)
|
||||
//
|
||||
#define ACTOR_FLAG_40 (1 << 6)
|
||||
// Invisible
|
||||
#define ACTOR_FLAG_80 (1 << 7)
|
||||
// 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)
|
||||
//
|
||||
|
||||
+1
-1
@@ -261,7 +261,7 @@ typedef struct {
|
||||
/* 0x02 */ u8 unk2; // 3: Room is hot
|
||||
/* 0x03 */ u8 unk3;
|
||||
/* 0x04 */ s8 echo;
|
||||
/* 0x05 */ u8 unk5;
|
||||
/* 0x05 */ u8 lensMode;
|
||||
/* 0x06 */ u8 enablePosLights;
|
||||
/* 0x07 */ UNK_TYPE1 pad7[0x1];
|
||||
/* 0x08 */ RoomMesh* mesh;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
UNK_TYPE4 D_8009BE30;
|
||||
|
||||
+69
-66
@@ -2623,18 +2623,18 @@ void func_800B9D1C(Actor* actor) {
|
||||
}
|
||||
}
|
||||
|
||||
void Actor_DrawAllSetup(PlayState* play) {
|
||||
play->actorCtx.undrawnActorCount = 0;
|
||||
void Actor_ResetLensActors(PlayState* play) {
|
||||
play->actorCtx.numLensActors = 0;
|
||||
play->actorCtx.lensActorsDrawn = false;
|
||||
}
|
||||
|
||||
s32 Actor_RecordUndrawnActor(PlayState* play, Actor* actor) {
|
||||
if (play->actorCtx.undrawnActorCount >= 32) {
|
||||
s32 Actor_AddToLensActors(PlayState* play, Actor* actor) {
|
||||
if (play->actorCtx.numLensActors >= LENS_ACTOR_MAX) {
|
||||
return false;
|
||||
}
|
||||
|
||||
play->actorCtx.undrawnActors[play->actorCtx.undrawnActorCount] = actor;
|
||||
play->actorCtx.undrawnActorCount++;
|
||||
play->actorCtx.lensActors[play->actorCtx.numLensActors] = actor;
|
||||
play->actorCtx.numLensActors++;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2643,125 +2643,126 @@ void Actor_DrawLensOverlay(Gfx** gfxP, s32 lensMaskSize) {
|
||||
((LENS_MASK_ACTIVE_SIZE - lensMaskSize) * 0.003f) + 1.0f);
|
||||
}
|
||||
|
||||
void Actor_DrawLensActors(PlayState* play, s32 numInvisibleActors, Actor** invisibleActors) {
|
||||
void Actor_DrawLensActors(PlayState* play, s32 numLensActors, Actor** lensActors) {
|
||||
GraphicsContext* gfxCtx = play->state.gfxCtx;
|
||||
Actor** lensActor;
|
||||
s32 i;
|
||||
Gfx* gfx;
|
||||
Gfx* gfxTemp;
|
||||
void* zbuffer;
|
||||
void* spA4;
|
||||
s32 dbgVar1;
|
||||
s32 dbgVar2;
|
||||
s32 spB4;
|
||||
Actor** invisibleActor;
|
||||
Gfx* spAC;
|
||||
void* spA8;
|
||||
void* spA4;
|
||||
GraphicsContext* gfxCtx = play->state.gfxCtx;
|
||||
Gfx* tmp;
|
||||
s32 pad[2];
|
||||
|
||||
// Remnant of debug
|
||||
dbgVar1 = true;
|
||||
dbgVar2 = true;
|
||||
|
||||
if (dbgVar1) {
|
||||
dbgVar1 = numInvisibleActors > 0;
|
||||
dbgVar1 = (numLensActors > 0);
|
||||
}
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
if (dbgVar1) {
|
||||
tmp = POLY_XLU_DISP;
|
||||
spA8 = gfxCtx->zbuffer;
|
||||
gfx = POLY_XLU_DISP;
|
||||
zbuffer = gfxCtx->zbuffer;
|
||||
spA4 = play->unk_18E68;
|
||||
|
||||
if (dbgVar2) {
|
||||
PreRender_SetValues(&play->pauseBgPreRender, D_801FBBCC, D_801FBBCE, gfxCtx->curFrameBuffer, spA8);
|
||||
PreRender_SetValues(&play->pauseBgPreRender, D_801FBBCC, D_801FBBCE, gfxCtx->curFrameBuffer, zbuffer);
|
||||
|
||||
spAC = tmp;
|
||||
func_80170200(&play->pauseBgPreRender, &spAC, spA8, spA4);
|
||||
tmp = spAC;
|
||||
gfxTemp = gfx;
|
||||
func_80170200(&play->pauseBgPreRender, &gfxTemp, zbuffer, spA4);
|
||||
gfx = gfxTemp;
|
||||
}
|
||||
|
||||
gDPPipeSync(tmp++);
|
||||
gDPSetPrimDepth(tmp++, 0, 0);
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetPrimDepth(gfx++, 0, 0);
|
||||
|
||||
gDPSetOtherMode(tmp++,
|
||||
gDPSetOtherMode(gfx++,
|
||||
G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE |
|
||||
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
|
||||
G_AC_THRESHOLD | G_ZS_PRIM | Z_UPD | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
|
||||
GBL_c1(G_BL_CLR_BL, G_BL_0, G_BL_CLR_MEM, G_BL_1MA) |
|
||||
GBL_c2(G_BL_CLR_BL, G_BL_0, G_BL_CLR_MEM, G_BL_1MA));
|
||||
|
||||
gDPSetPrimColor(tmp++, 0, 0, 0, 0, 0, 255);
|
||||
gDPSetPrimColor(gfx++, 0, 0, 0, 0, 0, 255);
|
||||
|
||||
if (play->roomCtx.curRoom.unk5 == 0) {
|
||||
gDPSetCombineLERP(tmp++, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1,
|
||||
if (play->roomCtx.curRoom.lensMode == LENS_MODE_HIDE_ACTORS) {
|
||||
gDPSetCombineLERP(gfx++, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1,
|
||||
TEXEL0, PRIMITIVE, 0);
|
||||
} else {
|
||||
gDPSetCombineMode(tmp++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
gDPSetCombineMode(gfx++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
}
|
||||
|
||||
spAC = tmp;
|
||||
Actor_DrawLensOverlay(&spAC, play->actorCtx.lensMaskSize);
|
||||
tmp = Play_SetFog(play, spAC);
|
||||
gfxTemp = gfx;
|
||||
Actor_DrawLensOverlay(&gfxTemp, play->actorCtx.lensMaskSize);
|
||||
gfx = Play_SetFog(play, gfxTemp);
|
||||
|
||||
for (spB4 = 0, invisibleActor = invisibleActors; spB4 < numInvisibleActors; spB4++, invisibleActor++) {
|
||||
POLY_XLU_DISP = tmp;
|
||||
Actor_Draw(play, *invisibleActor);
|
||||
tmp = POLY_XLU_DISP;
|
||||
for (i = 0, lensActor = lensActors; i < numLensActors; i++, lensActor++) {
|
||||
POLY_XLU_DISP = gfx;
|
||||
Actor_Draw(play, *lensActor);
|
||||
gfx = POLY_XLU_DISP;
|
||||
}
|
||||
|
||||
if (dbgVar2) {
|
||||
gDPPipeSync(tmp++);
|
||||
gDPPipeSync(gfx++);
|
||||
|
||||
gDPSetOtherMode(tmp++,
|
||||
gDPSetOtherMode(gfx++,
|
||||
G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE |
|
||||
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
|
||||
G_AC_THRESHOLD | G_ZS_PRIM | AA_EN | IM_RD | CVG_DST_WRAP | ZMODE_OPA | CVG_X_ALPHA |
|
||||
ALPHA_CVG_SEL | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_1) |
|
||||
GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_1));
|
||||
|
||||
gDPSetBlendColor(tmp++, 255, 255, 255, 0);
|
||||
gDPSetPrimColor(tmp++, 0, 0xFF, 0, 0, 0, 32);
|
||||
gDPSetBlendColor(gfx++, 255, 255, 255, 0);
|
||||
gDPSetPrimColor(gfx++, 0, 0xFF, 0, 0, 0, 32);
|
||||
|
||||
if (play->roomCtx.curRoom.unk5 == 0) {
|
||||
gDPSetCombineMode(tmp++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
if (play->roomCtx.curRoom.lensMode == LENS_MODE_HIDE_ACTORS) {
|
||||
gDPSetCombineMode(gfx++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
} else {
|
||||
gDPSetCombineLERP(tmp++, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1,
|
||||
gDPSetCombineLERP(gfx++, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1,
|
||||
TEXEL0, PRIMITIVE, 0);
|
||||
}
|
||||
|
||||
gDPSetColorImage(tmp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, play->pauseBgPreRender.width, spA4);
|
||||
gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, play->pauseBgPreRender.width, spA4);
|
||||
|
||||
spAC = tmp;
|
||||
Actor_DrawLensOverlay(&spAC, play->actorCtx.lensMaskSize);
|
||||
tmp = spAC;
|
||||
gfxTemp = gfx;
|
||||
Actor_DrawLensOverlay(&gfxTemp, play->actorCtx.lensMaskSize);
|
||||
gfx = gfxTemp;
|
||||
|
||||
gDPPipeSync(tmp++);
|
||||
gDPSetBlendColor(tmp++, 255, 255, 255, 8);
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetBlendColor(gfx++, 255, 255, 255, 8);
|
||||
|
||||
gDPSetColorImage(tmp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, play->pauseBgPreRender.width,
|
||||
gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, play->pauseBgPreRender.width,
|
||||
play->pauseBgPreRender.fbuf);
|
||||
|
||||
spAC = tmp;
|
||||
func_8016FDB8(&play->pauseBgPreRender, &spAC, (void*)spA4, spA8, 1);
|
||||
tmp = spAC;
|
||||
gfxTemp = gfx;
|
||||
func_8016FDB8(&play->pauseBgPreRender, &gfxTemp, spA4, zbuffer, 1);
|
||||
gfx = gfxTemp;
|
||||
}
|
||||
|
||||
POLY_XLU_DISP = tmp;
|
||||
POLY_XLU_DISP = gfx;
|
||||
}
|
||||
|
||||
tmp = OVERLAY_DISP;
|
||||
gfx = OVERLAY_DISP;
|
||||
|
||||
gDPPipeSync(tmp++);
|
||||
gDPPipeSync(gfx++);
|
||||
|
||||
gDPSetOtherMode(tmp++,
|
||||
gDPSetOtherMode(gfx++,
|
||||
G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE |
|
||||
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
|
||||
G_AC_THRESHOLD | G_ZS_PRIM | G_RM_CLD_SURF | G_RM_CLD_SURF2);
|
||||
|
||||
gDPSetCombineLERP(tmp++, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0,
|
||||
gDPSetCombineLERP(gfx++, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0, PRIMITIVE, 0, 1, TEXEL0,
|
||||
PRIMITIVE, 0);
|
||||
gDPSetPrimColor(tmp++, 0, 0, 74, 0, 0, 74);
|
||||
gDPSetPrimColor(gfx++, 0, 0, 74, 0, 0, 74);
|
||||
|
||||
spAC = tmp;
|
||||
Actor_DrawLensOverlay(&spAC, play->actorCtx.lensMaskSize);
|
||||
OVERLAY_DISP = spAC;
|
||||
gfxTemp = gfx;
|
||||
Actor_DrawLensOverlay(&gfxTemp, play->actorCtx.lensMaskSize);
|
||||
OVERLAY_DISP = gfxTemp;
|
||||
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
@@ -2817,7 +2818,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Actor_DrawAllSetup(play);
|
||||
Actor_ResetLensActors(play);
|
||||
|
||||
sp58 = POLY_XLU_DISP;
|
||||
POLY_XLU_DISP = &sp58[1];
|
||||
@@ -2841,10 +2842,11 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
|
||||
|
||||
actor->isDrawn = false;
|
||||
if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & actorFlags)) {
|
||||
if ((actor->flags & ACTOR_FLAG_80) &&
|
||||
((play->roomCtx.curRoom.unk5 == 0) || (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) ||
|
||||
if ((actor->flags & ACTOR_FLAG_REACT_TO_LENS) &&
|
||||
((play->roomCtx.curRoom.lensMode == LENS_MODE_HIDE_ACTORS) ||
|
||||
(play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) ||
|
||||
(actor->room != play->roomCtx.curRoom.num))) {
|
||||
if (Actor_RecordUndrawnActor(play, actor)) {}
|
||||
if (Actor_AddToLensActors(play, actor)) {}
|
||||
} else {
|
||||
Actor_Draw(play, actor);
|
||||
}
|
||||
@@ -2870,9 +2872,10 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
|
||||
} else {
|
||||
Math_StepToC(&play->actorCtx.lensMaskSize, 0, 10);
|
||||
}
|
||||
|
||||
if (play->actorCtx.lensMaskSize != 0) {
|
||||
play->actorCtx.lensActorsDrawn = true;
|
||||
Actor_DrawLensActors(play, play->actorCtx.undrawnActorCount, play->actorCtx.undrawnActors);
|
||||
Actor_DrawLensActors(play, play->actorCtx.numLensActors, play->actorCtx.lensActors);
|
||||
}
|
||||
|
||||
tmp2 = POLY_XLU_DISP;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
#define FLAGS \
|
||||
|
||||
+1
-1
@@ -239,7 +239,7 @@ void Scene_HeaderCmdSpecialFiles(PlayState* play, SceneCmd* cmd) {
|
||||
void Scene_HeaderCmdRoomBehavior(PlayState* play, SceneCmd* cmd) {
|
||||
play->roomCtx.curRoom.unk3 = cmd->roomBehavior.gpFlag1;
|
||||
play->roomCtx.curRoom.unk2 = cmd->roomBehavior.gpFlag2 & 0xFF;
|
||||
play->roomCtx.curRoom.unk5 = (cmd->roomBehavior.gpFlag2 >> 8) & 1;
|
||||
play->roomCtx.curRoom.lensMode = (cmd->roomBehavior.gpFlag2 >> 8) & 1;
|
||||
play->msgCtx.unk12044 = (cmd->roomBehavior.gpFlag2 >> 0xA) & 1;
|
||||
play->roomCtx.curRoom.enablePosLights = (cmd->roomBehavior.gpFlag2 >> 0xB) & 1;
|
||||
play->envCtx.unk_E2 = (cmd->roomBehavior.gpFlag2 >> 0xC) & 1;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
s32 sMatAnimStep;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "z64skin.h"
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Description: Igos du Ikana window - curtains and ray effects
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_boss_06.h"
|
||||
#include "z64shrink_window.h"
|
||||
#include "overlays/actors/ovl_En_Knight/z_en_knight.h"
|
||||
|
||||
@@ -265,7 +265,7 @@ void EnBox_Init(Actor* thisx, PlayState* play) {
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_10;
|
||||
} else {
|
||||
if ((this->type == ENBOX_TYPE_BIG_INVISIBLE) || (this->type == ENBOX_TYPE_SMALL_INVISIBLE)) {
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_80;
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
|
||||
}
|
||||
EnBox_SetupAction(this, EnBox_WaitOpen);
|
||||
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
|
||||
@@ -519,7 +519,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
|
||||
void EnBox_Open(EnBox* this, PlayState* play) {
|
||||
s32 pad;
|
||||
|
||||
this->dyna.actor.flags &= ~ACTOR_FLAG_80;
|
||||
this->dyna.actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS;
|
||||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->unk_1EC > 0) {
|
||||
@@ -698,7 +698,7 @@ void EnBox_Draw(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
if (((this->alpha == 255) && (this->type != ENBOX_TYPE_BIG_INVISIBLE) &&
|
||||
(this->type != ENBOX_TYPE_SMALL_INVISIBLE)) ||
|
||||
(!CHECK_FLAG_ALL(this->dyna.actor.flags, ACTOR_FLAG_80) &&
|
||||
(!CHECK_FLAG_ALL(this->dyna.actor.flags, ACTOR_FLAG_REACT_TO_LENS) &&
|
||||
((this->type == ENBOX_TYPE_BIG_INVISIBLE) || (this->type == ENBOX_TYPE_SMALL_INVISIBLE)))) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
|
||||
|
||||
@@ -642,7 +642,7 @@ void func_80B3F78C(EnDai* this, PlayState* play) {
|
||||
if (play->actorCtx.lensActorsDrawn) {
|
||||
this->unk_1CE |= 0x40;
|
||||
} else {
|
||||
Actor_RecordUndrawnActor(play, &this->actor);
|
||||
Actor_AddToLensActors(play, &this->actor);
|
||||
this->unk_1CE &= ~0x40;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "objects/object_hanareyama_obj/object_hanareyama_obj.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_80)
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_REACT_TO_LENS)
|
||||
|
||||
#define THIS ((EnDnb*)thisx)
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) {
|
||||
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
|
||||
if (this->actor.params & KEESE_INVISIBLE) {
|
||||
this->actor.flags |= ACTOR_FLAG_80;
|
||||
this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->actor.params = KEESE_GET_MAIN_TYPE(thisx);
|
||||
this->isInvisible = true;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) {
|
||||
this->actor.params = ENFLOORMAS_GET_7FFF(&this->actor);
|
||||
|
||||
if (params != 0) {
|
||||
this->actor.flags |= ACTOR_FLAG_80;
|
||||
this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->actor.draw = func_808D3754;
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ void func_808D19D4(EnFloormas* this) {
|
||||
this->drawDmgEffAlpha = 0.0f;
|
||||
Actor_SetScale(&this->actor, 0.004f);
|
||||
this->actor.flags |= ACTOR_FLAG_10;
|
||||
if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_80)) {
|
||||
if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
|
||||
this->actor.draw = func_808D3754;
|
||||
} else {
|
||||
this->actor.draw = EnFloormas_Draw;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_gg/object_gg.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_80)
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_REACT_TO_LENS)
|
||||
|
||||
#define THIS ((EnGg*)thisx)
|
||||
|
||||
@@ -129,7 +129,7 @@ s32 func_80B34FB4(EnGg* this, PlayState* play) {
|
||||
pitch = Math_Vec3f_Pitch(&sp34, &sp40);
|
||||
|
||||
if ((this->actor.xzDistToPlayer < 250.0f) && (this->actor.xzDistToPlayer > 50.0f) &&
|
||||
(CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_80) || CHECK_WEEKEVENTREG(WEEKEVENTREG_19_80))) {
|
||||
(CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS) || CHECK_WEEKEVENTREG(WEEKEVENTREG_19_80))) {
|
||||
Math_SmoothStepToS(&this->unk_2E8, pitch, 4, 0x2AA8, 1);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_2E8, 0, 4, 0x2AA8, 1);
|
||||
@@ -230,7 +230,7 @@ void func_80B35450(EnGg* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_80)) {
|
||||
if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
|
||||
Actor_DeactivateLens(play);
|
||||
}
|
||||
this->unk_308 = 1;
|
||||
@@ -239,7 +239,7 @@ void func_80B35450(EnGg* this, PlayState* play) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_19_80)) {
|
||||
func_800B863C(&this->actor, play);
|
||||
this->actor.textId = 0xCEE;
|
||||
} else if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_80)) {
|
||||
} else if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
|
||||
func_800B863C(&this->actor, play);
|
||||
this->actor.textId = 0xCE5;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ void func_80B3556C(EnGg* this, PlayState* play) {
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
this->unk_308 = 0;
|
||||
this->actor.flags &= ~ACTOR_FLAG_80;
|
||||
this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS;
|
||||
func_80B35250(this);
|
||||
} else {
|
||||
this->actor.textId = func_80B357F0(this);
|
||||
@@ -663,7 +663,7 @@ void EnGg_Init(Actor* thisx, PlayState* play) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_20_04);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_20_08);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_20_10);
|
||||
this->actor.flags &= ~ACTOR_FLAG_80;
|
||||
this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->unk_310 = this->actor.home.pos.y;
|
||||
this->unk_2DC = this->actor.cutscene;
|
||||
this->actor.flags |= ACTOR_FLAG_2000000;
|
||||
@@ -683,10 +683,10 @@ void EnGg_Update(Actor* thisx, PlayState* play) {
|
||||
EnGg* this = THIS;
|
||||
|
||||
if (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) {
|
||||
this->actor.flags |= ACTOR_FLAG_80;
|
||||
this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
} else {
|
||||
this->actor.flags &= ~ACTOR_FLAG_80;
|
||||
this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
}
|
||||
|
||||
@@ -709,7 +709,7 @@ void EnGg_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_91_10) &&
|
||||
(CHECK_WEEKEVENTREG(WEEKEVENTREG_19_80) || CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_80) ||
|
||||
(CHECK_WEEKEVENTREG(WEEKEVENTREG_19_80) || CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS) ||
|
||||
(this->unk_308 == 1))) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_91_10);
|
||||
}
|
||||
@@ -797,7 +797,7 @@ void EnGg_Draw(Actor* thisx, PlayState* play) {
|
||||
POLY_OPA_DISP =
|
||||
SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnGg_OverrideLimbDraw, EnGg_PostLimbDraw, &this->actor, POLY_OPA_DISP);
|
||||
} else if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_80) || (this->unk_308 == 1)) {
|
||||
} else if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS) || (this->unk_308 == 1)) {
|
||||
func_8012C2DC(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(D_80B36DFC[this->unk_2E2]));
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "z_en_gg2.h"
|
||||
#include "objects/object_gg/object_gg.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_80)
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_REACT_TO_LENS)
|
||||
|
||||
#define THIS ((EnGg2*)thisx)
|
||||
|
||||
@@ -89,7 +89,7 @@ s32 func_80B3AC94(EnGg2* this, PlayState* play) {
|
||||
pitch = Math_Vec3f_Pitch(&sp34, &sp40);
|
||||
|
||||
if ((this->actor.xzDistToPlayer < 250.0f) && (this->actor.xzDistToPlayer > 50.0f) &&
|
||||
CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_80)) {
|
||||
CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
|
||||
Math_SmoothStepToS(&this->unk_2F4, pitch, 4, 0x2AA8, 1);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_2F4, 0, 4, 0x2AA8, 1);
|
||||
@@ -159,14 +159,14 @@ void func_80B3AFB0(EnGg2* this, PlayState* play) {
|
||||
this->unk_2F0 = 1;
|
||||
this->actionFunc = func_80B3AE60;
|
||||
} else if ((this->actor.xzDistToPlayer < 100.0f) && (this->actor.xzDistToPlayer > 50.0f) &&
|
||||
CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_80)) {
|
||||
CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
|
||||
func_800B863C(&this->actor, play);
|
||||
this->actor.textId = 0xCE4;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80B3B05C(EnGg2* this, PlayState* play) {
|
||||
if ((this->actor.xzDistToPlayer < 100.0f) && CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_80)) {
|
||||
if ((this->actor.xzDistToPlayer < 100.0f) && CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
|
||||
this->actionFunc = func_80B3B5D4;
|
||||
}
|
||||
}
|
||||
@@ -203,7 +203,7 @@ void func_80B3B120(EnGg2* this, PlayState* play) {
|
||||
|
||||
void func_80B3B21C(EnGg2* this, PlayState* play) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
if ((this->actor.xzDistToPlayer < 100.0f) && CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_80)) {
|
||||
if ((this->actor.xzDistToPlayer < 100.0f) && CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
|
||||
this->unk_2E4 = ActorCutscene_GetAdditionalCutscene(this->unk_2E4);
|
||||
this->actionFunc = func_80B3B5D4;
|
||||
}
|
||||
@@ -370,7 +370,7 @@ void EnGg2_Init(Actor* thisx, PlayState* play2) {
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_gg_Skel_00F6C0, &object_gg_Anim_00F578, this->jointTable,
|
||||
this->morphTable, 20);
|
||||
this->unk_1D8 = SubS_GetPathByIndex(play, ENGG2_GET_FC00(&this->actor), 0x3F);
|
||||
this->actor.flags &= ~ACTOR_FLAG_80;
|
||||
this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->unk_2F0 = 0;
|
||||
this->unk_2F1 = 0;
|
||||
this->unk_2F2 = 0;
|
||||
@@ -422,13 +422,13 @@ void EnGg2_Update(Actor* thisx, PlayState* play) {
|
||||
EnGg2* this = THIS;
|
||||
|
||||
if (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) {
|
||||
this->actor.flags |= ACTOR_FLAG_80;
|
||||
this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
if ((this->unk_2EE == 5) && (this->unk_2EE == 7)) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
}
|
||||
} else {
|
||||
this->actor.flags &= ~ACTOR_FLAG_80;
|
||||
this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ void EnGg2_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
func_8012C2DC(play->state.gfxCtx);
|
||||
|
||||
if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_80) || (this->unk_2F0 == 1)) {
|
||||
if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS) || (this->unk_2F0 == 1)) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(D_80B3C0AC[this->unk_2EA]));
|
||||
|
||||
POLY_XLU_DISP =
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "z_en_ot.h"
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "objects/object_ot/object_ot.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ void EnRd_Init(Actor* thisx, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (EN_RD_GET_TYPE(&this->actor) == EN_RD_TYPE_INVISIBLE) {
|
||||
this->actor.flags |= ACTOR_FLAG_80;
|
||||
this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
|
||||
}
|
||||
|
||||
if (EN_RD_GET_TYPE(&this->actor) == EN_RD_TYPE_FROZEN) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user