aboutsummaryrefslogtreecommitdiff
path: root/quantum/rgb_matrix_animations/splash_anim.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/rgb_matrix_animations/splash_anim.h')
-rw-r--r--quantum/rgb_matrix_animations/splash_anim.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix_animations/splash_anim.h
index 3c96d451e..fbe776111 100644
--- a/quantum/rgb_matrix_animations/splash_anim.h
+++ b/quantum/rgb_matrix_animations/splash_anim.h
@@ -2,7 +2,7 @@
2#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED 2#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
3#if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) 3#if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
4 4
5extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; 5extern led_config_t g_led_config;
6extern rgb_config_t rgb_matrix_config; 6extern rgb_config_t rgb_matrix_config;
7extern last_hit_t g_last_hit_tracker; 7extern last_hit_t g_last_hit_tracker;
8 8
@@ -15,10 +15,9 @@ static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params)
15 RGB_MATRIX_TEST_LED_FLAGS(); 15 RGB_MATRIX_TEST_LED_FLAGS();
16 hsv.h = rgb_matrix_config.hue; 16 hsv.h = rgb_matrix_config.hue;
17 hsv.v = 0; 17 hsv.v = 0;
18 point_t point = g_rgb_leds[i].point;
19 for (uint8_t j = start; j < count; j++) { 18 for (uint8_t j = start; j < count; j++) {
20 int16_t dx = point.x - g_last_hit_tracker.x[j]; 19 int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j];
21 int16_t dy = point.y - g_last_hit_tracker.y[j]; 20 int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j];
22 uint8_t dist = sqrt16(dx * dx + dy * dy); 21 uint8_t dist = sqrt16(dx * dx + dy * dy);
23 uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) - dist; 22 uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) - dist;
24 if (effect > 255) 23 if (effect > 255)