LMMS
Loading...
Searching...
No Matches
cff.h
Go to the documentation of this file.
1/*
2 AdPlug - Replayer for many OPL2/OPL3 audio file formats.
3 Copyright (C) 1999 - 2006 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 cff.h - BoomTracker loader by Riven the Mage <riven@ok.ru>
20*/
21
22#include "protrack.h"
23
25{
26 public:
27 static CPlayer *factory(Copl *newopl);
28
29 CcffLoader(Copl *newopl) : CmodPlayer(newopl) { };
30
31 bool load(const std::string &filename, const CFileProvider &fp);
32 void rewind(int subsong);
33
34 std::string gettype();
35 std::string gettitle();
36 std::string getauthor();
37 std::string getinstrument(unsigned int n);
38 unsigned int getinstruments();
39
40 private:
41
43 {
44 public:
45
46 long unpack(unsigned char *ibuf, unsigned char *obuf);
47
48 private:
49
50 unsigned long get_code();
51 void translate_code(unsigned long code, unsigned char *string);
52
53 void cleanup();
54 int startup();
55
56 void expand_dictionary(unsigned char *string);
57
58 unsigned char *input;
59 unsigned char *output;
60
62
63 unsigned char code_length;
64
65 unsigned long bits_buffer;
66 unsigned int bits_left;
67
68 unsigned char *heap;
69 unsigned char **dictionary;
70
71 unsigned int heap_length;
72 unsigned int dictionary_length;
73
74 unsigned long old_code,new_code;
75
76 unsigned char the_string[256];
77 };
78
80 {
81 char id[16];
82 unsigned char version;
83 unsigned short size;
84 unsigned char packed;
85 unsigned char reserved[12];
87
89 {
90 unsigned char data[12];
91 char name[21];
93
94 char song_title[20];
95 char song_author[20];
96
97 struct cff_event
98 {
99 unsigned char byte0;
100 unsigned char byte1;
101 unsigned char byte2;
102 };
103};
Definition fprovide.h:29
CPlayer(Copl *newopl)
Definition player.cpp:34
Definition cff.h:43
unsigned char code_length
Definition cff.h:63
unsigned char ** dictionary
Definition cff.h:69
void cleanup()
Definition cff.cpp:464
unsigned int bits_left
Definition cff.h:66
unsigned long new_code
Definition cff.h:74
unsigned char the_string[256]
Definition cff.h:76
void expand_dictionary(unsigned char *string)
Definition cff.cpp:492
void translate_code(unsigned long code, unsigned char *string)
Definition cff.cpp:447
int startup()
Definition cff.cpp:475
unsigned long get_code()
Definition cff.cpp:429
unsigned char * output
Definition cff.h:59
unsigned long old_code
Definition cff.h:74
long output_length
Definition cff.h:61
long unpack(unsigned char *ibuf, unsigned char *obuf)
Definition cff.cpp:316
unsigned long bits_buffer
Definition cff.h:65
unsigned int dictionary_length
Definition cff.h:72
unsigned char * input
Definition cff.h:58
unsigned char * heap
Definition cff.h:68
unsigned int heap_length
Definition cff.h:71
std::string getinstrument(unsigned int n)
Definition cff.cpp:296
struct CcffLoader::cff_header header
bool load(const std::string &filename, const CFileProvider &fp)
Definition cff.cpp:40
char song_author[20]
Definition cff.h:95
std::string gettitle()
Definition cff.cpp:286
struct CcffLoader::cff_instrument instruments[47]
unsigned int getinstruments()
Definition cff.cpp:301
std::string getauthor()
Definition cff.cpp:291
std::string gettype()
Definition cff.cpp:278
void rewind(int subsong)
Definition cff.cpp:264
static CPlayer * factory(Copl *newopl)
Definition cff.cpp:35
CcffLoader(Copl *newopl)
Definition cff.h:29
char song_title[20]
Definition cff.h:94
CmodPlayer(Copl *newopl)
Definition protrack.cpp:45
Definition opl.h:26
static char filename[]
Definition features.c:5
Definition cff.h:98
unsigned char byte1
Definition cff.h:100
unsigned char byte2
Definition cff.h:101
unsigned char byte0
Definition cff.h:99
Definition cff.h:80
unsigned char version
Definition cff.h:82
unsigned char packed
Definition cff.h:84
unsigned short size
Definition cff.h:83
unsigned char reserved[12]
Definition cff.h:85
Definition cff.h:89
unsigned char data[12]
Definition cff.h:90
char name[21]
Definition cff.h:91
Definition inftrees.h:27
int n
Definition crypt.c:458