ScummVM API documentation
series_player.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_BURGER_SERIES_PLAYER_H
24 #define M4_BURGER_SERIES_PLAYER_H
25 
26 #include "m4/m4_types.h"
27 #include "m4/wscript/ws_machine.h"
28 #include "m4/burger/core/play_break.h"
29 
30 namespace M4 {
31 namespace Burger {
32 
33 // Flags for series_stream_with_breaks and series_play_with_breaks
34 #define DIGI_LOOP 1024 // these must be more than the series play flags
35 #define DIGI_STOP 2048
36 
37 struct seriesPlayer {
38  const seriesPlayBreak *break_list = nullptr; // Holds the list of breaks for digi plays
39  seriesPlayBreak current_break; // Current play break
40  machine *series_machine = nullptr; // Series' playback machine
41  machine *shadow_machine = nullptr; // Shadow series' playback machine
42  int32 series = 0; // Holds the series handle upon loading so it can be unloaded at the end
43  int32 shadow_series = 0; // Holds the series handle for the shadow
44  int32 index = 0; // Holds which line of the list currently waiting for a play break
45  const char *name = nullptr; // Name of series to play
46  char shadow_name[80] = { 0 };
47  int32 framerate = 0;
48  int32 trigger = 0;
49  frac16 depth = 0;
50  int32 scale = 0;
51  int32 x = 0;
52  int32 y = 0;
53  bool with_shadow = false; // True if a shadow is to be played in unison with series
54  bool preload_sounds = false; // True if you want to preload and unload the sounds automatically
55  bool digi_trigger = false; // True if gSERIES_PLAY_BREAK trigger has come from a digi_play and not a series_play
56  bool in_use = false; // Stops two calls from happening at the same time
57 
61  void clear();
62 };
63 #define MAX_SERIES_PLAYERS 3
64 
66 private:
67  seriesPlayer _players[MAX_SERIES_PLAYERS];
68 public:
69  seriesPlayer &operator[](uint idx) {
70  assert(idx < MAX_SERIES_PLAYERS);
71  return _players[idx];
72  }
73  const seriesPlayer &operator[](uint idx) const {
74  assert(idx < MAX_SERIES_PLAYERS);
75  return _players[idx];
76  }
77 
81  void clear();
82 };
83 
84 } // namespace Burger
85 } // namespace M4
86 
87 #endif
Definition: ws_machine.h:153
Definition: series_player.h:37
intptr frac16
Definition: m4_types.h:46
Definition: database.h:28
Definition: play_break.h:32
Definition: series_player.h:65