ScummVM API documentation
kernel.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_ADV_R_KERNEL_H
23 #define M4_ADV_R_KERNEL_H
24 
25 #include "m4/adv_r/adv.h"
26 
27 namespace M4 {
28 
29 #define CACHE_NOT_OVERRIDE_BY_FLAG_PARSE 2
30 #define KERNEL_RESTORING_GAME -2
31 #define KERNEL_SCRATCH_SIZE 256 // Size of game scratch area
32 
33 struct Kernel {
34  uint32 scratch[KERNEL_SCRATCH_SIZE]; // Scratch variables for room
35  bool hag_mode = true;
36 
37  uint32 clock = 0; // Current game timing clock
38  int32 trigger = 0; // Game trigger code, if any
39  int32 letter_box_x = 0;
40  int32 letter_box_y = 0;
41  int32 restore_slot = -1;
42  int16 first_non_walker_cel_hash = 0;
43  int16 last_save = 0; // Most recent save slot #
44 
45  char save_file_name[8] = { 0 };
46  bool restore_game = false; // TRUE if we wanna restore
47  bool teleported_in = false; // Flag if player teleported to room
48 
49  int32 fade_up_time = 0;
50  int16 first_fade = 0;
51  bool fading_to_grey = false;
52  bool suppress_fadeup = false;
53  bool force_restart = false;
54 
55  bool pause = false;
56 
57  KernelTriggerType trigger_mode = KT_DAEMON; // trigger was/is invoked in this mode
58  bool call_daemon_every_loop = false;
59  bool continue_handling_trigger = true; // set to True in apps code when trigger is to
60  // be handled by the next layer (scene/section/global daemon code)
61  int suppress_cache = CACHE_NOT_OVERRIDE_BY_FLAG_PARSE;
62  bool start_up_with_dbg_ws = false;
63  bool use_debug_monitor = false;
64  bool use_log_file = false;
65  bool track_open_close = false;
66  bool going = false;
67  bool camera_pan_instant = false;
68  bool unused = false;
69 
70  size_t mem_avail() const { return 7999999; }
71  bool cameraPans() const { return !camera_pan_instant; }
72 };
73 
74 } // namespace M4
75 
76 #endif
Definition: kernel.h:33
Definition: database.h:28