Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
MusicDirector.h
Go to the documentation of this file.
1
/* Project Starshatter 4.5
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: Stars.exe
6
FILE: MusicDirector.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Music Director class to manage selection, setup, and playback
13
of background music tracks for both menu and game modes
14
*/
15
16
17
#ifndef MusicDirector_h
18
#define MusicDirector_h
19
20
#include "
Types.h
"
21
#include "
List.h
"
22
#include "
Text.h
"
23
24
// +-------------------------------------------------------------------+
25
26
class
MusicTrack
;
27
28
// +-------------------------------------------------------------------+
29
30
class
MusicDirector
31
{
32
public
:
33
enum
MODES
{
34
NONE
,
35
36
// menu modes:
37
38
MENU
,
39
INTRO
,
40
BRIEFING
,
41
DEBRIEFING
,
42
PROMOTION
,
43
VICTORY
,
44
DEFEAT
,
45
CREDITS
,
46
47
// in game modes:
48
49
FLIGHT
,
50
COMBAT
,
51
LAUNCH
,
52
RECOVERY
,
53
54
// special modes:
55
SHUTDOWN
56
};
57
58
enum
TRANSITIONS
{
59
CUT
,
60
FADE_OUT
,
61
FADE_IN
,
62
FADE_BOTH
,
63
CROSS_FADE
64
};
65
66
MusicDirector
();
67
~MusicDirector
();
68
69
// Operations:
70
void
ExecFrame
();
71
void
ScanTracks
();
72
73
int
CheckMode
(
int
mode
);
74
int
GetMode
()
const
{
return
mode
; }
75
76
static
void
Initialize
();
77
static
void
Close
();
78
static
MusicDirector
*
GetInstance
();
79
static
void
SetMode
(
int
mode
);
80
static
const
char
*
GetModeName
(
int
mode
);
81
static
bool
IsNoMusic
();
82
83
protected
:
84
void
StartThread
();
85
void
StopThread
();
86
void
GetNextTrack
(
int
index);
87
void
ShuffleTracks
();
88
89
int
mode
;
90
int
transition
;
91
92
MusicTrack
*
track
;
93
MusicTrack
*
next_track
;
94
95
List<Text>
menu_tracks
;
96
List<Text>
intro_tracks
;
97
List<Text>
brief_tracks
;
98
List<Text>
debrief_tracks
;
99
List<Text>
promote_tracks
;
100
List<Text>
flight_tracks
;
101
List<Text>
combat_tracks
;
102
List<Text>
launch_tracks
;
103
List<Text>
recovery_tracks
;
104
List<Text>
victory_tracks
;
105
List<Text>
defeat_tracks
;
106
List<Text>
credit_tracks
;
107
108
bool
no_music
;
109
110
HANDLE
hproc
;
111
ThreadSync
sync
;
112
};
113
114
#endif MusicDirector_h
Stars45
MusicDirector.h
Generated on Tue Jun 5 2012 20:47:00 for Starshatter_Open by
1.8.1