@@ -61,13 +61,13 @@ static uint32_t hsl2rgb(float H, float S, float L)
6161 return (uint32_t )(R << 16 | G << 8 | B );
6262}
6363
64- uint32_t vfx_get_color (uint16_t color_h , uint16_t color_l )
64+ uint32_t vfx_get_color (float color_h , float color_l )
6565{
6666 return hsl2rgb (color_h / 511.0 , 1.0 , color_l / 2047.0 );
6767}
6868
6969#ifndef CONFIG_SCREEN_PANEL_OUTPUT_VFX
70- void vfx_draw_pixel (uint8_t x , uint8_t y , uint8_t z , uint16_t color_h , uint16_t color_l )
70+ void vfx_draw_pixel (uint8_t x , uint8_t y , uint8_t z , float color_h , float color_l )
7171{
7272 uint32_t pixel_color = vfx_get_color (color_h , color_l );
7373 uint8_t pixel_x = x + y * 8 ;
@@ -90,7 +90,7 @@ void vfx_draw_pixel(uint8_t x, uint8_t y, uint8_t z, uint16_t color_h, uint16_t
9090#endif
9191}
9292
93- void vfx_fill_cube (uint8_t x , uint8_t y , uint8_t z , uint8_t cx , uint8_t cy , uint8_t cz , uint16_t color_h , uint16_t color_l )
93+ void vfx_fill_cube (uint8_t x , uint8_t y , uint8_t z , uint8_t cx , uint8_t cy , uint8_t cz , float color_h , float color_l )
9494{
9595 for (uint8_t i = 0 ; i < cx ; i ++ ) {
9696 for (uint8_t j = 0 ; j < cy ; j ++ ) {
@@ -101,7 +101,7 @@ void vfx_fill_cube(uint8_t x, uint8_t y, uint8_t z, uint8_t cx, uint8_t cy, uint
101101 }
102102}
103103
104- void vfx_draw_cube_bitmap (const uint8_t * bitmap , uint16_t color_l )
104+ void vfx_draw_cube_bitmap (const uint8_t * bitmap , float color_l )
105105{
106106 uint8_t x = 0 ;
107107 uint8_t y = 0 ;
@@ -144,7 +144,7 @@ void vfx_draw_cube_bitmap(const uint8_t *bitmap, uint16_t color_l)
144144 }
145145}
146146
147- void vfx_draw_layer_bitmap (uint8_t layer , const uint8_t * bitmap , uint16_t color_l )
147+ void vfx_draw_layer_bitmap (uint8_t layer , const uint8_t * bitmap , float color_l )
148148{
149149 uint8_t x = 0 ;
150150 uint8_t y = 0 ;
@@ -183,7 +183,7 @@ void vfx_draw_layer_bitmap(uint8_t layer, const uint8_t *bitmap, uint16_t color_
183183 }
184184}
185185
186- void vfx_draw_layer_number (uint8_t num , uint8_t layer , uint16_t color_h , uint16_t color_l )
186+ void vfx_draw_layer_number (uint8_t num , uint8_t layer , float color_h , float color_l )
187187{
188188 uint8_t x = 0 ;
189189 uint8_t y = layer ;
0 commit comments