scrolling textures tweak

This commit is contained in:
Isaac0-dev 2024-10-07 22:13:35 +10:00
parent 78e07a7064
commit f0009d36b5
2 changed files with 3 additions and 6 deletions

View file

@ -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;
}
}

View file

@ -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;