X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgame_session.hpp;h=d2cd2dc37cc30c849089a022d816ae4c775e2cb2;hb=5c386075212cf48cba4f940b90ba6e013b179edb;hp=fced5d2d1d6855aaa79ac0741ded9506d25ec8b4;hpb=9e5732a3c816561abfa93882860eb4a3e8e104c1;p=supertux.git diff --git a/src/game_session.hpp b/src/game_session.hpp index fced5d2d1..d2cd2dc37 100644 --- a/src/game_session.hpp +++ b/src/game_session.hpp @@ -53,7 +53,7 @@ class CodeController; /** The GameSession class controlls the controll flow of a World, ie. present the menu on specifc keypresses, render and update it while keeping the speed and framerate sane, etc. */ -class GameSession +class GameSession : public ConsoleCommandReceiver { public: enum ExitStatus { ES_NONE, ES_LEVEL_FINISHED, ES_GAME_OVER, ES_LEVEL_ABORT }; @@ -91,15 +91,14 @@ public: { return level; } void start_sequence(const std::string& sequencename); - /// called by JoystickKeyboardController after an ascii key has been pressed - void try_cheats(); /** returns the "working directory" usually this is the directory where the * currently played level resides. This is used when locating additional * resources for the current level/world */ std::string get_working_directory(); - + bool consoleCommand(std::string command); /**< callback from Console; return false if command was unknown, true otherwise */ + private: void restart_level();