]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/game.h
Hard-coded undersampling.
[dragonfireclient.git] / src / game.h
index 358b26c377eee66413a681f52c547e9ff2108eb1..eaedca165d3831b958bcfb3aa05114bdfa3a21d6 100644 (file)
@@ -22,6 +22,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "irrlichttypes_extrabloated.h"
 #include <string>
+#include "client/keys.h"
+#include "client/joystick_controller.h"
 #include "keycode.h"
 #include <list>
 
@@ -110,6 +112,9 @@ class InputHandler
        virtual bool isKeyDown(const KeyPress &keyCode) = 0;
        virtual bool wasKeyDown(const KeyPress &keyCode) = 0;
 
+       virtual void listenForKey(const KeyPress &keyCode) {}
+       virtual void dontListenForKeys() {}
+
        virtual v2s32 getMousePos() = 0;
        virtual void setMousePos(s32 x, s32 y) = 0;
 
@@ -131,11 +136,25 @@ class InputHandler
        virtual void step(float dtime) {}
 
        virtual void clear() {}
+
+       JoystickController joystick;
 };
 
 class ChatBackend;  /* to avoid having to include chat.h */
 struct SubgameSpec;
 
+// Flags that can, or may, change during main game loop
+struct GameUIFlags
+{
+       bool show_chat;
+       bool show_hud;
+       bool show_minimap;
+       bool force_fog_off;
+       bool show_debug;
+       bool show_profiler_graph;
+       bool disable_camera_update;
+};
+
 void the_game(bool *kill,
                bool random_input,
                InputHandler *input,
@@ -147,8 +166,8 @@ void the_game(bool *kill,
                u16 port,
                std::string &error_message,
                ChatBackend &chat_backend,
+               bool *reconnect_requested,
                const SubgameSpec &gamespec, // Used for local game
                bool simple_singleplayer_mode);
 
 #endif
-