From f0009d36b5021ccc442d9bc5cf8099b5b7dc2b51 Mon Sep 17 00:00:00 2001 From: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com> Date: Mon, 7 Oct 2024 22:13:35 +1000 Subject: [PATCH] scrolling textures tweak --- src/game/behaviors/texscroll.inc.c | 7 ++----- src/game/scroll_targets.c | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/game/behaviors/texscroll.inc.c b/src/game/behaviors/texscroll.inc.c index fc02b225..a8a8df04 100644 --- a/src/game/behaviors/texscroll.inc.c +++ b/src/game/behaviors/texscroll.inc.c @@ -70,17 +70,14 @@ static inline void shift_UV_NORMAL(struct ScrollTarget *scroll, u16 vertcount, s verts[0]->n.flag++; } else { if (bhv < SCROLL_UV_X) { - u8 bhvIndex = MIN(bhv, 2); for (i = 0; i < vertcount; i++) { - verts[i]->n.ob[bhvIndex] = scroll->interpF32[i]; + scroll->prevF32[i] = scroll->interpF32[i]; } } else { - u8 bhvIndex = MIN(bhv-SCROLL_UV_X, 1); for (i = 0; i < vertcount; i++) { - verts[i]->n.tc[bhvIndex] = scroll->interpS16[i]; + scroll->prevS16[i] = scroll->interpS16[i]; } } - scroll->needInterp = false; } } diff --git a/src/game/scroll_targets.c b/src/game/scroll_targets.c index 1c796c2c..7bcba018 100644 --- a/src/game/scroll_targets.c +++ b/src/game/scroll_targets.c @@ -140,7 +140,7 @@ void patch_scroll_targets_before(void) { } } -#define SHORT_RANGE 32767 +#define SHORT_RANGE 0x7FFF void patch_scroll_targets_interpolated(f32 delta) { f32 antiDelta = 1.0f - delta;