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/adv_r/adv.h"
27 
28 namespace M4 {
29 
30 constexpr int NO_TRIGGER = -1;
31 constexpr int TENTH_SECOND = 6;
32 constexpr int MAX_TIMERS = 32;
33 
34 struct Triggers {
35  int32 _time_q[MAX_TIMERS];
36  int32 _time_trigger_q[MAX_TIMERS];
37  int32 _time_q_end = 0;
38 
39  int32 _sound_trigger_q[MAX_TIMERS];
40  int32 _q_start = 0;
41  int32 _q_end = 0;
42 };
43 
53 int32 kernel_trigger_create(int32 trigger_num);
54 int32 kernel_trigger_create_mode(int32 trigger_num, int32 desired_mode);
55 
62 bool kernel_trigger_dispatchx(int32 trigger_num);
63 bool kernel_trigger_dispatch_now(int32 trigger_num);
64 void kernel_timing_trigger(int32 ticks, int16 trigger, const char *name = nullptr);
65 void kernel_timing_trigger_daemon(int32 ticks, int16 trigger);
66 void kernel_timing_trigger(int32 ticks, int16 trigger,
67  KernelTriggerType preMode, KernelTriggerType postMode);
68 
69 void cisco_dispatch_triggers();
70 void cisco_clear_triggers();
71 void kernel_service_timing_trigger_q();
72 
73 } // End of namespace M4
74 
75 #endif
bool kernel_trigger_dispatchx(int32 trigger_num)
Definition: database.h:28
Definition: adv_trigger.h:34
int32 kernel_trigger_create(int32 trigger_num)