You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.2 KiB

  1. #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
  2. # if defined(ENABLE_RGB_MATRIX_SOLID_SPLASH) || defined(ENABLE_RGB_MATRIX_SOLID_MULTISPLASH)
  3. # ifdef ENABLE_RGB_MATRIX_SOLID_SPLASH
  4. RGB_MATRIX_EFFECT(SOLID_SPLASH)
  5. # endif
  6. # ifdef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
  7. RGB_MATRIX_EFFECT(SOLID_MULTISPLASH)
  8. # endif
  9. # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
  10. HSV SOLID_SPLASH_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
  11. uint16_t effect = tick - dist;
  12. if (effect > 255) effect = 255;
  13. hsv.v = qadd8(hsv.v, 255 - effect);
  14. return hsv;
  15. }
  16. # ifdef ENABLE_RGB_MATRIX_SOLID_SPLASH
  17. bool SOLID_SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); }
  18. # endif
  19. # ifdef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
  20. bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); }
  21. # endif
  22. # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
  23. # endif // !defined(ENABLE_RGB_MATRIX_SPLASH) && !defined(ENABLE_RGB_MATRIX_MULTISPLASH)
  24. #endif // RGB_MATRIX_KEYREACTIVE_ENABLED