mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-23 13:59:40 +00:00
Decompile object_syokudai and object_ydan_objects (#699)
* add deku and torch objects * why git?
This commit is contained in:
parent
ad751f02d2
commit
f57e0467d2
12
assets/xml/objects/object_syokudai.xml
Normal file
12
assets/xml/objects/object_syokudai.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<Root>
|
||||
<File Name="object_syokudai" Segment="6">
|
||||
<DList Name="gGoldenTorchDL" Offset="0x3A0"/>
|
||||
<DList Name="gWoodenTorchDL" Offset="0x870"/>
|
||||
<DList Name="gTimedTorchDL" Offset="0xB90"/>
|
||||
<Texture Name="gGoldenTorch1Tex" OutName="golden_torch_1" Format="rgb5a1" Width="32" Height="32" Offset="0xC90"/>
|
||||
<Texture Name="gGoldenTorch2Tex" OutName="golden_torch_2" Format="rgb5a1" Width="32" Height="64" Offset="0x1490"/>
|
||||
<Texture Name="gTorchFlameGuardTex" OutName="torch_flame_guard" Format="rgb5a1" Width="32" Height="32" Offset="0x2490"/>
|
||||
<Texture Name="gTimedTorchTex" OutName="timed_torch" Format="rgb5a1" Width="32" Height="32" Offset="0x2C90"/>
|
||||
<Texture Name="gWoodenTorchTex" OutName="wooden_torch" Format="rgb5a1" Width="16" Height="64" Offset="0x3490"/>
|
||||
</File>
|
||||
</Root>
|
19
assets/xml/objects/object_ydan_objects.xml
Normal file
19
assets/xml/objects/object_ydan_objects.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<Root>
|
||||
<File Name="object_ydan_objects" Segment="6">
|
||||
<DList Name="gDTUnknownWebDL" Offset="0x3850"/>
|
||||
<DList Name="gDTRisingPlatformsDL" Offset="0x5018"/>
|
||||
<DList Name="gDTWaterPlaneDL" Offset="0x5DE0"/>
|
||||
<DList Name="gDTWebWallDL" Offset="0x5F40"/>
|
||||
<DList Name="gDTWebFloorDL" Offset="0x61B0"/>
|
||||
<DList Name="gDTFallingLadderDL" Offset="0x6570"/>
|
||||
<DList Name="gDTDungeonDoor1DL" Offset="0x67A0"/>
|
||||
<DList Name="gDTDungeonDoor2DL" Offset="0x6910"/>
|
||||
<DList Name="gDTSlidingPlatformDL" Offset="0x7508"/>
|
||||
<DList Name="gDTRollingSpikeTrapDL" Offset="0x8D88"/>
|
||||
<Collision Name="gDTRisingPlatformsCol" Offset="0x5780"/>
|
||||
<Collision Name="gDTWebWallCol" Offset="0x6050"/>
|
||||
<Collision Name="gDTWebFloorCol" Offset="0x6460"/>
|
||||
<Collision Name="gDTFallingLadderCol" Offset="0x66A8"/>
|
||||
<Collision Name="gDTSlidingPlatformCol" Offset="0x7798"/>
|
||||
</File>
|
||||
</Root>
|
6
spec
6
spec
@ -3783,7 +3783,8 @@ endseg
|
||||
beginseg
|
||||
name "object_ydan_objects"
|
||||
romalign 0x1000
|
||||
include "build/baserom/object_ydan_objects.o"
|
||||
include "build/assets/objects/object_ydan_objects/object_ydan_objects.o"
|
||||
number 6
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@ -4369,7 +4370,8 @@ endseg
|
||||
beginseg
|
||||
name "object_syokudai"
|
||||
romalign 0x1000
|
||||
include "build/baserom/object_syokudai.o"
|
||||
include "build/assets/objects/object_syokudai/object_syokudai.o"
|
||||
number 6
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "z_bg_ydan_hasi.h"
|
||||
#include "objects/object_ydan_objects/object_ydan_objects.h"
|
||||
|
||||
#define FLAGS 0x00000030
|
||||
|
||||
@ -38,12 +39,6 @@ static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static Gfx* D_808BEC24[] = { 0x06007508, 0x06005DE0, 0x06005018 };
|
||||
|
||||
extern CollisionHeader D_06005780;
|
||||
extern CollisionHeader D_06007798;
|
||||
extern Gfx* D_06005DE0[];
|
||||
|
||||
void BgYdanHasi_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad1;
|
||||
BgYdanHasi* this = THIS;
|
||||
@ -66,14 +61,14 @@ void BgYdanHasi_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
if (thisx->params == 0) {
|
||||
// Moving platform on the water in B1
|
||||
CollisionHeader_GetVirtual(&D_06007798, &colHeader);
|
||||
CollisionHeader_GetVirtual(&gDTSlidingPlatformCol, &colHeader);
|
||||
thisx->scale.z = 0.15f;
|
||||
thisx->scale.x = 0.15f;
|
||||
thisx->world.pos.y = (waterBox->ySurface + 20.0f);
|
||||
this->actionFunc = BgYdanHasi_UpdateFloatingBlock;
|
||||
} else {
|
||||
// 3 platforms on 2F
|
||||
CollisionHeader_GetVirtual(&D_06005780, &colHeader);
|
||||
CollisionHeader_GetVirtual(&gDTRisingPlatformsCol, &colHeader);
|
||||
thisx->draw = NULL;
|
||||
this->actionFunc = BgYdanHasi_SetupThreeBlocks;
|
||||
Actor_SetFocus(thisx, 40.0f);
|
||||
@ -189,10 +184,11 @@ void BgYdanHasi_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void BgYdanHasi_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static Gfx* dLists[] = { gDTSlidingPlatformDL, gDTWaterPlaneDL, gDTRisingPlatformsDL };
|
||||
BgYdanHasi* this = THIS;
|
||||
|
||||
if (this->dyna.actor.params == 0 || this->dyna.actor.params == 2) {
|
||||
Gfx_DrawDListOpa(globalCtx, D_808BEC24[this->dyna.actor.params]);
|
||||
Gfx_DrawDListOpa(globalCtx, dLists[this->dyna.actor.params]);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -205,7 +201,7 @@ void BgYdanHasi_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
globalCtx->gameplayFrames & 0x7F, 0x20, 0x20));
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 592),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, &D_06005DE0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gDTWaterPlaneDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 597);
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* File: z_bg_ydan_maruta.c
|
||||
* Overlay: ovl_Bg_Ydan_Maruta
|
||||
* Description: Rotating spike log in Deku Tree
|
||||
* Description: Rotating spike log and falling ladder in Deku Tree
|
||||
*/
|
||||
|
||||
#include "z_bg_ydan_maruta.h"
|
||||
#include "objects/object_ydan_objects/object_ydan_objects.h"
|
||||
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
@ -75,10 +76,6 @@ static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern CollisionHeader D_060066A8;
|
||||
extern Gfx D_06008D88[];
|
||||
extern Gfx D_06006570[];
|
||||
|
||||
void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgYdanMaruta* this = THIS;
|
||||
@ -102,7 +99,7 @@ void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
triInit = &sTrisElementsInit[1];
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_060066A8, &colHeader);
|
||||
CollisionHeader_GetVirtual(&gDTFallingLadderCol, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
thisx->home.pos.y += -280.0f;
|
||||
if (Flags_GetSwitch(globalCtx, this->unk_168)) {
|
||||
@ -207,8 +204,8 @@ void BgYdanMaruta_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgYdanMaruta* this = THIS;
|
||||
|
||||
if (this->dyna.actor.params == 0) {
|
||||
Gfx_DrawDListOpa(globalCtx, D_06008D88);
|
||||
Gfx_DrawDListOpa(globalCtx, gDTRollingSpikeTrapDL);
|
||||
} else {
|
||||
Gfx_DrawDListOpa(globalCtx, D_06006570);
|
||||
Gfx_DrawDListOpa(globalCtx, gDTFallingLadderDL);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,11 @@
|
||||
/*
|
||||
* File: z_bg_ydan_sp.c
|
||||
* Overlay: ovl_Bg_Ydan_Sp
|
||||
* Description: Webs
|
||||
*/
|
||||
|
||||
#include "z_bg_ydan_sp.h"
|
||||
#include "objects/object_ydan_objects/object_ydan_objects.h"
|
||||
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
@ -14,12 +21,7 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, GlobalContext* globalCtx);
|
||||
void BgYdanSp_BurnWallWeb(BgYdanSp* this, GlobalContext* globalCtx);
|
||||
void BgYdanSp_WallWebIdle(BgYdanSp* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_060061B0[];
|
||||
extern Gfx D_06003850[];
|
||||
extern Gfx D_06005F40[];
|
||||
|
||||
extern CollisionHeader D_06006050;
|
||||
extern CollisionHeader D_06006460;
|
||||
extern CollisionHeader gDTWebWallCol;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ WEB_FLOOR,
|
||||
@ -100,7 +102,7 @@ void BgYdanSp_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Collider_InitTris(globalCtx, &this->trisCollider);
|
||||
Collider_SetTris(globalCtx, &this->trisCollider, &this->dyna.actor, &sTrisInit, this->trisColliderItems);
|
||||
if (this->dyna.actor.params == WEB_FLOOR) {
|
||||
CollisionHeader_GetVirtual(&D_06006460, &colHeader);
|
||||
CollisionHeader_GetVirtual(&gDTWebFloorCol, &colHeader);
|
||||
this->actionFunc = BgYdanSp_FloorWebIdle;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
@ -115,7 +117,7 @@ void BgYdanSp_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Collider_SetTrisVertices(&this->trisCollider, 1, &tri[0], &tri[2], &tri[1]);
|
||||
this->unk16C = 0.0f;
|
||||
} else {
|
||||
CollisionHeader_GetVirtual(&D_06006050, &colHeader);
|
||||
CollisionHeader_GetVirtual(&gDTWebWallCol, &colHeader);
|
||||
this->actionFunc = BgYdanSp_WallWebIdle;
|
||||
Actor_SetFocus(&this->dyna.actor, 30.0f);
|
||||
sinsY = Math_SinS(this->dyna.actor.shape.rot.y);
|
||||
@ -155,7 +157,7 @@ void* BgYdanSp_UpdateFloorWebCollision(BgYdanSp* this) {
|
||||
s16 newY;
|
||||
CollisionHeader* colHeader;
|
||||
|
||||
colHeader = SEGMENTED_TO_VIRTUAL(&D_06006460);
|
||||
colHeader = SEGMENTED_TO_VIRTUAL(&gDTWebFloorCol);
|
||||
colHeader->vtxList = SEGMENTED_TO_VIRTUAL(colHeader->vtxList);
|
||||
newY = (this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y) * 10;
|
||||
colHeader->vtxList[14].y = newY;
|
||||
@ -427,7 +429,7 @@ void BgYdanSp_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
if (thisx->params == WEB_WALL) {
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_sp.c", 787),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_06005F40);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gDTWebWallDL);
|
||||
} else if (this->actionFunc == BgYdanSp_FloorWebBroken) {
|
||||
Matrix_Get(&mtxF);
|
||||
if (this->timer == 40) {
|
||||
@ -435,7 +437,7 @@ void BgYdanSp_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Matrix_Scale(1.0f, ((thisx->home.pos.y - thisx->world.pos.y) + 10.0f) * 0.1f, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_sp.c", 808),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_060061B0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gDTWebFloorDL);
|
||||
}
|
||||
for (i = 0; i < 8; i++) {
|
||||
Matrix_Put(&mtxF);
|
||||
@ -444,14 +446,14 @@ void BgYdanSp_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Matrix_Scale(3.5f, 5.0f, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_sp.c", 830),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_06003850);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gDTUnknownWebDL);
|
||||
}
|
||||
} else {
|
||||
Matrix_Translate(0.0f, (thisx->home.pos.y - thisx->world.pos.y) * 10.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(1.0f, ((thisx->home.pos.y - thisx->world.pos.y) + 10.0f) * 0.1f, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_sp.c", 849),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_060061B0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gDTWebFloorDL);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_sp.c", 856);
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "z_obj_syokudai.h"
|
||||
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_syokudai/object_syokudai.h"
|
||||
|
||||
#define FLAGS 0x00000410
|
||||
|
||||
@ -258,7 +259,7 @@ void ObjSyokudai_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
}
|
||||
|
||||
void ObjSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static Gfx* displayLists[] = { 0x060003A0, 0x06000B90, 0x06000870 };
|
||||
static Gfx* displayLists[] = { gGoldenTorchDL, gTimedTorchDL, gWoodenTorchDL };
|
||||
s32 pad;
|
||||
ObjSyokudai* this = THIS;
|
||||
s32 timerMax;
|
||||
|
@ -262,16 +262,6 @@ D_060039D4 = 0x060039D4;
|
||||
D_06003898 = 0x06003898;
|
||||
D_0500A880 = 0x0500A880;
|
||||
|
||||
// z_bg_ydan_hasi
|
||||
D_06005780 = 0x06005780;
|
||||
D_06007798 = 0x06007798;
|
||||
D_06005DE0 = 0x06005DE0;
|
||||
|
||||
// z_bg_ydan_maruta
|
||||
D_060066A8 = 0x060066A8;
|
||||
D_06008D88 = 0x06008D88;
|
||||
D_06006570 = 0x06006570;
|
||||
|
||||
// z_en_mag
|
||||
D_06000000 = 0x06000000;
|
||||
D_06019A00 = 0x06019A00;
|
||||
@ -1705,13 +1695,6 @@ D_06007E20 = 0x06007E20;
|
||||
D_06007EE0 = 0x06007EE0;
|
||||
D_06008190 = 0x06008190;
|
||||
|
||||
// z_bg_ydan_sp
|
||||
D_06003850 = 0x06003850;
|
||||
D_06005F40 = 0x06005F40;
|
||||
D_06006050 = 0x06006050;
|
||||
D_060061B0 = 0x060061B0;
|
||||
D_06006460 = 0x06006460;
|
||||
|
||||
// z_boss_dodongo
|
||||
D_030021D8 = 0x030021D8;
|
||||
D_06001074 = 0x06001074;
|
||||
@ -2737,10 +2720,3 @@ D_06000B30 = 0x06000B30;
|
||||
D_060041A8 = 0x060041A8;
|
||||
D_060009A0 = 0x060009A0;
|
||||
D_06004404 = 0x06004404;
|
||||
|
||||
// z_bg_ydan_sp
|
||||
D_06006050 = 0x06006050;
|
||||
D_06006460 = 0x06006460;
|
||||
D_060061B0 = 0x060061B0;
|
||||
D_06003850 = 0x06003850;
|
||||
D_06005F40 = 0x06005F40;
|
||||
|
Loading…
Reference in New Issue
Block a user