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
28namespace M4 {
29
30constexpr int NO_TRIGGER = -1;
31constexpr int TENTH_SECOND = 6;
32constexpr int MAX_TIMERS = 32;
33
34struct 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
53int32 kernel_trigger_create(int32 trigger_num);
54int32 kernel_trigger_create_mode(int32 trigger_num, int32 desired_mode);
55
62bool kernel_trigger_dispatchx(int32 trigger_num);
63bool kernel_trigger_dispatch_now(int32 trigger_num);
64void kernel_timing_trigger(int32 ticks, int16 trigger, const char *name = nullptr);
65void kernel_timing_trigger_daemon(int32 ticks, int16 trigger);
66void kernel_timing_trigger(int32 ticks, int16 trigger,
67 KernelTriggerType preMode, KernelTriggerType postMode);
68
69void cisco_dispatch_triggers();
70void cisco_clear_triggers();
71void kernel_service_timing_trigger_q();
72
73} // End of namespace M4
74
75#endif
Definition: database.h:28
bool kernel_trigger_dispatchx(int32 trigger_num)
int32 kernel_trigger_create(int32 trigger_num)
Definition: adv_trigger.h:34