mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 06:21:16 +00:00
Objects4 (#1057)
* remove fake match * merge master * animations * dog limbs * textures * KZ limbs and DL * a few KZ textures and make a file for link_boy * the rest of KZ * Far Limb DLs * near DLs and limbs * small fix to child * boots and some sword and more child clean ups * a bunch of DLs * fix boy * fix link child for real this time * adult should be good now * progress * all undefined symbols done * progress * done (for now) * restore makefile * child -> adult * child -> adult * dog fixes * KZ fixes * more player fixes * remove unneeded enum in dog * rename hookshot stuff * Update z_player_lib.c * revert model group stuff * move comment * fix mirror shield upper * remove useless 2 * OOT -> Oot * gauntlet plate 2 fix * fix Co-authored-by: Louis <louist103@pop-os.localdomain>
This commit is contained in:
parent
6213fe3bbd
commit
a862411f00
14 changed files with 622 additions and 343 deletions
|
@ -16,7 +16,7 @@ void EnDog_Draw(Actor* thisx, GlobalContext* globalCtx);
|
|||
|
||||
void EnDog_FollowPath(EnDog* this, GlobalContext* globalCtx);
|
||||
void EnDog_ChooseMovement(EnDog* this, GlobalContext* globalCtx);
|
||||
void EnDog_FollowLink(EnDog* this, GlobalContext* globalCtx);
|
||||
void EnDog_FollowPlayer(EnDog* this, GlobalContext* globalCtx);
|
||||
void EnDog_RunAway(EnDog* this, GlobalContext* globalCtx);
|
||||
void EnDog_FaceLink(EnDog* this, GlobalContext* globalCtx);
|
||||
void EnDog_Wait(EnDog* this, GlobalContext* globalCtx);
|
||||
|
@ -56,14 +56,14 @@ static ColliderCylinderInit sCylinderInit = {
|
|||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, 50 };
|
||||
|
||||
static struct_80034EC0_Entry sAnimations[] = {
|
||||
{ &object_dog_Anim_001368, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_dog_Anim_001368, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -6.0f },
|
||||
{ &object_dog_Anim_000D78, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -6.0f },
|
||||
{ &object_dog_Anim_000278, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -6.0f },
|
||||
{ &object_dog_Anim_001150, 1.0f, 0.0f, 4.0f, ANIMMODE_ONCE, -6.0f },
|
||||
{ &object_dog_Anim_001150, 1.0f, 5.0f, 25.0f, ANIMMODE_LOOP_PARTIAL, -6.0f },
|
||||
{ &object_dog_Anim_000928, 1.0f, 0.0f, 6.0f, ANIMMODE_ONCE, -6.0f },
|
||||
{ &object_dog_Anim_000C28, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -6.0f },
|
||||
{ &gDogWalkAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gDogWalkAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -6.0f },
|
||||
{ &gDogRunAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -6.0f },
|
||||
{ &gDogBarkAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -6.0f },
|
||||
{ &gDogSitAnim, 1.0f, 0.0f, 4.0f, ANIMMODE_ONCE, -6.0f },
|
||||
{ &gDogSitAnim, 1.0f, 5.0f, 25.0f, ANIMMODE_LOOP_PARTIAL, -6.0f },
|
||||
{ &gDogBowAnim, 1.0f, 0.0f, 6.0f, ANIMMODE_ONCE, -6.0f },
|
||||
{ &gDogBow2Anim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -6.0f },
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
@ -77,7 +77,7 @@ typedef enum {
|
|||
} DogBehavior;
|
||||
|
||||
void EnDog_PlayWalkSFX(EnDog* this) {
|
||||
AnimationHeader* walk = &object_dog_Anim_001368;
|
||||
AnimationHeader* walk = &gDogWalkAnim;
|
||||
|
||||
if (this->skelAnime.animation == walk) {
|
||||
if ((this->skelAnime.curFrame == 1.0f) || (this->skelAnime.curFrame == 7.0f)) {
|
||||
|
@ -87,7 +87,7 @@ void EnDog_PlayWalkSFX(EnDog* this) {
|
|||
}
|
||||
|
||||
void EnDog_PlayRunSFX(EnDog* this) {
|
||||
AnimationHeader* run = &object_dog_Anim_000D78;
|
||||
AnimationHeader* run = &gDogRunAnim;
|
||||
|
||||
if (this->skelAnime.animation == run) {
|
||||
if ((this->skelAnime.curFrame == 2.0f) || (this->skelAnime.curFrame == 4.0f)) {
|
||||
|
@ -97,7 +97,7 @@ void EnDog_PlayRunSFX(EnDog* this) {
|
|||
}
|
||||
|
||||
void EnDog_PlayBarkSFX(EnDog* this) {
|
||||
AnimationHeader* bark = &object_dog_Anim_000278;
|
||||
AnimationHeader* bark = &gDogBarkAnim;
|
||||
|
||||
if (this->skelAnime.animation == bark) {
|
||||
if ((this->skelAnime.curFrame == 13.0f) || (this->skelAnime.curFrame == 19.0f)) {
|
||||
|
@ -140,13 +140,13 @@ s32 EnDog_PlayAnimAndSFX(EnDog* this) {
|
|||
|
||||
switch (this->behavior) {
|
||||
case DOG_SIT:
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) != 0) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
func_80034EC0(&this->skelAnime, sAnimations, 5);
|
||||
this->behavior = this->nextBehavior = DOG_SIT_2;
|
||||
}
|
||||
break;
|
||||
case DOG_BOW:
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) != 0) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
func_80034EC0(&this->skelAnime, sAnimations, 7);
|
||||
this->behavior = this->nextBehavior = DOG_BOW_2;
|
||||
}
|
||||
|
@ -159,7 +159,6 @@ s32 EnDog_PlayAnimAndSFX(EnDog* this) {
|
|||
break;
|
||||
case DOG_BARK:
|
||||
EnDog_PlayBarkSFX(this);
|
||||
if (this) {} // needed for regalloc
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
@ -235,8 +234,7 @@ void EnDog_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_dog_Skel_007290, NULL, this->jointTable, this->morphTable,
|
||||
13);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gDogSkel, NULL, this->jointTable, this->morphTable, 13);
|
||||
func_80034EC0(&this->skelAnime, sAnimations, 0);
|
||||
|
||||
if ((this->actor.params & 0x8000) == 0) {
|
||||
|
@ -264,7 +262,7 @@ void EnDog_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case SCENE_IMPA: // Richard's Home
|
||||
if ((u32)(this->actor.params & 0x8000) == 0) {
|
||||
if (!(this->actor.params & 0x8000)) {
|
||||
if (!gSaveContext.dogIsLost) {
|
||||
this->nextBehavior = DOG_SIT;
|
||||
this->actionFunc = EnDog_Wait;
|
||||
|
@ -278,9 +276,9 @@ void EnDog_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
if ((u32)(this->actor.params & 0x8000) != 0) {
|
||||
if (this->actor.params & 0x8000) {
|
||||
this->nextBehavior = DOG_WALK;
|
||||
this->actionFunc = EnDog_FollowLink;
|
||||
this->actionFunc = EnDog_FollowPlayer;
|
||||
} else {
|
||||
this->nextBehavior = DOG_SIT;
|
||||
this->actionFunc = EnDog_ChooseMovement;
|
||||
|
@ -299,7 +297,7 @@ void EnDog_FollowPath(EnDog* this, GlobalContext* globalCtx) {
|
|||
s32 frame;
|
||||
|
||||
if (EnDog_CanFollow(this, globalCtx) == 1) {
|
||||
this->actionFunc = EnDog_FollowLink;
|
||||
this->actionFunc = EnDog_FollowPlayer;
|
||||
}
|
||||
|
||||
if (DECR(this->behaviorTimer) != 0) {
|
||||
|
@ -332,7 +330,7 @@ void EnDog_FollowPath(EnDog* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnDog_ChooseMovement(EnDog* this, GlobalContext* globalCtx) {
|
||||
if (EnDog_CanFollow(this, globalCtx) == 1) {
|
||||
this->actionFunc = EnDog_FollowLink;
|
||||
this->actionFunc = EnDog_FollowPlayer;
|
||||
}
|
||||
|
||||
if (DECR(this->behaviorTimer) == 0) {
|
||||
|
@ -351,7 +349,7 @@ void EnDog_ChooseMovement(EnDog* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.4f, 1.0f, 0.0f);
|
||||
}
|
||||
|
||||
void EnDog_FollowLink(EnDog* this, GlobalContext* globalCtx) {
|
||||
void EnDog_FollowPlayer(EnDog* this, GlobalContext* globalCtx) {
|
||||
f32 speed;
|
||||
|
||||
if (gSaveContext.dogParams == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue