* Distributable under the terms and conditions of the 2-clause BSD license;
* see the file COPYING for a complete text of the license.
*
* Distributable under the terms and conditions of the 2-clause BSD license;
* see the file COPYING for a complete text of the license.
*
- case SDL_KEYUP:
-
- if (event.key.keysym.sym == SDLK_f)
- {
- moof::video::current()->toggle_fullscreen();
- }
- else if (event.key.keysym.sym == SDLK_l)
- {
- moof::video::current()->toggle_cursor_captured();
- moof::video::current()->toggle_cursor_visible();
- }
- else if (event.key.keysym.sym == SDLK_ESCAPE)
- {
- stop();
- }
- break;
-
- case SDL_VIDEORESIZE:
-
- glViewport(0, 0, event.resize.w, event.resize.h);
- break;
-
- case SDL_QUIT:
-
+ case SDL_KEYUP:
+ if (event.key.keysym.sym == SDLK_f)
+ {
+ moof::video::current()->toggle_fullscreen();
+ }
+ else if (event.key.keysym.sym == SDLK_l)
+ {
+ moof::video::current()->toggle_cursor_captured();
+ moof::video::current()->toggle_cursor_visible();
+ }
+ else if (event.key.keysym.sym == SDLK_ESCAPE)
+ {
- << PACKAGE" [-h|--help] [-i|--info] [OPTION=VALUE]..."
- << std::endl
- << "The alien-smashing action game." << std::endl
- << std::endl
- << "Options:" << std::endl
- << " -h, --help" << std::endl
- << " show this help and exit" << std::endl
- << " -i, --info" << std::endl
- << " show version and build information" << std::endl
- << " detail=1|2|3" << std::endl
- << " the level of detail of game scenes" << std::endl
- << " fullscreen=true|false" << std::endl
- << " if true, uses the entire display" << std::endl
- << " framerate=num" << std::endl
- << " number of frames to draw per second" << std::endl
- << std::endl
- << "See documentation for more options." << std::endl;
+ << PACKAGE" [-h|--help] [-i|--info] [OPTION=VALUE]..."
+ << std::endl
+ << "The alien-smashing action game." << std::endl
+ << std::endl
+ << "Options:" << std::endl
+ << " -h, --help" << std::endl
+ << " show this help and exit" << std::endl
+ << " -i, --info" << std::endl
+ << " show version and build information" << std::endl
+ << " detail=1|2|3" << std::endl
+ << " the level of detail of game scenes" << std::endl
+ << " fullscreen=true|false" << std::endl
+ << " if true, uses the entire display" << std::endl
+ << " framerate=num" << std::endl
+ << " number of frames to draw per second" << std::endl
+ << std::endl
+ << "See documentation for more options." << std::endl;
-void Main::print_option(const std::string& option, bool enabled)
-{
- if (isatty(1) == 1)
- {
- if (enabled) std::cout << "\033[1;94m";
- else std::cout << "\033[1m";
- }
- if (!enabled) std::cout << "-";
- std::cout << option;
- if (isatty(1) == 1) std::cout << "\033[0m";
- std::cout << " ";
-}
-
- << "Compiled " << __TIME__ " " __DATE__ << std::endl
- << "Send patches and bug reports to <"
- PACKAGE_BUGREPORT << ">." << std::endl << moof::log::endl;
+ << "Compiled " << __TIME__" "__DATE__ << std::endl
+ << "Send patches and bug reports to <"PACKAGE_BUGREPORT">."
+ << std::endl << moof::log::endl;
catch (const std::exception& e)
{
moof::modal_dialog dialog(moof::modal_dialog::error,
catch (const std::exception& e)
{
moof::modal_dialog dialog(moof::modal_dialog::error,