diff options
| author | Franklin Wei <me@fwei.tk> | 2017-07-26 22:19:28 -0400 |
|---|---|---|
| committer | Franklin Wei <me@fwei.tk> | 2017-07-27 00:03:08 -0400 |
| commit | 7c87dbfba3b53c1e36733e184ce5cbeee2e7c86f (patch) | |
| tree | a951aab17b54b306abe68323f3fe1a0044bd2d94 /apps | |
| parent | 0140246a9007d77290fd70f7474e941d0599a31f (diff) | |
| download | rockbox-7c87dbfba3b53c1e36733e184ce5cbeee2e7c86f.zip rockbox-7c87dbfba3b53c1e36733e184ce5cbeee2e7c86f.tar.gz rockbox-7c87dbfba3b53c1e36733e184ce5cbeee2e7c86f.tar.bz2 rockbox-7c87dbfba3b53c1e36733e184ce5cbeee2e7c86f.tar.xz | |
puzzles: update debug menu
Add an option to visualize polygon rendering to aid in diagnosing
artifacts.
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/plugins/puzzles/rockbox.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c index 18194da..fae9c62 100644 --- a/apps/plugins/puzzles/rockbox.c +++ b/apps/plugins/puzzles/rockbox.c @@ -82,7 +82,7 @@ extern bool audiobuf_available; static struct settings_t { int slowmo_factor; - bool bulk, timerflash, clipoff, shortcuts, no_aa; + bool timerflash, clipoff, shortcuts, no_aa, polyanim; } settings; /* clipping is implemented through viewports and offsetting @@ -544,7 +544,11 @@ static void rb_draw_poly(void *handle, int *coords, int npoints, xlcd_filltriangle(x1, y1, x2, y2, x3, y3); - + if(settings.polyanim) + { + rb->lcd_update(); + rb->sleep(HZ/5); + } #if 0 /* debug code */ rb->lcd_set_foreground(LCD_RGBPACK(255,0,0)); @@ -1179,11 +1183,11 @@ static void full_help(const char *name) static void init_default_settings(void) { settings.slowmo_factor = 1; - settings.bulk = false; settings.timerflash = false; settings.clipoff = false; settings.shortcuts = false; settings.no_aa = false; + settings.polyanim = false; } #ifdef DEBUG_MENU @@ -1220,12 +1224,12 @@ static void debug_menu(void) MENUITEM_STRINGLIST(menu, "Debug Menu", NULL, "Slowmo factor", "Randomize colors", - "Toggle bulk update", "Toggle flash pixel on timer", "Toggle clip", "Toggle shortcuts", "Toggle antialias", "Benchmark antialias", + "Toggle show poly steps", "Back"); bool quit = false; int sel = 0; @@ -1247,22 +1251,22 @@ static void debug_menu(void) break; } case 2: - settings.bulk = !settings.bulk; + settings.timerflash = !settings.timerflash; break; case 3: - settings.timerflash = !settings.timerflash; + settings.clipoff = !settings.clipoff; break; case 4: - settings.clipoff = !settings.clipoff; + settings.shortcuts = !settings.shortcuts; break; case 5: - settings.shortcuts = !settings.shortcuts; + settings.no_aa = !settings.no_aa; break; case 6: - settings.no_aa = !settings.no_aa; + bench_aa(); break; case 7: - bench_aa(); + settings.polyanim = !settings.polyanim; break; case 8: default: |