mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +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:
parent
36fead60a0
commit
201c9ec1cd
72 changed files with 1499 additions and 1128 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "z_en_box.h"
|
||||
#include "objects/object_box/object_box.h"
|
||||
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
|
@ -50,16 +51,6 @@ void EnBox_AppearAnimation(EnBox*, GlobalContext*);
|
|||
void EnBox_WaitOpen(EnBox*, GlobalContext*);
|
||||
void EnBox_Open(EnBox*, GlobalContext*);
|
||||
|
||||
extern AnimationHeader D_06000128;
|
||||
extern AnimationHeader D_0600024C;
|
||||
extern AnimationHeader D_0600043C;
|
||||
extern Gfx D_060006F0[]; // regular chest base
|
||||
extern Gfx D_06000AE8[]; // boss key chest base
|
||||
extern Gfx D_060010C0[]; // regular chest top
|
||||
extern Gfx D_06001678[]; // boss key chest top
|
||||
extern SkeletonHeader D_060047D8;
|
||||
extern CollisionHeader D_06005FC8;
|
||||
|
||||
const ActorInit En_Box_InitVars = {
|
||||
ACTOR_EN_BOX,
|
||||
ACTORCAT_CHEST,
|
||||
|
@ -72,13 +63,14 @@ const ActorInit En_Box_InitVars = {
|
|||
(ActorFunc)EnBox_Draw,
|
||||
};
|
||||
|
||||
static AnimationHeader* D_809CA800[4] = { &D_0600024C, &D_06000128, &D_0600043C, &D_0600043C };
|
||||
static AnimationHeader* sAnimations[4] = { &gTreasureChestAnim_00024C, &gTreasureChestAnim_000128,
|
||||
&gTreasureChestAnim_00043C, &gTreasureChestAnim_00043C };
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_U8(targetMode, 0, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static s32 sUnused;
|
||||
static UNK_TYPE sUnused;
|
||||
|
||||
void EnBox_SetupAction(EnBox* this, EnBoxActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
|
@ -107,13 +99,13 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
f32 endFrame;
|
||||
|
||||
animFrameStart = 0.0f;
|
||||
anim = D_809CA800[((void)0, gSaveContext.linkAge)];
|
||||
anim = sAnimations[((void)0, gSaveContext.linkAge)];
|
||||
colHeader = NULL;
|
||||
endFrame = Animation_GetLastFrame(anim);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06005FC8, &colHeader);
|
||||
CollisionHeader_GetVirtual(&gTreasureChestCol, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx2, &globalCtx2->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
func_8003ECA8(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
|
@ -179,7 +171,7 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.world.rot.y += 0x8000;
|
||||
this->dyna.actor.home.rot.z = this->dyna.actor.world.rot.z = this->dyna.actor.shape.rot.z = 0;
|
||||
|
||||
SkelAnime_Init(globalCtx2, &this->skelanime, &D_060047D8, anim, this->jointTable, this->morphTable, 5);
|
||||
SkelAnime_Init(globalCtx2, &this->skelanime, &gTreasureChestSkel, anim, this->jointTable, this->morphTable, 5);
|
||||
Animation_Change(&this->skelanime, anim, 1.5f, animFrameStart, endFrame, ANIMMODE_ONCE, 0.0f);
|
||||
|
||||
switch (this->type) {
|
||||
|
@ -407,7 +399,7 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) {
|
|||
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
|
||||
if (this->unk_1F4 != 0) { // unk_1F4 is modified by player code
|
||||
linkAge = gSaveContext.linkAge;
|
||||
anim = D_809CA800[(this->unk_1F4 < 0 ? 2 : 0) + linkAge];
|
||||
anim = sAnimations[(this->unk_1F4 < 0 ? 2 : 0) + linkAge];
|
||||
frameCount = Animation_GetLastFrame(anim);
|
||||
Animation_Change(&this->skelanime, anim, 1.5f, 0, frameCount, ANIMMODE_ONCE, 0.0f);
|
||||
EnBox_SetupAction(this, EnBox_Open);
|
||||
|
@ -558,17 +550,17 @@ void EnBox_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
|||
gSPMatrix((*gfx)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_box.c", 1492),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
if (this->type != ENBOX_TYPE_DECORATED_BIG) {
|
||||
gSPDisplayList((*gfx)++, D_060006F0);
|
||||
gSPDisplayList((*gfx)++, gTreasureChestChestFrontDL);
|
||||
} else {
|
||||
gSPDisplayList((*gfx)++, D_06000AE8);
|
||||
gSPDisplayList((*gfx)++, gTreasureChestBossKeyChestFrontDL);
|
||||
}
|
||||
} else if (limbIndex == 3) {
|
||||
gSPMatrix((*gfx)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_box.c", 1502),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
if (this->type != ENBOX_TYPE_DECORATED_BIG) {
|
||||
gSPDisplayList((*gfx)++, D_060010C0);
|
||||
gSPDisplayList((*gfx)++, gTreasureChestChestSideAndLidDL);
|
||||
} else {
|
||||
gSPDisplayList((*gfx)++, D_06001678);
|
||||
gSPDisplayList((*gfx)++, gTreasureChestBossKeyChestSideAndTopDL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue