1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-29 16:26:18 +00:00

gameplay_dangeon_keep (#665)

* xml done

* add references in

* missed a few

* newline

* review
This commit is contained in:
fig02 2021-02-12 18:33:55 -05:00 committed by GitHub
parent 61dacd0882
commit 0a1c16d440
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 212 additions and 162 deletions

View file

@ -314,8 +314,8 @@ glabel EnGoma_Draw
/* 023FC 80A4B2BC 8F240000 */ lw $a0, 0x0000($t9) ## 00000000
/* 02400 80A4B2C0 AE020004 */ sw $v0, 0x0004($s0) ## 00000004
/* 02404 80A4B2C4 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0
/* 02408 80A4B2C8 3C0A0500 */ lui $t2, %hi(D_05000530) ## $t2 = 05000000
/* 0240C 80A4B2CC 254A0530 */ addiu $t2, $t2, %lo(D_05000530) ## $t2 = 05000530
/* 02408 80A4B2C8 3C0A0500 */ lui $t2, %hi(gBrownFragmentDL) ## $t2 = 05000000
/* 0240C 80A4B2CC 254A0530 */ addiu $t2, $t2, %lo(gBrownFragmentDL) ## $t2 = 05000530
/* 02410 80A4B2D0 24480008 */ addiu $t0, $v0, 0x0008 ## $t0 = 00000008
/* 02414 80A4B2D4 AE2802C0 */ sw $t0, 0x02C0($s1) ## 000002C0
/* 02418 80A4B2D8 3C09DE00 */ lui $t1, 0xDE00 ## $t1 = DE000000

View file

@ -0,0 +1,50 @@
<Root>
<File Name="gameplay_dangeon_keep" Segment="5">
<DList Name="gUnusedCandleDL" Offset="0x440"/>
<DList Name="gBrownFragmentDL" Offset="0x530"/>
<Texture Name="gUnusedStoneTex" OutName="unused_stone" Format="rgb5a1" Width="32" Height="32" Offset="0x7C0"/>
<DList Name="gDoorLockDL" Offset="0x1100"/>
<DList Name="gDoorChainsDL" Offset="0x11F0"/>
<Texture Name="gUnusedGoldLockTex" OutName="unused_gold_lock" Format="rgb5a1" Width="32" Height="32" Offset="0x1A80"/>
<DList Name="gUnusedBombBagDL" Offset="0x32C0"/>
<Texture Name="gPushBlockSilverTex" OutName="block_silver" Format="i4" Width="64" Height="64" Offset="0x3350"/>
<Texture Name="gPushBlockBaseTex" OutName="block_base" Format="i4" Width="64" Height="64" Offset="0x3B50"/>
<Texture Name="gPushBlockGrayTex" OutName="block_gray" Format="i4" Width="64" Height="64" Offset="0x4350"/>
<DList Name="gPushBlockDL" Offset="0x4CD0"/>
<Collision Name="gPushBlockCol" Offset="0x4E98"/>
<DList Name="gWoodenPlatofrmDL" Offset="0x5050"/>
<DList Name="gSmallWoodenBoxDL" Offset="0x5290"/>
<DList Name="gSmallWoodenBoxFragmentDL" Offset="0x5380"/>
<DList Name="gBetaKokiriSwordSpriteDL" Offset="0x5450"/>
<DList Name="gMagicJarSpriteDL" Offset="0x5520"/>
<DList Name="gBetaSlingshotSpriteDL" Offset="0x55F0"/>
<DList Name="gFloorSwitch1DL" Offset="0x5800"/>
<DList Name="gRustyFloorSwitchDL" Offset="0x5AD0"/>
<DList Name="gFloorSwitch2DL" Offset="0x5D50"/>
<Collision Name="gFloorSwitchCol" Offset="0x5FB8"/>
<DList Name="gFloorSwitch3DL" Offset="0x6170"/>
<DList Name="gBetaFloorSwitchDL" Offset="0x63F0"/>
<DList Name="gEyeSwitch1DL" Offset="0x6610"/>
<DList Name="gEyeSwitch2DL" Offset="0x6810"/>
<DList Name="gCrystalSwitchCoreOpaDL" Offset="0x6D10"/>
<DList Name="gCrystalSwitchCoreXluDL" Offset="0x6E60"/>
<DList Name="gCrystalSwitchDiamondOpaDL" Offset="0x7340"/>
<DList Name="gCrystalSwitchDiamondXluDL" Offset="0x7488"/>
<DList Name="gBetaCrystalSwitchDL" Offset="0x77B0"/>
<Texture Name="gEyeSwitchGoldClosedTex" OutName="eye_gold_closed" Format="rgb5a1" Width="32" Height="32" Offset="0x90A0"/>
<Texture Name="gEyeSwitchGoldOpeningTex" OutName="eye_gold_opening" Format="rgb5a1" Width="32" Height="32" Offset="0x98A0"/>
<Texture Name="gEyeSwitchGoldClosingTex" OutName="eye_gold_closing" Format="rgb5a1" Width="32" Height="32" Offset="0xA0A0"/>
<Texture Name="gEyeSwitchGoldOpenTex" OutName="eye_gold_open" Format="rgb5a1" Width="32" Height="32" Offset="0xA8A0"/>
<Texture Name="gEyeSwitchSilverOpenTex" OutName="eye_silver_open" Format="rgb5a1" Width="32" Height="32" Offset="0xB0A0"/>
<Texture Name="gEyeSwitchSilverHalfTex" OutName="eye_silver_half" Format="rgb5a1" Width="32" Height="32" Offset="0xB8A0"/>
<Texture Name="gEyeSwitchSilverClosedTex" OutName="eye_silver_closed" Format="rgb5a1" Width="32" Height="32" Offset="0xC0A0"/>
<Texture Name="gDungeonKeepTex_00C8A0" OutName="dungeon_keep_tex_00C8A0" Format="rgb5a1" Width="32" Height="32" Offset="0xC8A0"/>
<Texture Name="gDungeonKeepTex_00E8A0" OutName="dungeon_keep_tex_00E8A0" Format="i8" Width="32" Height="32" Offset="0xE8A0"/>
<Texture Name="gDungeonKeepTex_00ECA0" OutName="dungeon_keep_tex_00ECA0" Format="i8" Width="32" Height="32" Offset="0xECA0"/>
<Texture Name="gDungeonKeepTex_00F0A0" OutName="dungeon_keep_tex_00F0A0" Format="rgb5a1" Width="32" Height="32" Offset="0xF0A0"/>
<Texture Name="gCrstalSwitchRedTex" OutName="crystal_red" Format="rgb5a1" Width="32" Height="32" Offset="0x144B0"/>
<Texture Name="gCrstalSwitchBlueTex" OutName="crystal_blue" Format="rgb5a1" Width="32" Height="32" Offset="0x14CB0"/>
<DList Name="gPotDL" Offset="0x17870"/>
<DList Name="gPotFragmentDL" Offset="0x17A60"/>
</File>
</Root>

3
spec
View file

@ -3513,7 +3513,8 @@ endseg
beginseg
name "gameplay_dangeon_keep"
romalign 0x1000
include "build/baserom/gameplay_dangeon_keep.o"
include "build/assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.o"
number 5
endseg
beginseg

View file

@ -314,7 +314,7 @@ void func_800C213C(PreRenderContext* this, Gfx** gfxp) {
s32 y2;
s32 add;
s32 uls;
s32 yinc; // vertical increment amount
s32 yinc; // vertical increment amount
s32 ult;
s32 lrx;
s32 lry;
@ -357,12 +357,14 @@ void func_800C213C(PreRenderContext* this, Gfx** gfxp) {
this->height, uls, ult, lrx, lry, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
do {} while(0); // force register allocation behavior
gDPLoadMultiTile(gfx++, this->cvgSave, 0x0160, yinc, G_IM_FMT_I, G_IM_SIZ_8b, this->width, this->height, uls, ult,
lrx, lry, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
do {
} while (0); // force register allocation behavior
gDPLoadMultiTile(gfx++, this->cvgSave, 0x0160, yinc, G_IM_FMT_I, G_IM_SIZ_8b, this->width, this->height, uls,
ult, lrx, lry, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
do {} while(0); // force register allocation behavior
do {
} while (0); // force register allocation behavior
gSPTextureRectangle(gfx++, uls << 2, ult << 2, (lrx + yinc) << 2, (lry + yinc) << 2, G_TX_RENDERTILE, uls << 5,
ult << 5, 1 << 10, 1 << 10);

View file

@ -4091,7 +4091,7 @@ void func_80035844(Vec3f* arg0, Vec3f* arg1, s16* arg2, s32 arg3) {
* Spawns En_Part (Dissipating Flames) actor as a child of the given actor.
*/
Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* unused,
GlobalContext* globalCtx, s16 params, s32 arg8) {
GlobalContext* globalCtx, s16 params, s32 arg8) {
EnPart* spawnedEnPart;
spawnedEnPart =

View file

@ -334,25 +334,30 @@ DrawItemTableEntry sDrawItemTable[] = {
// butterfly, OBJECT_GI_BUTTERFLY
{ GetItem_DrawOpa0Xlu1, { gGiButterflyContainerDL, gGiButterflyGlassDL } },
// poe, OBJECT_GI_GHOST
{ GetItem_DrawPoes, { gGiGhostContainerLidDL, gGiGhostContainerGlassDL, gGiGhostContainerContentsDL, gGiPoeColorDL } },
{ GetItem_DrawPoes,
{ gGiGhostContainerLidDL, gGiGhostContainerGlassDL, gGiGhostContainerContentsDL, gGiPoeColorDL } },
// fairy, OBJECT_GI_SOUL
{ GetItem_DrawFairy, { gGiFairyContainerBaseCapDL, gGiFairyContainerGlassDL, gGiFairyContainerContentsDL } },
// bullet bag 40, OBJECT_GI_DEKUPOUCH
{ GetItem_DrawBulletBag,
{ gGiBulletBagDL, gGiBulletBagColorDL, gGiBulletBagStringDL, gGiBulletBagStringColorDL, gGiBulletBagWritingDL } },
// green rupee, OBJECT_GI_RUPY
{ GetItem_DrawSmallRupee, { gGiRupeeInnerDL, gGiGreenRupeeInnerColorDL, gGiRupeeOuterDL, gGiGreenRupeeOuterColorDL } },
{ GetItem_DrawSmallRupee,
{ gGiRupeeInnerDL, gGiGreenRupeeInnerColorDL, gGiRupeeOuterDL, gGiGreenRupeeOuterColorDL } },
// blue rupee, OBJECT_GI_RUPY
{ GetItem_DrawSmallRupee, { gGiRupeeInnerDL, gGiBlueRupeeInnerColorDL, gGiRupeeOuterDL, gGiBlueRupeeOuterColorDL } },
{ GetItem_DrawSmallRupee,
{ gGiRupeeInnerDL, gGiBlueRupeeInnerColorDL, gGiRupeeOuterDL, gGiBlueRupeeOuterColorDL } },
// red rupee, OBJECT_GI_RUPY
{ GetItem_DrawSmallRupee, { gGiRupeeInnerDL, gGiRedRupeeInnerColorDL, gGiRupeeOuterDL, gGiRedRupeeOuterColorDL } },
// big poe, OBJECT_GI_GHOST
{ GetItem_DrawPoes,
{ gGiGhostContainerLidDL, gGiGhostContainerGlassDL, gGiGhostContainerContentsDL, gGiBigPoeColorDL } },
// purple rupee, OBJECT_GI_RUPY
{ GetItem_DrawOpa10Xlu32, { gGiRupeeInnerDL, gGiPurpleRupeeInnerColorDL, gGiRupeeOuterDL, gGiPurpleRupeeOuterColorDL } },
{ GetItem_DrawOpa10Xlu32,
{ gGiRupeeInnerDL, gGiPurpleRupeeInnerColorDL, gGiRupeeOuterDL, gGiPurpleRupeeOuterColorDL } },
// gold rupee, OBJECT_GI_RUPY
{ GetItem_DrawOpa10Xlu32, { gGiRupeeInnerDL, gGiGoldRupeeInnerColorDL, gGiRupeeOuterDL, gGiGoldRupeeOuterColorDL } },
{ GetItem_DrawOpa10Xlu32,
{ gGiRupeeInnerDL, gGiGoldRupeeInnerColorDL, gGiRupeeOuterDL, gGiGoldRupeeOuterColorDL } },
// bullet bag 50, OBJECT_GI_DEKUPOUCH
{ GetItem_DrawBulletBag,
{ gGiBulletBagDL, gGiBulletBag50ColorDL, gGiBulletBagStringDL, gGiBulletBag50StringColorDL,

View file

@ -151,8 +151,8 @@ void func_8087AF38(BgGndSoulmeiro* this, GlobalContext* globalCtx) {
vecA.x = 4.0f * temp_3 * distXZ;
vecA.y = 0.0f;
vecA.z = 4.0f * temp_4 * distXZ;
EffectSsDeadDb_Spawn(globalCtx, &thisx->home.pos, &vecA, &zeroVec, 60, 6, 255, 255, 150, 170, 255, 0,
0, 1, 14, true);
EffectSsDeadDb_Spawn(globalCtx, &thisx->home.pos, &vecA, &zeroVec, 60, 6, 255, 255, 150, 170, 255, 0, 0, 1,
14, true);
temp_2 += 0x2AAA;
}
}

View file

@ -194,7 +194,8 @@ void BgHakaTrap_Destroy(Actor* thisx, GlobalContext* globalCtx) {
if (this->dyna.actor.params != HAKA_TRAP_PROPELLER) {
if (this->dyna.actor.params != HAKA_TRAP_GUILLOTINE_SLOW) {
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
if ((this->dyna.actor.params == HAKA_TRAP_SPIKED_WALL) || (this->dyna.actor.params == HAKA_TRAP_SPIKED_WALL_2)) {
if ((this->dyna.actor.params == HAKA_TRAP_SPIKED_WALL) ||
(this->dyna.actor.params == HAKA_TRAP_SPIKED_WALL_2)) {
Collider_DestroyTris(globalCtx, &this->colliderSpikes);
}
}

View file

@ -66,7 +66,7 @@ void func_80886F24(BgHidanFslift* this) {
this->dyna.actor.child->world.pos.y = this->dyna.actor.world.pos.y + 40.0f;
this->dyna.actor.child->world.pos.z = this->dyna.actor.world.pos.z + -28.0f;
} else {
this->dyna.actor.child = NULL;
this->dyna.actor.child = NULL;
}
}

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_hidan_kowarerukabe.h"
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#define FLAGS 0x00000000
@ -22,8 +23,6 @@ void BgHidanKowarerukabe_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgHidanKowarerukabe_Update(Actor* thisx, GlobalContext* globalCtx);
void BgHidanKowarerukabe_Draw(Actor* thisx, GlobalContext* globalCtx);
extern Gfx D_05000530[];
const ActorInit Bg_Hidan_Kowarerukabe_InitVars = {
ACTOR_BG_HIDAN_KOWARERUKABE,
ACTORCAT_BG,
@ -190,7 +189,7 @@ void BgHidanKowarerukabe_FloorBreak(BgHidanKowarerukabe* this, GlobalContext* gl
arg5 = (((i == 0) || (i == 4)) && ((j == 0) || (j == 4))) ? 65 : 64;
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &thisx->world.pos, -550, arg5, 15, 15, 0, arg9, 2, 16, 100,
KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_DANGEON_KEEP, D_05000530);
KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_DANGEON_KEEP, gBrownFragmentDL);
}
}
}
@ -231,7 +230,7 @@ void func_8088A67C(BgHidanKowarerukabe* this, GlobalContext* globalCtx) {
}
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &thisx->world.pos, -540, arg5, 20, 20, 0, arg9, 2, 32, 100,
KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_DANGEON_KEEP, D_05000530);
KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_DANGEON_KEEP, gBrownFragmentDL);
}
}
}
@ -242,7 +241,7 @@ void BgHidanKowarerukabe_LargeWallBreak(BgHidanKowarerukabe* this, GlobalContext
Vec3f velocity;
Vec3f pos;
s16 arg5;
Actor* thisx = &this->dyna.actor;
Actor* thisx = &this->dyna.actor;
f32 sin = Math_SinS(thisx->shape.rot.y);
f32 cos = Math_CosS(thisx->shape.rot.y);
f32 tmp1;
@ -272,7 +271,7 @@ void BgHidanKowarerukabe_LargeWallBreak(BgHidanKowarerukabe* this, GlobalContext
}
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &thisx->world.pos, -650, arg5, 20, 20, 0, arg9, 2, 32, 100,
KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_DANGEON_KEEP, D_05000530);
KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_DANGEON_KEEP, gBrownFragmentDL);
}
}
}

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_jya_block.h"
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#define FLAGS 0x00000000
@ -34,17 +35,13 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1500, ICHAIN_STOP),
};
extern UNK_TYPE D_05004350;
extern Gfx D_05004CD0[];
extern CollisionHeader D_05004E98;
void BgJyaBlock_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
BgJyaBlock* this = THIS;
CollisionHeader* colHeader = NULL;
DynaPolyActor_Init(&this->dyna, 0);
CollisionHeader_GetVirtual(&D_05004E98, &colHeader);
CollisionHeader_GetVirtual(&gPushBlockCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
@ -72,11 +69,11 @@ void BgJyaBlock_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&D_05004350));
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gPushBlockGrayTex));
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_block.c", 153),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetEnvColor(POLY_OPA_DISP++, 232, 210, 176, 255);
gSPDisplayList(POLY_OPA_DISP++, D_05004CD0);
gSPDisplayList(POLY_OPA_DISP++, gPushBlockDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_block.c", 158);
}

View file

@ -37,7 +37,6 @@ static InitChainEntry sInitChain[] = {
extern CollisionHeader D_060074EC;
void BgMizuUzu_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
BgMizuUzu* this = THIS;

View file

@ -62,7 +62,9 @@ void BgPushbox_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_808A8BAC(BgPushbox* this, GlobalContext* globalCtx) {
this->dyna.actor.speedXZ += this->dyna.unk_150 * 0.2f;
this->dyna.actor.speedXZ = (this->dyna.actor.speedXZ < -1.0f) ? -1.0f : ((this->dyna.actor.speedXZ > 1.0f) ? 1.0f : this->dyna.actor.speedXZ);
this->dyna.actor.speedXZ = (this->dyna.actor.speedXZ < -1.0f)
? -1.0f
: ((this->dyna.actor.speedXZ > 1.0f) ? 1.0f : this->dyna.actor.speedXZ);
Math_StepToF(&this->dyna.actor.speedXZ, 0.0f, 0.2f);
this->dyna.actor.world.rot.y = this->dyna.unk_158;
Actor_MoveForward(&this->dyna.actor);

View file

@ -92,7 +92,8 @@ void func_808AE5B4(BgSpot05Soko* this, GlobalContext* globalCtx) {
void func_808AE630(BgSpot05Soko* this, GlobalContext* globalCtx) {
this->dyna.actor.speedXZ *= 1.5f;
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y - 120.0f, this->dyna.actor.speedXZ) != 0) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y - 120.0f, this->dyna.actor.speedXZ) !=
0) {
Actor_Kill(&this->dyna.actor);
}
}

View file

@ -282,7 +282,8 @@ void BgSpot06Objects_LockSpawnWaterRipples(BgSpot06Objects* this, GlobalContext*
void BgSpot06Objects_LockSpawnBubbles(BgSpot06Objects* this, GlobalContext* globalCtx, s32 flag) {
if (!(globalCtx->gameplayFrames % 7) || flag) {
EffectSsBubble_Spawn(globalCtx, &this->dyna.actor.world.pos, 0.0f, 40.0f, 30.0f, (Rand_ZeroOne() * 0.05f) + 0.175f);
EffectSsBubble_Spawn(globalCtx, &this->dyna.actor.world.pos, 0.0f, 40.0f, 30.0f,
(Rand_ZeroOne() * 0.05f) + 0.175f);
}
}

View file

@ -316,7 +316,7 @@ void BgSpot08Iceblock_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_Kill(&this->dyna.actor);
return;
}
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
switch (this->dyna.actor.params & 0xF0) {

View file

@ -46,7 +46,8 @@ static InitChainEntry sInitChain[] = {
extern Gfx D_06001080[];
extern CollisionHeader D_060011EC;
void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flags) {
void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flags) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;
@ -111,7 +112,8 @@ void func_808B318C(BgSpot12Gate* this, GlobalContext* globalCtx) {
s32 var;
Math_StepToF(&this->dyna.actor.velocity.y, 1.6f, 0.03f);
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 200.0f, this->dyna.actor.velocity.y)) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 200.0f,
this->dyna.actor.velocity.y)) {
func_808B3274(this);
var = Quake_Add(ACTIVE_CAM, 3);
Quake_SetSpeed(var, -0x3CB0);

View file

@ -116,8 +116,10 @@ void func_808B3604(BgSpot12Saku* this, GlobalContext* globalCtx) {
void func_808B3714(BgSpot12Saku* this) {
this->actionFunc = func_808B37AC;
this->dyna.actor.scale.x = 0.001f / 0.14f;
this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x - (Math_SinS(this->dyna.actor.shape.rot.y + 0x4000) * 78.0f);
this->dyna.actor.world.pos.z = this->dyna.actor.home.pos.z - (Math_CosS(this->dyna.actor.shape.rot.y + 0x4000) * 78.0f);
this->dyna.actor.world.pos.x =
this->dyna.actor.home.pos.x - (Math_SinS(this->dyna.actor.shape.rot.y + 0x4000) * 78.0f);
this->dyna.actor.world.pos.z =
this->dyna.actor.home.pos.z - (Math_CosS(this->dyna.actor.shape.rot.y + 0x4000) * 78.0f);
}
void func_808B37AC(BgSpot12Saku* this, GlobalContext* globalCtx) {

View file

@ -87,8 +87,9 @@ void func_808B3A34(BgSpot15Rrbox* this) {
s32 func_808B3A40(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
DynaPolyActor* dynaPolyActor = DynaPoly_GetActor(&globalCtx->colCtx, this->bgId);
if ((dynaPolyActor != NULL) && Math3D_Dist2DSq(dynaPolyActor->actor.world.pos.x, dynaPolyActor->actor.world.pos.z,
this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.z) < 0.01f) {
if ((dynaPolyActor != NULL) &&
Math3D_Dist2DSq(dynaPolyActor->actor.world.pos.x, dynaPolyActor->actor.world.pos.z,
this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.z) < 0.01f) {
return true;
}
return false;

View file

@ -93,7 +93,7 @@ void BgSpot15Saku_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->timer != 0) {
this->timer--;
}
this->actionFunc(this, globalCtx);
}

View file

@ -82,8 +82,7 @@ void func_808B7710(Actor* thisx, GlobalContext* globalCtx) {
BgSpot18Basket* this = THIS;
Collider_InitJntSph(globalCtx, &this->colliderJntSph);
Collider_SetJntSph(globalCtx, &this->colliderJntSph, &this->dyna.actor, &sJntSphInit,
this->ColliderJntSphElements);
Collider_SetJntSph(globalCtx, &this->colliderJntSph, &this->dyna.actor, &sJntSphInit, this->ColliderJntSphElements);
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
}
@ -155,8 +154,9 @@ void BgSpot18Basket_Init(Actor* thisx, GlobalContext* globalCtx) {
}
func_808B7AEC(this);
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_BG_SPOT18_FUTA, this->dyna.actor.world.pos.x,
this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, this->dyna.actor.shape.rot.x, this->dyna.actor.shape.rot.y + 0x1555,
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_BG_SPOT18_FUTA,
this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
this->dyna.actor.shape.rot.x, this->dyna.actor.shape.rot.y + 0x1555,
this->dyna.actor.shape.rot.z, -1);
if (this->dyna.actor.child == NULL) {

View file

@ -200,7 +200,7 @@ void BgYdanHasi_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, - globalCtx->gameplayFrames & 0x7F,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, -globalCtx->gameplayFrames & 0x7F,
globalCtx->gameplayFrames & 0x7F, 0x20, 0x20, 1, globalCtx->gameplayFrames & 0x7F,
globalCtx->gameplayFrames & 0x7F, 0x20, 0x20));
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 592),

View file

@ -1163,7 +1163,7 @@ s32 DemoIm_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
if ((*unk_2D0 != 0) && (limbIndex == 15)) {
*dList = D_0600EDE8;
}
return false;
}
@ -1202,8 +1202,8 @@ void func_80987658(DemoIm* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
SkelAnime_DrawFlexOpa(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, DemoIm_OverrideLimbDraw,
DemoIm_PostLimbDraw, this);
SkelAnime_DrawFlexOpa(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
DemoIm_OverrideLimbDraw, DemoIm_PostLimbDraw, this);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_im.c", 925);
}

View file

@ -102,8 +102,8 @@ void func_80993848(DemoTreLgt* this, GlobalContext* globalCtx) {
if (currentFrame < sDemoTreLgtInfo[((void)0, gSaveContext.linkAge)].endFrame) {
this->unk_170 = 255;
} else {
if (currentFrame <=
(sDemoTreLgtInfo[((void)0, gSaveContext.linkAge)].endFrame + sDemoTreLgtInfo[((void)0, gSaveContext.linkAge)].unk_08)) {
if (currentFrame <= (sDemoTreLgtInfo[((void)0, gSaveContext.linkAge)].endFrame +
sDemoTreLgtInfo[((void)0, gSaveContext.linkAge)].unk_08)) {
this->unk_170 = ((((sDemoTreLgtInfo[((void)0, gSaveContext.linkAge)].endFrame - currentFrame) /
sDemoTreLgtInfo[((void)0, gSaveContext.linkAge)].unk_08) *
255.0f) +

View file

@ -64,8 +64,6 @@ static ColliderCylinderInit sCylinderInit = {
{ 30, 40, 0, { 0 } },
};
void EnAni_SetupAction(EnAni* this, EnAniActionFunc actionFunc) {
this->actionFunc = actionFunc;
}

View file

@ -51,9 +51,9 @@ void EnAnubiceTag_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void EnAnubiceTag_SpawnAnubis(EnAnubiceTag* this, GlobalContext* globalCtx) {
this->anubis =
(EnAnubice*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ANUBICE, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, this->actor.yawTowardsPlayer, 0, 0);
this->anubis = (EnAnubice*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ANUBICE,
this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, 0, this->actor.yawTowardsPlayer, 0, 0);
if (this->anubis != NULL) {
this->actionFunc = EnAnubiceTag_ManageAnubis;

View file

@ -131,8 +131,8 @@ void EnArrow_Init(Actor* thisx, GlobalContext* globalCtx) {
this->collider.base.atFlags = (AT_ON | AT_TYPE_ENEMY);
} else if (this->actor.params <= ARROW_SEED) {
this->collider.info.toucher.dmgFlags = dmgFlags[this->actor.params];
LOG_HEX("this->at_info.cl_elem.at_btl_info.at_type", this->collider.info.toucher.dmgFlags, "../z_en_arrow.c",
707);
LOG_HEX("this->at_info.cl_elem.at_btl_info.at_type", this->collider.info.toucher.dmgFlags,
"../z_en_arrow.c", 707);
}
}
@ -250,19 +250,19 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) {
Actor* hitActor;
Vec3f sp60;
Vec3f sp54;
if (DECR(this->timer) == 0) {
Actor_Kill(&this->actor);
return;
}
if (this->timer < 7.2000003f) {
this->actor.gravity = -0.4f;
}
atTouched = (this->actor.params != ARROW_NORMAL_LIT) && (this->actor.params <= ARROW_SEED) &&
(this->collider.base.atFlags & AT_HIT);
if (atTouched || this->touchedPoly) {
if (this->actor.params >= ARROW_SEED) {
if (atTouched) {
@ -270,7 +270,7 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) {
this->actor.world.pos.y = (this->actor.world.pos.y + this->actor.prevPos.y) * 0.5f;
this->actor.world.pos.z = (this->actor.world.pos.z + this->actor.prevPos.z) * 0.5f;
}
if (this->actor.params == ARROW_NUT) {
iREG(50) = -1;
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_M_FIRE1, this->actor.world.pos.x,
@ -279,16 +279,16 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) {
} else {
sfxId = NA_SE_IT_SLING_REFLECT;
}
EffectSsStone1_Spawn(globalCtx, &this->actor.world.pos, 0);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, sfxId);
Actor_Kill(&this->actor);
} else {
EffectSsHitMark_SpawnCustomScale(globalCtx, 0, 150, &this->actor.world.pos);
if (atTouched && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
hitActor = this->collider.base.at;
if ((hitActor->update != NULL) && (!(this->collider.base.atFlags & AT_BOUNCED)) &&
(hitActor->flags & 0x4000)) {
this->hitActor = hitActor;
@ -301,26 +301,26 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) {
} else {
this->hitFlags |= 1;
this->hitFlags |= 2;
if (this->collider.info.atHitInfo->bumperFlags & 2) {
this->actor.world.pos.x = this->collider.info.atHitInfo->bumper.hitPos.x;
this->actor.world.pos.y = this->collider.info.atHitInfo->bumper.hitPos.y;
this->actor.world.pos.z = this->collider.info.atHitInfo->bumper.hitPos.z;
}
func_809B3CEC(globalCtx, this);
Audio_PlayActorSound2(&this->actor, NA_SE_IT_ARROW_STICK_CRE);
}
} else if (this->touchedPoly) {
EnArrow_SetupAction(this, func_809B45E0);
Animation_PlayOnce(&this->skelAnime, &gArrow2Anim);
if (this->actor.params >= ARROW_NORMAL_LIT) {
this->timer = 60;
} else {
this->timer = 20;
}
Audio_PlayActorSound2(&this->actor, NA_SE_IT_ARROW_STICK_OBJ);
this->hitFlags |= 1;
}
@ -328,7 +328,7 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) {
} else {
Math_Vec3f_Copy(&this->unk_210, &this->actor.world.pos);
Actor_MoveForward(&this->actor);
if (this->touchedPoly =
BgCheck_ProjectileLineTest(&globalCtx->colCtx, &this->actor.prevPos, &this->actor.world.pos, &hitPoint,
&this->actor.wallPoly, true, true, true, true, &bgId)) {
@ -336,17 +336,17 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) {
Math_Vec3f_Copy(&posCopy, &this->actor.world.pos);
Math_Vec3f_Copy(&this->actor.world.pos, &hitPoint);
}
if (this->actor.params <= ARROW_0E) {
this->actor.shape.rot.x = Math_Atan2S(this->actor.speedXZ, -this->actor.velocity.y);
}
}
if (this->hitActor != NULL) {
if (this->hitActor->update != NULL) {
Math_Vec3f_Sum(&this->unk_210, &this->unk_250, &sp60);
Math_Vec3f_Sum(&this->actor.world.pos, &this->unk_250, &sp54);
if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp60, &sp54, &hitPoint, &hitPoly, true, true, true, true,
&bgId)) {
this->hitActor->world.pos.x = hitPoint.x + ((sp54.x <= hitPoint.x) ? 1.0f : -1.0f);
@ -358,7 +358,7 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) {
} else {
Math_Vec3f_Sum(&this->actor.world.pos, &this->unk_250, &this->hitActor->world.pos);
}
if (this->touchedPoly && (this->hitActor != NULL)) {
this->hitActor->flags &= ~0x8000;
this->hitActor = NULL;
@ -402,8 +402,7 @@ void EnArrow_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->actor.child == NULL) {
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, elementalActorIds[this->actor.params - 3],
this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0,
0);
this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0);
}
} else if (this->actor.params == ARROW_NORMAL_LIT) {
static Vec3f velocity = { 0.0f, 0.5f, 0.0f };

View file

@ -215,7 +215,8 @@ void EnCs_HandleTalking(EnCs* this, GlobalContext* globalCtx) {
} else {
func_8002F374(globalCtx, &this->actor, &sp2A, &sp28);
if ((sp2A >= 0) && (sp2A <= 320) && (sp28 >= 0) && (sp28 <= 240) && (func_8002F2CC(&this->actor, globalCtx, 100.0f))) {
if ((sp2A >= 0) && (sp2A <= 320) && (sp28 >= 0) && (sp28 <= 240) &&
(func_8002F2CC(&this->actor, globalCtx, 100.0f))) {
this->actor.textId = EnCs_GetTextID(this, globalCtx);
}
}

View file

@ -111,7 +111,7 @@ void EnFu_Init(Actor* thisx, GlobalContext* globalCtx) {
void EnFu_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnFu* this = THIS;
Collider_DestroyCylinder(globalCtx, &this->collider);
}

View file

@ -113,10 +113,10 @@ typedef struct {
} ShopItemEntry; // size = 0x20
static ShopItemEntry D_80A3C674[] = {
{ OBJECT_GI_NUTS, GID_NUTS, func_8002ED80, 0x000F, 0x0005, 0x00B2, 0x007F, GI_NUTS_5_2, func_80A3ABF8, func_80A3B714,
func_80A3BB6C },
{ OBJECT_GI_ARROW, GID_ARROWS_MEDIUM, func_8002EBCC, 0x003C, 0x001E, 0x00C1, 0x009B, GI_ARROWS_MEDIUM, func_80A3AAA8,
func_80A3B634, func_80A3BB6C },
{ OBJECT_GI_NUTS, GID_NUTS, func_8002ED80, 0x000F, 0x0005, 0x00B2, 0x007F, GI_NUTS_5_2, func_80A3ABF8,
func_80A3B714, func_80A3BB6C },
{ OBJECT_GI_ARROW, GID_ARROWS_MEDIUM, func_8002EBCC, 0x003C, 0x001E, 0x00C1, 0x009B, GI_ARROWS_MEDIUM,
func_80A3AAA8, func_80A3B634, func_80A3BB6C },
{ OBJECT_GI_ARROW, GID_ARROWS_LARGE, func_8002EBCC, 0x005A, 0x0032, 0x00B0, 0x007D, GI_ARROWS_LARGE, func_80A3AAA8,
func_80A3B634, func_80A3BB6C },
{ OBJECT_GI_BOMB_1, GID_BOMB, func_8002EBCC, 0x0019, 0x0005, 0x00A3, 0x008B, GI_BOMBS_5, func_80A3AB58,
@ -189,8 +189,8 @@ static ShopItemEntry D_80A3C674[] = {
func_80A3BA04, func_80A3BB6C },
{ OBJECT_GI_GERUDOMASK, GID_MASK_GERUDO, NULL, 0x0000, 0x0001, 0x70BA, 0x70C2, GI_MASK_GERUDO, func_80A3B3A8,
func_80A3BA04, func_80A3BB6C },
{ OBJECT_GI_SOLDOUT, GID_SOLDOUT, func_8002EBCC, 0x0000, 0x0000, 0x00BD, 0x70C2, GI_MASK_GERUDO, func_80A3B454, NULL,
NULL },
{ OBJECT_GI_SOLDOUT, GID_SOLDOUT, func_8002EBCC, 0x0000, 0x0000, 0x00BD, 0x70C2, GI_MASK_GERUDO, func_80A3B454,
NULL, NULL },
{ OBJECT_GI_FIRE, GID_BLUE_FIRE, func_8002EBCC, 0x012C, 0x0001, 0x00B9, 0x00B8, GI_BLUE_FIRE, func_80A3B464,
func_80A3BA40, func_80A3BB6C },
{ OBJECT_GI_INSECT, GID_BUG, func_80A3C498, 0x0032, 0x0001, 0x00BB, 0x00BA, GI_BUGS, func_80A3B4D8, func_80A3BA40,

View file

@ -599,8 +599,8 @@ void func_80A3F908(EnGo* this, GlobalContext* globalCtx) {
isUnkCondition =
func_80A3ED24(globalCtx, this, &this->unk_1E0, float1, EnGo_GetTextID, EnGo_SetFlagsGetStates);
} else {
isUnkCondition =
func_800343CC(globalCtx, &this->actor, &this->unk_1E0.unk_00, float1, EnGo_GetTextID, EnGo_SetFlagsGetStates);
isUnkCondition = func_800343CC(globalCtx, &this->actor, &this->unk_1E0.unk_00, float1, EnGo_GetTextID,
EnGo_SetFlagsGetStates);
}
if (((this->actor.params & 0xF0) == 0x90) && (isUnkCondition == true)) {

View file

@ -775,7 +775,7 @@ u16 EnGo2_GetTextId(GlobalContext* globalCtx, Actor* thisx) {
s16 EnGo2_GetState(GlobalContext* globalCtx, Actor* thisx) {
EnGo2* this = THIS;
switch (this->actor.params & 0x1F) {
case GORON_CITY_ROLLING_BIG:
return EnGo2_GetStateGoronCityRollingBig(globalCtx, this);

View file

@ -1,4 +1,5 @@
#include "z_en_goma.h"
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#define FLAGS 0x00000035
@ -9,7 +10,6 @@ void EnGoma_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnGoma_Update(Actor* thisx, GlobalContext* globalCtx);
void EnGoma_Draw(Actor* thisx, GlobalContext* globalCtx);
extern UNK_TYPE D_05000530;
extern UNK_TYPE D_0600017C;
extern UNK_TYPE D_06000334;
extern UNK_TYPE D_06000544;

View file

@ -288,7 +288,6 @@ void func_80A53638(EnHeishi2* this, GlobalContext* globalCtx) {
s32 pad;
f32 frameCount = this->skelAnime.curFrame;
BgSpot15Saku* actor = (BgSpot15Saku*)globalCtx->actorCtx.actorLists[ACTORCAT_ITEMACTION].head;
SkelAnime_Update(&this->skelAnime);

View file

@ -6,6 +6,7 @@
#include "z_en_honotrap.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#define FLAGS 0x00000010
@ -48,8 +49,6 @@ void EnHonotrap_FlameChase(EnHonotrap* this, GlobalContext* globalCtx);
void EnHonotrap_SetupFlameVanish(EnHonotrap* this);
void EnHonotrap_FlameVanish(EnHonotrap* this, GlobalContext* globalCtx);
extern Gfx D_05006810[];
const ActorInit En_Honotrap_InitVars = {
ACTOR_EN_HONOTRAP,
ACTORCAT_PROP,
@ -488,7 +487,12 @@ void EnHonotrap_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void EnHonotrap_DrawEye(Actor* thisx, GlobalContext* globalCtx) {
static void* eyeTextures[] = { 0x0500B0A0, 0x0500B8A0, 0x0500C0A0, 0x0500C0A0 };
static void* eyeTextures[] = {
gEyeSwitchSilverOpenTex,
gEyeSwitchSilverHalfTex,
gEyeSwitchSilverClosedTex,
gEyeSwitchSilverClosedTex,
};
EnHonotrap* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_honotrap.c", 982);
@ -497,7 +501,7 @@ void EnHonotrap_DrawEye(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeState]));
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_honotrap.c", 987),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_05006810);
gSPDisplayList(POLY_OPA_DISP++, gEyeSwitch2DL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_honotrap.c", 991);
}

View file

@ -419,7 +419,7 @@ u16 EnMd_GetText(GlobalContext* globalCtx, Actor* thisx) {
s16 func_80AAAF04(GlobalContext* globalCtx, Actor* thisx) {
EnMd* this = THIS;
switch (func_80AAAC78(this, globalCtx)) {
case 0:
case 1:

View file

@ -569,7 +569,7 @@ void func_80AEBA2C(EnRu1* this, GlobalContext* globalCtx) {
f32 temp_ret_2;
CsCmdActorAction* csCmdNPCAction = func_80AEB438(globalCtx);
s32 pad2;
if (csCmdNPCAction != NULL) {
temp_ret_2 = func_80AEB7E0(csCmdNPCAction, globalCtx);
thisPos = &this->actor.world.pos;
@ -1020,8 +1020,8 @@ void func_80AECCB0(EnRu1* this, GlobalContext* globalCtx) {
spawnX = ((kREG(1) + 12.0f) * Math_SinS(yawTowardsPlayer)) + pos->x;
spawnY = pos->y;
spawnZ = ((kREG(1) + 12.0f) * Math_CosS(yawTowardsPlayer)) + pos->z;
this->unk_278 = (DoorWarp1*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, spawnX,
spawnY, spawnZ, 0, yawTowardsPlayer, 0, 5);
this->unk_278 = (DoorWarp1*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1,
spawnX, spawnY, spawnZ, 0, yawTowardsPlayer, 0, 5);
}
void func_80AECDA0(EnRu1* this, GlobalContext* globalCtx) {
@ -1558,8 +1558,8 @@ s32 func_80AEE394(EnRu1* this, GlobalContext* globalCtx) {
colCtx = &globalCtx->colCtx;
floorBgId = this->actor.floorBgId; // necessary match, can't move this out of this block unfortunately
dynaPolyActor = DynaPoly_GetActor(colCtx, floorBgId);
if (dynaPolyActor != NULL && dynaPolyActor->actor.id == ACTOR_BG_BDAN_OBJECTS && dynaPolyActor->actor.params == 0 &&
!Player_InCsMode(globalCtx) && globalCtx->msgCtx.unk_E300 == 0) {
if (dynaPolyActor != NULL && dynaPolyActor->actor.id == ACTOR_BG_BDAN_OBJECTS &&
dynaPolyActor->actor.params == 0 && !Player_InCsMode(globalCtx) && globalCtx->msgCtx.unk_E300 == 0) {
func_80AEE02C(this);
globalCtx->csCtx.segment = &D_80AF10A4;
gSaveContext.cutsceneTrigger = 1;

View file

@ -825,7 +825,8 @@ void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) {
void EnRu2_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnRu2* this = THIS;
if ((this->drawConfig < 0) || (this->drawConfig >= ARRAY_COUNT(sDrawFuncs)) || (sDrawFuncs[this->drawConfig] == 0)) {
if ((this->drawConfig < 0) || (this->drawConfig >= ARRAY_COUNT(sDrawFuncs)) ||
(sDrawFuncs[this->drawConfig] == 0)) {
// Draw Mode is improper!
osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
return;

View file

@ -5,6 +5,7 @@
*/
#include "z_en_tubo_trap.h"
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "vt.h"
@ -53,9 +54,6 @@ const ActorInit En_Tubo_Trap_InitVars = {
(ActorFunc)EnTuboTrap_Draw,
};
extern Gfx D_05017A60[];
extern Gfx D_05017870[];
void EnTuboTrap_Init(Actor* thisx, GlobalContext* globalCtx) {
EnTuboTrap* this = THIS;
@ -120,7 +118,7 @@ void EnTuboTrap_SpawnEffectsOnLand(EnTuboTrap* this, GlobalContext* globalCtx) {
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, actorPos, -240, arg5, 10, 10, 0,
(Rand_ZeroOne() * 65.0f) + 15.0f, 0, 32, 60, KAKERA_COLOR_NONE,
OBJECT_GAMEPLAY_DANGEON_KEEP, D_05017A60);
OBJECT_GAMEPLAY_DANGEON_KEEP, gPotFragmentDL);
}
func_80033480(globalCtx, actorPos, 30.0f, 4, 20, 50, 0);
@ -166,7 +164,7 @@ void EnTuboTrap_SpawnEffectsInWater(EnTuboTrap* this, GlobalContext* globalCtx)
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, actorPos, -180, arg5, 30, 30, 0,
(Rand_ZeroOne() * 65.0f) + 15.0f, 0, 32, 70, KAKERA_COLOR_NONE,
OBJECT_GAMEPLAY_DANGEON_KEEP, D_05017A60);
OBJECT_GAMEPLAY_DANGEON_KEEP, gPotFragmentDL);
}
}
@ -289,5 +287,5 @@ void EnTuboTrap_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void EnTuboTrap_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, D_05017870);
Gfx_DrawDListOpa(globalCtx, gPotDL);
}

View file

@ -36,7 +36,7 @@ void EnVase_Init(Actor* thisx, GlobalContext* globalCtx) {
}
void EnVase_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
}
void EnVase_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, gUnusedVaseDL);

View file

@ -44,8 +44,9 @@ static s16 sObjectIds[] = {
// Indexes passed to the item table in z_draw.c
static s16 sDrawItemIndexes[] = {
GID_BOTTLE, GID_LETTER_RUTO, GID_SHIELD_HYLIAN, GID_QUIVER_40, GID_SCALE_SILVER, GID_SCALE_GOLDEN, GID_KEY_SMALL,
GID_ARROW_FIRE, GID_RUPEE_GREEN, GID_RUPEE_BLUE, GID_RUPEE_RED, GID_RUPEE_PURPLE, GID_HEART_PIECE, GID_KEY_SMALL,
GID_BOTTLE, GID_LETTER_RUTO, GID_SHIELD_HYLIAN, GID_QUIVER_40, GID_SCALE_SILVER,
GID_SCALE_GOLDEN, GID_KEY_SMALL, GID_ARROW_FIRE, GID_RUPEE_GREEN, GID_RUPEE_BLUE,
GID_RUPEE_RED, GID_RUPEE_PURPLE, GID_HEART_PIECE, GID_KEY_SMALL,
};
static s16 sGetItemIds[] = {

View file

@ -69,9 +69,9 @@ void func_80B93B68(ObjHsblock* this, GlobalContext* globalCtx, CollisionHeader*
void func_80B93BF0(ObjHsblock* this, GlobalContext* globalCtx) {
if ((this->dyna.actor.params >> 5) & 1) {
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_OBJ_ICE_POLY, this->dyna.actor.world.pos.x,
this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, this->dyna.actor.world.rot.x,
this->dyna.actor.world.rot.y, this->dyna.actor.world.rot.z, 1);
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_OBJ_ICE_POLY,
this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
this->dyna.actor.world.rot.x, this->dyna.actor.world.rot.y, this->dyna.actor.world.rot.z, 1);
}
}

View file

@ -5,6 +5,7 @@
*/
#include "z_obj_kibako.h"
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#define FLAGS 0x04000010
@ -23,9 +24,6 @@ void ObjKibako_Held(ObjKibako* this, GlobalContext* globalCtx);
void ObjKibako_SetupThrown(ObjKibako* this);
void ObjKibako_Thrown(ObjKibako* this, GlobalContext* globalCtx);
extern Gfx D_05005290[];
extern Gfx D_05005380[];
const ActorInit Obj_Kibako_InitVars = {
ACTOR_OBJ_KIBAKO,
ACTORCAT_PROP,
@ -145,7 +143,7 @@ void ObjKibako_AirBreak(ObjKibako* this, GlobalContext* globalCtx) {
}
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, breakPos, -200, phi_s0, 10, 10, 0,
(Rand_ZeroOne() * 30.0f) + 10.0f, 0, 32, 60, KAKERA_COLOR_NONE,
OBJECT_GAMEPLAY_DANGEON_KEEP, D_05005380);
OBJECT_GAMEPLAY_DANGEON_KEEP, gSmallWoodenBoxFragmentDL);
}
func_80033480(globalCtx, &this->actor.world.pos, 40.0f, 3, 50, 140, 1);
}
@ -180,7 +178,7 @@ void ObjKibako_WaterBreak(ObjKibako* this, GlobalContext* globalCtx) {
phi_s0 = (temp_rand < 0.2f) ? 0x40 : 0x20;
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, breakPos, -180, phi_s0, 30, 30, 0,
(Rand_ZeroOne() * 30.0f) + 10.0f, 0, 32, 70, KAKERA_COLOR_NONE,
OBJECT_GAMEPLAY_DANGEON_KEEP, D_05005380);
OBJECT_GAMEPLAY_DANGEON_KEEP, gSmallWoodenBoxFragmentDL);
}
}
@ -287,5 +285,5 @@ void ObjKibako_Draw(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
ObjKibako* this = THIS;
Gfx_DrawDListOpa(globalCtx, D_05005290);
Gfx_DrawDListOpa(globalCtx, gSmallWoodenBoxDL);
}

View file

@ -5,8 +5,8 @@
*/
#include "z_obj_makeoshihiki.h"
#include "vt.h"
#include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h"
#include "vt.h"
#define FLAGS 0x00000020

View file

@ -6,6 +6,7 @@
#include "z_obj_oshihiki.h"
#include "overlays/actors/ovl_Obj_Switch/z_obj_switch.h"
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#define FLAGS 0x00000010
@ -25,12 +26,6 @@ void ObjOshihiki_Push(ObjOshihiki* this, GlobalContext* globalCtx);
void ObjOshihiki_SetupFall(ObjOshihiki* this, GlobalContext* globalCtx);
void ObjOshihiki_Fall(ObjOshihiki* this, GlobalContext* globalCtx);
extern CollisionHeader D_05004E98;
extern UNK_TYPE D_05003350;
extern UNK_TYPE D_05003B50;
extern UNK_TYPE D_05004350;
extern Gfx D_05004CD0[];
const ActorInit Obj_Oshihiki_InitVars = {
ACTOR_OBJ_OSHIHIKI,
ACTORCAT_PROP,
@ -216,7 +211,7 @@ void ObjOshihiki_CheckType(ObjOshihiki* this, GlobalContext* globalCtx) {
case PUSHBLOCK_MEDIUM_START_OFF:
case PUSHBLOCK_LARGE_START_OFF:
case PUSHBLOCK_HUGE_START_OFF:
ObjOshihiki_InitDynapoly(this, globalCtx, &D_05004E98, 1);
ObjOshihiki_InitDynapoly(this, globalCtx, &gPushBlockCol, 1);
break;
default:
// Error : type cannot be determined
@ -236,15 +231,15 @@ void ObjOshihiki_SetTexture(ObjOshihiki* this, GlobalContext* globalCtx) {
case PUSHBLOCK_MEDIUM_START_ON:
case PUSHBLOCK_SMALL_START_OFF:
case PUSHBLOCK_MEDIUM_START_OFF:
this->texture = &D_05003350;
this->texture = gPushBlockSilverTex;
break;
case PUSHBLOCK_LARGE_START_ON:
case PUSHBLOCK_LARGE_START_OFF:
this->texture = &D_05003B50;
this->texture = gPushBlockBaseTex;
break;
case PUSHBLOCK_HUGE_START_ON:
case PUSHBLOCK_HUGE_START_OFF:
this->texture = &D_05004350;
this->texture = gPushBlockGrayTex;
break;
}
}
@ -690,6 +685,6 @@ void ObjOshihiki_Draw(Actor* thisx, GlobalContext* globalCtx) {
break;
}
gSPDisplayList(POLY_OPA_DISP++, &D_05004CD0);
gSPDisplayList(POLY_OPA_DISP++, &gPushBlockDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_oshihiki.c", 1334);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_obj_switch.h"
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "vt.h"
#define FLAGS 0x00000010
@ -50,13 +51,6 @@ void ObjSwitch_CrystalOn(ObjSwitch* this, GlobalContext* globalCtx);
void ObjSwitch_CrystalTurnOffInit(ObjSwitch* this);
void ObjSwitch_CrystalTurnOff(ObjSwitch* this, GlobalContext* globalCtx);
extern Gfx D_05005AD0[]; // floor switch, rusty
extern CollisionHeader D_05005FB8;
// rgba16 32x32 textures
extern UNK_TYPE D_050144B0[]; // red plasma/cloud
extern UNK_TYPE D_05014CB0[]; // blue plasma/cloud
const ActorInit Obj_Switch_InitVars = {
ACTOR_OBJ_SWITCH,
ACTORCAT_SWITCH,
@ -295,7 +289,7 @@ void ObjSwitch_Init(Actor* thisx, GlobalContext* globalCtx) {
type = (this->dyna.actor.params & 7);
if (type == OBJSWITCH_TYPE_FLOOR || type == OBJSWITCH_TYPE_FLOOR_RUSTY) {
ObjSwitch_InitDynapoly(this, globalCtx, &D_05005FB8, DPM_PLAYER);
ObjSwitch_InitDynapoly(this, globalCtx, &gFloorSwitchCol, DPM_PLAYER);
}
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
@ -593,7 +587,7 @@ void ObjSwitch_CrystalOffInit(ObjSwitch* this) {
this->crystalColor.r = 0;
this->crystalColor.g = 0;
this->crystalColor.b = 0;
this->crystalSubtype1texture = D_050144B0;
this->crystalSubtype1texture = gCrstalSwitchRedTex;
this->actionFunc = ObjSwitch_CrystalOff;
}
@ -644,7 +638,7 @@ void ObjSwitch_CrystalOnInit(ObjSwitch* this) {
this->crystalColor.r = 255;
this->crystalColor.g = 255;
this->crystalColor.b = 255;
this->crystalSubtype1texture = D_05014CB0;
this->crystalSubtype1texture = gCrstalSwitchBlueTex;
this->actionFunc = ObjSwitch_CrystalOn;
}
@ -720,35 +714,32 @@ void ObjSwitch_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void ObjSwitch_DrawFloor(ObjSwitch* this, GlobalContext* globalCtx) {
static Gfx* floorDlists[] = { 0x05005800, 0x05006170, 0x05005D50, 0x05005D50 };
static Gfx* floorSwitchDLists[] = { gFloorSwitch1DL, gFloorSwitch3DL, gFloorSwitch2DL, gFloorSwitch2DL };
Gfx_DrawDListOpa(globalCtx, floorDlists[(this->dyna.actor.params >> 4 & 7)]);
Gfx_DrawDListOpa(globalCtx, floorSwitchDLists[(this->dyna.actor.params >> 4 & 7)]);
}
void ObjSwitch_DrawFloorRusty(ObjSwitch* this, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, D_05005AD0);
Gfx_DrawDListOpa(globalCtx, gRustyFloorSwitchDL);
}
static UNK_PTR sEyeTextures[][4] = {
// rgba16 32x32 textures
// yellow eye
static u64* sEyeTextures[][4] = {
{
0x0500A8A0, // open
0x050098A0, // almost open
0x0500A0A0, // almost closed
0x050090A0, // closed
gEyeSwitchGoldOpenTex,
gEyeSwitchGoldOpeningTex,
gEyeSwitchGoldClosingTex,
gEyeSwitchGoldClosedTex,
},
// silver eye
{
0x0500B0A0, // open
0x0500B8A0, // half-closed
0x0500C0A0, // closed
0x0500C0A0, // closed
gEyeSwitchSilverOpenTex,
gEyeSwitchSilverHalfTex,
gEyeSwitchSilverClosedTex,
gEyeSwitchSilverClosedTex,
},
};
void ObjSwitch_DrawEye(ObjSwitch* this, GlobalContext* globalCtx) {
static Gfx* eyeDlists[] = { 0x05006610, 0x05006810 };
static Gfx* eyeDlists[] = { gEyeSwitch1DL, gEyeSwitch2DL };
s32 pad;
s32 subType = (this->dyna.actor.params >> 4 & 7);
@ -764,8 +755,10 @@ void ObjSwitch_DrawEye(ObjSwitch* this, GlobalContext* globalCtx) {
}
void ObjSwitch_DrawCrystal(ObjSwitch* this, GlobalContext* globalCtx) {
static Gfx* xluDLists[] = { 0x05006E60, 0x05007488, NULL, NULL, 0x05006E60 };
static Gfx* opaDLists[] = { 0x05006D10, 0x05007340, NULL, NULL, 0x05006D10 };
static Gfx* xluDLists[] = { gCrystalSwitchCoreXluDL, gCrystalSwitchDiamondXluDL, NULL, NULL,
gCrystalSwitchCoreXluDL };
static Gfx* opaDLists[] = { gCrystalSwitchCoreOpaDL, gCrystalSwitchDiamondOpaDL, NULL, NULL,
gCrystalSwitchCoreOpaDL };
s32 pad1;
s32 pad2;
s32 subType;