1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-20 14:01:15 +00:00
* 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:
louist103 2021-12-27 08:08:26 -05:00 committed by GitHub
parent 6213fe3bbd
commit a862411f00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 622 additions and 343 deletions

View file

@ -1,4 +1,5 @@
#include "z_arms_hook.h"
#include "objects/object_link_boy/object_link_boy.h"
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
@ -57,9 +58,6 @@ static Vec3f D_80865B94 = { 0.0f, -500.0f, -3000.0f };
static Vec3f D_80865BA0 = { 0.0f, 500.0f, 1200.0f };
static Vec3f D_80865BAC = { 0.0f, -500.0f, 1200.0f };
extern Gfx D_0602B288[];
extern Gfx D_0602AFF0[];
void ArmsHook_SetupAction(ArmsHook* this, ArmsHookActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
@ -324,7 +322,7 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_0602B288);
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultHookshotTipDL);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
Math_Vec3f_Diff(&player->unk_3C8, &this->actor.world.pos, &sp78);
sp58 = SQ(sp78.x) + SQ(sp78.z);
@ -334,7 +332,7 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Scale(0.015f, 0.015f, sqrtf(SQ(sp78.y) + sp58) * 0.01f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_0602AFF0);
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultHookshotChainDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 913);
}

View file

@ -774,7 +774,7 @@ void DemoEc_DrawDancingZora(DemoEc* this, GlobalContext* globalCtx) {
void DemoEc_InitKingZora(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &object_kz_Skel_0086D0);
DemoEc_InitSkelAnime(this, globalCtx, &gKzSkel);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &gDemoEcKingZoraAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
@ -850,7 +850,7 @@ void func_8096F3D4(DemoEc* this, GlobalContext* globalCtx) {
}
void DemoEc_DrawKingZora(DemoEc* this, GlobalContext* globalCtx) {
static void* eyeTextures[] = { 0x06001470, 0x06001870, 0x06001C70, 0x06002070 };
static void* eyeTextures[] = { gKzEyeOpenTex, gKzEyeHalfTex, gKzEyeClosedTex, gKzEyeOpen2Tex };
s32 eyeTexIndex = this->eyeTexIndex;
void* eyeTexture = eyeTextures[eyeTexIndex];

View file

@ -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) {

View file

@ -57,9 +57,9 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
static struct_80034EC0_Entry sAnimations[] = {
{ &object_kz_Anim_00075C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
{ &object_kz_Anim_00075C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
{ &object_kz_Anim_00046C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
{ &gKzIdleAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
{ &gKzIdleAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
{ &gKzMweepAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
};
u16 EnKz_GetTextNoMaskChild(GlobalContext* globalCtx, EnKz* this) {
@ -313,7 +313,7 @@ void EnKz_Init(Actor* thisx, GlobalContext* globalCtx) {
EnKz* this = (EnKz*)thisx;
s32 pad;
SkelAnime_InitFlex(globalCtx, &this->skelanime, &object_kz_Skel_0086D0, NULL, this->jointTable, this->morphTable,
SkelAnime_InitFlex(globalCtx, &this->skelanime, &gKzSkel, NULL, this->jointTable, this->morphTable,
12);
ActorShape_Init(&this->actor.shape, 0.0, NULL, 0.0);
Collider_InitCylinder(globalCtx, &this->collider);
@ -484,9 +484,9 @@ void EnKz_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
void EnKz_Draw(Actor* thisx, GlobalContext* globalCtx) {
static void* sEyeSegments[] = {
object_kz_Tex_001470,
object_kz_Tex_001870,
object_kz_Tex_001C70,
gKzEyeOpenTex,
gKzEyeHalfTex,
gKzEyeClosedTex,
};
EnKz* this = (EnKz*)thisx;

View file

@ -9024,7 +9024,6 @@ void Player_InitCommon(Player* this, GlobalContext* globalCtx, FlexSkeletonHeade
Effect_Add(globalCtx, &this->swordEffectIndex, EFFECT_BLURE2, 0, 0, &D_8085470C);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFeet, this->ageProperties->unk_04);
this->unk_46C = SUBCAM_NONE;
Collider_InitCylinder(globalCtx, &this->cylinder);
Collider_SetCylinder(globalCtx, &this->cylinder, &this->actor, &D_80854624);
Collider_InitQuad(globalCtx, &this->swordQuads[0]);