extern bool use_fullscreen;
extern bool debug_mode;
extern bool show_fps;
+ extern bool debug_grid;
/** The number of the joystick that will be use in the game */
extern int joystick_num;
tux.kill(tux.KILL);
last_keys.clear();
}
+ if(compare_last(last_keys, "grid"))
+ { // toggle debug grid
+ debug_grid = !debug_grid;
+ }
if(compare_last(last_keys, "hover"))
{ // toggle hover ability on/off
tux.enable_hover = !tux.enable_hover;
}
}
+ if (debug_grid)
+ {
+ for (pos.x = start_x; pos.x < end_x; pos.x += 32)
+ {
+ context.draw_filled_rect(Vector (pos.x, start_y), Vector(1, fabsf(start_y - end_y)),
+ Color(225, 225, 225), LAYER_GUI-50);
+ }
+
+ for (pos.y = start_y; pos.y < end_y; pos.y += 32)
+ {
+ context.draw_filled_rect(Vector (start_x, pos.y), Vector(fabsf(start_x - end_x), 1),
+ Color(225, 225, 225), LAYER_GUI-50);
+ }
+ }
+
context.pop_transform();
}