Skip to content

Commit ffdc0a7

Browse files
committed
vfx: remove color table
1 parent ca1e157 commit ffdc0a7

File tree

5 files changed

+48
-25643
lines changed

5 files changed

+48
-25643
lines changed

main/inc/user/vfx_color_table.h

Lines changed: 0 additions & 14 deletions
This file was deleted.

main/inc/user/vfx_core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include <stdint.h>
1212

13-
extern uint32_t vfx_read_color_from_table(uint16_t color_idx, uint16_t color_ctr);
13+
extern uint32_t vfx_get_color(uint16_t color_idx, uint16_t color_ctr);
1414

1515
extern void vfx_draw_pixel(uint8_t x, uint8_t y, uint8_t z, uint16_t color_idx, uint16_t color_ctr);
1616
extern 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_idx, uint16_t color_ctr);

main/src/user/vfx.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static void vfx_task(void *pvParameter)
160160

161161
color_tmp = color_h;
162162
for (uint16_t i=0; i<vfx_disp_width; i++) {
163-
uint32_t pixel_color = vfx_read_color_from_table(color_h, color_l);
163+
uint32_t pixel_color = vfx_get_color(color_h, color_l);
164164

165165
#if defined(CONFIG_VFX_OUTPUT_ST7735)
166166
uint16_t clear_x = i * 3;
@@ -260,7 +260,7 @@ static void vfx_task(void *pvParameter)
260260

261261
color_h = 511;
262262
for (uint16_t i=0; i<vfx_disp_width; i++) {
263-
uint32_t pixel_color = vfx_read_color_from_table(color_h, color_l);
263+
uint32_t pixel_color = vfx_get_color(color_h, color_l);
264264

265265
#if defined(CONFIG_VFX_OUTPUT_ST7735)
266266
uint16_t clear_x = i * 3;
@@ -401,12 +401,12 @@ static void vfx_task(void *pvParameter)
401401
gdispGFillArea(vfx_gdisp, i*vu_width+1, (vu_val_max-vu_peak_value[i])*vu_height+1, vu_width-2, vu_height-2, 0x000000);
402402
}
403403

404-
uint32_t peak_color = vfx_read_color_from_table(80, color_l);
404+
uint32_t peak_color = vfx_get_color(80, color_l);
405405
gdispGFillArea(vfx_gdisp, i*vu_width+1, (vu_val_max-vu_peak_value[i])*vu_height+1, vu_width-2, vu_height-2, peak_color);
406406

407407
color_h = 511;
408408
for (int8_t j=vu_val_max; j>=vu_val_min; j--) {
409-
uint32_t pixel_color = vfx_read_color_from_table(color_h, color_l);
409+
uint32_t pixel_color = vfx_get_color(color_h, color_l);
410410

411411
if (j == vu_peak_value[i]) {
412412
continue;
@@ -486,7 +486,7 @@ static void vfx_task(void *pvParameter)
486486

487487
color_tmp = color_h;
488488
for (uint16_t i=0; i<vfx_disp_width; i++) {
489-
uint32_t pixel_color = vfx_read_color_from_table(color_h, color_l);
489+
uint32_t pixel_color = vfx_get_color(color_h, color_l);
490490

491491
#if defined(CONFIG_VFX_OUTPUT_ST7735)
492492
uint16_t clear_x = i * 3;
@@ -590,7 +590,7 @@ static void vfx_task(void *pvParameter)
590590

591591
color_h = 511;
592592
for (uint16_t i=0; i<vfx_disp_width; i++) {
593-
uint32_t pixel_color = vfx_read_color_from_table(color_h, color_l);
593+
uint32_t pixel_color = vfx_get_color(color_h, color_l);
594594

595595
#if defined(CONFIG_VFX_OUTPUT_ST7735)
596596
uint16_t clear_x = i * 3;
@@ -734,12 +734,12 @@ static void vfx_task(void *pvParameter)
734734
gdispGFillArea(vfx_gdisp, i*vu_width+1, (vu_val_max-vu_peak_value[i])*vu_height+1, vu_width-2, vu_height-2, 0x000000);
735735
}
736736

737-
uint32_t peak_color = vfx_read_color_from_table(80, color_l);
737+
uint32_t peak_color = vfx_get_color(80, color_l);
738738
gdispGFillArea(vfx_gdisp, i*vu_width+1, (vu_val_max-vu_peak_value[i])*vu_height+1, vu_width-2, vu_height-2, peak_color);
739739

740740
color_h = 511;
741741
for (int8_t j=vu_val_max; j>=vu_val_min; j--) {
742-
uint32_t pixel_color = vfx_read_color_from_table(color_h, color_l);
742+
uint32_t pixel_color = vfx_get_color(color_h, color_l);
743743

744744
if (j == vu_peak_value[i]) {
745745
continue;

0 commit comments

Comments
 (0)