@@ -67,10 +67,8 @@ uint32_t vfx_get_color(float color_h, float color_l)
67
67
}
68
68
69
69
#ifdef CONFIG_VFX_OUTPUT_CUBE0414
70
- void vfx_draw_pixel (uint8_t x , uint8_t y , uint8_t z , float color_h , float color_l )
70
+ void vfx_draw_pixel_raw (uint8_t x , uint8_t y , uint8_t z , uint32_t color )
71
71
{
72
- uint32_t pixel_color = vfx_get_color (color_h , color_l );
73
-
74
72
#ifdef CONFIG_CUBE0414_LAYER_H
75
73
uint8_t pixel_x = x + y * 8 ;
76
74
uint8_t pixel_y = z ;
@@ -96,15 +94,24 @@ void vfx_draw_pixel(uint8_t x, uint8_t y, uint8_t z, float color_h, float color_
96
94
uint8_t pixel_y = 7 - y ;
97
95
#endif
98
96
99
- gdispGDrawPixel (vfx_gdisp , pixel_x , pixel_y , pixel_color );
97
+ gdispGDrawPixel (vfx_gdisp , pixel_x , pixel_y , color );
98
+ }
99
+
100
+ void vfx_draw_pixel (uint8_t x , uint8_t y , uint8_t z , float color_h , float color_l )
101
+ {
102
+ uint32_t pixel_color = vfx_get_color (color_h , color_l );
103
+
104
+ vfx_draw_pixel_raw (x , y , z , pixel_color );
100
105
}
101
106
102
107
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 )
103
108
{
109
+ uint32_t pixel_color = vfx_get_color (color_h , color_l );
110
+
104
111
for (uint8_t i = 0 ; i < cx ; i ++ ) {
105
112
for (uint8_t j = 0 ; j < cy ; j ++ ) {
106
113
for (uint8_t k = 0 ; k < cz ; k ++ ) {
107
- vfx_draw_pixel (x + i , y + j , z + k , color_h , color_l );
114
+ vfx_draw_pixel_raw (x + i , y + j , z + k , pixel_color );
108
115
}
109
116
}
110
117
}
0 commit comments