Sort include order.
[gemrb.git] / gemrb / plugins / MUSImporter / MUSImporter.h
blob21237edcd2a8fcd9279e589f4a01b45cec339e42
1 /* GemRB - Infinity Engine Emulator
2 * Copyright (C) 2003 The GemRB Project
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef MUSIMPORTER_H
22 #define MUSIMPORTER_H
24 #include "MusicMgr.h"
26 #include "FileStream.h"
27 #include "ResourceManager.h"
29 #include <cstdio>
31 /**MUS PlayList Importer
32 *@author GemRB Development Team
35 struct PLString {
36 char PLFile[10];
37 char PLLoop[10];
38 char PLTag[10];
39 char PLEnd[10];
40 unsigned int soundID;
43 class MUSImporter : public MusicMgr {
44 private:
45 bool Initialized;
46 bool Playing;
47 char PLName[32];
48 int PLpos, PLnext;
49 FileStream* str;
50 std::vector< PLString> playlist;
51 unsigned int lastSound;
52 ResourceManager manager;
53 private:
54 void PlayMusic(int pos);
55 void PlayMusic(char* name);
56 public:
57 MUSImporter();
58 ~MUSImporter();
59 /** Loads a PlayList for playing */
60 bool OpenPlaylist(const char* name);
61 /** Initializes the PlayList Manager */
62 bool Init();
63 /** Switches the current PlayList while playing the current one */
64 int SwitchPlayList(const char* name, bool Hard);
65 /** Ends the Current PlayList Execution */
66 void End();
67 void HardEnd();
68 /** Start the PlayList Music Execution */
69 void Start();
70 /** Plays the Next Entry */
71 void PlayNext();
72 /** Returns whether music is currently playing */
73 bool IsPlaying() { return Playing; }
74 /** Returns whether given playlist is currently loaded */
75 bool CurrentPlayList(const char* name);
78 #endif