gwin->brighten(-20);
change_gamma(true);
static void Handle_keystroke	(	SDLKey sym,	int shift,        int alt,	int ctrl,	Uint16 unicode	)	{	switch (sym)		{	case SDLK_RALT:			// Right alt.	case SDLK_RMETA:		altkeys |= 1;		// Set flag.		break;	case SDLK_LALT:	case SDLK_LMETA:		altkeys |= 2;		break;	case SDLK_PLUS:	case SDLK_KP_PLUS:		if(alt && !ctrl) {		// Alt-+ : Increase resolution			increase_resolution();		} else if (!alt && !ctrl) {	// + : Brighten			gwin->brighten(20);		}		break;	case SDLK_MINUS:	case SDLK_KP_MINUS:		if(alt && !ctrl) {		// Alt-- : Decrease resolution			decrease_resolution();		} else if (!alt && !ctrl) {	// - : Darken			gwin->brighten(-20);		}		break;	case SDLK_ESCAPE:		if (!alt && !ctrl) {		// ESC : close gumps or quit			if (gwin->get_mode() == Game_window::gump)				gwin->end_gump_mode();			else			// For now, quit.				Okay_to_quit();		}		break;	case SDLK_RIGHT:		if (cheat() && !alt && !ctrl) {			for (int i = 16; i; i--)				gwin->view_right();		}		break;	case SDLK_LEFT:		if (cheat() && !alt && !ctrl) {			for (int i = 16; i; i--)				gwin->view_left();		}		break;	case SDLK_DOWN:		if (cheat() && !alt && !ctrl) {			for (int i = 16; i; i--)				gwin->view_down();		}		break;	case SDLK_UP:		if (cheat() && !alt && !ctrl) {			for (int i = 16; i; i--)				gwin->view_up();		}		break;	case SDLK_HOME:		if (cheat() && !alt && !ctrl) {	// Home : center screen on avatar			gwin->center_view(gwin->get_main_actor()->get_abs_tile_coord());			gwin->paint();		}		break;	case SDLK_F4:		if (!alt && !ctrl) {		// F4 : Toggle fullscreen mode			toggle_fullscreen();		}		break;	case SDLK_F10:		if (cheat() && !alt && !ctrl) {	// F10 : show endgame			game->end_game(shift==0);			gwin->set_palette(0);			gwin->paint();			gwin->fade_palette (50, 1, 0);		}		break;	case SDLK_F11:				// F11 : show SI intro 		if (cheat() && !alt && !ctrl && Game::get_game_type() == SERPENT_ISLE) {			game->set_jive();			game->play_intro();			game->clear_jive();			gwin->set_palette(0);			gwin->paint();			gwin->fade_palette (50, 1, 0);		}		break;	default:		if ((unicode & 0xFF80) == 0)		{		int chr = (unicode & 0x7f);		if (chr < 0x20)		// Control char?  Branch on orig.			chr = (int) sym;		switch (chr)			{			case '1':				if(!ctrl && alt) {		// Alt-1 : Sound Testser					cheat.sound_tester();				}				break;			case 'b':				if(ctrl && !alt) {		// Ctrl-b : Shape browser					cheat.shape_browser();				} else if (!alt && !ctrl) {	// b : Open spellbook.					gwin->activate_item(761);				}				break;			case 'c':				if (ctrl && !alt) {		// Ctrl-c : Create last shape viewed.					cheat.create_last_shape();				} else if (!ctrl && !alt) {	// c : Combat mode					toggle_combat();				}				break;			case 'd':				if (ctrl && !alt) {		// Ctrl-d : delete what mouse is on.					cheat.delete_object();				}				break;			case 'e':				if (!alt && !ctrl) {		// e : toggle eggs display					cheat.toggle_eggs();				}				break;			case 'f':				if (!ctrl && !alt) {		// f : Feed food.					gwin->activate_item(377);	// +++++Black gate.				}				break;			case 'g':				if (alt && !ctrl) {		// Alt-g : toggle god-mode					cheat.toggle_god();				} else if (!ctrl && !alt) {	// g :  Change Avatars gender					cheat.change_gender();				}				break;			case 'h':				if (!alt && !ctrl) {		// h : help					show_help();								} else if (ctrl && !alt) {	// Ctrl-h : cheat help					show_cheat_help();				} else if (ctrl && alt) {	// Ctrl-Alt-h : heal party					cheat.heal_party();				}				break;			case 'i':				if (alt && !ctrl) {    		// Alt-i : infravision					cheat.toggle_infravision();				} else if (!alt && !ctrl) {	// i : show inventory					gump_next_inventory();				}				break;			case 'k':				if (!alt && !ctrl) {		// k : find key					Try_key(gwin);				}				break;			case 'l':				if(!alt && !ctrl) {		// l : decrement skip_lift					cheat.dec_skip_lift();				} else if (!alt && ctrl) {	// Ctrl-l : level up party					cheat.levelup_party();				}				break;			case 'm':				if (ctrl && alt) {  		// Ctrl-Alt-m : map editor mode					cheat.toggle_map_editor();				} else if (ctrl && !alt) {	// Ctrl-m : 100 gold coins					cheat.create_coins();				} else if (alt && !ctrl) {	// Alt-m : next song								// Shift-Alt-m : previous song					static int mnum = 0;					if (shift && mnum > 0)						Audio::get_ptr()->start_music(--mnum, 0);					else						Audio::get_ptr()->start_music(mnum++, 0);				} else if (!alt && !ctrl) {	// m : Show map.					gwin->activate_item(178);	//++++Black gate.				}				break;			case 'n':				if (alt && !ctrl) {		// Alt-n : Toggle Naked flag					cheat.toggle_naked();				}				break;			case 'p':				if (alt && !ctrl) {		// Alt-p : Toggle Petra mode					cheat.toggle_Petra();				} else if (!alt && ctrl) {	// Ctrl-p : Rerender screen					gwin->paint();				} else if (!alt && !ctrl) {	// p : use lockpick					gwin->activate_item(627);				}				break;		#ifdef MACOS			case 'q':				if (alt && !ctrl) {		// Mac only: Cmd-Q : Quit					Okay_to_quit();				}				break;		#endif			case 'r':				if (ctrl && !alt) {		// Ctrl-r : Restore from 'gamedat'					quick_restore();				}				break;			case 's':				if (ctrl && alt) {		// Ctrl-Alt-s : Screenshot					make_screenshot();				} else if (ctrl && !alt) {	// Ctrl-s : Save to 'gamedat'					quick_save();				} else if (alt && !ctrl) {	// Alt-s : Change skin color					cheat.change_skin();				} else if (!alt && !ctrl) { 	// s : save/restore gump					gump_file();				}				break;			case 't':				if (ctrl && alt) {		// Ctrl-Alt-t : map teleport					cheat.map_teleport();				} else if (ctrl && !alt) {	// Ctrl-t :  Fake next time change.					cheat.fake_time_period();				} else if (alt && !ctrl) { 	// Alt-t : Teleport to cursor					cheat.cursor_teleport();				} else if (!alt && !ctrl) {	// t : Target mode.					target_mode();				}				break;			case 'v':				if(!ctrl && !alt) {					show_about();				}				break;			case 'w':				if (alt && !ctrl) {  		// Alt-w : toggle archwizard mode					cheat.toggle_wizard();				} else if (!alt && !ctrl) {	// w : Activate watch.					gwin->activate_item(159);	// ++++Blackgate.				}				break;			case 'x':				if (alt && !ctrl) {		// Alt-x : quit					Okay_to_quit();				}				break;			case 'z':				if (!alt && !ctrl) { 		// z : Show stats					gump_next_stats();				}				break;			}		}	}}