improve debug display performance
This commit is contained in:
parent
6b76cf6d66
commit
daeda88eed
21
src/main.c
21
src/main.c
|
@ -138,33 +138,36 @@ int main(void)
|
|||
|
||||
/* Developer/tweaking menu */
|
||||
if(debug.show_vars) {
|
||||
for(int i = 0; i < 396 * 224; i++) {
|
||||
gint_vram[i] = (gint_vram[i] & 0xf7de) >> 1;
|
||||
uint32_t *vram = (void *)gint_vram;
|
||||
for(int y = 0; y < 224; y++) {
|
||||
for(int i = 0; i < 396/4; i++)
|
||||
vram[i] = (vram[i] & 0xf7def7de) >> 1;
|
||||
vram += 396/2;
|
||||
}
|
||||
|
||||
uint16_t gray = C_RGB(16, 16, 16);
|
||||
|
||||
dprint(3, 40, C_WHITE, "Max player speed: %g tiles/s",
|
||||
dprint(3, 40, C_WHITE, "Player speed: %g tiles/s",
|
||||
f2double(emp_player.max_speed));
|
||||
dprint(15, 55, gray, "More with [X,0,T], less with [frac]");
|
||||
dprint(15, 55, gray, "[frac] -/+ [X,0,T]");
|
||||
|
||||
dprint(3, 70, C_WHITE, "Propulsion: %g s^-1",
|
||||
f2double(emp_player.propulsion));
|
||||
dprint(15, 85, gray, "More with [log], less with [F<>D]");
|
||||
dprint(15, 100, C_WHITE, "(Equivalent friction: %g)",
|
||||
dprint(15, 85, gray, "[F<>D] -/+ [log]");
|
||||
dprint(15, 100, C_WHITE, "(Friction: %g)",
|
||||
f2double(fix(1) - emp_player.propulsion / FRAME_RATE));
|
||||
|
||||
dprint(3, 115, C_WHITE, "Dash speed: %g tiles/s",
|
||||
f2double(emp_player.dash_speed));
|
||||
dprint(15, 130, gray, "More with [ln], less with [(]");
|
||||
dprint(15, 130, gray, "[(] -/+ [ln]");
|
||||
|
||||
dprint(3, 145, C_WHITE, "Dash duration: %g s",
|
||||
f2double(emp_player.dash_duration));
|
||||
dprint(15, 160, gray, "More with [sin], less with [)]");
|
||||
dprint(15, 160, gray, "[)] -/+ [sin]");
|
||||
|
||||
dprint(3, 175, C_WHITE, "Dash cooldown: %g s",
|
||||
f2double(emp_player.dash_cooldown));
|
||||
dprint(15, 190, gray, "More with [cos], less with [,]");
|
||||
dprint(15, 190, gray, "[,] -/+ [cos]");
|
||||
}
|
||||
|
||||
if(debug.show_path) {
|
||||
|
|
Loading…
Reference in New Issue