mirror of
https://github.com/zeldaret/oot
synced 2026-09-02 10:01:38 -04: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:
+233
-17
@@ -1,24 +1,96 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B3B50.s")
|
||||
extern GlobalContext* D_80161100;
|
||||
extern s32 D_8012CED8;
|
||||
extern s32 D_8012CED4;
|
||||
extern s32 D_8012CED0;
|
||||
extern char D_801612D0[0x1A];
|
||||
extern char D_801612EA;
|
||||
extern DBCamera* D_80161108;
|
||||
extern s16 D_80161148;
|
||||
extern s16 D_8016114A;
|
||||
extern s16 D_8016111A;
|
||||
extern s16 D_8016110C;
|
||||
|
||||
typedef struct {
|
||||
char state;
|
||||
s16 mode;
|
||||
CutsceneCameraPoint* eyePoints;
|
||||
CutsceneCameraPoint* atPoints;
|
||||
s16 frameCnt;
|
||||
s16 csPointsCnt;
|
||||
} DBCSEditorSlot;
|
||||
|
||||
extern DBCSEditorSlot sDbgEditorSlots[];
|
||||
extern char sDbgEditorStates[];
|
||||
|
||||
// DbgCamera_Vec3fVecSphGeoAdd
|
||||
Vec3f* func_800B3B50(Vec3f* dest, Vec3f* a, VecSph* b) {
|
||||
Vec3f copy, vecB;
|
||||
OLib_VecSphGeoToVec3f(&vecB, b);
|
||||
|
||||
copy.x = a->x + vecB.x;
|
||||
copy.y = a->y + vecB.y;
|
||||
copy.z = a->z + vecB.z;
|
||||
|
||||
*dest = copy;
|
||||
return dest;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B3BD4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B3DF8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B3EBC.s")
|
||||
void func_800B3EBC(Vec3s* src, Vec3f* dest) {
|
||||
dest->x = src->x;
|
||||
dest->y = src->y;
|
||||
dest->z = src->z;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B3EFC.s")
|
||||
void func_800B3EFC(Vec3f* src, Vec3s* dest) {
|
||||
dest->x = src->x;
|
||||
dest->y = src->y;
|
||||
dest->z = src->z;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B3F38.s")
|
||||
void func_800B3F38(Vec3f* src, Vec3f* dest) {
|
||||
dest->x = src->x;
|
||||
dest->y = src->y;
|
||||
dest->z = src->z;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B3F54.s")
|
||||
void func_800B3F54(Vec3s* src, Vec3f* dest) {
|
||||
dest->x = src->x;
|
||||
dest->y = src->y;
|
||||
dest->z = src->z;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B3F94.s")
|
||||
void func_800B3F94(PosRot* arg0, Vec3f* arg1, Vec3s* arg2) {
|
||||
VecSph sp28;
|
||||
Vec3f sp1C;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B3FF4.s")
|
||||
OLib_Vec3fDiffToVecSphGeo(&sp28, &arg0->pos, arg1);
|
||||
sp28.yaw -= arg0->rot.y;
|
||||
OLib_VecSphGeoToVec3f((Vec3f*)&sp1C, &sp28);
|
||||
func_800B3EFC(&sp1C, arg2);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B404C.s")
|
||||
void func_800B3FF4(PosRot* arg0, Vec3f* arg1, Vec3f* arg2) {
|
||||
VecSph sp28;
|
||||
Vec3f sp1C;
|
||||
|
||||
func_800B3F38(arg1, &sp1C);
|
||||
OLib_Vec3fToVecSphGeo(&sp28, &sp1C);
|
||||
sp28.yaw += arg0->rot.y;
|
||||
func_800B3B50(arg2, arg0, &sp28);
|
||||
}
|
||||
|
||||
void func_800B404C(s32 arg0, Vec3s* arg1, Vec3f* arg2) {
|
||||
Vec3f sp1C;
|
||||
|
||||
func_800B3EBC(arg1, &sp1C);
|
||||
func_800B3FF4(arg0, &sp1C, arg2);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B4088.s")
|
||||
|
||||
@@ -30,7 +102,25 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B44E0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B4920.s")
|
||||
/**
|
||||
* Prints individual csSlot point information
|
||||
*/
|
||||
void func_800B4920(char* varName, s16 pointCnt, CutsceneCameraPoint* csPoints) {
|
||||
s32 i;
|
||||
CutsceneCameraPoint* csPoint;
|
||||
|
||||
osSyncPrintf("@@@static SplinedatZ %s[] = {\n", varName);
|
||||
for (i = 0, csPoint = csPoints; i < pointCnt; i++, csPoint++) {
|
||||
osSyncPrintf("@@@ /* key frame %2d */ {\n", i);
|
||||
osSyncPrintf("@@@ /* code */ %d,\n", csPoint->continueFlag);
|
||||
osSyncPrintf("@@@ /* z */ %d,\n", csPoint->cameraRoll);
|
||||
osSyncPrintf("@@@ /* T */ %d,\n", csPoint->nextPointFrame);
|
||||
osSyncPrintf("@@@ /* zoom */ %f,\n", csPoint->viewAngle);
|
||||
osSyncPrintf("@@@ /* pos */ { %d, %d, %d }\n", csPoint->pos.x, csPoint->pos.y, csPoint->pos.z);
|
||||
osSyncPrintf("@@@ },\n");
|
||||
}
|
||||
osSyncPrintf("@@@};\n@@@\n");
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B4A68.s")
|
||||
|
||||
@@ -40,28 +130,154 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B4B20.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B4D58.s")
|
||||
void DbgCamera_Init(DBCamera* dbCamera, Camera* camera) {
|
||||
dbCamera->unk_10C6.x = dbCamera->unk_10C6.y = dbCamera->unk_10C6.z = 0;
|
||||
dbCamera->unk_44 = 0;
|
||||
dbCamera->unk_00 = 0;
|
||||
dbCamera->unk_34 = 0;
|
||||
dbCamera->unk_3C = 0;
|
||||
dbCamera->unk_38 = -1;
|
||||
dbCamera->unk_40 = -1;
|
||||
dbCamera->unk_4C = 0;
|
||||
dbCamera->fov = 0.0f;
|
||||
dbCamera->unk_50 = 0.0f;
|
||||
D_80161100 = camera->globalCtx;
|
||||
dbCamera->unk_7C = 0;
|
||||
dbCamera->unk_7E = -1;
|
||||
dbCamera->unk_80 = 1;
|
||||
dbCamera->unk_82 = 0;
|
||||
dbCamera->unk_84 = 0;
|
||||
dbCamera->unk_86 = 0;
|
||||
dbCamera->unk_78 = 0;
|
||||
dbCamera->unk_7A = 0;
|
||||
dbCamera->unk_10C0.x = 0;
|
||||
dbCamera->unk_10C0.y = 0;
|
||||
dbCamera->unk_10C0.z = 0;
|
||||
dbCamera->unk_6C = dbCamera->unk_70 = dbCamera->unk_74 = 0;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B4DE4.s")
|
||||
void DbgCamera_Enable(DBCamera* dbCamera, Camera* camera) {
|
||||
dbCamera->at = camera->at;
|
||||
dbCamera->eye = camera->eye;
|
||||
dbCamera->up = camera->up;
|
||||
dbCamera->fov = camera->fov;
|
||||
dbCamera->unk_4C = 0;
|
||||
dbCamera->unk_80 = 1;
|
||||
dbCamera->unk_82 = 0;
|
||||
dbCamera->unk_84 = 0;
|
||||
dbCamera->unk_86 = 1;
|
||||
dbCamera->unk_88 = 1;
|
||||
dbCamera->unk_78 = 0;
|
||||
dbCamera->unk_7A = 0;
|
||||
dbCamera->unk_50 = 0.0f;
|
||||
func_800B4088(dbCamera, camera);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B4E7C.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/DbgCamera_Update.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B8730.s")
|
||||
s32 func_800B8730(void) {
|
||||
s32 temp_v1;
|
||||
void* phi_v0;
|
||||
s32 phi_v1;
|
||||
|
||||
for (phi_v1 = 0; phi_v1 < 0x1A; phi_v1++) {
|
||||
if (D_801612D0[phi_v1] != 'O') {
|
||||
return phi_v1 + 'A';
|
||||
}
|
||||
}
|
||||
return '?';
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B87D8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B8978.s")
|
||||
/**
|
||||
* Clears a DBCSEditorSlot
|
||||
*/
|
||||
void func_800B8978(s32 editorSlot, s32 free) {
|
||||
|
||||
if (sDbgEditorSlots[editorSlot].state != '?') {
|
||||
sDbgEditorStates[sDbgEditorSlots[editorSlot].state] = 'X';
|
||||
}
|
||||
if (free) {
|
||||
DebugArena_FreeDebug(sDbgEditorSlots[editorSlot].atPoints, "../db_camera.c", 2784);
|
||||
DebugArena_FreeDebug(sDbgEditorSlots[editorSlot].eyePoints, "../db_camera.c", 2785);
|
||||
}
|
||||
sDbgEditorSlots[editorSlot].state = '?';
|
||||
sDbgEditorSlots[editorSlot].atPoints = NULL;
|
||||
sDbgEditorSlots[editorSlot].eyePoints = NULL;
|
||||
sDbgEditorSlots[editorSlot].mode = 0;
|
||||
sDbgEditorSlots[editorSlot].frameCnt = 0;
|
||||
sDbgEditorSlots[editorSlot].csPointsCnt = 0;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B8A0C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B8BA4.s")
|
||||
extern s32 D_801612EC;
|
||||
|
||||
s32 func_800B8BA4(void) {
|
||||
return D_801612EC;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B8BB0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B8DB0.s")
|
||||
|
||||
void func_800B8F30(char* arg0) {
|
||||
Mempak_DeleteFile(2, *arg0);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B8F58.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B9060.s")
|
||||
/**
|
||||
* Prints cs editor slot inforation
|
||||
*/
|
||||
void func_800B9060(s32 arg0) {
|
||||
DBCSEditorSlot* csSlot;
|
||||
s32 i;
|
||||
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* ****** spline point data ** start here ***** */\n@@@\n");
|
||||
for (i = 0, csSlot = sDbgEditorSlots; i < 0xF; i++, csSlot++) {
|
||||
if (csSlot->csPointsCnt != 0) {
|
||||
if (i != 0) {
|
||||
osSyncPrintf("@@@\n@@@/* ** %d ** */\n@@@\n", i);
|
||||
}
|
||||
func_800B4920("Lookat", csSlot->csPointsCnt, csSlot->atPoints);
|
||||
func_800B4920("Position", csSlot->csPointsCnt, csSlot->eyePoints);
|
||||
osSyncPrintf("@@@static short nPoints = %d;\n@@@\n", csSlot->csPointsCnt);
|
||||
osSyncPrintf("@@@static short nFrames = %d;\n@@@\n", csSlot->frameCnt);
|
||||
osSyncPrintf("@@@static short Mode = %d;\n@@@\n", csSlot->mode);
|
||||
}
|
||||
}
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* ****** spline point data ** finish! ***** */\n@@@\n");
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B91B0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B958C.s")
|
||||
/**
|
||||
* Initalizes the custscene editor
|
||||
*/
|
||||
void DbgCamera_FirstInit(Camera* camera, DBCamera* dbCamera) {
|
||||
s32 temp_s0;
|
||||
u32 temp_v0;
|
||||
u32 phi_v0;
|
||||
s32 i;
|
||||
char* p;
|
||||
|
||||
D_801612EA = '*';
|
||||
for (p = D_801612D0; p < &D_801612D0[0x1A]; p++) {
|
||||
*p = 'X';
|
||||
}
|
||||
|
||||
for (i = 0; i < 0xF; i++) {
|
||||
func_800B8978(i, 0);
|
||||
}
|
||||
|
||||
D_80161108 = dbCamera;
|
||||
D_8016110C = 0;
|
||||
D_80161148 = 0;
|
||||
D_8016114A = -1;
|
||||
D_8016111A = 0;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_800B9638.s")
|
||||
|
||||
+12
-12
@@ -952,7 +952,7 @@ f32 Actor_HeightDiff(Actor* actorA, Actor* actorB) {
|
||||
return actorB->posRot.pos.y - actorA->posRot.pos.y;
|
||||
}
|
||||
|
||||
f32 Player_GetCameraYOffset(Player* player) {
|
||||
f32 Player_GetHeight(Player* player) {
|
||||
f32 offset = (player->stateFlags1 & 0x800000) ? 32.0f : 0.0f;
|
||||
|
||||
if (LINK_IS_ADULT) {
|
||||
@@ -1012,7 +1012,7 @@ void func_8002DE04(GlobalContext* globalCtx, Actor* actorA, Actor* actorB) {
|
||||
|
||||
void func_8002DE74(GlobalContext* globalCtx, Player* player) {
|
||||
if ((globalCtx->roomCtx.curRoom.unk_03 != 4) && func_800C0CB8(globalCtx)) {
|
||||
func_8005A77C(Gameplay_GetCamera(globalCtx, 0), 6);
|
||||
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, 0), CAM_SET_HORSE0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1206,7 +1206,7 @@ void func_8002E4B4(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f
|
||||
u32 sp60;
|
||||
CollisionPoly* sp5C;
|
||||
f32 sp58;
|
||||
UNK_TYPE sp54;
|
||||
WaterBox* sp54;
|
||||
f32 sp50;
|
||||
Vec3f ripplePos;
|
||||
|
||||
@@ -2166,10 +2166,10 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) {
|
||||
Lights_Draw(lights, globalCtx->state.gfxCtx);
|
||||
|
||||
if (actor->flags & 0x1000) {
|
||||
func_800D1694(actor->posRot.pos.x + globalCtx->mainCamera.unk_80.x,
|
||||
func_800D1694(actor->posRot.pos.x + globalCtx->mainCamera.skyboxOffset.x,
|
||||
actor->posRot.pos.y +
|
||||
(f32)((actor->shape.unk_08 * actor->scale.y) + globalCtx->mainCamera.unk_80.y),
|
||||
actor->posRot.pos.z + globalCtx->mainCamera.unk_80.z, &actor->shape.rot);
|
||||
(f32)((actor->shape.unk_08 * actor->scale.y) + globalCtx->mainCamera.skyboxOffset.y),
|
||||
actor->posRot.pos.z + globalCtx->mainCamera.skyboxOffset.z, &actor->shape.rot);
|
||||
} else {
|
||||
func_800D1694(actor->posRot.pos.x, actor->posRot.pos.y + (actor->shape.unk_08 * actor->scale.y),
|
||||
actor->posRot.pos.z, &actor->shape.rot);
|
||||
@@ -2846,7 +2846,7 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, GlobalContext* globalC
|
||||
|
||||
if ((player != NULL) && (actor == player->unk_664)) {
|
||||
func_8008EDF0(player);
|
||||
func_8005A444(Gameplay_GetCamera(globalCtx, Gameplay_GetActiveCamId(globalCtx)), 0);
|
||||
Camera_ChangeMode(Gameplay_GetCamera(globalCtx, Gameplay_GetActiveCamId(globalCtx)), 0);
|
||||
}
|
||||
|
||||
if (actor == actorCtx->targetCtx.arrowPointedActor) {
|
||||
@@ -3831,7 +3831,7 @@ s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) {
|
||||
Player* player = PLAYER;
|
||||
f32 var;
|
||||
|
||||
if ((globalCtx->csCtx.state != 0) || (D_8011D394 != 0)) {
|
||||
if ((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) {
|
||||
var = Math_Vec3f_DistXYZ(&actor->posRot.pos, &globalCtx->view.eye) * 0.25f;
|
||||
} else {
|
||||
var = Math_Vec3f_DistXYZ(&actor->posRot.pos, &player->actor.posRot.pos);
|
||||
@@ -5474,7 +5474,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
|
||||
actor->posRot2.pos = actor->posRot.pos;
|
||||
actor->posRot2.pos.y += arg4;
|
||||
|
||||
if (!(((globalCtx->csCtx.state != 0) || (D_8011D394 != 0)) && (gSaveContext.entranceIndex == 0x00EE))) {
|
||||
if (!(((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE))) {
|
||||
var = actor->yawTowardsLink - actor->shape.rot.y;
|
||||
abs_var = ABS(var);
|
||||
if (abs_var >= 0x4300) {
|
||||
@@ -5483,7 +5483,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
|
||||
}
|
||||
}
|
||||
|
||||
if (((globalCtx->csCtx.state != 0) || (D_8011D394 != 0)) && (gSaveContext.entranceIndex == 0x00EE)) {
|
||||
if (((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE)) {
|
||||
sp2C = globalCtx->view.eye;
|
||||
} else {
|
||||
sp2C = player->actor.posRot2.pos;
|
||||
@@ -5503,7 +5503,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
|
||||
|
||||
actor->posRot2.pos = arg4;
|
||||
|
||||
if (!(((globalCtx->csCtx.state != 0) || (D_8011D394 != 0)) && (gSaveContext.entranceIndex == 0x00EE))) {
|
||||
if (!(((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE))) {
|
||||
var = actor->yawTowardsLink - actor->shape.rot.y;
|
||||
abs_var = ABS(var);
|
||||
if (abs_var >= 0x4300) {
|
||||
@@ -5512,7 +5512,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
|
||||
}
|
||||
}
|
||||
|
||||
if (((globalCtx->csCtx.state != 0) || (D_8011D394 != 0)) && (gSaveContext.entranceIndex == 0x00EE)) {
|
||||
if (((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE)) {
|
||||
sp24 = globalCtx->view.eye;
|
||||
} else {
|
||||
sp24 = player->actor.posRot2.pos;
|
||||
|
||||
@@ -354,7 +354,7 @@ void func_80041978(s32 iParm1, s32 iParm2) {
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800419B0.s")
|
||||
|
||||
u32 func_80041A28(CollisionContext* a0, u32 a1, u32 a2) {
|
||||
s32 func_80041A28(CollisionContext* a0, CollisionPoly* a1, u32 a2) {
|
||||
u32 uVar1;
|
||||
|
||||
uVar1 = func_800419B0(a0, a1, a2, 0);
|
||||
@@ -436,9 +436,9 @@ s32 func_80042108(CollisionContext* a0, CollisionPoly* a1, u32 a2) {
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042244.s")
|
||||
|
||||
u8 func_80042538(CollisionContext* colCtx, s32 iParm2) {
|
||||
u32 var1 = *(u32*)(iParm2 + 0xc);
|
||||
return var1;
|
||||
u32 func_80042538(CollisionContext* colCtx, WaterBox* arg1) {
|
||||
u32 unk0C = arg1->unk_0C;
|
||||
return unk0C & 0xFF;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042548.s")
|
||||
|
||||
+7162
-3012
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+25
-24
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "z64camera.h"
|
||||
|
||||
u16 D_8011E1C0 = 0;
|
||||
u16 D_8011E1C4 = 0;
|
||||
@@ -104,7 +105,7 @@ void func_800645A0(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(pad1->press.button, BTN_DUP) && (csCtx->state == CS_STATE_IDLE) &&
|
||||
(gSaveContext.sceneSetupIndex >= 4) && (D_8011D394 == 0)) {
|
||||
(gSaveContext.sceneSetupIndex >= 4) && (gDbgCamEnabled == 0)) {
|
||||
D_8015FCC8 = 1;
|
||||
gSaveContext.cutsceneIndex = 0xFFFD;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
@@ -1288,12 +1289,12 @@ s32 Cutscene_Command_CameraPositions(GlobalContext* globalCtx, CutsceneContext*
|
||||
if (csCtx->unk_1A != 0) {
|
||||
csCtx->unk_18 = cmdBase->startFrame;
|
||||
if (D_8015FCC8 != 0) {
|
||||
func_800C0874(globalCtx, csCtx->unk_14, 0x25);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, 1);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, 7);
|
||||
func_8005AC60(Gameplay_GetCamera(globalCtx, csCtx->unk_14));
|
||||
func_8005AC6C(Gameplay_GetCamera(globalCtx, csCtx->unk_14), csCtx->cameraFocus, csCtx->cameraPosition,
|
||||
PLAYER, relativeToLink);
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_DEMO0);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
|
||||
Camera_ResetAnim(Gameplay_GetCamera(globalCtx, csCtx->unk_14));
|
||||
Camera_SetCSParams(Gameplay_GetCamera(globalCtx, csCtx->unk_14), csCtx->cameraFocus,
|
||||
csCtx->cameraPosition, PLAYER, relativeToLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1325,12 +1326,12 @@ s32 Cutscene_Command_CameraFocus(GlobalContext* globalCtx, CutsceneContext* csCt
|
||||
if (csCtx->unk_1B != 0) {
|
||||
D_8015FCC0 = cmdBase->startFrame;
|
||||
if (D_8015FCC8 != 0) {
|
||||
func_800C0874(globalCtx, csCtx->unk_14, 0x25);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, 1);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, 7);
|
||||
func_8005AC60(Gameplay_GetCamera(globalCtx, csCtx->unk_14));
|
||||
func_8005AC6C(Gameplay_GetCamera(globalCtx, csCtx->unk_14), csCtx->cameraFocus, csCtx->cameraPosition,
|
||||
PLAYER, relativeToLink);
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_DEMO0);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
|
||||
Camera_ResetAnim(Gameplay_GetCamera(globalCtx, csCtx->unk_14));
|
||||
Camera_SetCSParams(Gameplay_GetCamera(globalCtx, csCtx->unk_14), csCtx->cameraFocus,
|
||||
csCtx->cameraPosition, PLAYER, relativeToLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1367,9 +1368,9 @@ s32 Cutscene_Command_07(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm
|
||||
if (D_8015FCC8 != 0) {
|
||||
sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14);
|
||||
sp2C->player = NULL;
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, 7);
|
||||
func_800C0874(globalCtx, csCtx->unk_14, 0x21);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0);
|
||||
sp28 = csCtx->cameraFocus->cameraRoll * 1.40625f;
|
||||
Camera_SetParam(sp2C, 64, &sp28);
|
||||
sp3C.x = csCtx->cameraFocus->pos.x;
|
||||
@@ -1378,8 +1379,8 @@ s32 Cutscene_Command_07(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm
|
||||
sp30.x = csCtx->cameraPosition->pos.x;
|
||||
sp30.y = csCtx->cameraPosition->pos.y;
|
||||
sp30.z = csCtx->cameraPosition->pos.z;
|
||||
func_800C04D8(globalCtx, csCtx->unk_14, &sp3C, &sp30);
|
||||
func_800C0704(globalCtx, csCtx->unk_14, csCtx->cameraPosition->viewAngle);
|
||||
Gameplay_CameraSetAtEye(globalCtx, csCtx->unk_14, &sp3C, &sp30);
|
||||
Gameplay_CameraSetFov(globalCtx, csCtx->unk_14, csCtx->cameraPosition->viewAngle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1410,17 +1411,17 @@ s32 Cutscene_Command_08(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm
|
||||
if (D_8015FCC8 != 0) {
|
||||
sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14);
|
||||
sp2C->player = NULL;
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, 7);
|
||||
func_800C0874(globalCtx, csCtx->unk_14, 0x21);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
|
||||
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0);
|
||||
sp3C.x = csCtx->cameraFocus->pos.x;
|
||||
sp3C.y = csCtx->cameraFocus->pos.y;
|
||||
sp3C.z = csCtx->cameraFocus->pos.z;
|
||||
sp30.x = csCtx->cameraPosition->pos.x;
|
||||
sp30.y = csCtx->cameraPosition->pos.y;
|
||||
sp30.z = csCtx->cameraPosition->pos.z;
|
||||
func_800C04D8(globalCtx, csCtx->unk_14, &sp3C, &sp30);
|
||||
func_800C0704(globalCtx, csCtx->unk_14, csCtx->cameraPosition->viewAngle);
|
||||
Gameplay_CameraSetAtEye(globalCtx, csCtx->unk_14, &sp3C, &sp30);
|
||||
Gameplay_CameraSetFov(globalCtx, csCtx->unk_14, csCtx->cameraPosition->viewAngle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1909,7 +1910,7 @@ void func_80068DC0(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
||||
case 0x028E:
|
||||
case 0x0292:
|
||||
case 0x0476:
|
||||
func_800C078C(globalCtx, D_8015FCC6, csCtx->unk_14);
|
||||
Gameplay_CopyCamera(globalCtx, D_8015FCC6, csCtx->unk_14);
|
||||
}
|
||||
|
||||
Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, 7);
|
||||
|
||||
+1
-1
@@ -246,7 +246,7 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) {
|
||||
sp54.y = player->actor.posRot.pos.y + 100.0f;
|
||||
sp54.z = player->actor.posRot.pos.z;
|
||||
|
||||
func_800C04D8(globalCtx, globalCtx->activeCamera, &player->actor.posRot.pos, &sp54);
|
||||
Gameplay_CameraSetAtEye(globalCtx, globalCtx->activeCamera, &player->actor.posRot.pos, &sp54);
|
||||
} else {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x,
|
||||
D_8011F9B8[i].pos.y, D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0,
|
||||
|
||||
+11
-11
@@ -75,19 +75,19 @@ Vec3f* OLib_Vec3fDistNormalize(Vec3f* dest, Vec3f* a, Vec3f* b) {
|
||||
*/
|
||||
Vec3f* OLib_VecSphToVec3f(Vec3f* dest, VecSph* sph) {
|
||||
Vec3f v;
|
||||
f32 sinPhi;
|
||||
f32 cosPhi;
|
||||
f32 sinTheta;
|
||||
f32 cosTheta;
|
||||
f32 sinPitch;
|
||||
f32 cosPitch;
|
||||
f32 sinYaw;
|
||||
f32 cosYaw;
|
||||
|
||||
cosPhi = Math_Coss(sph->pitch);
|
||||
cosTheta = Math_Coss(sph->yaw);
|
||||
sinPhi = Math_Sins(sph->pitch);
|
||||
sinTheta = Math_Sins(sph->yaw);
|
||||
cosPitch = Math_Coss(sph->pitch);
|
||||
cosYaw = Math_Coss(sph->yaw);
|
||||
sinPitch = Math_Sins(sph->pitch);
|
||||
sinYaw = Math_Sins(sph->yaw);
|
||||
|
||||
v.x = sph->r * sinPhi * sinTheta;
|
||||
v.y = sph->r * cosPhi;
|
||||
v.z = sph->r * sinPhi * cosTheta;
|
||||
v.x = sph->r * sinPitch * sinYaw;
|
||||
v.y = sph->r * cosPitch;
|
||||
v.z = sph->r * sinPitch * cosYaw;
|
||||
|
||||
*dest = v;
|
||||
|
||||
|
||||
+14
-20
@@ -1,36 +1,30 @@
|
||||
#include "global.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 unk_00;
|
||||
/* 0x04 */ u32 unk_04;
|
||||
/* 0x08 */ s16 unk_08;
|
||||
/* 0x0A */ s16 unk_0A;
|
||||
} struct_8007C820;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C680.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C704.s")
|
||||
|
||||
void func_8007C76C(f32* pfParm1, s16* puParm2) {
|
||||
puParm2[0] = pfParm1[0];
|
||||
puParm2[1] = pfParm1[1];
|
||||
puParm2[2] = pfParm1[2];
|
||||
void func_8007C76C(Vec3f* src, Vec3s* dst) {
|
||||
dst->x = src->x;
|
||||
dst->y = src->y;
|
||||
dst->z = src->z;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C7A8.s")
|
||||
|
||||
void func_8007C7F8(u32 uParm1, u32 uParm2) {
|
||||
u8 auStack4[4];
|
||||
u8 auStack8[4];
|
||||
void func_8007C7F8(CollisionContext* colCtx, Vec3f* arg1) {
|
||||
CollisionPoly* poly;
|
||||
s32 bgId;
|
||||
|
||||
func_8003C940(uParm1, auStack4, auStack8, uParm2);
|
||||
func_8003C940(colCtx, &poly, &bgId, arg1);
|
||||
}
|
||||
|
||||
void func_8007C820(struct_8007C820* puParm1, s16 uParm2, s16 uParm3, u32 uParm4, u32 param_5) {
|
||||
puParm1->unk_00 = uParm4;
|
||||
puParm1->unk_04 = param_5;
|
||||
puParm1->unk_08 = uParm2;
|
||||
puParm1->unk_0A = uParm3;
|
||||
void func_8007C820(OnePointDemoCamera* onePointCamera, s16 actionParameters, s16 initTimer,
|
||||
CutsceneCameraPoint* atPoints, CutsceneCameraPoint* eyePoints) {
|
||||
onePointCamera->atPoints = atPoints;
|
||||
onePointCamera->eyePoints = eyePoints;
|
||||
onePointCamera->actionParameters = actionParameters;
|
||||
onePointCamera->initTimer = initTimer;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C850.s")
|
||||
|
||||
+50
-50
@@ -14,7 +14,7 @@ s16 D_801614C8;
|
||||
u64 D_801614D0[0xA00];
|
||||
|
||||
void func_800BC450(GlobalContext* globalCtx) {
|
||||
func_8005A7A8(ACTIVE_CAM, globalCtx->unk_1242B - 1);
|
||||
Camera_ChangeDataIdx(ACTIVE_CAM, globalCtx->unk_1242B - 1);
|
||||
}
|
||||
|
||||
void func_800BC490(GlobalContext* globalCtx, s16 point) {
|
||||
@@ -223,12 +223,12 @@ void Gameplay_Init(GameState* thisx) {
|
||||
globalCtx->cameraPtrs[i] = NULL;
|
||||
}
|
||||
|
||||
func_80057C6C(&globalCtx->mainCamera, &globalCtx->view, &globalCtx->colCtx, globalCtx);
|
||||
Camera_ChangeStatus(&globalCtx->mainCamera, 7);
|
||||
Camera_Init(&globalCtx->mainCamera, &globalCtx->view, &globalCtx->colCtx, globalCtx);
|
||||
Camera_ChangeStatus(&globalCtx->mainCamera, CAM_STAT_ACTIVE);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
func_80057C6C(&globalCtx->subCameras[i], &globalCtx->view, &globalCtx->colCtx, globalCtx);
|
||||
Camera_ChangeStatus(&globalCtx->subCameras[i], 0x100);
|
||||
Camera_Init(&globalCtx->subCameras[i + 1], &globalCtx->view, &globalCtx->colCtx, globalCtx);
|
||||
Camera_ChangeStatus(&globalCtx->subCameras[i + 1], 0x100);
|
||||
}
|
||||
|
||||
globalCtx->cameraPtrs[0] = &globalCtx->mainCamera;
|
||||
@@ -385,13 +385,13 @@ void Gameplay_Init(GameState* thisx) {
|
||||
}
|
||||
|
||||
player = PLAYER;
|
||||
func_80058148(&globalCtx->mainCamera, player);
|
||||
func_8005A444(&globalCtx->mainCamera, 0);
|
||||
Camera_InitPlayerSettings(&globalCtx->mainCamera, player);
|
||||
Camera_ChangeMode(&globalCtx->mainCamera, CAM_MODE_NORMAL);
|
||||
|
||||
playerStartCamId = player->actor.params & 0xFF;
|
||||
if (playerStartCamId != 0xFF) {
|
||||
osSyncPrintf("player has start camera ID (" VT_FGCOL(BLUE) "%d" VT_RST ")\n", playerStartCamId);
|
||||
func_8005A7A8(&globalCtx->mainCamera, playerStartCamId);
|
||||
Camera_ChangeDataIdx(&globalCtx->mainCamera, playerStartCamId);
|
||||
}
|
||||
|
||||
if (YREG(15) == 0x20) {
|
||||
@@ -1011,7 +1011,7 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 3801);
|
||||
}
|
||||
|
||||
if ((sp80 == 0) || (D_8011D394 != 0)) {
|
||||
if ((sp80 == 0) || (gDbgCamEnabled != 0)) {
|
||||
s32 i; // 0x54
|
||||
s32 camIdx;
|
||||
Vec3s sp48;
|
||||
@@ -1028,12 +1028,12 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 3809);
|
||||
}
|
||||
|
||||
func_800591EC(&sp48, globalCtx->cameraPtrs[i]);
|
||||
Camera_Update(&sp48, globalCtx->cameraPtrs[i]);
|
||||
camIdx = globalCtx->nextCamera;
|
||||
}
|
||||
}
|
||||
|
||||
func_800591EC(&sp48, globalCtx->cameraPtrs[camIdx]);
|
||||
Camera_Update(&sp48, globalCtx->cameraPtrs[camIdx]);
|
||||
|
||||
if (1 && HREG(63)) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 3814);
|
||||
@@ -1231,7 +1231,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
|
||||
if (globalCtx->skyboxCtx.unk_140 != 0) {
|
||||
if (ACTIVE_CAM->setting != 0x19) {
|
||||
Vec3f sp74;
|
||||
func_8005AFB4(&sp74, ACTIVE_CAM);
|
||||
Camera_GetSkyboxOffset(&sp74, ACTIVE_CAM);
|
||||
SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0,
|
||||
globalCtx->view.eye.x + sp74.x, globalCtx->view.eye.y + sp74.y,
|
||||
globalCtx->view.eye.z + sp74.z);
|
||||
@@ -1313,7 +1313,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
|
||||
|
||||
if (globalCtx->view.unk_124 != 0) {
|
||||
Vec3s sp50;
|
||||
func_800591EC(&sp50, ACTIVE_CAM);
|
||||
Camera_Update(&sp50, ACTIVE_CAM);
|
||||
func_800AB944(&globalCtx->view);
|
||||
globalCtx->view.unk_124 = 0;
|
||||
if ((globalCtx->skyboxId != 0) && (globalCtx->skyboxId != 0x1D) && !globalCtx->envCtx.skyDisabled) {
|
||||
@@ -1322,7 +1322,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
func_80059EC8(ACTIVE_CAM);
|
||||
Camera_Finish(ACTIVE_CAM);
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_play.c", 4508);
|
||||
}
|
||||
@@ -1533,8 +1533,8 @@ s16 Gameplay_CreateSubCamera(GlobalContext* globalCtx) {
|
||||
i);
|
||||
|
||||
globalCtx->cameraPtrs[i] = &globalCtx->subCameras[i - 1];
|
||||
func_80057C6C(globalCtx->cameraPtrs[i], &globalCtx->view, &globalCtx->colCtx, globalCtx);
|
||||
globalCtx->cameraPtrs[i]->unk_164 = i;
|
||||
Camera_Init(globalCtx->cameraPtrs[i], &globalCtx->view, &globalCtx->colCtx, globalCtx);
|
||||
globalCtx->cameraPtrs[i]->thisIdx = i;
|
||||
|
||||
return i;
|
||||
}
|
||||
@@ -1589,94 +1589,94 @@ Camera* Gameplay_GetCamera(GlobalContext* globalCtx, s16 camId) {
|
||||
return globalCtx->cameraPtrs[camIdx];
|
||||
}
|
||||
|
||||
s32 func_800C04D8(GlobalContext* globalCtx, s16 camId, Vec3f* arg2, Vec3f* arg3) {
|
||||
s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye) {
|
||||
s32 ret = 0;
|
||||
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
|
||||
Camera* camera = globalCtx->cameraPtrs[camIdx];
|
||||
Player* player;
|
||||
|
||||
ret |= Camera_SetParam(camera, 1, arg2);
|
||||
ret |= Camera_SetParam(camera, 1, at);
|
||||
ret <<= 1;
|
||||
ret |= Camera_SetParam(camera, 2, arg3);
|
||||
ret |= Camera_SetParam(camera, 2, eye);
|
||||
|
||||
camera->dist = Math3D_Vec3f_DistXYZ(arg2, arg3);
|
||||
camera->dist = Math3D_Vec3f_DistXYZ(at, eye);
|
||||
|
||||
player = camera->player;
|
||||
if (player != NULL) {
|
||||
camera->unk_E4.x = arg2->x - player->actor.posRot.pos.x;
|
||||
camera->unk_E4.y = arg2->y - player->actor.posRot.pos.y;
|
||||
camera->unk_E4.z = arg2->z - player->actor.posRot.pos.z;
|
||||
camera->posOffset.x = at->x - player->actor.posRot.pos.x;
|
||||
camera->posOffset.y = at->y - player->actor.posRot.pos.y;
|
||||
camera->posOffset.z = at->z - player->actor.posRot.pos.z;
|
||||
} else {
|
||||
camera->unk_E4.x = camera->unk_E4.y = camera->unk_E4.z = 0.0f;
|
||||
camera->posOffset.x = camera->posOffset.y = camera->posOffset.z = 0.0f;
|
||||
}
|
||||
|
||||
camera->unk_100 = 0.01f;
|
||||
camera->atLERPStepScale = 0.01f;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_800C05E4(GlobalContext* globalCtx, s16 camId, Vec3f* arg2, Vec3f* arg3, Vec3f* arg4) {
|
||||
s32 Gameplay_CameraSetAtEyeUp(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up) {
|
||||
s32 ret = 0;
|
||||
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
|
||||
Camera* camera = globalCtx->cameraPtrs[camIdx];
|
||||
Player* player;
|
||||
|
||||
ret |= Camera_SetParam(camera, 1, arg2);
|
||||
ret |= Camera_SetParam(camera, 1, at);
|
||||
ret <<= 1;
|
||||
ret |= Camera_SetParam(camera, 2, arg3);
|
||||
ret |= Camera_SetParam(camera, 2, eye);
|
||||
ret <<= 1;
|
||||
ret |= Camera_SetParam(camera, 4, arg4);
|
||||
ret |= Camera_SetParam(camera, 4, up);
|
||||
|
||||
camera->dist = Math3D_Vec3f_DistXYZ(arg2, arg3);
|
||||
camera->dist = Math3D_Vec3f_DistXYZ(at, eye);
|
||||
|
||||
player = camera->player;
|
||||
if (player != NULL) {
|
||||
camera->unk_E4.x = arg2->x - player->actor.posRot.pos.x;
|
||||
camera->unk_E4.y = arg2->y - player->actor.posRot.pos.y;
|
||||
camera->unk_E4.z = arg2->z - player->actor.posRot.pos.z;
|
||||
camera->posOffset.x = at->x - player->actor.posRot.pos.x;
|
||||
camera->posOffset.y = at->y - player->actor.posRot.pos.y;
|
||||
camera->posOffset.z = at->z - player->actor.posRot.pos.z;
|
||||
} else {
|
||||
camera->unk_E4.x = camera->unk_E4.y = camera->unk_E4.z = 0.0f;
|
||||
camera->posOffset.x = camera->posOffset.y = camera->posOffset.z = 0.0f;
|
||||
}
|
||||
|
||||
camera->unk_100 = 0.01f;
|
||||
camera->atLERPStepScale = 0.01f;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_800C0704(GlobalContext* globalCtx, s16 camId, f32 arg2) {
|
||||
s32 ret = Camera_SetParam(globalCtx->cameraPtrs[camId], 32, &arg2) & 1;
|
||||
s32 Gameplay_CameraSetFov(GlobalContext* globalCtx, s16 camId, f32 fov) {
|
||||
s32 ret = Camera_SetParam(globalCtx->cameraPtrs[camId], 0x20, &fov) & 1;
|
||||
if (1) {}
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_800C0744(GlobalContext* globalCtx, s16 camId, s16 arg2) {
|
||||
s32 Gameplay_SetCameraRoll(GlobalContext* globalCtx, s16 camId, s16 roll) {
|
||||
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
|
||||
Camera* camera;
|
||||
|
||||
camera = globalCtx->cameraPtrs[camIdx];
|
||||
camera->roll = arg2;
|
||||
camera->roll = roll;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void func_800C078C(GlobalContext* globalCtx, s16 camId1, s16 camId2) {
|
||||
void Gameplay_CopyCamera(GlobalContext* globalCtx, s16 camId1, s16 camId2) {
|
||||
s16 camIdx2 = (camId2 == -1) ? globalCtx->activeCamera : camId2;
|
||||
s16 camIdx1 = (camId1 == -1) ? globalCtx->activeCamera : camId1;
|
||||
|
||||
func_8005AE64(globalCtx->cameraPtrs[camIdx1], globalCtx->cameraPtrs[camIdx2]);
|
||||
Camera_Copy(globalCtx->cameraPtrs[camIdx1], globalCtx->cameraPtrs[camIdx2]);
|
||||
}
|
||||
|
||||
s32 func_800C0808(GlobalContext* globalCtx, s16 camId, Player* player, s16 arg3) {
|
||||
s32 func_800C0808(GlobalContext* globalCtx, s16 camId, Player* player, s16 setting) {
|
||||
Camera* camera;
|
||||
s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
|
||||
|
||||
camera = globalCtx->cameraPtrs[camIdx];
|
||||
func_80058148(camera, player);
|
||||
return func_8005A77C(camera, arg3);
|
||||
Camera_InitPlayerSettings(camera, player);
|
||||
return Camera_ChangeSetting(camera, setting);
|
||||
}
|
||||
|
||||
void func_800C0874(GlobalContext* globalCtx, s16 camId, s16 arg2) {
|
||||
func_8005A77C(Gameplay_GetCamera(globalCtx, camId), arg2);
|
||||
s32 Gameplay_CameraChangeSetting(GlobalContext* globalCtx, s16 camId, s16 setting) {
|
||||
return Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, camId), setting);
|
||||
}
|
||||
|
||||
void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2) {
|
||||
@@ -1695,14 +1695,14 @@ void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2) {
|
||||
}
|
||||
|
||||
if (arg2 <= 0) {
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 7);
|
||||
globalCtx->cameraPtrs[0]->unk_14E = globalCtx->cameraPtrs[0]->unk_162 = 0;
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_ACTIVE);
|
||||
globalCtx->cameraPtrs[0]->childCamIdx = globalCtx->cameraPtrs[0]->parentCamIdx = 0;
|
||||
} else {
|
||||
func_800800F8(globalCtx, 1020, arg2, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
s16 func_800C09A4(GlobalContext* globalCtx, s16 camId) {
|
||||
s16 Gameplay_CameraGetUID(GlobalContext* globalCtx, s16 camId) {
|
||||
Camera* camera = globalCtx->cameraPtrs[camId];
|
||||
|
||||
if (camera != NULL) {
|
||||
@@ -1827,7 +1827,7 @@ s32 func_800C0D34(GlobalContext* globalCtx, Actor* actor, s16* yaw) {
|
||||
}
|
||||
|
||||
s32 func_800C0DB4(GlobalContext* globalCtx, Vec3f* arg1) {
|
||||
UNK_TYPE sp3C;
|
||||
WaterBox* sp3C;
|
||||
CollisionPoly* sp38;
|
||||
Vec3f sp2C;
|
||||
s32 sp28;
|
||||
|
||||
@@ -406,7 +406,7 @@ void func_8008EEAC(GlobalContext* globalCtx, Actor* actor) {
|
||||
this->unk_684 = actor;
|
||||
this->stateFlags1 |= 0x10000;
|
||||
Camera_SetParam(Gameplay_GetCamera(globalCtx, 0), 8, actor);
|
||||
func_8005A444(Gameplay_GetCamera(globalCtx, 0), 2);
|
||||
Camera_ChangeMode(Gameplay_GetCamera(globalCtx, 0), 2);
|
||||
}
|
||||
|
||||
s32 func_8008EF30(GlobalContext* globalCtx) {
|
||||
|
||||
+22
-22
@@ -148,7 +148,7 @@ QuakeRequest* Quake_AddImpl(Camera* cam, u32 callbackIdx) {
|
||||
|
||||
func_80106860(req, 0, sizeof(QuakeRequest)); // memset
|
||||
req->cam = cam;
|
||||
req->camPtrIdx = cam->unk_164;
|
||||
req->camPtrIdx = cam->thisIdx;
|
||||
req->callbackIdx = callbackIdx;
|
||||
req->unk_1C = 1;
|
||||
req->randIdx = ((s16)(Math_Rand_ZeroOne() * (f32)0x10000) & ~3) + idx;
|
||||
@@ -293,7 +293,7 @@ u32 Quake_RemoveFromIdx(s16 idx) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s16 Quake_Calc(Camera* camera, UnkQuakeCalcStruct* camData) {
|
||||
s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData) {
|
||||
f32 max;
|
||||
f32 max2;
|
||||
QuakeRequest* req;
|
||||
@@ -314,12 +314,12 @@ s16 Quake_Calc(Camera* camera, UnkQuakeCalcStruct* camData) {
|
||||
camData->rotZ = 0;
|
||||
camData->unk_1A = 0;
|
||||
camData->zoom = 0;
|
||||
camData->vec1.x = 0.0f;
|
||||
camData->vec1.y = 0.0f;
|
||||
camData->vec1.z = 0.0f;
|
||||
camData->vec2.x = 0.0f;
|
||||
camData->vec2.y = 0.0f;
|
||||
camData->vec2.z = 0.0f;
|
||||
camData->atOffset.x = 0.0f;
|
||||
camData->atOffset.y = 0.0f;
|
||||
camData->atOffset.z = 0.0f;
|
||||
camData->eyeOffset.x = 0.0f;
|
||||
camData->eyeOffset.y = 0.0f;
|
||||
camData->eyeOffset.z = 0.0f;
|
||||
camData->unk_20 = 0.0f;
|
||||
|
||||
if (sQuakeRequestCount == 0) {
|
||||
@@ -335,29 +335,29 @@ s16 Quake_Calc(Camera* camera, UnkQuakeCalcStruct* camData) {
|
||||
req->camPtrIdx);
|
||||
Quake_Remove(req);
|
||||
} else {
|
||||
temp = &camera->unk_164;
|
||||
eq = req->cam->unk_164 != *temp;
|
||||
temp = &camera->thisIdx;
|
||||
eq = req->cam->thisIdx != *temp;
|
||||
absSpeedDiv = ABS(req->speed) / (f32)0x8000;
|
||||
if (sQuakeCallbacks[req->callbackIdx](req, &shake) == 0) {
|
||||
Quake_Remove(req);
|
||||
} else if (eq == 0) {
|
||||
if (fabsf(camData->vec1.x) < fabsf(shake.vec1.x)) {
|
||||
camData->vec1.x = shake.vec1.x;
|
||||
if (fabsf(camData->atOffset.x) < fabsf(shake.vec1.x)) {
|
||||
camData->atOffset.x = shake.vec1.x;
|
||||
}
|
||||
if (fabsf(camData->vec1.y) < fabsf(shake.vec1.y)) {
|
||||
camData->vec1.y = shake.vec1.y;
|
||||
if (fabsf(camData->atOffset.y) < fabsf(shake.vec1.y)) {
|
||||
camData->atOffset.y = shake.vec1.y;
|
||||
}
|
||||
if (fabsf(camData->vec1.z) < fabsf(shake.vec1.z)) {
|
||||
camData->vec1.z = shake.vec1.z;
|
||||
if (fabsf(camData->atOffset.z) < fabsf(shake.vec1.z)) {
|
||||
camData->atOffset.z = shake.vec1.z;
|
||||
}
|
||||
if (fabsf(camData->vec2.x) < fabsf(shake.vec2.x)) {
|
||||
camData->vec2.x = shake.vec2.x;
|
||||
if (fabsf(camData->eyeOffset.x) < fabsf(shake.vec2.x)) {
|
||||
camData->eyeOffset.x = shake.vec2.x;
|
||||
}
|
||||
if (fabsf(camData->vec2.y) < fabsf(shake.vec2.y)) {
|
||||
camData->vec2.y = shake.vec2.y;
|
||||
if (fabsf(camData->eyeOffset.y) < fabsf(shake.vec2.y)) {
|
||||
camData->eyeOffset.y = shake.vec2.y;
|
||||
}
|
||||
if (fabsf(camData->vec2.z) < fabsf(shake.vec2.z)) {
|
||||
camData->vec2.z = shake.vec2.z;
|
||||
if (fabsf(camData->eyeOffset.z) < fabsf(shake.vec2.z)) {
|
||||
camData->eyeOffset.z = shake.vec2.z;
|
||||
}
|
||||
if (camData->rotZ < shake.rotZ) {
|
||||
camData->rotZ = shake.rotZ;
|
||||
|
||||
+5
-4
@@ -358,7 +358,7 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) {
|
||||
{
|
||||
Vec3f sp60;
|
||||
spA8 = POLY_OPA_DISP;
|
||||
func_8005AFB4(&sp60, camera);
|
||||
Camera_GetSkyboxOffset(&sp60, camera);
|
||||
func_8009638C(&spA8, polygon1->single.source, polygon1->single.tlut, polygon1->single.width,
|
||||
polygon1->single.height, polygon1->single.fmt, polygon1->single.siz,
|
||||
polygon1->single.mode0, polygon1->single.tlutCount,
|
||||
@@ -390,8 +390,9 @@ BgImage* func_80096A74(PolygonType1* polygon1, GlobalContext* globalCtx) {
|
||||
s32 i;
|
||||
|
||||
camera = ACTIVE_CAM;
|
||||
camId = camera->unk_148;
|
||||
camId2 = func_80041C10(&globalCtx->colCtx, camId, 50)->unk_0E;
|
||||
camId = camera->camDataIdx;
|
||||
// jfifid
|
||||
camId2 = func_80041C10(&globalCtx->colCtx, camId, 50)[2].y;
|
||||
if (camId2 >= 0) {
|
||||
camId = camId2;
|
||||
}
|
||||
@@ -453,7 +454,7 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) {
|
||||
{
|
||||
Vec3f sp5C;
|
||||
spA8 = POLY_OPA_DISP;
|
||||
func_8005AFB4(&sp5C, camera);
|
||||
Camera_GetSkyboxOffset(&sp5C, camera);
|
||||
func_8009638C(&spA8, bgImage->source, bgImage->tlut, bgImage->width, bgImage->height, bgImage->fmt,
|
||||
bgImage->siz, bgImage->mode0, bgImage->tlutCount,
|
||||
(sp5C.x + sp5C.z) * 1.2f + sp5C.y * 0.6f, sp5C.y * 2.4f + (sp5C.x + sp5C.z) * 0.3f);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user