libsidplayfp
1.0.3
Main Page
Classes
Files
Examples
File List
sidplayfp
sidtune
MUS.h
1
/*
2
* This file is part of libsidplayfp, a SID player engine.
3
*
4
* Copyright 2012-2013 Leandro Nini <drfiemost@users.sourceforge.net>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
*/
20
21
#ifndef MUS_H
22
#define MUS_H
23
24
#include "SidTuneBase.h"
25
26
class
MUS
:
public
SidTuneBase
27
{
28
private
:
30
uint_least16_t musDataLen;
31
32
private
:
33
bool
resolveAddrs(
const
uint_least8_t *c64data);
34
bool
checkRelocInfo();
35
36
static
bool
detect(
const
uint_least8_t* buffer, uint_least32_t bufLen,
37
uint_least32_t& voice3Index);
38
39
bool
mergeParts(
Buffer_sidtt<const uint_least8_t>
& musBuf,
40
Buffer_sidtt<const uint_least8_t>
& strBuf);
41
42
void
tryLoad(
Buffer_sidtt<const uint_least8_t>
& musBuf,
43
Buffer_sidtt<const uint_least8_t>
& strBuf,
44
SmartPtr_sidtt<const uint8_t>
&spPet,
45
uint_least32_t voice3Index,
46
bool
init);
47
48
protected
:
49
MUS
() {}
50
51
void
installPlayer(
sidmemory
*mem);
52
53
void
setPlayerAddress();
54
55
virtual
void
acceptSidTune
(
const
char
* dataFileName,
const
char
* infoFileName,
56
Buffer_sidtt<const uint_least8_t>
& buf,
bool
isSlashedFileName);
57
58
public
:
59
virtual
~
MUS
() {}
60
61
static
SidTuneBase
* load(
Buffer_sidtt<const uint_least8_t>
& dataBuf,
bool
init =
false
);
62
static
SidTuneBase
* load(
Buffer_sidtt<const uint_least8_t>
& musBuf,
63
Buffer_sidtt<const uint_least8_t>
& strBuf,
64
uint_least32_t
fileOffset
,
65
bool
init =
false
);
66
67
virtual
bool
placeSidTuneInC64mem
(
sidmemory
* mem);
68
69
private
:
// prevent copying
70
MUS
(
const
MUS
&);
71
MUS
& operator=(
MUS
&);
72
};
73
74
#endif // MUS_H
Generated on Mon Jul 8 2013 20:16:12 for libsidplayfp by
1.8.4