Fix Slider Interval Problem

- slider interval problem in #301 was caused by dividing 65536 by a number that it is not evenly divisible by.
- adjusting number of slider ticks did the trick

other old data problem in #301 still remains, but havent reproduced
This commit is contained in:
westonCoder 2023-10-16 16:34:27 -05:00
parent 47c74b59e3
commit b6fd669eaa
2 changed files with 4 additions and 4 deletions

View file

@ -14,8 +14,8 @@
#define GAMEPLAY_HEIGHT 124
#define GAMEPLAY_X ((SCREEN_WD - GAMEPLAY_WIDTH) / 2)
#define SCROLL_TICKS_VOLUME 10
#define SCROLL_INTERVALS_VOLUME (int)maxf((SCROLL_TICKS_VOLUME - 1), 1)
#define SCROLL_TICKS_VOLUME 9
#define SCROLL_INTERVALS_VOLUME (int)maxf((SCROLL_TICKS_VOLUME-1), 1)
#define SCROLL_CHUNK_SIZE_VOLUME (0x10000 / SCROLL_INTERVALS_VOLUME)
#define SCROLL_TICKS_SUBTITLES (int)maxf(NUM_SUBTITLE_LANGUAGES, 1)

View file

@ -12,13 +12,13 @@
#define GAMEPLAY_WIDTH 252
#define GAMEPLAY_HEIGHT 124
#define SCROLL_TICKS PORTAL_RENDER_DEPTH_MAX - 1
#define SCROLL_TICKS PORTAL_RENDER_DEPTH_MAX+1
#define SCROLL_INTERVALS (SCROLL_TICKS - 1)
#define GAMEPLAY_X ((SCREEN_WD - GAMEPLAY_WIDTH) / 2)
#define FULL_SCROLL_TIME 2.0f
#define SCROLL_MULTIPLIER (int)(0xFFFF * FIXED_DELTA_TIME / (80 * FULL_SCROLL_TIME))
#define SCROLL_MULTIPLIER (int)(0x10000 * FIXED_DELTA_TIME / (80 * FULL_SCROLL_TIME))
#define SCROLL_CHUNK_SIZE (0x10000 / SCROLL_INTERVALS)
void gameplayOptionsHandleSlider(unsigned short* settingValue, float* sliderValue) {