mirror of https://github.com/zeldaret/mm.git
Ovl obj jg gakki (#512)
* add gakki decompilation * add gakki header file * modify spec to remove data * Use THIS macro for this = thisx Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * Change reloc include to the generated one Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * spacing variables and functions Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * spacing variables and functions Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * spacing variables and functions Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * clean up unnecessary mips_to_c hints Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * clean up old mips_to_c hints Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * variable cleanup and lookup Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * remove unnecessary cast Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * rerun format after code review * fix naming convention * add variable name hints for data Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * reformatted file * Fix collider naming Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * fix more renaming Co-authored-by: Savino Jossi <sj@redballoonsecurity.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
parent
1d7e721cb7
commit
06a08a3322
3
spec
3
spec
|
@ -4417,8 +4417,7 @@ beginseg
|
|||
name "ovl_Obj_Jg_Gakki"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.o"
|
||||
include "build/data/ovl_Obj_Jg_Gakki/ovl_Obj_Jg_Gakki.data.o"
|
||||
include "build/data/ovl_Obj_Jg_Gakki/ovl_Obj_Jg_Gakki.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Obj_Jg_Gakki/ovl_Obj_Jg_Gakki_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -15,7 +15,6 @@ void ObjJgGakki_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void ObjJgGakki_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ObjJgGakki_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
#if 0
|
||||
const ActorInit Obj_Jg_Gakki_InitVars = {
|
||||
ACTOR_OBJ_JG_GAKKI,
|
||||
ACTORCAT_PROP,
|
||||
|
@ -28,14 +27,42 @@ const ActorInit Obj_Jg_Gakki_InitVars = {
|
|||
(ActorFunc)ObjJgGakki_Draw,
|
||||
};
|
||||
|
||||
#endif
|
||||
extern AnimationHeader D_0601B1E8; // gGoronElderDrumAnim
|
||||
extern SkeletonHeader D_0601B210; // gGoronElderDrumSkel
|
||||
|
||||
extern UNK_TYPE D_0601B1E8;
|
||||
void ObjJgGakki_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
ObjJgGakki* this = THIS;
|
||||
f32 frameCount = Animation_GetLastFrame(&D_0601B1E8);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Jg_Gakki/ObjJgGakki_Init.s")
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 24.0f);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &D_0601B210, NULL, NULL, NULL, 0);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Jg_Gakki/ObjJgGakki_Destroy.s")
|
||||
if (((globalCtx->sceneNum == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 7)) &&
|
||||
(globalCtx->csCtx.unk_12 == 0)) {
|
||||
Animation_Change(&this->skelAnime, &D_0601B1E8, 1.0f, frameCount, frameCount, 2, 0.0f);
|
||||
} else if ((globalCtx->sceneNum == SCENE_17SETUGEN) || (globalCtx->sceneNum == SCENE_10YUKIYAMANOMURA)) {
|
||||
Animation_Change(&this->skelAnime, &D_0601B1E8, 1.0f, 0.0f, frameCount, 2, 0.0f);
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Jg_Gakki/ObjJgGakki_Update.s")
|
||||
void ObjJgGakki_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjJgGakki* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Jg_Gakki/ObjJgGakki_Draw.s")
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
void ObjJgGakki_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjJgGakki* this = THIS;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
void ObjJgGakki_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjJgGakki* this = THIS;
|
||||
|
||||
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, &this->actor);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,8 @@ struct ObjJgGakki;
|
|||
|
||||
typedef struct ObjJgGakki {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x90];
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ ColliderCylinder collider;
|
||||
} ObjJgGakki; // size = 0x1D4
|
||||
|
||||
extern const ActorInit Obj_Jg_Gakki_InitVars;
|
||||
|
|
Loading…
Reference in New Issue