mirror of https://github.com/zeldaret/mm.git
bg_haka_curtain OK (#25)
* bg_haka_curtain OK * Renamed InitVars back to its symbol name, plus converted the actor to a dynaActor like it should be Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
This commit is contained in:
parent
d612cc7196
commit
a051672fd6
|
@ -1591,7 +1591,7 @@ void func_800EDF24(void); // func_800EDF24
|
|||
void func_800EDF78(Actor* actor, GlobalContext* ctxt, int iParm3); // func_800EDF78
|
||||
void func_800EE0CC(Actor* actor, GlobalContext* ctxt, int iParm3); // func_800EE0CC
|
||||
void func_800EE1D8(void); // func_800EE1D8
|
||||
void func_800EE200(void); // func_800EE200
|
||||
u32 func_800EE200(GlobalContext* ctxt, u32 uParm2); // func_800EE200
|
||||
u32 func_800EE29C(GlobalContext* ctxt, u32 uParm2); // func_800EE29C
|
||||
u32 func_800EE2F4(GlobalContext* ctxt); // func_800EE2F4
|
||||
void func_800EE320(GlobalContext* ctxt, s16 index); // func_800EE320
|
||||
|
|
|
@ -11618,7 +11618,7 @@ extern UNK_TYPE4 D_80B6DB88; // D_80B6DB88
|
|||
extern OverlayRelocationSection bgSinkaiKabeOverlayInfo; // D_80B6DB90
|
||||
extern u32 bgSinkaiKabeOverlayRelocations[13]; // D_80B6DBA4
|
||||
extern u32 bgSinkaiKabeOverlayInfoOffset; // D_80B6DBDC
|
||||
extern UNK_TYPE1 D_80B6DF80; // D_80B6DF80
|
||||
extern UNK_TYPE1 Bg_Haka_Curtain_InitVars; // Bg_Haka_Curtain_InitVars
|
||||
extern UNK_TYPE1 D_80B6DFA0; // D_80B6DFA0
|
||||
extern OverlayRelocationSection bgHakaCurtainOverlayInfo; // D_80B6DFB0
|
||||
extern u32 bgHakaCurtainOverlayRelocations[22]; // D_80B6DFC4
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <unk.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ UNK_TYPE1 pad0[0x2];
|
||||
/* 0x00 */ u16 unk0;
|
||||
/* 0x02 */ u16 startFrame;
|
||||
/* 0x04 */ u16 endFrame;
|
||||
/* 0x06 */ UNK_TYPE1 pad6[0x2A];
|
||||
|
|
|
@ -5681,8 +5681,9 @@ SECTIONS
|
|||
ovl_Bg_Haka_Curtain : AT(RomLocation)
|
||||
{
|
||||
build/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.o(.text)
|
||||
build/asm/ovl_Bg_Haka_Curtain_data.o(.data)
|
||||
build/asm/ovl_Bg_Haka_Curtain_rodata.o(.rodata)
|
||||
build/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.o(.data)
|
||||
build/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.o(.rodata)
|
||||
build/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain_overlay.o(.ovl)
|
||||
}
|
||||
SegmentEnd = .;
|
||||
SegmentSize = SegmentEnd - SegmentStart;
|
||||
|
|
|
@ -13,6 +13,10 @@ D_0E000140 = 0x0E000140;
|
|||
D_0E0001C8 = 0x0E0001C8;
|
||||
D_0E0002C8 = 0x0E0002C8;
|
||||
|
||||
/* bg_haka_curtain */
|
||||
D_06001410 = 0x06001410;
|
||||
D_06001588 = 0x06001588;
|
||||
|
||||
/* obj_hana */
|
||||
D_06000500 = 0x06000500;
|
||||
|
||||
|
|
|
@ -9,7 +9,16 @@ void BgHakaCurtain_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void BgHakaCurtain_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgHakaCurtain_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
void func_80B6DC98(BgHakaCurtain* this);
|
||||
void func_80B6DCAC(BgHakaCurtain* this, GlobalContext* globalCtx);
|
||||
void func_80B6DCEC(BgHakaCurtain* this);
|
||||
void func_80B6DD00(BgHakaCurtain* this, GlobalContext* globalCtx);
|
||||
void func_80B6DD5C(BgHakaCurtain* this);
|
||||
void func_80B6DD70(BgHakaCurtain* this, GlobalContext* globalCtx);
|
||||
void func_80B6DD9C(BgHakaCurtain* this, GlobalContext* globalCtx);
|
||||
void func_80B6DEA8(BgHakaCurtain* this, GlobalContext* globalCtx);
|
||||
void func_80B6DE80(BgHakaCurtain* this);
|
||||
|
||||
const ActorInit Bg_Haka_Curtain_InitVars = {
|
||||
ACTOR_BG_HAKA_CURTAIN,
|
||||
ACTORTYPE_BG,
|
||||
|
@ -21,32 +30,106 @@ const ActorInit Bg_Haka_Curtain_InitVars = {
|
|||
(ActorFunc)BgHakaCurtain_Update,
|
||||
(ActorFunc)BgHakaCurtain_Draw
|
||||
};
|
||||
*/
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/BgHakaCurtain_Init.asm")
|
||||
static InitChainEntry D_80B6DFA0[] = {
|
||||
ICHAIN_F32(unkFC, 4000, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk100, 700, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk104, 600, ICHAIN_CONTINUE),
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/BgHakaCurtain_Destroy.asm")
|
||||
extern BgMeshHeader D_06001588;
|
||||
extern UNK_TYPE D_06001410;
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/func_80B6DC98.asm")
|
||||
void BgHakaCurtain_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaCurtain* this = THIS;
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/func_80B6DCAC.asm")
|
||||
Actor_ProcessInitChain(&this->dyna.actor, D_80B6DFA0);
|
||||
BcCheck3_BgActorInit(&this->dyna, 1);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06001588);
|
||||
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
|
||||
func_80B6DE80(this);
|
||||
return;
|
||||
}
|
||||
func_80B6DC98(this);
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/func_80B6DCEC.asm")
|
||||
void BgHakaCurtain_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaCurtain* this = THIS;
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/func_80B6DD00.asm")
|
||||
BgCheck_RemoveActorMesh(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/func_80B6DD5C.asm")
|
||||
void func_80B6DC98(BgHakaCurtain* this) {
|
||||
this->actionFunc = func_80B6DCAC;
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/func_80B6DD70.asm")
|
||||
void func_80B6DCAC(BgHakaCurtain* this, GlobalContext* globalCtx) {
|
||||
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
|
||||
func_80B6DCEC(this);
|
||||
}
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/func_80B6DD80.asm")
|
||||
void func_80B6DCEC(BgHakaCurtain* this) {
|
||||
this->actionFunc = func_80B6DD00;
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/func_80B6DD9C.asm")
|
||||
void func_80B6DD00(BgHakaCurtain* this, GlobalContext* globalCtx) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
func_80B6DD5C(this);
|
||||
return;
|
||||
}
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/func_80B6DE80.asm")
|
||||
void func_80B6DD5C(BgHakaCurtain* this) {
|
||||
this->actionFunc = func_80B6DD70;
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/func_80B6DEA8.asm")
|
||||
void func_80B6DD70(BgHakaCurtain* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/BgHakaCurtain_Update.asm")
|
||||
void func_80B6DD80(BgHakaCurtain* this) {
|
||||
this->actionFunc = func_80B6DD9C;
|
||||
this->dyna.actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Bg_Haka_Curtain_0x80B6DBE0/BgHakaCurtain_Draw.asm")
|
||||
void func_80B6DD9C(BgHakaCurtain* this, GlobalContext* globalCtx) {
|
||||
if (this->dyna.actor.currPosRot.pos.y < this->dyna.actor.initPosRot.pos.y + 150.0f - 30.0f) {
|
||||
Lib_StepTowardsCheck_f(&this->dyna.actor.velocity.y, 1.6f, 0.12f);
|
||||
} else {
|
||||
Lib_StepTowardsCheck_f(&this->dyna.actor.velocity.y, 0.8f, 0.05f);
|
||||
}
|
||||
this->dyna.actor.currPosRot.pos.y += this->dyna.actor.velocity.y;
|
||||
if (this->dyna.actor.initPosRot.pos.y + 150.0f < this->dyna.actor.currPosRot.pos.y) {
|
||||
func_80B6DE80(this);
|
||||
return;
|
||||
}
|
||||
func_800B9010(&this->dyna.actor, 0x218D);
|
||||
}
|
||||
|
||||
void func_80B6DE80(BgHakaCurtain* this) {
|
||||
this->actionFunc = func_80B6DEA8;
|
||||
this->dyna.actor.currPosRot.pos.y = this->dyna.actor.initPosRot.pos.y + 150.0f;
|
||||
}
|
||||
|
||||
void func_80B6DEA8(BgHakaCurtain* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void BgHakaCurtain_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaCurtain* this = THIS;
|
||||
CsCmdActorAction* actorAction;
|
||||
|
||||
if (func_800EE29C(globalCtx, 0x1D5)) {
|
||||
actorAction = globalCtx->csCtx.actorActions[func_800EE200(globalCtx, 0x1D5)];
|
||||
if (actorAction->startFrame == globalCtx->csCtx.frames && actorAction->unk0 == 2) {
|
||||
func_80B6DD80(this);
|
||||
}
|
||||
}
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
||||
void BgHakaCurtain_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
func_800BDFC0(globalCtx, &D_06001410);
|
||||
}
|
||||
|
|
|
@ -5,9 +5,11 @@
|
|||
|
||||
struct BgHakaCurtain;
|
||||
|
||||
typedef void (*BgHakaCurtainActionFunc)(struct BgHakaCurtain*, GlobalContext*);
|
||||
|
||||
typedef struct BgHakaCurtain {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x1C];
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ BgHakaCurtainActionFunc actionFunc;
|
||||
} BgHakaCurtain; // size = 0x160
|
||||
|
||||
extern const ActorInit Bg_Haka_Curtain_InitVars;
|
||||
|
|
|
@ -16590,7 +16590,7 @@
|
|||
0x80B6DB90:("bgSinkaiKabeOverlayInfo","OverlayRelocationSection","",0x14),
|
||||
0x80B6DBA4:("bgSinkaiKabeOverlayRelocations","u32","[13]",0x34),
|
||||
0x80B6DBDC:("bgSinkaiKabeOverlayInfoOffset","u32","",0x4),
|
||||
0x80B6DF80:("D_80B6DF80","UNK_TYPE1","",0x1),
|
||||
0x80B6DF80:("Bg_Haka_Curtain_InitVars","UNK_TYPE1","",0x1),
|
||||
0x80B6DFA0:("D_80B6DFA0","UNK_TYPE1","",0x1),
|
||||
0x80B6DFB0:("bgHakaCurtainOverlayInfo","OverlayRelocationSection","",0x14),
|
||||
0x80B6DFC4:("bgHakaCurtainOverlayRelocations","u32","[22]",0x58),
|
||||
|
|
Loading…
Reference in New Issue