ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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_BURGER_VARS_H
23 #define M4_BURGER_VARS_H
24 
25 #include "common/textconsole.h"
26 #include "m4/vars.h"
27 #include "m4/burger/core/release_trigger.h"
28 #include "m4/burger/core/stream_break.h"
29 #include "m4/burger/gui/gui.h"
30 #include "m4/burger/gui/gui_gizmo.h"
31 #include "m4/burger/flags.h"
32 #include "m4/burger/hotkeys.h"
33 #include "m4/burger/inventory.h"
34 #include "m4/burger/series_player.h"
35 #include "m4/burger/walker.h"
36 
37 namespace M4 {
38 namespace Burger {
39 
40 enum GameMode {
41  JUST_OVERVIEW = 0, INTERACTIVE_DEMO = 1, MAGAZINE_DEMO = 2, WHOLE_GAME = 3
42 };
43 
44 enum global_triggers {
45  kFIRST_GLOBAL_TRIGGER = 10000,
46 
47  // System triggers
48  kRESUME_CONVERSATION = 10001, // Yep, that's what it does!
49  kSERIES_STREAM_BREAK = 10002, // Used only by set_next_stream_break () in global.cpp
50  kSERIES_PLAY_BREAK_0 = 10003,
51  kSERIES_PLAY_BREAK_1 = 10004,
52  kSERIES_PLAY_BREAK_2 = 10005,
53  kRELEASE_TRIGGER_DIGI_CHECK = 10006, // Used only by release_trigger_digi_check() in global.cpp
54  kAdvanceTime = 10007,
55 
56  kNPC_SPEECH_STARTED = 10010, // NPC talk started
57  kNPC_SPEECH_FINISHED = 10011, // NPC talk finished
58  kWILBUR_SPEECH_STARTED = 10013,
59  kWILBURS_SPEECH_FINISHED = 10014,
60  kWILBURS_SPEECH_START = 10015,
61  kCHANGE_WILBUR_ANIMATION = 10016,
62  kAdvanceHour = 10017,
63  kSET_FACING = 10018,
64  kPOOF = 10019,
65  kSET_COMMANDS_ALLOWED = 10020,
66  kUNPOOF = 10021,
67  kAbduction = 10022,
68  kTestTimeout = 10023,
69  kTELEPORTED1 = 10024,
70  kTELEPORTED2 = 10025,
71  k10027 = 10027,
72  kBurlEntersTown = 10028,
73  kBurlGetsFed = 10029,
74  kBurlStopsEating = 10030,
75  kBurlLeavesTown = 10031,
76  kBandEntersTown = 10032,
77 
78  kCALLED_EACH_LOOP = 32764,
79 
80  kLAST_GLOBAL_TRIGGER
81 };
82 
83 class Vars : public M4::Vars {
84 private:
85  static void custom_ascii_converter_proc(char *string);
86 
87 protected:
88  void main_cold_data_init() override;
89 
90 public:
91  // These are defined as statics because they're referenced in data arrays
92  static int32 _wilbur_should;
93 public:
94  Burger::Flags _flags;
95  GameMode _executing = WHOLE_GAME;
96  GUI::GUI_Globals _gui;
97  GUI::Gizmo_Globals _gizmo;
98  GUI::Interface _interface;
99  Burger::Hotkeys _hotkeys;
100  SeriesPlayers _seriesPlayers;
101  ReleaseTrigger_Globals _releaseTrigger;
102  StreamBreak_Globals _streamBreak;
103  Burger::Walker _walker;
104 
105  int _wilburTerm = 2;
106  bool _gameMenuFromMain = false;
107  int _room902Flag = 0;
108  int _roomVal3 = 0;
109  int _flumix_should = 0;
110  int _roomVal7 = 3;
111  machine *_npcSpeech1 = nullptr;
112  machine *_npcSpeech2 = nullptr;
113  int _npcTrigger = -1;
114  int _player_facing_x = 0, _player_facing_y = 0;
115  int _player_dest_x = 0, _player_dest_y = 0;
116  int _player_trigger = 0;
117 
118 public:
119  Vars();
120  virtual ~Vars();
121 
122  M4::Interface *getInterface() override {
123  return &_interface;
124  }
125  Hotkeys *getHotkeys() override {
126  return &_hotkeys;
127  }
128  M4::Walker *getWalker() override {
129  return &_walker;
130  }
131  void initialize_game() override;
132 
133  void global_menu_system_init() override;
134 };
135 
136 extern Vars *g_vars;
137 
138 #undef _G
139 #undef _GI
140 #define _G(X) (::M4::Burger::g_vars->_##X)
141 #define _GI(X) _G(interface)._##X
142 #define _GINT() _G(interface)
143 
144 } // namespace Burger
145 } // namespace M4
146 
147 #endif
Definition: hotkeys.h:33
Definition: vars.h:83
Definition: ws_machine.h:155
Definition: gui.h:33
Definition: flags.h:554
Definition: adv_walk.h:32
Definition: vars.h:68
Definition: adv_interface.h:32
Definition: walker.h:46
Definition: database.h:28
Definition: interface.h:36
Definition: series_player.h:65
Definition: gui_gizmo.h:41
Definition: release_trigger.h:31
Definition: stream_break.h:48