aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sfx
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r--engines/sci/sfx/adlib.h8
-rw-r--r--engines/sci/sfx/device.h8
-rw-r--r--engines/sci/sfx/mixer.h26
-rw-r--r--engines/sci/sfx/seq/instrument-map.h11
-rw-r--r--engines/sci/sfx/sequencer.h12
-rw-r--r--engines/sci/sfx/softseq.h6
6 files changed, 35 insertions, 36 deletions
diff --git a/engines/sci/sfx/adlib.h b/engines/sci/sfx/adlib.h
index 01f6624cdf..7fb34006d9 100644
--- a/engines/sci/sfx/adlib.h
+++ b/engines/sci/sfx/adlib.h
@@ -24,8 +24,8 @@
*/
-#ifndef _SFX_ADLIB_H_
-#define _SFX_ADLIB_H_
+#ifndef SCI_SFX_ADLIB_H
+#define SCI_SFX_ADLIB_H
#include "sci/tools.h"
@@ -68,9 +68,9 @@ typedef unsigned char adlib_instr[12];
extern adlib_instr adlib_sbi[96];
+/** Converts a raw SCI adlib instrument into the adlib register format. */
void make_sbi(adlib_def *one, guint8 *buffer);
-/* Converts a raw SCI adlib instrument into the adlib register format. */
} // End of namespace Sci
-#endif /* _SFX_ADLIB_H_ */
+#endif // SCI_SFX_ADLIB_H
diff --git a/engines/sci/sfx/device.h b/engines/sci/sfx/device.h
index f43e1ab5db..c7a87a2afd 100644
--- a/engines/sci/sfx/device.h
+++ b/engines/sci/sfx/device.h
@@ -25,8 +25,10 @@
/* song player structure */
-#ifndef _SFX_DEVICE_H
-#define _SFX_DEVICE_H
+#ifndef SCI_SFX_DEVICE_H
+#define SCI_SFX_DEVICE_H
+
+#include "common/scummsys.h"
namespace Sci {
@@ -119,4 +121,4 @@ void *sfx_find_device(int type, char *name);
} // End of namespace Sci
-#endif /* !_SFX_PLAYER_H */
+#endif // SCI_SFX_DEVICE_H
diff --git a/engines/sci/sfx/mixer.h b/engines/sci/sfx/mixer.h
index ab77df334d..286dbc3a89 100644
--- a/engines/sci/sfx/mixer.h
+++ b/engines/sci/sfx/mixer.h
@@ -23,8 +23,8 @@
*
*/
-#ifndef _SFX_MIXER_H_
-#define _SFX_MIXER_H_
+#ifndef SCI_SFX_MIXER_H
+#define SCI_SFX_MIXER_H
#include "sci/include/sfx_pcm.h"
@@ -45,7 +45,7 @@ struct twochannel_data {
int left, right;
};
-typedef struct {
+struct sfx_pcm_feed_state_t {
sfx_pcm_feed_t *feed;
/* The following fields are for use by the mixer only and must not be
@@ -59,10 +59,10 @@ typedef struct {
int pending_review; /* Timestamp needs to be checked for this stream */
twochannel_data ch_old, ch_new; /* Intermediate results of output computation */
-} sfx_pcm_feed_state_t;
+};
-typedef struct _sfx_pcm_mixer {
+struct sfx_pcm_mixer_t {
/* Mixers are the heart of all matters PCM. They take PCM data from subscribed feeds,
** mix it (hence the name) and ask the pcm device they are attached to to play the
** result. */
@@ -70,34 +70,34 @@ typedef struct _sfx_pcm_mixer {
const char *name;
const char *version;
- int (*init)(struct _sfx_pcm_mixer *self, sfx_pcm_device_t *device);
+ int (*init)(sfx_pcm_mixer_t *self, sfx_pcm_device_t *device);
/* Initialises the mixer
** Parameters: (sfx_pcm_mixer_t *) self: Self reference
** (sfx_pcm_device_t *) device: An _already initialised_ PCM output driver
** Returns : (int) SFX_OK on success, SFX_ERROR otherwise
*/
- void (*exit)(struct _sfx_pcm_mixer *self);
+ void (*exit)(sfx_pcm_mixer_t *self);
/* Uninitialises the mixer
** Parameters: (sfx_pcm_mixer_t *) self: Self reference
** Also uninitialises all feeds and the attached output device.
*/
- void (*subscribe)(struct _sfx_pcm_mixer *self, sfx_pcm_feed_t *feed);
+ void (*subscribe)(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed);
/* Subscribes the mixer to a new feed
** Parameters: (sfx_pcm_mixer_t *) self: Self reference
** (sfx_pcm_feed_t *) feed: The feed to subscribe to
*/
- void (*pause)(struct _sfx_pcm_mixer *self);
+ void (*pause)(sfx_pcm_mixer_t *self);
/* Pauses the processing of input and output
*/
- void (*resume)(struct _sfx_pcm_mixer *self);
+ void (*resume)(sfx_pcm_mixer_t *self);
/* Resumes the processing of input and output after a pause
*/
- int (*process)(struct _sfx_pcm_mixer *self);
+ int (*process)(sfx_pcm_mixer_t *self);
/* Processes all feeds, mixes their results, and passes everything to the output device
** Returns : (int) SFX_OK on success, SFX_ERROR otherwise (output device error or
** internal assertion failure)
@@ -112,7 +112,7 @@ typedef struct _sfx_pcm_mixer {
sfx_pcm_device_t *dev;
void *private_bits;
-} sfx_pcm_mixer_t;
+};
sfx_pcm_mixer_t *sfx_pcm_find_mixer(char *name);
/* Looks up a mixer by name, or a default mixer
@@ -126,4 +126,4 @@ sfx_pcm_mixer_t* getMixer();
} // End of namespace Sci
-#endif /* !defined(_SFX_MIXER_H_) */
+#endif // SCI_SFX_MIXER_H
diff --git a/engines/sci/sfx/seq/instrument-map.h b/engines/sci/sfx/seq/instrument-map.h
index a18bdaff79..deb54fd1f6 100644
--- a/engines/sci/sfx/seq/instrument-map.h
+++ b/engines/sci/sfx/seq/instrument-map.h
@@ -25,12 +25,11 @@
/* Implementation of SCI instrument maps for GM and MT-32. */
-#ifndef SCI_INSTRUMENT_MAP_
-#define SCI_INSTRUMENT_MAP_
+#ifndef SCI_SFX_SEQ_INSTRUMENT_MAP_H
+#define SCI_SFX_SEQ_INSTRUMENT_MAP_H
-#include <stdlib.h>
-#include "resource.h"
-#include "../device.h"
+#include "sci/tools.h"
+#include "sci/sfx/device.h"
namespace Sci {
@@ -130,4 +129,4 @@ sfx_mapped_writer(midi_writer_t *writer, sfx_instrument_map_t *map);
} // End of namespace Sci
-#endif /* !defined(SCI_INSTRUMENT_MAP_) */
+#endif // SCI_SFX_SEQ_INSTRUMENT_MAP_H
diff --git a/engines/sci/sfx/sequencer.h b/engines/sci/sfx/sequencer.h
index 072445f8ec..2b24c80334 100644
--- a/engines/sci/sfx/sequencer.h
+++ b/engines/sci/sfx/sequencer.h
@@ -24,14 +24,12 @@
*/
-#ifndef _SFX_SEQUENCER_H_
-#define _SFX_SEQUENCER_H_
+#ifndef SCI_SFX_SEQUENCER_H
+#define SCI_SFX_SEQUENCER_H
+
+#include "common/scummsys.h"
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif /* HAVE_CONFIG_H */
#include "sci/include/sfx_core.h"
-#include <stdio.h>
#include "sci/sfx/device.h"
#include "sci/include/scitypes.h"
@@ -143,4 +141,4 @@ sfx_sequencer_t *sfx_find_sequencer(char *name);
} // End of namespace Sci
-#endif /* _SFX_SEQUENCER_H_ */
+#endif // SCI_SFX_SEQUENCER_H
diff --git a/engines/sci/sfx/softseq.h b/engines/sci/sfx/softseq.h
index 71b296fda6..91c50ff3ec 100644
--- a/engines/sci/sfx/softseq.h
+++ b/engines/sci/sfx/softseq.h
@@ -23,8 +23,8 @@
*
*/
-#ifndef SFX_SOFTSEQ_H_
-#define SFX_SOFTSEQ_H_
+#ifndef SCI_SFX_SOFTSEQ_H
+#define SCI_SFX_SOFTSEQ_H
#include "sci/include/sfx_core.h"
#include "sci/include/sfx_pcm.h"
@@ -122,4 +122,4 @@ sfx_softseq_t *sfx_find_softseq(const char *name);
} // End of namespace Sci
-#endif /* !defined(SFX_SOFTSEQ_H_) */
+#endif // SCI_SFX_SOFTSEQ_H