mirror of https://github.com/zeldaret/mm.git
Ds2n: OK (unused potion shop man from OoT) (#858)
* Ds2n: OK * Ds2n: requested changes * EnDs2n: GlobalCtx is dead * Ds2n: formater pls * Update src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.h Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.h Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Ds2n: more limbs named * Ds2n: right, formatter for longer limb names * EnDs2: moved comment back... did git merge the wrong way? * Ds2n: broken anim is clearly wrong, its something else * Ds2n: almost mappeded entire blob * Ds2n: found another texture Co-authored-by: Isghj8 <isghj8@gmail.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
parent
6052230233
commit
ea42d8d118
|
|
@ -1,55 +1,93 @@
|
|||
<Root>
|
||||
<!-- Unused Potion Shop Seller from OoT, in that game (Ossan -> object_ds2) -->
|
||||
<File Name="object_ds2n" Segment="6">
|
||||
<DList Name="object_ds2n_DL_002420" Offset="0x2420" />
|
||||
<DList Name="object_ds2n_DL_002740" Offset="0x2740" />
|
||||
<DList Name="object_ds2n_DL_002C20" Offset="0x2C20" />
|
||||
<DList Name="object_ds2n_DL_002D38" Offset="0x2D38" />
|
||||
<DList Name="object_ds2n_DL_002F68" Offset="0x2F68" />
|
||||
<DList Name="object_ds2n_DL_0030E0" Offset="0x30E0" />
|
||||
<DList Name="object_ds2n_DL_0031F8" Offset="0x31F8" />
|
||||
<DList Name="object_ds2n_DL_0033B0" Offset="0x33B0" />
|
||||
<DList Name="object_ds2n_DL_003528" Offset="0x3528" />
|
||||
<DList Name="object_ds2n_DL_0035F0" Offset="0x35F0" />
|
||||
<DList Name="object_ds2n_DL_0036D0" Offset="0x36D0" />
|
||||
<DList Name="object_ds2n_DL_0037A8" Offset="0x37A8" />
|
||||
<DList Name="object_ds2n_DL_003988" Offset="0x3988" />
|
||||
<DList Name="object_ds2n_DL_003A68" Offset="0x3A68" />
|
||||
<DList Name="object_ds2n_DL_003B40" Offset="0x3B40" />
|
||||
<Texture Name="object_ds2n_TLUT_003CD8" OutName="tlut_003CD8" Format="rgba16" Width="16" Height="16" Offset="0x3CD8" />
|
||||
<Texture Name="object_ds2n_TLUT_003ED8" OutName="tlut_003ED8" Format="rgba16" Width="16" Height="16" Offset="0x3ED8" />
|
||||
<Texture Name="object_ds2n_Tex_0040D8" OutName="tex_0040D8" Format="rgba16" Width="16" Height="16" Offset="0x40D8" />
|
||||
<Texture Name="object_ds2n_Tex_0042D8" OutName="tex_0042D8" Format="rgba16" Width="16" Height="16" Offset="0x42D8" />
|
||||
<Texture Name="object_ds2n_Tex_0044D8" OutName="tex_0044D8" Format="rgba16" Width="16" Height="32" Offset="0x44D8" />
|
||||
<!-- <Blob Name="object_ds2n_Blob_0048D8" Size="0xC00" Offset="0x48D8" /> -->
|
||||
<Texture Name="object_ds2n_Tex_0054D8" OutName="tex_0054D8" Format="ci8" Width="16" Height="16" Offset="0x54D8" />
|
||||
<Texture Name="object_ds2n_Tex_0055D8" OutName="tex_0055D8" Format="ci8" Width="8" Height="8" Offset="0x55D8" />
|
||||
<Texture Name="object_ds2n_Tex_005618" OutName="tex_005618" Format="rgba16" Width="16" Height="16" Offset="0x5618" />
|
||||
<Texture Name="object_ds2n_Tex_005818" OutName="tex_005818" Format="ci8" Width="16" Height="16" Offset="0x5818" />
|
||||
<Texture Name="object_ds2n_Tex_005918" OutName="tex_005918" Format="ci8" Width="16" Height="32" Offset="0x5918" />
|
||||
<Texture Name="object_ds2n_Tex_005B18" OutName="tex_005B18" Format="rgba16" Width="16" Height="16" Offset="0x5B18" />
|
||||
<Texture Name="object_ds2n_Tex_005D18" OutName="tex_005D18" Format="ci8" Width="16" Height="16" Offset="0x5D18" />
|
||||
<!-- <Blob Name="object_ds2n_Blob_005E18" Size="0x400" Offset="0x5E18" /> -->
|
||||
<Texture Name="object_ds2n_Tex_006218" OutName="tex_006218" Format="ci8" Width="32" Height="16" Offset="0x6218" />
|
||||
<!-- <Blob Name="object_ds2n_Blob_006418" Size="0x1B78" Offset="0x6418" /> -->
|
||||
<Limb Name="object_ds2n_Standardlimb_008050" Type="Standard" EnumName="OBJECT_DS2N_LIMB_01" Offset="0x8050" />
|
||||
<Limb Name="object_ds2n_Standardlimb_00805C" Type="Standard" EnumName="OBJECT_DS2N_LIMB_02" Offset="0x805C" />
|
||||
<Limb Name="object_ds2n_Standardlimb_008068" Type="Standard" EnumName="OBJECT_DS2N_LIMB_03" Offset="0x8068" />
|
||||
<Limb Name="object_ds2n_Standardlimb_008074" Type="Standard" EnumName="OBJECT_DS2N_LIMB_04" Offset="0x8074" />
|
||||
<Limb Name="object_ds2n_Standardlimb_008080" Type="Standard" EnumName="OBJECT_DS2N_LIMB_05" Offset="0x8080" />
|
||||
<Limb Name="object_ds2n_Standardlimb_00808C" Type="Standard" EnumName="OBJECT_DS2N_LIMB_06" Offset="0x808C" />
|
||||
<Limb Name="object_ds2n_Standardlimb_008098" Type="Standard" EnumName="OBJECT_DS2N_LIMB_07" Offset="0x8098" />
|
||||
<Limb Name="object_ds2n_Standardlimb_0080A4" Type="Standard" EnumName="OBJECT_DS2N_LIMB_08" Offset="0x80A4" />
|
||||
<Limb Name="object_ds2n_Standardlimb_0080B0" Type="Standard" EnumName="OBJECT_DS2N_LIMB_09" Offset="0x80B0" />
|
||||
<Limb Name="object_ds2n_Standardlimb_0080BC" Type="Standard" EnumName="OBJECT_DS2N_LIMB_0A" Offset="0x80BC" />
|
||||
<Limb Name="object_ds2n_Standardlimb_0080C8" Type="Standard" EnumName="OBJECT_DS2N_LIMB_0B" Offset="0x80C8" />
|
||||
<Limb Name="object_ds2n_Standardlimb_0080D4" Type="Standard" EnumName="OBJECT_DS2N_LIMB_0C" Offset="0x80D4" />
|
||||
<Limb Name="object_ds2n_Standardlimb_0080E0" Type="Standard" EnumName="OBJECT_DS2N_LIMB_0D" Offset="0x80E0" />
|
||||
<Limb Name="object_ds2n_Standardlimb_0080EC" Type="Standard" EnumName="OBJECT_DS2N_LIMB_0E" Offset="0x80EC" />
|
||||
<Limb Name="object_ds2n_Standardlimb_0080F8" Type="Standard" EnumName="OBJECT_DS2N_LIMB_0F" Offset="0x80F8" />
|
||||
<Limb Name="object_ds2n_Standardlimb_008104" Type="Standard" EnumName="OBJECT_DS2N_LIMB_10" Offset="0x8104" />
|
||||
<Limb Name="object_ds2n_Standardlimb_008110" Type="Standard" EnumName="OBJECT_DS2N_LIMB_11" Offset="0x8110" />
|
||||
<Limb Name="object_ds2n_Standardlimb_00811C" Type="Standard" EnumName="OBJECT_DS2N_LIMB_12" Offset="0x811C" />
|
||||
<Skeleton Name="object_ds2n_Skel_008170" Type="Normal" LimbType="Standard" LimbNone="OBJECT_DS2N_LIMB_NONE" LimbMax="OBJECT_DS2N_LIMB_MAX" EnumName="object_ds2n_Limbs" Offset="0x8170" />
|
||||
<!-- <Blob Name="object_ds2n_Blob_008178" Size="0x8" Offset="0x8178" /> -->
|
||||
<!-- [object_ds2] still exists as a copy from OoT in MM, but unused, this has a different skeleton with legs -->
|
||||
<!-- Difficult to document, might have made mistakes -->
|
||||
|
||||
<DList Name="gDs2nTorsoDL" Offset="0x2420" />
|
||||
<DList Name="gDs2nHeadDL" Offset="0x2740" />
|
||||
<DList Name="gDs2nRightUpperArmDL" Offset="0x2C20" />
|
||||
<DList Name="gDs2nRightForarmDL" Offset="0x2D38" />
|
||||
<DList Name="gDs2nRightHandDL" Offset="0x2F68" />
|
||||
<DList Name="gDs2nLeftUpperArmDL" Offset="0x30E0" />
|
||||
<DList Name="gDs2nLeftForarmDL" Offset="0x31F8" />
|
||||
<DList Name="gDs2nLeftHandDL" Offset="0x33B0" />
|
||||
<DList Name="gDs2nHipsDL" Offset="0x3528" />
|
||||
<DList Name="gDs2nRightThighDL" Offset="0x35F0" />
|
||||
<DList Name="gDs2nRightCalfDL" Offset="0x36D0" />
|
||||
<DList Name="gDs2nRightFootDL" Offset="0x37A8" />
|
||||
<DList Name="gDs2nLeftThighDL" Offset="0x3988" />
|
||||
<DList Name="gDs2nLeftCalfDL" Offset="0x3A68" />
|
||||
<DList Name="gDs2nLeftFootDL" Offset="0x3B40" />
|
||||
|
||||
<Texture Name="gDs2nMainTlut" OutName="tlut_main" Format="rgba16" Width="16" Height="16" Offset="0x3CD8" />
|
||||
<Texture Name="gDs2nFingersTlut" OutName="tlut_fingers" Format="rgba16" Width="16" Height="16" Offset="0x3ED8" />
|
||||
<Texture Name="gDs2nEyesTlut" OutName="tlut_eyes" Format="rgba16" Width="16" Height="16" Offset="0x40D8" />
|
||||
<Texture Name="gDs2nPantsAndShirtBottomTex" OutName="pants_and_shirt_bottom" Format="rgba16" Width="16" Height="16" Offset="0x42D8" />
|
||||
<Texture Name="gDs2nShoesTex" OutName="shoes" Format="rgba16" Width="16" Height="32" Offset="0x44D8" />
|
||||
|
||||
<!-- Unused Belt/Tie Texture, kinda looks like a Karate belt. -->
|
||||
<Texture Name="gDs2nBeltTieTex" OutName="belt_tie" Format="ci8" Width="32" Height="32" Offset="0x48D8" TlutOffset="0x3CD8"/>
|
||||
|
||||
<!-- These two eye textures are corrupted, they extract and draw broken in-game.
|
||||
The half tex: the blue iris is olive greenish and whites of the eyes are blended blue, with scatter of random pixels.
|
||||
The closed has an extra dot of black in the center of the eye lid. -->
|
||||
<Texture Name="gDs2nEyeHalfTex" OutName="eye_half" Format="ci8" Width="32" Height="32" Offset="0x4CD8" TlutOffset="0x40D8"/>
|
||||
<Texture Name="gDs2nEyeClosedTex" OutName="eye_closed" Format="ci8" Width="32" Height="32" Offset="0x50D8" TlutOffset="0x40D8"/>
|
||||
|
||||
<Texture Name="gDs2nFingersTex" OutName="fingers" Format="ci8" Width="16" Height="16" Offset="0x54D8" TlutOffset="0x3ED8" />
|
||||
<Texture Name="gDs2nSkinGradientTex" OutName="skin_gradient" Format="ci8" Width="8" Height="8" Offset="0x55D8" />
|
||||
<Texture Name="gDs2nHairTex" OutName="hair" Format="rgba16" Width="16" Height="16" Offset="0x5618" />
|
||||
<Texture Name="gDs2nHairlineTex" OutName="hairline" Format="ci8" Width="16" Height="16" Offset="0x5818" />
|
||||
<Texture Name="gDs2nShirtButtonsTex" OutName="shirt_buttons" Format="ci8" Width="16" Height="32" Offset="0x5918" />
|
||||
<Texture Name="gDs2nVestTex" OutName="vest" Format="rgba16" Width="16" Height="16" Offset="0x5B18" />
|
||||
<Texture Name="gDs2nShirtTex" OutName="shirt" Format="ci8" Width="16" Height="16" Offset="0x5D18" />
|
||||
<Texture Name="gDs2nEyeOpenTex" OutName="eye_open" Format="ci8" Width="32" Height="32" Offset="0x5E18" TlutOffset="0x40D8" />
|
||||
|
||||
<Texture Name="gDs2nMouthOpenTex" OutName="mouth_open" Format="ci8" Width="32" Height="16" Offset="0x6218" TlutOffset="0x3CD8" />
|
||||
|
||||
<!-- 6418 -> 6450: unknown small data -->
|
||||
|
||||
<!-- Unused and unreferenced. Exact copies of the above used textures. -->
|
||||
<Texture Name="gDs2nMain2Tlut" OutName="tlut_main2" Format="rgba16" Width="16" Height="16" Offset="0x6450" />
|
||||
<Texture Name="gDs2nFingers2Tlut" OutName="tlut_fingers2" Format="rgba16" Width="16" Height="16" Offset="0x6650" />
|
||||
<Texture Name="gDs2nEyes2Tlut" OutName="tlut_eyes2" Format="rgba16" Width="16" Height="16" Offset="0x6850" />
|
||||
<Texture Name="gDs2nPantsAndShirtBottom2Tex" OutName="pants_and_shirt_bottom2" Format="rgba16" Width="16" Height="16" Offset="0x6A50" />
|
||||
<Texture Name="gDs2nShoes2Tex" OutName="shoes2" Format="rgba16" Width="16" Height="32" Offset="0x6C50" />
|
||||
<Texture Name="gDs2nFingers2Tex" OutName="fingers2" Format="ci8" Width="16" Height="16" Offset="0x7050" TlutOffset="0x6650" />
|
||||
<Texture Name="gDs2nSkinGradient2Tex" OutName="skin_gradient2" Format="ci8" Width="8" Height="8" Offset="0x7150" TlutOffset="0x6450"/>
|
||||
<Texture Name="gDs2nHair2Tex" OutName="hair2" Format="rgba16" Width="16" Height="16" Offset="0x7190" />
|
||||
<Texture Name="gDs2nHairline2Tex" OutName="hairline2" Format="ci8" Width="16" Height="16" Offset="0x7390" TlutOffset="0x6450"/>
|
||||
<Texture Name="gDs2nShirtButtons2Tex" OutName="shirt_buttons2" Format="ci8" Width="16" Height="32" Offset="0x7490" TlutOffset="0x6450"/>
|
||||
<Texture Name="gDs2nVest2Tex" OutName="vest2" Format="rgba16" Width="16" Height="16" Offset="0x7690" />
|
||||
<Texture Name="gDs2nShirt2Tex" OutName="shirt2" Format="ci8" Width="16" Height="16" Offset="0x7890" TlutOffset="0x6450" />
|
||||
|
||||
<Texture Name="gDs2nEyeOpen2Tex" OutName="eye_open2" Format="ci8" Width="32" Height="32" Offset="0x7990" TlutOffset="0x6850" />
|
||||
<Texture Name="gDs2nMouthOpen2Tex" OutName="mouth_open2" Format="ci8" Width="32" Height="16" Offset="0x7D90" TlutOffset="0x6450" />
|
||||
|
||||
<Animation Name="gDs2nIdleAnim" Offset="0x8038" />
|
||||
|
||||
<!-- z64Utils cannot render this skeleton, no idea what the three limbs with no DL are for, our actor doesnt use them -->
|
||||
<Limb Name="gDs2nHipsLimb" Type="Standard" EnumName="DS2N_LIMB_HIPS" Offset="0x8050" />
|
||||
<Limb Name="gDs2nLeftThighLimb" Type="Standard" EnumName="DS2N_LIMB_LEFT_THIGH" Offset="0x805C" />
|
||||
<Limb Name="gDs2nLeftCalfLimb" Type="Standard" EnumName="DS2N_LIMB_LEFT_CALF" Offset="0x8068" />
|
||||
<Limb Name="gDs2nLeftFootLimb" Type="Standard" EnumName="DS2N_LIMB_LEFT_FOOT" Offset="0x8074" />
|
||||
<Limb Name="gDs2nRightThighLimb" Type="Standard" EnumName="DS2N_LIMB_RIGHT_THIGH" Offset="0x8080" />
|
||||
<Limb Name="gDs2nRightCalfLimb" Type="Standard" EnumName="DS2N_LIMB_RIGHT_CALF" Offset="0x808C" />
|
||||
<Limb Name="gDs2nRightFootLimb" Type="Standard" EnumName="DS2N_LIMB_RIGHT_FOOT" Offset="0x8098" />
|
||||
<Limb Name="gDs2nLimb_008098" Type="Standard" EnumName="DS2N_LIMB_08" Offset="0x80A4" /> <!-- these three have no DL -->
|
||||
<Limb Name="gDs2nLimb_0080B0" Type="Standard" EnumName="DS2N_LIMB_09" Offset="0x80B0" />
|
||||
<Limb Name="gDs2nLimb_0080BC" Type="Standard" EnumName="DS2N_LIMB_0A" Offset="0x80BC" />
|
||||
<Limb Name="gDs2nTorsoLimb" Type="Standard" EnumName="DS2N_LIMB_TORSO" Offset="0x80C8" />
|
||||
<Limb Name="gDs2nLeftUpperArmLimb" Type="Standard" EnumName="DS2N_LIMB_LEFT_UPPER_ARM" Offset="0x80D4" />
|
||||
<Limb Name="gDs2nLeftForarmLimb" Type="Standard" EnumName="DS2N_LIMB_LEFT_FORARM" Offset="0x80E0" />
|
||||
<Limb Name="gDs2nLeftHandLimb" Type="Standard" EnumName="DS2N_LIMB_LEFT_HAND" Offset="0x80EC" />
|
||||
<Limb Name="gDs2nRightUpperArmLimb" Type="Standard" EnumName="DS2N_LIMB_RIGHT_UPPER_ARM" Offset="0x80F8" />
|
||||
<Limb Name="gDs2nRightForarmLimb" Type="Standard" EnumName="DS2N_LIMB_RIGHT_FORARM" Offset="0x8104" />
|
||||
<Limb Name="gDs2nRightHandLimb" Type="Standard" EnumName="DS2N_LIMB_RIGHT_HAND" Offset="0x8110" />
|
||||
<Limb Name="gDs2nHeadLimb" Type="Standard" EnumName="DS2N_LIMB_HEAD" Offset="0x811C" />
|
||||
<Skeleton Name="gDs2nSkeleton" Type="Flex" LimbType="Standard" LimbNone="DS2N_LIMB_NONE" LimbMax="DS2N_LIMB_MAX" EnumName="Ds2nLimbs" Offset="0x8170" />
|
||||
|
||||
<!-- 8 bytes: 0x11 followed by zeros <Blob Name="gDs2n_Blob_008178" Size="0x8" Offset="0x8178" /> -->
|
||||
</File>
|
||||
</Root>
|
||||
|
|
|
|||
3
spec
3
spec
|
|
@ -3531,8 +3531,7 @@ beginseg
|
|||
name "ovl_En_Ds2n"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.o"
|
||||
include "build/data/ovl_En_Ds2n/ovl_En_Ds2n.data.o"
|
||||
include "build/data/ovl_En_Ds2n/ovl_En_Ds2n.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Ds2n/ovl_En_Ds2n_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
* File: z_en_ds2n.c
|
||||
* Overlay: ovl_En_Ds2n
|
||||
* Description: Potion Shop Owner from OoT (unused)
|
||||
*
|
||||
* This actor was placed in the Staff Office of Stockpot inn
|
||||
* but does not spawn because their object is missing.
|
||||
*/
|
||||
|
||||
#include "z_en_ds2n.h"
|
||||
|
|
@ -15,7 +18,8 @@ void EnDs2n_Destroy(Actor* thisx, PlayState* play);
|
|||
void EnDs2n_Update(Actor* thisx, PlayState* play);
|
||||
void EnDs2n_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
#if 0
|
||||
void EnDs2n_Idle(EnDs2n* this, PlayState* play);
|
||||
|
||||
const ActorInit En_Ds2n_InitVars = {
|
||||
ACTOR_EN_DS2N,
|
||||
ACTORCAT_NPC,
|
||||
|
|
@ -28,24 +32,102 @@ const ActorInit En_Ds2n_InitVars = {
|
|||
(ActorFunc)EnDs2n_Draw,
|
||||
};
|
||||
|
||||
#endif
|
||||
static AnimationInfo sAnimations[] = {
|
||||
{ &gDs2nIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06008038;
|
||||
static Vec3f sZeroVec = { 0, 0, 0 };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ds2n/func_80AE1650.s")
|
||||
static TexturePtr sEyeTextures[] = { gDs2nEyeOpenTex, gDs2nEyeHalfTex, gDs2nEyeClosedTex };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ds2n/func_80AE16A0.s")
|
||||
void EnDs2n_SetupIdle(EnDs2n* this) {
|
||||
this->blinkTimer = 20;
|
||||
this->blinkState = 0;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0);
|
||||
this->actionFunc = EnDs2n_Idle;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ds2n/func_80AE16D8.s")
|
||||
void EnDs2n_Idle(EnDs2n* this, PlayState* play) {
|
||||
SubS_FillLimbRotTables(play, this->limbRotTableY, this->limbRotTableZ, DS2N_LIMB_MAX);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ds2n/EnDs2n_Init.s")
|
||||
void EnDs2n_UpdateEyes(EnDs2n* this) {
|
||||
s16 nextBlinkTime = this->blinkTimer - 1;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ds2n/EnDs2n_Destroy.s")
|
||||
if (nextBlinkTime >= 3) {
|
||||
this->blinkState = 0;
|
||||
this->blinkTimer = nextBlinkTime;
|
||||
} else if (nextBlinkTime == 0) {
|
||||
this->blinkState = 2;
|
||||
this->blinkTimer = (s32)(Rand_ZeroOne() * 60.0f) + 20;
|
||||
} else {
|
||||
this->blinkState = 1;
|
||||
this->blinkTimer = nextBlinkTime;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ds2n/EnDs2n_Update.s")
|
||||
void EnDs2n_Init(Actor* thisx, PlayState* play) {
|
||||
EnDs2n* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ds2n/func_80AE1874.s")
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gDs2nSkeleton, &gDs2nIdleAnim, NULL, NULL, 0);
|
||||
EnDs2n_SetupIdle(this);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ds2n/func_80AE18B4.s")
|
||||
void EnDs2n_Destroy(Actor* thisx, PlayState* play) {
|
||||
EnDs2n* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ds2n/EnDs2n_Draw.s")
|
||||
SkelAnime_Free(&this->skelAnime, play);
|
||||
}
|
||||
|
||||
void EnDs2n_Update(Actor* thisx, PlayState* play) {
|
||||
EnDs2n* this = THIS;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->chestRot, this->actor.focus.pos);
|
||||
EnDs2n_UpdateEyes(this);
|
||||
}
|
||||
|
||||
s32 EnDs2n_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnDs2n* this = THIS;
|
||||
|
||||
if (limbIndex == DS2N_LIMB_HEAD) {
|
||||
Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnDs2n_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
EnDs2n* this = THIS;
|
||||
Vec3f focusOffset = sZeroVec;
|
||||
|
||||
if ((limbIndex == DS2N_LIMB_HIPS) || (limbIndex == DS2N_LIMB_LEFT_UPPER_ARM) ||
|
||||
(limbIndex == DS2N_LIMB_RIGHT_UPPER_ARM)) {
|
||||
rot->y += (s16)Math_SinS(this->limbRotTableY[limbIndex]) * 0xC8;
|
||||
rot->z += (s16)Math_CosS(this->limbRotTableZ[limbIndex]) * 0xC8;
|
||||
}
|
||||
|
||||
if (limbIndex == DS2N_LIMB_HEAD) {
|
||||
Matrix_MultVec3f(&focusOffset, &thisx->focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
void EnDs2n_Draw(Actor* thisx, PlayState* play) {
|
||||
EnDs2n* this = THIS;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
func_8012C5B0(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sEyeTextures[this->blinkState]));
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(sEyeTextures[this->blinkState]));
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnDs2n_OverrideLimbDraw, EnDs2n_PostLimbDraw, &this->actor);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,16 +2,24 @@
|
|||
#define Z_EN_DS2N_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_ds2n/object_ds2n.h"
|
||||
|
||||
struct EnDs2n;
|
||||
|
||||
typedef void (*EnDs2nActionFunc)(struct EnDs2n*, PlayState*);
|
||||
|
||||
typedef struct EnDs2n {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ char unk_144[0x90];
|
||||
/* 0x01D4 */ EnDs2nActionFunc actionFunc;
|
||||
/* 0x01D8 */ char unk_1D8[0x5C];
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ ColliderCylinder collider; // unused
|
||||
/* 0x190 */ SkelAnime skelAnime;
|
||||
/* 0x1D4 */ EnDs2nActionFunc actionFunc;
|
||||
/* 0x1D8 */ s16 limbRotTableY[DS2N_LIMB_MAX];
|
||||
/* 0x1FE */ s16 limbRotTableZ[DS2N_LIMB_MAX];
|
||||
/* 0x224 */ Vec3s headRot;
|
||||
/* 0x22A */ Vec3s chestRot; // set by function, but not applied in limbdraw
|
||||
/* 0x230 */ s16 blinkState;
|
||||
/* 0x232 */ s16 blinkTimer;
|
||||
|
||||
} EnDs2n; // size = 0x234
|
||||
|
||||
extern const ActorInit En_Ds2n_InitVars;
|
||||
|
|
|
|||
|
|
@ -12387,14 +12387,14 @@
|
|||
0x80AE0FA8:("EnTsn_OverrideLimbDraw",),
|
||||
0x80AE1024:("EnTsn_PostLimbDraw",),
|
||||
0x80AE1080:("EnTsn_Draw",),
|
||||
0x80AE1650:("func_80AE1650",),
|
||||
0x80AE16A0:("func_80AE16A0",),
|
||||
0x80AE16D8:("func_80AE16D8",),
|
||||
0x80AE1650:("EnDs2n_SetupIdle",),
|
||||
0x80AE16A0:("EnDs2n_Idle",),
|
||||
0x80AE16D8:("EnDs2n_UpdateEyes",),
|
||||
0x80AE1760:("EnDs2n_Init",),
|
||||
0x80AE17D0:("EnDs2n_Destroy",),
|
||||
0x80AE17F4:("EnDs2n_Update",),
|
||||
0x80AE1874:("func_80AE1874",),
|
||||
0x80AE18B4:("func_80AE18B4",),
|
||||
0x80AE1874:("EnDs2n_OverrideLimbDraw",),
|
||||
0x80AE18B4:("EnDs2n_PostLimbDraw",),
|
||||
0x80AE19B8:("EnDs2n_Draw",),
|
||||
0x80AE1B70:("EnFsn_TestItemSelected",),
|
||||
0x80AE1BF0:("EnFsn_GetWelcome",),
|
||||
|
|
|
|||
Loading…
Reference in New Issue