summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorEric Hoey <121978037+A-Green-Spoon@users.noreply.github.com>2024-02-01 20:38:54 -0500
committerGitHub <noreply@github.com>2024-02-01 19:38:54 -0600
commit7ff46ba1a7a720bd71e531943596ab11badecc40 (patch)
tree503c535a9aaa31044ca2026b1d0c52bf66bd9be0 /soh/src/code
parent4d5adbc80f4799bd7ce13581da3989374f539d09 (diff)
Increase Crawl Speed (#3366)
* Increase animation speeds, crawl speed, add magic numbers for camera timer, add to menu and presets * Remove extra space, reformat comments * Initialilze CVar at 0, Initialize default timer, set default case for timer, change all CVarGets to 1, reorg logic * Fix remaining CVars + unify logic * block out vanilla code + comments * new documentation formatting * Simplify camera swing fix * Remove redundant multiplication * Update soh/src/code/z_onepointdemo.c reduce code duplication Co-authored-by: Garrett Cox <garrettjcox@gmail.com> --------- Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_onepointdemo.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/soh/src/code/z_onepointdemo.c b/soh/src/code/z_onepointdemo.c
index ab62692cc..9489eefcd 100644
--- a/soh/src/code/z_onepointdemo.c
+++ b/soh/src/code/z_onepointdemo.c
@@ -69,7 +69,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
PosRot sp8C;
f32 tempRand;
Unique9OnePointCs* csInfo = ONEPOINT_CS_INFO(csCam);
-
+
+ // #region SOH [Enhancement]
+ //the default is 90, lower values necessary to prevent camera swing as animation speeds up
+ s16 camCrawlTemp = CVarGetInteger("gCrawlSpeed", 1);
+ s16 camCrawlTimer = D_8012042C / camCrawlTemp;
+ // #endregion
+
switch (csId) {
case 1020:
if (timer < 20) {
@@ -330,13 +336,26 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
case 9601:
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
- OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120398);
+ if (CVarGetInteger("gCrawlSpeed", 1) > 1) {
+ OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, camCrawlTimer, D_80120308, D_80120398);
+ } else {
+ OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120398);
+ }
break;
case 9602:
- Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
- Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
- OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120434);
- break;
+ // #region SOH [Enhancement]
+ if (CVarGetInteger("gCrawlSpeed", 1) > 1) {
+ Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
+ Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
+ OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, camCrawlTimer, D_80120308, D_80120434);
+ break;
+ // #endregion
+ } else {
+ Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
+ Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
+ OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120434);
+ break;
+ }
case 4175:
csInfo->keyFrames = D_8012147C;
csInfo->keyFrameCnt = 4;