ScummVM API documentation
c64.sfx.h
1
/* ScummVM - Graphic Adventure Engine
2
*
3
* ScummVM is the legal property of its developers, whose names
4
* are too numerous to list here. Please refer to the COPYRIGHT
5
* file distributed with this source distribution.
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*
20
*/
21
22
#ifndef FREESCAPE_ECLIPSE_C64_SFX_H
23
#define FREESCAPE_ECLIPSE_C64_SFX_H
24
25
#include "audio/sid.h"
26
#include "freescape/sid.h"
27
#include "freescape/sound.h"
28
29
namespace
Freescape
{
30
31
class
EclipseC64SFXPlayer
:
public
Sound
{
32
public
:
33
EclipseC64SFXPlayer
();
34
~
EclipseC64SFXPlayer
();
35
36
void
playSound(
int
sfxIndex, Type type)
override
;
37
void
stopSound(Type type)
override
;
38
bool
isPlayingSound(Type type)
const override
;
39
40
void
sfxTick();
41
42
void
initSID();
43
void
destroySID();
44
45
private
:
46
SID::SID
*_sid;
47
48
void
sidWrite(
int
reg, uint8 data);
49
void
onTimer();
50
51
uint8 _state;
52
53
uint8 _numNotes;
54
uint8 _repeatCount;
55
uint8 _waveform;
56
uint8 _speed;
57
58
uint8 _repeatLeft;
59
uint8 _notesLeft;
60
uint8 _freqIndex;
61
uint8 _durIndex;
62
uint8 _durCounter;
63
uint8 _speedCounter;
64
65
uint8 _curFreqLo;
66
uint8 _curFreqHi;
67
68
int16 _startFreqs[16];
69
int16 _deltas[16];
70
uint8 _durCopies[9];
71
72
void
silenceV1();
73
void
silenceAll();
74
void
setupSfx(
int
index);
75
void
tickStart();
76
void
tickSlide();
77
};
78
79
}
// namespace Freescape
80
81
#endif // FREESCAPE_ECLIPSE_C64_SFX_H
Freescape
Definition:
area.h:36
Freescape::EclipseC64SFXPlayer
Definition:
c64.sfx.h:31
SID::SID
Definition:
sid.h:44
Freescape::Sound
Definition:
sound.h:35
engines
freescape
games
eclipse
c64.sfx.h
Generated on Sat Jul 25 2026 09:11:15 for ScummVM API documentation by
1.8.13