mirror of https://github.com/zeldaret/mm.git
Bg_Open_Spot OK (#783)
* Fully Matched Bg_Open_Spot * addressing review comments variable names inline with convension variable naming clarity * remove redundant return. change padding type * texScroll to texScrolls
This commit is contained in:
parent
d0d36b603d
commit
02f4785df8
|
@ -4,11 +4,11 @@
|
||||||
<DList Name="object_open_obj_DL_0003E8" Offset="0x3E8" />
|
<DList Name="object_open_obj_DL_0003E8" Offset="0x3E8" />
|
||||||
<Texture Name="object_open_obj_Tex_000558" OutName="tex_000558" Format="rgba16" Width="32" Height="64" Offset="0x558" />
|
<Texture Name="object_open_obj_Tex_000558" OutName="tex_000558" Format="rgba16" Width="32" Height="64" Offset="0x558" />
|
||||||
<Collision Name="object_open_obj_Colheader_001640" Offset="0x1640" />
|
<Collision Name="object_open_obj_Colheader_001640" Offset="0x1640" />
|
||||||
<DList Name="object_open_obj_DL_001A60" Offset="0x1A60" />
|
<DList Name="gSpotlightLeftDL" Offset="0x1A60" />
|
||||||
<DList Name="object_open_obj_DL_001B40" Offset="0x1B40" />
|
<DList Name="gSpotlightRightDL" Offset="0x1B40" />
|
||||||
<Texture Name="object_open_obj_Tex_001CD0" OutName="tex_001CD0" Format="rgba16" Width="32" Height="32" Offset="0x1CD0" />
|
<Texture Name="gSpotlightShapesTex" OutName="spotlight_shapes" Format="rgba16" Width="32" Height="32" Offset="0x1CD0" />
|
||||||
<Texture Name="object_open_obj_Tex_0024D0" OutName="tex_0024D0" Format="ia8" Width="32" Height="64" Offset="0x24D0" />
|
<Texture Name="gSpotlightFloorTex" OutName="spotlight_floor" Format="ia8" Width="32" Height="64" Offset="0x24D0" />
|
||||||
<TextureAnimation Name="object_open_obj_Matanimheader_002CE0" Offset="0x2CE0" />
|
<TextureAnimation Name="gSpotlightTexAnim" Offset="0x2CE0" />
|
||||||
<DList Name="object_open_obj_DL_002D30" Offset="0x2D30" />
|
<DList Name="object_open_obj_DL_002D30" Offset="0x2D30" />
|
||||||
<DList Name="object_open_obj_DL_002DC0" Offset="0x2DC0" />
|
<DList Name="object_open_obj_DL_002DC0" Offset="0x2DC0" />
|
||||||
<!-- <Blob Name="object_open_obj_Blob_002DC8" Size="0xE608" Offset="0x2DC8" /> -->
|
<!-- <Blob Name="object_open_obj_Blob_002DC8" Size="0xE608" Offset="0x2DC8" /> -->
|
||||||
|
|
3
spec
3
spec
|
@ -3439,8 +3439,7 @@ beginseg
|
||||||
name "ovl_Bg_Open_Spot"
|
name "ovl_Bg_Open_Spot"
|
||||||
compress
|
compress
|
||||||
include "build/src/overlays/actors/ovl_Bg_Open_Spot/z_bg_open_spot.o"
|
include "build/src/overlays/actors/ovl_Bg_Open_Spot/z_bg_open_spot.o"
|
||||||
include "build/data/ovl_Bg_Open_Spot/ovl_Bg_Open_Spot.data.o"
|
include "build/src/overlays/actors/ovl_Bg_Open_Spot/ovl_Bg_Open_Spot_reloc.o"
|
||||||
include "build/data/ovl_Bg_Open_Spot/ovl_Bg_Open_Spot.reloc.o"
|
|
||||||
endseg
|
endseg
|
||||||
|
|
||||||
beginseg
|
beginseg
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
/*
|
/*
|
||||||
* File: z_bg_open_spot.c
|
* File: z_bg_open_spot.c
|
||||||
* Overlay: ovl_Bg_Open_Spot
|
* Overlay: ovl_Bg_Open_Spot
|
||||||
* Description: Star Light Rays in Intro Scene
|
* Description: Spotlights that shine on the Skull Kid when he turns Link
|
||||||
|
* into a Deku Scrub.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "z_bg_open_spot.h"
|
#include "z_bg_open_spot.h"
|
||||||
|
#include "objects/object_open_obj/object_open_obj.h"
|
||||||
|
|
||||||
#define FLAGS (ACTOR_FLAG_10)
|
#define FLAGS (ACTOR_FLAG_10)
|
||||||
|
|
||||||
|
@ -13,8 +14,8 @@
|
||||||
void BgOpenSpot_Init(Actor* thisx, GlobalContext* globalCtx);
|
void BgOpenSpot_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||||
void BgOpenSpot_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
void BgOpenSpot_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||||
void BgOpenSpot_Update(Actor* thisx, GlobalContext* globalCtx);
|
void BgOpenSpot_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||||
|
void BgOpenSpot_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||||
|
|
||||||
#if 0
|
|
||||||
const ActorInit Bg_Open_Spot_InitVars = {
|
const ActorInit Bg_Open_Spot_InitVars = {
|
||||||
ACTOR_BG_OPEN_SPOT,
|
ACTOR_BG_OPEN_SPOT,
|
||||||
ACTORCAT_PROP,
|
ACTORCAT_PROP,
|
||||||
|
@ -27,25 +28,49 @@ const ActorInit Bg_Open_Spot_InitVars = {
|
||||||
(ActorFunc)NULL,
|
(ActorFunc)NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
// static InitChainEntry sInitChain[] = {
|
static InitChainEntry sInitChain[] = {
|
||||||
static InitChainEntry D_80ACB3B0[] = {
|
|
||||||
ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
|
ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
|
||||||
ICHAIN_F32(uncullZoneScale, 560, ICHAIN_CONTINUE),
|
ICHAIN_F32(uncullZoneScale, 560, ICHAIN_CONTINUE),
|
||||||
ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_CONTINUE),
|
ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_CONTINUE),
|
||||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
void BgOpenSpot_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
|
BgOpenSpot* this = THIS;
|
||||||
|
|
||||||
extern InitChainEntry D_80ACB3B0[];
|
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||||
|
this->texScrolls = Lib_SegmentedToVirtual(gSpotlightTexAnim);
|
||||||
|
}
|
||||||
|
|
||||||
extern UNK_TYPE D_06001A60;
|
void BgOpenSpot_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
extern UNK_TYPE D_06002CE0;
|
}
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Open_Spot/BgOpenSpot_Init.s")
|
void BgOpenSpot_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
|
BgOpenSpot* this = THIS;
|
||||||
|
u32 action;
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Open_Spot/BgOpenSpot_Destroy.s")
|
if (Cutscene_CheckActorAction(globalCtx, 0x7D)) {
|
||||||
|
action = globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 0x7D)]->action;
|
||||||
|
if (action == 1) {
|
||||||
|
this->actor.draw = NULL;
|
||||||
|
} else if (action == 2) {
|
||||||
|
this->actor.draw = BgOpenSpot_Draw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Open_Spot/BgOpenSpot_Update.s")
|
void BgOpenSpot_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
|
s32 pad;
|
||||||
|
BgOpenSpot* this = (BgOpenSpot*)thisx;
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Open_Spot/func_80ACB2B0.s")
|
AnimatedMat_Draw(globalCtx, this->texScrolls);
|
||||||
|
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||||
|
|
||||||
|
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||||
|
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||||
|
gDPSetColorDither(POLY_XLU_DISP++, G_CD_BAYER);
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, gSpotlightLeftDL);
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, gSpotlightRightDL);
|
||||||
|
|
||||||
|
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||||
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ struct BgOpenSpot;
|
||||||
|
|
||||||
typedef struct BgOpenSpot {
|
typedef struct BgOpenSpot {
|
||||||
/* 0x000 */ Actor actor;
|
/* 0x000 */ Actor actor;
|
||||||
/* 0x144 */ char unk_144[0x4];
|
/* 0x144 */ AnimatedMaterial* texScrolls;
|
||||||
} BgOpenSpot; // size = 0x148
|
} BgOpenSpot; // size = 0x148
|
||||||
|
|
||||||
extern const ActorInit Bg_Open_Spot_InitVars;
|
extern const ActorInit Bg_Open_Spot_InitVars;
|
||||||
|
|
|
@ -679,11 +679,10 @@ D_06000098 = 0x06000098;
|
||||||
D_060003E8 = 0x060003E8;
|
D_060003E8 = 0x060003E8;
|
||||||
D_06001640 = 0x06001640;
|
D_06001640 = 0x06001640;
|
||||||
|
|
||||||
// ovl_Bg_Open_Spot
|
|
||||||
|
|
||||||
D_06001A60 = 0x06001A60;
|
// ovl_Bg_Sinkai_Kabe
|
||||||
D_06001B40 = 0x06001B40;
|
|
||||||
D_06002CE0 = 0x06002CE0;
|
D_06000048 = 0x06000048;
|
||||||
|
|
||||||
// ovl_Bg_Spout_Fire
|
// ovl_Bg_Spout_Fire
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue