mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 06:10:21 +00:00
decompile z_camera (#398)
* cleanup * name camera action functions * decompile a few small functions, name a few Camera struct members * decompile camera data, decompile a few camera functions * Split ASM for code_800BB0A0 * removing code_800BB0A0.s * PR Requests, Camera WIP * remove #define NON_MATCHING from db_camera * rename code_8007BF90.c to z_olib.c, rename functions in z_olib.c * camera wip * rename some struct memebers, some decomp wip * pr updates * camera wip * name some fields in Camera Struct, being making sense of Camera_Update * Camera WIP * wip * wip * add z64camera.h header, begin creating CameraSetting macros * wip * wip * wip * wip * migrate camera bss to c * match a couple functions in db_camera * match some small db_camera functions * wip * migrate db_camera rodata, match a few functions * remote db_camera.rodata.s * match some of db_camera * identify types of some unknown data pieces * some small wip * Match Camera_Init, some function changes, some struct name changes. Change unk_C0 and unk_CC to floats from Vec3fs * add naming for a few more Camera struct members * wip * match func_80043F94 * Match Camera_Jump1 * document some of Camera_Jump1 * wip * match Camera_Jump3 * Match Camera_Update, FeelsAmazing * wip * wip * match Camera_SetParam * minor cleanup * wip * wip * match Camera_KeepOn0 * some documentation, modify some matching functions to match style of others. * match Camera_Demo1 * match camera_demo9 * document Camera_Demo1 and Camera_Demo9 * wip * Match camera_battle4 * match camera_unique2 * Match Camera_Unique3 * match camera_special6 * match Camera_Special5 * wip * document camera_special6 * naming updates * match camera_Unique1 * match Camera_Unique0 * wip * Match Camera_CalcUpFromPitchYawRoll * match func_80045508 * document Camera_Battle4 * document several camera functions, move camera data to separate file * rename phi/theta to pitch/yaw * wip * uniq9 wip * Camera_Unqiue9 OK * document Camera_Unique9 * name unk_160 in camera struct * wip * wip * minor updates * fix conflicts * wip * wip * Olib updates * wip * wip * rename most Math3D functions, few matches, documentation * wip * document most of math3d * wip * wip * wip * pr updates * Match Camera_Fixed4 * match func_80058E8C * pr updates * add missing comment block finalizer * Merge math3dupdates * match Camera_ChangeSetting * Match Camera_ChangeMode * match func_80058148 * Match Camera_Special9 * decompile the rest of camera data * match Camera_Demo5 * name a few camera functions in z_play * match func_80046CB4, some work on other fucntions * wip * impove some non matchings * fix function rename * match func_800588B4 * match Camera_Subj4 * wip * Camera_Demo3 matching, Camera_Battle1 big progress * Camera_Normal2 OK * wip * match Camera_Parallel1 * normalize some things across functions * match Camera_Normal1 * Match Camera_Normal3 * some cleanup * more cleanup * more cleanup , match Camera_CalcDefaultPitch * data formatting * Match Camera_Jump2 * document Camera_Jump2 * Match Camera_KeepOn3 * document some of Camera_KeepOn3 * improve some non_matchings * match func_80045C74 and func_800460A8 * code cleanup, documentation * match Camera_KeepOn1 * Match Camera_Subj3 * Match Camera_Battle1 * remove non_matching from func_80044adc and func_80046e20 * name several members of Battle1 * more documentation on Battle1 * cleanup * renaming Camera_Vec3fScaleXYZFactor to Camera_Vec3fTranslateByUnitVector * reorganize update structs, remove final references to params, remove CameraParams union * implement camera enums into player * Renaming Camera_GetDir to Camera_GetInputDir, Camera_GetRealDir to Camera_GetCamDir, etc, implement camera enum's into player * remove non-global camera variables from variables.h * clean up some variable declarations * finish pr comment updates * fix some warnings * data formatting * finish commenting on data * delete unused asm * remove asm Co-authored-by: fig <fig02srl@gmail.com>
This commit is contained in:
parent
dadee87f94
commit
321388673b
243 changed files with 13819 additions and 28653 deletions
|
@ -69,11 +69,11 @@ extern UNK_TYPE D_06008CE0;
|
|||
s32 BgBdanObjects_GetContactRu1(BgBdanObjects* this, s32 arg1) {
|
||||
switch (arg1) {
|
||||
case 0:
|
||||
return this->unk_1B8 == 1;
|
||||
return this->cameraSetting == CAM_SET_NORMAL0;
|
||||
case 4:
|
||||
return gSaveContext.infTable[20] & 0x40;
|
||||
case 3:
|
||||
return this->unk_1B8 == 4;
|
||||
return this->cameraSetting == CAM_SET_DUNGEON1;
|
||||
default:
|
||||
osSyncPrintf("Bg_Bdan_Objects_Get_Contact_Ru1\nそんな受信モードは無い%d!!!!!!!!\n");
|
||||
return -1;
|
||||
|
@ -83,10 +83,10 @@ s32 BgBdanObjects_GetContactRu1(BgBdanObjects* this, s32 arg1) {
|
|||
void BgBdanObjects_SetContactRu1(BgBdanObjects* this, s32 arg1) {
|
||||
switch (arg1) {
|
||||
case 1:
|
||||
this->unk_1B8 = 2;
|
||||
this->cameraSetting = CAM_SET_NORMAL1;
|
||||
break;
|
||||
case 2:
|
||||
this->unk_1B8 = 3;
|
||||
this->cameraSetting = CAM_SET_DUNGEON0;
|
||||
break;
|
||||
case 4:
|
||||
gSaveContext.infTable[20] |= 0x40;
|
||||
|
@ -348,13 +348,13 @@ void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (this->unk_168 == 0) {
|
||||
if (func_8004356C(&this->dyna.actor)) {
|
||||
this->unk_1B8 = globalCtx->cameraPtrs[0]->setting;
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], 0x3A);
|
||||
this->cameraSetting = globalCtx->cameraPtrs[0]->setting;
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_NORMAL2);
|
||||
func_8005AD1C(globalCtx->cameraPtrs[0], 4);
|
||||
this->unk_168 = 0xAU;
|
||||
}
|
||||
} else {
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], 0x3A);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_NORMAL2);
|
||||
if (!func_8004356C(&this->dyna.actor)) {
|
||||
if (this->unk_168 != 0) {
|
||||
this->unk_168 -= 1;
|
||||
|
@ -363,7 +363,7 @@ void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_168 == 0) {
|
||||
do {
|
||||
} while (0);
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], this->unk_1B8);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], (s16)this->cameraSetting);
|
||||
func_8005ACFC(globalCtx->cameraPtrs[0], 4);
|
||||
}
|
||||
}
|
||||
|
@ -425,7 +425,7 @@ void func_8086CB8C(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_16A == 0) {
|
||||
Audio_PlayActorSound2(this, NA_SE_EV_BUYOSTAND_STOP_U);
|
||||
this->actionFunc = BgBdanObjects_DoNothing;
|
||||
func_800C078C(globalCtx, 0, -1);
|
||||
Gameplay_CopyCamera(globalCtx, 0, -1);
|
||||
} else {
|
||||
func_8002F974(&this->dyna.actor, NA_SE_EV_BUYOSTAND_FALL - SFX_FLAG);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ typedef struct BgBdanObjects {
|
|||
/* 0x0168 */ u8 unk_168;
|
||||
/* 0x016A */ s16 unk_16A;
|
||||
/* 0x016C */ ColliderCylinder collider;
|
||||
/* 0x01B8 */ s32 unk_1B8;
|
||||
/* 0x01B8 */ s32 cameraSetting;
|
||||
} BgBdanObjects; // size = 0x01BC
|
||||
|
||||
extern const ActorInit Bg_Bdan_Objects_InitVars;
|
||||
|
|
|
@ -159,7 +159,7 @@ void BgDdanKd_LowerStairs(BgDdanKd* this, GlobalContext* globalCtx) {
|
|||
func_80033480(globalCtx, &sp5C, 20.0f, 1, sp4C * 135.0f, 60, 1);
|
||||
func_8003555C(globalCtx, &sp5C, &D_808718FC, &D_80871908);
|
||||
}
|
||||
func_8005AA1C(&globalCtx->mainCamera, 0, sp4C * 0.6f, 3);
|
||||
Camera_AddQuake(&globalCtx->mainCamera, 0, sp4C * 0.6f, 3);
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_PILLAR_SINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &D_801333E0,
|
||||
&D_801333E0, &D_801333E8);
|
||||
}
|
||||
|
|
|
@ -141,10 +141,10 @@ void BgHidanFslift_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->unk_16A == 0) {
|
||||
this->unk_16A = 3;
|
||||
}
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], 0x30);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_HIDAN1);
|
||||
} else if (func_8004356C(thisx) == 0) {
|
||||
if (this->unk_16A != 0) {
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], 3);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_16A = 0;
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ void BgHidanRsekizou_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14);
|
||||
|
||||
if ((s16)((func_8005A9F4(ACTIVE_CAM) - this->dyna.actor.shape.rot.y) - 0x2E6C) >= 0) {
|
||||
if ((s16)((Camera_GetCamDirYaw(ACTIVE_CAM) - this->dyna.actor.shape.rot.y) - 0x2E6C) >= 0) {
|
||||
for (i = 3; i >= 0; i--) {
|
||||
POLY_XLU_DISP = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 0, POLY_XLU_DISP);
|
||||
}
|
||||
|
|
|
@ -116,10 +116,10 @@ void BgHidanSyoku_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->unk_168 == 0) {
|
||||
this->unk_168 = 3;
|
||||
}
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], 0x30);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_HIDAN1);
|
||||
} else if (!func_8004356C(&this->dyna.actor)) {
|
||||
if (this->unk_168 != 0) {
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], 3);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_168 = 0;
|
||||
}
|
||||
|
|
|
@ -182,9 +182,9 @@ void BgJya1flift_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
tempIsRiding = func_8004356C(&this->dyna) ? true : false;
|
||||
if ((this->actionFunc == BgJya1flift_Move) || (this->actionFunc == BgJya1flift_DelayMove)) {
|
||||
if (tempIsRiding) {
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], 0x30);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_HIDAN1);
|
||||
} else if (!tempIsRiding && this->isLinkRiding) {
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], 3);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON0);
|
||||
}
|
||||
}
|
||||
this->isLinkRiding = tempIsRiding;
|
||||
|
|
|
@ -141,10 +141,10 @@ void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc(this);
|
||||
}
|
||||
if ((this->dyna.unk_160 & 4) && ((this->unk_16B & 4) == 0)) {
|
||||
func_8005A77C(globalCtx2->cameraPtrs[0], 0x3F);
|
||||
Camera_ChangeSetting(globalCtx2->cameraPtrs[0], CAM_SET_TEPPEN);
|
||||
} else if (((this->dyna.unk_160) & 4) == 0 && ((this->unk_16B & 4)) &&
|
||||
(globalCtx2->cameraPtrs[0]->setting == 0x3F)) {
|
||||
func_8005A77C(globalCtx2->cameraPtrs[0], 3);
|
||||
Camera_ChangeSetting(globalCtx2->cameraPtrs[0], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_16B = this->dyna.unk_160;
|
||||
|
||||
|
|
|
@ -174,14 +174,14 @@ void func_808A3C8C(BgMoriHineri* this, GlobalContext* globalCtx) {
|
|||
|
||||
f0 = 1100.0f - (player->actor.posRot.pos.z - this->dyna.actor.posRot.pos.z);
|
||||
this->dyna.actor.shape.rot.z = CLAMP(f0, 0.0f, 1000.0f) * 16.384f;
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], 4);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON1);
|
||||
if (this->dyna.actor.params != 0) {
|
||||
this->dyna.actor.shape.rot.z = -this->dyna.actor.shape.rot.z;
|
||||
}
|
||||
}
|
||||
|
||||
void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) {
|
||||
s16 unk_14E;
|
||||
s16 defaultCamChildIdx;
|
||||
|
||||
if ((Flags_GetSwitch(globalCtx, this->switchFlag) &&
|
||||
(this->dyna.actor.params == 0 || this->dyna.actor.params == 2)) ||
|
||||
|
@ -190,9 +190,9 @@ void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.draw = BgMoriHineri_DrawHallAndRoom;
|
||||
this->actionFunc = func_808A3E54;
|
||||
|
||||
unk_14E = globalCtx->cameraPtrs[0]->unk_14E;
|
||||
if ((unk_14E != 0) && (globalCtx->cameraPtrs[unk_14E]->setting == 0x26)) {
|
||||
func_800803F0(globalCtx, unk_14E);
|
||||
defaultCamChildIdx = globalCtx->cameraPtrs[0]->childCamIdx;
|
||||
if ((defaultCamChildIdx != 0) && (globalCtx->cameraPtrs[defaultCamChildIdx]->setting == CAM_SET_DEMO1)) {
|
||||
func_800803F0(globalCtx, defaultCamChildIdx);
|
||||
}
|
||||
func_800800F8(globalCtx, 0xCBC, 0x28, &this->dyna.actor, 0);
|
||||
D_808A43E0 = func_800800F8(globalCtx, 0xCBD, 0x28, &this->dyna.actor, 0);
|
||||
|
|
|
@ -213,11 +213,11 @@ void BgMoriRakkatenjo_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
osSyncPrintf("camera changed (mori rakka tenjyo) ... \n");
|
||||
sCamSetting = globalCtx->cameraPtrs[0]->setting;
|
||||
Camera_SetCameraData(globalCtx->cameraPtrs[0], 1, &this->dyna.actor, NULL, 0, 0, 0);
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], 0x27);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_MORI1);
|
||||
}
|
||||
} else if (sCamSetting != 0) {
|
||||
osSyncPrintf("camera changed (previous) ... \n");
|
||||
func_8005A77C(globalCtx->cameraPtrs[0], 4);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON1);
|
||||
sCamSetting = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -166,7 +166,7 @@ void BgPoSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, envColor->r, envColor->g, envColor->b, 255);
|
||||
|
||||
Matrix_Translate(0.0f, 52.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * (M_PI / 0x8000),
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * (M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_Scale(0.0027f, 0.0027f, 0.0027f, MTXMODE_APPLY);
|
||||
|
||||
|
|
|
@ -60,7 +60,8 @@ void func_808B7478(Actor* thisx, GlobalContext* globalCtx) {
|
|||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 153);
|
||||
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) - thisx->shape.rot.y + 0x8000) * 9.58738019108e-05f, MTXMODE_APPLY);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) - thisx->shape.rot.y + 0x8000) * 9.58738019108e-05f,
|
||||
MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 161),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -157,7 +157,7 @@ void DoorAna_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
this->actionFunc(this, globalCtx);
|
||||
// changes the grottos facing angle based on camera angle
|
||||
this->actor.shape.rot.y = func_8005A9F4(ACTIVE_CAM) + 0x8000;
|
||||
this->actor.shape.rot.y = Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000;
|
||||
}
|
||||
|
||||
void DoorAna_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -393,7 +393,7 @@ void func_80996C60(DoorShutter* this, GlobalContext* globalCtx) {
|
|||
DoorShutter_SetupAction(this, func_80997004);
|
||||
this->unk_16C = sp38;
|
||||
this->unk_170 = 0.0f;
|
||||
func_8005AD40(globalCtx->cameraPtrs[0], &this->dyna.actor, player->unk_46A, 0.0f, 12, sp34, 10);
|
||||
Camera_ChangeDoorCam(globalCtx->cameraPtrs[0], &this->dyna.actor, player->unk_46A, 0.0f, 12, sp34, 10);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (globalCtx) {};
|
||||
globalCtx->envCtx.unk_8C[1][0] = globalCtx->envCtx.unk_8C[1][1] = globalCtx->envCtx.unk_8C[1][2] = 0xFA;
|
||||
globalCtx->envCtx.unk_8C[0][0] = globalCtx->envCtx.unk_8C[0][1] = globalCtx->envCtx.unk_8C[0][2] = 0xFA;
|
||||
func_8005AA1C(&globalCtx->mainCamera, 2, 0xB, 8);
|
||||
Camera_AddQuake(&globalCtx->mainCamera, 2, 0xB, 8);
|
||||
thisx->params = BOMB_EXPLOSION;
|
||||
this->timer = 10;
|
||||
thisx->flags |= 0x20;
|
||||
|
|
|
@ -102,7 +102,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
|||
this->unk_1D4.y = fabsf(this->unk_180.y - this->unk_1BC.y) * 0.02f;
|
||||
this->unk_1D4.z = fabsf(this->unk_180.z - this->unk_1BC.z) * 0.02f;
|
||||
|
||||
func_800C04D8(globalCtx, this->camId, &this->unk_180, &this->unk_18C);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->camId, &this->unk_180, &this->unk_18C);
|
||||
this->actor.textId = 0xF;
|
||||
func_8010B680(globalCtx, this->actor.textId, NULL);
|
||||
this->unk_154 = 5;
|
||||
|
@ -128,7 +128,7 @@ void EnBomBowlPit_CameraDollyIn(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothScaleMaxF(&this->unk_18C.z, this->unk_198.z, this->unk_1A4.z, this->unk_1B0.z);
|
||||
}
|
||||
|
||||
func_800C04D8(globalCtx, this->camId, &this->unk_180, &this->unk_18C);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->camId, &this->unk_180, &this->unk_18C);
|
||||
|
||||
if ((this->unk_154 == func_8010BDBC(&globalCtx->msgCtx)) && (func_80106BC8(globalCtx) != 0)) {
|
||||
func_80106CCC(globalCtx);
|
||||
|
|
|
@ -402,7 +402,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(thisx, NA_SE_IT_BOMB_EXPLOSION);
|
||||
globalCtx->envCtx.unk_8C[1][0] = globalCtx->envCtx.unk_8C[1][1] = globalCtx->envCtx.unk_8C[1][2] = 0xFA;
|
||||
globalCtx->envCtx.unk_8C[0][0] = globalCtx->envCtx.unk_8C[0][1] = globalCtx->envCtx.unk_8C[0][2] = 0xFA;
|
||||
func_8005AA1C(&globalCtx->mainCamera, 2, 0xB, 8);
|
||||
Camera_AddQuake(&globalCtx->mainCamera, 2, 0xB, 8);
|
||||
thisx->params = BOMBFLOWER_EXPLOSION;
|
||||
this->timer = 10;
|
||||
thisx->flags |= 0x20;
|
||||
|
|
|
@ -110,7 +110,7 @@ void EnButte_DrawTransformationEffect(EnButte* this, GlobalContext* globalCtx) {
|
|||
alpha = Math_Sins(sTransformationEffectAlpha) * 250;
|
||||
alpha = CLAMP(alpha, 0, 255);
|
||||
|
||||
func_8005A970(&camDir, ACTIVE_CAM);
|
||||
Camera_GetCamDir(&camDir, ACTIVE_CAM);
|
||||
Matrix_RotateY(camDir.y * (M_PI / 0x8000), MTXMODE_NEW);
|
||||
Matrix_RotateX(camDir.x * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(camDir.z * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
|
|
|
@ -446,8 +446,8 @@ void EnDaiku_InitSubCamera(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, 7);
|
||||
|
||||
func_800C04D8(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
func_800C0704(globalCtx, this->subCamId, globalCtx->mainCamera.fov);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
Gameplay_CameraSetFov(globalCtx, this->subCamId, globalCtx->mainCamera.fov);
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
}
|
||||
|
||||
|
@ -462,7 +462,7 @@ void EnDaiku_UpdateSubCamera(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothScaleMaxMinF(&this->subCamAt.y, this->subCamAtTarget.y, 1.0f, 1000.0f, 0.0f);
|
||||
Math_SmoothScaleMaxMinF(&this->subCamAt.z, this->subCamAtTarget.z, 1.0f, 1000.0f, 0.0f);
|
||||
|
||||
func_800C04D8(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
|
||||
}
|
||||
|
||||
void EnDaiku_EscapeSuccess(EnDaiku* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -208,14 +208,14 @@ void EnFdFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_fd_fire.c", 572);
|
||||
|
||||
Matrix_Translate(this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, MTXMODE_NEW);
|
||||
sp8E = Math_Vec3f_Yaw(&scale, &this->actor.velocity) - func_8005A9F4(ACTIVE_CAM);
|
||||
sp8E = Math_Vec3f_Yaw(&scale, &this->actor.velocity) - Camera_GetCamDirYaw(ACTIVE_CAM);
|
||||
sp84 = fabsf(Math_Coss(sp8E));
|
||||
sp88 = Math_Sins(sp8E);
|
||||
sp80 = Math_Vec3f_DistXZ(&scale, &this->actor.velocity) / 1.5f;
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) + 0x8000) * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(((sp88 * -10.0f) * sp80) * (M_PI / 180.0f), MTXMODE_APPLY);
|
||||
scale.x = scale.y = scale.z = this->scale * 0.001f;
|
||||
Matrix_Scale(scale.x, scale.y, scale.z, MTXMODE_APPLY);
|
||||
|
|
|
@ -180,7 +180,7 @@ void func_80A0F6F8(EnFhgFire* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
|
||||
case 0x0A:
|
||||
this->actor.shape.rot.y = func_8005A948(camera) + ((*tmp & 0xFF) << 0x0F);
|
||||
this->actor.shape.rot.y = Camera_GetInputDirYaw(camera) + ((*tmp & 0xFF) << 0x0F);
|
||||
Math_SmoothScaleMaxF(&this->scale, 1.0f, 1.0f, 0.2f);
|
||||
|
||||
if (this->unk_150.x == 0) {
|
||||
|
@ -211,7 +211,7 @@ void func_80A0F6F8(EnFhgFire* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
|
||||
case 0x0B:
|
||||
this->actor.shape.rot.y = func_8005A948(camera) + ((*tmp & 0xFF) << 0x0F);
|
||||
this->actor.shape.rot.y = Camera_GetInputDirYaw(camera) + ((*tmp & 0xFF) << 0x0F);
|
||||
|
||||
Math_SmoothScaleMaxF(&this->scale, 0.0f, 1.0f, 0.2f);
|
||||
if (this->unk_150.x == 0x1E) {
|
||||
|
|
|
@ -422,7 +422,7 @@ void EnHeishi1_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->type != 5) {
|
||||
path = this->path * 2;
|
||||
if ((sCamDataIdxs[path] == activeCam->unk_148) || (sCamDataIdxs[path + 1] == activeCam->unk_148)) {
|
||||
if ((sCamDataIdxs[path] == activeCam->camDataIdx) || (sCamDataIdxs[path + 1] == activeCam->camDataIdx)) {
|
||||
if (!sPlayerIsCaught) {
|
||||
if ((this->actionFunc == EnHeishi1_Walk) || (this->actionFunc == EnHeishi1_Wait)) {
|
||||
Vec3f searchBallVel;
|
||||
|
|
|
@ -316,7 +316,7 @@ void func_80A5372C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
this->unk_28C.y = 1145.0f;
|
||||
this->unk_28C.z = 3014.0f;
|
||||
|
||||
func_800C04D8(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
this->actionFunc = func_80A53850;
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ void func_80A53850(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
BgSpot15Saku* gate;
|
||||
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
func_800C04D8(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
gate = (BgSpot15Saku*)this->gate;
|
||||
if ((this->unk_2F2[0] == 0) || (gate->unk_168 == 0)) {
|
||||
Gameplay_ClearCamera(globalCtx, this->cameraId);
|
||||
|
@ -487,7 +487,7 @@ void func_80A53DF8(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
this->unk_28C.y = 417.0f;
|
||||
this->unk_298.z = -1079.0f;
|
||||
this->unk_28C.z = -1079.0f;
|
||||
func_800C04D8(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
this->actionFunc = func_80A53F30;
|
||||
}
|
||||
|
||||
|
@ -495,7 +495,7 @@ void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
BgGateShutter* gate;
|
||||
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
func_800C04D8(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
gate = (BgGateShutter*)this->gate;
|
||||
if ((this->unk_2F2[0] == 0) || (gate->openingState == 0)) {
|
||||
Gameplay_ClearCamera(globalCtx, this->cameraId);
|
||||
|
|
|
@ -428,11 +428,12 @@ void EnHintnuts_Leave(EnHintnuts* this, GlobalContext* globalCtx) {
|
|||
if (this->actor.bgCheckFlags & 8) {
|
||||
temp_a1 = this->actor.wallPolyRot;
|
||||
} else {
|
||||
temp_a1 = this->actor.yawTowardsLink - func_8005A9F4(globalCtx->cameraPtrs[globalCtx->activeCamera]) - 0x8000;
|
||||
temp_a1 =
|
||||
this->actor.yawTowardsLink - Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) - 0x8000;
|
||||
if (ABS(temp_a1) >= 0x4001) {
|
||||
temp_a1 = func_8005A9F4(globalCtx->cameraPtrs[globalCtx->activeCamera]) + 0x8000;
|
||||
temp_a1 = Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) + 0x8000;
|
||||
} else {
|
||||
temp_a1 = func_8005A9F4(globalCtx->cameraPtrs[globalCtx->activeCamera]) - (temp_a1 >> 1) + 0x8000;
|
||||
temp_a1 = Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) - (temp_a1 >> 1) + 0x8000;
|
||||
}
|
||||
}
|
||||
Math_ApproxUpdateScaledS(&this->actor.shape.rot.y, temp_a1, 0x800);
|
||||
|
|
|
@ -180,7 +180,7 @@ void func_80A59014(EnHoll* this, GlobalContext* globalCtx) {
|
|||
f32 planeHalfWidth;
|
||||
s32 pad2;
|
||||
Player* player = PLAYER;
|
||||
s32 useViewEye = D_8011D394 != 0 || globalCtx->csCtx.state != 0;
|
||||
s32 useViewEye = gDbgCamEnabled != 0 || globalCtx->csCtx.state != 0;
|
||||
s32 transitionActorIdx;
|
||||
f32 absZ;
|
||||
s32 side;
|
||||
|
|
|
@ -40,6 +40,11 @@ typedef struct EnHorse {
|
|||
? true \
|
||||
: false)
|
||||
|
||||
#define EN_HORSE_CHECK_5(horseActor) \
|
||||
(((horseActor)->unk_1F0 & 0x4) \
|
||||
? true \
|
||||
: false)
|
||||
|
||||
extern const ActorInit En_Horse_InitVars;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -354,7 +354,7 @@ void EnIceHono_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 150, 255, 0);
|
||||
|
||||
Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * (M_PI / 0x8000),
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * (M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ice_hono.c", 718),
|
||||
|
|
|
@ -375,7 +375,7 @@ void func_80A74EBC(EnIk* this, GlobalContext* globalCtx) {
|
|||
sp2C.z = this->actor.posRot.pos.z + Math_Coss(this->actor.shape.rot.y + 0x6A4) * 70.0f;
|
||||
sp2C.y = this->actor.posRot.pos.y;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_HIT_GND);
|
||||
func_8005AA1C(&globalCtx->mainCamera, 2, 0x19, 5);
|
||||
Camera_AddQuake(&globalCtx->mainCamera, 2, 0x19, 5);
|
||||
func_800AA000(this->actor.xzDistFromLink, 0xFF, 0x14, 0x96);
|
||||
func_80062CD4(globalCtx, &sp2C);
|
||||
}
|
||||
|
|
|
@ -361,7 +361,7 @@ void EnKz_SetupMweep(EnKz* this, GlobalContext* globalCtx) {
|
|||
pos.y += 60.0f;
|
||||
initPos.y += -100.0f;
|
||||
initPos.z += 260.0f;
|
||||
func_800C04D8(globalCtx, this->cutsceneCamera, &pos, &initPos);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->cutsceneCamera, &pos, &initPos);
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
this->actor.speedXZ = 0.1f;
|
||||
this->actionFunc = EnKz_Mweep;
|
||||
|
@ -377,7 +377,7 @@ void EnKz_Mweep(EnKz* this, GlobalContext* globalCtx) {
|
|||
pos.y += 60.0f;
|
||||
initPos.y += -100.0f;
|
||||
initPos.z += 260.0f;
|
||||
func_800C04D8(globalCtx, this->cutsceneCamera, &pos, &initPos);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->cutsceneCamera, &pos, &initPos);
|
||||
if ((EnKz_FollowPath(this, globalCtx) == 1) && (this->waypoint == 0)) {
|
||||
func_80034EC0(&this->skelanime, sAnimations, 1);
|
||||
Inventory_ReplaceItem(globalCtx, ITEM_LETTER_RUTO, ITEM_BOTTLE);
|
||||
|
|
|
@ -80,7 +80,7 @@ void EnLight_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void EnLight_UpdatePosRot(EnLight* this, GlobalContext* globalCtx) {
|
||||
// update yaw for billboard effect
|
||||
this->actor.shape.rot.y = func_8005A9F4(ACTIVE_CAM) + 0x8000;
|
||||
this->actor.shape.rot.y = Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000;
|
||||
|
||||
if (this->actor.parent != NULL) {
|
||||
Math_Vec3f_Copy(&this->actor.posRot.pos, &(this->actor.parent)->posRot.pos);
|
||||
|
@ -185,7 +185,7 @@ void EnLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
}
|
||||
|
||||
Matrix_RotateY((s16)((func_8005A9F4(ACTIVE_CAM) - this->actor.shape.rot.y) + 0x8000) * (M_PI / 32768.0f),
|
||||
Matrix_RotateY((s16)((Camera_GetCamDirYaw(ACTIVE_CAM) - this->actor.shape.rot.y) + 0x8000) * (M_PI / 32768.0f),
|
||||
MTXMODE_APPLY);
|
||||
|
||||
if (this->actor.params & 1) {
|
||||
|
|
|
@ -713,7 +713,7 @@ void func_80AA7938(EnMb* this, GlobalContext* globalCtx) {
|
|||
func_800AA000(this->actor.xzDistFromLink, 0xFF, 0x14, 0x96);
|
||||
EffectSsBlast_SpawnWhiteShockwave(globalCtx, &sp74, &sp68, &sp68);
|
||||
func_80033480(globalCtx, &sp74, 2.0f, 3, 0x12C, 0xB4, 1);
|
||||
func_8005AA1C(&globalCtx->mainCamera, 2, 0x19, 5);
|
||||
Camera_AddQuake(&globalCtx->mainCamera, 2, 0x19, 5);
|
||||
func_800358DC(&this->actor, &sp74, &this->actor.posRot.rot, &sp5C, 20, &sp54, globalCtx, -1, 0);
|
||||
func_80AA6DA4(this);
|
||||
}
|
||||
|
@ -886,7 +886,7 @@ void func_80AA8378(EnMb* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_ChangeAnimDefaultStop(&this->skelAnime, &D_0600E18C);
|
||||
this->unk_32E = 0;
|
||||
func_800AA000(this->actor.xzDistFromLink, 0xFF, 0x14, 0x96);
|
||||
func_8005AA1C(&globalCtx->mainCamera, 2, 25, 5);
|
||||
Camera_AddQuake(&globalCtx->mainCamera, 2, 25, 5);
|
||||
} else {
|
||||
func_80AA6898(this);
|
||||
}
|
||||
|
@ -947,7 +947,7 @@ void func_80AA8514(EnMb* this, GlobalContext* globalCtx) {
|
|||
func_800AA000(this->actor.xzDistFromLink, 0xFF, 0x14, 0x96);
|
||||
func_80033260(globalCtx, &this->actor, &effPosition, 50.0f, 0xA, 3.0f, 0x190, 0x3C, 0);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN);
|
||||
func_8005AA1C(&globalCtx->mainCamera, 2, 0x19, 5);
|
||||
Camera_AddQuake(&globalCtx->mainCamera, 2, 0x19, 5);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -506,7 +506,7 @@ void func_80AAB158(EnMd* this, GlobalContext* globalCtx) {
|
|||
temp2 = 1;
|
||||
}
|
||||
|
||||
if ((globalCtx->csCtx.state != 0) || (D_8011D394 != 0)) {
|
||||
if ((globalCtx->csCtx.state != 0) || gDbgCamEnabled) {
|
||||
this->unk_1E0.unk_18 = globalCtx->view.eye;
|
||||
this->unk_1E0.unk_14 = 40.0f;
|
||||
temp = 2;
|
||||
|
|
|
@ -509,12 +509,12 @@ void EnPoField_Death(EnPoField* this, GlobalContext* globalCtx) {
|
|||
if (this->actionTimer < 5) {
|
||||
sp6C.y = Math_Sins(this->actionTimer * 0x1000 - 0x4000) * 23.0f + (this->actor.posRot.pos.y + 40.0f);
|
||||
sp68 = Math_Coss(this->actionTimer * 0x1000 - 0x4000) * 23.0f;
|
||||
sp6C.x = Math_Sins(func_8005A9F4(ACTIVE_CAM) + 0x4800) * sp68 + this->actor.posRot.pos.x;
|
||||
sp6C.z = Math_Coss(func_8005A9F4(ACTIVE_CAM) + 0x4800) * sp68 + this->actor.posRot.pos.z;
|
||||
sp6C.x = Math_Sins(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * sp68 + this->actor.posRot.pos.x;
|
||||
sp6C.z = Math_Coss(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * sp68 + this->actor.posRot.pos.z;
|
||||
} else {
|
||||
sp6C.y = this->actor.posRot.pos.y + 40.0f + 15.0f * (this->actionTimer - 5);
|
||||
sp6C.x = Math_Sins(func_8005A9F4(ACTIVE_CAM) + 0x4800) * 23.0f + this->actor.posRot.pos.x;
|
||||
sp6C.z = Math_Coss(func_8005A9F4(ACTIVE_CAM) + 0x4800) * 23.0f + this->actor.posRot.pos.z;
|
||||
sp6C.x = Math_Sins(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * 23.0f + this->actor.posRot.pos.x;
|
||||
sp6C.z = Math_Coss(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * 23.0f + this->actor.posRot.pos.z;
|
||||
}
|
||||
EffectSsDeadDb_Spawn(globalCtx, &sp6C, &D_80AD7114, &D_80AD7120, this->actionTimer * 10 + 80, 0, 255, 255, 255,
|
||||
255, 0, 0, 255, 1, 9, 1);
|
||||
|
@ -745,7 +745,7 @@ void EnPoField_DrawFlame(EnPoField* this, GlobalContext* globalCtx) {
|
|||
sp4C = this->flameScale * 85000.0f;
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, sp4C);
|
||||
Matrix_Translate(this->flamePosition.x, this->flamePosition.y, this->flamePosition.z, MTXMODE_NEW);
|
||||
Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) + 0x8000) * 0.0000958738f, MTXMODE_APPLY);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * 0.0000958738f, MTXMODE_APPLY);
|
||||
if (this->flameTimer >= 20) {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
Matrix_Scale(this->flameScale, this->flameScale, this->flameScale, MTXMODE_APPLY);
|
||||
|
@ -954,7 +954,7 @@ void EnPoField_DrawSoul(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, info->primColor.r, info->primColor.g, info->primColor.b,
|
||||
this->lightColor.a);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->lightColor.r, this->lightColor.g, this->lightColor.b, 255);
|
||||
Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) + 0x8000) * 9.58738e-05f, MTXMODE_APPLY);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * 9.58738e-05f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_po_field.c", 2143),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_060023B0);
|
||||
|
|
|
@ -291,12 +291,12 @@ void EnPoRelay_DisappearAndReward(EnPoRelay* this, GlobalContext* globalCtx) {
|
|||
if (this->actionTimer < 5) {
|
||||
vec.y = Math_Sins((this->actionTimer * 0x1000) - 0x4000) * 23.0f + (this->actor.posRot.pos.y + 40.0f);
|
||||
multiplier = Math_Coss((this->actionTimer * 0x1000) - 0x4000) * 23.0f;
|
||||
vec.x = (Math_Sins(func_8005A9F4(ACTIVE_CAM) + 0x4800) * multiplier) + this->actor.posRot.pos.x;
|
||||
vec.z = (Math_Coss(func_8005A9F4(ACTIVE_CAM) + 0x4800) * multiplier) + this->actor.posRot.pos.z;
|
||||
vec.x = (Math_Sins(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * multiplier) + this->actor.posRot.pos.x;
|
||||
vec.z = (Math_Coss(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * multiplier) + this->actor.posRot.pos.z;
|
||||
} else {
|
||||
vec.y = this->actor.posRot.pos.y + 40.0f + 15.0f * (this->actionTimer - 5);
|
||||
vec.x = (Math_Sins(func_8005A9F4(ACTIVE_CAM) + 0x4800) * 23.0f) + this->actor.posRot.pos.x;
|
||||
vec.z = (Math_Coss(func_8005A9F4(ACTIVE_CAM) + 0x4800) * 23.0f) + this->actor.posRot.pos.z;
|
||||
vec.x = (Math_Sins(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * 23.0f) + this->actor.posRot.pos.x;
|
||||
vec.z = (Math_Coss(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * 23.0f) + this->actor.posRot.pos.z;
|
||||
}
|
||||
EffectSsDeadDb_Spawn(globalCtx, &vec, &D_80AD8D30, &D_80AD8D3C, this->actionTimer * 10 + 80, 0, 255, 255, 255,
|
||||
255, 0, 0, 255, 1, 9, true);
|
||||
|
|
|
@ -1364,7 +1364,7 @@ void EnPoSisters_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, temp_s7->r, temp_s7->g, temp_s7->b, phi_s5);
|
||||
Matrix_Translate(this->unk_234[i].x, this->unk_234[i].y, this->unk_234[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(0, (s16)(func_8005A9F4(ACTIVE_CAM) + 0x8000), 0, MTXMODE_APPLY);
|
||||
Matrix_RotateRPY(0, (s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000), 0, MTXMODE_APPLY);
|
||||
if (this->actionFunc == func_80ADAFC0) {
|
||||
phi_f20 = (this->unk_19A - i) * 0.025f + 0.5f;
|
||||
phi_f20 = CLAMP(phi_f20, 0.5f, 0.8f) * 0.007f;
|
||||
|
|
|
@ -567,12 +567,12 @@ void func_80ADF15C(EnPoh* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_198 < 5) {
|
||||
vec.y = Math_Sins((this->unk_198 * 0x1000) - 0x4000) * 23.0f + (this->actor.posRot.pos.y + 40.0f);
|
||||
multiplier = Math_Coss((this->unk_198 * 0x1000) - 0x4000) * 23.0f;
|
||||
vec.x = Math_Sins(func_8005A9F4(ACTIVE_CAM) + 0x4800) * multiplier + this->actor.posRot.pos.x;
|
||||
vec.z = Math_Coss(func_8005A9F4(ACTIVE_CAM) + 0x4800) * multiplier + this->actor.posRot.pos.z;
|
||||
vec.x = Math_Sins(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * multiplier + this->actor.posRot.pos.x;
|
||||
vec.z = Math_Coss(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * multiplier + this->actor.posRot.pos.z;
|
||||
} else {
|
||||
vec.y = (this->actor.posRot.pos.y + 40.0f) + (15.0f * (this->unk_198 - 5));
|
||||
vec.x = Math_Sins(func_8005A9F4(ACTIVE_CAM) + 0x4800) * 23.0f + this->actor.posRot.pos.x;
|
||||
vec.z = Math_Coss(func_8005A9F4(ACTIVE_CAM) + 0x4800) * 23.0f + this->actor.posRot.pos.z;
|
||||
vec.x = Math_Sins(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * 23.0f + this->actor.posRot.pos.x;
|
||||
vec.z = Math_Coss(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4800) * 23.0f + this->actor.posRot.pos.z;
|
||||
}
|
||||
EffectSsDeadDb_Spawn(globalCtx, &vec, &D_80AE1B60, &D_80AE1B6C, this->unk_198 * 10 + 80, 0, 255, 255, 255, 255,
|
||||
0, 0, 255, 1, 9, 1);
|
||||
|
@ -1142,7 +1142,7 @@ void EnPoh_DrawSoul(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, this->info->primColor.r, this->info->primColor.g,
|
||||
this->info->primColor.b, this->lightColor.a);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->lightColor.r, this->lightColor.g, this->lightColor.b, 255);
|
||||
Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) + 0x8000) * 9.58738e-05f, MTXMODE_APPLY);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * 9.58738e-05f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_poh.c", 2910),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, this->info->soulDisplayList);
|
||||
|
|
|
@ -320,15 +320,15 @@ DynaPolyActor* func_80AEB088(GlobalContext* globalCtx) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void func_80AEB0EC(EnRu1* this, s32 arg1) {
|
||||
void func_80AEB0EC(EnRu1* this, s32 cameraSetting) {
|
||||
if (this->unk_28C != NULL) {
|
||||
this->unk_28C->unk_1B8 = arg1;
|
||||
this->unk_28C->cameraSetting = cameraSetting;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_80AEB104(EnRu1* this) {
|
||||
if (this->unk_28C != NULL) {
|
||||
return this->unk_28C->unk_1B8;
|
||||
return this->unk_28C->cameraSetting;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -163,16 +163,16 @@ void func_80B4B010(EnZl1* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06010B38, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06010B38), 3,
|
||||
-10.0f);
|
||||
this->unk_1E8 = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->unk_1E8, 7);
|
||||
func_800C0808(globalCtx, this->unk_1E8, player, 0x21);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->unk_1E8, CAM_STAT_ACTIVE);
|
||||
func_800C0808(globalCtx, this->unk_1E8, player, CAM_SET_FREE0);
|
||||
globalCtx->envCtx.unk_E2[0] = 0xFF;
|
||||
globalCtx->envCtx.unk_E2[1] = 0xFF;
|
||||
globalCtx->envCtx.unk_E2[2] = 0xFF;
|
||||
globalCtx->envCtx.unk_E2[3] = 0x18;
|
||||
globalCtx->envCtx.unk_E1 = 1;
|
||||
func_800C04D8(globalCtx, this->unk_1E8, &vec1, &vec2);
|
||||
func_800C0704(globalCtx, this->unk_1E8, 30.0f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->unk_1E8, &vec1, &vec2);
|
||||
Gameplay_CameraSetFov(globalCtx, this->unk_1E8, 30.0f);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeAlpha(2);
|
||||
player->actor.posRot.pos = playerPos;
|
||||
|
@ -225,8 +225,8 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
|
|||
case 1:
|
||||
if ((func_8010BDBC(msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
globalCtx->envCtx.unk_E1 = 0;
|
||||
func_800C04D8(globalCtx, this->unk_1E8, &sp74, &sp68);
|
||||
func_800C0704(globalCtx, this->unk_1E8, 25.0f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->unk_1E8, &sp74, &sp68);
|
||||
Gameplay_CameraSetFov(globalCtx, this->unk_1E8, 25.0f);
|
||||
player->actor.posRot.pos = sp58;
|
||||
this->actor.textId = 0x702F;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
|
@ -396,8 +396,8 @@ void func_80B4B8B4(EnZl1* this, GlobalContext* globalCtx) {
|
|||
this->actor.velocity.z = (sp68.z - sp74.z) / actionLength;
|
||||
}
|
||||
func_80038290(globalCtx, &this->actor, &this->unk_200, &this->unk_206, this->actor.posRot2.pos);
|
||||
func_800C04D8(globalCtx, this->unk_1E8, &sp98, &sp8C);
|
||||
func_800C0704(globalCtx, this->unk_1E8, 70.0f);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->unk_1E8, &sp98, &sp8C);
|
||||
Gameplay_CameraSetFov(globalCtx, this->unk_1E8, 70.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -496,9 +496,9 @@ void func_80B4BF2C(EnZl1* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
case 2:
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
func_800C078C(globalCtx, 0, this->unk_1E8);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 7);
|
||||
if (Actor_HasParent(this, globalCtx)) {
|
||||
Gameplay_CopyCamera(globalCtx, 0, this->unk_1E8);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_ACTIVE);
|
||||
Gameplay_ClearCamera(globalCtx, this->unk_1E8);
|
||||
this->actor.parent = NULL;
|
||||
this->unk_1E2++;
|
||||
|
|
|
@ -123,7 +123,7 @@ void MagicDark_DiamondUpdate(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
thisx->posRot.rot.y += 0x3E8;
|
||||
thisx->shape.rot.y = thisx->posRot.rot.y + func_8005A9F4(ACTIVE_CAM);
|
||||
thisx->shape.rot.y = thisx->posRot.rot.y + Camera_GetCamDirYaw(ACTIVE_CAM);
|
||||
this->timer++;
|
||||
gSaveContext.nayrusLoveTimer = nayrusLoveTimer + 1;
|
||||
|
||||
|
@ -251,11 +251,11 @@ void MagicDark_OrbDraw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
|
||||
pos.x -=
|
||||
(this->actor.scale.x * 300.0f * Math_Sins(func_8005A9F4(ACTIVE_CAM)) * Math_Coss(func_8005A9CC(ACTIVE_CAM)));
|
||||
pos.y -= (this->actor.scale.x * 300.0f * Math_Sins(func_8005A9CC(ACTIVE_CAM)));
|
||||
pos.z -=
|
||||
(this->actor.scale.x * 300.0f * Math_Coss(func_8005A9F4(ACTIVE_CAM)) * Math_Coss(func_8005A9CC(ACTIVE_CAM)));
|
||||
pos.x -= (this->actor.scale.x * 300.0f * Math_Sins(Camera_GetCamDirYaw(ACTIVE_CAM)) *
|
||||
Math_Coss(Camera_GetCamDirPitch(ACTIVE_CAM)));
|
||||
pos.y -= (this->actor.scale.x * 300.0f * Math_Sins(Camera_GetCamDirPitch(ACTIVE_CAM)));
|
||||
pos.z -= (this->actor.scale.x * 300.0f * Math_Coss(Camera_GetCamDirYaw(ACTIVE_CAM)) *
|
||||
Math_Coss(Camera_GetCamDirPitch(ACTIVE_CAM)));
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_magic_dark.c", 619);
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ void ObjSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
|
||||
Matrix_Translate(0.0f, 52.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * (M_PI / 0x8000),
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * (M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_Scale(flameScale, flameScale, flameScale, MTXMODE_APPLY);
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ void OceffStorm_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Player* player = PLAYER;
|
||||
|
||||
this->actor.posRot.pos = player->actor.posRot.pos;
|
||||
this->actor.shape.rot.y = func_8005A9F4(ACTIVE_CAM);
|
||||
this->actor.shape.rot.y = Camera_GetCamDirYaw(ACTIVE_CAM);
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ void OceffWipe_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Vec3f vec;
|
||||
|
||||
eye = ACTIVE_CAM->eye;
|
||||
func_8005AFB4(&vec, ACTIVE_CAM);
|
||||
Camera_GetSkyboxOffset(&vec, ACTIVE_CAM);
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 346);
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Vec3f vec;
|
||||
|
||||
eye = ACTIVE_CAM->eye;
|
||||
func_8005AFB4(&vec, ACTIVE_CAM);
|
||||
Camera_GetSkyboxOffset(&vec, ACTIVE_CAM);
|
||||
if (this->counter < 32) {
|
||||
z = Math_Sins(this->counter << 9) * 1330;
|
||||
} else {
|
||||
|
|
|
@ -70,7 +70,7 @@ void OceffWipe3_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Vec3f vec;
|
||||
|
||||
eye = ACTIVE_CAM->eye;
|
||||
func_8005AFB4(&vec, ACTIVE_CAM);
|
||||
Camera_GetSkyboxOffset(&vec, ACTIVE_CAM);
|
||||
if (this->counter < 32) {
|
||||
z = Math_Sins(this->counter << 9) * 1330;
|
||||
} else {
|
||||
|
|
|
@ -64,7 +64,7 @@ void OceffWipe4_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Vec3f vec;
|
||||
|
||||
eye = ACTIVE_CAM->eye;
|
||||
func_8005AFB4(&vec, ACTIVE_CAM);
|
||||
Camera_GetSkyboxOffset(&vec, ACTIVE_CAM);
|
||||
if (this->counter < 16) {
|
||||
z = Math_Sins(this->counter << 10) * 1330;
|
||||
} else {
|
||||
|
|
|
@ -1586,7 +1586,7 @@ void func_8083315C(GlobalContext* globalCtx, Player* this) {
|
|||
|
||||
func_80077D10(&D_808535D4, &D_808535D8, sControlInput);
|
||||
|
||||
D_808535DC = func_8005A948(ACTIVE_CAM) + D_808535D8;
|
||||
D_808535DC = Camera_GetInputDirYaw(ACTIVE_CAM) + D_808535D8;
|
||||
|
||||
this->unk_846 = (this->unk_846 + 1) % 4;
|
||||
|
||||
|
@ -2318,7 +2318,7 @@ s32 func_80834E7C(GlobalContext* globalCtx) {
|
|||
|
||||
s32 func_80834EB8(Player* this, GlobalContext* globalCtx) {
|
||||
if ((this->unk_6AD == 0) || (this->unk_6AD == 2)) {
|
||||
if (func_80833BCC(this) || (func_8005A470(Gameplay_GetCamera(globalCtx, 0), 7) == 0)) {
|
||||
if (func_80833BCC(this) || (Camera_CheckValidMode(Gameplay_GetCamera(globalCtx, 0), 7) == 0)) {
|
||||
return 1;
|
||||
}
|
||||
this->unk_6AD = 2;
|
||||
|
@ -2719,18 +2719,18 @@ void func_80835DE4(GlobalContext* globalCtx, Player* this, PlayerFunc674 func, s
|
|||
}
|
||||
}
|
||||
|
||||
void func_80835E44(GlobalContext* globalCtx, s16 arg1) {
|
||||
void func_80835E44(GlobalContext* globalCtx, s16 camSetting) {
|
||||
if (!func_800C0CB8(globalCtx)) {
|
||||
if (arg1 == 0x2F) {
|
||||
if (camSetting == CAM_SET_SCENE1) {
|
||||
Interface_ChangeAlpha(2);
|
||||
}
|
||||
} else {
|
||||
func_8005A77C(Gameplay_GetCamera(globalCtx, 0), arg1);
|
||||
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, 0), camSetting);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80835EA4(GlobalContext* globalCtx, s32 arg1) {
|
||||
func_80835E44(globalCtx, 0x38);
|
||||
func_80835E44(globalCtx, CAM_SET_ITEM2);
|
||||
Camera_SetCameraData(Gameplay_GetCamera(globalCtx, 0), 4, 0, 0, arg1, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -3179,7 +3179,7 @@ s32 func_80837268(Player* this, f32* arg1, s16* arg2, f32 arg3, GlobalContext* g
|
|||
|
||||
return 0;
|
||||
} else {
|
||||
*arg2 += func_8005A948(ACTIVE_CAM);
|
||||
*arg2 += Camera_GetInputDirYaw(ACTIVE_CAM);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -3664,7 +3664,7 @@ s32 func_808382DC(Player* this, GlobalContext* globalCtx) {
|
|||
this->unk_A86 = 0;
|
||||
}
|
||||
} else {
|
||||
sp68 = ((Player_GetCameraYOffset(this) - 8.0f) < (this->unk_6C4 * this->actor.scale.y));
|
||||
sp68 = ((Player_GetHeight(this) - 8.0f) < (this->unk_6C4 * this->actor.scale.y));
|
||||
|
||||
if (sp68 || (this->actor.bgCheckFlags & 0x100) || (D_808535E4 == 9) || (this->stateFlags2 & 0x80000000)) {
|
||||
func_80832698(this, NA_SE_VO_LI_DAMAGE_S);
|
||||
|
@ -3950,7 +3950,7 @@ void func_80838F5C(GlobalContext* globalCtx, Player* this) {
|
|||
|
||||
this->stateFlags1 |= 0xA0000000;
|
||||
|
||||
func_8005A77C(Gameplay_GetCamera(globalCtx, 0), 0x21);
|
||||
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, 0), CAM_SET_FREE0);
|
||||
}
|
||||
|
||||
s32 func_80838FB8(GlobalContext* globalCtx, Player* this) {
|
||||
|
@ -4274,11 +4274,11 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.entranceSound = NA_SE_OC_DOOR_OPEN;
|
||||
}
|
||||
} else {
|
||||
func_8005AD40(Gameplay_GetCamera(globalCtx, 0), doorActor,
|
||||
globalCtx->transitionActorList[(u16)doorActor->params >> 10]
|
||||
.sides[(sp7C > 0) ? 0 : 1]
|
||||
.effects,
|
||||
0, 38.0f * D_808535EC, 26.0f * D_808535EC, 10.0f * D_808535EC);
|
||||
Camera_ChangeDoorCam(Gameplay_GetCamera(globalCtx, 0), doorActor,
|
||||
globalCtx->transitionActorList[(u16)doorActor->params >> 10]
|
||||
.sides[(sp7C > 0) ? 0 : 1]
|
||||
.effects,
|
||||
0, 38.0f * D_808535EC, 26.0f * D_808535EC, 10.0f * D_808535EC);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4573,7 +4573,7 @@ void func_8083AA10(Player* this, GlobalContext* globalCtx) {
|
|||
s32 sp5C;
|
||||
CollisionPoly* sp58;
|
||||
s32 sp54;
|
||||
UNK_TYPE sp50;
|
||||
WaterBox* sp50;
|
||||
Vec3f sp44;
|
||||
f32 sp40;
|
||||
f32 sp3C;
|
||||
|
@ -4644,23 +4644,23 @@ void func_8083AA10(Player* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
s32 func_8083AD4C(GlobalContext* globalCtx, Player* this) {
|
||||
s32 sp1C;
|
||||
s32 cameraMode;
|
||||
|
||||
if (this->unk_6AD == 2) {
|
||||
if (func_8002DD6C(this)) {
|
||||
if (LINK_IS_ADULT) {
|
||||
sp1C = 7;
|
||||
cameraMode = CAM_MODE_BOWARROW;
|
||||
} else {
|
||||
sp1C = 11;
|
||||
cameraMode = CAM_MODE_SLINGSHOT;
|
||||
}
|
||||
} else {
|
||||
sp1C = 10;
|
||||
cameraMode = CAM_MODE_BOOMERANG;
|
||||
}
|
||||
} else {
|
||||
sp1C = 6;
|
||||
cameraMode = CAM_MODE_FIRSTPERSON;
|
||||
}
|
||||
|
||||
return func_8005A444(Gameplay_GetCamera(globalCtx, 0), sp1C);
|
||||
return Camera_ChangeMode(Gameplay_GetCamera(globalCtx, 0), cameraMode);
|
||||
}
|
||||
|
||||
s32 func_8083ADD4(GlobalContext* globalCtx, Player* this) {
|
||||
|
@ -4955,7 +4955,7 @@ s32 func_8083B644(Player* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
s32 func_8083B8F4(Player* this, GlobalContext* globalCtx) {
|
||||
if (!(this->stateFlags1 & 0x800800) && func_8005A470(Gameplay_GetCamera(globalCtx, 0), 6)) {
|
||||
if (!(this->stateFlags1 & 0x800800) && Camera_CheckValidMode(Gameplay_GetCamera(globalCtx, 0), 6)) {
|
||||
if ((this->actor.bgCheckFlags & 1) ||
|
||||
(func_808332B8(this) && (this->actor.waterY < this->ageProperties->unk_2C))) {
|
||||
this->unk_6AD = 1;
|
||||
|
@ -5321,7 +5321,7 @@ void func_8083C8DC(Player* this, GlobalContext* globalCtx, s16 arg2) {
|
|||
}
|
||||
|
||||
s32 func_8083C910(GlobalContext* globalCtx, Player* this, f32 arg2) {
|
||||
UNK_TYPE sp2C;
|
||||
WaterBox* sp2C;
|
||||
f32 sp28;
|
||||
|
||||
sp28 = this->actor.posRot.pos.y;
|
||||
|
@ -5451,7 +5451,7 @@ void func_8083CF5C(Player* this, GlobalContext* globalCtx) {
|
|||
|
||||
s32 func_8083CFA8(GlobalContext* globalCtx, Player* this, f32 arg2, s32 splashScale) {
|
||||
f32 sp3C = fabsf(arg2);
|
||||
UNK_TYPE sp38;
|
||||
WaterBox* sp38;
|
||||
f32 sp34;
|
||||
Vec3f splashPos;
|
||||
s32 splashType;
|
||||
|
@ -5984,7 +5984,7 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
|
|||
func_808322D0(globalCtx, this, this->ageProperties->unk_98);
|
||||
func_80832F54(globalCtx, this, 0x28F);
|
||||
chest->unk_1F4 = 1;
|
||||
func_8005A77C(Gameplay_GetCamera(globalCtx, 0), 0x28);
|
||||
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, 0), CAM_SET_ITEM0);
|
||||
} else {
|
||||
func_80832264(globalCtx, this, &D_04002DF8);
|
||||
chest->unk_1F4 = -1;
|
||||
|
@ -6521,7 +6521,7 @@ s32 func_80840058(Player* this, f32* arg1, s16* arg2, GlobalContext* globalCtx)
|
|||
func_8083DC54(this, globalCtx);
|
||||
|
||||
if ((*arg1 != 0.0f) || (ABS(this->unk_87C) > 400)) {
|
||||
s16 temp1 = *arg2 - func_8005A948(ACTIVE_CAM);
|
||||
s16 temp1 = *arg2 - Camera_GetInputDirYaw(ACTIVE_CAM);
|
||||
u16 temp2 = (ABS(temp1) - 0x2000) & 0xFFFF;
|
||||
|
||||
if ((temp2 < 0x4000) || (this->unk_87C != 0)) {
|
||||
|
@ -7671,7 +7671,7 @@ void func_80843188(Player* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_850 != 0) {
|
||||
sp54 = sControlInput->rel.stick_y * 100;
|
||||
sp50 = sControlInput->rel.stick_x * -120;
|
||||
sp4E = this->actor.shape.rot.y - func_8005A948(ACTIVE_CAM);
|
||||
sp4E = this->actor.shape.rot.y - Camera_GetInputDirYaw(ACTIVE_CAM);
|
||||
|
||||
sp40 = Math_Coss(sp4E);
|
||||
sp4C = (Math_Sins(sp4E) * sp50) + (sp54 * sp40);
|
||||
|
@ -9652,72 +9652,72 @@ void func_808486A8(GlobalContext* globalCtx, Player* this) {
|
|||
u8 sp27;
|
||||
s32 pad;
|
||||
Actor* unk_664;
|
||||
s32 sp18;
|
||||
s32 camMode;
|
||||
|
||||
if (this->actor.type == ACTORTYPE_PLAYER) {
|
||||
sp27 = 0;
|
||||
|
||||
if (this->csMode != 0) {
|
||||
func_8005A444(Gameplay_GetCamera(globalCtx, 0), 0);
|
||||
Camera_ChangeMode(Gameplay_GetCamera(globalCtx, 0), CAM_MODE_NORMAL);
|
||||
} else if (!(this->stateFlags1 & 0x100000)) {
|
||||
if ((this->actor.parent != NULL) && (this->stateFlags3 & 0x80)) {
|
||||
sp18 = 9;
|
||||
camMode = CAM_MODE_FOOKSHOT;
|
||||
Camera_SetParam(Gameplay_GetCamera(globalCtx, 0), 8, this->actor.parent);
|
||||
} else if (func_8084377C == this->func_674) {
|
||||
sp18 = 0x12;
|
||||
camMode = CAM_MODE_STILL;
|
||||
} else if (this->stateFlags2 & 0x100) {
|
||||
sp18 = 0x13;
|
||||
camMode = CAM_MODE_PUSHPULL;
|
||||
} else if ((unk_664 = this->unk_664) != NULL) {
|
||||
if ((this->actor.flags & 0x100) == 0x100) {
|
||||
sp18 = 3;
|
||||
camMode = CAM_MODE_TALK;
|
||||
} else if (this->stateFlags1 & 0x10000) {
|
||||
if (this->stateFlags1 & 0x2000000) {
|
||||
sp18 = 0x14;
|
||||
camMode = CAM_MODE_BOOMFOLLLOW;
|
||||
} else {
|
||||
sp18 = 2;
|
||||
camMode = CAM_MODE_FOLLOWTARGET;
|
||||
}
|
||||
} else {
|
||||
sp18 = 4;
|
||||
camMode = CAM_MODE_BATTLE;
|
||||
}
|
||||
Camera_SetParam(Gameplay_GetCamera(globalCtx, 0), 8, unk_664);
|
||||
} else if (this->stateFlags1 & 0x1000) {
|
||||
sp18 = 0x11;
|
||||
camMode = CAM_MODE_CHARGE;
|
||||
} else if (this->stateFlags1 & 0x2000000) {
|
||||
sp18 = 0x14;
|
||||
camMode = CAM_MODE_BOOMFOLLLOW;
|
||||
Camera_SetParam(Gameplay_GetCamera(globalCtx, 0), 8, this->boomerangActor);
|
||||
} else if (this->stateFlags1 & 0x6000) {
|
||||
if (func_80833B2C(this)) {
|
||||
sp18 = 0xF;
|
||||
camMode = CAM_MODE_HANGZ;
|
||||
} else {
|
||||
sp18 = 0xE;
|
||||
camMode = CAM_MODE_HANG;
|
||||
}
|
||||
} else if (this->stateFlags1 & 0x40020000) {
|
||||
if (func_8002DD78(this) || func_808334B4(this)) {
|
||||
sp18 = 8;
|
||||
camMode = CAM_MODE_BOWARROWZ;
|
||||
} else if (this->stateFlags1 & 0x200000) {
|
||||
sp18 = 0xC;
|
||||
camMode = CAM_MODE_CLIMBZ;
|
||||
} else {
|
||||
sp18 = 1;
|
||||
camMode = CAM_MODE_TARGET;
|
||||
}
|
||||
} else if (this->stateFlags1 & 0x240000) {
|
||||
if ((func_80845668 == this->func_674) || (this->stateFlags1 & 0x200000)) {
|
||||
sp18 = 5;
|
||||
camMode = CAM_MODE_CLIMB;
|
||||
} else {
|
||||
sp18 = 0xD;
|
||||
camMode = CAM_MODE_JUMP;
|
||||
}
|
||||
} else if (this->stateFlags1 & 0x80000) {
|
||||
sp18 = 0x10;
|
||||
camMode = CAM_MODE_FREEFALL;
|
||||
} else if ((this->swordState != 0) && (this->swordAnimation >= 0) && (this->swordAnimation < 0x18)) {
|
||||
sp18 = 0x12;
|
||||
camMode = CAM_MODE_STILL;
|
||||
} else {
|
||||
sp18 = 0;
|
||||
camMode = CAM_MODE_NORMAL;
|
||||
if ((this->linearVelocity == 0.0f) &&
|
||||
(!(this->stateFlags1 & 0x800000) || (this->rideActor->speedXZ == 0.0f))) {
|
||||
sp27 = 2;
|
||||
}
|
||||
}
|
||||
|
||||
func_8005A444(Gameplay_GetCamera(globalCtx, 0), sp18);
|
||||
Camera_ChangeMode(Gameplay_GetCamera(globalCtx, 0), camMode);
|
||||
} else {
|
||||
sp27 = 2;
|
||||
}
|
||||
|
@ -11532,7 +11532,7 @@ void func_8084D3E4(Player* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.horseData.angle = rideActor->actor.shape.rot.y;
|
||||
}
|
||||
} else {
|
||||
func_8005A77C(Gameplay_GetCamera(globalCtx, 0), 1);
|
||||
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, 0), CAM_SET_NORMAL0);
|
||||
|
||||
if (this->unk_43C < 0) {
|
||||
D_808549C4[0].field = 0x2828;
|
||||
|
@ -12016,7 +12016,7 @@ void func_8084E6D4(Player* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->skelAnime.animation == &D_04002788) {
|
||||
Math_ApproxUpdateScaledS(&this->actor.shape.rot.y, func_8005A9F4(ACTIVE_CAM) + 0x8000, 4000);
|
||||
Math_ApproxUpdateScaledS(&this->actor.shape.rot.y, Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000, 4000);
|
||||
}
|
||||
|
||||
if (func_800A4530(&this->skelAnime, 21.0f)) {
|
||||
|
@ -12539,7 +12539,7 @@ s32 func_8084FCAC(Player* this, GlobalContext* globalCtx) {
|
|||
D_808535D0 ^= 1;
|
||||
|
||||
if (D_808535D0) {
|
||||
func_8005A444(Gameplay_GetCamera(globalCtx, 0), 8);
|
||||
Camera_ChangeMode(Gameplay_GetCamera(globalCtx, 0), CAM_MODE_BOWARROWZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12565,7 +12565,7 @@ s32 func_8084FCAC(Player* this, GlobalContext* globalCtx) {
|
|||
s16 angle;
|
||||
s16 temp;
|
||||
|
||||
angle = temp = func_8005A948(ACTIVE_CAM);
|
||||
angle = temp = Camera_GetInputDirYaw(ACTIVE_CAM);
|
||||
|
||||
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_DDOWN)) {
|
||||
angle = temp + 0x8000;
|
||||
|
|
|
@ -75,7 +75,7 @@ void EffectSsEnFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
|||
OPEN_DISPS(gfxCtx, "../z_eff_en_fire.c", 169);
|
||||
|
||||
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
|
||||
camYaw = (func_8005A9F4(ACTIVE_CAM) + 0x8000);
|
||||
camYaw = (Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000);
|
||||
Matrix_RotateY(camYaw * 0.0000958738f, MTXMODE_APPLY);
|
||||
|
||||
scale = Math_Sins(this->life * 0x333) * (this->rScale * 0.00005f);
|
||||
|
|
|
@ -91,9 +91,9 @@ void EffectSsFireTail_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
|
|||
Player* player = PLAYER;
|
||||
s16 bodyPart = this->rBodyPart;
|
||||
|
||||
this->pos.x = player->bodyPartsPos[bodyPart].x - (Math_Sins(func_8005A9F4(ACTIVE_CAM)) * 5.0f);
|
||||
this->pos.x = player->bodyPartsPos[bodyPart].x - (Math_Sins(Camera_GetCamDirYaw(ACTIVE_CAM)) * 5.0f);
|
||||
this->pos.y = player->bodyPartsPos[bodyPart].y;
|
||||
this->pos.z = player->bodyPartsPos[bodyPart].z - (Math_Coss(func_8005A9F4(ACTIVE_CAM)) * 5.0f);
|
||||
this->pos.z = player->bodyPartsPos[bodyPart].z - (Math_Coss(Camera_GetCamDirYaw(ACTIVE_CAM)) * 5.0f);
|
||||
|
||||
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
|
||||
}
|
||||
|
@ -101,11 +101,11 @@ void EffectSsFireTail_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
|
|||
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
|
||||
}
|
||||
|
||||
yaw = Math_Vec3f_Yaw(&scale, &this->vec) - func_8005A9F4(ACTIVE_CAM);
|
||||
yaw = Math_Vec3f_Yaw(&scale, &this->vec) - Camera_GetCamDirYaw(ACTIVE_CAM);
|
||||
temp1 = fabsf(Math_Coss(yaw));
|
||||
temp2 = Math_Sins(yaw);
|
||||
dist = Math_Vec3f_DistXZ(&scale, &this->vec) / (this->rReg10 * 0.1f);
|
||||
Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) + 0x8000) * 0.0000958738f, MTXMODE_APPLY);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * 0.0000958738f, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(temp2 * this->rReg2 * dist * 0.017453292f, MTXMODE_APPLY);
|
||||
temp2 = 1.0f - ((f32)(this->life + 1) / this->rLifespan);
|
||||
temp2 = 1.0f - SQ(temp2);
|
||||
|
|
|
@ -132,8 +132,8 @@ void EffectSsLightning_Update(GlobalContext* globalCtx, u32 index, EffectSs* thi
|
|||
pos.y = this->pos.y + (Math_Sins(this->rYaw - 0x4000) * scale);
|
||||
|
||||
scale = Math_Coss(this->rYaw - 0x4000) * scale;
|
||||
pos.x = this->pos.x - (Math_Coss(func_8005A948(ACTIVE_CAM)) * scale);
|
||||
pos.z = this->pos.z + (Math_Sins(func_8005A948(ACTIVE_CAM)) * scale);
|
||||
pos.x = this->pos.x - (Math_Coss(Camera_GetInputDirYaw(ACTIVE_CAM)) * scale);
|
||||
pos.z = this->pos.z + (Math_Sins(Camera_GetInputDirYaw(ACTIVE_CAM)) * scale);
|
||||
|
||||
EffectSsLightning_NewLightning(globalCtx, &pos, yaw, this);
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ void EffectSsSibuki_Update(GlobalContext* globalCtx, u32 index, EffectSs* this)
|
|||
this->rMoveDelay--;
|
||||
|
||||
if (this->rMoveDelay == 0) {
|
||||
yaw = func_8005A948(Gameplay_GetCamera(globalCtx, 0));
|
||||
yaw = Camera_GetInputDirYaw(Gameplay_GetCamera(globalCtx, 0));
|
||||
xzVelScale = ((200.0f + KREG(20)) * 0.01f) + ((0.1f * Math_Rand_ZeroOne()) * (KREG(23) + 20.0f));
|
||||
|
||||
if (this->rDirection != 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue