mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-08 10:32:59 -04:00
object_box improvements
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<Root>
|
||||
<File Name="object_box" Segment="6">
|
||||
<Animation Name="gBoxChestOpenChildAnim" Offset="0x128" />
|
||||
<Animation Name="gBoxChestOpenAdultAnim" Offset="0x24C" />
|
||||
<!-- <Blob Name="object_box_zeroes_unk_0000025C" Size="0xF4" Offset="0x25C" /> -->
|
||||
<Animation Name="object_box_Anim_00043C" Offset="0x43C" />
|
||||
<!-- <Blob Name="object_box_zeroes_unk_0000044C" Size="0x64" Offset="0x44C" /> -->
|
||||
<Animation Name="gBoxBigChestOpenChildAnim" Offset="0x128" />
|
||||
<Animation Name="gBoxBigChestOpenAdultAnim" Offset="0x24C" />
|
||||
<Blob Name="object_box_zeroes_unk_0000025C" Size="0xF4" Offset="0x25C" />
|
||||
<Animation Name="gBoxChestOpenAnim" Offset="0x43C" />
|
||||
<Blob Name="object_box_zeroes_unk_0000044C" Size="0x64" Offset="0x44C" />
|
||||
<DList Name="gBoxChestBaseDL" Offset="0x6F0" />
|
||||
<DList Name="gBoxChestBaseGildedDL" Offset="0xA50" />
|
||||
<DList Name="gBoxChestBaseOrnateDL" Offset="0xDB0" />
|
||||
@@ -22,8 +22,8 @@
|
||||
<Limb Name="object_box_Standardlimb_006678" Type="Standard" EnumName="OBJECT_BOX_CHEST_LIMB_03" Offset="0x6678" />
|
||||
<Limb Name="object_box_Standardlimb_006684" Type="Standard" EnumName="OBJECT_BOX_CHEST_LIMB_04" Offset="0x6684" />
|
||||
<Skeleton Name="gBoxChestSkel" Type="Normal" LimbType="Standard" LimbNone="OBJECT_BOX_CHEST_LIMB_NONE" LimbMax="OBJECT_BOX_CHEST_LIMB_MAX" EnumName="object_box_Chest_Limbs" Offset="0x66A0" />
|
||||
<CurveAnimation Name="gBoxLight0CurveAnim" SkelOffset="0x7D78" Offset="0x6A20"/>
|
||||
<CurveAnimation Name="gBoxLight1CurveAnim" SkelOffset="0x7D78" Offset="0x6E30"/>
|
||||
<CurveAnimation Name="gBoxLightAdultCurveAnim" SkelOffset="0x7D78" Offset="0x6A20"/>
|
||||
<CurveAnimation Name="gBoxLightChildCurveAnim" SkelOffset="0x7D78" Offset="0x6E30"/>
|
||||
<Texture Name="gBoxLightTex" OutName="box_light_tex" Format="i8" Width="64" Height="32" Offset="0x6E40" />
|
||||
<DList Name="object_box_DL_007890" Offset="0x7890" />
|
||||
<DList Name="object_box_DL_007978" Offset="0x7978" />
|
||||
@@ -45,9 +45,9 @@
|
||||
<Limb Name="object_box_Curvelimb_007D28" Type="Curve" EnumName="OBJECT_BOX_LIGHT_LIMB_13" Offset="0x7D28" />
|
||||
<Limb Name="object_box_Curvelimb_007D34" Type="Curve" EnumName="OBJECT_BOX_LIGHT_LIMB_14" Offset="0x7D34" />
|
||||
<Skeleton Name="gBoxLightCurveSkel" Type="Curve" LimbType="Curve" LimbNone="OBJECT_BOX_LIGHT_LIMB_NONE" LimbMax="OBJECT_BOX_LIGHT_LIMB_MAX" EnumName="object_box_Light_Limbs" Offset="0x7D78" />
|
||||
<Animation Name="gBoxChestOpenGoronAnim" Offset="0x7E54" />
|
||||
<Animation Name="gBoxChestOpenDekuAnim" Offset="0x7F30" />
|
||||
<!-- <Blob Name="object_box_zeroes_unk_00007F40" Size="0xA0" Offset="0x7F40" /> -->
|
||||
<Animation Name="gBoxBigChestOpenGoronAnim" Offset="0x7E54" />
|
||||
<Animation Name="gBoxBigChestOpenDekuAnim" Offset="0x7F30" />
|
||||
<Blob Name="object_box_zeroes_unk_00007F40" Size="0xA0" Offset="0x7F40" />
|
||||
<Collision Name="gBoxChestCol" Offset="0x80E8" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -48,8 +48,8 @@ const ActorInit Demo_Tre_Lgt_InitVars = {
|
||||
};
|
||||
|
||||
static TransformUpdateIndex* sBoxLightAnimations[] = {
|
||||
&gBoxLight0CurveAnim,
|
||||
&gBoxLight1CurveAnim,
|
||||
&gBoxLightAdultCurveAnim,
|
||||
&gBoxLightChildCurveAnim,
|
||||
};
|
||||
|
||||
static DemoTreLgtActionFunc sActionFuncs[] = {
|
||||
|
||||
@@ -78,9 +78,9 @@ typedef struct {
|
||||
|
||||
static EnBox_PlaybackSpeed sPlaybackSpeed = { { 1.5f, 1.0f, 1.5f, 1.0f, 1.5f } };
|
||||
|
||||
static AnimationHeader* sAnimations[5] = {
|
||||
&gBoxChestOpenAdultAnim, &gBoxChestOpenGoronAnim, &gBoxChestOpenAdultAnim,
|
||||
&gBoxChestOpenDekuAnim, &gBoxChestOpenChildAnim,
|
||||
static AnimationHeader* sBigChestAnimations[5] = {
|
||||
&gBoxBigChestOpenAdultAnim, &gBoxBigChestOpenGoronAnim, &gBoxBigChestOpenAdultAnim,
|
||||
&gBoxBigChestOpenDekuAnim, &gBoxBigChestOpenChildAnim,
|
||||
};
|
||||
|
||||
void EnBox_SetupAction(EnBox* this, EnBoxActionFunc func) {
|
||||
@@ -195,7 +195,7 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
colHeader = NULL;
|
||||
animFrame = 0.0f;
|
||||
animFrameEnd = Animation_GetLastFrame(&object_box_Anim_00043C);
|
||||
animFrameEnd = Animation_GetLastFrame(&gBoxChestOpenAnim);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
CollisionHeader_GetVirtual(&gBoxChestCol, &colHeader);
|
||||
@@ -280,9 +280,9 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->dyna.actor.shape.rot.y += 0x8000;
|
||||
this->dyna.actor.home.rot.z = this->dyna.actor.world.rot.z = this->dyna.actor.shape.rot.z = 0;
|
||||
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &gBoxChestSkel, &object_box_Anim_00043C, this->jointTable,
|
||||
this->morphTable, 5);
|
||||
Animation_Change(&this->skelAnime, &object_box_Anim_00043C, 1.5f, animFrame, animFrameEnd, 2, 0.0f);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &gBoxChestSkel, &gBoxChestOpenAnim, this->jointTable, this->morphTable,
|
||||
5);
|
||||
Animation_Change(&this->skelAnime, &gBoxChestOpenAnim, 1.5f, animFrame, animFrameEnd, 2, 0.0f);
|
||||
if (Actor_IsSmallChest(this)) {
|
||||
Actor_SetScale(&this->dyna.actor, 0.0075f);
|
||||
Actor_SetFocus(&this->dyna.actor, 20.0f);
|
||||
@@ -464,14 +464,14 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_1EC != 0 && (this->cutsceneIdxB < 0 || ActorCutscene_GetCurrentIndex() == this->cutsceneIdxB ||
|
||||
ActorCutscene_GetCurrentIndex() == -1)) {
|
||||
if (this->unk_1EC < 0) {
|
||||
animHeader = &object_box_Anim_00043C;
|
||||
animHeader = &gBoxChestOpenAnim;
|
||||
playbackSpeed = 1.5f;
|
||||
} else {
|
||||
u8 playerForm;
|
||||
|
||||
playbackSpeedTable = sPlaybackSpeed;
|
||||
playerForm = gSaveContext.playerForm;
|
||||
animHeader = sAnimations[playerForm];
|
||||
animHeader = sBigChestAnimations[playerForm];
|
||||
playbackSpeed = playbackSpeedTable.data[playerForm];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user