ScummVM API documentation
vars.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef M4_RIDDLE_VARS_H
23 #define M4_RIDDLE_VARS_H
24 
25 #include "common/textconsole.h"
26 #include "m4/riddle/flags.h"
27 #include "m4/riddle/hotkeys.h"
28 #include "m4/riddle/walker.h"
29 #include "m4/riddle/gui/interface.h"
30 #include "m4/vars.h"
31 
32 namespace M4 {
33 namespace Riddle {
34 
35 enum global_triggers {
36  gFIRST_GLOBAL_TRIGGER = 10000,
37 
38  kCALLED_EACH_LOOP = 32764
39 };
40 
41 class Vars : public M4::Vars {
42 private:
43  static void custom_ascii_converter_proc(char *string);
44  static void escape_key_pressed(void *, void *);
45  static void cb_F2(void *, void *);
46  static void cb_F3(void *, void *);
47 
48 protected:
49  void main_cold_data_init() override;
50 
51 public:
52  Riddle::Flags _flags;
53  Riddle::Walker _walker;
54  Riddle::Hotkeys _hotkeys;
55  Riddle::GUI::Interface _interface;
56  int _global301 = 0;
57  int _flag1 = 0;
58  bool _kittyScreaming = false;
59 
60 public:
61  Vars();
62  virtual ~Vars();
63 
64  M4::Interface *getInterface() override {
65  return &_interface;
66  }
67  Hotkeys *getHotkeys() override {
68  return &_hotkeys;
69  }
70  M4::Walker *getWalker() override {
71  return &_walker;
72  }
73  void initialize_game() override;
74 
75  void global_menu_system_init() override;
76 };
77 
78 extern Vars *g_vars;
79 
80 #undef _G
81 #undef _GI
82 #define _G(X) (::M4::Riddle::g_vars->_##X)
83 #define _GI(X) _G(interface)._##X
84 #define _GINT() _G(interface)
85 
86 } // namespace Riddle
87 } // namespace M4
88 
89 #endif
Definition: adv_walk.h:32
Definition: vars.h:69
Definition: flags.h:554
Definition: adv_interface.h:30
Definition: vars.h:41
Definition: hotkeys.h:33
Definition: database.h:28
Definition: walker.h:44
Definition: interface.h:39