1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 22:41:14 +00:00

Decompiled A LOT of objects (#815)

* .

* remove tools/ZAP2 from origin master

* object_spot04_objects

* remove accidentally added xml

* object_spot00_objects

* object_bombf ok

* object_dy_obj

* object_masterzoora

* object_mastergolon and object_masterkokirihead

* object_aob

* object_gt

* object_gt

* object_geff

* object_mag kinda

* object_gjyo_objects OK

* object_ani OK

* object_door_gerudo

* object_md and object_trap

* object_js OK

* object_goroiwa

* object_gs

* object_nwc

* object_niw

* object_ane

* object_os_anime OK

* object_d_hsblock OK

* object_fz OK

* object_ru2 OK

* fixed object_mag

* object_cow OK

* object_spot01_objects OK

* object_spot15_obj

* object_umajump OK

* object_spot18_obj

* object_spot12_obj

* fix symbols in z_item_b_heart

* object_bdan_objects & object_bowl

* object_ddan_objects

* object_owl OK

* object_spot01_matoyab.xml OK

* object_haka OK

* object_heavy_object

* object_ingate and objet_menkuri_objects

* objet_spot00_break & object_relay_objects OK

* object_spot01_matoya OK

* object_spot06_objects OK

* undefined_syms

* object_spot08_obj OK

* object_efc_doughnut & object_zg

* object_ik OK

* object_vm

* object_ei OK

* object_ds OK

* updated spec

* map_48x85_static OK

* object_zl1 & object_peehat ok

* some z_parameter naming and other undefined symbol stuff, object_yukabyun OK

* object_bubble & object_fw ok

* object_shopnuts

* restore delete file

* object_timeblock OK

* object_d_lift OK

* object_kibako2 OK

* object_mamenoki OK

* matches

* remove unused asm

* object_mag ok now

* fixed object_ani

* done for now, im tired

* object_bdan_objects fixed up

* fix bdan

* object_bombf fixed

* object_bowl fixed up

* object_cow fixed

* did more, im tired

* fixed some stuff in object_ddan_objects

* fix object_ddan_object

* object_door_gerudo fixed

* object_ds fix

* object_dy progress

* fixed great fairy

* some more

* more

* object_haka fix

* progress

* ingo_gate fixed

* object_js

* forgot collision

* object_relay_objects fixed

* object_kibako2

* object_mag fixed

* u64* to void*

* more u64* to void*

* object_mamenoki fix

* object_mastergolon & object_masterkokirihead fix

* mido is weird

* fixed build

* fix object_menkuri_objects

* add missing textures in object_menkuri_objects

* object_ms

* fixed object_peehat

* some cleanup stuff

* object_zg fix

* object_spot00_break fix

* object_niw fix

* object_nwc fixed

* object_ru2 object_rr and some of object_owl fix

* object_spot15_obj fix

* business scrub

* object_spot01_matoya fixed

* object_spot18_obj fix

* object_spot01_objects fix

* object_spot04_objects fix

* object_spot04_objects actually fixed

* object_spot12_obj fix

* object_timeblock fix

* object_spot06_objects fixed

* object_spot08_obj fix

* spot01_matoyab fix

* object_trap fix

* object_umajump fix

* object_vm fix

* z_en_niw_lady fix

* object_yukabyun fix

* object_zl1 fixed

* added offsets to object_os_anime

* object_md fix

* object_ane fix

* object_aob fix

* add palette comment

* object_spot00_objects fix

* spot00 fix

* remove unused asm

* updates

* Add TlutOffset to objects added in https://github.com/zeldaret/oot/pull/815

* Updated object_bdan_objects, ran format.sh

* Change rgb5a1 to rgba16 in my object xmls

* Addressed Anghelo's comments

* review

Co-authored-by: Lucas Shaw <lucas.shaw1123@gmail.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: Fig02 <fig02srl@gmail.com>
This commit is contained in:
Lucas Shaw 2021-08-05 08:53:58 -07:00 committed by GitHub
parent bb4babbe15
commit 0f644b7545
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
162 changed files with 2973 additions and 1386 deletions

View file

@ -5,6 +5,7 @@
*/
#include "z_en_zl1.h"
#include "objects/object_zl1/object_zl1.h"
#define FLAGS 0x00000019
@ -58,22 +59,9 @@ static ColliderCylinderInit sCylinderInit = {
{ 20, 46, 0, { 0, 0, 0 } },
};
static u64* D_80B4E61C[] = { 0x06007208, 0x06009848, 0x06009C48, 0x06009848 };
static u64* D_80B4E62C[] = { 0x06007608 };
extern AnimationHeader D_06000438;
extern u64 D_06008848[];
extern u64 D_06008C48[];
extern FlexSkeletonHeader D_0600F5D8;
extern AnimationHeader D_06010B38;
extern AnimationHeader D_06011348;
extern AnimationHeader D_060116E4;
extern AnimationHeader D_06011B88;
extern AnimationHeader D_06012118;
extern AnimationHeader D_060132D8;
extern AnimationHeader D_060138E0;
extern AnimationHeader D_06013F10;
extern AnimationHeader D_060143A8;
static void* D_80B4E61C[] = { gChildZelda1EyeOpenLookingUpRightTex, gChildZelda1EyeHalf2Tex, gChildZelda1EyeClosedTex,
gChildZelda1EyeHalf2Tex };
static void* D_80B4E62C[] = { gChildZelda1MouthNeutralTex };
void func_80B4AB40(void) {
}
@ -85,9 +73,9 @@ void EnZl1_Init(Actor* thisx, GlobalContext* globalCtx) {
f32 frameCount;
EnZl1* this = THIS;
frameCount = Animation_GetLastFrame(&D_06012118);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600F5D8, NULL, NULL, NULL, 0);
Animation_Change(&this->skelAnime, &D_06012118, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
frameCount = Animation_GetLastFrame(&gChildZelda1Anim_12118);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gChildZelda1Skel, NULL, NULL, NULL, 0);
Animation_Change(&this->skelAnime, &gChildZelda1Anim_12118, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
@ -96,21 +84,21 @@ void EnZl1_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.targetMode = 0;
if (gSaveContext.sceneSetupIndex >= 4) {
frameCount = Animation_GetLastFrame(&D_06000438);
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
frameCount = Animation_GetLastFrame(&gChildZelda1Anim_00438);
Animation_Change(&this->skelAnime, &gChildZelda1Anim_00438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
this->unk_1E6 = 0;
this->actionFunc = func_80B4BC78;
} else if (Flags_GetEventChkInf(9) && Flags_GetEventChkInf(0x25) && Flags_GetEventChkInf(0x37)) {
Actor_Kill(&this->actor);
} else if ((Flags_GetEventChkInf(9) && Flags_GetEventChkInf(0x25)) ||
(Flags_GetEventChkInf(9) && Flags_GetEventChkInf(0x37))) {
frameCount = Animation_GetLastFrame(&D_06000438);
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
frameCount = Animation_GetLastFrame(&gChildZelda1Anim_00438);
Animation_Change(&this->skelAnime, &gChildZelda1Anim_00438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
this->actor.textId = 0x703D;
this->actionFunc = func_80B4AF18;
} else if (Flags_GetEventChkInf(0x40)) {
frameCount = Animation_GetLastFrame(&D_06000438);
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
frameCount = Animation_GetLastFrame(&gChildZelda1Anim_00438);
Animation_Change(&this->skelAnime, &gChildZelda1Anim_00438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
this->actor.textId = 0x703C;
this->actionFunc = func_80B4AF18;
} else {
@ -127,9 +115,9 @@ void EnZl1_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_80B4AE18(EnZl1* this) {
if ((this->skelAnime.animation == &D_06010B38) && (this->skelAnime.curFrame < 26.0f)) {
this->unk_1F4 = &D_06008C48;
this->unk_1F8 = &D_06008848;
if ((this->skelAnime.animation == &gChildZelda1Anim_10B38) && (this->skelAnime.curFrame < 26.0f)) {
this->unk_1F4 = &gChildZelda1EyeOpenLookingRightTex;
this->unk_1F8 = &gChildZelda1EyeOpenLookingLeftTex;
this->unk_1FC = 2;
} else {
if (DECR(this->unk_1FC) == 0) {
@ -174,8 +162,8 @@ void func_80B4B010(EnZl1* this, GlobalContext* globalCtx) {
s16 rotDiff;
if (func_8002F194(&this->actor, globalCtx)) {
Animation_Change(&this->skelAnime, &D_06010B38, 1.0f, 0.0f, Animation_GetLastFrame(&D_06010B38),
ANIMMODE_ONCE_INTERP, -10.0f);
Animation_Change(&this->skelAnime, &gChildZelda1Anim_10B38, 1.0f, 0.0f,
Animation_GetLastFrame(&gChildZelda1Anim_10B38), ANIMMODE_ONCE_INTERP, -10.0f);
this->unk_1E8 = Gameplay_CreateSubCamera(globalCtx);
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
Gameplay_ChangeCameraStatus(globalCtx, this->unk_1E8, CAM_STAT_ACTIVE);
@ -228,7 +216,7 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
}
break;
case 64:
animHeaderSeg = &D_06011348;
animHeaderSeg = &gChildZelda1Anim_11348;
sp3C = 1;
this->actor.textId = 0x702E;
func_8010B680(globalCtx, this->actor.textId, NULL);
@ -250,20 +238,20 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
case 2:
if ((func_8010BDBC(msgCtx) == 4) && (func_80106BC8(globalCtx) != 0)) {
if (msgCtx->choiceIndex == 0) {
animHeaderSeg = &D_06013F10;
animHeaderSeg = &gChildZelda1Anim_13F10;
sp3C = 2;
this->unk_1E2++;
} else {
animHeaderSeg = &D_060116E4;
animHeaderSeg = &gChildZelda1Anim_116E4;
sp3C = 2;
this->unk_1E2 = 6;
}
}
break;
case 3:
frameCount = Animation_GetLastFrame(&D_06013F10);
frameCount = Animation_GetLastFrame(&gChildZelda1Anim_13F10);
if (this->skelAnime.curFrame == frameCount) {
animHeaderSeg = &D_060143A8;
animHeaderSeg = &gChildZelda1Anim_143A8;
sp3C = 1;
this->actor.textId = 0x7032;
func_8010B720(globalCtx, this->actor.textId);
@ -273,7 +261,7 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
case 4:
if ((func_8010BDBC(msgCtx) == 4) && (func_80106BC8(globalCtx) != 0)) {
if (msgCtx->choiceIndex == 0) {
animHeaderSeg = &D_060132D8;
animHeaderSeg = &gChildZelda1Anim_132D8;
sp3C = 2;
this->unk_1E2 = 9;
} else {
@ -291,9 +279,9 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
}
break;
case 6:
frameCount = Animation_GetLastFrame(&D_060116E4);
frameCount = Animation_GetLastFrame(&gChildZelda1Anim_116E4);
if (this->skelAnime.curFrame == frameCount) {
animHeaderSeg = &D_06011B88;
animHeaderSeg = &gChildZelda1Anim_12B88;
sp3C = 1;
this->actor.textId = 0x7031;
func_8010B720(globalCtx, this->actor.textId);
@ -310,7 +298,7 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
case 8:
if ((func_8010BDBC(msgCtx) == 4) && (func_80106BC8(globalCtx) != 0)) {
if (msgCtx->choiceIndex == 0) {
animHeaderSeg = &D_060138E0;
animHeaderSeg = &gChildZelda1Anim_138E0;
sp3C = 2;
this->unk_1E2 = 3;
} else {
@ -321,9 +309,9 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
}
break;
case 9:
frameCount = Animation_GetLastFrame(&D_060132D8);
frameCount = Animation_GetLastFrame(&gChildZelda1Anim_132D8);
if (this->skelAnime.curFrame == frameCount) {
animHeaderSeg = &D_06000438;
animHeaderSeg = &gChildZelda1Anim_00438;
sp3C = 1;
globalCtx->csCtx.segment = D_80B4C5D0;
gSaveContext.cutsceneTrigger = 1;
@ -358,8 +346,16 @@ void func_80B4B874(EnZl1* this, GlobalContext* globalCtx) {
void func_80B4B8B4(EnZl1* this, GlobalContext* globalCtx) {
AnimationHeader* spB0[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x06012B04, 0x06012118, 0x06010B38,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
&gChildZelda1Anim_12B04,
&gChildZelda1Anim_12118,
&gChildZelda1Anim_10B38,
};
u8 spA4[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02,
@ -417,10 +413,10 @@ void func_80B4B8B4(EnZl1* this, GlobalContext* globalCtx) {
void func_80B4BBC4(EnZl1* this, GlobalContext* globalCtx) {
s32 pad;
f32 frameCount = Animation_GetLastFrame(&D_06000438);
f32 frameCount = Animation_GetLastFrame(&gChildZelda1Anim_00438);
Player* player = PLAYER;
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
Animation_Change(&this->skelAnime, &gChildZelda1Anim_00438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
func_8002DF54(globalCtx, &this->actor, 1);
func_8002F7DC(&player->actor, NA_SE_VO_LI_SURPRISE_KID);
this->actor.textId = 0x7039;
@ -431,8 +427,16 @@ void func_80B4BBC4(EnZl1* this, GlobalContext* globalCtx) {
void func_80B4BC78(EnZl1* this, GlobalContext* globalCtx) {
AnimationHeader* sp90[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x06012B04, 0x06012118, 0x06010B38,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
&gChildZelda1Anim_12B04,
&gChildZelda1Anim_12118,
&gChildZelda1Anim_10B38,
};
u8 sp84[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02,
@ -446,9 +450,9 @@ void func_80B4BC78(EnZl1* this, GlobalContext* globalCtx) {
s32 pad;
f32 frameCount;
if (SkelAnime_Update(&this->skelAnime) && (this->skelAnime.animation == &D_06010B38)) {
frameCount = Animation_GetLastFrame(&D_06011348);
Animation_Change(&this->skelAnime, &D_06011348, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, -10.0f);
if (SkelAnime_Update(&this->skelAnime) && (this->skelAnime.animation == &gChildZelda1Anim_10B38)) {
frameCount = Animation_GetLastFrame(&gChildZelda1Anim_11348);
Animation_Change(&this->skelAnime, &gChildZelda1Anim_11348, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, -10.0f);
}
func_80B4B874(this, globalCtx);
npcAction = globalCtx->csCtx.npcActions[0];