mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-21 22:10:51 -04:00
en_okarina_effect OK (#47)
* en_okarina_effect OK * Changed setupaction name
This commit is contained in:
@@ -3910,7 +3910,7 @@ void func_8096A6F4(void); // func_8096A6F4
|
||||
void EnJs_Update(void); // func_8096A8A4
|
||||
void func_8096A9F4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5); // func_8096A9F4
|
||||
void EnJs_Draw(void); // func_8096AB20
|
||||
void func_8096B0A0(void); // func_8096B0A0
|
||||
void EnOkarinaEffect_SetupAction(void); // func_8096B0A0
|
||||
void EnOkarinaEffect_Destroy(void); // func_8096B0AC
|
||||
void EnOkarinaEffect_Init(void); // func_8096B0BC
|
||||
void func_8096B104(void); // func_8096B104
|
||||
|
||||
+1
-1
@@ -3979,7 +3979,7 @@ extern UNK_TYPE1 D_801F4E5C; // D_801F4E5C
|
||||
extern UNK_TYPE1 D_801F4E60; // D_801F4E60
|
||||
extern UNK_TYPE1 D_801F4E64; // D_801F4E64
|
||||
extern UNK_TYPE1 D_801F4E68; // D_801F4E68
|
||||
extern UNK_TYPE1 D_801F4E70; // D_801F4E70
|
||||
extern f32 D_801F4E70; // D_801F4E70
|
||||
extern UNK_TYPE1 D_801F4E74; // D_801F4E74
|
||||
extern UNK_TYPE1 D_801F4E78; // D_801F4E78
|
||||
extern UNK_TYPE1 D_801F4E7A; // D_801F4E7A
|
||||
|
||||
+5
-3
@@ -955,7 +955,8 @@ typedef struct {
|
||||
/* 0xEF */ UNK_TYPE1 unkEF;
|
||||
/* 0xF0 */ UNK_TYPE1 unkF0;
|
||||
/* 0xF1 */ UNK_TYPE1 unkF1;
|
||||
} KankyoContext; // size = 0xF4
|
||||
/* 0xF2 */ u8 unkF2[0xC];
|
||||
} KankyoContext; // size = 0xFE
|
||||
|
||||
typedef struct {
|
||||
/* 0x00000 */ View view;
|
||||
@@ -966,7 +967,9 @@ typedef struct {
|
||||
/* 0x11F04 */ u16 unk11F04;
|
||||
/* 0x11F06 */ UNK_TYPE1 pad11F06[0x4];
|
||||
/* 0x11F0A */ u8 unk11F0A;
|
||||
/* 0x11F0B */ UNK_TYPE1 pad11F0B[0x17];
|
||||
/* 0x11F0B */ UNK_TYPE1 pad11F0B[0x5];
|
||||
/* 0x11F10 */ s32 unk11F10;
|
||||
/* 0x11F11 */ UNK_TYPE1 pad11F11[0xD];
|
||||
/* 0x11F22 */ u8 unk11F22;
|
||||
/* 0x11F23 */ UNK_TYPE1 pad11F23[0xFD];
|
||||
/* 0x12020 */ u8 unk12020;
|
||||
@@ -1616,7 +1619,6 @@ struct GlobalContext {
|
||||
/* 0x17000 */ u16 unk17000;
|
||||
/* 0x17002 */ UNK_TYPE1 pad17002[0x2];
|
||||
/* 0x17004 */ KankyoContext kankyoContext;
|
||||
/* 0x170F8 */ UNK_TYPE1 pad170F8[0xC];
|
||||
/* 0x17104 */ AnimationContext animationCtx;
|
||||
/* 0x17D88 */ SceneContext sceneContext;
|
||||
/* 0x186E0 */ RoomContext roomContext;
|
||||
|
||||
@@ -2441,8 +2441,9 @@ SECTIONS
|
||||
ovl_En_Okarina_Effect : AT(RomLocation)
|
||||
{
|
||||
build/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.o(.text)
|
||||
build/asm/ovl_En_Okarina_Effect_data.o(.data)
|
||||
build/asm/ovl_En_Okarina_Effect_rodata.o(.rodata)
|
||||
build/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.o(.data)
|
||||
build/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.o(.rodata)
|
||||
build/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect_overlay.o(.ovl)
|
||||
}
|
||||
SegmentEnd = .;
|
||||
SegmentSize = SegmentEnd - SegmentStart;
|
||||
|
||||
@@ -8,7 +8,10 @@ void EnOkarinaEffect_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnOkarinaEffect_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnOkarinaEffect_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
void func_8096B104(EnOkarinaEffect* this, GlobalContext* globalCtx);
|
||||
void func_8096B174(EnOkarinaEffect* this, GlobalContext* globalCtx);
|
||||
void func_8096B1FC(EnOkarinaEffect* this, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit En_Okarina_Effect_InitVars = {
|
||||
ACTOR_EN_OKARINA_EFFECT,
|
||||
ACTORTYPE_ITEMACTION,
|
||||
@@ -20,18 +23,55 @@ const ActorInit En_Okarina_Effect_InitVars = {
|
||||
(ActorFunc)EnOkarinaEffect_Update,
|
||||
(ActorFunc)NULL
|
||||
};
|
||||
*/
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Okarina_Effect_0x8096B0A0/func_8096B0A0.asm")
|
||||
void EnOkarinaEffect_SetupAction(EnOkarinaEffect* this, EnOkarinaEffectActionFunc* actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Okarina_Effect_0x8096B0A0/EnOkarinaEffect_Destroy.asm")
|
||||
void EnOkarinaEffect_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Okarina_Effect_0x8096B0A0/EnOkarinaEffect_Init.asm")
|
||||
void EnOkarinaEffect_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnOkarinaEffect* this = THIS;
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Okarina_Effect_0x8096B0A0/func_8096B104.asm")
|
||||
if (globalCtx->kankyoContext.unkF2[1]) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
EnOkarinaEffect_SetupAction(&this->actor, func_8096B104);
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Okarina_Effect_0x8096B0A0/func_8096B174.asm")
|
||||
void func_8096B104(EnOkarinaEffect* this, GlobalContext* globalCtx) {
|
||||
this->unk144 = 0x50;
|
||||
globalCtx->kankyoContext.unkF2[4] = 0x3C;
|
||||
D_801F4E70 = 501.0f;
|
||||
globalCtx->kankyoContext.unkE3 = 2;
|
||||
func_800FD78C(globalCtx);
|
||||
EnOkarinaEffect_SetupAction(this, func_8096B174);
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Okarina_Effect_0x8096B0A0/func_8096B1FC.asm")
|
||||
void func_8096B174(EnOkarinaEffect* this, GlobalContext* globalCtx) {
|
||||
DECR(this->unk144);
|
||||
if (!globalCtx->unk16D30.unk1EC && !globalCtx->unk17000 && !globalCtx->msgCtx.unk11F10 &&
|
||||
!func_8016A01C(globalCtx) && this->unk144 == 0) {
|
||||
EnOkarinaEffect_SetupAction(this, func_8096B1FC);
|
||||
}
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Okarina_Effect_0x8096B0A0/EnOkarinaEffect_Update.asm")
|
||||
void func_8096B1FC(EnOkarinaEffect* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->kankyoContext.unkF2[4]) {
|
||||
if ((globalCtx->state.frames & 3) == 0) {
|
||||
--globalCtx->kankyoContext.unkF2[4];
|
||||
if (globalCtx->kankyoContext.unkF2[4] == 8) {
|
||||
func_800FD858(globalCtx);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
void EnOkarinaEffect_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnOkarinaEffect* this = THIS;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
||||
@@ -5,9 +5,13 @@
|
||||
|
||||
struct EnOkarinaEffect;
|
||||
|
||||
typedef void (*EnOkarinaEffectActionFunc)(struct ArmsHook*, GlobalContext*);
|
||||
|
||||
typedef struct EnOkarinaEffect {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x8];
|
||||
/* 0x144 */ u16 unk144;
|
||||
/* 0x146 */ u16 unk146;
|
||||
/* 0x148 */ EnOkarinaEffectActionFunc actionFunc;
|
||||
} EnOkarinaEffect; // size = 0x14C
|
||||
|
||||
extern const ActorInit En_Okarina_Effect_InitVars;
|
||||
|
||||
@@ -7932,7 +7932,7 @@
|
||||
0x8096A8A4:("EnJs_Update",),
|
||||
0x8096A9F4:("func_8096A9F4",),
|
||||
0x8096AB20:("EnJs_Draw",),
|
||||
0x8096B0A0:("func_8096B0A0",),
|
||||
0x8096B0A0:("EnOkarinaEffect_SetupAction",),
|
||||
0x8096B0AC:("EnOkarinaEffect_Destroy",),
|
||||
0x8096B0BC:("EnOkarinaEffect_Init",),
|
||||
0x8096B104:("func_8096B104",),
|
||||
|
||||
Reference in New Issue
Block a user