From f227194d24a3282ea120d5ef73a8ecc94704e967 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Mon, 19 Feb 2024 07:05:11 -0600 Subject: [PATCH] docs and such (#137) --- include/context.h | 12 +- include/fox_map.h | 52 +- include/macros.h | 1 + include/structs.h | 10 +- linker_scripts/us/symbol_addrs_EBFBE0.txt | 1 + linker_scripts/us/symbol_addrs_engine.txt | 12 +- src/main/fox_360.c | 44 +- src/main/fox_A48A0.c | 15 +- src/main/fox_context.c | 12 +- src/main/fox_demo.c | 101 ++- src/main/fox_game.c | 2 +- src/main/fox_hud.c | 210 +++--- src/main/fox_play.c | 88 +-- src/main/fox_std_lib.c | 37 +- src/overlays/ovl_ending/fox_end1.c | 60 +- src/overlays/ovl_i1/fox_co.c | 116 +-- src/overlays/ovl_i2/fox_me.c | 84 +-- src/overlays/ovl_i2/fox_sx.c | 50 +- src/overlays/ovl_i3/fox_a6.c | 110 +-- src/overlays/ovl_i3/fox_aq.c | 60 +- src/overlays/ovl_i3/fox_so.c | 126 ++-- src/overlays/ovl_i3/fox_zo.c | 66 +- src/overlays/ovl_i4/fox_bo.c | 102 +-- src/overlays/ovl_i4/fox_fo.c | 54 +- src/overlays/ovl_i4/fox_ka.c | 84 +-- src/overlays/ovl_i4/fox_sz.c | 132 ++-- src/overlays/ovl_i5/fox_ma.c | 216 +++--- src/overlays/ovl_i5/fox_ti_cs.c | 106 +-- src/overlays/ovl_i6/fox_andross.c | 94 +-- src/overlays/ovl_i6/fox_sy.c | 172 ++--- src/overlays/ovl_i6/fox_ve2.c | 32 +- src/overlays/ovl_menu/fox_map.c | 873 ++++++++++++---------- src/overlays/ovl_menu/fox_option.c | 15 +- src/overlays/ovl_menu/fox_title.c | 189 +++-- src/overlays/ovl_menu/fox_title.h | 10 +- tools/comptool.py | 13 +- tools/textconv.py | 13 +- 37 files changed, 1765 insertions(+), 1609 deletions(-) diff --git a/include/context.h b/include/context.h index 8ccdf044..39208a24 100644 --- a/include/context.h +++ b/include/context.h @@ -29,12 +29,12 @@ extern f32 gGroundLevel; extern f32 D_80177950; extern f32 D_80177968; extern f32 D_80177970; -extern f32 D_80177978; -extern f32 D_80177980; -extern f32 D_80177988; -extern f32 D_801779A0; -extern f32 D_801779B8; -extern f32 D_801779C0; +extern f32 gCsCamEyeX; +extern f32 gCsCamEyeY; +extern f32 gCsCamEyeZ; +extern f32 gCsCamAtX; +extern f32 gCsCamAtY; +extern f32 gCsCamAtZ; extern Vec3f D_801779D8; extern Vec3f D_801779E8; extern bool gExpertMode; diff --git a/include/fox_map.h b/include/fox_map.h index 15e3a51b..caabbefa 100644 --- a/include/fox_map.h +++ b/include/fox_map.h @@ -11,36 +11,56 @@ typedef struct { /* 0xC */ f32 scale; } ObjPosition; +typedef enum { + /* 0 */ PL_PATH_BLU, + /* 1 */ PL_PATH_YLW, + /* 2 */ PL_PATH_RED, + /* 3 */ PL_WARP_YLW, + /* 4 */ PL_WARP_RED, +} PathType; + typedef struct { - /* 0x00 */ s32 unk_00; - /* 0x04 */ PlanetId unk_04; - /* 0x08 */ PlanetId unk_08; - /* 0x0C */ s32 unk_0C; + /* 0x00 */ PathType type; + /* 0x04 */ PlanetId start; + /* 0x08 */ PlanetId end; + /* 0x0C */ s32 length; /* 0x10 */ char pad10[0x4]; /* 0x14 */ s32 unk_14; - /* 0x18 */ s32 unk_18; -} UnkStruct_D_menu_801AFD18; // size = 0x1C + /* 0x18 */ s32 alpha; +} PlanetPath; // size = 0x1C + +typedef enum { + /* 0 */ PL_ANIM_STATIC, + /* 1 */ PL_ANIM_BILLBOARD, + /* 2 */ PL_ANIM_ROTATE_Y, + /* 3 */ PL_ANIM_ROTATE_Z, + /* 4 */ PL_ANIM_SPIN, +} PlanetAnim; + +typedef struct { + /* 0x0 */ f32 radius; + /* 0x4 */ f32 incl; + /* 0x8 */ f32 tilt; +} OrbitParams; typedef struct { /* 0x00 */ PlanetId id; - /* 0x04 */ f32 unk_04; - /* 0x08 */ f32 unk_08; - /* 0x0C */ f32 zAngle; + /* 0x04 */ OrbitParams orbit; /* 0x10 */ Vec3f pos; - /* 0x1C */ f32 unk_1C; + /* 0x1C */ f32 longitude; /* 0x20 */ f32 scale; /* 0x24 */ s32 alpha; - /* 0x28 */ s32 unk_28; - /* 0x2C */ PlanetId unk_2C; - /* 0x30 */ PlanetId unk_30; - /* 0x34 */ PlanetId unk_34; + /* 0x28 */ PlanetAnim anim; + /* 0x2C */ PlanetId dest1; + /* 0x30 */ PlanetId dest2; + /* 0x34 */ PlanetId warp; } Planet; // size = 0x38 typedef struct { - /* 0x0 */ u8* addr; + /* 0x0 */ u8* texture; /* 0x4 */ s32 width; /* 0x8 */ s32 height; /* 0xC */ f32 xPos; -} Texture; // size = 0x10 +} TitleCard; // size = 0x10 #endif diff --git a/include/macros.h b/include/macros.h index 3020587b..1fce8c86 100644 --- a/include/macros.h +++ b/include/macros.h @@ -23,6 +23,7 @@ #define SIGN_OF(x) (((x) > 0) ? 1 : ((x) == 0) ? 0 : -1) #define SQ(x) ((x) * (x)) +#define CUBE(x) ((x) * (x) * (x)) #define VEC3F_SQ(vec) (SQ((vec).x) + SQ((vec).y) + SQ((vec).z)) #define DOT_XYZ(a, b) ((a).x * (b).x + (a).y * (b).y + (a).z * (b).z) #define ABS(x) ((x) >= 0 ? (x) : -(x)) diff --git a/include/structs.h b/include/structs.h index 38f2cae8..292e6285 100644 --- a/include/structs.h +++ b/include/structs.h @@ -42,13 +42,9 @@ typedef struct { #define BONUS_TEXT_1UP 101 typedef struct { - /* 0x00 */ f32 unk_00; - /* 0x04 */ f32 unk_04; - /* 0x08 */ f32 unk_08; - /* 0x0C */ f32 unk_0C; - /* 0x10 */ f32 unk_10; - /* 0x14 */ f32 unk_14; -} UnkStruct_D_menu_801B8294; // size = 0x18 + /* 0x00 */ Vec3f eye; + /* 0x0C */ Vec3f at; +} CameraPoint; // size = 0x18 typedef struct { /* 0x00 */ f32 unk_00; diff --git a/linker_scripts/us/symbol_addrs_EBFBE0.txt b/linker_scripts/us/symbol_addrs_EBFBE0.txt index f2751b8d..e9f9ab74 100644 --- a/linker_scripts/us/symbol_addrs_EBFBE0.txt +++ b/linker_scripts/us/symbol_addrs_EBFBE0.txt @@ -8,6 +8,7 @@ D_menu_801AE99C = 0x801AE99C; // force_migration:True segment:ovl_menu sTimeTrialMinuteTextures = 0x801AF28C; // force_migration:True segment:ovl_menu sPlanetList = 0x801AF7E8;// segment:ovl_menu spectrumAnalizerMode = 0x801B9318;// segment:ovl_menu +sPaths = 0x801AFD18; // segment:ovl_menu D_menu_801B6E50 = 0x801B6E50; // force_migration:True segment:ovl_menu D_menu_801B7BA0 = 0x801B7BA0;// segment:ovl_menu D_menu_801B8248 = 0x801B8248; // size:0x28 segment:ovl_menu diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index dd6053f0..6e78ca3a 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -454,15 +454,15 @@ gBombButton = 0x80177948; D_80177950 = 0x80177950; D_80177958 = 0x80177958; gInputHold = 0x80177974; -D_80177978 = 0x80177978; +gCsCamEyeX = 0x80177978; gInputPress = 0x8017797C; -D_80177980 = 0x80177980; -D_80177988 = 0x80177988; +gCsCamEyeY = 0x80177980; +gCsCamEyeZ = 0x80177988; D_80177990 = 0x80177990; -D_801779A0 = 0x801779A0; +gCsCamAtX = 0x801779A0; D_801779A8 = 0x801779A8; -D_801779B8 = 0x801779B8; -D_801779C0 = 0x801779C0; +gCsCamAtY = 0x801779B8; +gCsCamAtZ = 0x801779C0; gChargeTimers = 0x801779C8; D_801779D8 = 0x801779D8; D_801779E8 = 0x801779E8; diff --git a/src/main/fox_360.c b/src/main/fox_360.c index 26a61309..1567fa2e 100644 --- a/src/main/fox_360.c +++ b/src/main/fox_360.c @@ -151,23 +151,23 @@ void func_8002E700(Player* player) { player->unk_4DC = gCsFrameCount = 0; player->unk_130 = player->unk_034 = player->unk_110 = player->unk_08C = player->unk_0D8.x = player->unk_0D8.y = player->unk_0D8.z = player->unk_134 = player->unk_4D8 = 0.0f; - D_80177978 = 1673.0f; - D_80177980 = 337.0f; + gCsCamEyeX = 1673.0f; + gCsCamEyeY = 337.0f; if (player->pos.z < 0.0f) { - D_80177988 = -480.0f; + gCsCamEyeZ = -480.0f; } else { - D_80177988 = 480.0f; + gCsCamEyeZ = 480.0f; } player->unk_0E8 = 0.0f; player->pos.x = 2100.0f; player->unk_0D0 = 30.0f; player->unk_0E4 = -8.0f; player->unk_114 = 90.0f; - D_801779A0 = 2100.0f; + gCsCamAtX = 2100.0f; player->pos.y = 450.0f; - D_801779B8 = 450.0f; + gCsCamAtY = 450.0f; player->pos.z = 0.0f; - D_801779C0 = 0.0f; + gCsCamAtZ = 0.0f; D_80177A48[0] = 1.0f; player->wings.unk_2C = 1; player->unk_1D0++; @@ -190,9 +190,9 @@ void func_8002E700(Player* player) { player->pos.y = -420.0f; player->pos.z = 0.0f; player->unk_0EC = 0.0f; - D_80177978 = -683.0f; - D_80177980 = -346.0f; - D_80177988 = 305.0f; + gCsCamEyeX = -683.0f; + gCsCamEyeY = -346.0f; + gCsCamEyeZ = 305.0f; player->shields = Play_GetMaxShields(); player->wings.rightState = WINGSTATE_INTACT; player->wings.leftState = WINGSTATE_INTACT; @@ -207,7 +207,7 @@ void func_8002E700(Player* player) { break; case 3: D_8017835C = 32; - D_80177988 -= 1.0f; + gCsCamEyeZ -= 1.0f; if (D_80178340 == 0) { player->unk_190 = player->unk_194 = 5.0f; player->unk_114 = 90.0f; @@ -218,8 +218,8 @@ void func_8002E700(Player* player) { } break; case 4: - D_80177988 -= 1.0f; - D_80177978 -= 1.0f; + gCsCamEyeZ -= 1.0f; + gCsCamEyeX -= 1.0f; player->unk_0E4 += 0.4f; if (gCsFrameCount >= 130) { player->state_1C8 = PLAYERSTATE_1C8_3; @@ -231,9 +231,9 @@ void func_8002E700(Player* player) { } break; } - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 2.0f, 0); Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 3.0f, 0); Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, 0); @@ -250,12 +250,12 @@ void func_8002E700(Player* player) { player->pos.z += player->vel.z; player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0); } void func_8002ED60(Player* player) { diff --git a/src/main/fox_A48A0.c b/src/main/fox_A48A0.c index 0587b104..b2f18337 100644 --- a/src/main/fox_A48A0.c +++ b/src/main/fox_A48A0.c @@ -2,8 +2,7 @@ void func_800A3CA0(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, D_80177978, D_80177980, D_80177988, D_801779A0, D_801779B8, D_801779C0, 0.0f, 1.0f, 0.0f, - 1); + Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 1.0f, 0.0f, 1); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, 1); Matrix_RotateY(gGfxMatrix, gControllerPress[gPlayerNum].stick_x * M_DTOR, 1); Matrix_RotateX(gGfxMatrix, gControllerPress[gPlayerNum].stick_y * M_DTOR, 1); @@ -22,12 +21,12 @@ void func_800A3E00(void) { case 1: D_80177868 = 2; gDrawMode = DRAWMODE_7; - D_801779B8 = 0.0f; - D_801779A0 = D_801779B8; - D_80177988 = D_801779A0; - D_80177980 = D_80177988; - D_80177978 = D_80177980; - D_801779C0 = -10.0f; + gCsCamAtY = 0.0f; + gCsCamAtX = gCsCamAtY; + gCsCamEyeZ = gCsCamAtX; + gCsCamEyeY = gCsCamEyeZ; + gCsCamEyeX = gCsCamEyeY; + gCsCamAtZ = -10.0f; break; case 2: if ((gControllerPress[0].button & START_BUTTON) || (gControllerPress[1].button & START_BUTTON)) { diff --git a/src/main/fox_context.c b/src/main/fox_context.c index b4c6f266..18de7811 100644 --- a/src/main/fox_context.c +++ b/src/main/fox_context.c @@ -27,12 +27,12 @@ f32 gGroundLevel; f32 D_80177950; f32 D_80177968; f32 D_80177970; -f32 D_80177978; -f32 D_80177980; -f32 D_80177988; -f32 D_801779A0; -f32 D_801779B8; -f32 D_801779C0; +f32 gCsCamEyeX; +f32 gCsCamEyeY; +f32 gCsCamEyeZ; +f32 gCsCamAtX; +f32 gCsCamAtY; +f32 gCsCamAtZ; Vec3f D_801779D8; Vec3f D_801779E8; bool gExpertMode; diff --git a/src/main/fox_demo.c b/src/main/fox_demo.c index c4439d33..f1a0de1e 100644 --- a/src/main/fox_demo.c +++ b/src/main/fox_demo.c @@ -244,9 +244,9 @@ void func_80048E40(Player* player) { sp5C.y = 0.0f; sp5C.z = 300.0f; Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp50); - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->unk_138 + D_80177D20; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->unk_138 + D_80177D20; switch (gCsFrameCount) { case 101: @@ -320,20 +320,20 @@ void func_80048E40(Player* player) { } } } else { - D_80177978 = player->pos.x + sp50.x; - D_80177980 = player->pos.y + sp50.y; - D_80177988 = player->unk_138 + D_80177D20 + sp50.z; + gCsCamEyeX = player->pos.x + sp50.x; + gCsCamEyeY = player->pos.y + sp50.y; + gCsCamEyeZ = player->unk_138 + D_80177D20 + sp50.z; } break; } - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0); Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); @@ -931,12 +931,12 @@ void func_8004AAF4(Player* player) { sp64.x *= -1.0f; } Math_SmoothStepToF(&D_80177A48[0], 0.1f, 1.0f, 0.005f, 0.0f); - Math_SmoothStepToF(&player->camEye.x, player->pos.x + sp64.x, *D_80177A48, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, player->pos.y + sp64.y, *D_80177A48, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, player->unk_138 + D_80177D20 + sp64.z, *D_80177A48, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, player->pos.x, *D_80177A48, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, player->pos.y, *D_80177A48, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, player->unk_138 + D_80177D20, *D_80177A48, 500.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.x, player->pos.x + sp64.x, D_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, player->pos.y + sp64.y, D_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, player->unk_138 + D_80177D20 + sp64.z, D_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, player->pos.x, D_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, player->pos.y, D_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, player->unk_138 + D_80177D20, D_80177A48[0], 500.0f, 0.0f); break; } Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); @@ -1036,12 +1036,12 @@ void func_8004B368(Player* player) { player->timer_1F8 = 0x78; player->timer_1FC = 0x14; D_80177A48[0] = 0.001f; - D_80177978 = player->camEye.x; - D_80177980 = player->camEye.y; - D_80177988 = player->camEye.z; - D_801779A0 = player->camAt.x; - D_801779B8 = player->camAt.y; - D_801779C0 = player->camAt.z; + gCsCamEyeX = player->camEye.x; + gCsCamEyeY = player->camEye.y; + gCsCamEyeZ = player->camEye.z; + gCsCamAtX = player->camAt.x; + gCsCamAtY = player->camAt.y; + gCsCamAtZ = player->camAt.z; } break; @@ -1050,15 +1050,15 @@ void func_8004B368(Player* player) { Math_SmoothStepToF(&player->unk_0EC, (player->unk_004 * 60.0f) * D_80177950, 0.1f, 4.0f, 0.1f); } if (player->timer_1F8 < 80) { - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->unk_138 + D_80177D20 + 30.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->unk_138 + D_80177D20 + 30.0f; Math_SmoothStepToF(&D_80177A48[0], 0.05f, 0.1f, 0.0005f, 0.0f); } Math_SmoothStepToF(&player->pos.x, player->camEye.x, 0.1f, 10.0f, 0.0f); - D_80177980 += ((player->camAt.y + 500.0f) - player->camEye.y) * 0.01f; - player->camEye.y = D_80177980; + gCsCamEyeY += ((player->camAt.y + 500.0f) - player->camEye.y) * 0.01f; + player->camEye.y = gCsCamEyeY; var_fa1 = player->unk_004 * 190.0f; if ((D_80177950 > 0.0f) && (player->unk_004 > 0.0f)) { @@ -1104,9 +1104,9 @@ void func_8004B368(Player* player) { if (player->unk_000 > 0.3f) { player->unk_000 = 0.3f; } - Math_SmoothStepToF(&D_801779A0, player->pos.x, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&D_801779B8, player->pos.y, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&D_801779C0, player->unk_138 + D_80177D20 + 30.0f, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtX, player->pos.x, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtY, player->pos.y, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtZ, player->unk_138 + D_80177D20 + 30.0f, D_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, player->camEye.y + 5.0f, 0.1f, 4.0f, 0.0f); Math_SmoothStepToF(&player->unk_0E4, 20.0f, 0.1f, 0.2f, 0.01f); Math_SmoothStepToF(&player->pos.x, player->camEye.x, 0.1f, 2.0f, 0.0f); @@ -1142,10 +1142,9 @@ void func_8004B368(Player* player) { sp78.z = -800.0f; Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); - Math_SmoothStepToF(&D_801779A0, player->pos.x, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&D_801779B8, player->pos.y - D_80177A48[6], D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&D_801779C0, player->unk_138 + D_80177D20 - D_80177A48[6], D_80177A48[0], 50000.0f, - 0.0f); + Math_SmoothStepToF(&gCsCamAtX, player->pos.x, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtY, player->pos.y - D_80177A48[6], D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtZ, player->unk_138 + D_80177D20 - D_80177A48[6], D_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&D_80177A48[6], 130.0f, 0.1f, 0.25f, 0.0f); player->unk_000 += 0.002f; @@ -1153,9 +1152,9 @@ void func_8004B368(Player* player) { player->unk_000 = 0.3f; } - D_80177978 += ((player->pos.x + sp6C.x) - D_80177978) * player->unk_000; - D_80177980 += ((player->pos.y + sp6C.y) - D_80177980) * player->unk_000; - D_80177988 += ((player->unk_138 + D_80177D20 + sp6C.z) - D_80177988) * player->unk_000; + gCsCamEyeX += ((player->pos.x + sp6C.x) - gCsCamEyeX) * player->unk_000; + gCsCamEyeY += ((player->pos.y + sp6C.y) - gCsCamEyeY) * player->unk_000; + gCsCamEyeZ += ((player->unk_138 + D_80177D20 + sp6C.z) - gCsCamEyeZ) * player->unk_000; D_80178430 += 0.2f; D_8017842C += 0.2f; D_80178418 += player->unk_008; @@ -1294,15 +1293,15 @@ void func_8004B368(Player* player) { player->timer_1F8 = 0xA; func_80078E50(player->pos.x, player->pos.y, player->unk_138, 30.0f); } - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y - D_80177A48[6]; - D_801779C0 = player->unk_138 + D_80177D20 - D_80177A48[6]; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y - D_80177A48[6]; + gCsCamAtZ = player->unk_138 + D_80177D20 - D_80177A48[6]; break; case 5: - D_801779A0 += D_80177A48[7]; - D_801779B8 += D_80177A48[8]; - D_801779C0 += D_80177A48[9]; + gCsCamAtX += D_80177A48[7]; + gCsCamAtY += D_80177A48[8]; + gCsCamAtZ += D_80177A48[9]; player->unk_234 = 0; if (player->timer_1F8 == 0) { player->state_1C8 = PLAYERSTATE_1C8_6; @@ -1352,12 +1351,12 @@ void func_8004B368(Player* player) { player->unk_0F8 = player->unk_0EC; player->unk_138 = player->pos.z; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0.f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0.f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0.f); player->unk_088 += 10.0f; player->unk_080 = (-SIN_DEG(player->unk_088)) * 0.3f; diff --git a/src/main/fox_game.c b/src/main/fox_game.c index 870c602e..18ada9a9 100644 --- a/src/main/fox_game.c +++ b/src/main/fox_game.c @@ -168,7 +168,7 @@ void func_800A1C14(Gfx** arg0) { void func_800A1E68(Gfx** arg0) { gSPDisplayList((*arg0)++, D_Gfx_800DBAA0); gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT * 3); - gDPSetFillColor((*arg0)++, 0x00010001); + gDPSetFillColor((*arg0)++, FILL_COLOR(0x0001)); gDPSetColorImage((*arg0)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, gFrameBuffers[0].data); gDPFillRectangle((*arg0)++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT * 3 - 1); gDPPipeSync((*arg0)++); diff --git a/src/main/fox_hud.c b/src/main/fox_hud.c index 356bdda5..dbf58a9e 100644 --- a/src/main/fox_hud.c +++ b/src/main/fox_hud.c @@ -4997,13 +4997,13 @@ void func_800935E8(Player* player) { D_80178348 = D_80178350 = D_80178354 = 0; D_80178358 = 0; - player->camEye.x = D_80177978 = -3061.2f; - player->camEye.y = D_80177980 = 1745.9f; - player->camEye.z = D_80177988 = -5786.0f; + player->camEye.x = gCsCamEyeX = -3061.2f; + player->camEye.y = gCsCamEyeY = 1745.9f; + player->camEye.z = gCsCamEyeZ = -5786.0f; - player->camAt.x = D_801779A0 = 300.0f; - player->camAt.y = D_801779B8 = 2200.0f; - player->camAt.z = D_801779C0 = -5700.0f; + player->camAt.x = gCsCamAtX = 300.0f; + player->camAt.y = gCsCamAtY = 2200.0f; + player->camAt.z = gCsCamAtZ = -5700.0f; D_801616A0.x = 5.18f; D_801616A0.y = 124.17f; @@ -5068,9 +5068,9 @@ void func_800935E8(Player* player) { i = D_80177A10[6]; stepSize = D_80177A48[5]; - src.x = D_80177978; - src.y = D_80177980; - src.z = D_80177988; + src.x = gCsCamEyeX; + src.y = gCsCamEyeY; + src.z = gCsCamEyeZ; dest.x = D_800D22D8[i].x; dest.y = D_800D22D8[i].y; @@ -5082,18 +5082,18 @@ void func_800935E8(Player* player) { } D_80177A10[6]++; } - D_80177978 = src.x; - D_80177980 = src.y; - D_80177988 = src.z; + gCsCamEyeX = src.x; + gCsCamEyeY = src.y; + gCsCamEyeZ = src.z; } if (D_80177A10[7] == 1) { i = D_80177A10[7]; stepSize = D_80177A48[5]; - src.x = D_801779A0; - src.y = D_801779B8; - src.z = D_801779C0; + src.x = gCsCamAtX; + src.y = gCsCamAtY; + src.z = gCsCamAtZ; dest.x = D_800D22FC[i].x; dest.y = D_800D22FC[i].y; @@ -5105,9 +5105,9 @@ void func_800935E8(Player* player) { } } - D_801779A0 = src.x; - D_801779B8 = src.y; - D_801779C0 = src.z; + gCsCamAtX = src.x; + gCsCamAtY = src.y; + gCsCamAtZ = src.z; } if (gCsFrameCount >= 50) { @@ -5180,17 +5180,17 @@ void func_800935E8(Player* player) { Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, 1); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - D_80177978 = dest.x; - D_80177980 = dest.y; - D_80177988 = dest.z; + gCsCamEyeX = dest.x; + gCsCamEyeY = dest.y; + gCsCamEyeZ = dest.z; - player->camAt.x = D_801779A0 = D_80177978; - player->camAt.y = D_801779B8 = D_80177980 + 100.0f; - player->camAt.z = D_801779C0 = D_80177988 + 10.0f; + player->camAt.x = gCsCamAtX = gCsCamEyeX; + player->camAt.y = gCsCamAtY = gCsCamEyeY + 100.0f; + player->camAt.z = gCsCamAtZ = gCsCamEyeZ + 10.0f; - player->camEye.x = D_80177978; - player->camEye.y = D_80177980; - player->camEye.z = D_80177988; + player->camEye.x = gCsCamEyeX; + player->camEye.y = gCsCamEyeY; + player->camEye.z = gCsCamEyeZ; } if (player->timer_1F8 == 774) { @@ -5211,8 +5211,8 @@ void func_800935E8(Player* player) { temp2 = SIN_DEG(gGameFrameCount * 70.0f) * temp; } - player->camEye.y = D_80177980 + temp2; - player->camAt.y = D_80177980 + 100.0f; + player->camEye.y = gCsCamEyeY + temp2; + player->camAt.y = gCsCamEyeY + 100.0f; Math_SmoothStepToF(&player->unk_018, -1200.0f, 0.02f, 60.0f, 0.0f); @@ -5295,8 +5295,8 @@ void func_800935E8(Player* player) { Object_Kill(&actor->obj, actor->sfxPos); - player->camEye.z = D_80177988 = 800.0f; - player->camAt.z = D_801779C0 = 0.0f; + player->camEye.z = gCsCamEyeZ = 800.0f; + player->camAt.z = gCsCamAtZ = 0.0f; case 6: player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f; @@ -5305,19 +5305,19 @@ void func_800935E8(Player* player) { player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f; player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f; - D_80177978 = player->pos.x * (600.0f / player->unk_09C); - D_80177980 = player->pos.y * (740.0f / player->unk_0A0); - D_80177980 -= -50.0f; + gCsCamEyeX = player->pos.x * (600.0f / player->unk_09C); + gCsCamEyeY = player->pos.y * (740.0f / player->unk_0A0); + gCsCamEyeY -= -50.0f; - D_801779A0 = player->pos.x * (600.0f / player->unk_09C); - D_801779B8 = player->pos.y * (750.0f / player->unk_0A0); - D_801779B8 += player->unk_060 * 10.0f; + gCsCamAtX = player->pos.x * (600.0f / player->unk_09C); + gCsCamAtY = player->pos.y * (750.0f / player->unk_0A0); + gCsCamAtY += player->unk_060 * 10.0f; Math_SmoothStepToF(&player->pos.z, 0.0f, 0.1f, 40.0f, 0.1f); D_80177A48[0] = 0.03f; - D_80177988 = 240.0f; - D_801779C0 = player->pos.z + (D_80177D20 - 1.0f); + gCsCamEyeZ = 240.0f; + gCsCamAtZ = player->pos.z + (D_80177D20 - 1.0f); if (((player->timer_1F8 % 2) == 0) && (player->timer_1F8 > 962)) { func_800933D8(player->pos.x, player->pos.y, player->pos.z + 50.0f, 20.0f); @@ -5363,12 +5363,12 @@ void func_800935E8(Player* player) { player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0.0f); } // unused data @@ -5752,22 +5752,22 @@ void func_80095604(Player* player) { Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_80177A48[4]), 1); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - Math_SmoothStepToF(&D_80177978, dest.x, 0.02f, player->unk_0D0, 0.001f); - Math_SmoothStepToF(&D_80177980, dest.y, 0.02f, player->unk_0D0, 0.001f); - Math_SmoothStepToF(&D_80177988, dest.z, 0.02f, player->unk_0D0, 0.001f); + Math_SmoothStepToF(&gCsCamEyeX, dest.x, 0.02f, player->unk_0D0, 0.001f); + Math_SmoothStepToF(&gCsCamEyeY, dest.y, 0.02f, player->unk_0D0, 0.001f); + Math_SmoothStepToF(&gCsCamEyeZ, dest.z, 0.02f, player->unk_0D0, 0.001f); - player->camEye.x = D_80177978; - player->camEye.y = D_80177980; - player->camEye.z = D_80177988; + player->camEye.x = gCsCamEyeX; + player->camEye.y = gCsCamEyeY; + player->camEye.z = gCsCamEyeZ; if (gCsFrameCount < 200) { - Math_SmoothStepToF(&D_801779A0, gBosses[0].obj.pos.x, 0.03f, 100.0f, 0.001f); - Math_SmoothStepToF(&D_801779B8, gBosses[0].obj.pos.y, 0.03f, 100.0f, 0.001f); - Math_SmoothStepToF(&D_801779C0, gBosses[0].obj.pos.z + 600.0f + D_80177D20, 0.03f, 100.0f, 0.001f); + Math_SmoothStepToF(&gCsCamAtX, gBosses[0].obj.pos.x, 0.03f, 100.0f, 0.001f); + Math_SmoothStepToF(&gCsCamAtY, gBosses[0].obj.pos.y, 0.03f, 100.0f, 0.001f); + Math_SmoothStepToF(&gCsCamAtZ, gBosses[0].obj.pos.z + 600.0f + D_80177D20, 0.03f, 100.0f, 0.001f); } else { - Math_SmoothStepToF(&D_801779A0, player->pos.x, D_80177A48[6], 1000.0f, 0.001f); - Math_SmoothStepToF(&D_801779B8, player->pos.y, D_80177A48[6], 1000.0f, 0.001f); - Math_SmoothStepToF(&D_801779C0, player->pos.z + D_80177D20, D_80177A48[6], 1000.0f, 0.001f); + Math_SmoothStepToF(&gCsCamAtX, player->pos.x, D_80177A48[6], 1000.0f, 0.001f); + Math_SmoothStepToF(&gCsCamAtY, player->pos.y, D_80177A48[6], 1000.0f, 0.001f); + Math_SmoothStepToF(&gCsCamAtZ, player->pos.z + D_80177D20, D_80177A48[6], 1000.0f, 0.001f); if (gCsFrameCount > 180) { D_80177A48[6] += 0.005f; } else { @@ -5775,9 +5775,9 @@ void func_80095604(Player* player) { } } - player->camAt.x = D_801779A0; - player->camAt.y = D_801779B8; - player->camAt.z = D_801779C0; + player->camAt.x = gCsCamAtX; + player->camAt.y = gCsCamAtY; + player->camAt.z = gCsCamAtZ; D_80177A48[0] = 0.0f; break; @@ -5847,13 +5847,13 @@ void func_80095604(Player* player) { Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), 1); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - player->camAt.x = D_801779A0 = player->pos.x; - player->camAt.y = D_801779B8 = player->pos.y; - player->camAt.z = D_801779C0 = player->pos.z - 50.0f + D_80177D20; + player->camAt.x = gCsCamAtX = player->pos.x; + player->camAt.y = gCsCamAtY = player->pos.y; + player->camAt.z = gCsCamAtZ = player->pos.z - 50.0f + D_80177D20; - player->camEye.x = D_80177978 = dest.x; - player->camEye.y = D_80177980 = dest.y; - player->camEye.z = D_80177988 = dest.z; + player->camEye.x = gCsCamEyeX = dest.x; + player->camEye.y = gCsCamEyeY = dest.y; + player->camEye.z = gCsCamEyeZ = dest.z; D_80177A48[0] = 1.0f; @@ -5887,13 +5887,13 @@ void func_80095604(Player* player) { } if (gCsFrameCount < 1200) { - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z - 50.0f + D_80177D20; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z - 50.0f + D_80177D20; } else { - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y + 10.0f; - D_801779C0 = player->pos.z - 50.0f + D_80177D20; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y + 10.0f; + gCsCamAtZ = player->pos.z - 50.0f + D_80177D20; } D_80177A48[0] = 0.05f; @@ -5913,9 +5913,9 @@ void func_80095604(Player* player) { Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), 1); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - D_80177978 = dest.x; - D_80177980 = dest.y; - D_80177988 = dest.z; + gCsCamEyeX = dest.x; + gCsCamEyeY = dest.y; + gCsCamEyeZ = dest.z; if (gCsFrameCount >= 1360) { D_80178348 = D_80178350 = D_80178354 = 0; @@ -6034,12 +6034,12 @@ void func_80095604(Player* player) { player->unk_178 += 20.0f; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0.001f); } void func_80096A74(Player* player) { @@ -6059,13 +6059,13 @@ void func_80096A74(Player* player) { player->unk_1D0 = 1; D_80178340 = D_80178358 = 255; - player->camEye.x = D_80177978 = 0.0f; - player->camEye.y = D_80177980 = player->pos.y + D_80177A48[1]; - player->camEye.z = D_80177988 = 0.0f; + player->camEye.x = gCsCamEyeX = 0.0f; + player->camEye.y = gCsCamEyeY = player->pos.y + D_80177A48[1]; + player->camEye.z = gCsCamEyeZ = 0.0f; - player->camAt.x = D_801779A0 = 0.0f; - player->camAt.y = D_801779B8 = 0.0f; - player->camAt.z = D_801779C0 = 0.0f; + player->camAt.x = gCsCamAtX = 0.0f; + player->camAt.y = gCsCamAtY = 0.0f; + player->camAt.z = gCsCamAtZ = 0.0f; D_80177A48[0] = 1.0f; D_80177A48[2] = 0.0f; @@ -6102,13 +6102,13 @@ void func_80096A74(Player* player) { D_80177A48[0] = 0.2f; } - D_80177978 = player->pos.x; - D_80177980 = player->pos.y + D_80177A48[1]; - D_80177988 = player->pos.z + D_80177A48[2]; + gCsCamEyeX = player->pos.x; + gCsCamEyeY = player->pos.y + D_80177A48[1]; + gCsCamEyeZ = player->pos.z + D_80177A48[2]; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; if (gCsFrameCount == 270) { player->unk_190 = player->unk_194 = 10.0f; @@ -6136,13 +6136,13 @@ void func_80096A74(Player* player) { D_80137E84[0] = 0; gControllerHold[player->num].button = button; - D_80177978 = player->pos.x; - D_80177980 = (player->pos.y * player->unk_148 + 50.0f); - D_80177988 = D_80177A48[2]; + gCsCamEyeX = player->pos.x; + gCsCamEyeY = (player->pos.y * player->unk_148 + 50.0f); + gCsCamEyeZ = D_80177A48[2]; - D_801779A0 = player->pos.x; - D_801779B8 = (player->pos.y * player->unk_148 + 20.0f); - D_801779C0 = player->pos.z; + gCsCamAtX = player->pos.x; + gCsCamAtY = (player->pos.y * player->unk_148 + 20.0f); + gCsCamAtZ = player->pos.z; if (gCsFrameCount == 300) { D_80177CE8 = 0; @@ -6204,10 +6204,10 @@ void func_80096A74(Player* player) { player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; } - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0.0f); } diff --git a/src/main/fox_play.c b/src/main/fox_play.c index a3be8a46..82b73bb1 100644 --- a/src/main/fox_play.c +++ b/src/main/fox_play.c @@ -5551,10 +5551,10 @@ void func_800B56BC(Player* player) { f32 var_fv0; f32 temp; - D_80177978 = (player->pos.x - player->unk_0AC) * player->unk_148; + gCsCamEyeX = (player->pos.x - player->unk_0AC) * player->unk_148; if (((player->form == FORM_ARWING) && (player->state_1C8 == PLAYERSTATE_1C8_3)) || (player->state_1C8 == PLAYERSTATE_1C8_5)) { - D_80177980 = (player->pos.y - player->unk_0B0) * player->unk_148; + gCsCamEyeY = (player->pos.y - player->unk_0B0) * player->unk_148; } var_fv1 = gInputPress->stick_x; var_fv0 = -gInputPress->stick_y; @@ -5571,14 +5571,14 @@ void func_800B56BC(Player* player) { } else { Math_SmoothStepToF(&player->unk_02C, 2.0f * var_fv0, 0.1f, 4.0f, 0.05f); } - D_80177978 -= player->unk_030 * 1.5f; - D_80177980 -= player->unk_02C - 50.0f; - D_801779A0 = (player->pos.x - player->unk_0AC) * player->unk_14C; - D_801779A0 += player->unk_084 * -2.0f; - D_801779A0 -= player->unk_030 * 0.5f; - D_801779B8 = ((player->pos.y - player->unk_0B0) * player->unk_14C) + 20.0f; - D_801779B8 += player->unk_060 * 5.0f; - D_801779B8 -= player->unk_02C * 0.25f; + gCsCamEyeX -= player->unk_030 * 1.5f; + gCsCamEyeY -= player->unk_02C - 50.0f; + gCsCamAtX = (player->pos.x - player->unk_0AC) * player->unk_14C; + gCsCamAtX += player->unk_084 * -2.0f; + gCsCamAtX -= player->unk_030 * 0.5f; + gCsCamAtY = ((player->pos.y - player->unk_0B0) * player->unk_14C) + 20.0f; + gCsCamAtY += player->unk_060 * 5.0f; + gCsCamAtY -= player->unk_02C * 0.25f; switch (D_800D2F54) { case 0: Math_SmoothStepToF(&D_800D2F58, 0.0f, 0.4f, 10.0f, 0); @@ -5587,29 +5587,29 @@ void func_800B56BC(Player* player) { Math_SmoothStepToF(&D_800D2F58, 200.0f, 0.4f, 10.0f, 0); break; } - D_80177978 += player->unk_0AC; - D_801779A0 += player->unk_0AC; - D_80177980 += player->unk_0B0 + D_800D2F58; - D_801779C0 = (player->unk_138 + D_80177D20) - 1.0f; - D_80177988 = 400.0f + D_800D2F58; + gCsCamEyeX += player->unk_0AC; + gCsCamAtX += player->unk_0AC; + gCsCamEyeY += player->unk_0B0 + D_800D2F58; + gCsCamAtZ = (player->unk_138 + D_80177D20) - 1.0f; + gCsCamEyeZ = 400.0f + D_800D2F58; if (D_80177C70 == 2) { - D_80177988 -= 50.0f; + gCsCamEyeZ -= 50.0f; } if (player->unk_4DC != 0) { - D_80177988 += 200.0f; - D_801779B8 = (player->pos.y - player->unk_0B0) * 0.9f; - Math_SmoothStepToF(&player->camEye.z, D_80177988, 0.1f, 8.0f, 0.0f); + gCsCamEyeZ += 200.0f; + gCsCamAtY = (player->pos.y - player->unk_0B0) * 0.9f; + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, 0.1f, 8.0f, 0.0f); Math_SmoothStepToF(&player->unk_018, 0.2f, 1.0f, 0.05f, 0.0f); } else { - Math_SmoothStepToF(&player->camEye.z, D_80177988, 0.2f, 20.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, 0.2f, 20.0f, 0.0f); Math_SmoothStepToF(&player->unk_018, 1.0f, 1.0f, 0.05f, 0.0f); } - D_801779B8 += player->unk_0B0 + (D_800D2F58 * 0.5f); - Math_SmoothStepToF(&player->camEye.x, D_80177978, player->unk_014, 1000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, player->unk_018, 1000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, player->unk_014, 1000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, player->unk_018, 1000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, player->unk_014, 1000.0f, 0.0f); + gCsCamAtY += player->unk_0B0 + (D_800D2F58 * 0.5f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, player->unk_018, 1000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, player->unk_014, 1000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, player->unk_018, 1000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, player->unk_014, 1000.0f, 0.0f); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f); temp = -player->unk_0EC; if (gLevelType == LEVELTYPE_PLANET) { @@ -5632,27 +5632,27 @@ void func_800B5D30(Player* player, s32 arg1) { sp4C.y = 0; sp4C.z = -1000.0f; Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); - D_80177978 = player->pos.x; - D_80177980 = player->pos.y + player->unk_080; - D_80177988 = player->unk_138 + D_80177D20; - D_801779A0 = player->pos.x + sp40.x; - D_801779B8 = player->pos.y + player->unk_080 + sp40.y; - D_801779C0 = player->unk_138 + D_80177D20 + sp40.z; - Math_SmoothStepToF(&player->camEye.x, D_80177978, player->unk_014, 100.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, player->unk_014, 100.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, player->unk_014, 50.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, player->unk_014, 100.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, player->unk_014, 100.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, player->unk_014, 100.0f, 0.0f); + gCsCamEyeX = player->pos.x; + gCsCamEyeY = player->pos.y + player->unk_080; + gCsCamEyeZ = player->unk_138 + D_80177D20; + gCsCamAtX = player->pos.x + sp40.x; + gCsCamAtY = player->pos.y + player->unk_080 + sp40.y; + gCsCamAtZ = player->unk_138 + D_80177D20 + sp40.z; + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, player->unk_014, 100.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, player->unk_014, 100.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, player->unk_014, 50.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, player->unk_014, 100.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, player->unk_014, 100.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, player->unk_014, 100.0f, 0.0f); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0); player->unk_034 = -(player->unk_0F8 + player->unk_0F0); if (arg1 != 0) { - player->camEye.x = D_80177978; - player->camEye.y = D_80177980; - player->camEye.z = D_80177988; - player->camAt.x = D_801779A0; - player->camAt.y = D_801779B8; - player->camAt.z = D_801779C0; + player->camEye.x = gCsCamEyeX; + player->camEye.y = gCsCamEyeY; + player->camEye.z = gCsCamEyeZ; + player->camAt.x = gCsCamAtX; + player->camAt.y = gCsCamAtY; + player->camAt.z = gCsCamAtZ; } } diff --git a/src/main/fox_std_lib.c b/src/main/fox_std_lib.c index ea250da2..a859e147 100644 --- a/src/main/fox_std_lib.c +++ b/src/main/fox_std_lib.c @@ -540,7 +540,7 @@ void TextureRect_4bCI(Gfx** gfxPtr, void* texture, void* palette, u32 width, u32 gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, 0, 0, (s32) (1.0f / xScale * 1024.0f), + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, 0, 0, (s32) (1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } @@ -550,8 +550,8 @@ void TextureRect_4bCI_Flip(Gfx** gfxPtr, void* texture, void* palette, u32 width gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangleFlip((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), - (s32) ((xPos + width * xScale) * 4.0f), (s32) ((yPos + height * yScale) * 4.0f), 0, 0, 0, - (s32) (1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); + (s32) ((xPos + width * xScale) * 4.0f), (s32) ((yPos + height * yScale) * 4.0f), + G_TX_RENDERTILE, 0, 0, (s32) (1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } void TextureRect_4bCI_MirX(Gfx** gfxPtr, void* texture, void* palette, u32 width, u32 height, f32 xPos, f32 yPos, @@ -560,7 +560,7 @@ void TextureRect_4bCI_MirX(Gfx** gfxPtr, void* texture, void* palette, u32 width gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, (width - 1) * 32, 0, + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, (width - 1) * 32, 0, (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } @@ -570,7 +570,7 @@ void TextureRect_4bCI_MirY(Gfx** gfxPtr, void* texture, void* palette, u32 width gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, 0, (height - 1) * 32, + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, 0, (height - 1) * 32, (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } @@ -580,7 +580,7 @@ void TextureRect_8bCI(Gfx** gfxPtr, void* texture, void* palette, u32 width, u32 gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_CI, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, 0, 0, (s32) (1.0f / xScale * 1024.0f), + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, 0, 0, (s32) (1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } @@ -598,7 +598,7 @@ void TextureRect_16bRGBA_MirX(Gfx** gfxPtr, void* texture, u32 width, u32 height gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, (width - 1) * 32, 0, + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, (width - 1) * 32, 0, (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } @@ -615,8 +615,8 @@ void TextureRect_8bIA_FilpMirX(Gfx** gfxPtr, void* texture, u32 width, u32 heigh gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangleFlip((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), - (s32) ((xPos + height * xScale) * 4.0f), (s32) ((yPos + width * yScale) * 4.0f), 0, - (width - 1) * 32, 0, (u16) (s32) (-1.0f / yScale * 1024.0f), + (s32) ((xPos + height * xScale) * 4.0f), (s32) ((yPos + width * yScale) * 4.0f), + G_TX_RENDERTILE, (width - 1) * 32, 0, (u16) (s32) (-1.0f / yScale * 1024.0f), (s32) (1.0f / xScale * 1024.0f)); } @@ -625,8 +625,9 @@ void TextureRect_8bIA_FilpMirY(Gfx** gfxPtr, void* texture, u32 width, u32 heigh gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangleFlip((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), - (s32) ((xPos + height * xScale) * 4.0f), (s32) ((yPos + width * yScale) * 4.0f), 0, 0, - (height - 1) * 32, (s32) (1.0f / yScale * 1024.0f), (u16) (s32) (-1.0f / xScale * 1024.0f)); + (s32) ((xPos + height * xScale) * 4.0f), (s32) ((yPos + width * yScale) * 4.0f), + G_TX_RENDERTILE, 0, (height - 1) * 32, (s32) (1.0f / yScale * 1024.0f), + (u16) (s32) (-1.0f / xScale * 1024.0f)); } void TextureRect_8bIA_MirX(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, @@ -634,7 +635,7 @@ void TextureRect_8bIA_MirX(Gfx** gfxPtr, void* texture, u32 width, u32 height, f gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, (width - 1) * 32, 0, + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, (width - 1) * 32, 0, (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } @@ -643,7 +644,7 @@ void TextureRect_8bIA_MirY(Gfx** gfxPtr, void* texture, u32 width, u32 height, f gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, 0, (height - 1) * 32, + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, 0, (height - 1) * 32, (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } @@ -651,7 +652,7 @@ void TextureRect_16bIA(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 x gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, 0, 0, (s32) (1.0f / xScale * 1024.0f), + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, 0, 0, (s32) (1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } @@ -660,7 +661,7 @@ void TextureRect_16bIA_MirX(Gfx** gfxPtr, void* texture, u32 width, u32 height, gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, (width - 1) * 32, 0, + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, (width - 1) * 32, 0, (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } @@ -669,7 +670,7 @@ void TextureRect_16bIA_MirY(Gfx** gfxPtr, void* texture, u32 width, u32 height, gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, 0, (height - 1) * 32, + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, 0, (height - 1) * 32, (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } @@ -678,7 +679,7 @@ void TextureRect_16bIA_MirXY(Gfx** gfxPtr, void* texture, u32 width, u32 height, gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, (width - 1) * 32, (height - 1) * 32, + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, (width - 1) * 32, (height - 1) * 32, (u16) (s32) (-1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } @@ -687,7 +688,7 @@ void TextureRect_32bRGBA(Gfx** gfxPtr, void* texture, u32 width, u32 height, f32 gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), - (s32) ((yPos + height * yScale) * 4.0f), 0, 0, 0, (s32) (1.0f / xScale * 1024.0f), + (s32) ((yPos + height * yScale) * 4.0f), G_TX_RENDERTILE, 0, 0, (s32) (1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index ddee342b..0dadd2ba 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -867,12 +867,12 @@ void func_ending_8018A124(s32 arg0) { f32 sp0[2] = { -22.0f, 204.0f }; // not fake, but weird. - D_80177978 = (&sp2C)[arg0][0]; - D_80177980 = (&sp2C)[arg0][1]; - D_80177988 = (&sp2C)[arg0][2]; - D_801779A0 = (&sp20)[arg0][0]; - D_801779B8 = (&sp20)[arg0][1]; - D_801779C0 = (&sp20)[arg0][2]; + gCsCamEyeX = (&sp2C)[arg0][0]; + gCsCamEyeY = (&sp2C)[arg0][1]; + gCsCamEyeZ = (&sp2C)[arg0][2]; + gCsCamAtX = (&sp20)[arg0][0]; + gCsCamAtY = (&sp20)[arg0][1]; + gCsCamAtZ = (&sp20)[arg0][2]; gLight1R = (&sp14)[arg0][0]; gLight1G = (&sp14)[arg0][1]; @@ -1065,9 +1065,9 @@ void func_ending_8018A96C(void) { gRadioState = 0; gGameFrameCount = 0; gOverlayStage = 0; - D_80177978 = D_80177980 = D_80177988 = 0.0f; - D_801779A0 = D_801779B8 = 0.0f; - D_801779C0 = -100.0f; + gCsCamEyeX = gCsCamEyeY = gCsCamEyeZ = 0.0f; + gCsCamAtX = gCsCamAtY = 0.0f; + gCsCamAtZ = -100.0f; D_ending_80196D00 = 1; break; @@ -1106,8 +1106,8 @@ void func_ending_8018A96C(void) { void func_ending_8018AAC4(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, D_80177978, D_80177980, D_80177988, D_801779A0, D_801779B8, D_801779C0, 0.0f, 100.0f, - 0.0f, 0); + Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 100.0f, 0.0f, + 0); switch (D_ending_80196D00) { case 1: @@ -1508,13 +1508,13 @@ void func_ending_8018B860(void) { s32 sp28[3] = { 32, 32, 32 }; s32 sp1C[3] = { 5, 5, 8 }; - D_80177978 = sp4C.x; - D_80177980 = sp4C.y; - D_80177988 = sp4C.z; + gCsCamEyeX = sp4C.x; + gCsCamEyeY = sp4C.y; + gCsCamEyeZ = sp4C.z; - D_801779A0 = sp40.x; - D_801779B8 = sp40.y; - D_801779C0 = sp40.z; + gCsCamAtX = sp40.x; + gCsCamAtY = sp40.y; + gCsCamAtZ = sp40.z; gLight1R = sp28[0]; gLight1G = sp28[1]; @@ -1541,7 +1541,7 @@ void func_ending_8018B860(void) { func_ending_8018B6D8(&gActors[8], 4); func_ending_8018B6D8(&gActors[9], 5); - D_80177A48[0] = D_801779A0; + D_80177A48[0] = gCsCamAtX; D_80177A10[0] = 0; D_ending_8019858C = 0; gBgColor = 0x4AE5; @@ -1555,13 +1555,13 @@ void func_ending_8018BAD0(void) { s32 sp28[3] = { 32, 32, 32 }; s32 sp1C[3] = { 5, 5, 8 }; - D_80177978 = sp4C.x; - D_80177980 = sp4C.y; - D_80177988 = sp4C.z; + gCsCamEyeX = sp4C.x; + gCsCamEyeY = sp4C.y; + gCsCamEyeZ = sp4C.z; - D_801779A0 = sp40.x; - D_801779B8 = sp40.y; - D_801779C0 = sp40.z; + gCsCamAtX = sp40.x; + gCsCamAtY = sp40.y; + gCsCamAtZ = sp40.z; gLight1R = sp28[0]; gLight1G = sp28[1]; @@ -1702,17 +1702,17 @@ bool func_ending_8018BCB0(void) { } if (D_80177A10[0] == 0) { - if ((gActors[0].obj.pos.x <= D_801779A0) && (gActors[0].obj.pos.x > -400.0f)) { + if ((gActors[0].obj.pos.x <= gCsCamAtX) && (gActors[0].obj.pos.x > -400.0f)) { D_80177A48[0] = gActors[0].obj.pos.x; } if (gCsFrameCount >= 30) { - Math_SmoothStepToF(&D_801779A0, D_80177A48[0], 0.004f, 1000.0f, 0.0001f); - Math_SmoothStepToF(&D_801779B8, 156.0f, 0.002f, 1000.0f, 0.0001f); + Math_SmoothStepToF(&gCsCamAtX, D_80177A48[0], 0.004f, 1000.0f, 0.0001f); + Math_SmoothStepToF(&gCsCamAtY, 156.0f, 0.002f, 1000.0f, 0.0001f); } } else { - D_801779A0 = gActors[0].obj.pos.x; - D_801779B8 = gActors[0].obj.pos.y; - D_801779C0 = gActors[0].obj.pos.z; + gCsCamAtX = gActors[0].obj.pos.x; + gCsCamAtY = gActors[0].obj.pos.y; + gCsCamAtZ = gActors[0].obj.pos.z; } if ((gCsFrameCount < 548) && (gCsFrameCount >= 240)) { diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 51ef6bca..0b2974e1 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -2659,12 +2659,12 @@ void func_i1_8018F880(Player* player) { actor0->iwork[14] = 2; actor1->iwork[14] = 3; actor2->iwork[14] = 4; - player->camEye.x = D_80177978 = player->pos.x - 400.0f; - gPlayer[0].camEye.y = D_80177980 = player->pos.y + 600.0f; - player->camEye.z = D_80177988 = player->unk_138 + 2000.0f; - player->camAt.x = D_801779A0 = player->pos.x; - player->camAt.y = D_801779B8 = player->pos.y; - player->camAt.z = D_801779C0 = player->unk_138 + 300.0f; + player->camEye.x = gCsCamEyeX = player->pos.x - 400.0f; + gPlayer[0].camEye.y = gCsCamEyeY = player->pos.y + 600.0f; + player->camEye.z = gCsCamEyeZ = player->unk_138 + 2000.0f; + player->camAt.x = gCsCamAtX = player->pos.x; + player->camAt.y = gCsCamAtY = player->pos.y; + player->camAt.z = gCsCamAtZ = player->unk_138 + 300.0f; D_80177A48[0] = 0; D_80177A48[1] = D_80177A48[2] = 0; D_80178358 = 0xFF; @@ -2677,12 +2677,12 @@ void func_i1_8018F880(Player* player) { D_8017835C = 3; Math_SmoothStepToF(&D_80177A48[0], 0.01f, 1.0f, 0.0005f, 0.0f); } - D_80177978 = player->pos.x - 150.0f; - D_80177980 = player->pos.y - 70.0f; - D_80177988 = player->unk_138 + 150.0f; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->unk_138; + gCsCamEyeX = player->pos.x - 150.0f; + gCsCamEyeY = player->pos.y - 70.0f; + gCsCamEyeZ = player->unk_138 + 150.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->unk_138; if (player->timer_1F8 == 0) { player->unk_1D0 = 2; player->timer_1F8 = 130; @@ -2718,12 +2718,12 @@ void func_i1_8018F880(Player* player) { break; case 2: Math_SmoothStepToF(&D_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); - D_80177978 = player->pos.x - 50.0f; - D_80177980 = player->pos.y + 10.0f; - D_80177988 = player->unk_138 - 10.0f; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y + 10.0f; - D_801779C0 = player->unk_138 + 10.0f; + gCsCamEyeX = player->pos.x - 50.0f; + gCsCamEyeY = player->pos.y + 10.0f; + gCsCamEyeZ = player->unk_138 - 10.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y + 10.0f; + gCsCamAtZ = player->unk_138 + 10.0f; if (player->timer_1F8 == 20) { Radio_PlayMessage(gMsg_ID_2010, RCID_FOX); } @@ -2750,20 +2750,20 @@ void func_i1_8018F880(Player* player) { if ((D_801782F8 != 0) && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } - D_80177980 = player->pos.y + 10.0f; - D_801779B8 = player->pos.y + 10.0f; + gCsCamEyeY = player->pos.y + 10.0f; + gCsCamAtY = player->pos.y + 10.0f; break; case 4: if ((D_801782F8 != 0) && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } Math_SmoothStepToF(&D_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); - D_80177978 = actor0->obj.pos.x - 50.0f; - D_80177980 = actor0->obj.pos.y + 10.0f; - D_80177988 = actor0->obj.pos.z - 10.0f; - D_801779A0 = actor0->obj.pos.x; - D_801779B8 = actor0->obj.pos.y + 10.0f; - D_801779C0 = actor0->obj.pos.z + 10.0f; + gCsCamEyeX = actor0->obj.pos.x - 50.0f; + gCsCamEyeY = actor0->obj.pos.y + 10.0f; + gCsCamEyeZ = actor0->obj.pos.z - 10.0f; + gCsCamAtX = actor0->obj.pos.x; + gCsCamAtY = actor0->obj.pos.y + 10.0f; + gCsCamAtZ = actor0->obj.pos.z + 10.0f; if (player->timer_1F8 == 0) { player->unk_1D0 = 5; player->timer_1F8 = 5; @@ -2787,8 +2787,8 @@ void func_i1_8018F880(Player* player) { player->timer_1F8 = 190; } - D_80177980 = actor0->obj.pos.y + 10.0f; - D_801779B8 = actor0->obj.pos.y + 10.0f; + gCsCamEyeY = actor0->obj.pos.y + 10.0f; + gCsCamAtY = actor0->obj.pos.y + 10.0f; break; case 6: Math_SmoothStepToF(&actor0->fwork[19], 0.0f, 0.1f, 3.0f, 0.01f); @@ -2796,13 +2796,13 @@ void func_i1_8018F880(Player* player) { D_80177A48[3] -= 0.5f; - D_80177978 = actor2->obj.pos.x + 100.0f + D_80177A48[3]; - D_80177980 = actor2->obj.pos.y + 10.0f; - D_80177988 = actor2->obj.pos.z - 70.0f; + gCsCamEyeX = actor2->obj.pos.x + 100.0f + D_80177A48[3]; + gCsCamEyeY = actor2->obj.pos.y + 10.0f; + gCsCamEyeZ = actor2->obj.pos.z - 70.0f; - D_801779A0 = actor2->obj.pos.x + 20.0f + (D_80177A48[3] * 0.5f); - D_801779B8 = actor2->obj.pos.y + 10.0f; - D_801779C0 = actor2->obj.pos.z + 10.0f; + gCsCamAtX = actor2->obj.pos.x + 20.0f + (D_80177A48[3] * 0.5f); + gCsCamAtY = actor2->obj.pos.y + 10.0f; + gCsCamAtZ = actor2->obj.pos.z + 10.0f; if (player->timer_1F8 == 0) { player->unk_1D0 = 7; @@ -2821,12 +2821,12 @@ void func_i1_8018F880(Player* player) { break; case 7: Math_SmoothStepToF(&D_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); - D_80177978 = actor1->obj.pos.x + 20.0f; - D_80177980 = actor1->obj.pos.y + 10.0f; - D_80177988 = actor1->obj.pos.z - 50.0f; - D_801779A0 = actor1->obj.pos.x + 10.0f; - D_801779B8 = actor1->obj.pos.y + 10.0f; - D_801779C0 = actor1->obj.pos.z + 10.0f; + gCsCamEyeX = actor1->obj.pos.x + 20.0f; + gCsCamEyeY = actor1->obj.pos.y + 10.0f; + gCsCamEyeZ = actor1->obj.pos.z - 50.0f; + gCsCamAtX = actor1->obj.pos.x + 10.0f; + gCsCamAtY = actor1->obj.pos.y + 10.0f; + gCsCamAtZ = actor1->obj.pos.z + 10.0f; if (player->timer_1F8 == 0) { player->unk_1D0 = 8; D_80177A48[0] = 0.0f; @@ -2852,12 +2852,12 @@ void func_i1_8018F880(Player* player) { D_80177A48[3] += player->unk_004; Math_SmoothStepToF(&player->unk_004, 2.0f, 1.0f, 0.2f, 0.0f); } - D_80177978 = player->pos.x; - D_80177988 = (player->unk_138 - 600.0f) + D_80177A48[3]; - D_80177980 = player->pos.y + D_80177A48[8]; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y + 20.0f; - D_801779C0 = player->unk_138 + 100.0f; + gCsCamEyeX = player->pos.x; + gCsCamEyeZ = (player->unk_138 - 600.0f) + D_80177A48[3]; + gCsCamEyeY = player->pos.y + D_80177A48[8]; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y + 20.0f; + gCsCamAtZ = player->unk_138 + 100.0f; if (player->timer_1F8 < 100) { Math_SmoothStepToF(&D_80177A48[8], 10.0f, 0.1f, 0.7f, 0.0f); } @@ -2907,12 +2907,12 @@ void func_i1_8018F880(Player* player) { } break; case 9: - D_80177978 = player->pos.x; - D_80177980 = player->pos.y; - D_80177988 = player->unk_138 + 1000.0f; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->unk_138 + 1100.0f; + gCsCamEyeX = player->pos.x; + gCsCamEyeY = player->pos.y; + gCsCamEyeZ = player->unk_138 + 1000.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->unk_138 + 1100.0f; D_80177A48[0] = 0.03f; player->unk_190 = 2.0f; if (player->timer_1F8 == 0) { @@ -2946,12 +2946,12 @@ void func_i1_8018F880(Player* player) { case 10: break; } - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, player->unk_080 + D_80177980, D_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8 - player->unk_080, D_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, player->unk_080 + gCsCamEyeY, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY - player->unk_080, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_04, D_80177A48[1], 0.2f, 1.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, D_80177A48[2], 0.2f, 1.0f, 0.0f); player->wings.unk_08 = player->wings.unk_04; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 82501394..b4dffdb6 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -1923,13 +1923,13 @@ void func_i2_8018CD8C(Player* player) { D_80177A48[2] = -13000.0f; D_80177A48[4] = -22000.0f; - player->camEye.x = D_80177978 = player->pos.x + 100.0f; - player->camEye.y = D_80177980 = player->pos.y; - player->camEye.z = D_80177988 = D_80177A48[1] + player->unk_138; + player->camEye.x = gCsCamEyeX = player->pos.x + 100.0f; + player->camEye.y = gCsCamEyeY = player->pos.y; + player->camEye.z = gCsCamEyeZ = D_80177A48[1] + player->unk_138; - player->camAt.x = D_801779A0 = D_80177A48[2] + player->pos.x; - player->camAt.y = D_801779B8 = player->pos.y; - player->camAt.z = D_801779C0 = D_80177A48[4] + player->unk_138; + player->camAt.x = gCsCamAtX = D_80177A48[2] + player->pos.x; + player->camAt.y = gCsCamAtY = player->pos.y; + player->camAt.z = gCsCamAtZ = D_80177A48[4] + player->unk_138; player->unk_1D0 = 1; @@ -1937,12 +1937,12 @@ void func_i2_8018CD8C(Player* player) { case 1: actor3->vel.z = 4.0f; - D_80177978 = player->pos.x + 100.0f; - D_80177980 = player->pos.y; - D_80177988 = D_80177A48[1] + player->unk_138; - D_801779A0 = D_80177A48[2] + player->pos.x; - D_801779B8 = player->pos.y + 20.0f; - D_801779C0 = D_80177A48[4] + player->unk_138; + gCsCamEyeX = player->pos.x + 100.0f; + gCsCamEyeY = player->pos.y; + gCsCamEyeZ = D_80177A48[1] + player->unk_138; + gCsCamAtX = D_80177A48[2] + player->pos.x; + gCsCamAtY = player->pos.y + 20.0f; + gCsCamAtZ = D_80177A48[4] + player->unk_138; Math_SmoothStepToF(&D_80177A48[1], 8000.0f, 0.05f, 20.0f, 0); Math_SmoothStepToF(&D_80177A48[2], 0.0f, 0.05f, 25.0f, 0); Math_SmoothStepToF(&D_80177A48[4], 0.0f, 0.05f, 200.0f, 0); @@ -2055,12 +2055,12 @@ void func_i2_8018CD8C(Player* player) { break; case 2: - D_80177978 = player->pos.x; - D_80177980 = (player->pos.y * player->unk_148) + 50.0f; - D_80177988 = 400.0f; - D_801779A0 = player->pos.x; - D_801779B8 = (player->pos.y * player->unk_148) + 20.0f; - D_801779C0 = player->unk_138; + gCsCamEyeX = player->pos.x; + gCsCamEyeY = (player->pos.y * player->unk_148) + 50.0f; + gCsCamEyeZ = 400.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f; + gCsCamAtZ = player->unk_138; Math_SmoothStepToF(D_80177A48, 1.0f, 1.0f, 0.01f, 0.0f); @@ -2105,12 +2105,12 @@ void func_i2_8018CD8C(Player* player) { break; } - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 20000.0f, 0.0f); } void func_i2_8018D9EC(Actor* actor) { @@ -2243,14 +2243,14 @@ void func_i2_8018E084(Player* player) { Matrix_MultVec3f(gCalcMatrix, &src, &dest); - D_80177978 = gBosses[0].obj.pos.x + dest.x; - D_80177980 = gBosses[0].obj.pos.y + dest.y; + gCsCamEyeX = gBosses[0].obj.pos.x + dest.x; + gCsCamEyeY = gBosses[0].obj.pos.y + dest.y; - D_80177988 = gBosses[0].obj.pos.z + D_80177D20 + dest.z; - D_801779A0 = gBosses[0].obj.pos.x; - D_801779B8 = gBosses[0].obj.pos.y; + gCsCamEyeZ = gBosses[0].obj.pos.z + D_80177D20 + dest.z; + gCsCamAtX = gBosses[0].obj.pos.x; + gCsCamAtY = gBosses[0].obj.pos.y; - D_801779C0 = gBosses[0].obj.pos.z + D_80177D20; + gCsCamAtZ = gBosses[0].obj.pos.z + D_80177D20; Math_SmoothStepToF(&D_80177A48[1], 180.0f, 0.05f, 1.0f, 0.0f); Math_SmoothStepToF(&D_80177A48[2], 1500.0f, 0.1f, 10.0f, 0.0f); @@ -2310,9 +2310,9 @@ void func_i2_8018E084(Player* player) { Matrix_MultVec3f(gCalcMatrix, &src, &dest); - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->unk_138 + D_80177D20 + 150.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->unk_138 + D_80177D20 + 150.0f; if (gCsFrameCount > 1390) { player->unk_0D0 += 2.0f; @@ -2335,9 +2335,9 @@ void func_i2_8018E084(Player* player) { } } } else { - D_80177978 = player->pos.x + dest.x; - D_80177980 = player->pos.y + dest.y; - D_80177988 = player->unk_138 + D_80177D20 + 150.0f + dest.z; + gCsCamEyeX = player->pos.x + dest.x; + gCsCamEyeY = player->pos.y + dest.y; + gCsCamEyeZ = player->unk_138 + D_80177D20 + 150.0f + dest.z; } break; } @@ -2444,12 +2444,12 @@ void func_i2_8018E084(Player* player) { break; } - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0); Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 7439ca70..7a1e604a 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -1484,12 +1484,12 @@ void func_i2_80193A30(Player* player) { func_i2_80193800(&gActors[5 + i], i); } player->unk_1D0 = 1; - player->camEye.x = D_80177978 = 100.0f; - player->camEye.y = D_80177980 = 0.0f; - player->camEye.z = D_80177988 = -200.0f; - player->camAt.x = D_801779A0 = 0.0f; - player->camAt.y = D_801779B8 = 0.0f; - player->camAt.z = D_801779C0 = -1000.0f; + player->camEye.x = gCsCamEyeX = 100.0f; + player->camEye.y = gCsCamEyeY = 0.0f; + player->camEye.z = gCsCamEyeZ = -200.0f; + player->camAt.x = gCsCamAtX = 0.0f; + player->camAt.y = gCsCamAtY = 0.0f; + player->camAt.z = gCsCamAtZ = -1000.0f; player->unk_034 = -5.0f; player->unk_0D0 = 0.0f; D_80178340 = 255; @@ -1499,8 +1499,8 @@ void func_i2_80193A30(Player* player) { D_80178340 = 255; } D_80177A48[0] = 0.5f; - D_801779A0 = gActors[5].obj.pos.x; - D_801779C0 = gActors[5].obj.pos.z; + gCsCamAtX = gActors[5].obj.pos.x; + gCsCamAtZ = gActors[5].obj.pos.z; player->unk_034 -= 0.1f; if (gCsFrameCount == 140) { x = gActors[5].obj.pos.x; @@ -1553,9 +1553,9 @@ void func_i2_80193A30(Player* player) { case 3: if (gCsFrameCount >= 201) { - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; Math_SmoothStepToF(D_80177A48, 0.1f, 1.0f, 0.01f, 0); } @@ -1589,9 +1589,9 @@ void func_i2_80193A30(Player* player) { gActors[1].obj.pos.z -= player->pos.z; gActors[2].obj.pos.z -= player->pos.z; player->camEye.z -= player->pos.z; - D_80177988 -= player->pos.z; + gCsCamEyeZ -= player->pos.z; player->camAt.z -= player->pos.z; - D_801779C0 -= player->pos.z; + gCsCamAtZ -= player->pos.z; player->pos.z = 0.0f; player->unk_0D0 = 0.0f; } @@ -1601,12 +1601,12 @@ void func_i2_80193A30(Player* player) { Math_SmoothStepToF(&player->unk_034, 0.0f, 0.2f, 0.5f, 0); Math_SmoothStepToF(&player->pos.y, 350.0f, 0.1f, 15.0f, 0); Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 2.0f, 0); - D_80177978 = player->pos.x; - D_80177980 = (player->pos.y * player->unk_148) + 50.0f; - D_80177988 = 400.0f; - D_801779A0 = player->pos.x; - D_801779B8 = (player->pos.y * player->unk_148) + 20.0f; - D_801779C0 = player->unk_138; + gCsCamEyeX = player->pos.x; + gCsCamEyeY = (player->pos.y * player->unk_148) + 50.0f; + gCsCamEyeZ = 400.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f; + gCsCamAtZ = player->unk_138; Math_SmoothStepToF(D_80177A48, 1.0f, 1.0f, 0.01f, 0); if (player->timer_1F8 == 0) { @@ -1627,12 +1627,12 @@ void func_i2_80193A30(Player* player) { } break; } - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 20000.0f, 0); Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); src.x = 0.0f; diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 91dc683b..b12574d5 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2235,39 +2235,39 @@ void func_i3_8018DF74(Player* player) { Matrix_Translate(gCalcMatrix, 0.0f, 350.0f, D_80177A48[6], 0); Matrix_RotateY(gCalcMatrix, -(D_80177A48[4] * M_DTOR), 1); Matrix_MultVec3f(gCalcMatrix, &sp74, &sp68); - D_80177978 = sp68.x; - D_80177980 = sp68.y; - D_80177988 = sp68.z; + gCsCamEyeX = sp68.x; + gCsCamEyeY = sp68.y; + gCsCamEyeZ = sp68.z; if (gCsFrameCount < 200) { Math_SmoothStepToF(&D_80177A48[4], 0.0f, 0.05f, 0.56f, 0.001f); - D_801779A0 = gActors[1].obj.pos.x; - D_801779B8 = gActors[1].obj.pos.y; - D_801779C0 = gActors[1].obj.pos.z; + gCsCamAtX = gActors[1].obj.pos.x; + gCsCamAtY = gActors[1].obj.pos.y; + gCsCamAtZ = gActors[1].obj.pos.z; D_80177A48[0] = 1.0f; D_80177A48[1] = 1.0f; } else { Math_SmoothStepToF(&D_80177A48[4], 0.0f, 0.05f, 0.56f, 0.001f); Math_SmoothStepToF(&D_80177A48[5], 0.0f, 0.003f, 100.0f, 0.001f); - Math_SmoothStepToF(&D_801779A0, player->pos.x, 0.01f, 20.0f, 0.0001f); - Math_SmoothStepToF(&D_801779B8, player->pos.y, 0.01f, 20.0f, 0.0001f); - Math_SmoothStepToF(&D_801779C0, player->pos.z - 2500.0f, 0.01f, 20.0f, 0.0001f); + Math_SmoothStepToF(&gCsCamAtX, player->pos.x, 0.01f, 20.0f, 0.0001f); + Math_SmoothStepToF(&gCsCamAtY, player->pos.y, 0.01f, 20.0f, 0.0001f); + Math_SmoothStepToF(&gCsCamAtZ, player->pos.z - 2500.0f, 0.01f, 20.0f, 0.0001f); D_80177A48[0] = 1.0f; D_80177A48[1] = 1.0f; } } else { Math_SmoothStepToF(&D_80177A48[3], 0.1f, 0.3f, 0.1f, 0.00001f); - temp1 = fabsf(player->pos.x - D_80177978) * D_80177A48[3]; - temp2 = fabsf(player->pos.y * player->unk_148 + 50.0f - D_80177980) * D_80177A48[3]; - temp3 = fabsf(player->pos.z + 400.0f - D_80177988) * D_80177A48[3]; - D_80177978 += temp1; - D_80177980 -= temp2; - D_80177988 -= temp3; - temp1 = fabsf(player->pos.x - D_801779A0) * D_80177A48[3]; - temp2 = fabsf(player->pos.y * player->unk_148 + 20.0f - D_801779B8) * D_80177A48[3]; - temp3 = fabsf(player->pos.z - 51.0f - D_801779C0) * D_80177A48[3]; - D_801779A0 += temp1; - D_801779B8 -= temp2; - D_801779C0 -= temp3; + temp1 = fabsf(player->pos.x - gCsCamEyeX) * D_80177A48[3]; + temp2 = fabsf(player->pos.y * player->unk_148 + 50.0f - gCsCamEyeY) * D_80177A48[3]; + temp3 = fabsf(player->pos.z + 400.0f - gCsCamEyeZ) * D_80177A48[3]; + gCsCamEyeX += temp1; + gCsCamEyeY -= temp2; + gCsCamEyeZ -= temp3; + temp1 = fabsf(player->pos.x - gCsCamAtX) * D_80177A48[3]; + temp2 = fabsf(player->pos.y * player->unk_148 + 20.0f - gCsCamAtY) * D_80177A48[3]; + temp3 = fabsf(player->pos.z - 51.0f - gCsCamAtZ) * D_80177A48[3]; + gCsCamAtX += temp1; + gCsCamAtY -= temp2; + gCsCamAtZ -= temp3; D_80177A48[0] = 1.0f; D_80177A48[1] = 1.0f; } @@ -2375,12 +2375,12 @@ void func_i3_8018DF74(Player* player) { player->unk_138 = player->pos.z; } player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[1], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[1], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[1], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[1], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[1], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[1], 50000.0f, 0.001f); } void func_i3_8018EA88(Actor* actor) { @@ -2496,16 +2496,16 @@ void func_i3_8018ED78(Player* player) { player->unk_234 = 0; player->unk_0D0 = 0.0f; } - Math_SmoothStepToF(&D_80177978, gBosses[0].obj.pos.x, 0.05f, 1000.0f, 0.001f); - Math_SmoothStepToF(&D_80177980, gBosses[0].obj.pos.y, 0.05f, 1000.0f, 0.001f); - Math_SmoothStepToF(&D_80177988, gBosses[0].obj.pos.z + D_80177D20, 0.05f, 10.0f, 0.0001f); - player->camEye.x = D_80177978; - player->camEye.y = D_80177980; - player->camEye.z = D_80177988; + Math_SmoothStepToF(&gCsCamEyeX, gBosses[0].obj.pos.x, 0.05f, 1000.0f, 0.001f); + Math_SmoothStepToF(&gCsCamEyeY, gBosses[0].obj.pos.y, 0.05f, 1000.0f, 0.001f); + Math_SmoothStepToF(&gCsCamEyeZ, gBosses[0].obj.pos.z + D_80177D20, 0.05f, 10.0f, 0.0001f); + player->camEye.x = gCsCamEyeX; + player->camEye.y = gCsCamEyeY; + player->camEye.z = gCsCamEyeZ; - D_801779A0 = gBosses[0].obj.pos.x; - D_801779B8 = gBosses[0].obj.pos.y; - D_801779C0 = gBosses[0].obj.pos.z + D_80177D20; + gCsCamAtX = gBosses[0].obj.pos.x; + gCsCamAtY = gBosses[0].obj.pos.y; + gCsCamAtZ = gBosses[0].obj.pos.z + D_80177D20; D_80177A48[0] = 0.04f; if (gCsFrameCount == 140) { func_i3_8018EA88(actor4); @@ -2575,9 +2575,9 @@ void func_i3_8018ED78(Player* player) { D_80177A48[5] = 300.0f; D_80177A48[4] = 0.0f; D_80177A48[9] = 50.0f; - player->camAt.x = D_801779A0 = player->pos.x; - player->camAt.y = D_801779B8 = 0.0f; - player->camAt.z = D_801779C0 = player->pos.z + 50.0f + D_80177D20; + player->camAt.x = gCsCamAtX = player->pos.x; + player->camAt.y = gCsCamAtY = 0.0f; + player->camAt.z = gCsCamAtZ = player->pos.z + 50.0f + D_80177D20; } if (D_80178340 != 0) { D_80178358 = 0; @@ -2606,18 +2606,18 @@ void func_i3_8018ED78(Player* player) { if (D_80177A48[4] < 0.0f) { D_80177A48[4] = D_80177A48[4] + 360.0f; } - D_801779A0 = player->pos.x; - D_801779B8 = 0.0f; - D_801779C0 = D_80177A48[9] + player->pos.z + D_80177D20; + gCsCamAtX = player->pos.x; + gCsCamAtY = 0.0f; + gCsCamAtZ = D_80177A48[9] + player->pos.z + D_80177D20; D_80177A48[0] = 0.008f; } else { Math_SmoothStepToAngle(&D_80177A48[4], 0.0f, 0.1f, 10.0f, 0.001f); Math_SmoothStepToF(&D_80177A48[5], 0.0f, 0.1f, 1000.0f, 0.001f); D_8015F984 -= 0.005f; - D_801779A0 += 2.0f; - player->camAt.x = D_801779A0 = player->pos.x; - player->camAt.y = D_801779B8 = 0.0f; - player->camAt.z = D_801779C0 = D_80177A48[9] + player->pos.z + D_80177D20; + gCsCamAtX += 2.0f; + player->camAt.x = gCsCamAtX = player->pos.x; + player->camAt.y = gCsCamAtY = 0.0f; + player->camAt.z = gCsCamAtZ = D_80177A48[9] + player->pos.z + D_80177D20; } sp78.x = 0.0f; sp78.y = 0.0f; @@ -2625,9 +2625,9 @@ void func_i3_8018ED78(Player* player) { Matrix_Translate(gCalcMatrix, D_80177A48[1], 0.0f, D_80177A48[3] + D_80177D20, 0); Matrix_RotateY(gCalcMatrix, -(D_80177A48[4] * M_DTOR), 1); Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); - player->camEye.x = D_80177978 = sp6C.x; - player->camEye.y = D_80177980 = sp6C.y; - player->camEye.z = D_80177988 = sp6C.z; + player->camEye.x = gCsCamEyeX = sp6C.x; + player->camEye.y = gCsCamEyeY = sp6C.y; + player->camEye.z = gCsCamEyeZ = sp6C.z; if (gCsFrameCount == 1076) { Object_Kill(&gActors[0].obj, gActors[0].sfxPos); @@ -2721,10 +2721,10 @@ void func_i3_8018ED78(Player* player) { player->pos.z += player->vel.z; player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.0001f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.0001f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.0001f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.0001f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0001f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0.0001f); } diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 53097af5..3045ba9b 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -448,12 +448,12 @@ f32 func_i3_801A958C(s32 arg0, f32 arg1) { } void func_i3_801A95C8(void) { - Math_SmoothStepToF(&gPlayer[0].camEye.x, D_80177978, 0.1f, 50.0f, 0.0001f); - Math_SmoothStepToF(&gPlayer[0].camEye.y, D_80177980, 0.1f, 50.0f, 0.0001f); - Math_SmoothStepToF(&gPlayer[0].camEye.z, D_80177988, 0.1f, 50.0f, 0.0001f); - Math_SmoothStepToF(&gPlayer[0].camAt.x, D_801779A0, 0.1f, 50.0f, 0.0001f); - Math_SmoothStepToF(&gPlayer[0].camAt.y, D_801779B8, 0.1f, 50.0f, 0.0001f); - Math_SmoothStepToF(&gPlayer[0].camAt.z, D_801779C0, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].camEye.x, gCsCamEyeX, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].camEye.y, gCsCamEyeY, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].camEye.z, gCsCamEyeZ, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].camAt.x, gCsCamAtX, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].camAt.y, gCsCamAtY, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].camAt.z, gCsCamAtZ, 0.1f, 50.0f, 0.0001f); } void func_i3_801A96DC(Actor* actor) { @@ -826,31 +826,31 @@ void func_i3_801AA8E8(Player* player) { } else { Math_SmoothStepToF(&player->unk_02C, var_fv1, 0.05f, 2.0f, 0.05f); } - D_80177978 = (player->pos.x - player->unk_0AC) * (600.0f / player->unk_09C); - D_80177978 -= player->unk_030 * 1.5f; - D_80177978 += player->unk_0AC + D_i3_801C41B8[9]; - D_80177980 = player->pos.y * (740.0f / player->unk_0A0); - D_80177980 -= player->unk_02C - 50.0f; - D_80177980 += player->unk_0B0; - D_801779A0 = (player->pos.x - player->unk_0AC - D_i3_801C41B8[9]) * (600.0f / player->unk_09C); - D_801779A0 += player->unk_084 * -2.0f; - D_801779A0 -= player->unk_030 * 0.5f; - D_801779A0 += player->unk_0AC; - D_801779B8 = (player->pos.y - player->unk_0B0) * (750.0f / player->unk_0A0); - D_801779B8 += player->unk_060 * 10.0f; - D_801779B8 -= player->unk_02C * -0.55f; - D_801779B8 += player->unk_0B0 + D_i3_801C41B8[10]; - if (D_801779B8 < 20.0f) { - D_801779B8 = 20.0f; + gCsCamEyeX = (player->pos.x - player->unk_0AC) * (600.0f / player->unk_09C); + gCsCamEyeX -= player->unk_030 * 1.5f; + gCsCamEyeX += player->unk_0AC + D_i3_801C41B8[9]; + gCsCamEyeY = player->pos.y * (740.0f / player->unk_0A0); + gCsCamEyeY -= player->unk_02C - 50.0f; + gCsCamEyeY += player->unk_0B0; + gCsCamAtX = (player->pos.x - player->unk_0AC - D_i3_801C41B8[9]) * (600.0f / player->unk_09C); + gCsCamAtX += player->unk_084 * -2.0f; + gCsCamAtX -= player->unk_030 * 0.5f; + gCsCamAtX += player->unk_0AC; + gCsCamAtY = (player->pos.y - player->unk_0B0) * (750.0f / player->unk_0A0); + gCsCamAtY += player->unk_060 * 10.0f; + gCsCamAtY -= player->unk_02C * -0.55f; + gCsCamAtY += player->unk_0B0 + D_i3_801C41B8[10]; + if (gCsCamAtY < 20.0f) { + gCsCamAtY = 20.0f; } - D_80177988 = 240.0f; - D_801779C0 = player->unk_138 + (D_80177D20 - 1.0f); - Math_SmoothStepToF(&player->camEye.x, D_80177978, player->unk_014, 1000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, player->unk_014, 1000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, 0.2f, 30.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, player->unk_014, 1000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, player->unk_014, 1000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, player->unk_014, 1000.0f, 0); + gCsCamEyeZ = 240.0f; + gCsCamAtZ = player->unk_138 + (D_80177D20 - 1.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, player->unk_014, 1000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, 0.2f, 30.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, player->unk_014, 1000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, player->unk_014, 1000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, player->unk_014, 1000.0f, 0); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f); temp = -player->unk_0EC; Math_SmoothStepToF(&player->unk_034, temp * 0.3f, 0.1f, 1.5f, 0.0f); diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index f39193b6..6eb227f5 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -963,15 +963,15 @@ void func_i3_801A10F4(Player* player) { Rand_SetSeed(1, 29100, 9786); player->unk_1D0 = 1; player->camEye.x = -2000.0f; - D_80177978 = -2800.0f; - player->camEye.y = D_80177980 = 120.0f; + gCsCamEyeX = -2800.0f; + player->camEye.y = gCsCamEyeY = 120.0f; player->camEye.z = -1800.0f; - D_80177988 = -2800.0f; + gCsCamEyeZ = -2800.0f; - player->camAt.x = D_801779A0 = -1000.0f; + player->camAt.x = gCsCamAtX = -1000.0f; player->camAt.y = 1400.0f; - D_801779B8 = 400.0f; - player->camAt.z = D_801779C0 = -2300.0f; + gCsCamAtY = 400.0f; + player->camAt.z = gCsCamAtZ = -2300.0f; D_80177A48[0] = 0.0045f; @@ -1023,15 +1023,15 @@ void func_i3_801A10F4(Player* player) { if (gCsFrameCount == 410) { player->unk_1D0++; player->camEye.x = 200.0f; - D_80177978 = 800.0f; + gCsCamEyeX = 800.0f; player->camEye.y = 140.0f; - D_80177980 = player->pos.y + 200.0f; - player->camEye.z = D_80177988 = 400.0f; + gCsCamEyeY = player->pos.y + 200.0f; + player->camEye.z = gCsCamEyeZ = 400.0f; player->camAt.x = 400.0f; - D_801779A0 = 200.0f; + gCsCamAtX = 200.0f; player->camAt.y = 140.0f; - D_801779B8 = 1200.0f; + gCsCamAtY = 1200.0f; player->camAt.z = -500.0f; player->pos.y = 1200.0f; @@ -1039,8 +1039,8 @@ void func_i3_801A10F4(Player* player) { func_i3_801A0FD4(&gActors[0], 0); func_i3_801A0FD4(&gActors[1], 1); func_i3_801A0FD4(&gActors[2], 2); - D_801779C0 = -3000.0f; - D_80177988 = -3400.0f; + gCsCamAtZ = -3000.0f; + gCsCamEyeZ = -3400.0f; func_8001A55C(player->sfxPos, 0x3140807E); func_8001D444(0, 0x33, 0, 0xFF); func_80057814(player); @@ -1062,10 +1062,10 @@ void func_i3_801A10F4(Player* player) { } if (player->camEye.z <= -2465.0f) { player->unk_1D0++; - D_80177980 = player->pos.y + 180.0f; - D_801779A0 = 0.0f; - D_80177978 = 0.0f; - D_801779C0 = -2800.0f; + gCsCamEyeY = player->pos.y + 180.0f; + gCsCamAtX = 0.0f; + gCsCamEyeX = 0.0f; + gCsCamAtZ = -2800.0f; D_80177A48[0] = 0.06f; } break; @@ -1088,12 +1088,12 @@ void func_i3_801A10F4(Player* player) { } break; case 4: - D_80177978 = player->pos.x; - D_80177980 = player->pos.y; - D_80177988 = player->unk_138 + 1000.0f; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->unk_138 + 1100.0f; + gCsCamEyeX = player->pos.x; + gCsCamEyeY = player->pos.y; + gCsCamEyeZ = player->unk_138 + 1000.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->unk_138 + 1100.0f; D_80177A48[0] = 0.03f; D_801779A8[gMainController] = 60.0f; player->unk_190 = 2.0f; @@ -1133,12 +1133,12 @@ void func_i3_801A10F4(Player* player) { D_80177CE8 += 60.0f; break; } - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 20000.0f, 0); Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); sp50.x = 0.f; @@ -2817,12 +2817,12 @@ void func_i3_801A7930(Player* player) { player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = player->unk_110 = 0.0f; player->unk_234 = 1; - D_80177978 = player->camEye.x; - D_80177980 = player->camEye.y; - D_80177988 = player->camEye.z; - D_801779A0 = player->camAt.x; - D_801779B8 = player->camAt.y; - D_801779C0 = player->camAt.z; + gCsCamEyeX = player->camEye.x; + gCsCamEyeY = player->camEye.y; + gCsCamEyeZ = player->camEye.z; + gCsCamAtX = player->camAt.x; + gCsCamAtY = player->camAt.y; + gCsCamAtZ = player->camAt.z; for (i = 10; i < 60; i++) { if (gActors[i].unk_0B6 == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxPos); @@ -2846,13 +2846,13 @@ void func_i3_801A7930(Player* player) { dx = player->pos.x - bossSO->obj.pos.x; dz = (player->pos.z - bossSO->obj.pos.z) * 0.05f; sp78 = Math_RadToDeg(-Math_Atan2F(dx, dz)); - Math_SmoothStepToF(&D_80177980, 300.0f, 1.0f, 20.0f, 0.0f); - Math_SmoothStepToF(&D_801779B8, 290.0f, 1.0f, 20.0f, 0.0f); + Math_SmoothStepToF(&gCsCamEyeY, 300.0f, 1.0f, 20.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtY, 290.0f, 1.0f, 20.0f, 0.0f); sp74 = Math_SmoothStepToAngle(&player->unk_0E8, sp78, 0.5f, 2.0f, 0.0001f) * 30.0f; if (gCsFrameCount >= 14) { Math_SmoothStepToAngle(&player->unk_0EC, sp74, 0.1f, 5.0f, 0.0001f); - D_801779A0 = 0.0f; - D_80177978 = 0.0f; + gCsCamAtX = 0.0f; + gCsCamEyeX = 0.0f; } else if (sp74 < 0.0f) { player->unk_0EC -= 30.0f; } else { @@ -2901,10 +2901,10 @@ void func_i3_801A7930(Player* player) { player->camEye.x = 0.0f; player->camEye.y = player->pos.y + 80.0f; player->camEye.z = player->pos.z + D_80177D20 - 4000.0f; - D_80177988 = player->pos.z + D_80177D20 - 4900.0f; - player->camAt.x = D_801779A0 = 0.0f; - player->camAt.y = D_801779B8 = 200.0f; - player->camAt.z = D_801779C0 = player->pos.z + D_80177D20; + gCsCamEyeZ = player->pos.z + D_80177D20 - 4900.0f; + player->camAt.x = gCsCamAtX = 0.0f; + player->camAt.y = gCsCamAtY = 200.0f; + player->camAt.z = gCsCamAtZ = player->pos.z + D_80177D20; D_80177A48[0] = 0.0f; Object_Kill(&gActors[4].obj, gActors[4].sfxPos); Object_Kill(&gActors[5].obj, gActors[5].sfxPos); @@ -2966,9 +2966,9 @@ void func_i3_801A7930(Player* player) { Math_SmoothStepToF(&player->camEye.y, player->pos.y + 52.0f, 1.0f, 16.0f, 0.0f); Math_SmoothStepToF(&player->camEye.z, (player->pos.z + D_80177D20) - 50.0f, 1.0f, 21.5f, 0.0f); } - player->camAt.x = D_801779A0 = player->pos.x; - player->camAt.y = D_801779B8 = player->pos.y; - player->camAt.z = D_801779C0 = player->pos.z + D_80177D20; + player->camAt.x = gCsCamAtX = player->pos.x; + player->camAt.y = gCsCamAtY = player->pos.y; + player->camAt.z = gCsCamAtZ = player->pos.z + D_80177D20; break; case 4: D_80177CE8 += 60.0f; @@ -2981,21 +2981,21 @@ void func_i3_801A7930(Player* player) { sp60.z = -700.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); if (gCsFrameCount < 1440) { - D_80177978 = sp54.x; - D_80177980 = D_i3_801C2768[3] + sp54.y; - D_80177988 = player->pos.z + D_80177D20 + sp54.z; - D_801779A0 = 0.0f; - D_801779B8 = player->pos.y + 75.0f; + gCsCamEyeX = sp54.x; + gCsCamEyeY = D_i3_801C2768[3] + sp54.y; + gCsCamEyeZ = player->pos.z + D_80177D20 + sp54.z; + gCsCamAtX = 0.0f; + gCsCamAtY = player->pos.y + 75.0f; Math_SmoothStepToF(&D_i3_801C2768[3], 500.0f, 0.1f, 1.0f, 0.0001f); - D_801779C0 = player->pos.z + D_80177D20 + 200.0f; + gCsCamAtZ = player->pos.z + D_80177D20 + 200.0f; if (gCsFrameCount >= 1400) { - D_801779C0 -= (gCsFrameCount * 8) - 11200; + gCsCamAtZ -= (gCsFrameCount * 8) - 11200; } } else { - Math_SmoothStepToF(&D_80177978, 0.0f, 0.1f, 1.0f, 0.0001f); - D_801779A0 = 0.0f; - D_801779B8 = player->pos.y + 75.0f; - D_801779C0 = player->pos.z + D_80177D20 + 200.0f - ((gCsFrameCount * 8) - 11200); + Math_SmoothStepToF(&gCsCamEyeX, 0.0f, 0.1f, 1.0f, 0.0001f); + gCsCamAtX = 0.0f; + gCsCamAtY = player->pos.y + 75.0f; + gCsCamAtZ = player->pos.z + D_80177D20 + 200.0f - ((gCsFrameCount * 8) - 11200); } if (gCsFrameCount > 1460) { player->unk_0D0 += 2.0f; @@ -3116,12 +3116,12 @@ void func_i3_801A7930(Player* player) { player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0.0f); player->unk_088 += 10.0f; player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; player->unk_0F4 += 8.0f; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 0f1179b7..77ae0983 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4531,12 +4531,12 @@ void func_i3_8019D428(Player* player) { case 0: gCsFrameCount = 0; player->pos.z += 10000.0f; - player->camEye.x = D_80177978 = player->pos.x; - player->camEye.y = D_80177980 = (player->pos.y * player->unk_148) + 50.0f; - player->camEye.z = D_80177988 = 400.0f; - player->camAt.x = D_801779A0 = player->pos.x; - player->camAt.y = D_801779B8 = (player->pos.y * player->unk_148) + 20.0f - 230.0f; - player->camAt.z = D_801779C0 = 0.0f; + player->camEye.x = gCsCamEyeX = player->pos.x; + player->camEye.y = gCsCamEyeY = (player->pos.y * player->unk_148) + 50.0f; + player->camEye.z = gCsCamEyeZ = 400.0f; + player->camAt.x = gCsCamAtX = player->pos.x; + player->camAt.y = gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f - 230.0f; + player->camAt.z = gCsCamAtZ = 0.0f; player->unk_1D0 = 1; /* fallthrough */ case 1: @@ -4590,12 +4590,12 @@ void func_i3_8019D76C(Player* player) { player->unk_234 = 1; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = player->unk_110 = 0.0f; - D_80177978 = player->camEye.x; - D_80177980 = player->camEye.y; - D_80177988 = player->camEye.z; - D_801779A0 = player->camAt.x; - D_801779B8 = player->camAt.y; - D_801779C0 = player->camAt.z; + gCsCamEyeX = player->camEye.x; + gCsCamEyeY = player->camEye.y; + gCsCamEyeZ = player->camEye.z; + gCsCamAtX = player->camAt.x; + gCsCamAtY = player->camAt.y; + gCsCamAtZ = player->camAt.z; for (i = 10; i < 60; i++) { if (gActors[i].unk_0B6 == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxPos); @@ -4616,8 +4616,8 @@ void func_i3_8019D76C(Player* player) { D_80177CE8 += 30.0f; Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, 200.0f, 0.05f, 10.0f, 0.0f); - Math_SmoothStepToF(&D_80177980, 250.0f, 1.0f, 20.0f, 0.0f); - Math_SmoothStepToF(&D_801779B8, 240.0f, 1.0f, 20.0f, 0.0f); + Math_SmoothStepToF(&gCsCamEyeY, 250.0f, 1.0f, 20.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtY, 240.0f, 1.0f, 20.0f, 0.0f); dx = player->pos.x - boss->obj.pos.x; dz = (player->pos.z - boss->obj.pos.z) * 0.05f; temp_ft5 = Math_RadToDeg(-Math_Atan2F(dx, dz)); @@ -4664,22 +4664,22 @@ void func_i3_8019D76C(Player* player) { if (D_80161684 == 0) { D_80177A48[1] = 330.0f; player->camEye.x = 1350.0f; - player->camAt.x = D_801779A0 = 1450.0f; + player->camAt.x = gCsCamAtX = 1450.0f; D_80177A48[3] = 800.0f; D_80177A48[4] = -0.15f; D_80177A48[5] = -250.0f; player->camEye.z = player->pos.z + D_80177D20 - 1780.0f; } else { player->camEye.x = -1500.0f; - player->camAt.x = D_801779A0 = -1500.0f; + player->camAt.x = gCsCamAtX = -1500.0f; D_80177A48[3] = -800.0f; D_80177A48[4] = 0.2f; D_80177A48[5] = 250.0f; player->camEye.z = player->pos.z + D_80177D20 - 2000.0f; } player->camEye.y = 200.0f; - player->camAt.y = D_801779B8 = player->pos.y; - player->camAt.z = D_801779C0 = player->pos.z + D_80177D20; + player->camAt.y = gCsCamAtY = player->pos.y; + player->camAt.z = gCsCamAtZ = player->pos.z + D_80177D20; D_80177A48[0] = 0.0f; } break; @@ -4694,17 +4694,17 @@ void func_i3_8019D76C(Player* player) { sp58.z = D_80177A48[3]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); if (gCsFrameCount < 1180) { - D_80177978 = sp4C.x; - D_80177980 = 200.0f + sp4C.y; - D_80177988 = player->pos.z + D_80177D20 + sp4C.z; - D_801779A0 = 0.0f; - D_801779B8 = player->pos.y; - D_801779C0 = D_80177A48[5] + (player->pos.z + D_80177D20); + gCsCamEyeX = sp4C.x; + gCsCamEyeY = 200.0f + sp4C.y; + gCsCamEyeZ = player->pos.z + D_80177D20 + sp4C.z; + gCsCamAtX = 0.0f; + gCsCamAtY = player->pos.y; + gCsCamAtZ = D_80177A48[5] + (player->pos.z + D_80177D20); Math_SmoothStepToF(&D_80177A48[5], 250.0f, 1.0f, 1.0f, 0.0f); } else { - D_801779A0 = 0.0f; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z + D_80177D20; + gCsCamAtX = 0.0f; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z + D_80177D20; } if (gCsFrameCount >= 1181) { player->unk_0D0 += 2.0f; @@ -4839,12 +4839,12 @@ void func_i3_8019D76C(Player* player) { player->pos.y += player->vel.y; player->unk_138 = player->pos.z += player->vel.z; player->unk_0F8 = player->unk_0EC; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0.0f); player->unk_088 += 10.0f; player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; player->unk_0F4 += 8.0f; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 249f1592..55df82b8 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1139,13 +1139,13 @@ void func_i4_8018EF6C(Player* player) { D_80177A48[2] = -13000.0f; D_80177A48[4] = -22000.0f; - D_80177978 = player->pos.x - 150; - D_80177980 = player->pos.y; - D_80177988 = player->pos.z - 500.0f; + gCsCamEyeX = player->pos.x - 150; + gCsCamEyeY = player->pos.y; + gCsCamEyeZ = player->pos.z - 500.0f; - D_801779A0 = 0.0f; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamAtX = 0.0f; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; player->unk_1D0 = 1; player->unk_204 = 1; @@ -1156,9 +1156,9 @@ void func_i4_8018EF6C(Player* player) { case 1: D_80178358 = 0; - D_801779A0 = 0.0f; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamAtX = 0.0f; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; D_80177A48[2] += 4.5f; sp60 = SIN_DEG(D_80177A48[2]) * 10.0f; player->unk_0EC = SIN_DEG(D_80177A48[2]) * -60.0f; @@ -1225,12 +1225,12 @@ void func_i4_8018EF6C(Player* player) { actor->timer_0BC = 1000; } - D_80177978 = -200.0f; - D_80177980 = 700.0f; - D_80177988 = 12000.0f; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamEyeX = -200.0f; + gCsCamEyeY = 700.0f; + gCsCamEyeZ = 12000.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; D_80178410 = 300; D_80177A98 = 1; @@ -1247,10 +1247,10 @@ void func_i4_8018EF6C(Player* player) { break; case 2: - D_80177988 += player->vel.z * 0.2f; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamEyeZ += player->vel.z * 0.2f; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 1.0f, 0.0f); @@ -1296,12 +1296,12 @@ void func_i4_8018EF6C(Player* player) { player->unk_138 = player->pos.z; player->unk_0F8 = (player->unk_0EC + player->unk_12C) + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0); } void func_i4_8018F83C(Actor* actor, s32 arg1) { @@ -1403,12 +1403,12 @@ void func_i4_8018F94C(Player* player) { D_80177A48[0] = 1.0f; D_80178410 = 1000; D_80177A98 = 0; - D_80177980 = 0; - D_80177978 = 200.0f; - D_80177988 = -15000.0f; - D_801779A0 = gPlayer[0].pos.x; - D_801779B8 = gPlayer[0].pos.y; - D_801779C0 = gPlayer[0].pos.z; + gCsCamEyeY = 0; + gCsCamEyeX = 200.0f; + gCsCamEyeZ = -15000.0f; + gCsCamAtX = gPlayer[0].pos.x; + gCsCamAtY = gPlayer[0].pos.y; + gCsCamAtZ = gPlayer[0].pos.z; D_80178340 = D_80178358 = 255; func_800182F4(0x103200FF); func_800182F4(0x113200FF); @@ -1426,9 +1426,9 @@ void func_i4_8018F94C(Player* player) { player->unk_1D0 = 10; case 10: - D_801779A0 = gPlayer[0].pos.x; - D_801779B8 = gPlayer[0].pos.y; - D_801779C0 = gPlayer[0].pos.z; + gCsCamAtX = gPlayer[0].pos.x; + gCsCamAtY = gPlayer[0].pos.y; + gCsCamAtZ = gPlayer[0].pos.z; actor50->obj.pos.y -= 5; @@ -1517,14 +1517,14 @@ void func_i4_8018F94C(Player* player) { D_801784D4 = 60.0f; D_801784D8 = 0.0f; } - D_80177988 += gPlayer[0].vel.z * 0.3f; + gCsCamEyeZ += gPlayer[0].vel.z * 0.3f; break; case 11: D_80177A48[5] += D_80177A48[6]; if (gCsFrameCount < 680) { - D_80177988 += gPlayer[0].vel.z * 0.3f; + gCsCamEyeZ += gPlayer[0].vel.z * 0.3f; Math_SmoothStepToF(&D_80177A48[6], 0.7f, 0.1f, 0.005f, 0.0f); gActors[0].vel.z = gActors[1].vel.z = gActors[2].vel.z = player->vel.z; } else { @@ -1542,12 +1542,12 @@ void func_i4_8018F94C(Player* player) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); - D_80177978 = gPlayer[0].pos.x + sp68.x; - D_80177980 = gPlayer[0].pos.y + sp68.y; - D_80177988 = gPlayer[0].pos.z + 200.0f + sp68.z; - D_801779A0 = gPlayer[0].pos.x; - D_801779B8 = gPlayer[0].pos.y; - D_801779C0 = gPlayer[0].pos.z + 200.0f; + gCsCamEyeX = gPlayer[0].pos.x + sp68.x; + gCsCamEyeY = gPlayer[0].pos.y + sp68.y; + gCsCamEyeZ = gPlayer[0].pos.z + 200.0f + sp68.z; + gCsCamAtX = gPlayer[0].pos.x; + gCsCamAtY = gPlayer[0].pos.y; + gCsCamAtZ = gPlayer[0].pos.z + 200.0f; switch (gCsFrameCount) { case 740: @@ -1573,9 +1573,9 @@ void func_i4_8018F94C(Player* player) { break; case 12: - D_801779A0 = gPlayer[0].pos.x; - D_801779B8 = gPlayer[0].pos.y; - D_801779C0 = gPlayer[0].pos.z + 200.0f; + gCsCamAtX = gPlayer[0].pos.x; + gCsCamAtY = gPlayer[0].pos.y; + gCsCamAtZ = gPlayer[0].pos.z + 200.0f; player->unk_190 = 2.0f; player->unk_0D0 += 5; @@ -1685,12 +1685,12 @@ void func_i4_8018F94C(Player* player) { player->camEye.y += player->vel.y * 0.1f; player->camEye.z += player->vel.z * 0.1f; } else { - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000, 0); } player->unk_088 += 10.0f; player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 41e40c18..6c4d8d3b 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -886,22 +886,22 @@ void func_i4_8018927C(Player* player) { src.y = 0.0f; src.z = D_80177A48[2]; Matrix_MultVec3f(gCalcMatrix, &src, player->jointTable); - D_80177978 = player->jointTable[0].x + player->pos.x; - D_80177980 = player->jointTable[0].y + player->pos.y; - D_80177988 = player->jointTable[0].z + (player->pos.z - 250.0f); - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z - 250.0f; + gCsCamEyeX = player->jointTable[0].x + player->pos.x; + gCsCamEyeY = player->jointTable[0].y + player->pos.y; + gCsCamEyeZ = player->jointTable[0].z + (player->pos.z - 250.0f); + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z - 250.0f; Math_SmoothStepToF(D_80177A48, 0.05f, 1.0f, 0.001f, 0); - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->unk_0D0, 0.0f, 0.05f, 2.0f, 0); @@ -1135,9 +1135,9 @@ void func_i4_8018927C(Player* player) { } D_80177A48[5] = 94.0f; - D_801779A0 = 0.0f; - D_801779B8 = 30.0f; - D_801779C0 = 0.0f; + gCsCamAtX = 0.0f; + gCsCamAtY = 30.0f; + gCsCamAtZ = 0.0f; case 21: if (gCsFrameCount < 30) { @@ -1199,12 +1199,12 @@ void func_i4_8018927C(Player* player) { Matrix_Translate(gCalcMatrix, player->pos.x, 0.0f, player->pos.z + D_80177D20, 0); Matrix_RotateY(gCalcMatrix, -(D_80177A48[4] * M_DTOR), 1); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - player->camEye.x = D_80177978 = dest.x; - player->camEye.y = D_80177980 = dest.y; - player->camEye.z = D_80177988 = dest.z; - Math_SmoothStepToF(&D_801779B8, 0.0f, 0.005f, 1000.0f, 0.0001f); + player->camEye.x = gCsCamEyeX = dest.x; + player->camEye.y = gCsCamEyeY = dest.y; + player->camEye.z = gCsCamEyeZ = dest.z; + Math_SmoothStepToF(&gCsCamAtY, 0.0f, 0.005f, 1000.0f, 0.0001f); player->camAt.x = player->pos.x; - player->camAt.y = D_801779B8; + player->camAt.y = gCsCamAtY; player->camAt.z = player->pos.z + D_80177D20; break; @@ -1372,9 +1372,9 @@ void func_i4_8018927C(Player* player) { Matrix_Translate(gCalcMatrix, player->pos.x, 0.0f, player->pos.z + D_80177D20, 0); Matrix_RotateY(gCalcMatrix, -(D_80177A48[4] * M_DTOR), 1); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - player->camEye.x = D_80177978 = dest.x; - player->camEye.y = D_80177980 = dest.y; - player->camEye.z = D_80177988 = dest.z; + player->camEye.x = gCsCamEyeX = dest.x; + player->camEye.y = gCsCamEyeY = dest.y; + player->camEye.z = gCsCamEyeZ = dest.z; } if (gCsFrameCount >= 1240) { @@ -1390,11 +1390,11 @@ void func_i4_8018927C(Player* player) { Math_SmoothStepToF(&player->unk_0D0, 50.0f, 0.1f, 1000.0f, 0.001f); Math_SmoothStepToF(&actor0->vel.z, 40.0f, 0.1f, 1000.0f, 0.001f); } - Math_SmoothStepToF(&D_801779B8, player->pos.y, 0.005f, 1000.0f, 0.0001f); + Math_SmoothStepToF(&gCsCamAtY, player->pos.y, 0.005f, 1000.0f, 0.0001f); - player->camAt.x = D_801779A0 = player->pos.x; - player->camAt.y = D_801779B8; - player->camAt.z = D_801779C0 = player->pos.z - D_80177A48[6] + D_80177D20; + player->camAt.x = gCsCamAtX = player->pos.x; + player->camAt.y = gCsCamAtY; + player->camAt.z = gCsCamAtZ = player->pos.z - D_80177A48[6] + D_80177D20; break; } diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 25c74c6b..0b65a09e 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -223,20 +223,20 @@ void func_i4_80192E20(Player* player) { case 0: gCsFrameCount = 0; func_i4_80192C8C(); - D_80177978 = 3535.0f; - D_80177980 = 500.0f; - D_80177988 = 3535.0f; - D_801779A0 = gActors[4].obj.pos.x; - D_801779B8 = gActors[4].obj.pos.y; - D_801779C0 = gActors[4].obj.pos.z; + gCsCamEyeX = 3535.0f; + gCsCamEyeY = 500.0f; + gCsCamEyeZ = 3535.0f; + gCsCamAtX = gActors[4].obj.pos.x; + gCsCamAtY = gActors[4].obj.pos.y; + gCsCamAtZ = gActors[4].obj.pos.z; player->unk_1D0 = 11; D_80177A48[0] = 1.0f; break; case 11: - D_801779A0 = gActors[4].obj.pos.x; - D_801779B8 = gActors[4].obj.pos.y; - D_801779C0 = gActors[4].obj.pos.z; + gCsCamAtX = gActors[4].obj.pos.x; + gCsCamAtY = gActors[4].obj.pos.y; + gCsCamAtZ = gActors[4].obj.pos.z; gActors[4].obj.rot.z -= 0.2f; gActors[5].obj.rot.z += 0.3f; gActors[6].obj.rot.z += 0.7f; @@ -270,11 +270,11 @@ void func_i4_80192E20(Player* player) { break; case 13: - player->camAt.x = D_801779A0 = player->pos.x; - player->camAt.y = D_801779B8 = player->pos.y; - player->camAt.z = D_801779C0 = player->pos.z; - player->camEye.x = D_80177978 = 100.0f; - player->camEye.z = D_80177988 = 7000.0f; + player->camAt.x = gCsCamAtX = player->pos.x; + player->camAt.y = gCsCamAtY = player->pos.y; + player->camAt.z = gCsCamAtZ = player->pos.z; + player->camEye.x = gCsCamEyeX = 100.0f; + player->camEye.z = gCsCamEyeZ = 7000.0f; if (gCsFrameCount == 240) { Object_Kill(&gActors[4].obj, gActors[4].sfxPos); Object_Kill(&gActors[6].obj, gActors[6].sfxPos); @@ -349,12 +349,12 @@ void func_i4_80192E20(Player* player) { player->pos.z += player->vel.z; player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0.0f); } void func_i4_80193718(Boss* boss) { @@ -1424,12 +1424,12 @@ void func_i4_80197290(Player* player) { player->unk_114 = player->unk_120 = player->unk_0E4 = player->unk_034 = player->unk_4D8 = 0.0f; player->unk_0E8 = 120.0f; player->unk_0D0 = 40.0f; - D_80177978 = boss->obj.pos.x + 5000.0f; - D_80177980 = 750.0f; - D_80177988 = boss->obj.pos.z; - D_801779A0 = boss->obj.pos.x; - D_801779B8 = 1000.0f; - D_801779C0 = boss->obj.pos.z; + gCsCamEyeX = boss->obj.pos.x + 5000.0f; + gCsCamEyeY = 750.0f; + gCsCamEyeZ = boss->obj.pos.z; + gCsCamAtX = boss->obj.pos.x; + gCsCamAtY = 1000.0f; + gCsCamAtZ = boss->obj.pos.z; for (i = 10; i < 60; i++) { if (gActors[i].unk_0B6 == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxPos); @@ -1450,10 +1450,10 @@ void func_i4_80197290(Player* player) { break; case 1: - D_80177978 += 10.0f; - D_801779A0 = boss->obj.pos.x; - D_801779B8 = 1000.0f; - D_801779C0 = boss->obj.pos.z; + gCsCamEyeX += 10.0f; + gCsCamAtX = boss->obj.pos.x; + gCsCamAtY = 1000.0f; + gCsCamAtZ = boss->obj.pos.z; Math_SmoothStepToF(&player->unk_0EC, Math_SmoothStepToAngle(&player->unk_0E8, 283.0f, 0.1f, 3.0f, 0.0f) * 20.0f, 0.1f, 1.0f, 0.0f); @@ -1526,12 +1526,12 @@ void func_i4_80197290(Player* player) { src.y = 0.0f; src.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - D_80177978 = dest.x; - D_80177980 = 3600.0f; - D_80177988 = 500.0f + dest.z; - D_801779A0 = 0.0f; - D_801779B8 = 3500.0f; - D_801779C0 = player->pos.z + 500; + gCsCamEyeX = dest.x; + gCsCamEyeY = 3600.0f; + gCsCamEyeZ = 500.0f + dest.z; + gCsCamAtX = 0.0f; + gCsCamAtY = 3500.0f; + gCsCamAtZ = player->pos.z + 500; if (gCsFrameCount >= 1011) { player->unk_0D0 += 2.0f; player->unk_0E4 += 0.1f; @@ -1658,12 +1658,12 @@ void func_i4_80197290(Player* player) { player->unk_0F8 = player->unk_0EC; player->unk_138 = player->pos.z; if (player->unk_1D0 < 100) { - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0); } player->unk_088 += 10.0f; player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f; diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 99b68928..28c7a487 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -786,12 +786,12 @@ void func_i4_8019BA64(Player* player) { func_i4_8019B568(); func_i4_8019B48C(); - D_80177978 = 0.0f; - D_80177980 = 0.0f; - D_80177988 = 6000.0f; - D_801779A0 = 2500.0f; - D_801779B8 = 0.0f; - D_801779C0 = 0.0f; + gCsCamEyeX = 0.0f; + gCsCamEyeY = 0.0f; + gCsCamEyeZ = 6000.0f; + gCsCamAtX = 2500.0f; + gCsCamAtY = 0.0f; + gCsCamAtZ = 0.0f; D_80177A48[0] = 1.0f; player->unk_234 = 0; @@ -805,20 +805,20 @@ void func_i4_8019BA64(Player* player) { D_80178340 = 255; } - D_801779A0 -= 10.0f; - D_80177988 -= 7.0f; + gCsCamAtX -= 10.0f; + gCsCamEyeZ -= 7.0f; if (gCsFrameCount == 320) { actor = &actor[0]; player->unk_1D0 = 2; actor->vel.x = -10.0f; actor->obj.pos.x = 1000.0f; - D_80177978 = 0.0f; - D_80177980 = 0.0f; - D_80177988 = 17000.0f; - D_801779A0 = 0.0f; - D_801779B8 = 0.0f; - D_801779C0 = 0.0f; + gCsCamEyeX = 0.0f; + gCsCamEyeY = 0.0f; + gCsCamEyeZ = 17000.0f; + gCsCamAtX = 0.0f; + gCsCamAtY = 0.0f; + gCsCamAtZ = 0.0f; D_80178340 = 255; } break; @@ -847,13 +847,13 @@ void func_i4_8019BA64(Player* player) { player->unk_034 = 0.0f; - player->camEye.x = D_80177978 = actor->obj.pos.x - 2800.0f; - player->camEye.y = D_80177980 = actor->obj.pos.y + 1400.0f; - player->camEye.z = D_80177988 = actor->obj.pos.z + 700.0f; + player->camEye.x = gCsCamEyeX = actor->obj.pos.x - 2800.0f; + player->camEye.y = gCsCamEyeY = actor->obj.pos.y + 1400.0f; + player->camEye.z = gCsCamEyeZ = actor->obj.pos.z + 700.0f; - player->camAt.x = D_801779A0 = actor->obj.pos.x - 1000.0f; - player->camAt.y = D_801779B8 = actor->obj.pos.y; - player->camAt.z = D_801779C0 = actor->obj.pos.z; + player->camAt.x = gCsCamAtX = actor->obj.pos.x - 1000.0f; + player->camAt.y = gCsCamAtY = actor->obj.pos.y; + player->camAt.z = gCsCamAtZ = actor->obj.pos.z; D_80177A48[0] = 0.0f; D_80178340 = 255; @@ -872,12 +872,12 @@ void func_i4_8019BA64(Player* player) { case 3: D_80178340 = 0; - D_80177978 = -1250.0f; - D_80177980 = -395.0f; + gCsCamEyeX = -1250.0f; + gCsCamEyeY = -395.0f; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; Math_SmoothStepToF(D_80177A48, 0.05f, 1.0f, 0.0005f, 0.0f); @@ -905,10 +905,10 @@ void func_i4_8019BA64(Player* player) { } if (gCsFrameCount > 765) { - D_80177988 += 3.0f; + gCsCamEyeZ += 3.0f; Math_SmoothStepToF(D_80177A48, 0.9f, 1.0f, 0.07f, 0.0f); } else { - D_80177988 = 0.0f; + gCsCamEyeZ = 0.0f; } if (gCsFrameCount == 800) { @@ -1009,12 +1009,12 @@ void func_i4_8019BA64(Player* player) { player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0); } f32 D_i4_8019F61C[] = { -300.0f, 350.0f, -50.0f, 800.0f }; @@ -1134,13 +1134,13 @@ void func_i4_8019C85C(Player* player) { break; case 100: - D_80177978 = boss0->obj.pos.x; - D_80177980 = boss0->obj.pos.y; - D_80177988 = boss0->obj.pos.z + 4000.0f; + gCsCamEyeX = boss0->obj.pos.x; + gCsCamEyeY = boss0->obj.pos.y; + gCsCamEyeZ = boss0->obj.pos.z + 4000.0f; - D_801779A0 = boss0->obj.pos.x; - D_801779B8 = boss0->obj.pos.y; - D_801779C0 = boss0->obj.pos.z; + gCsCamAtX = boss0->obj.pos.x; + gCsCamAtY = boss0->obj.pos.y; + gCsCamAtZ = boss0->obj.pos.z; D_80177A48[0] = 1.0f; D_80161A44 = 30000.0f; @@ -1159,9 +1159,9 @@ void func_i4_8019C85C(Player* player) { player->unk_234 = 0; - D_80177978 = boss0->obj.pos.x; - D_80177980 = boss0->obj.pos.y; - D_80177988 = boss0->obj.pos.z + 4000.0f; + gCsCamEyeX = boss0->obj.pos.x; + gCsCamEyeY = boss0->obj.pos.y; + gCsCamEyeZ = boss0->obj.pos.z + 4000.0f; D_80177A48[0] = 1.0f; @@ -1207,9 +1207,9 @@ void func_i4_8019C85C(Player* player) { func_i4_8019C70C(); } - D_801779A0 = boss0->obj.pos.x; - D_801779B8 = boss0->obj.pos.y + (2.0f * D_8017847C); - D_801779C0 = boss0->obj.pos.z; + gCsCamAtX = boss0->obj.pos.x; + gCsCamAtY = boss0->obj.pos.y + (2.0f * D_8017847C); + gCsCamAtZ = boss0->obj.pos.z; if (player->timer_1F8 == 0) { player->unk_1D0 = 2; @@ -1247,12 +1247,12 @@ void func_i4_8019C85C(Player* player) { player->unk_4D8 = 0.0f; player->unk_0D0 = 40.0f; - D_80177978 = 0.0f - (200.0f * var_fv1); - D_80177980 = player->pos.y; - D_80177988 = player->pos.z + 12000.0f; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamEyeX = 0.0f - (200.0f * var_fv1); + gCsCamEyeY = player->pos.y; + gCsCamEyeZ = player->pos.z + 12000.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; if (gTeamShields[1] > 0) { func_i4_8019C574(actor1, 0); @@ -1270,9 +1270,9 @@ void func_i4_8019C85C(Player* player) { case 10: D_80178340 = D_80178358 = 0; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; if (gCsFrameCount == 1620) { player->unk_1D0 += 1; @@ -1323,14 +1323,14 @@ void func_i4_8019C85C(Player* player) { if (gCsFrameCount > 2550) { Math_SmoothStepToF(&D_80177A48[0], 0.1f, 1.0f, 0.005f, 0); } else { - D_80177978 = actor0->obj.pos.x - (800.0f * var_fv1) + dest.x; - D_80177980 = actor0->obj.pos.y + 550.0f + dest.y; - D_80177988 = actor0->obj.pos.z + 2430.0f + dest.z; + gCsCamEyeX = actor0->obj.pos.x - (800.0f * var_fv1) + dest.x; + gCsCamEyeY = actor0->obj.pos.y + 550.0f + dest.y; + gCsCamEyeZ = actor0->obj.pos.z + 2430.0f + dest.z; } - D_801779A0 = actor0->obj.pos.x - (800.0f * var_fv1); - D_801779B8 = actor0->obj.pos.y + 550.0f; - D_801779C0 = actor0->obj.pos.z + 2430.0f - 250.0f; + gCsCamAtX = actor0->obj.pos.x - (800.0f * var_fv1); + gCsCamAtY = actor0->obj.pos.y + 550.0f; + gCsCamAtZ = actor0->obj.pos.z + 2430.0f - 250.0f; if (gCsFrameCount == 2660) { func_8001DBD0(50); @@ -1549,12 +1549,12 @@ void func_i4_8019C85C(Player* player) { player->camEye.y += player->vel.y * 0.1f; player->camEye.z += player->vel.z * 0.1f; } else { - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0.0f); } player->unk_088 += 10.0f; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 3a45ec52..df95aead 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -5030,12 +5030,12 @@ void func_i5_801AC754(Player* player) { player->pos.x = 0.0f; player->pos.y = -3.0f; player->vel.z = -15.0f; - player->camEye.x = D_80177978 = -518.0f; - player->camEye.y = D_80177980 = 3882.5f; - player->camEye.z = D_80177988 = 200.0f; - player->camAt.x = D_801779A0 = -910.0f; - player->camAt.y = D_801779B8 = 42.0f; - player->camAt.z = D_801779C0 = -800.0f; + player->camEye.x = gCsCamEyeX = -518.0f; + player->camEye.y = gCsCamEyeY = 3882.5f; + player->camEye.z = gCsCamEyeZ = 200.0f; + player->camAt.x = gCsCamAtX = -910.0f; + player->camAt.y = gCsCamAtY = 42.0f; + player->camAt.z = gCsCamAtZ = -800.0f; player->unk_240 = 1; player->unk_1D0 = 2; D_80178348 = D_80178350 = D_80178354 = 255; @@ -5053,12 +5053,12 @@ void func_i5_801AC754(Player* player) { func_i5_801ACF6C(); } if (gCsFrameCount > 50) { - D_80177978 = zeroVar; - D_80177980 = 92.5f; - D_80177988 = 200.0f; - D_801779A0 = zeroVar; - D_801779B8 = 42.0f; - D_801779C0 = -800.0f; + gCsCamEyeX = zeroVar; + gCsCamEyeY = 92.5f; + gCsCamEyeZ = 200.0f; + gCsCamAtX = zeroVar; + gCsCamAtY = 42.0f; + gCsCamAtZ = -800.0f; D_80177A48[0] = 0.1f; D_80177A48[1] = 0.1f; D_80177A48[2] = 0.1f; @@ -5098,12 +5098,12 @@ void func_i5_801AC754(Player* player) { break; } player->unk_138 = player->pos.z += player->vel.z; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], sp4C, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[1], sp48, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[2], sp44, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], sp4C, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[1], sp48, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[2], sp44, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], sp4C, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[1], sp48, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[2], sp44, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], sp4C, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[1], sp48, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[2], sp44, 0); player->unk_0A0 = 0.0f; player->unk_0F4 += player->vel.z * 5.0f; player->unk_0F0 = SIN_DEG(player->unk_0F4) * 0.7f; @@ -5904,12 +5904,12 @@ void func_i5_801AF8F4(Player* player) { if (player->shields <= 0) { player->shields = 1; } - player->camEye.x = D_80177978 = gActors[D_i5_801BE318].obj.pos.x - 250.0f; - player->camEye.y = D_80177980 = gActors[D_i5_801BE318].obj.pos.y + 150.0f; - player->camEye.z = D_80177988 = gActors[D_i5_801BE318].obj.pos.z + D_80177D20 + 500.0f; - player->camAt.x = D_801779A0 = gActors[D_i5_801BE318].obj.pos.x; - player->camAt.y = D_801779B8 = gActors[D_i5_801BE318].obj.pos.y + 200.0f; - player->camAt.z = D_801779C0 = gActors[D_i5_801BE318].obj.pos.z + D_80177D20; + player->camEye.x = gCsCamEyeX = gActors[D_i5_801BE318].obj.pos.x - 250.0f; + player->camEye.y = gCsCamEyeY = gActors[D_i5_801BE318].obj.pos.y + 150.0f; + player->camEye.z = gCsCamEyeZ = gActors[D_i5_801BE318].obj.pos.z + D_80177D20 + 500.0f; + player->camAt.x = gCsCamAtX = gActors[D_i5_801BE318].obj.pos.x; + player->camAt.y = gCsCamAtY = gActors[D_i5_801BE318].obj.pos.y + 200.0f; + player->camAt.z = gCsCamAtZ = gActors[D_i5_801BE318].obj.pos.z + D_80177D20; player->pos.x = 500.0f; player->pos.y = -3.0f; D_i5_801BA1DC = 0.0f; @@ -5937,12 +5937,12 @@ void func_i5_801AF8F4(Player* player) { } player->unk_1D0++; - D_80177978 = -100.0f; - D_80177980 = 250.0f; - D_80177988 = 2090.0f; - D_801779A0 = -250.0f; - D_801779B8 = 10.0f; - D_801779C0 = -3210.0f; + gCsCamEyeX = -100.0f; + gCsCamEyeY = 250.0f; + gCsCamEyeZ = 2090.0f; + gCsCamAtX = -250.0f; + gCsCamAtY = 10.0f; + gCsCamAtZ = -3210.0f; player->camEye.x = -250.0f; player->camEye.y = 50.0f; player->camEye.z = 1580.0f; @@ -5992,7 +5992,7 @@ void func_i5_801AF8F4(Player* player) { case 3: player->vel.z = gActors[D_i5_801BE314].vel.z; if (gCsFrameCount == 252) { - D_80177980 = 570.0f; + gCsCamEyeY = 570.0f; player->timer_210 = 1000; player->unk_0B8 = 20000.0f; player->unk_118 = -23.0f; @@ -6007,10 +6007,10 @@ void func_i5_801AF8F4(Player* player) { D_80177CE8 += player->unk_140; player->pos.z = player->unk_138 = -(D_80177D20 + 210.0f); Math_SmoothStepToF(&D_80177A48[0], 1.0f, 0.1f, 0.00025f, 0.0f); - D_801779A0 = gActors[D_i5_801BE314].obj.pos.x + 2500.0f; - D_801779C0 = (gActors[D_i5_801BE314].obj.pos.z + D_80177D20) - 2000.0f; - D_80177978 = D_801779A0 - 2340.0f; - D_80177988 = D_801779C0 + 1410.0f; + gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x + 2500.0f; + gCsCamAtZ = (gActors[D_i5_801BE314].obj.pos.z + D_80177D20) - 2000.0f; + gCsCamEyeX = gCsCamAtX - 2340.0f; + gCsCamEyeZ = gCsCamAtZ + 1410.0f; } if (gCsFrameCount == 389) { player->unk_1D0++; @@ -6019,12 +6019,12 @@ void func_i5_801AF8F4(Player* player) { D_801779E4 = 0.0f; D_801779F4 = 0.0f; player->timer_210 = 0; - player->camEye.x = D_80177978 = 2750.0f; - player->camEye.y = D_80177980 = 50.0f; - player->camEye.z = D_80177988 = -620.0f; - player->camAt.x = D_801779A0 = -650.0f; - player->camAt.y = D_801779B8 = 30.0f; - player->camAt.z = D_801779C0 = 1900.0f; + player->camEye.x = gCsCamEyeX = 2750.0f; + player->camEye.y = gCsCamEyeY = 50.0f; + player->camEye.z = gCsCamEyeZ = -620.0f; + player->camAt.x = gCsCamAtX = -650.0f; + player->camAt.y = gCsCamAtY = 30.0f; + player->camAt.z = gCsCamAtZ = 1900.0f; player->unk_114 = 0.0f; D_i5_801BA1DC = -100.0f; func_8001A838(0x31078085); @@ -6049,12 +6049,12 @@ void func_i5_801AF8F4(Player* player) { D_80177A48[6] = 0.5f; D_80177A48[7] = 1560.0f; D_80177A48[8] = 2400.0f; - player->camAt.x = D_801779A0 = gActors[D_i5_801BE314].obj.pos.x; - player->camAt.z = D_801779C0 = (gActors[D_i5_801BE314].obj.pos.z + D_80177D20) - 2000.0f; - player->camEye.y = D_80177980 = 50.0f; - player->camAt.y = D_801779B8 = 10.0f; - player->camEye.x = D_80177978 = D_80177A48[7] + D_801779A0; - player->camEye.z = D_80177988 = D_80177A48[8] + D_801779C0; + player->camAt.x = gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x; + player->camAt.z = gCsCamAtZ = (gActors[D_i5_801BE314].obj.pos.z + D_80177D20) - 2000.0f; + player->camEye.y = gCsCamEyeY = 50.0f; + player->camAt.y = gCsCamAtY = 10.0f; + player->camEye.x = gCsCamEyeX = D_80177A48[7] + gCsCamAtX; + player->camEye.z = gCsCamEyeZ = D_80177A48[8] + gCsCamAtZ; player->unk_118 = -30.0f; player->unk_0B8 = 10014.0f; player->timer_210 = 1000; @@ -6071,17 +6071,17 @@ void func_i5_801AF8F4(Player* player) { Math_SmoothStepToF(&D_80177A48[6], 22.0f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&D_80177A48[7], 2600.0f, 0.1f, D_80177A48[6], 0.0f); Math_SmoothStepToF(&D_80177A48[8], 3800.0f, 0.1f, D_80177A48[6], 0.0f); - Math_SmoothStepToF(&D_80177980, 1300.0f, 0.1f, 17.0f, 0.0f); + Math_SmoothStepToF(&gCsCamEyeY, 1300.0f, 0.1f, 17.0f, 0.0f); } if (gCsFrameCount <= 505) { - D_801779C0 = gActors[D_i5_801BE314].obj.pos.z + D_80177D20 - 2000.0f; - D_801779A0 = gActors[D_i5_801BE314].obj.pos.x; + gCsCamAtZ = gActors[D_i5_801BE314].obj.pos.z + D_80177D20 - 2000.0f; + gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x; player->vel.z = gActors[D_i5_801BE314].vel.z; player->pos.x = gActors[D_i5_801BE314].obj.pos.x + 500.0f; player->pos.z = player->unk_138 = -(D_80177D20 + 210.0f); player->unk_140 = -gActors[D_i5_801BE314].vel.z; - D_80177978 = D_80177A48[7] + D_801779A0; - D_80177988 = D_80177A48[8] + D_801779C0; + gCsCamEyeX = D_80177A48[7] + gCsCamAtX; + gCsCamEyeZ = D_80177A48[8] + gCsCamAtZ; func_8007C120(gActors[D_i5_801BE314].obj.pos.x + 480.0f, gActors[D_i5_801BE314].obj.pos.y + 15.0f, gActors[D_i5_801BE314].obj.pos.z - 400.0f, gActors[D_i5_801BE314].vel.x, gActors[D_i5_801BE314].vel.y, 0.0f, 0.2f, 10); @@ -6093,9 +6093,9 @@ void func_i5_801AF8F4(Player* player) { gFogBlue -= 2; } Math_SmoothStepToF(&player->unk_140, 0.0f, 1.0f, 0.6f, 0.0f); - Math_SmoothStepToF(&D_801779A0, 11700.0f, 0.1f, 50.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtX, 11700.0f, 0.1f, 50.0f, 0.0f); Math_SmoothStepToF(&D_80177A48[5], 30.0f, 0.1f, 0.05f, 0.0f); - Math_SmoothStepToF(&D_801779B8, 1600.0f, 0.1f, D_80177A48[5], 0.0f); + Math_SmoothStepToF(&gCsCamAtY, 1600.0f, 0.1f, D_80177A48[5], 0.0f); if (player->unk_140 >= 2.5f) { player->pos.x = gActors[D_i5_801BE314].obj.pos.x + 500.0f; player->pos.z = player->unk_138 = -(D_80177D20 + 210.0f); @@ -6272,11 +6272,11 @@ void func_i5_801AF8F4(Player* player) { D_8017835C = 8; D_80177A48[0] = 0.0f; player->unk_234 = 1; - player->camAt.x = D_801779A0 = player->camEye.x = D_80177978 = player->pos.x; - player->camAt.y = D_801779B8 = player->pos.y + 70.0f; - player->camEye.y = D_80177980 = player->pos.y + 30.0f; - player->camEye.z = D_80177988 = (player->unk_138 + D_80177D20) - 300.0f; - player->camAt.z = D_801779C0 = player->unk_138 + D_80177D20; + player->camAt.x = gCsCamAtX = player->camEye.x = gCsCamEyeX = player->pos.x; + player->camAt.y = gCsCamAtY = player->pos.y + 70.0f; + player->camEye.y = gCsCamEyeY = player->pos.y + 30.0f; + player->camEye.z = gCsCamEyeZ = (player->unk_138 + D_80177D20) - 300.0f; + player->camAt.z = gCsCamAtZ = player->unk_138 + D_80177D20; player->unk_198 = player->timer_210 = 0; player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->unk_118 = player->unk_114 = player->unk_4D8 = player->unk_034 = player->unk_174 = player->unk_178 = @@ -6311,17 +6311,17 @@ void func_i5_801AF8F4(Player* player) { spE4.y = 0.0f; spE4.z = -300.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spE4, &spD8); - D_80177978 = player->pos.x + spD8.x; - D_80177988 = player->pos.z + D_80177D20 + spD8.z; + gCsCamEyeX = player->pos.x + spD8.x; + gCsCamEyeZ = player->pos.z + D_80177D20 + spD8.z; } if (gCsFrameCount >= 2120) { Math_SmoothStepToF(&D_80177A48[0], 1.0f, 1.0f, 0.001f, 0.0f); Math_SmoothStepToF(&D_80177A48[8], 20.0f, 0.1f, 0.1f, 0.0f); - Math_SmoothStepToF(&D_80177978, player->pos.x - 2000.0f, 0.1f, D_80177A48[8], 0.0f); - D_80177988 -= 1.0f; + Math_SmoothStepToF(&gCsCamEyeX, player->pos.x - 2000.0f, 0.1f, D_80177A48[8], 0.0f); + gCsCamEyeZ -= 1.0f; } if ((gCsFrameCount >= 2120) || (gCsFrameCount < 2175)) { - Math_SmoothStepToF(&D_801779B8, player->pos.y + 70.0f, 0.1f, 8.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtY, player->pos.y + 70.0f, 0.1f, 8.0f, 0.0f); } if (gCsFrameCount == 2120) { D_80177A48[0] = 0.0f; @@ -6344,10 +6344,10 @@ void func_i5_801AF8F4(Player* player) { func_800444BC(player); func_800ADF58(player); if (gCsFrameCount >= 2175) { - Math_SmoothStepToF(&D_801779C0, gActors[3].obj.pos.z + D_80177D20 - 300.0f, 0.1f, 20.0f, 0.0f); - Math_SmoothStepToF(&D_801779B8, gActors[3].obj.pos.y + 100.0f, 0.1f, 10.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtZ, gActors[3].obj.pos.z + D_80177D20 - 300.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtY, gActors[3].obj.pos.y + 100.0f, 0.1f, 10.0f, 0.0f); } else { - player->camAt.z = D_801779C0 = player->unk_138 + D_80177D20; + player->camAt.z = gCsCamAtZ = player->unk_138 + D_80177D20; } Math_SmoothStepToF(&player->pos.y, 260.0f, 0.1f, D_80177A48[7], 0.0f); break; @@ -6499,12 +6499,12 @@ void func_i5_801AF8F4(Player* player) { } else { Math_SmoothStepToF(&player->unk_114, 0.0f, 0.03f, 0.5f, 0.0001f); } - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 20000.0f, 0); player->camAt.y += zeroVar; if (player->unk_1D0 >= 6) { player->camEye.y += D_8017847C * 10.0f; @@ -6824,9 +6824,9 @@ void func_i5_801B38E0(void) { void func_i5_801B3D04(Player* player) { f32 zeroVar = 0.0f; - D_80177978 = player->pos.x; - D_80177980 = player->pos.y; - D_80177988 = player->pos.z + player->unk_144 + 50.0f; + gCsCamEyeX = player->pos.x; + gCsCamEyeY = player->pos.y; + gCsCamEyeZ = player->pos.z + player->unk_144 + 50.0f; switch (player->unk_1D0) { case 0: gCsFrameCount = gBossActive = D_80178488 = 1; @@ -6849,15 +6849,15 @@ void func_i5_801B3D04(Player* player) { Math_SmoothStepToF(D_80177A48, 0.1f, 1.0f, 0.01f, 0.0f); Math_SmoothStepToF(&player->unk_0D0, 4.9f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 1.0f, 0.0f); - D_80177978 = player->pos.x; - D_80177980 = player->pos.y; - D_80177988 = player->pos.z + player->unk_144 + 50.0f; - if (D_80177980 < 5.0f) { - D_80177980 = 5.0f; + gCsCamEyeX = player->pos.x; + gCsCamEyeY = player->pos.y; + gCsCamEyeZ = player->pos.z + player->unk_144 + 50.0f; + if (gCsCamEyeY < 5.0f) { + gCsCamEyeY = 5.0f; } - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y + 30.0f; - D_801779C0 = player->pos.z + player->unk_144; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y + 30.0f; + gCsCamAtZ = player->pos.z + player->unk_144; D_80178348 = 255; D_80178350 = 255; D_80178354 = 255; @@ -6869,12 +6869,12 @@ void func_i5_801B3D04(Player* player) { D_80178340 = D_80178358 = D_80177A10[9]; if (gCsFrameCount >= 41) { D_80177A10[9] = 255; - player->camEye.x = D_80177978 = 0.0f; - player->camEye.y = D_80177980 = 21.182106f; - player->camEye.z = D_80177988 = -112.08748f; - player->camAt.x = D_801779A0 = 0.0f; - player->camAt.y = D_801779B8 = 22.873417f; - player->camAt.z = D_801779C0 = -283.55914f; + player->camEye.x = gCsCamEyeX = 0.0f; + player->camEye.y = gCsCamEyeY = 21.182106f; + player->camEye.z = gCsCamEyeZ = -112.08748f; + player->camAt.x = gCsCamAtX = 0.0f; + player->camAt.y = gCsCamAtY = 22.873417f; + player->camAt.z = gCsCamAtZ = -283.55914f; player->unk_1D0++; player->pos.x = 0.0f; player->pos.y = -3.0f; @@ -6890,11 +6890,11 @@ void func_i5_801B3D04(Player* player) { break; case 2: Math_SmoothStepToF(D_80177A48, 0.01f, 0.1f, 0.01f, 0.0f); - D_80177978 = D_801779A0 = player->pos.x; - D_80177980 = 3520.0f; - D_801779B8 = 0.0f; - D_80177988 = 350.0f; - D_801779C0 = -300.0f; + gCsCamEyeX = gCsCamAtX = player->pos.x; + gCsCamEyeY = 3520.0f; + gCsCamAtY = 0.0f; + gCsCamEyeZ = 350.0f; + gCsCamAtZ = -300.0f; D_i5_801BE240 = 2.0f; D_i5_801BE244 = 2.0f; D_i5_801BE248 = 2.0f; @@ -6920,16 +6920,16 @@ void func_i5_801B3D04(Player* player) { /* fallthrough */ case 11: Math_SmoothStepToF(D_80177A48, 0.01f, 0.1f, 0.01f, 0.0f); - D_80177978 = D_801779A0 = player->pos.x; - D_80177980 = 3520.0f; - D_801779B8 = 0.0f; - D_80177988 = 350.0f; + gCsCamEyeX = gCsCamAtX = player->pos.x; + gCsCamEyeY = 3520.0f; + gCsCamAtY = 0.0f; + gCsCamEyeZ = 350.0f; if (gCsFrameCount < 1265) { - D_801779C0 = -300.0f; + gCsCamAtZ = -300.0f; } else { D_i5_801BE248 = 20.0f; - D_80177988 = 1000.0f; - D_801779C0 = -50000.0f; + gCsCamEyeZ = 1000.0f; + gCsCamAtZ = -50000.0f; } if (gCsFrameCount < 270) { D_i5_801BE244 = 1.0f; @@ -7060,12 +7060,12 @@ void func_i5_801B3D04(Player* player) { D_80178488 = 0; break; } - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], D_i5_801BE240, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], D_i5_801BE244, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], D_i5_801BE248, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], D_i5_801BE240, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], D_i5_801BE244, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], D_i5_801BE248, 0.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], D_i5_801BE240, 0.0f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], D_i5_801BE244, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], D_i5_801BE248, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], D_i5_801BE240, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], D_i5_801BE244, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], D_i5_801BE248, 0.0f); player->camAt.y += zeroVar; if ((gCsFrameCount >= 850) && !(gGameFrameCount & 0xF)) { diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 33914531..10106c3b 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -66,13 +66,13 @@ void func_i5_8018769C(Player* player) { player->pos.y = actor->obj.pos.y - 530.0f; player->pos.z = actor->obj.pos.z; - player->camEye.x = D_80177978 = 5000.0f; - player->camEye.y = D_80177980 = 1000.0f; - player->camEye.z = D_80177988 = -5000.0f; + player->camEye.x = gCsCamEyeX = 5000.0f; + player->camEye.y = gCsCamEyeY = 1000.0f; + player->camEye.z = gCsCamEyeZ = -5000.0f; - player->camAt.x = D_801779A0 = player->pos.x; - player->camAt.y = D_801779B8 = player->pos.y; - player->camAt.z = D_801779C0 = player->pos.z; + player->camAt.x = gCsCamAtX = player->pos.x; + player->camAt.y = gCsCamAtY = player->pos.y; + player->camAt.z = gCsCamAtZ = player->pos.z; player->unk_240 = 1; player->unk_1D0 = 1; @@ -83,9 +83,9 @@ void func_i5_8018769C(Player* player) { case 1: D_80177A48[0] = 0.01f; sp64 = 20.0f; - D_80177978 = actor->obj.pos.x - 500.0f; - D_80177980 = actor->obj.pos.y - 500.0f; - D_80177988 = actor->obj.pos.z - 750.0f; + gCsCamEyeX = actor->obj.pos.x - 500.0f; + gCsCamEyeY = actor->obj.pos.y - 500.0f; + gCsCamEyeZ = actor->obj.pos.z - 750.0f; if (gCsFrameCount == 330) { Radio_PlayMessage(gMsg_ID_4113, RCID_FOX); @@ -96,16 +96,16 @@ void func_i5_8018769C(Player* player) { player->timer_1F8 = 10; Audio_PlaySfx(0x09000002U, player->sfxPos, 0U, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; break; case 2: Math_SmoothStepToF(&player->vel.z, -10.0f, 1.0f, 1.0f, 0.0f); - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; if (player->timer_1F8 == 1) { player->unk_0D4 = 1.0f; @@ -141,9 +141,9 @@ void func_i5_8018769C(Player* player) { player->pos.y = 2000.0f; player->vel.z = 0.0f; - player->camAt.x = D_801779A0 = player->pos.x; - player->camAt.y = D_801779B8 = player->pos.y; - player->camAt.z = D_801779C0 = player->pos.z; + player->camAt.x = gCsCamAtX = player->pos.x; + player->camAt.y = gCsCamAtY = player->pos.y; + player->camAt.z = gCsCamAtZ = player->pos.z; gPlayer[0].unk_19C = 1; @@ -166,14 +166,14 @@ void func_i5_8018769C(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp54, &sp48); - D_80177978 = sp48.x; + gCsCamEyeX = sp48.x; player->camEye.x = sp48.x; - D_80177980 = sp48.y; + gCsCamEyeY = sp48.y; player->camEye.y = sp48.y; - player->camEye.z = D_80177988 = player->pos.z + player->unk_144 + sp48.z; + player->camEye.z = gCsCamEyeZ = player->pos.z + player->unk_144 + sp48.z; } break; @@ -187,14 +187,14 @@ void func_i5_8018769C(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp54, &sp48); - D_80177978 = sp48.x; - D_80177980 = sp48.y; - D_80177988 = player->pos.z + player->unk_144 + sp48.z; - D_801779A0 = player->pos.x; + gCsCamEyeX = sp48.x; + gCsCamEyeY = sp48.y; + gCsCamEyeZ = player->pos.z + player->unk_144 + sp48.z; + gCsCamAtX = player->pos.x; - player->camAt.x = D_801779A0; - player->camAt.y = D_801779B8 = player->pos.y; - player->camAt.z = D_801779C0 = player->pos.z + player->unk_144; + player->camAt.x = gCsCamAtX; + player->camAt.y = gCsCamAtY = player->pos.y; + player->camAt.z = gCsCamAtZ = player->pos.z + player->unk_144; Math_SmoothStepToF(&player->pos.y, D_80177A48[1], 0.1f, 50.0f, 0.0f); @@ -239,12 +239,12 @@ void func_i5_8018769C(Player* player) { player->pos.z += player->vel.z; player->unk_138 = player->pos.z; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], sp64, 0.00f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], sp64, 0.00f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], sp64, 0.00f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], sp64, 0.00f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], sp64, 0.00f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], sp64, 0.00f); } void func_i5_80188108(Actor* actor, s32 arg1) { @@ -337,17 +337,17 @@ void func_i5_801882CC(Player* player) { Matrix_MultVec3f(gCalcMatrix, &src, &dest); - D_80177978 = player->pos.x + dest.x; - D_80177980 = player->pos.y + dest.y; - D_80177988 = player->pos.z + player->unk_144 + dest.z + 50.0f; + gCsCamEyeX = player->pos.x + dest.x; + gCsCamEyeY = player->pos.y + dest.y; + gCsCamEyeZ = player->pos.z + player->unk_144 + dest.z + 50.0f; - if (D_80177980 < 5.0f) { - D_80177980 = 5.0f; + if (gCsCamEyeY < 5.0f) { + gCsCamEyeY = 5.0f; } - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y + 30.0f; - D_801779C0 = player->pos.z + player->unk_144; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y + 30.0f; + gCsCamAtZ = player->pos.z + player->unk_144; func_80045130(player); func_80044868(player); @@ -374,12 +374,12 @@ void func_i5_801882CC(Player* player) { case 2: Math_SmoothStepToF(D_80177A48, 0.1f, 1.0f, 0.01f, 0.0f); - D_80177978 -= 2.5f; - D_80177988 -= 1.0f; + gCsCamEyeX -= 2.5f; + gCsCamEyeZ -= 1.0f; - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y + 30.0f; - D_801779C0 = player->pos.z + player->unk_144; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y + 30.0f; + gCsCamAtZ = player->pos.z + player->unk_144; if (player->pos.y < 100.0f) { camAtY = SIN_DEG(gGameFrameCount * 130.0f) * 3.0f; @@ -503,12 +503,12 @@ void func_i5_801882CC(Player* player) { break; } - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 20000.0f, 0.00f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 20000.0f, 0.00f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 20000.0f, 0.00f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 20000.0f, 0.00f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 20000.0f, 0.00f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 20000.0f, 0.00f); player->camAt.y += camAtY; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index af89113c..0fdd8b8c 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -666,9 +666,9 @@ void func_i6_80189470(Actor* actor) { player->camEye.x = 1200.0f; player->camEye.z = 1200.0f; player->camEye.y = 1800.0f; - D_801779A0 = 0.0f; - D_801779B8 = 620.0f; - D_801779C0 = 0.0f; + gCsCamAtX = 0.0f; + gCsCamAtY = 620.0f; + gCsCamAtZ = 0.0f; player->unk_234 = 0; player->unk_034 = 0.0f; D_80177A48[0] = 1.0f; @@ -3584,9 +3584,9 @@ void func_i6_80193C4C(Player* player) { gCsFrameCount = 0; break; } - D_801779A0 = gBosses[0].obj.pos.x; - D_801779B8 = gBosses[0].obj.pos.y; - D_801779C0 = gBosses[0].obj.pos.z + D_80177D20; + gCsCamAtX = gBosses[0].obj.pos.x; + gCsCamAtY = gBosses[0].obj.pos.y; + gCsCamAtZ = gBosses[0].obj.pos.z + D_80177D20; Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); break; case 2: @@ -3643,9 +3643,9 @@ void func_i6_80193C4C(Player* player) { Math_SmoothStepToF(&player->camEye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->unk_0EC, -180.0f, 0.02f, D_80177A48[6], 0.0f); Math_SmoothStepToF(&D_80177A48[6], 3.0f, 1.0f, 0.05f, 0.0f); - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->unk_138 + D_80177D20; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->unk_138 + D_80177D20; if (gCsFrameCount > 200) { player->unk_25C += 0.03f; if (player->unk_25C > 0.6f) { @@ -3687,9 +3687,9 @@ void func_i6_80193C4C(Player* player) { player->camEye.x = 1200.0f; player->camEye.z = 1200.0f; player->camEye.y = 1800.0f; - D_801779A0 = 0.0f; - D_801779B8 = 620.0f; - D_801779C0 = 0.0f; + gCsCamAtX = 0.0f; + gCsCamAtY = 620.0f; + gCsCamAtZ = 0.0f; player->unk_034 = 0.0f; player->unk_234 = 0; D_80177A48[0] = 1.0f; @@ -3734,13 +3734,13 @@ void func_i6_80193C4C(Player* player) { boss->obj.pos.z + RAND_FLOAT_CENTERED(150.0f), RAND_FLOAT_CENTERED(10.0f), 60.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.5f) + 5.5f); } - Math_SmoothStepToF(&D_801779B8, gActors[10].obj.pos.y, 1.0f, D_80177A48[1], 0.0f); + Math_SmoothStepToF(&gCsCamAtY, gActors[10].obj.pos.y, 1.0f, D_80177A48[1], 0.0f); Math_SmoothStepToF(&D_80177A48[1], 1000.0f, 1.0f, 5.0f, 0.0f); } else { Math_SmoothStepToF(&player->camEye.z, 1640.0f, 0.05f, 50.0f, 0.0f); Math_SmoothStepToF(&player->camEye.y, 110.0f, 0.05f, 50.0f, 0.0f); Math_SmoothStepToF(&player->camEye.x, 0.0f, 0.05f, 50.0f, 0.0f); - Math_SmoothStepToF(&D_801779B8, 630.0f, 0.05f, 50.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtY, 630.0f, 0.05f, 50.0f, 0.0f); } if (gCsFrameCount == 70) { @@ -3792,9 +3792,9 @@ void func_i6_80193C4C(Player* player) { player->camEye.x = gActors[10].obj.pos.x + 50.0f; player->camEye.y = gActors[10].obj.pos.y + D_80177A48[1]; player->camEye.z = gActors[10].obj.pos.z; - D_801779A0 = gActors[10].obj.pos.x; - D_801779B8 = gActors[10].obj.pos.y + 50.0f; - D_801779C0 = gActors[10].obj.pos.z; + gCsCamAtX = gActors[10].obj.pos.x; + gCsCamAtY = gActors[10].obj.pos.y + 50.0f; + gCsCamAtZ = gActors[10].obj.pos.z; if (!(gGameFrameCount & 3) && (gCsFrameCount < 215)) { func_8007797C(boss->obj.pos.x + RAND_FLOAT_CENTERED(350.0f), boss->obj.pos.y + 500.0f, boss->obj.pos.z + RAND_FLOAT_CENTERED(350.0f), RAND_FLOAT_CENTERED(10.0f), 60.0f, @@ -3833,12 +3833,12 @@ void func_i6_80193C4C(Player* player) { D_80177A48[2] = 0.0f; D_80177A48[3] = 0.0f; D_80177A48[4] = 0.0f; - player->camEye.x = D_80177978 = 100.0f; - player->camEye.y = D_80177980 = 14800.0f; - player->camEye.z = D_80177988 = -1500.0f; - D_801779A0 = 0.0f; - D_801779B8 = 15000.0f; - D_801779C0 = 0; + player->camEye.x = gCsCamEyeX = 100.0f; + player->camEye.y = gCsCamEyeY = 14800.0f; + player->camEye.z = gCsCamEyeZ = -1500.0f; + gCsCamAtX = 0.0f; + gCsCamAtY = 15000.0f; + gCsCamAtZ = 0; player->unk_034 = 0.0f; gActors[10].state = 101; gActors[10].fwork[0] = 0.0f; @@ -3860,11 +3860,11 @@ void func_i6_80193C4C(Player* player) { } if (D_800D2F68 != 0) { if (gCsFrameCount >= 1000) { - D_801779A0 += D_80177A48[4] * 0.15f; - D_80177988 += D_80177A48[4]; + gCsCamAtX += D_80177A48[4] * 0.15f; + gCsCamEyeZ += D_80177A48[4]; Math_SmoothStepToF(&D_80177A48[4], 20.0f, 1.0f, 0.1f, 0.0f); } else { - D_80177988 = gActors[10].obj.pos.z - 20.0f; + gCsCamEyeZ = gActors[10].obj.pos.z - 20.0f; } if ((gCsFrameCount >= 920) && (gTeamShields[3] > 0)) { if (gCsFrameCount == 920) { @@ -3914,16 +3914,16 @@ void func_i6_80193C4C(Player* player) { Math_SmoothStepToF(&D_80177A48[1], 10.0f, 1.0f, 0.1f, 0.0f); Math_SmoothStepToF(&player->camEye.x, gActors[10].obj.pos.x - 50.0f, D_80177A48[0], D_80177A48[1], 0); Math_SmoothStepToF(&player->camEye.y, gActors[10].obj.pos.y + 10.0f, D_80177A48[0], D_80177A48[1], 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], D_80177A48[1], 0); - D_801779B8 = SIN_DEG(gGameFrameCount * 5.5f) + 15000.0f; + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], D_80177A48[1], 0); + gCsCamAtY = SIN_DEG(gGameFrameCount * 5.5f) + 15000.0f; } else { - D_80177978 -= 1.0f; - D_80177980 += 0.3f; - D_80177988 += 4.0f; - D_801779B8 = (SIN_DEG(gGameFrameCount * 1.5f) * 10.0f) + 15000.0f; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0); + gCsCamEyeX -= 1.0f; + gCsCamEyeY += 0.3f; + gCsCamEyeZ += 4.0f; + gCsCamAtY = (SIN_DEG(gGameFrameCount * 1.5f) * 10.0f) + 15000.0f; + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0); } if (D_800D2F68 != 0) { switch (gCsFrameCount) { @@ -4015,20 +4015,20 @@ void func_i6_80193C4C(Player* player) { D_80161A44 = 12800.0f; } D_80177A48[0] = 1.0f; - D_801779A0 = (2.0f * SIN_DEG(gGameFrameCount * 40.0f)) + player->pos.x; - D_801779B8 = (2.0f * SIN_DEG(gGameFrameCount * 30.0f)) + player->pos.y; - D_801779C0 = (2.0f * SIN_DEG(gGameFrameCount * 50.0f)) + player->pos.z; + gCsCamAtX = (2.0f * SIN_DEG(gGameFrameCount * 40.0f)) + player->pos.x; + gCsCamAtY = (2.0f * SIN_DEG(gGameFrameCount * 30.0f)) + player->pos.y; + gCsCamAtZ = (2.0f * SIN_DEG(gGameFrameCount * 50.0f)) + player->pos.z; sp74.x = 0.0f; sp74.y = 0.0f; sp74.z = D_80177A48[5]; Math_SmoothStepToF(&D_80177A48[5], -400.0f, 0.05f, 5.0f, 0.0f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); - D_80177978 = player->pos.x + sp68.x; - D_80177980 = player->pos.y + sp68.y; - D_80177988 = player->pos.z + sp68.z; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0); + gCsCamEyeX = player->pos.x + sp68.x; + gCsCamEyeY = player->pos.y + sp68.y; + gCsCamEyeZ = player->pos.z + sp68.z; + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 0.7f, 0.0f); Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 0.4f, 0.0f); break; @@ -4040,9 +4040,9 @@ void func_i6_80193C4C(Player* player) { player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0); } void func_i6_80195E44(Actor* actor) { diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index d2e5af11..602f114c 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -453,12 +453,12 @@ void func_i6_80198F5C(Boss* boss) { vec.y = 0.0f; vec.z = 900.0f; Matrix_MultVec3f(gCalcMatrix, &vec, &sp48); - D_80177978 = boss->obj.pos.x + sp48.x; - D_80177980 = boss->obj.pos.y + 400.0f; - D_80177988 = boss->obj.pos.z + sp48.z; - D_801779A0 = boss->obj.pos.x; - D_801779B8 = boss->obj.pos.y; - D_801779C0 = boss->obj.pos.z; + gCsCamEyeX = boss->obj.pos.x + sp48.x; + gCsCamEyeY = boss->obj.pos.y + 400.0f; + gCsCamEyeZ = boss->obj.pos.z + sp48.z; + gCsCamAtX = boss->obj.pos.x; + gCsCamAtY = boss->obj.pos.y; + gCsCamAtZ = boss->obj.pos.z; D_80177A48[0] = 0.1f; if (Rand_ZeroOne() > 0.5f) { D_80177A48[9] = -3.0f; @@ -506,8 +506,8 @@ void func_i6_80199438(Boss* boss) { vec.y = 0.0f; vec.z = 900.0f; Matrix_MultVec3f(gCalcMatrix, &vec, &sp68); - D_80177978 = boss->obj.pos.x + sp68.x; - D_80177988 = boss->obj.pos.z + sp68.z; + gCsCamEyeX = boss->obj.pos.x + sp68.x; + gCsCamEyeZ = boss->obj.pos.z + sp68.z; if ((boss->timer_058 == 40) && gBosses[1].obj.status == OBJ_FREE && gBosses[2].obj.status == OBJ_FREE) { Radio_PlayMessage(gMsg_ID_14360, RCID_BOSS_SECTORY); } @@ -537,12 +537,12 @@ void func_i6_80199438(Boss* boss) { } } } - Math_SmoothStepToF(&gPlayer[0].camEye.x, D_80177978, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&gPlayer[0].camEye.y, D_80177980, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&gPlayer[0].camEye.z, D_80177988, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&gPlayer[0].camAt.x, D_801779A0, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&gPlayer[0].camAt.y, D_801779B8, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&gPlayer[0].camAt.z, D_801779C0, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].camEye.x, gCsCamEyeX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].camEye.y, gCsCamEyeY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].camEye.z, gCsCamEyeZ, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].camAt.x, gCsCamAtX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].camAt.y, gCsCamAtY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].camAt.z, gCsCamAtZ, D_80177A48[0], 20000.0f, 0); } if (!(gGameFrameCount & 3) && (boss->swork[36] == 0)) { func_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, boss->vel.z, @@ -1951,12 +1951,12 @@ void func_i6_8019EE60(Player* player) { sp60.y = 0.0f; sp60.z = 1400.0f; Matrix_MultVec3f(gCalcMatrix, &sp60, &sp54); - D_80177978 = boss->obj.pos.x + sp54.x; - D_80177980 = boss->obj.pos.y + 400.0f; - D_80177988 = boss->obj.pos.z + sp54.z; - D_801779A0 = boss->obj.pos.x; - D_801779B8 = boss->obj.pos.y; - D_801779C0 = boss->obj.pos.z; + gCsCamEyeX = boss->obj.pos.x + sp54.x; + gCsCamEyeY = boss->obj.pos.y + 400.0f; + gCsCamEyeZ = boss->obj.pos.z + sp54.z; + gCsCamAtX = boss->obj.pos.x; + gCsCamAtY = boss->obj.pos.y; + gCsCamAtZ = boss->obj.pos.z; for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].unk_0B6 == 0) { @@ -1989,8 +1989,8 @@ void func_i6_8019EE60(Player* player) { sp60.y = 0.0f; sp60.z = 1400.0f; Matrix_MultVec3f(gCalcMatrix, &sp60, &sp54); - D_80177978 = boss->obj.pos.x + sp54.x; - D_80177988 = boss->obj.pos.z + sp54.z; + gCsCamEyeX = boss->obj.pos.x + sp54.x; + gCsCamEyeZ = boss->obj.pos.z + sp54.z; } temp_ft1 = Math_SmoothStepToAngle(&player->unk_0E8, 283.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->unk_0EC, temp_ft1 * 20.0f, 0.1f, 1.0f, 0); @@ -2080,12 +2080,12 @@ void func_i6_8019EE60(Player* player) { } else { Math_SmoothStepToF(&D_80177A48[8], 350.0f, 0.1f, 0.7f, 0.0f); } - D_80177978 = sp54.x; - D_80177980 = D_80177A48[9]; - D_80177988 = 295.0f + sp54.z; - D_801779A0 = 0.0f; - D_801779B8 = 3500.0f; - D_801779C0 = D_80177A48[7] + player->pos.z; + gCsCamEyeX = sp54.x; + gCsCamEyeY = D_80177A48[9]; + gCsCamEyeZ = 295.0f + sp54.z; + gCsCamAtX = 0.0f; + gCsCamAtY = 3500.0f; + gCsCamAtZ = D_80177A48[7] + player->pos.z; if (gCsFrameCount > 1440) { player->unk_0D0 += 2.0f; player->unk_0E4 += 0.1f; @@ -2219,12 +2219,12 @@ void func_i6_8019EE60(Player* player) { player->pos.z += player->vel.z; player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC; - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 50000.0f, 0.0f); player->unk_088 += 10.0f; player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; player->unk_0F4 += 8.0f; @@ -2478,12 +2478,12 @@ void func_i6_801A0AC0(Player* player) { func_i6_801A0510(&gActors[i + 5], i); } player->unk_1D0 = 1; - player->camEye.x = D_80177978 = -2000.0f; - player->camEye.y = D_80177980 = 0.0f; - player->camEye.z = D_80177988 = -1700.0f; - player->camAt.x = D_801779A0 = gActors[8].obj.pos.x; - player->camAt.y = D_801779B8 = gActors[8].obj.pos.y; - player->camAt.z = D_801779C0 = gActors[8].obj.pos.z; + player->camEye.x = gCsCamEyeX = -2000.0f; + player->camEye.y = gCsCamEyeY = 0.0f; + player->camEye.z = gCsCamEyeZ = -1700.0f; + player->camAt.x = gCsCamAtX = gActors[8].obj.pos.x; + player->camAt.y = gCsCamAtY = gActors[8].obj.pos.y; + player->camAt.z = gCsCamAtZ = gActors[8].obj.pos.z; D_80177A48[0] = 0.0f; player->pos.y = 5000.0f; player->unk_034 = 0.0f; @@ -2543,9 +2543,9 @@ void func_i6_801A0AC0(Player* player) { } if (gCsFrameCount >= 100) { - D_801779A0 = gActors[5].obj.pos.x; - D_801779B8 = 0.0f; - D_801779C0 = gActors[5].obj.pos.z; + gCsCamAtX = gActors[5].obj.pos.x; + gCsCamAtY = 0.0f; + gCsCamAtZ = gActors[5].obj.pos.z; Math_SmoothStepToF(D_80177A48, 1.0f, 1.0f, 0.005f, 0.0f); gActors[5].vel.x = gActors[6].vel.x = gActors[7].vel.x = 80.0f; } @@ -2712,12 +2712,12 @@ void func_i6_801A0AC0(Player* player) { D_80178358 = 0; Object_Kill(&gActors[8].obj, gActors[8].sfxPos); player->unk_1D0++; - player->camEye.x = D_80177978 = 0.0f; - player->camEye.y = D_80177980 = 0.0f; - player->camEye.z = D_80177988 = 0.0f; - player->camAt.x = D_801779A0 = -5600.0f; - player->camAt.y = D_801779B8 = 0.0f; - player->camAt.z = D_801779C0 = 0.0f; + player->camEye.x = gCsCamEyeX = 0.0f; + player->camEye.y = gCsCamEyeY = 0.0f; + player->camEye.z = gCsCamEyeZ = 0.0f; + player->camAt.x = gCsCamAtX = -5600.0f; + player->camAt.y = gCsCamAtY = 0.0f; + player->camAt.z = gCsCamAtZ = 0.0f; gActors[5].obj.pos.x = -4800.0f; gActors[5].obj.pos.y = 0.0f; gActors[5].obj.pos.z = 0.0f; @@ -2752,15 +2752,15 @@ void func_i6_801A0AC0(Player* player) { Math_SmoothStepToF(&D_80177A48[2], 2.0f, 0.1f, 0.05f, 0); Math_SmoothStepToF(&D_80177A48[3], 100.0f, 1.0f, 1.0f, 0); Math_SmoothStepToF(&D_80177A48[4], 400.0f, 1.0f, 10.0f, 0); - D_801779A0 = player->camAt.x = gActors[5].obj.pos.x; + gCsCamAtX = player->camAt.x = gActors[5].obj.pos.x; Matrix_RotateY(gCalcMatrix, D_80177A48[1] * M_DTOR, 0); spA4.x = D_80177A48[4] + 400.0f; spA4.y = 0.0f; spA4.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA4, &sp98); - player->camEye.x = D_80177978 = sp98.x; - player->camEye.y = D_80177980 = D_80177A48[3] + sp98.y; - player->camEye.z = D_80177988 = sp98.z; + player->camEye.x = gCsCamEyeX = sp98.x; + player->camEye.y = gCsCamEyeY = D_80177A48[3] + sp98.y; + player->camEye.z = gCsCamEyeZ = sp98.z; } if (gCsFrameCount == 280) { gActors[5].iwork[4] = gActors[6].iwork[4] = gActors[7].iwork[4] = 1; @@ -2899,16 +2899,16 @@ void func_i6_801A0AC0(Player* player) { Math_SmoothStepToF(&D_80177A48[3], 100.0f, 1.0f, 1.0f, 0); Math_SmoothStepToF(&D_80177A48[4], 400.0f, 1.0f, 10.0f, 0); if (gCsFrameCount <= 410) { - D_801779A0 = player->camAt.x = gActors[5].obj.pos.x; + gCsCamAtX = player->camAt.x = gActors[5].obj.pos.x; } Matrix_RotateY(gCalcMatrix, D_80177A48[1] * M_DTOR, 0); spA4.x = D_80177A48[4] + 400.0f; spA4.y = 0.0f; spA4.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA4, &sp98); - player->camEye.x = D_80177978 = sp98.x; - player->camEye.y = D_80177980 = D_80177A48[3] + sp98.y; - player->camEye.z = D_80177988 = sp98.z; + player->camEye.x = gCsCamEyeX = sp98.x; + player->camEye.y = gCsCamEyeY = D_80177A48[3] + sp98.y; + player->camEye.z = gCsCamEyeZ = sp98.z; } if (gCsFrameCount >= 390) { if (gActors[6].iwork[4] != 0) { @@ -2991,11 +2991,11 @@ void func_i6_801A0AC0(Player* player) { Math_SmoothStepToF(&gActors[5].vel.z, -10.0f, 1.0f, 1.0f, 1.0f); } if (gCsFrameCount >= 520) { - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->pos.z; - D_80177978 = 50.0f; - D_80177980 = 10.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->pos.z; + gCsCamEyeX = 50.0f; + gCsCamEyeY = 10.0f; Math_SmoothStepToF(D_80177A48, 1.0f, 0.1f, 0.005f, 0.0f); } if ((gActors[5].iwork[4] == 6) && (gCsFrameCount >= 550) && (gActors[5].obj.rot.y <= 174.0f)) { @@ -3111,23 +3111,23 @@ void func_i6_801A0AC0(Player* player) { } Math_SmoothStepToF(&gActors[6].obj.pos.z, -12000.0f, 1.0f, 40.0f, 1.0f); Math_SmoothStepToF(&gActors[6].obj.pos.x, -13000.0f, 1.0f, 80.0f, 1.0f); - D_801779A0 = player->pos.x; - D_801779C0 = player->pos.z; + gCsCamAtX = player->pos.x; + gCsCamAtZ = player->pos.z; if (gCsFrameCount < 590) { - D_801779B8 = player->pos.y; + gCsCamAtY = player->pos.y; } if ((gCsFrameCount >= 590) && (gCsFrameCount < 605)) { - Math_SmoothStepToF(&D_80177988, gActors[0].obj.pos.z, 1.0f, 20.0f, 0.0f); - Math_SmoothStepToF(&D_80177978, 0.0f, 1.0f, 4.0f, 0.0f); - Math_SmoothStepToF(&D_80177980, (player->pos.y * player->unk_148) + 50.0f, 1.0f, 2.25f, 0.0f); - Math_SmoothStepToF(&D_801779B8, (player->pos.y * player->unk_148) + 20.0f, 1.0f, 1.5f, 0.0f); + Math_SmoothStepToF(&gCsCamEyeZ, gActors[0].obj.pos.z, 1.0f, 20.0f, 0.0f); + Math_SmoothStepToF(&gCsCamEyeX, 0.0f, 1.0f, 4.0f, 0.0f); + Math_SmoothStepToF(&gCsCamEyeY, (player->pos.y * player->unk_148) + 50.0f, 1.0f, 2.25f, 0.0f); + Math_SmoothStepToF(&gCsCamAtY, (player->pos.y * player->unk_148) + 20.0f, 1.0f, 1.5f, 0.0f); } if (gCsFrameCount >= 605) { - Math_SmoothStepToF(&D_80177978, 0.0f, 1.0f, 3.0f, 0.0f); - Math_SmoothStepToF(&D_80177980, (player->pos.y * player->unk_148) + 50.0f, 1.0f, 2.0f, 0.0f); - Math_SmoothStepToF(&D_80177988, player->pos.z + 400.0f, 1.0f, 80.0f, 0.0f); - D_801779C0 = player->pos.z - 41.0f; - D_801779B8 = (player->pos.y * player->unk_148) + 20.0f; + Math_SmoothStepToF(&gCsCamEyeX, 0.0f, 1.0f, 3.0f, 0.0f); + Math_SmoothStepToF(&gCsCamEyeY, (player->pos.y * player->unk_148) + 50.0f, 1.0f, 2.0f, 0.0f); + Math_SmoothStepToF(&gCsCamEyeZ, player->pos.z + 400.0f, 1.0f, 80.0f, 0.0f); + gCsCamAtZ = player->pos.z - 41.0f; + gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f; Math_SmoothStepToF(D_80177A48, 1.0f, 0.1f, 0.1f, 0); } switch (gCsFrameCount) { @@ -3163,12 +3163,12 @@ void func_i6_801A0AC0(Player* player) { player->unk_1D0 = 0; player->timer_1F8 = 0; player->timer_1FC = 0; - D_80177978 = player->pos.x; - D_80177980 = (player->pos.y * player->unk_148) + 50.0f; - D_80177988 = 400.0f; - D_801779A0 = player->pos.x; - D_801779B8 = (player->pos.y * player->unk_148) + 20.0f; - D_801779C0 = player->unk_138; + gCsCamEyeX = player->pos.x; + gCsCamEyeY = (player->pos.y * player->unk_148) + 50.0f; + gCsCamEyeZ = 400.0f; + gCsCamAtX = player->pos.x; + gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f; + gCsCamAtZ = player->unk_138; player->camEye.x = player->pos.x; player->camEye.y = player->pos.y * player->unk_148; player->camEye.y += 50.0f; @@ -3183,12 +3183,12 @@ void func_i6_801A0AC0(Player* player) { } break; } - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[0], 20000.0f, 0); Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); spA4.x = 0.0f; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 977c4b6e..7cde3e2b 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -353,9 +353,9 @@ void func_i6_80196D88(Player* player) { sp64.y = 0.0f; sp64.z = 400.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); - D_80177978 = player->pos.x + sp58.x; - D_80177980 = player->pos.y + sp58.y; - D_80177988 = player->pos.z + sp58.z; + gCsCamEyeX = player->pos.x + sp58.x; + gCsCamEyeY = player->pos.y + sp58.y; + gCsCamEyeZ = player->pos.z + sp58.z; Math_SmoothStepToF(D_80177A48, 0.5f, 1.0f, 0.01f, 0.0f); Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); if ((player->timer_1F8 == 0) && (fabsf(sp94) < 50.0f) && (fabsf(sp8C) < 50.0f)) { @@ -388,11 +388,11 @@ void func_i6_80196D88(Player* player) { } if (player->unk_120 > 200.0f) { Math_SmoothStepToF(&D_80177A48[4], 20.0f, 1.0f, 1.0f, 0.0f); - Math_SmoothStepToF(&D_80177978, player->pos.x, 0.1f, D_80177A48[4], 0.0f); - Math_SmoothStepToF(&D_80177980, player->pos.y + 200.0f, 0.1f, D_80177A48[4], 0.0f); - Math_SmoothStepToF(&D_80177988, player->pos.z, 0.1f, D_80177A48[4], 0.0f); + Math_SmoothStepToF(&gCsCamEyeX, player->pos.x, 0.1f, D_80177A48[4], 0.0f); + Math_SmoothStepToF(&gCsCamEyeY, player->pos.y + 200.0f, 0.1f, D_80177A48[4], 0.0f); + Math_SmoothStepToF(&gCsCamEyeZ, player->pos.z, 0.1f, D_80177A48[4], 0.0f); } else { - Math_SmoothStepToF(&D_80177980, player->pos.y, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&gCsCamEyeY, player->pos.y, 0.1f, 2.0f, 0.0f); } if (gCsFrameCount == 105) { @@ -443,9 +443,9 @@ void func_i6_80196D88(Player* player) { Radio_PlayMessage(gMsg_ID_8205, RCID_FOX); } } - D_801779A0 = player->pos.x; - D_801779B8 = player->pos.y; - D_801779C0 = player->unk_138; + gCsCamAtX = player->pos.x; + gCsCamAtY = player->pos.y; + gCsCamAtZ = player->unk_138; Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); sp64.x = 0.0f; @@ -462,12 +462,12 @@ void func_i6_80196D88(Player* player) { player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 100.0f, 0); - Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 100.0f, 0); - Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 100.0f, 0); - Math_SmoothStepToF(&player->camAt.x, D_801779A0, D_80177A48[1], 100.0f, 0); - Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[1], 100.0f, 0); - Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[1], 100.0f, 0); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_80177A48[0], 100.0f, 0); + Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_80177A48[0], 100.0f, 0); + Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_80177A48[0], 100.0f, 0); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_80177A48[1], 100.0f, 0); + Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_80177A48[1], 100.0f, 0); + Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_80177A48[1], 100.0f, 0); player->unk_088 += 10.0f; player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; player->unk_0F4 += 8.0f; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 84dd91a7..5bc7fff3 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -204,50 +204,187 @@ u16* D_menu_801AF428[15][2] = { { gMsg_ID_1460, gMsg_ID_1470 }, }; -Planet planet[PLANET_MAX] = { - /* PLANET_METEO */ - { PLANET_METEO, 1150.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -130.0f, 1.0f, 0, 0, PLANET_FORTUNA, PLANET_NONE, - PLANET_KATINA }, - /* PLANET_AREA_6 */ - { PLANET_AREA_6, 1400.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -315.0f, 0.15f, 0, 2, PLANET_NONE, PLANET_NONE, - PLANET_NONE }, - /* PLANET_BOLSE */ - { PLANET_BOLSE, 1400.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -345.0f, 0.15f, 0, 2, PLANET_NONE, PLANET_NONE, - PLANET_NONE }, - /* PLANET_SECTOR_Z */ - { PLANET_SECTOR_Z, 1125.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -285.0f, 2.5f * 2.0f, 0, 1, PLANET_BOLSE, PLANET_AREA_6, - PLANET_NONE }, - /* PLANET_SECTOR_X */ - { PLANET_SECTOR_X, 750.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -60.0f, 2.5f * 2.0f, 0, 1, PLANET_TITANIA, PLANET_MACBETH, - PLANET_SECTOR_Z }, - /* PLANET_SECTOR_Y */ - { PLANET_SECTOR_Y, 1125.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -190.0f, 2.5f * 2.0f, 0, 1, PLANET_KATINA, PLANET_AQUAS, - PLANET_NONE }, - /* PLANET_KATINA */ - { PLANET_KATINA, 750.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -150.0f, 2.5f, 0, 4, PLANET_SECTOR_X, PLANET_SOLAR, - PLANET_NONE }, - /* PLANET_MACBETH */ - { PLANET_MACBETH, 825.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -330.0f, 2.5f, 0, 4, PLANET_BOLSE, PLANET_AREA_6, - PLANET_NONE }, - /* PLANET_ZONESS */ - { PLANET_ZONESS, 900.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -260.0f, 2.5f, 0, 4, PLANET_MACBETH, PLANET_SECTOR_Z, - PLANET_NONE }, - /* PLANET_CORNERIA */ - { PLANET_CORNERIA, 1500.0f, 0.0f, 10.0f, 0.0f, 0.0f, 0.0f, -150.0f, 5.0f, 0, 4, PLANET_METEO, PLANET_SECTOR_Y, - PLANET_NONE }, - /* PLANET_TITANIA */ - { PLANET_TITANIA, 975.0f, 0.0f, -10.0f, 0.0f, 0.0f, 0.0f, -375.0f, 2.5f, 0, 4, PLANET_BOLSE, PLANET_NONE, - PLANET_NONE }, - /* PLANET_AQUAS */ - { PLANET_AQUAS, 900.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -220.0f, 2.5f, 0, 4, PLANET_ZONESS, PLANET_NONE, - PLANET_NONE }, - /* PLANET_FORTUNA */ - { PLANET_FORTUNA, 975.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -105.0f, 2.5f, 0, 4, PLANET_SECTOR_X, PLANET_SOLAR, - PLANET_NONE }, - /* PLANET_VENOM */ - { PLANET_VENOM, 1800.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -330.0f, 9.0f, 0, 4, PLANET_NONE, PLANET_NONE, PLANET_NONE }, - /* PLANET_SOLAR */ - { PLANET_SOLAR, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f, 0, 3, PLANET_MACBETH, PLANET_NONE, PLANET_NONE }, +Planet sPlanets[PLANET_MAX] = { + { + PLANET_METEO, + { 1150.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -130.0f, + 1.0f, + 0, + PL_ANIM_STATIC, + PLANET_FORTUNA, + PLANET_NONE, + PLANET_KATINA, + }, + { + PLANET_AREA_6, + { 1400.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -315.0f, + 0.15f, + 0, + PL_ANIM_ROTATE_Y, + PLANET_NONE, + PLANET_NONE, + PLANET_NONE, + }, + { + PLANET_BOLSE, + { 1400.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -345.0f, + 0.15f, + 0, + PL_ANIM_ROTATE_Y, + PLANET_NONE, + PLANET_NONE, + PLANET_NONE, + }, + { + PLANET_SECTOR_Z, + { 1125.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -285.0f, + 2.5f * 2.0f, + 0, + PL_ANIM_BILLBOARD, + PLANET_BOLSE, + PLANET_AREA_6, + PLANET_NONE, + }, + { + PLANET_SECTOR_X, + { 750.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -60.0f, + 2.5f * 2.0f, + 0, + PL_ANIM_BILLBOARD, + PLANET_TITANIA, + PLANET_MACBETH, + PLANET_SECTOR_Z, + }, + { + PLANET_SECTOR_Y, + { 1125.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -190.0f, + 2.5f * 2.0f, + 0, + PL_ANIM_BILLBOARD, + PLANET_KATINA, + PLANET_AQUAS, + PLANET_NONE, + }, + { + PLANET_KATINA, + { 750.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -150.0f, + 2.5f, + 0, + PL_ANIM_SPIN, + PLANET_SECTOR_X, + PLANET_SOLAR, + PLANET_NONE, + }, + { + PLANET_MACBETH, + { 825.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -330.0f, + 2.5f, + 0, + PL_ANIM_SPIN, + PLANET_BOLSE, + PLANET_AREA_6, + PLANET_NONE, + }, + { + PLANET_ZONESS, + { 900.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -260.0f, + 2.5f, + 0, + PL_ANIM_SPIN, + PLANET_MACBETH, + PLANET_SECTOR_Z, + PLANET_NONE, + }, + { + PLANET_CORNERIA, + { 1500.0f, 0.0f, 10.0f }, + { 0.0f, 0.0f, 0.0f }, + -150.0f, + 5.0f, + 0, + PL_ANIM_SPIN, + PLANET_METEO, + PLANET_SECTOR_Y, + PLANET_NONE, + }, + { + PLANET_TITANIA, + { 975.0f, 0.0f, -10.0f }, + { 0.0f, 0.0f, 0.0f }, + -375.0f, + 2.5f, + 0, + PL_ANIM_SPIN, + PLANET_BOLSE, + PLANET_NONE, + PLANET_NONE, + }, + { + PLANET_AQUAS, + { 900.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -220.0f, + 2.5f, + 0, + PL_ANIM_SPIN, + PLANET_ZONESS, + PLANET_NONE, + PLANET_NONE, + }, + { + PLANET_FORTUNA, + { 975.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -105.0f, + 2.5f, + 0, + PL_ANIM_SPIN, + PLANET_SECTOR_X, + PLANET_SOLAR, + PLANET_NONE, + }, + { + PLANET_VENOM, + { 1800.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + -330.0f, + 9.0f, + 0, + PL_ANIM_SPIN, + PLANET_NONE, + PLANET_NONE, + PLANET_NONE, + }, + { + PLANET_SOLAR, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + 0.0f, + 10.0f, + 0, + PL_ANIM_ROTATE_Z, + PLANET_MACBETH, + PLANET_NONE, + PLANET_NONE, + }, }; // unused @@ -259,7 +396,7 @@ PlanetId sPlanetList[] = { Gfx* D_menu_801AF824[4] = { D_604A710, D_604A400, D_604A190, D_6049F80 }; -Texture D_menu_801AF834[14] = { +TitleCard D_menu_801AF834[14] = { { D_6007B90, 128, 28, 95.0f }, { D_60030D0, 96, 28, 110.0f }, { D_60131A0, 176, 12, 73.0f }, { D_6009AD0, 168, 28, 77.0f }, { D_600B9B0, 168, 28, 74.0f }, { D_6001C80, 96, 13, 106.0f }, { D_TEX_6011660, 176, 12, 75.0f }, { D_6010010, 112, 13, 109.0f }, { D_6017640, 112, 28, 101.0f }, @@ -267,7 +404,7 @@ Texture D_menu_801AF834[14] = { { D_6004AC0, 168, 19, 72.0f }, { D_6006320, 104, 28, 105.0f }, }; -Texture D_menu_801AF914[] = { +TitleCard D_menu_801AF914[] = { { D_6008990, 232, 19, 46.0f }, { D_6003B50, 208, 19, 56.0f }, { D_60139E0, 128, 19, 98.0f }, { D_600AD30, 168, 19, 77.0f }, { D_600CC10, 128, 19, 95.0f }, { D_6002160, 208, 19, 57.0f }, { D_6011EA0, 256, 19, 40.0f }, { D_60105C0, 224, 19, 49.0f }, { D_6018280, 184, 19, 70.0f }, @@ -308,19 +445,31 @@ ObjPosition D_menu_801AFCD8[4] = { { 35.0f, 1280.0f, 20.0f, 0.05f }, }; -UnkStruct_D_menu_801AFD18 D_menu_801AFD18[24] = { - { 0, PLANET_CORNERIA, PLANET_METEO, 5, 0, 0, 0 }, { 0, PLANET_METEO, PLANET_FORTUNA, 5, 0, 0, 0 }, - { 0, PLANET_FORTUNA, PLANET_SECTOR_X, 5, 0, 0, 0 }, { 0, PLANET_SECTOR_X, PLANET_TITANIA, 5, 0, 0, 0 }, - { 0, PLANET_TITANIA, PLANET_BOLSE, 5, 0, 0, 0 }, { 0, PLANET_KATINA, PLANET_SECTOR_X, 5, 0, 0, 0 }, - { 0, PLANET_MACBETH, PLANET_BOLSE, 5, 0, 0, 0 }, { 0, PLANET_SECTOR_Z, PLANET_BOLSE, 5, 0, 0, 0 }, - { 0, PLANET_BOLSE, PLANET_VENOM, 5, 0, 0, 0 }, { 1, PLANET_SECTOR_Y, PLANET_KATINA, 5, 0, 0, 0 }, - { 1, PLANET_KATINA, PLANET_SOLAR, 5, 0, 0, 0 }, { 1, PLANET_SOLAR, PLANET_MACBETH, 5, 0, 0, 0 }, - { 1, PLANET_SECTOR_X, PLANET_MACBETH, 5, 0, 0, 0 }, { 1, PLANET_FORTUNA, PLANET_SOLAR, 5, 0, 0, 0 }, - { 1, PLANET_ZONESS, PLANET_MACBETH, 5, 0, 0, 0 }, { 2, PLANET_CORNERIA, PLANET_SECTOR_Y, 5, 0, 0, 0 }, - { 2, PLANET_SECTOR_Y, PLANET_AQUAS, 5, 0, 0, 0 }, { 2, PLANET_AQUAS, PLANET_ZONESS, 5, 0, 0, 0 }, - { 2, PLANET_ZONESS, PLANET_SECTOR_Z, 5, 0, 0, 0 }, { 2, PLANET_SECTOR_Z, PLANET_AREA_6, 5, 0, 0, 0 }, - { 2, PLANET_MACBETH, PLANET_AREA_6, 5, 0, 0, 0 }, { 2, PLANET_AREA_6, PLANET_VENOM, 5, 0, 0, 0 }, - { 3, PLANET_METEO, PLANET_KATINA, 5, 0, 0, 0 }, { 4, PLANET_SECTOR_X, PLANET_SECTOR_Z, 10, 0, 0, 0 }, +PlanetPath sPaths[24] = { + { PL_PATH_BLU, PLANET_CORNERIA, PLANET_METEO, 5, 0, 0, 0 }, + { PL_PATH_BLU, PLANET_METEO, PLANET_FORTUNA, 5, 0, 0, 0 }, + { PL_PATH_BLU, PLANET_FORTUNA, PLANET_SECTOR_X, 5, 0, 0, 0 }, + { PL_PATH_BLU, PLANET_SECTOR_X, PLANET_TITANIA, 5, 0, 0, 0 }, + { PL_PATH_BLU, PLANET_TITANIA, PLANET_BOLSE, 5, 0, 0, 0 }, + { PL_PATH_BLU, PLANET_KATINA, PLANET_SECTOR_X, 5, 0, 0, 0 }, + { PL_PATH_BLU, PLANET_MACBETH, PLANET_BOLSE, 5, 0, 0, 0 }, + { PL_PATH_BLU, PLANET_SECTOR_Z, PLANET_BOLSE, 5, 0, 0, 0 }, + { PL_PATH_BLU, PLANET_BOLSE, PLANET_VENOM, 5, 0, 0, 0 }, + { PL_PATH_YLW, PLANET_SECTOR_Y, PLANET_KATINA, 5, 0, 0, 0 }, + { PL_PATH_YLW, PLANET_KATINA, PLANET_SOLAR, 5, 0, 0, 0 }, + { PL_PATH_YLW, PLANET_SOLAR, PLANET_MACBETH, 5, 0, 0, 0 }, + { PL_PATH_YLW, PLANET_SECTOR_X, PLANET_MACBETH, 5, 0, 0, 0 }, + { PL_PATH_YLW, PLANET_FORTUNA, PLANET_SOLAR, 5, 0, 0, 0 }, + { PL_PATH_YLW, PLANET_ZONESS, PLANET_MACBETH, 5, 0, 0, 0 }, + { PL_PATH_RED, PLANET_CORNERIA, PLANET_SECTOR_Y, 5, 0, 0, 0 }, + { PL_PATH_RED, PLANET_SECTOR_Y, PLANET_AQUAS, 5, 0, 0, 0 }, + { PL_PATH_RED, PLANET_AQUAS, PLANET_ZONESS, 5, 0, 0, 0 }, + { PL_PATH_RED, PLANET_ZONESS, PLANET_SECTOR_Z, 5, 0, 0, 0 }, + { PL_PATH_RED, PLANET_SECTOR_Z, PLANET_AREA_6, 5, 0, 0, 0 }, + { PL_PATH_RED, PLANET_MACBETH, PLANET_AREA_6, 5, 0, 0, 0 }, + { PL_PATH_RED, PLANET_AREA_6, PLANET_VENOM, 5, 0, 0, 0 }, + { PL_WARP_YLW, PLANET_METEO, PLANET_KATINA, 5, 0, 0, 0 }, + { PL_WARP_RED, PLANET_SECTOR_X, PLANET_SECTOR_Z, 10, 0, 0, 0 }, }; f32 D_menu_801AFFB8[] = { @@ -496,54 +645,30 @@ s32 }; Vtx D_menu_801B4740[] = { - { 0x001E, 0x001E, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x001E, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x0019, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x0019, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x0019, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x0019, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x0014, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x0014, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x0014, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x0014, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x000F, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x000F, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x000F, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x000F, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x000A, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x000A, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x000A, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x000A, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x0005, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x0005, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x0005, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x0005, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x0000, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0x0000, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0xFFFB, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0xFFFB, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0xFFFB, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0xFFFB, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0xFFF6, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0xFFF6, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0xFFF6, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0xFFF6, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0xFFF1, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0xFFF1, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0xFFF1, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0xFFF1, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0xFFEC, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0xFFEC, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0xFFEC, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0xFFEC, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0xFFE7, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0xFFE7, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0xFFE7, 0x0000, 0x0000, 0x0C00, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0xFFE7, 0x0000, 0x0000, 0x0000, 0x0000, 255, 255, 255, 255 }, - { 0xFFE2, 0xFFE2, 0x0000, 0x0000, 0x0000, 0x0100, 255, 255, 255, 255 }, - { 0x001E, 0xFFE2, 0x0000, 0x0000, 0x0C00, 0x0100, 255, 255, 255, 255 }, + VTX(30, 30, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, 30, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, 25, 0, 0, 256, 255, 255, 255, 255), VTX(30, 25, 0, 3072, 256, 255, 255, 255, 255), + VTX(30, 25, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, 25, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, 20, 0, 0, 256, 255, 255, 255, 255), VTX(30, 20, 0, 3072, 256, 255, 255, 255, 255), + VTX(30, 20, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, 20, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, 15, 0, 0, 256, 255, 255, 255, 255), VTX(30, 15, 0, 3072, 256, 255, 255, 255, 255), + VTX(30, 15, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, 15, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, 10, 0, 0, 256, 255, 255, 255, 255), VTX(30, 10, 0, 3072, 256, 255, 255, 255, 255), + VTX(30, 10, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, 10, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, 5, 0, 0, 256, 255, 255, 255, 255), VTX(30, 5, 0, 3072, 256, 255, 255, 255, 255), + VTX(30, 5, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, 5, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, 0, 0, 0, 256, 255, 255, 255, 255), VTX(30, 0, 0, 3072, 256, 255, 255, 255, 255), + VTX(30, 0, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, 0, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, -5, 0, 0, 256, 255, 255, 255, 255), VTX(30, -5, 0, 3072, 256, 255, 255, 255, 255), + VTX(30, -5, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, -5, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, -10, 0, 0, 256, 255, 255, 255, 255), VTX(30, -10, 0, 3072, 256, 255, 255, 255, 255), + VTX(30, -10, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, -10, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, -15, 0, 0, 256, 255, 255, 255, 255), VTX(30, -15, 0, 3072, 256, 255, 255, 255, 255), + VTX(30, -15, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, -15, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, -20, 0, 0, 256, 255, 255, 255, 255), VTX(30, -20, 0, 3072, 256, 255, 255, 255, 255), + VTX(30, -20, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, -20, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, -25, 0, 0, 256, 255, 255, 255, 255), VTX(30, -25, 0, 3072, 256, 255, 255, 255, 255), + VTX(30, -25, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, -25, 0, 0, 0, 255, 255, 255, 255), + VTX(-30, -30, 0, 0, 256, 255, 255, 255, 255), VTX(30, -30, 0, 3072, 256, 255, 255, 255, 255), }; Gfx D_menu_801B4A40[] = { @@ -1099,7 +1224,7 @@ void func_menu_801ABCDC(s32 arg0, s32 alpha); void func_menu_801ABF1C(void); void func_menu_801AC200(s32); void func_menu_801AC530(s32 index); -void func_menu_801AC80C(s32); +void func_menu_801AC80C(PathType); void func_menu_801AC9A0(s32); void func_menu_801ACD90(s32 index, Vec3f* src, Vec3f* dest); void func_menu_801AD048(void); @@ -1274,7 +1399,7 @@ void func_menu_8019E99C(void) { for (i = 0; i < 24; i++) { D_menu_801CD840[i] = i; - D_menu_801AFD18[i].unk_14 = 0; + sPaths[i].unk_14 = 0; } func_menu_801A6694(); @@ -1378,15 +1503,15 @@ void func_menu_8019F164(void) { switch (D_menu_801CD93C) { case 0: - sNextPlanetId = planet[sCurrentPlanetId].unk_2C; + sNextPlanetId = sPlanets[sCurrentPlanetId].dest1; break; case 1: - sNextPlanetId = planet[sCurrentPlanetId].unk_30; + sNextPlanetId = sPlanets[sCurrentPlanetId].dest2; break; case 2: - sNextPlanetId = planet[sCurrentPlanetId].unk_34; + sNextPlanetId = sPlanets[sCurrentPlanetId].warp; break; } @@ -1404,7 +1529,7 @@ void func_menu_8019F164(void) { D_menu_801CEFD8 = 0; - if (D_menu_801CD93C) { + if (D_menu_801CD93C != 0) { D_menu_801CEFD8 = 1; } @@ -1445,7 +1570,7 @@ void func_menu_8019F42C(void) { } for (i = 0; i < 15; i++) { - planet[i].alpha = 0; + sPlanets[i].alpha = 0; } func_menu_8019FC04(); @@ -1483,7 +1608,7 @@ void func_menu_8019F600(void) { D_menu_801CD950 = -1; for (i = 0; i < 15; i++) { - planet[i].alpha = 0; + sPlanets[i].alpha = 0; } D_menu_801CD970 = 0; @@ -1506,7 +1631,7 @@ void func_menu_8019F600(void) { D_80177B90[6] = PLANET_VENOM; for (i = 0; i < 24; i++) { - D_menu_801AFD18[i].unk_18 = 255; + sPaths[i].alpha = 255; } gCurrentPlanet = 0; @@ -1518,8 +1643,8 @@ void func_menu_8019F600(void) { D_menu_801CD9B4 = 0.01f; D_menu_801CD944 = 0; - sp18 = func_menu_801A655C(sCurrentPlanetId, planet[sCurrentPlanetId].unk_2C); - temp_t4 = func_menu_801A655C(sCurrentPlanetId, planet[sCurrentPlanetId].unk_30); + sp18 = func_menu_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); + temp_t4 = func_menu_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); D_80177BD8[sp18] = 1; D_80177BD8[temp_t4] = 1; } @@ -1535,10 +1660,10 @@ void func_menu_8019F83C(void) { } if (D_80177BD8[i] == 6) { - D_menu_801AFD18[i].unk_14 = 5; + sPaths[i].unk_14 = 5; } - D_menu_801AFD18[i].unk_18 = 0; + sPaths[i].alpha = 0; gUnkEntities30[i].unk_24 = 0.0f; } } @@ -1560,10 +1685,10 @@ void func_menu_8019F910(void) { void func_menu_8019F97C(void) { D_menu_801CEA54 = func_menu_801A25C8(sCurrentPlanetId); - D_menu_801CD9F4 = D_menu_801CDA00 = planet[sCurrentPlanetId].pos.x; - D_menu_801CD9F8 = D_menu_801CDA04 = planet[sCurrentPlanetId].pos.y; - D_menu_801CDA08 = planet[sCurrentPlanetId].pos.z; - D_menu_801CD9FC = planet[sCurrentPlanetId].pos.z + D_menu_801CEA54; + D_menu_801CD9F4 = D_menu_801CDA00 = sPlanets[sCurrentPlanetId].pos.x; + D_menu_801CD9F8 = D_menu_801CDA04 = sPlanets[sCurrentPlanetId].pos.y; + D_menu_801CDA08 = sPlanets[sCurrentPlanetId].pos.z; + D_menu_801CD9FC = sPlanets[sCurrentPlanetId].pos.z + D_menu_801CEA54; } void func_menu_8019FA1C(void) { @@ -1572,12 +1697,12 @@ void func_menu_8019FA1C(void) { for (planetId = 0; planetId < PLANET_MAX; planetId++) { if (planetId == sCurrentPlanetId) { if ((planetId == PLANET_SECTOR_Z) || (planetId == PLANET_SECTOR_X) || (planetId == PLANET_SECTOR_Y)) { - planet[planetId].alpha = 144; + sPlanets[planetId].alpha = 144; } else { - planet[planetId].alpha = 255; + sPlanets[planetId].alpha = 255; } } else { - planet[planetId].alpha = 0; + sPlanets[planetId].alpha = 0; } } } @@ -1793,13 +1918,13 @@ void func_menu_801A01A8(void) { if (D_80177BD8[i] == 0) { continue; } - if (D_menu_801AFD18[i].unk_18 == 0) { + if (sPaths[i].alpha == 0) { continue; } func_menu_801AC9A0(i); - if (D_menu_801AFD18[i].unk_14) { + if (sPaths[i].unk_14) { func_menu_801AC200(i); } @@ -2040,9 +2165,9 @@ void func_menu_801A0954(void) { for (planetId = 0; planetId < PLANET_MAX; planetId++) { if ((planetId == PLANET_SECTOR_Z) || (planetId == PLANET_SECTOR_X) || (planetId == PLANET_SECTOR_Y)) { - planet[planetId].alpha = 144; + sPlanets[planetId].alpha = 144; } else { - planet[planetId].alpha = 255; + sPlanets[planetId].alpha = 255; } D_menu_801CD900[planetId] = 255; } @@ -2235,9 +2360,9 @@ void func_menu_801A1528(void) { for (planetId = 0; planetId < PLANET_MAX; planetId++) { if ((planetId == PLANET_SECTOR_Z) || (planetId == PLANET_SECTOR_X) || (planetId == PLANET_SECTOR_Y)) { - planet[planetId].alpha = D_menu_801CEAA0; + sPlanets[planetId].alpha = D_menu_801CEAA0; } else { - planet[planetId].alpha = D_menu_801CEAA4; + sPlanets[planetId].alpha = D_menu_801CEAA4; D_menu_801CD970 = D_menu_801CEAA4; } D_menu_801CD900[planetId] = D_menu_801CEAA4; @@ -2261,9 +2386,9 @@ void func_menu_801A1528(void) { for (planetId = 0; planetId < PLANET_MAX; planetId++) { if ((planetId == PLANET_SECTOR_Z) || (planetId == PLANET_SECTOR_X) || (planetId == PLANET_SECTOR_Y)) { - planet[planetId].alpha = 144; + sPlanets[planetId].alpha = 144; } else { - planet[planetId].alpha = 255; + sPlanets[planetId].alpha = 255; } D_menu_801CD900[planetId] = 255; } @@ -2295,12 +2420,12 @@ void func_menu_801A1AE8(void) { D_menu_801CEA54 = func_menu_801A25C8(sCurrentPlanetId); - D_menu_801CDA40.x = planet[sCurrentPlanetId].pos.x; - D_menu_801CDA40.y = planet[sCurrentPlanetId].pos.y; - D_menu_801CDA40.z = planet[sCurrentPlanetId].pos.z; + D_menu_801CDA40.x = sPlanets[sCurrentPlanetId].pos.x; + D_menu_801CDA40.y = sPlanets[sCurrentPlanetId].pos.y; + D_menu_801CDA40.z = sPlanets[sCurrentPlanetId].pos.z; - D_menu_801CDA50.x = planet[sCurrentPlanetId].pos.x; - D_menu_801CDA50.y = planet[sCurrentPlanetId].pos.y; + D_menu_801CDA50.x = sPlanets[sCurrentPlanetId].pos.x; + D_menu_801CDA50.y = sPlanets[sCurrentPlanetId].pos.y; D_menu_801CDA50.z = D_menu_801CDA40.z + D_menu_801CEA54; D_menu_801CDA2C = D_menu_801CDA00; @@ -2345,7 +2470,7 @@ void func_menu_801A1C14(void) { D_menu_801CD9D8 = 0; for (i = 0; i < 24; i++) { - D_menu_801AFD18[i].unk_18 = 0; + sPaths[i].alpha = 0; } D_80178410 = 0; @@ -2593,10 +2718,10 @@ void func_menu_801A2674(void) { continue; } - planet[i].alpha -= 16; + sPlanets[i].alpha -= 16; - if (planet[i].alpha < 0) { - planet[i].alpha = 0; + if (sPlanets[i].alpha < 0) { + sPlanets[i].alpha = 0; } } @@ -2605,18 +2730,18 @@ void func_menu_801A2674(void) { continue; } - D_menu_801AFD18[i].unk_18 -= 16; + sPaths[i].alpha -= 16; - if (D_menu_801AFD18[i].unk_18 < 0) { - D_menu_801AFD18[i].unk_18 = 0; + if (sPaths[i].alpha < 0) { + sPaths[i].alpha = 0; } } - if (sCurrentPlanetId == 2) { + if (sCurrentPlanetId == PLANET_BOLSE) { Math_SmoothStepToF(&D_menu_801AFFF8, 20.0f, 0.05f, 100.0f, 0.1f); } - if (sCurrentPlanetId == 1) { + if (sCurrentPlanetId == PLANET_AREA_6) { Math_SmoothStepToF(&D_menu_801B0000, 15.0f, 0.05f, 100.0f, 0.1f); } @@ -2649,11 +2774,11 @@ void func_menu_801A281C(void) { D_menu_801CEF58[0].z = D_menu_801CEF58[1].z = D_menu_801CDA08; D_menu_801CEF58[5].x = D_menu_801CEF58[4].x = D_menu_801CEF58[3].x = D_menu_801CEF58[2].x = - planet[sNextPlanetId].pos.x; + sPlanets[sNextPlanetId].pos.x; D_menu_801CEF58[5].y = D_menu_801CEF58[4].y = D_menu_801CEF58[3].y = D_menu_801CEF58[2].y = - planet[sNextPlanetId].pos.y; + sPlanets[sNextPlanetId].pos.y; D_menu_801CEF58[5].z = D_menu_801CEF58[4].z = D_menu_801CEF58[3].z = D_menu_801CEF58[2].z = - planet[sNextPlanetId].pos.z; + sPlanets[sNextPlanetId].pos.z; D_menu_801CDA0C = -46.5f; D_menu_801CDA10 = 0.0f; @@ -2685,10 +2810,10 @@ void func_menu_801A281C(void) { if (D_menu_801CD93C == 2) { D_80177BD8[D_menu_801CEECC] = 5; - D_menu_801AFD18[D_menu_801CEECC].unk_14 = 5; + sPaths[D_menu_801CEECC].unk_14 = 5; } else { D_80177BD8[D_menu_801CEECC] = 2; - D_menu_801AFD18[D_menu_801CEECC].unk_14 = 1; + sPaths[D_menu_801CEECC].unk_14 = 1; } } @@ -2825,19 +2950,19 @@ void func_menu_801A2EB8(void) { } if (D_menu_801CD9C4 < 80) { - D_menu_801AFD18[D_menu_801CEECC].unk_18 += 16; - if (D_menu_801AFD18[D_menu_801CEECC].unk_18 > 255) { - D_menu_801AFD18[D_menu_801CEECC].unk_18 = 255; + sPaths[D_menu_801CEECC].alpha += 16; + if (sPaths[D_menu_801CEECC].alpha > 255) { + sPaths[D_menu_801CEECC].alpha = 255; } - planet[sNextPlanetId].alpha += 16; + sPlanets[sNextPlanetId].alpha += 16; if ((sNextPlanetId == PLANET_SECTOR_Z) || (sNextPlanetId == PLANET_SECTOR_X) || (sNextPlanetId == PLANET_SECTOR_Y)) { - if (planet[sNextPlanetId].alpha > 144) { - planet[sNextPlanetId].alpha = 144; + if (sPlanets[sNextPlanetId].alpha > 144) { + sPlanets[sNextPlanetId].alpha = 144; } - } else if (planet[sNextPlanetId].alpha > 255) { - planet[sNextPlanetId].alpha = 255; + } else if (sPlanets[sNextPlanetId].alpha > 255) { + sPlanets[sNextPlanetId].alpha = 255; } } else { @@ -2850,9 +2975,9 @@ void func_menu_801A2EB8(void) { if (D_80177BD8[i] == 0) { continue; } - D_menu_801AFD18[i].unk_18 += 16; - if (D_menu_801AFD18[i].unk_18 > 255) { - D_menu_801AFD18[i].unk_18 = 255; + sPaths[i].alpha += 16; + if (sPaths[i].alpha > 255) { + sPaths[i].alpha = 255; } } @@ -2863,15 +2988,15 @@ void func_menu_801A2EB8(void) { continue; } - planet[PLANET_ID].alpha += 16; + sPlanets[PLANET_ID].alpha += 16; if ((PLANET_ID == PLANET_SECTOR_Z) || (PLANET_ID == PLANET_SECTOR_X) || (PLANET_ID == PLANET_SECTOR_Y)) { - if (planet[PLANET_ID].alpha > 144) { - planet[PLANET_ID].alpha = 144; + if (sPlanets[PLANET_ID].alpha > 144) { + sPlanets[PLANET_ID].alpha = 144; } } else { - if (planet[PLANET_ID].alpha > 255) { - planet[PLANET_ID].alpha = 255; + if (sPlanets[PLANET_ID].alpha > 255) { + sPlanets[PLANET_ID].alpha = 255; } } } @@ -2885,7 +3010,7 @@ void func_menu_801A2EB8(void) { if ((D_menu_801CEED8 == 5) && (D_menu_801CEEDC == 0.0f)) { if (D_menu_801CD93C != 2) { - D_menu_801AFD18[D_menu_801CEECC].unk_14 = 2; + sPaths[D_menu_801CEECC].unk_14 = 2; D_menu_801CEEA0 = 0; D_menu_801CEEA4 = 100; D_menu_801CEEA8 = 255; @@ -2896,18 +3021,18 @@ void func_menu_801A2EB8(void) { if (D_menu_801CEED8 == -1) { D_menu_801CEED4 = -1; - if (planet[sNextPlanetId].unk_2C != PLANET_NONE) { - temp1 = func_menu_801A655C(sNextPlanetId, planet[sNextPlanetId].unk_2C); + if (sPlanets[sNextPlanetId].dest1 != PLANET_NONE) { + temp1 = func_menu_801A655C(sNextPlanetId, sPlanets[sNextPlanetId].dest1); D_80177BD8[temp1] = 1; - D_menu_801AFD18[temp1].unk_18 = 255; + sPaths[temp1].alpha = 255; D_menu_801CEED4 = temp1; } D_menu_801CEED0 = -1; - if (planet[sNextPlanetId].unk_30 != PLANET_NONE) { - temp2 = func_menu_801A655C(sNextPlanetId, planet[sNextPlanetId].unk_30); + if (sPlanets[sNextPlanetId].dest2 != PLANET_NONE) { + temp2 = func_menu_801A655C(sNextPlanetId, sPlanets[sNextPlanetId].dest2); D_80177BD8[temp2] = 1; - D_menu_801AFD18[temp2].unk_18 = 255; + sPaths[temp2].alpha = 255; D_menu_801CEED0 = temp2; } D_menu_801CD9C0 = 50; @@ -3211,12 +3336,12 @@ void func_menu_801A3A00(void) { #define PLANET_ID i for (PLANET_ID = 0; PLANET_ID < PLANET_MAX; PLANET_ID++) { - planet[PLANET_ID].alpha = D_menu_801CEAA0; + sPlanets[PLANET_ID].alpha = D_menu_801CEAA0; D_menu_801CD970 = D_menu_801CEAA0; if ((PLANET_ID == PLANET_SECTOR_Z) || (PLANET_ID == PLANET_SECTOR_X) || (PLANET_ID == PLANET_SECTOR_Y)) { - if (planet[PLANET_ID].alpha > 144) { - planet[PLANET_ID].alpha = 144; + if (sPlanets[PLANET_ID].alpha > 144) { + sPlanets[PLANET_ID].alpha = 144; } } } @@ -3252,16 +3377,16 @@ void func_menu_801A4394(void) { break; } - if ((D_menu_801AFD18[D_menu_801CD8E0[D_menu_801CD9AC]].unk_00 == 3) || - (D_menu_801AFD18[D_menu_801CD8E0[D_menu_801CD9AC]].unk_00 == 4)) { + if ((sPaths[D_menu_801CD8E0[D_menu_801CD9AC]].type == 3) || + (sPaths[D_menu_801CD8E0[D_menu_801CD9AC]].type == 4)) { D_80177BD8[D_menu_801CD8E0[D_menu_801CD9AC]] = 5; - D_menu_801AFD18[D_menu_801CD8E0[D_menu_801CD9AC]].unk_14 = 5; + sPaths[D_menu_801CD8E0[D_menu_801CD9AC]].unk_14 = 5; } else { D_80177BD8[D_menu_801CD8E0[D_menu_801CD9AC]] = 2; - D_menu_801AFD18[D_menu_801CD8E0[D_menu_801CD9AC]].unk_14 = 0; + sPaths[D_menu_801CD8E0[D_menu_801CD9AC]].unk_14 = 0; } - D_menu_801AFD18[D_menu_801CD8E0[D_menu_801CD9AC]].unk_18 = 255; + sPaths[D_menu_801CD8E0[D_menu_801CD9AC]].alpha = 255; D_menu_801CEEAC = 255; D_menu_801CEEA8 = 255; D_menu_801CD94C++; @@ -3533,25 +3658,25 @@ void func_menu_801A4FC4(void) { gLaserStrength[gPlayerNum] = 0; gBombCount[gPlayerNum] = 3; - if (planet[sCurrentPlanetId].unk_2C != PLANET_NONE) { - temp2 = func_menu_801A655C(sCurrentPlanetId, planet[sCurrentPlanetId].unk_2C); + if (sPlanets[sCurrentPlanetId].dest1 != PLANET_NONE) { + temp2 = func_menu_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); D_80177BD8[temp2] = 0; - D_menu_801AFD18[temp2].unk_18 = 0; + sPaths[temp2].alpha = 0; } - if (planet[sCurrentPlanetId].unk_30 != PLANET_NONE) { - temp = func_menu_801A655C(sCurrentPlanetId, planet[sCurrentPlanetId].unk_30); + if (sPlanets[sCurrentPlanetId].dest2 != PLANET_NONE) { + temp = func_menu_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); D_80177BD8[temp] = 0; - D_menu_801AFD18[temp].unk_18 = 0; + sPaths[temp].alpha = 0; } - if (planet[sCurrentPlanetId].unk_34 != PLANET_NONE) { - temp = func_menu_801A655C(sCurrentPlanetId, planet[sCurrentPlanetId].unk_34); + if (sPlanets[sCurrentPlanetId].warp != PLANET_NONE) { + temp = func_menu_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].warp); D_80177BD8[temp] = 0; - D_menu_801AFD18[temp].unk_18 = 0; + sPaths[temp].alpha = 0; } - D_menu_801AFD18[D_menu_801CEECC].unk_14 = 0; + sPaths[D_menu_801CEECC].unk_14 = 0; D_menu_801CEEA0 = 0; D_menu_801CEEA4 = 0; D_menu_801CEEA8 = 255; @@ -3569,22 +3694,22 @@ void func_menu_801A4FC4(void) { sCurrentPlanetId = D_menu_801CD950; - if (planet[sCurrentPlanetId].unk_2C != PLANET_NONE) { - temp2 = func_menu_801A655C(sCurrentPlanetId, planet[sCurrentPlanetId].unk_2C); + if (sPlanets[sCurrentPlanetId].dest1 != PLANET_NONE) { + temp2 = func_menu_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); D_80177BD8[temp2] = 1; - D_menu_801AFD18[temp2].unk_18 = 255; + sPaths[temp2].alpha = 255; } - if (planet[sCurrentPlanetId].unk_30 != PLANET_NONE) { - temp = func_menu_801A655C(sCurrentPlanetId, planet[sCurrentPlanetId].unk_30); + if (sPlanets[sCurrentPlanetId].dest2 != PLANET_NONE) { + temp = func_menu_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); D_80177BD8[temp] = 1; - D_menu_801AFD18[temp].unk_18 = 255; + sPaths[temp].alpha = 255; } - if (planet[sCurrentPlanetId].unk_34 != PLANET_NONE) { - temp = func_menu_801A655C(sCurrentPlanetId, planet[sCurrentPlanetId].unk_34); + if (sPlanets[sCurrentPlanetId].warp != PLANET_NONE) { + temp = func_menu_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].warp); D_80177BD8[temp] = 0; - D_menu_801AFD18[temp].unk_18 = 0; + sPaths[temp].alpha = 0; } func_menu_801A6368(); @@ -3596,50 +3721,50 @@ void func_menu_801A53C8(void) { D_menu_801CEFD8 ^= 1; - if (planet[sCurrentPlanetId].unk_2C != PLANET_NONE) { - temp2 = func_menu_801A655C(sCurrentPlanetId, planet[sCurrentPlanetId].unk_2C); + if (sPlanets[sCurrentPlanetId].dest1 != PLANET_NONE) { + temp2 = func_menu_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); D_80177BD8[temp2] = 0; - D_menu_801AFD18[temp2].unk_18 = 0; + sPaths[temp2].alpha = 0; } - if (planet[sCurrentPlanetId].unk_30 != PLANET_NONE) { - temp = func_menu_801A655C(sCurrentPlanetId, planet[sCurrentPlanetId].unk_30); + if (sPlanets[sCurrentPlanetId].dest2 != PLANET_NONE) { + temp = func_menu_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); D_80177BD8[temp] = 0; - D_menu_801AFD18[temp].unk_18 = 0; + sPaths[temp].alpha = 0; } D_80177BD8[D_menu_801CEECC] = 0; - D_menu_801AFD18[D_menu_801CEECC].unk_18 = 0; - D_menu_801AFD18[D_menu_801CEECC].unk_14 = 0; + sPaths[D_menu_801CEECC].alpha = 0; + sPaths[D_menu_801CEECC].unk_14 = 0; sCurrentPlanetId = D_menu_801CD950; if (!D_menu_801CEFD8) { - sNextPlanetId = planet[sCurrentPlanetId].unk_2C; + sNextPlanetId = sPlanets[sCurrentPlanetId].dest1; } else if (D_menu_801CD93C != 2) { - if (planet[sCurrentPlanetId].unk_30 != PLANET_NONE) { - sNextPlanetId = planet[sCurrentPlanetId].unk_30; + if (sPlanets[sCurrentPlanetId].dest2 != PLANET_NONE) { + sNextPlanetId = sPlanets[sCurrentPlanetId].dest2; } else { - sNextPlanetId = planet[sCurrentPlanetId].unk_2C; + sNextPlanetId = sPlanets[sCurrentPlanetId].dest1; } - } else if (planet[sCurrentPlanetId].unk_34 != PLANET_NONE) { - sNextPlanetId = planet[sCurrentPlanetId].unk_34; + } else if (sPlanets[sCurrentPlanetId].warp != PLANET_NONE) { + sNextPlanetId = sPlanets[sCurrentPlanetId].warp; } else { - sNextPlanetId = planet[sCurrentPlanetId].unk_2C; + sNextPlanetId = sPlanets[sCurrentPlanetId].dest1; } D_menu_801CEECC = func_menu_801A655C(sCurrentPlanetId, sNextPlanetId); - D_menu_801AFD18[D_menu_801CEECC].unk_18 = 255; + sPaths[D_menu_801CEECC].alpha = 255; D_80177BD8[D_menu_801CEECC] = 3; - D_menu_801AFD18[D_menu_801CEECC].unk_14 = 2; + sPaths[D_menu_801CEECC].unk_14 = 2; - if ((D_menu_801AFD18[D_menu_801CEECC].unk_00 == 3) || (D_menu_801AFD18[D_menu_801CEECC].unk_00 == 4)) { + if ((sPaths[D_menu_801CEECC].type == PL_WARP_YLW) || (sPaths[D_menu_801CEECC].type == PL_WARP_RED)) { D_80177BD8[D_menu_801CEECC] = 5; - D_menu_801AFD18[D_menu_801CEECC].unk_14 = 5; + sPaths[D_menu_801CEECC].unk_14 = 5; } D_menu_801CEEA0 = 0; @@ -3652,16 +3777,16 @@ void func_menu_801A53C8(void) { func_menu_801A6368(); - if (planet[sNextPlanetId].unk_2C != PLANET_NONE) { - temp2 = func_menu_801A655C(sNextPlanetId, planet[sNextPlanetId].unk_2C); + if (sPlanets[sNextPlanetId].dest1 != PLANET_NONE) { + temp2 = func_menu_801A655C(sNextPlanetId, sPlanets[sNextPlanetId].dest1); D_80177BD8[temp2] = 1; - D_menu_801AFD18[temp2].unk_18 = 255; + sPaths[temp2].alpha = 255; } - if (planet[sNextPlanetId].unk_30 != PLANET_NONE) { - temp = func_menu_801A655C(sNextPlanetId, planet[sNextPlanetId].unk_30); + if (sPlanets[sNextPlanetId].dest2 != PLANET_NONE) { + temp = func_menu_801A655C(sNextPlanetId, sPlanets[sNextPlanetId].dest2); D_80177BD8[temp] = 1; - D_menu_801AFD18[temp].unk_18 = 255; + sPaths[temp].alpha = 255; } } @@ -3721,7 +3846,7 @@ void func_menu_801A5834(void) { } var_t0 = 1; - if (!D_menu_801CD93C) { + if (D_menu_801CD93C == 0) { var_t0 = 0; } @@ -4144,7 +4269,7 @@ s32 func_menu_801A655C(PlanetId start, PlanetId end) { s32 i; for (i = 0; i < 24; i++) { - if ((D_menu_801AFD18[i].unk_04 == start) && (D_menu_801AFD18[i].unk_08 == end)) { + if ((sPaths[i].start == start) && (sPaths[i].end == end)) { break; } } @@ -4191,10 +4316,10 @@ void func_menu_801A6694(void) { for (planetId = 0; planetId < PLANET_MAX; planetId++) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, M_DTOR * planet[planetId].unk_1C, 1); - Matrix_Translate(gGfxMatrix, planet[planetId].unk_04, planet[planetId].unk_08, 0.0f, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * sPlanets[planetId].longitude, 1); + Matrix_Translate(gGfxMatrix, sPlanets[planetId].orbit.radius, sPlanets[planetId].orbit.incl, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * -planet[planetId].unk_1C, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * -sPlanets[planetId].longitude, 1); func_menu_801AD048(); @@ -4204,9 +4329,9 @@ void func_menu_801A6694(void) { Matrix_MultVec3f(gGfxMatrix, &src, &dest); - planet[planetId].pos.x = dest.x; - planet[planetId].pos.y = dest.y; - planet[planetId].pos.z = dest.z; + sPlanets[planetId].pos.x = dest.x; + sPlanets[planetId].pos.y = dest.y; + sPlanets[planetId].pos.z = dest.z; Matrix_Pop(&gGfxMatrix); @@ -4265,7 +4390,7 @@ void func_menu_801A6A98(PlanetId planetId) { s32 mask; s32 temp; - if ((planet[planetId].alpha == 0) && (planetId != sCurrentPlanetId)) { + if ((sPlanets[planetId].alpha == 0) && (planetId != sCurrentPlanetId)) { return; } @@ -4298,7 +4423,7 @@ void func_menu_801A6A98(PlanetId planetId) { func_menu_801A74F4(planetId); } - if (planet[planetId].unk_28 == 4) { + if (sPlanets[planetId].anim == PL_ANIM_SPIN) { if (planetId != PLANET_VENOM) { if ((planetId != PLANET_AQUAS) && (planetId != PLANET_TITANIA)) { @@ -4410,8 +4535,8 @@ void func_menu_801A6EC0(PlanetId planetId) { Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], 1); - if (planet[planetId].unk_28 == 2) { - if (planetId == 2) { + if (sPlanets[planetId].anim == PL_ANIM_ROTATE_Y) { + if (planetId == PLANET_BOLSE) { Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801AFFF8, 1); Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFFF4, 1); } else { @@ -4420,16 +4545,16 @@ void func_menu_801A6EC0(PlanetId planetId) { } } - Matrix_RotateZ(gGfxMatrix, M_DTOR * (planet[planetId].zAngle), 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * (sPlanets[planetId].orbit.tilt), 1); - Matrix_Scale(gGfxMatrix, planet[planetId].scale, planet[planetId].scale, planet[planetId].scale, 1); + Matrix_Scale(gGfxMatrix, sPlanets[planetId].scale, sPlanets[planetId].scale, sPlanets[planetId].scale, 1); Matrix_SetGfxMtx(&gMasterDisp); - if (planet[planetId].unk_28 == 2) { - x2 = D_menu_801CE960[14].x - D_menu_801CE960[planetId].x; - y2 = D_menu_801CE960[14].y - D_menu_801CE960[planetId].y; - z2 = D_menu_801CE960[14].z - D_menu_801CE960[planetId].z; + if (sPlanets[planetId].anim == PL_ANIM_ROTATE_Y) { + x2 = D_menu_801CE960[PLANET_SOLAR].x - D_menu_801CE960[planetId].x; + y2 = D_menu_801CE960[PLANET_SOLAR].y - D_menu_801CE960[planetId].y; + z2 = D_menu_801CE960[PLANET_SOLAR].z - D_menu_801CE960[planetId].z; x1 = Math_Atan2F(y2, sqrtf(SQ(x2) + SQ(z2))); y1 = -Math_Atan2F(x2, z2); @@ -4458,41 +4583,41 @@ void func_menu_801A6EC0(PlanetId planetId) { } void func_menu_801A7230(PlanetId planetId) { - switch (planet[planetId].unk_28) { - case 0: + switch (sPlanets[planetId].anim) { + case PL_ANIM_STATIC: if ((D_menu_801CD944 == 3 || planetId == sCurrentPlanetId || planetId == sNextPlanetId) && D_menu_801CD944 != 1 && D_menu_801CD944 != 7) { RCP_SetupDL(&gMasterDisp, 0x35); } else { RCP_SetupDL(&gMasterDisp, 0x29); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, planet[planetId].alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); } break; - case 2: + case PL_ANIM_ROTATE_Y: if ((D_menu_801CD944 == 3 || planetId == sCurrentPlanetId || planetId == sNextPlanetId) && D_menu_801CD944 != 1 && D_menu_801CD944 != 7) { RCP_SetupDL(&gMasterDisp, 0x17); } else { RCP_SetupDL(&gMasterDisp, 0x2E); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, planet[planetId].alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); } break; - case 1: - case 4: + case PL_ANIM_BILLBOARD: + case PL_ANIM_SPIN: RCP_SetupDL(&gMasterDisp, 0x40); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, planet[planetId].alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); break; - case 3: + case PL_ANIM_ROTATE_Z: RCP_SetupDL(&gMasterDisp, 0x43); - gDPSetPrimColor(gMasterDisp++, 0, 0, 240, 0, 0, planet[planetId].alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, 240, 0, 0, sPlanets[planetId].alpha); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); - planet[planetId].zAngle += 0.1f; + sPlanets[planetId].orbit.tilt += 0.1f; break; } @@ -4501,16 +4626,16 @@ void func_menu_801A7230(PlanetId planetId) { Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[planet[planetId].id]); + gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } void func_menu_801A74F4(PlanetId planetId) { static f32 D_menu_801B6A74 = 0.0f; - s32 alpha = planet[13].alpha; + s32 alpha = sPlanets[PLANET_VENOM].alpha; - if (planet[planetId].alpha > 128) { + if (sPlanets[planetId].alpha > 128) { alpha = 128; } @@ -4527,7 +4652,7 @@ void func_menu_801A74F4(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[planet[planetId].id]); + gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); @@ -4541,13 +4666,13 @@ void func_menu_801A7684(PlanetId planetId) { r = g = b = 255; - if (planetId == 7) { + if (planetId == PLANET_MACBETH) { r = g = b = 64; } RCP_SetupDL(&gMasterDisp, 0x40); - gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, planet[planetId].alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, sPlanets[planetId].alpha); Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); @@ -4561,7 +4686,7 @@ void func_menu_801A7684(PlanetId planetId) { void func_menu_801A77B0(PlanetId planetId) { RCP_SetupDL(&gMasterDisp, 0x40); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, planet[planetId].alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); Matrix_Push(&gGfxMatrix); @@ -4571,7 +4696,7 @@ void func_menu_801A77B0(PlanetId planetId) { Matrix_RotateY(gGfxMatrix, M_DTOR * 180.0f, 1); } - Matrix_RotateZ(gGfxMatrix, M_DTOR * planet[planetId].zAngle, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); Matrix_Scale(gGfxMatrix, 1.6f, 1.6f, 1.6f, 1); Matrix_SetGfxMtx(&gMasterDisp); @@ -4584,14 +4709,14 @@ void func_menu_801A77B0(PlanetId planetId) { void func_menu_801A791C(PlanetId planetId) { RCP_SetupDL(&gMasterDisp, 0x43); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 175, 175, planet[planetId].alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 175, 175, sPlanets[planetId].alpha); gDPSetEnvColor(gMasterDisp++, 73, 31, 15, 0); Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); - Matrix_RotateZ(gGfxMatrix, M_DTOR * -planet[planetId].zAngle, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * -sPlanets[planetId].orbit.tilt, 1); Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, 1); Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1); @@ -4606,13 +4731,13 @@ void func_menu_801A791C(PlanetId planetId) { void func_menu_801A7A84(PlanetId planetId) { RCP_SetupDL(&gMasterDisp, 0x43); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 175, 175, planet[planetId].alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 175, 175, sPlanets[planetId].alpha); gDPSetEnvColor(gMasterDisp++, 73, 31, 15, 0); Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); - Matrix_RotateZ(gGfxMatrix, M_DTOR * -planet[planetId].zAngle, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * -sPlanets[planetId].orbit.tilt, 1); Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, 1); Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1); @@ -4624,9 +4749,9 @@ void func_menu_801A7A84(PlanetId planetId) { } void func_menu_801A7BEC(f32* zAngle, f32 next, f32 scale) { - s32 alpha = planet[13].alpha; + s32 alpha = sPlanets[PLANET_VENOM].alpha; - if (planet[13].alpha > 128) { + if (sPlanets[PLANET_VENOM].alpha > 128) { alpha = 128; } @@ -4637,7 +4762,7 @@ void func_menu_801A7BEC(f32* zAngle, f32 next, f32 scale) { Matrix_Push(&gGfxMatrix); - Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[13]); + Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[PLANET_VENOM]); Matrix_RotateZ(gGfxMatrix, M_DTOR * (*zAngle), 1); Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); @@ -4897,7 +5022,7 @@ void func_menu_801A8738(void) { Matrix_Push(&gGfxMatrix); - Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[9]); + Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[PLANET_CORNERIA]); Matrix_RotateZ(gGfxMatrix, M_DTOR * -50.0f, 1); Matrix_Translate(gGfxMatrix, 0.0f, 25.0f, 0.0f, 1); Matrix_Scale(gGfxMatrix, D_menu_801CEB3C, D_menu_801CEB3C, D_menu_801CEB3C, 1); @@ -4915,7 +5040,7 @@ void func_menu_801A89BC(PlanetId planetId, s32 arg1) { s32 temp2; f32 temp; - if (planet[planetId].alpha == 0) { + if (sPlanets[planetId].alpha == 0) { return; } @@ -5068,8 +5193,8 @@ void func_menu_801A9224(void) { s32 i; s32 mask; - if ((planet[PLANET_METEO].alpha != 0) || (sCurrentPlanetId == 0)) { - if ((sCurrentPlanetId == 0) && (D_menu_801CD944 == 2) && (D_menu_801CD95C != 0)) { + if ((sPlanets[PLANET_METEO].alpha != 0) || (sCurrentPlanetId == PLANET_METEO)) { + if ((sCurrentPlanetId == PLANET_METEO) && (D_menu_801CD944 == 2) && (D_menu_801CD95C != 0)) { mask = 0x00000001; } else { mask = 0xFFFFFFFF; @@ -5079,7 +5204,7 @@ void func_menu_801A9224(void) { RCP_SetupDL(&gMasterDisp, 0x35); } else { RCP_SetupDL(&gMasterDisp, 0x40); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, planet[PLANET_METEO].alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[PLANET_METEO].alpha); } if (gGameFrameCount & mask) { @@ -5097,7 +5222,7 @@ void func_menu_801A9224(void) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[0]); + gSPDisplayList(gMasterDisp++, D_menu_801B68F8[PLANET_METEO]); Matrix_Pop(&gGfxMatrix); } @@ -5117,7 +5242,7 @@ void func_menu_801A9448(void) { s32 mask; static f32 D_menu_801B6A80 = -22.0f; - if ((planet[PLANET_AREA_6].alpha == 0) && (sCurrentPlanetId != PLANET_AREA_6)) { + if ((sPlanets[PLANET_AREA_6].alpha == 0) && (sCurrentPlanetId != PLANET_AREA_6)) { return; } @@ -5131,7 +5256,7 @@ void func_menu_801A9448(void) { RCP_SetupDL(&gMasterDisp, 0x17); } else { RCP_SetupDL(&gMasterDisp, 0x2E); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, planet[PLANET_AREA_6].alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[PLANET_AREA_6].alpha); } dest.x = 0.0f; @@ -5201,7 +5326,7 @@ void func_menu_801A9910(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801CEA6C); for (i = 0; i < D_menu_801AF834[var_s0].height; i++) { - TextureRect_8bIA(&gMasterDisp, D_menu_801AF834[var_s0].addr + (D_menu_801AF834[var_s0].width * i), + TextureRect_8bIA(&gMasterDisp, D_menu_801AF834[var_s0].texture + (D_menu_801AF834[var_s0].width * i), D_menu_801AF834[var_s0].width, 1, D_menu_801AF834[var_s0].xPos, 20.0f + (1.0f * i), 1.0f, 1.0f); } @@ -5297,12 +5422,12 @@ void func_menu_801A9A8C(void) { TextureRect_8bIA(&gMasterDisp, sp54, 16, 15, D_menu_801B6AC0[1], D_menu_801B6AC8[1], 1.0f, 1.0f); for (i = 0; i < D_menu_801AF834[sp58].height; i++) { - TextureRect_8bIA(&gMasterDisp, D_menu_801AF834[sp58].addr + (D_menu_801AF834[sp58].width * i), + TextureRect_8bIA(&gMasterDisp, D_menu_801AF834[sp58].texture + (D_menu_801AF834[sp58].width * i), D_menu_801AF834[sp58].width, 1, D_menu_801AF834[sp58].xPos, 94.0f + (1.0f * i), 1.0f, 1.0f); } for (i = 0; i < D_menu_801AF914[sp58].height; i++) { - TextureRect_8bIA(&gMasterDisp, D_menu_801AF914[sp58].addr + (D_menu_801AF914[sp58].width * i), + TextureRect_8bIA(&gMasterDisp, D_menu_801AF914[sp58].texture + (D_menu_801AF914[sp58].width * i), D_menu_801AF914[sp58].width, 1, D_menu_801AF914[sp58].xPos, 140.0f + (1.0f * i), 1.0f, 1.0f); } } @@ -5407,7 +5532,7 @@ void func_menu_801AA1CC(s32 arg0) { r = g = b = 255; if (i < arg0) { temp = func_menu_801A655C(*ptr, *(ptr + 1)); - switch (D_menu_801AFD18[temp].unk_00) { + switch (sPaths[temp].type) { case 0: r = 16; g = 64; @@ -5482,10 +5607,8 @@ void func_menu_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { void func_menu_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { s32 mask = 0xFFFFFFFF; - if (gGameState == GSTATE_MAP) { - if (planetId == sCurrentPlanetId) { - mask = 0x00000010; - } + if ((gGameState == GSTATE_MAP) && (planetId == sCurrentPlanetId)) { + mask = 0x00000010; } switch (planetId) { @@ -5498,11 +5621,11 @@ void func_menu_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * (planet[planetId].zAngle), 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * (sPlanets[planetId].orbit.tilt), 1); Matrix_Scale(gGfxMatrix, 0.11f, 0.11f, 0.11f, 1); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[planet[planetId].id]); + gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); @@ -5510,7 +5633,7 @@ void func_menu_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, 1); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[planet[planetId].id]); + gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5525,18 +5648,18 @@ void func_menu_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, x - 0.4f, y + 0.9f, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * planet[planetId].zAngle, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); Matrix_Scale(gGfxMatrix, 0.1f, 0.1f, 0.1f, 1); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[planet[planetId].id]); + gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); Matrix_Translate(gGfxMatrix, 18.0f, -20.0f, 0.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[planet[planetId].id]); + gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } break; @@ -5552,12 +5675,12 @@ void func_menu_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * planet[planetId].zAngle, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); Matrix_Scale(gGfxMatrix, 0.09f, 0.09f, 0.09f, 1); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[planet[planetId].id]); + gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5574,12 +5697,12 @@ void func_menu_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, 1); Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFFF4, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * planet[planetId].zAngle, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); Matrix_Scale(gGfxMatrix, 0.004f, 0.004f, 0.004f, 1); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[planet[planetId].id]); + gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5596,12 +5719,12 @@ void func_menu_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, 1); Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFFFC, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * planet[planetId].zAngle, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); Matrix_Scale(gGfxMatrix, 0.003f, 0.003f, 0.003f, 1); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[planet[planetId].id]); + gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5616,14 +5739,14 @@ void func_menu_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * planet[planetId].zAngle, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); Matrix_Scale(gGfxMatrix, 0.1f, 0.1f, 0.1f, 1); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[planet[planetId].id]); + gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); - if (planet[planetId].unk_28 == 4) { + if (sPlanets[planetId].anim == PL_ANIM_SPIN) { if (planetId != PLANET_VENOM && planetId != PLANET_AQUAS) { Matrix_SetGfxMtx(&gMasterDisp); if (planetId == PLANET_MACBETH) { @@ -6012,10 +6135,10 @@ void func_menu_801AC200(s32 index) { r = 1.0f; } - if (D_menu_801AFD18[index].unk_14 == 2) { - vec.x = (x / r) * (r / (D_menu_801AFD18[index].unk_0C - 1)); - vec.y = (y / r) * (r / (D_menu_801AFD18[index].unk_0C - 1)); - vec.z = (z / r) * (r / (D_menu_801AFD18[index].unk_0C - 1)); + if (sPaths[index].unk_14 == 2) { + vec.x = (x / r) * (r / (sPaths[index].length - 1)); + vec.y = (y / r) * (r / (sPaths[index].length - 1)); + vec.z = (z / r) * (r / (sPaths[index].length - 1)); D_menu_801CEEB0.x = gUnkEntities30[index].unk_04.x + (vec.x * D_menu_801CEEA0); D_menu_801CEEB0.y = gUnkEntities30[index].unk_04.y + (vec.y * D_menu_801CEEA0); @@ -6044,7 +6167,7 @@ void func_menu_801AC200(s32 index) { } D_menu_801CEEA0++; - if (D_menu_801CEEA0 > D_menu_801AFD18[index].unk_0C - 1) { + if (D_menu_801CEEA0 > sPaths[index].length - 1) { D_menu_801CEEA0 = 0; } @@ -6077,8 +6200,8 @@ void func_menu_801AC200(s32 index) { } } - if (D_menu_801AFD18[index].unk_14 == 5) { - func_menu_801AC80C(D_menu_801AFD18[index].unk_00); + if (sPaths[index].unk_14 == 5) { + func_menu_801AC80C(sPaths[index].type); } else { func_menu_801AC530(index); } @@ -6121,9 +6244,9 @@ void func_menu_801AC530(s32 index) { Matrix_MultVec3f(gGfxMatrix, &src, &dest); - x = D_menu_801CE960[14].x - dest.x; - y = D_menu_801CE960[14].y - dest.y; - z = D_menu_801CE960[14].z - dest.z; + x = D_menu_801CE960[PLANET_SOLAR].x - dest.x; + y = D_menu_801CE960[PLANET_SOLAR].y - dest.y; + z = D_menu_801CE960[PLANET_SOLAR].z - dest.z; x1 = Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); y1 = -Math_Atan2F(x, z); @@ -6147,13 +6270,13 @@ void func_menu_801AC530(s32 index) { Matrix_Pop(&gGfxMatrix); } -void func_menu_801AC80C(s32 arg0) { +void func_menu_801AC80C(PathType pathType) { static f32 D_menu_801B6B30 = 0.0f; s32 r; s32 g; s32 b; - if (arg0 == 3) { + if (pathType == PL_WARP_YLW) { r = 240; g = 160; b = 0; @@ -6188,32 +6311,32 @@ void func_menu_801AC80C(s32 arg0) { u32 padding_801B6B34[3] = { 0, 0, 0 }; -UnkStruct_D_menu_801B8294 D_menu_801B6B40[] = { - { 0.0f, 260.47226f, 1477.2115f, 0.0f, -17.364819f, -98.480774f }, - { 0.0f, 20.159666f, 759.7326f, 0.0f, -2.652588f, -99.96481f }, - { -45.790363f, 0.712088f, 336.90164f, 13.467754f, -0.209438f, -99.08872f }, - { -59.033607f, -7.952868f, 104.171906f, 49.19467f, 6.62739f, -86.80992f }, - { -39.374687f, 50.69824f, 40.264343f, 65.62447f, -4.497063f, -67.10724f }, - { -57.28257f, 48.529156f, -34.806377f, 95.470955f, 7.118073f, -11.322705f }, - { -64.80925f, 53.131527f, -77.35162f, 81.011566f, 3.335592f, 15.689522f }, - { -32.061317f, 30.244366f, -127.72071f, 32.061317f, 29.755634f, 61.72071f }, - { -62.32031f, 25.741756f, -222.99486f, 31.160154f, 32.12912f, 61.99743f }, - { -105.85609f, 14.339533f, -355.72162f, 31.134144f, 34.606018f, 61.91813f }, - { -136.99023f, 9.733513f, -450.63974f, 31.134144f, 34.606018f, 61.91813f }, - { -189.91827f, 1.90328f, -612.00055f, 31.134144f, 34.606018f, 61.91813f }, +CameraPoint D_menu_801B6B40[] = { + { { 0.0f, 260.47226f, 1477.2115f }, { 0.0f, -17.364819f, -98.480774f } }, + { { 0.0f, 20.159666f, 759.7326f }, { 0.0f, -2.652588f, -99.96481f } }, + { { -45.790363f, 0.712088f, 336.90164f }, { 13.467754f, -0.209438f, -99.08872f } }, + { { -59.033607f, -7.952868f, 104.171906f }, { 49.19467f, 6.62739f, -86.80992f } }, + { { -39.374687f, 50.69824f, 40.264343f }, { 65.62447f, -4.497063f, -67.10724f } }, + { { -57.28257f, 48.529156f, -34.806377f }, { 95.470955f, 7.118073f, -11.322705f } }, + { { -64.80925f, 53.131527f, -77.35162f }, { 81.011566f, 3.335592f, 15.689522f } }, + { { -32.061317f, 30.244366f, -127.72071f }, { 32.061317f, 29.755634f, 61.72071f } }, + { { -62.32031f, 25.741756f, -222.99486f }, { 31.160154f, 32.12912f, 61.99743f } }, + { { -105.85609f, 14.339533f, -355.72162f }, { 31.134144f, 34.606018f, 61.91813f } }, + { { -136.99023f, 9.733513f, -450.63974f }, { 31.134144f, 34.606018f, 61.91813f } }, + { { -189.91827f, 1.90328f, -612.00055f }, { 31.134144f, 34.606018f, 61.91813f } }, }; -UnkStruct_D_menu_801B8294 D_menu_801B6C60[] = { - { 230.0f, -20.0f, -0.000004f, 90.0f, -20.0f, 0.000002f }, - { 217.92657f, 45.0272f, -0.006961f, 96.70746f, -25.01511f, 0.003867f }, - { 161.75992f, 66.4626f, 50.403748f, 73.1124f, -6.102585f, -28.316711f }, - { 117.362366f, 2.619884f, 27.208603f, 84.39606f, -4.366472f, -45.34767f }, - { 19.168537f, 2.445203f, 27.57978f, 7.556181f, -4.366434f, -49.249607f }, - { -116.45978f, 1.270139f, 27.862812f, -109.60754f, -2.268106f, -49.75502f }, - { -117.43788f, 1.272571f, 27.864624f, -110.646645f, -2.272449f, -49.758255f }, - { -118.43771f, 1.314066f, 27.862713f, -111.646935f, -2.346546f, -49.754845f }, - { -118.44501f, 1.314066f, 27.862074f, -111.63391f, -2.346546f, -49.753704f }, - { -118.46446f, 1.314066f, 27.860361f, -111.59918f, -2.346546f, -49.750645f }, +CameraPoint D_menu_801B6C60[] = { + { { 230.0f, -20.0f, -0.000004f }, { 90.0f, -20.0f, 0.000002f } }, + { { 217.92657f, 45.0272f, -0.006961f }, { 96.70746f, -25.01511f, 0.003867f } }, + { { 161.75992f, 66.4626f, 50.403748f }, { 73.1124f, -6.102585f, -28.316711f } }, + { { 117.362366f, 2.619884f, 27.208603f }, { 84.39606f, -4.366472f, -45.34767f } }, + { { 19.168537f, 2.445203f, 27.57978f }, { 7.556181f, -4.366434f, -49.249607f } }, + { { -116.45978f, 1.270139f, 27.862812f }, { -109.60754f, -2.268106f, -49.75502f } }, + { { -117.43788f, 1.272571f, 27.864624f }, { -110.646645f, -2.272449f, -49.758255f } }, + { { -118.43771f, 1.314066f, 27.862713f }, { -111.646935f, -2.346546f, -49.754845f } }, + { { -118.44501f, 1.314066f, 27.862074f }, { -111.63391f, -2.346546f, -49.753704f } }, + { { -118.46446f, 1.314066f, 27.860361f }, { -111.59918f, -2.346546f, -49.750645f } }, }; void func_menu_801AC9A0(s32 index) { @@ -6286,7 +6409,7 @@ void func_menu_801AC9A0(s32 index) { case 3: case 4: gUnkEntities30[index].unk_24 = target; - gUnkEntities30[index].unk_2F = D_menu_801AFD18[index].unk_18; + gUnkEntities30[index].unk_2F = sPaths[index].alpha; break; } @@ -6296,30 +6419,30 @@ void func_menu_801AC9A0(s32 index) { gUnkEntities30[index].unk_2E = 32; gUnkEntities30[index].unk_28 = 4.0f; } else { - switch (D_menu_801AFD18[index].unk_00) { - case 0: + switch (sPaths[index].type) { + case PL_PATH_BLU: gUnkEntities30[index].unk_2C = 16; gUnkEntities30[index].unk_2D = 64; gUnkEntities30[index].unk_2E = 255; gUnkEntities30[index].unk_28 = 8.0f; break; - case 1: + case PL_PATH_YLW: gUnkEntities30[index].unk_2C = 255; gUnkEntities30[index].unk_2D = 175; gUnkEntities30[index].unk_2E = 0; gUnkEntities30[index].unk_28 = 8.0f; break; - case 2: + case PL_PATH_RED: gUnkEntities30[index].unk_2C = 255; gUnkEntities30[index].unk_2D = 0; gUnkEntities30[index].unk_2E = 0; gUnkEntities30[index].unk_28 = 8.0f; break; - case 3: - case 4: + case PL_WARP_YLW: + case PL_WARP_RED: gUnkEntities30[index].unk_2C = 0; gUnkEntities30[index].unk_2D = 0; gUnkEntities30[index].unk_2E = 0; @@ -6346,80 +6469,80 @@ void func_menu_801ACD90(s32 index, Vec3f* src, Vec3f* dest) { temp1 = 40.0f; - if (D_menu_801AFD18[index].unk_04 == PLANET_FORTUNA) { + if (sPaths[index].start == PLANET_FORTUNA) { temp1 = 50.0f; } - if (D_menu_801AFD18[index].unk_04 == PLANET_TITANIA) { + if (sPaths[index].start == PLANET_TITANIA) { temp1 = 60.0f; } - if (D_menu_801AFD18[index].unk_04 == PLANET_SOLAR) { + if (sPaths[index].start == PLANET_SOLAR) { temp1 = 20.0f; } - if (D_menu_801AFD18[index].unk_04 == PLANET_METEO) { + if (sPaths[index].start == PLANET_METEO) { temp1 = 60.0f; } - if (D_menu_801AFD18[index].unk_04 == PLANET_SECTOR_X) { + if (sPaths[index].start == PLANET_SECTOR_X) { temp1 = 20.0f; } - if (D_menu_801AFD18[index].unk_04 == PLANET_SECTOR_Y) { + if (sPaths[index].start == PLANET_SECTOR_Y) { temp1 = 20.0f; } - if (D_menu_801AFD18[index].unk_04 == PLANET_SECTOR_Z) { + if (sPaths[index].start == PLANET_SECTOR_Z) { temp1 = 20.0f; } - if (D_menu_801AFD18[index].unk_04 == PLANET_AREA_6) { + if (sPaths[index].start == PLANET_AREA_6) { temp1 = 1200.0f; } - if (D_menu_801AFD18[index].unk_04 == PLANET_BOLSE) { + if (sPaths[index].start == PLANET_BOLSE) { temp1 = 1200.0f; } temp2 = 40.0f; - if (D_menu_801AFD18[index].unk_08 == PLANET_TITANIA) { + if (sPaths[index].end == PLANET_TITANIA) { temp2 = 60.0f; } - if (D_menu_801AFD18[index].unk_08 == PLANET_FORTUNA) { + if (sPaths[index].end == PLANET_FORTUNA) { temp2 = 50.0f; } - if (D_menu_801AFD18[index].unk_08 == PLANET_SOLAR) { + if (sPaths[index].end == PLANET_SOLAR) { temp2 = 20.0f; } - if (D_menu_801AFD18[index].unk_08 == PLANET_METEO) { + if (sPaths[index].end == PLANET_METEO) { temp2 = 60.0f; } - if (D_menu_801AFD18[index].unk_08 == PLANET_SECTOR_X) { + if (sPaths[index].end == PLANET_SECTOR_X) { temp2 = 20.0f; } - if (D_menu_801AFD18[index].unk_08 == PLANET_SECTOR_Y) { + if (sPaths[index].end == PLANET_SECTOR_Y) { temp2 = 20.0f; } - if (D_menu_801AFD18[index].unk_08 == PLANET_SECTOR_Z) { + if (sPaths[index].end == PLANET_SECTOR_Z) { temp2 = 20.0f; } - if (D_menu_801AFD18[index].unk_08 == PLANET_AREA_6) { + if (sPaths[index].end == PLANET_AREA_6) { temp2 = 1200.0f; } - if (D_menu_801AFD18[index].unk_08 == PLANET_BOLSE) { + if (sPaths[index].end == PLANET_BOLSE) { temp2 = 1200.0f; } - if (D_menu_801AFD18[index].unk_08 == PLANET_VENOM) { + if (sPaths[index].end == PLANET_VENOM) { temp2 = 30.0f; } - x = planet[D_menu_801AFD18[index].unk_08].pos.x - planet[D_menu_801AFD18[index].unk_04].pos.x; - y = planet[D_menu_801AFD18[index].unk_08].pos.y - planet[D_menu_801AFD18[index].unk_04].pos.y; - z = planet[D_menu_801AFD18[index].unk_08].pos.z - planet[D_menu_801AFD18[index].unk_04].pos.z; + x = sPlanets[sPaths[index].end].pos.x - sPlanets[sPaths[index].start].pos.x; + y = sPlanets[sPaths[index].end].pos.y - sPlanets[sPaths[index].start].pos.y; + z = sPlanets[sPaths[index].end].pos.z - sPlanets[sPaths[index].start].pos.z; r = sqrtf(SQ(x) + SQ(y) + SQ(z)); - x1 = planet[D_menu_801AFD18[index].unk_04].pos.x + (temp1 * planet[D_menu_801AFD18[index].unk_04].scale * (x / r)); - y1 = planet[D_menu_801AFD18[index].unk_04].pos.y + (temp1 * planet[D_menu_801AFD18[index].unk_04].scale * (y / r)); - z1 = planet[D_menu_801AFD18[index].unk_04].pos.z + (temp1 * planet[D_menu_801AFD18[index].unk_04].scale * (z / r)); + x1 = sPlanets[sPaths[index].start].pos.x + (temp1 * sPlanets[sPaths[index].start].scale * (x / r)); + y1 = sPlanets[sPaths[index].start].pos.y + (temp1 * sPlanets[sPaths[index].start].scale * (y / r)); + z1 = sPlanets[sPaths[index].start].pos.z + (temp1 * sPlanets[sPaths[index].start].scale * (z / r)); - x2 = planet[D_menu_801AFD18[index].unk_08].pos.x + (temp2 * planet[D_menu_801AFD18[index].unk_08].scale * (-x / r)); - y2 = planet[D_menu_801AFD18[index].unk_08].pos.y + (temp2 * planet[D_menu_801AFD18[index].unk_08].scale * (-y / r)); - z2 = planet[D_menu_801AFD18[index].unk_08].pos.z + (temp2 * planet[D_menu_801AFD18[index].unk_08].scale * (-z / r)); + x2 = sPlanets[sPaths[index].end].pos.x + (temp2 * sPlanets[sPaths[index].end].scale * (-x / r)); + y2 = sPlanets[sPaths[index].end].pos.y + (temp2 * sPlanets[sPaths[index].end].scale * (-y / r)); + z2 = sPlanets[sPaths[index].end].pos.z + (temp2 * sPlanets[sPaths[index].end].scale * (-z / r)); src->x = x1; src->y = y1; diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 0af051ea..2b7349a1 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -510,12 +510,12 @@ void Option_Setup(void) { func_800A5D6C(); - D_80177978 = 0.0f; - D_80177980 = 0.0f; - D_80177988 = 10.0f; - D_801779A0 = 0.0f; - D_801779B8 = 0.0f; - D_801779C0 = 0.0f; + gCsCamEyeX = 0.0f; + gCsCamEyeY = 0.0f; + gCsCamEyeZ = 10.0f; + gCsCamAtX = 0.0f; + gCsCamAtY = 0.0f; + gCsCamAtZ = 0.0f; D_menu_801B9224 = -80.0f; D_menu_801B9228 = 0.0f; @@ -3518,8 +3518,7 @@ void func_menu_8019BC44(f32 x, f32 y, f32 arg2, f32 arg3, f32 arg4, f32 arg5) { void func_menu_8019BDF0(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, D_80177978, D_80177980, D_80177988, D_801779A0, D_801779B8, D_801779C0, 0.0f, 1.0f, 0.0f, - 1); + Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 1.0f, 0.0f, 1); } void func_menu_8019BE7C(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5) { diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 4cafa422..3ac7adaf 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -69,7 +69,7 @@ s32 D_menu_801B8284; s32 D_menu_801B8288; f32 D_menu_801B828C; f32 D_menu_801B8290; -UnkStruct_D_menu_801B8294* D_menu_801B8294; +CameraPoint* D_menu_801B8294; s32 D_menu_801B8298; f32 D_menu_801B829C; f32 D_menu_801B82A0; @@ -388,7 +388,7 @@ void func_menu_80187B00(void) { case 1: if (D_menu_801B82BC != 0) { - func_800B6F50(D_80177978, D_80177980, D_80177988, D_801779A0, D_801779B8, D_801779C0); + func_800B6F50(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); D_8017842C -= 1.0f; if (D_menu_801B82BC == 60) { func_800182F4(0x103C00FF); @@ -565,9 +565,9 @@ void func_menu_801881FC(void) { D_menu_801B86AC = 0.0f; D_menu_801B86B0 = 430.0f; - D_801779A0 = 0.0f; - D_801779B8 = 180.0f; - D_801779C0 = 0.0f; + gCsCamAtX = 0.0f; + gCsCamAtY = 180.0f; + gCsCamAtZ = 0.0f; D_menu_801B829C = 0.0f; D_menu_801B82A0 = 1.0f; @@ -858,9 +858,9 @@ void func_menu_801888E8(void) { D_menu_801B84E8->unk_18 += 0.6f; - func_menu_80191320(1, &D_80177978, &D_80177980, &D_80177988, &D_801779A0, &D_801779B8, &D_801779C0, D_menu_801B86A8, + func_menu_80191320(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, D_menu_801B86AC, D_menu_801B86B0); - func_800B6F50(D_80177978, D_80177980, D_80177988, D_801779A0, D_801779B8, D_801779C0); + func_800B6F50(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); D_8017842C -= 0.5f; @@ -1003,8 +1003,8 @@ void func_menu_801894E8(void) { D_menu_801B82A0 = 1.0f; D_menu_801B82A4 = 0.0f; - func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &D_80177978, &D_80177980, &D_80177988, - D_menu_801B86B4, &D_801779A0, &D_801779B8, &D_801779C0, D_menu_801B86B8, D_menu_801B86A8, + func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, D_menu_801B86AC); D_menu_801B7BF0 = 0; @@ -1102,12 +1102,12 @@ void func_menu_8018994C(void) { D_menu_801B828C = 0.0f; D_menu_801B8290 = 0.011f; - D_80177978 = D_menu_801B6B40[0].unk_00; - D_80177980 = D_menu_801B6B40[0].unk_04; - D_80177988 = D_menu_801B6B40[0].unk_08; - D_801779A0 = D_menu_801B6B40[0].unk_0C; - D_801779B8 = D_menu_801B6B40[0].unk_10; - D_801779C0 = D_menu_801B6B40[0].unk_14; + gCsCamEyeX = D_menu_801B6B40[0].eye.x; + gCsCamEyeY = D_menu_801B6B40[0].eye.y; + gCsCamEyeZ = D_menu_801B6B40[0].eye.z; + gCsCamAtX = D_menu_801B6B40[0].at.x; + gCsCamAtY = D_menu_801B6B40[0].at.y; + gCsCamAtZ = D_menu_801B6B40[0].at.z; D_menu_801B82C0 = 10; } @@ -1212,7 +1212,7 @@ void func_menu_8018994C(void) { func_menu_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); if (D_menu_801B7BE8 != 0) { - func_800B6F50(D_80177978, D_80177980, D_80177988, D_801779A0, D_801779B8, D_801779C0); + func_800B6F50(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); } D_8017842C -= D_menu_801B7BE8; @@ -1300,12 +1300,12 @@ void func_menu_8018A338(void) { D_menu_801B82A0 = 1.0f; D_menu_801B82A4 = 0.0f; - func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &D_80177978, &D_80177980, &D_80177988, - D_menu_801B86B4, &D_801779A0, &D_801779B8, &D_801779C0, D_menu_801B86B8, D_menu_801B86A8, + func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, D_menu_801B86AC); } -static UnkStruct_D_menu_801B8294 D_menu_801ADA94[50] = { +static CameraPoint D_menu_801ADA94[50] = { { 70.68093f, 95.06561f, -146.52567f, 9.829767f, 121.2336f, -642.1186f }, { 205.506f, 142.9332f, -268.0091f, 168.6235f, 176.76671f, -765.49774f }, { 247.74275f, 218.72449f, -519.0222f, 186.81432f, 211.56888f, -1015.24445f }, @@ -1492,9 +1492,9 @@ void func_menu_8018ABC0(void) { D_menu_801B86C8 = 0.0f; D_menu_801B86CC = 0.0f; - D_801779A0 = -10.0f; - D_801779B8 = 0.0f; - D_801779C0 = 0.0f; + gCsCamAtX = -10.0f; + gCsCamAtY = 0.0f; + gCsCamAtZ = 0.0f; D_menu_801B829C = 0.0f; D_menu_801B82A0 = 1.0f; @@ -1523,8 +1523,8 @@ void func_menu_8018ACEC(void) { case 1: Math_SmoothStepToF(&D_menu_801B86A8, 30.0f, D_menu_801B82CC, 100.0f, 0.0001f); Math_SmoothStepToF(&D_menu_801B86AC, -15.0f, D_menu_801B82CC, 100.0f, 0.0001f); - Math_SmoothStepToF(&D_801779A0, 0.0f, 0.05f, 100.0f, 0.0001f); - Math_SmoothStepToF(&D_801779B8, -40.0f, D_menu_801B82CC, 100.0f, 0.0001f); + Math_SmoothStepToF(&gCsCamAtX, 0.0f, 0.05f, 100.0f, 0.0001f); + Math_SmoothStepToF(&gCsCamAtY, -40.0f, D_menu_801B82CC, 100.0f, 0.0001f); Math_SmoothStepToF(&D_menu_801B86B0, 100.0f, D_menu_801B82CC, 100.0f, 0.0001f); D_menu_801B82CC *= 1.04f; @@ -1546,10 +1546,10 @@ void func_menu_8018ACEC(void) { break; } - func_menu_80191320(1, &D_80177978, &D_80177980, &D_80177988, &D_801779A0, &D_801779B8, &D_801779C0, D_menu_801B86A8, + func_menu_80191320(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, D_menu_801B86AC, D_menu_801B86B0); func_menu_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); - func_800B6F50(D_80177978, D_80177980, D_80177988, D_801779A0, D_801779B8, D_801779C0); + func_800B6F50(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); D_8017842C += 2.0f; D_80178430 += 2.0f; @@ -1652,8 +1652,8 @@ void func_menu_8018B058(void) { D_menu_801B82A0 = 1.0f; D_menu_801B82A4 = 0.0f; - func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &D_80177978, &D_80177980, &D_80177988, - D_menu_801B86B4, &D_801779A0, &D_801779B8, &D_801779C0, D_menu_801B86B8, D_menu_801B86A8, + func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, D_menu_801B86AC); D_menu_801B9044 = 25.0f; @@ -1763,8 +1763,8 @@ void func_menu_8018B5C4(void) { D_menu_801B86B4 = 36.0f; D_menu_801B86B8 = -70.0f; - func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &D_80177978, &D_80177980, - &D_80177988, D_menu_801B86B4, &D_801779A0, &D_801779B8, &D_801779C0, D_menu_801B86B8, + func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, + &gCsCamEyeZ, D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, D_menu_801B86AC); D_menu_801B82B4 = 0; @@ -1838,8 +1838,8 @@ void func_menu_8018B5C4(void) { Math_SmoothStepToF(&D_menu_801B86B4, 16.0f, 0.01f, 100.0f, 0.01f); Math_SmoothStepToF(&D_menu_801B86AC, 138.0f, 0.01f, 100.0f, 0.01f); - func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &D_80177978, &D_80177980, &D_80177988, - D_menu_801B86B4, &D_801779A0, &D_801779B8, &D_801779C0, D_menu_801B86B8, D_menu_801B86A8, + func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, D_menu_801B86AC); D_menu_801B82B4++; break; @@ -1876,8 +1876,8 @@ void func_menu_8018B5C4(void) { Math_SmoothStepToF(&D_menu_801B86BC, 100.0f, 0.2f, 100.0f, 0.01f); Math_SmoothStepToF(&D_menu_801B86B4, 40.0f, 0.2f, 100.0f, 0.01f); - func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &D_80177978, &D_80177980, - &D_80177988, D_menu_801B86B4, &D_801779A0, &D_801779B8, &D_801779C0, D_menu_801B86B8, + func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, + &gCsCamEyeZ, D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, D_menu_801B86AC); if (D_menu_801B82B4 > 8) { @@ -2007,12 +2007,12 @@ void func_menu_8018C1C0(void) { D_menu_801B82A0 = 1.0f; D_menu_801B82A4 = 0.0f; - func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &D_80177978, &D_80177980, &D_80177988, - D_menu_801B86B4, &D_801779A0, &D_801779B8, &D_801779C0, D_menu_801B86B8, D_menu_801B86A8, + func_menu_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, D_menu_801B86AC); } -static UnkStruct_D_menu_801B8294 D_menu_801ADF84[50] = { +static CameraPoint D_menu_801ADF84[50] = { { -223.5775f, -61.156242f, -26.375984f, -53.867554f, -42.139626f, 44.77107f }, { -160.05501f, -67.74775f, 85.750084f, -61.486446f, -44.164986f, 29.322315f }, { -22.228004f, -79.54139f, 121.01903f, -15.555059f, -64.843475f, 85.51631f }, @@ -2130,7 +2130,7 @@ void func_menu_8018C644(void) { func_menu_80191844(D_menu_801B86A8, D_menu_801B86AC); func_menu_8018CC30(D_menu_801B8294, 9, D_menu_801B8290); func_menu_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); - func_800B6F50(D_80177978, D_80177980, D_80177988, D_801779A0, D_801779B8, D_801779C0); + func_800B6F50(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); D_menu_801B7BEC++; } @@ -2153,9 +2153,9 @@ void func_menu_8018CB90(void) { } } -void func_menu_8018CC30(UnkStruct_D_menu_801B8294* arg0, s32 arg1, f32 arg2) { +void func_menu_8018CC30(CameraPoint* arg0, s32 arg1, f32 arg2) { s32 var_a3; - Vec3f pos[2]; + CameraPoint pos; if (D_menu_801B8298 != -1) { if (D_menu_801B8298 == 0) { @@ -2173,13 +2173,13 @@ void func_menu_8018CC30(UnkStruct_D_menu_801B8294* arg0, s32 arg1, f32 arg2) { var_a3 = 2; } - func_menu_8018CD9C(&pos[0], &arg0[D_menu_801B8298], D_menu_801B828C, var_a3); - D_80177978 = pos[0].x; - D_80177980 = pos[0].y; - D_80177988 = pos[0].z; - D_801779A0 = pos[1].x; - D_801779B8 = pos[1].y; - D_801779C0 = pos[1].z; + func_menu_8018CD9C(&pos, &arg0[D_menu_801B8298], D_menu_801B828C, var_a3); + gCsCamEyeX = pos.eye.x; + gCsCamEyeY = pos.eye.y; + gCsCamEyeZ = pos.eye.z; + gCsCamAtX = pos.at.x; + gCsCamAtY = pos.at.y; + gCsCamAtZ = pos.at.z; D_menu_801B828C += arg2; @@ -2193,7 +2193,7 @@ void func_menu_8018CC30(UnkStruct_D_menu_801B8294* arg0, s32 arg1, f32 arg2) { } } -void func_menu_8018CD9C(Vec3f* pos, UnkStruct_D_menu_801B8294* arg1, f32 arg2, s32 arg3) { +void func_menu_8018CD9C(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3) { f32 temp1; f32 temp2; f32 temp3; @@ -2201,58 +2201,55 @@ void func_menu_8018CD9C(Vec3f* pos, UnkStruct_D_menu_801B8294* arg1, f32 arg2, s switch (arg3) { case 0: - temp1 = (1.0f - arg2) * (1.0f - arg2) * (1.0f - arg2); - temp2 = 21.0f * (arg2 * arg2 * arg2) / 12.0f - 9.0f * (arg2 * arg2) / 2.0f + 3.0f * arg2; - temp3 = -11.0f * (arg2 * arg2 * arg2) / 12.0f + 3.0f * (arg2 * arg2) / 2.0f; - temp4 = (arg2 * arg2 * arg2) / 6.0f; + temp1 = CUBE(1.0f - weight); + temp2 = 21.0f * CUBE(weight) / 12.0f - 9.0f * SQ(weight) / 2.0f + 3.0f * weight; + temp3 = -11.0f * CUBE(weight) / 12.0f + 3.0f * SQ(weight) / 2.0f; + temp4 = CUBE(weight) / 6.0f; break; case 1: - temp1 = ((1.0f - arg2) * (1.0f - arg2) * (1.0f - arg2)) / 4.0f; - temp2 = 7.0f * (arg2 * arg2 * arg2) / 12.0f - 5.0f * (arg2 * arg2) / 4.0f + arg2 / 4.0f + 7.0f / 12.0f; - temp3 = -(arg2 * arg2 * arg2) / 2.0f + (arg2 * arg2) / 2.0f + arg2 / 2.0f + 1.0f / 6.0f; - temp4 = (arg2 * arg2 * arg2) / 6.0f; + temp1 = CUBE(1.0f - weight) / 4.0f; + temp2 = 7.0f * CUBE(weight) / 12.0f - 5.0f * SQ(weight) / 4.0f + weight / 4.0f + 7.0f / 12.0f; + temp3 = -CUBE(weight) / 2.0f + SQ(weight) / 2.0f + weight / 2.0f + 1.0f / 6.0f; + temp4 = CUBE(weight) / 6.0f; break; case 2: - temp1 = (1.0f - arg2) * (1.0f - arg2) * (1.0f - arg2) / 6.0f; - temp2 = (0.5f * arg2 - 1.0f) * (arg2 * arg2) + 2.0f / 3.0f; - temp3 = ((-arg2 + 1.0f) * arg2 + 1.0f) * 0.5f * arg2 + 1.0f / 6.0f; - temp4 = (arg2 * arg2 * arg2) / 6.0f; + temp1 = CUBE(1.0f - weight) / 6.0f; + temp2 = (0.5f * weight - 1.0f) * SQ(weight) + 2.0f / 3.0f; + temp3 = ((-weight + 1.0f) * weight + 1.0f) * 0.5f * weight + 1.0f / 6.0f; + temp4 = CUBE(weight) / 6.0f; break; case 3: - temp1 = ((1.0f - arg2) * (1.0f - arg2) * (1.0f - arg2)) / 6.0f; - temp2 = -((1.0f - arg2) * (1.0f - arg2) * (1.0f - arg2)) / 2.0f + ((1.0f - arg2) * (1.0f - arg2)) / 2.0f + - (1.0f - arg2) / 2.0f + 1.0f / 6.0f; - temp3 = 7.0f * ((1.0f - arg2) * (1.0f - arg2) * (1.0f - arg2)) / 12.0f - - 5.0f * ((1.0f - arg2) * (1.0f - arg2)) / 4.0f + (1.0f - arg2) / 4.0f + 7.0f / 12.0f; - temp4 = (arg2 * arg2 * arg2) / 4.0f; + temp1 = CUBE(1.0f - weight) / 6.0f; + temp2 = -CUBE(1.0f - weight) / 2.0f + SQ(1.0f - weight) / 2.0f + (1.0f - weight) / 2.0f + 1.0f / 6.0f; + temp3 = 7.0f * CUBE(1.0f - weight) / 12.0f - 5.0f * SQ(1.0f - weight) / 4.0f + (1.0f - weight) / 4.0f + + 7.0f / 12.0f; + temp4 = CUBE(weight) / 4.0f; break; case 4: - temp1 = ((1.0f - arg2) * (1.0f - arg2) * (1.0f - arg2)) / 6.0f; - temp2 = -11.0f * ((1.0f - arg2) * (1.0f - arg2) * (1.0f - arg2)) / 12.0f + - 3.0f * ((1.0f - arg2) * (1.0f - arg2)) / 2.0f; - temp3 = 21.0f * ((1.0f - arg2) * (1.0f - arg2) * (1.0f - arg2)) / 12.0f - - 9.0f * ((1.0f - arg2) * (1.0f - arg2)) / 2.0f + 3.0f * (1.0f - arg2); - temp4 = arg2 * arg2 * arg2; + temp1 = CUBE(1.0f - weight) / 6.0f; + temp2 = -11.0f * CUBE(1.0f - weight) / 12.0f + 3.0f * SQ(1.0f - weight) / 2.0f; + temp3 = 21.0f * CUBE(1.0f - weight) / 12.0f - 9.0f * SQ(1.0f - weight) / 2.0f + 3.0f * (1.0f - weight); + temp4 = CUBE(weight); break; } - pos[0].x = (temp1 * (arg1 + 0)->unk_00) + (temp2 * (arg1 + 1)->unk_00) + (temp3 * (arg1 + 2)->unk_00) + - (temp4 * (arg1 + 3)->unk_00); - pos[0].y = (temp1 * (arg1 + 0)->unk_04) + (temp2 * (arg1 + 1)->unk_04) + (temp3 * (arg1 + 2)->unk_04) + - (temp4 * (arg1 + 3)->unk_04); - pos[0].z = (temp1 * (arg1 + 0)->unk_08) + (temp2 * (arg1 + 1)->unk_08) + (temp3 * (arg1 + 2)->unk_08) + - (temp4 * (arg1 + 3)->unk_08); + pos->eye.x = (temp1 * (arg1 + 0)->eye.x) + (temp2 * (arg1 + 1)->eye.x) + (temp3 * (arg1 + 2)->eye.x) + + (temp4 * (arg1 + 3)->eye.x); + pos->eye.y = (temp1 * (arg1 + 0)->eye.y) + (temp2 * (arg1 + 1)->eye.y) + (temp3 * (arg1 + 2)->eye.y) + + (temp4 * (arg1 + 3)->eye.y); + pos->eye.z = (temp1 * (arg1 + 0)->eye.z) + (temp2 * (arg1 + 1)->eye.z) + (temp3 * (arg1 + 2)->eye.z) + + (temp4 * (arg1 + 3)->eye.z); - pos[1].x = (temp1 * (arg1 + 0)->unk_0C) + (temp2 * (arg1 + 1)->unk_0C) + (temp3 * (arg1 + 2)->unk_0C) + - (temp4 * (arg1 + 3)->unk_0C); - pos[1].y = (temp1 * (arg1 + 0)->unk_10) + (temp2 * (arg1 + 1)->unk_10) + (temp3 * (arg1 + 2)->unk_10) + - (temp4 * (arg1 + 3)->unk_10); - pos[1].z = (temp1 * (arg1 + 0)->unk_14) + (temp2 * (arg1 + 1)->unk_14) + (temp3 * (arg1 + 2)->unk_14) + - (temp4 * (arg1 + 3)->unk_14); + pos->at.x = (temp1 * (arg1 + 0)->at.x) + (temp2 * (arg1 + 1)->at.x) + (temp3 * (arg1 + 2)->at.x) + + (temp4 * (arg1 + 3)->at.x); + pos->at.y = (temp1 * (arg1 + 0)->at.y) + (temp2 * (arg1 + 1)->at.y) + (temp3 * (arg1 + 2)->at.y) + + (temp4 * (arg1 + 3)->at.y); + pos->at.z = (temp1 * (arg1 + 0)->at.z) + (temp2 * (arg1 + 1)->at.z) + (temp3 * (arg1 + 2)->at.z) + + (temp4 * (arg1 + 3)->at.z); } void func_menu_8018D2B8(s32 arg0) { @@ -2341,9 +2338,9 @@ void func_menu_8018D510(s32 arg0) { Matrix_RotateX(gGfxMatrix, -D_menu_801B84E8[arg0].unk_18 * M_DTOR, 1); Matrix_RotateY(gGfxMatrix, -D_menu_801B84E8[arg0].unk_1C * M_DTOR, 1); - sp3C = -Math_Atan2F(D_80177978 - D_menu_801B84E8[arg0].unk_00.x, D_80177988 - D_menu_801B84E8[arg0].unk_00.z); - temp = sqrtf(SQ(D_80177988 - D_menu_801B84E8[arg0].unk_00.z) + SQ(D_80177978 - D_menu_801B84E8[arg0].unk_00.x)); - sp40 = Math_Atan2F(D_80177980 - D_menu_801B84E8[arg0].unk_00.y, temp); + sp3C = -Math_Atan2F(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x, gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z); + temp = sqrtf(SQ(gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z) + SQ(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x)); + sp40 = Math_Atan2F(gCsCamEyeY - D_menu_801B84E8[arg0].unk_00.y, temp); Matrix_RotateY(gGfxMatrix, -sp3C, 1); Matrix_RotateX(gGfxMatrix, -sp40, 1); @@ -2397,9 +2394,9 @@ void func_menu_8018D80C(s32 arg0) { } } - sp6C = -Math_Atan2F(D_80177978 - D_menu_801B84E8[arg0].unk_00.x, D_80177988 - D_menu_801B84E8[arg0].unk_00.z); - temp = sqrtf(SQ(D_80177988 - D_menu_801B84E8[arg0].unk_00.z) + SQ(D_80177978 - D_menu_801B84E8[arg0].unk_00.x)); - sp70 = Math_Atan2F(D_80177980 - D_menu_801B84E8[arg0].unk_00.y, temp); + sp6C = -Math_Atan2F(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x, gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z); + temp = sqrtf(SQ(gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z) + SQ(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x)); + sp70 = Math_Atan2F(gCsCamEyeY - D_menu_801B84E8[arg0].unk_00.y, temp); RCP_SetupDL(&gMasterDisp, 0x31); @@ -2456,7 +2453,7 @@ void func_menu_8018DF0C(f32 arg0) { RCP_SetupDL(&gMasterDisp, 0x35); if (arg0 != 0.0f) { - D_menu_801B8688.pos.z = D_80177988 - arg0; + D_menu_801B8688.pos.z = gCsCamEyeZ - arg0; } Matrix_Push(&gGfxMatrix); @@ -2803,7 +2800,7 @@ void func_menu_8018F438(void) { Lights_SetOneLight(&gMasterDisp, 0, 0, 0, 0, 0, 0, gAmbientR, gAmbientG, gAmbientB); - if (D_801779C0 < D_80177988) { + if (gCsCamAtZ < gCsCamEyeZ) { sp54 = 1.0f; } else { sp54 = 3.0f; @@ -3453,9 +3450,9 @@ void func_menu_80191674(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* } void func_menu_80191798(f32* arg0, f32* arg1) { - f32 temp_fv1 = D_80177978 - D_801779A0; - f32 temp_fv2 = D_80177980 - D_801779B8; - f32 temp_ft4 = D_80177988 - D_801779C0; + f32 temp_fv1 = gCsCamEyeX - gCsCamAtX; + f32 temp_fv2 = gCsCamEyeY - gCsCamAtY; + f32 temp_ft4 = gCsCamEyeZ - gCsCamAtZ; *arg0 = -Math_Atan2F(temp_fv2, sqrtf(SQ(temp_fv1) + SQ(temp_ft4))) * M_RTOD; *arg1 = Math_Atan2F(temp_fv1, temp_ft4) * M_RTOD; @@ -3481,7 +3478,7 @@ void func_menu_80191844(f32 arg0, f32 arg1) { void func_menu_801918FC(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, D_80177978, D_80177980, D_80177988, D_801779A0, D_801779B8, D_801779C0, D_menu_801B829C, + Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, D_menu_801B829C, D_menu_801B82A0, D_menu_801B82A4, 1); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/overlays/ovl_menu/fox_title.h b/src/overlays/ovl_menu/fox_title.h index 9f1b0c77..81811b4a 100644 --- a/src/overlays/ovl_menu/fox_title.h +++ b/src/overlays/ovl_menu/fox_title.h @@ -73,8 +73,8 @@ typedef struct { /* 0x10 */ f32 scale; } UnkStruct_D_menu_801B8688; // size = 0x14 -extern UnkStruct_D_menu_801B8294 D_menu_801B6B40[]; -extern UnkStruct_D_menu_801B8294 D_menu_801B6C60[]; +extern CameraPoint D_menu_801B6B40[]; +extern CameraPoint D_menu_801B6C60[]; extern f32 D_menu_801B7BB0; extern f32 D_menu_801B7BB4; extern f32 D_menu_801B7BB8; @@ -119,7 +119,7 @@ extern s32 D_menu_801B8284; extern s32 D_menu_801B8288; extern f32 D_menu_801B828C; extern f32 D_menu_801B8290; -extern UnkStruct_D_menu_801B8294* D_menu_801B8294; +extern CameraPoint* D_menu_801B8294; extern s32 D_menu_801B8298; extern f32 D_menu_801B829C; extern f32 D_menu_801B82A0; @@ -210,8 +210,8 @@ extern f32 D_menu_801B9080; extern f32 D_menu_801B9084; void func_menu_8019111C(void); -void func_menu_8018CC30(UnkStruct_D_menu_801B8294*, s32, f32); -void func_menu_8018CD9C(Vec3f *pos, UnkStruct_D_menu_801B8294 *arg1, f32 arg2, s32 arg3); +void func_menu_8018CC30(CameraPoint*, s32, f32); +void func_menu_8018CD9C(CameraPoint *pos, CameraPoint *arg1, f32 weight, s32 arg3); void func_menu_8018D510(s32); void func_menu_8018D80C(s32); void func_menu_8018DDB8(s32); diff --git a/tools/comptool.py b/tools/comptool.py index 0858fdb1..16a64aad 100644 --- a/tools/comptool.py +++ b/tools/comptool.py @@ -6,6 +6,17 @@ import struct import argparse import sys +file_names = [ + "makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet", + "ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_vs_player", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox", + "ast_star_wolf", "ast_allies", "ast_corneria", "ast_meteo", "ast_titania", "ast_7_ti_2", "ast_8_ti", "ast_9_ti", "ast_A_ti", + "ast_7_ti_1", "ast_sector_x", "ast_sector_z", "ast_aquas", "ast_area_6", "ast_venom_1", "ast_venom_2", "ast_ve1_boss", + "ast_bolse", "ast_fortuna", "ast_sector_y", "ast_solar", "ast_zoness", "ast_katina", "ast_macbeth", "ast_warp_zone", + "ast_title", "ast_menu", "ast_option", "ast_versus", "ast_font", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", + "ast_ending_award_front", "ast_ending_award_back", "ast_reward", "ast_training", "ast_radio", "ovl_i1", "ovl_i2", + "ovl_i3", "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused" + ] + def int32(x): return x & 0xFFFFFFFF @@ -197,7 +208,7 @@ def decompress(baserom, decomprom, mio0, extract_dest=None): if not os.path.exists(extract_dest): os.mkdir(extract_dest) - file_name = 'segment_' + str(file_count)+'_'+format(v_file_begin, 'X') + '.bin' + file_name = file_names[file_count] + '.bin' with open(extract_dest + os.sep + file_name, 'wb') as extract_file: extract_file.write(file_bytes) diff --git a/tools/textconv.py b/tools/textconv.py index 8d2faef2..adba84bd 100644 --- a/tools/textconv.py +++ b/tools/textconv.py @@ -1,6 +1,12 @@ import argparse -char_code = ["END","NWL","NP2","NP3","NP4","NP5","NP6","NP7","NP8","NP9","NPA","NPB","SPC","HSP","QSP","NPF","CLF","CUP","CRT","CDN","AUP","ALF","ADN","ART","L_A","L_B","L_C","L_D","L_E","L_F","L_G","L_H","L_I","L_J","L_K","L_L","L_M","L_N","L_O","L_P","L_Q","L_R","L_S","L_T","L_U","L_V","L_W","L_X","L_Y","L_Z","l_a","l_b","l_c","l_d","l_e","l_f","l_g","l_h","l_i","l_j","l_k","l_l","l_m","l_n","l_o","l_p","l_q","l_r","l_s","l_t","l_u","l_v","l_w","l_x","l_y","l_z","EXM","QST","DSH","CMA","PRD","N_0","N_1","N_2","N_3","N_4","N_5","N_6","N_7","N_8","N_9","APS","LPR","RPR","CLN","PIP"] +char_code = [ + "END","NWL","NP2","NP3","NP4","NP5","NP6","NP7","NP8","NP9","NPA","NPB","SPC","HSP","QSP","NPF", + "CLF","CUP","CRT","CDN","AUP","ALF","ADN","ART","_A","_B","_C","_D","_E","_F","_G","_H","_I","_J", + "_K","_L","_M","_N","_O","_P","_Q","_R","_S","_T","_U","_V","_W","_X","_Y","_Z","_a","_b","_c", + "_d","_e","_f","_g","_h","_i","_j","_k","_l","_m","_n","_o","_p","_q","_r","_s","_t","_u","_v", + "_w","_x","_y","_z","EXM","QST","DSH","CMA","PRD","_0","_1","_2","_3","_4","_5","_6","_7","_8", + "_9","APS","LPR","RPR","CLN","PIP"] def convert_line(line): if 'x' in line or '{' in line or '}' in line: @@ -44,7 +50,10 @@ def convert_names(filepath): file.write(file_text) return -code_to_text = {'CLF':'(C<)', 'CUP':'(C^)', 'CRT':'(C>)', 'CDN':'(Cv)', 'AUP':'^', 'ALF':'<', 'ADN':'v', 'ART':'>', 'EXM':'!', 'QST':'?', 'DSH':'-', 'CMA':',', 'PRD':'.', 'APS':"'", 'LPR':'(', 'RPR':')', 'CLN':':', 'PIP':'|'} +code_to_text = { + 'CLF':'(C<)', 'CUP':'(C^)', 'CRT':'(C>)', 'CDN':'(Cv)', 'AUP':'^', 'ALF':'<', 'ADN':'v', + 'ART':'>','EXM':'!', 'QST':'?', 'DSH':'-', 'CMA':',', 'PRD':'.', 'APS':"'", 'LPR':'(', + 'RPR':')', 'CLN':':', 'PIP':'|'} def parse_line(line): codes = [x.strip() for x in line.split(',')]