diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-03-19 13:18:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-19 13:18:52 +0100 |
commit | 3c4ac70348db5375118d1e714a6d4681c3cfcd05 (patch) | |
tree | 351f00d7c980d4c2668d67d5b04fee9f09f9fe5d /src/game.h | |
parent | 2e3778ec0c1f77007d064d15310fa816e2a07e88 (diff) | |
download | minetest-3c4ac70348db5375118d1e714a6d4681c3cfcd05.tar.gz minetest-3c4ac70348db5375118d1e714a6d4681c3cfcd05.tar.bz2 minetest-3c4ac70348db5375118d1e714a6d4681c3cfcd05.zip |
Refactor Game class (part 2) (#5422)
* showPauseMenu is now part of game
* remove many flags parameters passed to game functions, use the member.
* rename VolatileRunFlags to GameUIFlags (this will permit to share structure with client and CSM
* updatePointedThing: remove pointer ref, we already have the pointer in rundata
* move some attributes outside of VolatileRunFlags after renaming, to game class
* rename statustext to m_statustext
* make some const variables static
* All those changes permit to reduce a little bit function class cost and will permit to interface CSM with some interesting Game flags
* Expose GameUIFlags to client
* Client now have GameUIFlags parameter and setters for other classes
* Fix minimap show/hide in Lua because we now have access to the real flag
Diffstat (limited to 'src/game.h')
-rw-r--r-- | src/game.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game.h b/src/game.h index df32e3397..19992ce3d 100644 --- a/src/game.h +++ b/src/game.h @@ -143,6 +143,18 @@ public: 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, |