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