1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-18 21:10:19 +00:00

Decompile a bunch of objects (#603)

* Mostly done but shifted

* still messed up

* Almost OK

* OBJECT_JYA_OBJ OK, OBJECT_GR OK

* Done

* Merge master and format

* Cleanup

* Cleanup 2

* Start object MB dont merge yet

* Object_MB OK

* Object_ydan_objects OK

* General 'ydan' actor cleanup

* Forgot some small things

* Object_EC OK

* add .gitkeep and run format

* Object_sd OK but no textures cause of a zap issue

* PR fixes

* Fix object_sd

* fix ydan

* delete .gitkeep files

* OBJECT_BOX as far as it can go with current ZAP

* Fix undefined_syms

* Start child link object

* Push progress, dont merge yet

* Object_mori_objects OK

* Fixed?

* Fix conflicts again

* Seems like i missed some textures

* Extract data for BgBombwall

* More field

* ZAP YEP 2.0

* Object_Box OK

* Object_SD ok.  Ready to merge

* remove ASM and merge master

* remove ASM

* remove files wrongfully added to docs/

* Almost done

* Change comment in z_player_lib.c

* forgot some DLists in player_lib.c

* Fix conflict, run format

* Same as before but this time with Tex and TLUT

* Last few things

* fix object_GR and add limbs to object_sd

* Nane -> Name

* gChildDekuShieldMtx is now a matrix and not a blob

* PR fixes (Fig)

* add a space for comment in z_player_lib.c

* re push and new lines

* PR fixes (AngheloAlf)

* PR fixes (Roman)

* Fix Heishi2

* PR fixes (Fig)

* Replace spacing in a file

* PR fixes (Roman)
This commit is contained in:
louist103 2021-05-26 18:59:21 -04:00 committed by GitHub
parent 36fead60a0
commit 201c9ec1cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 1499 additions and 1128 deletions

View file

@ -5,8 +5,9 @@
*/
#include "z_demo_ec.h"
#include "objects/object_zo/object_zo.h"
#include "vt.h"
#include "objects/object_zo/object_zo.h"
#include "objects/object_ec/object_ec.h"
#define FLAGS 0x00000010
@ -91,53 +92,62 @@ static s16 sAnimationObjects[] = {
OBJECT_EC, OBJECT_EC, OBJECT_EC, OBJECT_EC, OBJECT_EC, OBJECT_EC, OBJECT_GM, OBJECT_MA2,
};
// skeletons
// skeletons (all from other objects)
// Object_IN
extern FlexSkeletonHeader D_06013B88;
// Object_TA
extern FlexSkeletonHeader D_0600B7B8;
// Object_FU
extern FlexSkeletonHeader D_06006C90;
// Object_KM1, Object_KW1, Object_BJI, Objct_AHG, Object_BOB, Object_BBA, Object_ANE
extern FlexSkeletonHeader D_060000F0;
// Object_Toryo
extern FlexSkeletonHeader D_06007150;
// Object_Daiku
extern FlexSkeletonHeader D_06007958;
// Object_GE1
extern FlexSkeletonHeader D_06000330;
// Object_ZO
extern FlexSkeletonHeader D_0600BFA8;
// Object_KZ
extern FlexSkeletonHeader D_060086D0;
// Object_MD
extern FlexSkeletonHeader D_06007FB8;
// Object_Niw
extern FlexSkeletonHeader D_06002530;
// Object_DS2
extern FlexSkeletonHeader D_06004258;
// Object_OS
extern FlexSkeletonHeader D_06004658;
// Object_Fish
extern FlexSkeletonHeader D_060085F8;
// Object_RS
extern FlexSkeletonHeader D_06004868;
// Object_OF1D_MAP
extern FlexSkeletonHeader D_0600FEF0;
// Object_MA2
extern FlexSkeletonHeader D_06008D90;
// animations
extern AnimationHeader D_0600BD38;
extern AnimationHeader D_060048F4;
extern AnimationHeader D_0600196C;
extern AnimationHeader D_06005670;
extern AnimationHeader D_06005EA8;
extern AnimationHeader D_0600164C;
extern AnimationHeader D_0600164C;
extern AnimationHeader D_0600513C;
extern AnimationHeader D_06002254;
extern AnimationHeader D_0600C918;
extern AnimationHeader D_06006C40;
extern AnimationHeader D_060095DC;
extern AnimationHeader D_06009BB4;
extern AnimationHeader D_0600A07C;
extern AnimationHeader D_0600A474;
extern AnimationHeader D_06000CD8;
extern AnimationHeader D_0600AFE0;
extern AnimationHeader D_0600AFE0;
extern AnimationHeader D_06002FA0;
extern AnimationHeader D_06003A98;
extern AnimationHeader D_06002FA0;
// animations from other objects
extern AnimationHeader D_060002B8;
extern AnimationHeader D_06009EE0;
extern AnimationHeader D_06006930;
extern AnimationHeader D_06006220;
extern AnimationHeader D_06008D1C;
extern AnimationHeader D_06009234;
extern AnimationHeader D_06009EE0; // Object MA2
extern AnimationHeader D_06004390;
extern AnimationHeader D_060076C0;
extern AnimationHeader D_06005F20;
@ -368,7 +378,7 @@ void DemoEc_InitIngo(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06013B88);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_060048F4, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcIngoAnim, 0, 0.0f, false);
func_8096D64C(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_INGO;
@ -389,7 +399,7 @@ void DemoEc_InitTalon(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_0600B7B8);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600BD38, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcTalonAnim, 0, 0.0f, false);
func_8096D64C(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_TALON;
@ -410,7 +420,7 @@ void DemoEc_InitWindmillMan(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06006C90);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600196C, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcWindmillManAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_WINDMILL_MAN;
@ -431,7 +441,7 @@ void DemoEc_InitKokiriBoy(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005670, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcKokiriAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_KOKIRI_BOY;
@ -442,7 +452,7 @@ void DemoEc_InitDancingKokiriBoy(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600513C, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcDancingKokiriAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_DANCING_KOKIRI_BOY;
@ -470,7 +480,7 @@ void DemoEc_InitKokiriGirl(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005670, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcKokiriAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_KOKIRI_GIRL;
@ -481,7 +491,7 @@ void DemoEc_InitDancingKokiriGirl(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600513C, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcDancingKokiriAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_DANCING_KOKIRI_GIRL;
@ -512,7 +522,7 @@ void DemoEc_InitOldMan(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005EA8, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_OLD_MAN;
@ -540,7 +550,7 @@ void DemoEc_InitBeardedMan(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005EA8, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_BEARDED_MAN;
@ -568,7 +578,7 @@ void DemoEc_InitWoman(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005EA8, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_WOMAN;
@ -594,7 +604,7 @@ void DemoEc_InitOldWoman(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005EA8, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_OLD_WOMAN;
@ -615,7 +625,7 @@ void DemoEc_InitBossCarpenter(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06007150);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600164C, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcCarpenterAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_BOSS_CARPENTER;
@ -636,7 +646,7 @@ void DemoEc_InitCarpenter(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06007958);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600164C, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcCarpenterAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_CARPENTER;
@ -709,7 +719,7 @@ void DemoEc_InitGerudo(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06000330);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06002254, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcGerudoAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_GERUDO;
@ -760,7 +770,7 @@ void DemoEc_InitDancingZora(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &gZoraSkel);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600C918, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcDancingZoraAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_DANCING_ZORA;
@ -786,7 +796,7 @@ void DemoEc_InitKingZora(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060086D0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06006C40, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcKingZoraAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_KING_ZORA;
@ -806,13 +816,13 @@ void func_8096F1D4(DemoEc* this) {
void func_8096F224(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06006930, 2, -8.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcAnim_006930, 2, -8.0f, false);
this->updateMode = EC_UPDATE_17;
}
void func_8096F26C(DemoEc* this, s32 arg1) {
if (arg1 != 0) {
DemoEc_ChangeAnimation(this, &D_06006220, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcAnim_006220, 0, 0.0f, false);
this->updateMode = EC_UPDATE_18;
}
}
@ -871,7 +881,7 @@ void DemoEc_InitMido(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06007FB8);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_060095DC, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcMidoAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_MIDO;
@ -881,13 +891,13 @@ void DemoEc_InitMido(DemoEc* this, GlobalContext* globalCtx) {
void func_8096F4FC(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06008D1C, 2, -8.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcAnim_008D1C, 2, -8.0f, false);
this->updateMode = EC_UPDATE_20;
}
void func_8096F544(DemoEc* this, s32 changeAnim) {
if (changeAnim) {
DemoEc_ChangeAnimation(this, &D_06009234, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcAnim_009234, 0, 0.0f, false);
}
}
@ -940,11 +950,11 @@ void DemoEc_InitCucco(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseAnimationObject(this, globalCtx);
if (this->actor.params == 22) {
animation = &D_06009BB4;
animation = &gDemoEcJumpingCuccoAnim;
} else if (this->actor.params == 23) {
animation = &D_0600A07C;
animation = &gDemoEcJumpingCucco2Anim;
} else {
animation = &D_0600A474;
animation = &gDemoEcWalkingCuccoAnim;
}
DemoEc_ChangeAnimation(this, animation, 0, 0.0f, false);
@ -968,7 +978,7 @@ void DemoEc_InitCuccoLady(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06000CD8, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcCuccoLadyAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_CUCCO_LADY;
@ -994,7 +1004,7 @@ void DemoEc_InitPotionShopOwner(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06004258);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600AFE0, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcPotionShopOwnerAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_POTION_SHOP_OWNER;
@ -1020,7 +1030,7 @@ void DemoEc_InitMaskShopOwner(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06004658);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600AFE0, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcPotionShopOwnerAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_MASK_SHOP_OWNER;
@ -1041,7 +1051,7 @@ void DemoEc_InitFishingMan(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060085F8);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600AFE0, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcPotionShopOwnerAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_FISHING_MAN;
@ -1076,7 +1086,7 @@ void DemoEc_InitBombchuShopOwner(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06004868);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600AFE0, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcPotionShopOwnerAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_BOMBCHU_SHOP_OWNER;
@ -1108,13 +1118,13 @@ void DemoEc_InitGorons(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseAnimationObject(this, globalCtx);
if (this->actor.params == 30) {
animation = &D_06002FA0;
animation = &gDemoEcGoronAnim;
goronScale = 1.0f;
} else if (this->actor.params == 31) {
animation = &D_06003A98;
animation = &gDemoEcGoron2Anim;
goronScale = 1.0f;
} else if (this->actor.params == 32) {
animation = &D_06002FA0;
animation = &gDemoEcGoronAnim;
goronScale = 15.0f;
} else {
goronScale = 5.0f;