+ }
+ if(compare_last(last_keys, "grease")) {
+ tux.physic.set_velocity_x(tux.physic.get_velocity_x()*3);
+ last_keys.clear();
+ }
+ if(compare_last(last_keys, "invincible")) {
+ // be invincle for the rest of the level
+ tux.invincible_timer.start(10000);
+ last_keys.clear();
+ }
+ if(compare_last(last_keys, "shrink")) {
+ // remove powerups
+ tux.kill(tux.SHRINK);
+ last_keys.clear();
+ }
+ if(compare_last(last_keys, "kill")) {
+ // kill Tux, but without losing a life
+ player_status.lives++;
+ tux.kill(tux.KILL);
+ last_keys.clear();
+ }
+ if(compare_last(last_keys, "grid")) {
+ // toggle debug grid
+ debug_grid = !debug_grid;
+ last_keys.clear();
+ }
+ if(compare_last(last_keys, "hover")) {
+ // toggle hover ability on/off
+ tux.enable_hover = !tux.enable_hover;
+ last_keys.clear();
+ }
+ if(compare_last(last_keys, "gotoend")) {
+ // goes to the end of the level
+ tux.move(Vector(
+ (currentsector->solids->get_width()*32) - (screen->w*2), 0));
+ currentsector->camera->reset(
+ Vector(tux.get_pos().x, tux.get_pos().y));
+ last_keys.clear();
+ }
+ if(compare_last(last_keys, "finish")) {
+ // finish current sector
+ exit_status = ES_LEVEL_FINISHED;
+ // don't add points to stats though...
+ }
+ // temporary to help player's choosing a flapping
+ if(compare_last(last_keys, "marek")) {
+ tux.flapping_mode = Player::MAREK_FLAP;
+ last_keys.clear();
+ }
+ if(compare_last(last_keys, "ricardo")) {
+ tux.flapping_mode = Player::RICARDO_FLAP;
+ last_keys.clear();
+ }
+ if(compare_last(last_keys, "ryan")) {
+ tux.flapping_mode = Player::RYAN_FLAP;