Skip to content

Commit 50d68a8

Browse files
committed
vfx_core: add new layer configurations
1 parent 7517589 commit 50d68a8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

main/Kconfig.projbuild

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,14 @@ config CUBE0414_LAYER_H
208208
bool "Horizontal"
209209
config CUBE0414_LAYER_H_XYI
210210
bool "Horizontal XY-Inverted"
211+
config CUBE0414_LAYER_H_ZI
212+
bool "Horizontal Z-Inverted"
211213
config CUBE0414_LAYER_V
212214
bool "Vertical"
213215
config CUBE0414_LAYER_V_XYI
214216
bool "Vertical XY-Inverted"
217+
config CUBE0414_LAYER_V_ZI
218+
bool "Vertical Z-Inverted"
215219
endchoice
216220

217221
choice CUBE0414_LINE_TYPE

main/src/user/vfx_core.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ void vfx_draw_pixel(uint8_t x, uint8_t y, uint8_t z, float color_h, float color_
7979
uint8_t pixel_x = (7 - x) + (7 - y) * 8;
8080
uint8_t pixel_y = z;
8181
#endif
82+
#ifdef CONFIG_CUBE0414_LAYER_H_ZI
83+
uint8_t pixel_x = x + y * 8;
84+
uint8_t pixel_y = 7 - z;
85+
#endif
8286
#ifdef CONFIG_CUBE0414_LAYER_V
8387
uint8_t pixel_x = x + z * 8;
8488
uint8_t pixel_y = y;
@@ -87,6 +91,10 @@ void vfx_draw_pixel(uint8_t x, uint8_t y, uint8_t z, float color_h, float color_
8791
uint8_t pixel_x = (7 - x) + (7 - z) * 8;
8892
uint8_t pixel_y = y;
8993
#endif
94+
#ifdef CONFIG_CUBE0414_LAYER_V_ZI
95+
uint8_t pixel_x = x + z * 8;
96+
uint8_t pixel_y = 7 - y;
97+
#endif
9098

9199
gdispGDrawPixel(vfx_gdisp, pixel_x, pixel_y, pixel_color);
92100
}

0 commit comments

Comments
 (0)