From 682c0c83a16d7e0c2a2209ccc0200ac522280210 Mon Sep 17 00:00:00 2001 From: tmyqlfpir <80724828+tmyqlfpir@users.noreply.github.com> Date: Mon, 21 Aug 2023 06:24:08 +1000 Subject: [PATCH] Expose LV_SLOMO_TICK_CAP macro in lv.h Needed for slomo footsteps fix --- src/game/footstep.c | 2 +- src/game/lv.c | 8 -------- src/include/game/lv.h | 8 ++++++++ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/game/footstep.c b/src/game/footstep.c index f75c3d06a..ddbcc3546 100644 --- a/src/game/footstep.c +++ b/src/game/footstep.c @@ -178,7 +178,7 @@ void footstepCheckDefault(struct chrdata *chr) } } else { #ifndef PLATFORM_N64 // fix spamming footsteps for 60fps port - if ((lvGetSlowMotionType() != SLOWMOTION_OFF && g_Vars.speedpillon == false) || (lvGetSlowMotionType() == SLOWMOTION_OFF && g_Vars.speedpillon == true)) { + if (g_Vars.lvupdate240 == LV_SLOMO_TICK_CAP) { s32 roundedframe = (s32)(frame*2); if (roundedframe == (g_FootstepAnims[i].frame1*2) && prevframe < g_FootstepAnims[i].frame1) { chr->footstep = 1; diff --git a/src/game/lv.c b/src/game/lv.c index a5ace237a..a461990b8 100644 --- a/src/game/lv.c +++ b/src/game/lv.c @@ -97,14 +97,6 @@ #include "lib/vi.h" #include "types.h" -#ifdef PLATFORM_N64 -// game runs at ~30, so slomo = 1/2 of 30fps -#define LV_SLOMO_TICK_CAP TICKS(4) -#else -// game runs at 60+, so slomo = 1/2 of 60fps -#define LV_SLOMO_TICK_CAP TICKS(2) -#endif - struct sndstate *g_MiscSfxAudioHandles[3]; u32 var800aa5bc; s32 g_MiscSfxActiveTypes[3]; diff --git a/src/include/game/lv.h b/src/include/game/lv.h index bc14d4356..961af91d0 100644 --- a/src/include/game/lv.h +++ b/src/include/game/lv.h @@ -4,6 +4,14 @@ #include "data.h" #include "types.h" +#ifdef PLATFORM_N64 +// game runs at ~30, so slomo = 1/2 of 30fps +#define LV_SLOMO_TICK_CAP TICKS(4) +#else +// game runs at 60+, so slomo = 1/2 of 60fps +#define LV_SLOMO_TICK_CAP TICKS(2) +#endif + u32 getVar80084040(void); void lvInit(void); void lvResetMiscSfx(void);