LMMS
Loading...
Searching...
No Matches
adl.h
Go to the documentation of this file.
1/*
2 * Adplug - Replayer for many OPL2/OPL3 audio file formats.
3 * Copyright (C) 1999 - 2007 Simon Peter, <dn.tlp@gmx.net>, et al.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 * adl.h - ADL player adaption by Simon Peter <dn.tlp@gmx.net>
20 */
21
22#ifndef H_ADPLUG_ADLPLAYER
23#define H_ADPLUG_ADLPLAYER
24
25#include <inttypes.h>
26
27#include "player.h"
28
29class AdlibDriver;
30
31class CadlPlayer: public CPlayer
32{
33 public:
34 static CPlayer *factory(Copl *newopl);
35
36 CadlPlayer(Copl *newopl);
38
39 bool load(const std::string &filename, const CFileProvider &fp);
40 bool update();
41 void rewind(int subsong = -1);
42
43 // refresh rate is fixed at 72Hz
44 float getrefresh()
45 {
46 return 72.0f;
47 }
48
49 unsigned int getsubsongs();
50 unsigned int getsubsong() { return cursubsong; }
51 std::string gettype();
52
53 private:
55
57
63
66
68 const int *_soundTriggers;
69
70 static const int _kyra1NumSoundTriggers;
71 static const int _kyra1SoundTriggers[];
72
73 bool init();
74 void process();
75 void playTrack(uint16_t track);
76 void playSoundEffect(uint16_t track);
77 void play(uint16_t track);
78 void unk1();
79 void unk2();
80};
81
82#endif
Definition adl.cpp:106
Definition fprovide.h:29
CPlayer(Copl *newopl)
Definition player.cpp:34
const int * _soundTriggers
Definition adl.h:68
uint8_t _sfxPriority
Definition adl.h:64
uint8_t _trackEntries[120]
Definition adl.h:59
bool init()
Definition adl.cpp:2250
void process()
Definition adl.cpp:2256
static const int _kyra1NumSoundTriggers
Definition adl.h:70
uint8_t _version
Definition adl.h:58
uint8_t * _soundDataPtr
Definition adl.h:61
float getrefresh()
Definition adl.h:44
void unk2()
Definition adl.cpp:2545
unsigned int getsubsong()
Definition adl.h:50
static CPlayer * factory(Copl *newopl)
Definition adl.cpp:2557
static const int _kyra1SoundTriggers[]
Definition adl.h:2221
int numsubsongs
Definition adl.h:54
CadlPlayer(Copl *newopl)
Definition adl.cpp:2227
unsigned int getsubsongs()
Definition adl.cpp:2516
uint16_t _trackEntries16[250]
Definition adl.h:60
std::string gettype()
Definition adl.cpp:2549
void playSoundEffect(uint16_t track)
Definition adl.cpp:2292
int _numSoundTriggers
Definition adl.h:67
~CadlPlayer()
Definition adl.cpp:2245
bool load(const std::string &filename, const CFileProvider &fp)
Definition adl.cpp:2357
int cursubsong
Definition adl.h:54
AdlibDriver * _driver
Definition adl.h:56
int _sfxPlayingSound
Definition adl.h:62
void playTrack(uint16_t track)
Definition adl.cpp:2282
bool update()
Definition adl.cpp:2521
void unk1()
Definition adl.cpp:2540
uint8_t _sfxFourthByteOfSong
Definition adl.h:65
void rewind(int subsong=-1)
Definition adl.cpp:2506
void play(uint16_t track)
Definition adl.cpp:2296
Definition opl.h:26
static char filename[]
Definition features.c:5
unsigned short uint16_t
Definition mid.cpp:99
unsigned char uint8_t
Definition mid.cpp:98