mirror of https://github.com/zeldaret/mm.git
parent
fed1b37da1
commit
f0cd2db055
|
|
@ -1363,9 +1363,9 @@ SECTIONS
|
|||
ovl_Item_B_Heart : AT(RomLocation)
|
||||
{
|
||||
build/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.o(.text)
|
||||
build/asm/overlays/ovl_Item_B_Heart_data.o(.data)
|
||||
build/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.o(.data)
|
||||
build/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.o(.rodata)
|
||||
build/asm/overlays/ovl_Item_B_Heart_rodata.o(.rodata)
|
||||
build/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart_overlay.o(.ovl)
|
||||
}
|
||||
SegmentEnd = .;
|
||||
SegmentSize = SegmentEnd - SegmentStart;
|
||||
|
|
|
|||
|
|
@ -142,6 +142,10 @@ D_0600CC94 = 0x0600CC94;
|
|||
D_06000F28 = 0x06000F28;
|
||||
D_06000CE8 = 0x06000CE8;
|
||||
|
||||
/* item_b_heart */
|
||||
D_06001290 = 0x06001290;
|
||||
D_06001470 = 0x06001470;
|
||||
|
||||
/* z_dm_statue */
|
||||
D_06001788 = 0x06001788;
|
||||
D_06000520 = 0x06000520;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* File: z_bg_lotus.c
|
||||
* Overlay: Bg_Lotus
|
||||
* Overlay: ovl_Bg_Lotus
|
||||
* Description: Southern Swamp Lilypads
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
/*
|
||||
* File: z_item_b_heart.c
|
||||
* Overlay: ovl_Item_B_Heart
|
||||
* Description: Heart Container
|
||||
*/
|
||||
|
||||
#include "z_item_b_heart.h"
|
||||
|
||||
#define FLAGS 0x00000000
|
||||
|
|
@ -9,7 +15,8 @@ void ItemBHeart_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void ItemBHeart_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ItemBHeart_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
void func_808BCF54(ItemBHeart* this, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit Item_B_Heart_InitVars = {
|
||||
ACTOR_ITEM_B_HEART,
|
||||
ACTORCAT_BOSS,
|
||||
|
|
@ -19,16 +26,91 @@ const ActorInit Item_B_Heart_InitVars = {
|
|||
(ActorFunc)ItemBHeart_Init,
|
||||
(ActorFunc)ItemBHeart_Destroy,
|
||||
(ActorFunc)ItemBHeart_Update,
|
||||
(ActorFunc)ItemBHeart_Draw
|
||||
(ActorFunc)ItemBHeart_Draw,
|
||||
};
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Item_B_Heart_0x808BCDF0/ItemBHeart_Init.asm")
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 0, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Item_B_Heart_0x808BCDF0/ItemBHeart_Destroy.asm")
|
||||
extern Gfx D_06001290[];
|
||||
extern Gfx D_06001470[];
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Item_B_Heart_0x808BCDF0/ItemBHeart_Update.asm")
|
||||
void ItemBHeart_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ItemBHeart* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Item_B_Heart_0x808BCDF0/func_808BCF54.asm")
|
||||
if (Actor_GetCollectibleFlag(globalCtx, 0x1F)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Item_B_Heart_0x808BCDF0/ItemBHeart_Draw.asm")
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.8f);
|
||||
|
||||
if (this->actor.params == 0x23) {
|
||||
this->unk_168 = 0.1f;
|
||||
} else {
|
||||
this->unk_168 = 1.0f;
|
||||
}
|
||||
|
||||
this->actor.world.pos.y += (20.0f * this->unk_168);
|
||||
}
|
||||
|
||||
void ItemBHeart_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void ItemBHeart_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ItemBHeart* this = THIS;
|
||||
|
||||
func_808BCF54(this, globalCtx);
|
||||
|
||||
if (!(this->unk_168 < 0.5f)) {
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
Actor_SetCollectibleFlag(globalCtx, 0x1F);
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
} else {
|
||||
func_800B8A1C(&this->actor, globalCtx, 0xD, 30.0f, 80.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_808BCF54(ItemBHeart* this, GlobalContext* globalCtx) {
|
||||
this->actor.shape.rot.y += 0x400;
|
||||
Math_ApproachF(&this->unk_164, 0.4f, 0.1f, 0.01f);
|
||||
Actor_SetScale(&this->actor, this->unk_164 * this->unk_168);
|
||||
}
|
||||
|
||||
void ItemBHeart_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ItemBHeart* this = THIS;
|
||||
Actor* blueWarpActor;
|
||||
u8 flag = false;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
blueWarpActor = globalCtx->actorCtx.actorList[ACTORCAT_ITEMACTION].first;
|
||||
|
||||
while (blueWarpActor != NULL) {
|
||||
if ((blueWarpActor->id == ACTOR_DOOR_WARP1) && (blueWarpActor->projectedPos.z > this->actor.projectedPos.z)) {
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
blueWarpActor = blueWarpActor->next;
|
||||
}
|
||||
|
||||
if (flag || thisx->world.rot.y != 0) {
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_06001290);
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_06001470);
|
||||
} else {
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_06001290);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_06001470);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ struct ItemBHeart;
|
|||
|
||||
typedef struct ItemBHeart {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x28];
|
||||
/* 0x144 */ char unk_144[0x20];
|
||||
/* 0x164 */ f32 unk_164;
|
||||
/* 0x168 */ f32 unk_168;
|
||||
} ItemBHeart; // size = 0x16C
|
||||
|
||||
extern const ActorInit Item_B_Heart_InitVars;
|
||||
|
|
|
|||
Loading…
Reference in New Issue