forked from len0rd/rockbox
puzzles: update debug menu
Add an option to visualize polygon rendering to aid in diagnosing artifacts.
This commit is contained in:
parent
403d011bd8
commit
513fb8b332
1 changed files with 15 additions and 11 deletions
|
@ -82,7 +82,7 @@ extern bool audiobuf_available;
|
||||||
|
|
||||||
static struct settings_t {
|
static struct settings_t {
|
||||||
int slowmo_factor;
|
int slowmo_factor;
|
||||||
bool bulk, timerflash, clipoff, shortcuts, no_aa;
|
bool timerflash, clipoff, shortcuts, no_aa, polyanim;
|
||||||
} settings;
|
} settings;
|
||||||
|
|
||||||
/* clipping is implemented through viewports and offsetting
|
/* 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,
|
xlcd_filltriangle(x1, y1,
|
||||||
x2, y2,
|
x2, y2,
|
||||||
x3, y3);
|
x3, y3);
|
||||||
|
if(settings.polyanim)
|
||||||
|
{
|
||||||
|
rb->lcd_update();
|
||||||
|
rb->sleep(HZ/5);
|
||||||
|
}
|
||||||
#if 0
|
#if 0
|
||||||
/* debug code */
|
/* debug code */
|
||||||
rb->lcd_set_foreground(LCD_RGBPACK(255,0,0));
|
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)
|
static void init_default_settings(void)
|
||||||
{
|
{
|
||||||
settings.slowmo_factor = 1;
|
settings.slowmo_factor = 1;
|
||||||
settings.bulk = false;
|
|
||||||
settings.timerflash = false;
|
settings.timerflash = false;
|
||||||
settings.clipoff = false;
|
settings.clipoff = false;
|
||||||
settings.shortcuts = false;
|
settings.shortcuts = false;
|
||||||
settings.no_aa = false;
|
settings.no_aa = false;
|
||||||
|
settings.polyanim = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_MENU
|
#ifdef DEBUG_MENU
|
||||||
|
@ -1220,12 +1224,12 @@ static void debug_menu(void)
|
||||||
MENUITEM_STRINGLIST(menu, "Debug Menu", NULL,
|
MENUITEM_STRINGLIST(menu, "Debug Menu", NULL,
|
||||||
"Slowmo factor",
|
"Slowmo factor",
|
||||||
"Randomize colors",
|
"Randomize colors",
|
||||||
"Toggle bulk update",
|
|
||||||
"Toggle flash pixel on timer",
|
"Toggle flash pixel on timer",
|
||||||
"Toggle clip",
|
"Toggle clip",
|
||||||
"Toggle shortcuts",
|
"Toggle shortcuts",
|
||||||
"Toggle antialias",
|
"Toggle antialias",
|
||||||
"Benchmark antialias",
|
"Benchmark antialias",
|
||||||
|
"Toggle show poly steps",
|
||||||
"Back");
|
"Back");
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
int sel = 0;
|
int sel = 0;
|
||||||
|
@ -1247,23 +1251,23 @@ static void debug_menu(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
settings.bulk = !settings.bulk;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
settings.timerflash = !settings.timerflash;
|
settings.timerflash = !settings.timerflash;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 3:
|
||||||
settings.clipoff = !settings.clipoff;
|
settings.clipoff = !settings.clipoff;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 4:
|
||||||
settings.shortcuts = !settings.shortcuts;
|
settings.shortcuts = !settings.shortcuts;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 5:
|
||||||
settings.no_aa = !settings.no_aa;
|
settings.no_aa = !settings.no_aa;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 6:
|
||||||
bench_aa();
|
bench_aa();
|
||||||
break;
|
break;
|
||||||
|
case 7:
|
||||||
|
settings.polyanim = !settings.polyanim;
|
||||||
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
default:
|
default:
|
||||||
quit = true;
|
quit = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue