summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorEric Hoey <121978037+A-Green-Spoon@users.noreply.github.com>2025-05-06 20:00:33 -0400
committerGitHub <noreply@github.com>2025-05-06 17:00:33 -0700
commit6a93625f5cfbaca71262a4fdce1a90d055a282ba (patch)
treeeebf37154e3d9f9f1f3ae30e6795b2f4377502bc /soh/src/code
parenta0e49f99607ed6d486925e7ef7d6e9d3e76585be (diff)
VBify Crawl Speed Enhancement and Add Exlcude Glitch-Aiding Crawlspace Option (#5465)
* add menu option * VBify + add conditions * oops wrong func * clean up includes + casting * move z_player externed functions * better name * correct menu text * one last name final final * maintain glitch-aiding selection
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_onepointdemo.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/soh/src/code/z_onepointdemo.c b/soh/src/code/z_onepointdemo.c
index 40f5c1474..c68f1b522 100644
--- a/soh/src/code/z_onepointdemo.c
+++ b/soh/src/code/z_onepointdemo.c
@@ -71,12 +71,6 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
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(CVAR_ENHANCEMENT("CrawlSpeed"), 1);
- s16 camCrawlTimer = D_8012042C / camCrawlTemp;
- // #endregion
-
switch (csId) {
case 1020:
if (timer < 20) {
@@ -336,26 +330,19 @@ 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);
- if (CVarGetInteger(CVAR_ENHANCEMENT("CrawlSpeed"), 1) > 1) {
- OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, camCrawlTimer, D_80120308, D_80120398);
- } else {
+ if (GameInteractor_Should(VB_CRAWL_SPEED_EXIT_CS, true, csCam, csId, D_80120430, D_8012042C, D_80120308,
+ D_80120398)) {
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120398);
}
break;
case 9602:
- // #region SOH [Enhancement]
- if (CVarGetInteger(CVAR_ENHANCEMENT("CrawlSpeed"), 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);
+ Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
+ Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
+ if (GameInteractor_Should(VB_CRAWL_SPEED_EXIT_CS, true, csCam, csId, D_80120430, D_8012042C, D_80120308,
+ D_80120434)) {
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120434);
- break;
}
+ break;
case 4175:
csInfo->keyFrames = D_8012147C;
csInfo->keyFrameCnt = 4;