ScummVM API documentation
adv_trigger.h
1 
2 /* ScummVM - Graphic Adventure Engine
3  *
4  * ScummVM is the legal property of its developers, whose names
5  * are too numerous to list here. Please refer to the COPYRIGHT
6  * file distributed with this source distribution.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef M4_ADV_R_ADV_TRIGGER_H
24 #define M4_ADV_R_ADV_TRIGGER_H
25 
26 #include "m4/m4_types.h"
27 #include "m4/adv_r/adv.h"
28 
29 namespace M4 {
30 
31 constexpr int NO_TRIGGER = -1;
32 constexpr int TENTH_SECOND = 6;
33 constexpr int MAX_TIMERS = 32;
34 
35 struct Triggers {
36  int32 _time_q[MAX_TIMERS];
37  int32 _time_trigger_q[MAX_TIMERS];
38  int32 _time_q_end = 0;
39 
40  int32 _sound_trigger_q[MAX_TIMERS];
41  int32 _q_start = 0;
42  int32 _q_end = 0;
43 };
44 
54 int32 kernel_trigger_create(int32 trigger_num);
55 int32 kernel_trigger_create_mode(int32 trigger_num, int32 desired_mode);
56 
63 bool kernel_trigger_dispatchx(int32 trigger_num);
64 bool kernel_trigger_dispatch_now(int32 trigger_num);
65 void kernel_timing_trigger(int32 ticks, int16 trigger, const char *name = nullptr);
66 void kernel_timing_trigger_daemon(int32 ticks, int16 trigger);
67 void kernel_timing_trigger(int32 ticks, int16 trigger,
68  KernelTriggerType preMode, KernelTriggerType postMode);
69 
70 void cisco_dispatch_triggers();
71 void cisco_clear_triggers();
72 void kernel_service_timing_trigger_q();
73 
74 } // End of namespace M4
75 
76 #endif
bool kernel_trigger_dispatchx(int32 trigger_num)
Definition: database.h:28
Definition: adv_trigger.h:35
int32 kernel_trigger_create(int32 trigger_num)