LMMS
Loading...
Searching...
No Matches
d00.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 * d00.h - D00 Player by Simon Peter <dn.tlp@gmx.net>
20 */
21
22#ifndef H_D00
23#define H_D00
24
25#include "player.h"
26
27class Cd00Player: public CPlayer
28{
29 public:
30 static CPlayer *factory(Copl *newopl);
31
33 : CPlayer(newopl), filedata(0)
34 { };
36 { if(filedata) delete [] filedata; };
37
38 bool load(const std::string &filename, const CFileProvider &fp);
39 bool update();
40 void rewind(int subsong);
41 float getrefresh();
42
43 std::string gettype();
44 std::string gettitle()
45 { if(version > 1) return std::string(header->songname); else return std::string(); };
46 std::string getauthor()
47 { if(version > 1) return std::string(header->author); else return std::string(); };
48 std::string getdesc()
49 { if(*datainfo) return std::string(datainfo); else return std::string(); };
50 unsigned int getsubsongs();
51
52 protected:
53#pragma pack(1)
54 struct d00header {
55 char id[6];
57 char songname[32],author[32],dummy[32];
59 };
60
61 struct d00header1 {
62 unsigned char version,speed,subsongs;
64 };
65#pragma pack()
66
67 struct {
73 } channel[9];
74
75 struct Sinsts {
76 unsigned char data[11],tunelev,timer,sr,dummy[2];
77 } *inst;
78
79 struct Sspfx {
80 unsigned short instnr;
81 signed char halfnote;
82 unsigned char modlev;
83 signed char modlevadd;
84 unsigned char duration;
85 unsigned short ptr;
86 } *spfx;
87
88 struct Slevpuls {
89 unsigned char level;
90 signed char voladd;
91 unsigned char duration,ptr;
93
94 unsigned char songend,version,cursubsong;
95 char *datainfo;
96 unsigned short *seqptr;
99 char *filedata;
100
101 private:
102 void setvolume(unsigned char chan);
103 void setfreq(unsigned char chan);
104 void setinst(unsigned char chan);
105 void playnote(unsigned char chan);
106 void vibrato(unsigned char chan);
107};
108
109#endif
Definition fprovide.h:29
CPlayer(Copl *newopl)
Definition player.cpp:34
std::string getauthor()
Definition d00.h:46
unsigned short rhcnt
Definition d00.h:68
float getrefresh()
Definition d00.cpp:459
unsigned char fxdel
Definition d00.h:71
std::string gettitle()
Definition d00.h:44
unsigned char version
Definition d00.h:94
unsigned short ispfx
Definition d00.h:69
struct Cd00Player::@015324140341222355016263152056244167215172023155 channel[9]
unsigned char seqend
Definition d00.h:71
signed short vibspeed
Definition d00.h:70
unsigned char fxflag
Definition d00.h:72
signed short slideval
Definition d00.h:70
void setfreq(unsigned char chan)
Definition d00.cpp:491
char * filedata
Definition d00.h:99
bool load(const std::string &filename, const CFileProvider &fp)
Definition d00.cpp:56
unsigned short spfx
Definition d00.h:69
unsigned char note
Definition d00.h:72
unsigned short del
Definition d00.h:68
unsigned char vol
Definition d00.h:71
d00header * header
Definition d00.h:97
unsigned short ordpos
Definition d00.h:68
bool update()
Definition d00.cpp:149
void rewind(int subsong)
Definition d00.cpp:409
unsigned char cursubsong
Definition d00.h:94
char * datainfo
Definition d00.h:95
unsigned short key
Definition d00.h:68
void setinst(unsigned char chan)
Definition d00.cpp:506
void playnote(unsigned char chan)
Definition d00.cpp:526
unsigned char levpuls
Definition d00.h:71
std::string gettype()
Definition d00.cpp:451
unsigned char nextnote
Definition d00.h:72
void setvolume(unsigned char chan)
Definition d00.cpp:477
std::string getdesc()
Definition d00.h:48
unsigned char modvol
Definition d00.h:71
d00header1 * header1
Definition d00.h:98
unsigned short pattpos
Definition d00.h:68
Cd00Player(Copl *newopl)
Definition d00.h:32
signed short transpose
Definition d00.h:70
unsigned short speed
Definition d00.h:68
unsigned short irhcnt
Definition d00.h:69
void vibrato(unsigned char chan)
Definition d00.cpp:536
unsigned char vibdepth
Definition d00.h:71
unsigned char ilevpuls
Definition d00.h:72
unsigned short * seqptr
Definition d00.h:96
signed short slide
Definition d00.h:70
static CPlayer * factory(Copl *newopl)
Definition d00.cpp:51
unsigned char songend
Definition d00.h:94
~Cd00Player()
Definition d00.h:35
unsigned short * order
Definition d00.h:68
unsigned char frameskip
Definition d00.h:72
unsigned short freq
Definition d00.h:68
unsigned short inst
Definition d00.h:68
unsigned char cvol
Definition d00.h:71
unsigned int getsubsongs()
Definition d00.cpp:467
unsigned char trigger
Definition d00.h:72
Definition opl.h:26
static char filename[]
Definition features.c:5
Definition d00.h:75
unsigned char data[11]
Definition d00.h:76
unsigned char timer
Definition d00.h:76
unsigned char sr
Definition d00.h:76
unsigned char dummy[2]
Definition d00.h:76
unsigned char tunelev
Definition d00.h:76
Definition d00.h:88
unsigned char duration
Definition d00.h:91
unsigned char level
Definition d00.h:89
signed char voladd
Definition d00.h:90
unsigned char ptr
Definition d00.h:91
Definition d00.h:79
unsigned short ptr
Definition d00.h:85
signed char modlevadd
Definition d00.h:83
unsigned char modlev
Definition d00.h:82
unsigned char duration
Definition d00.h:84
unsigned short instnr
Definition d00.h:80
signed char halfnote
Definition d00.h:81
Definition d00.h:61
unsigned short tpoin
Definition d00.h:63
unsigned short lpulptr
Definition d00.h:63
unsigned short instptr
Definition d00.h:63
unsigned char version
Definition d00.h:62
unsigned short seqptr
Definition d00.h:63
unsigned char subsongs
Definition d00.h:62
unsigned short endmark
Definition d00.h:63
unsigned short infoptr
Definition d00.h:63
unsigned char speed
Definition d00.h:62
Definition d00.h:54
unsigned char speed
Definition d00.h:56
char dummy[32]
Definition d00.h:57
unsigned char type
Definition d00.h:56
unsigned short spfxptr
Definition d00.h:58
unsigned short endmark
Definition d00.h:58
unsigned char soundcard
Definition d00.h:56
unsigned short instptr
Definition d00.h:58
char songname[32]
Definition d00.h:57
char author[32]
Definition d00.h:57
unsigned char version
Definition d00.h:56
unsigned char subsongs
Definition d00.h:56
unsigned short infoptr
Definition d00.h:58
unsigned short seqptr
Definition d00.h:58
unsigned short tpoin
Definition d00.h:58