diff options
Diffstat (limited to 'engines/sci/sfx/seq')
-rw-r--r-- | engines/sci/sfx/seq/gm.cpp | 15 | ||||
-rw-r--r-- | engines/sci/sfx/seq/instrument-map.cpp | 4 | ||||
-rw-r--r-- | engines/sci/sfx/seq/instrument-map.h | 8 |
3 files changed, 10 insertions, 17 deletions
diff --git a/engines/sci/sfx/seq/gm.cpp b/engines/sci/sfx/seq/gm.cpp index 896c521007..ebd0b47bf6 100644 --- a/engines/sci/sfx/seq/gm.cpp +++ b/engines/sci/sfx/seq/gm.cpp @@ -23,17 +23,10 @@ * */ -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <stdio.h> -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif -#include "../sequencer.h" -#include "../device.h" -#include "instrument-map.h" -#include <resource.h> +#include "sci/tools.h" +#include "sci/sfx/sequencer.h" +#include "sci/sfx/device.h" +#include "sci/sfx/seq/instrument-map.h" namespace Sci { diff --git a/engines/sci/sfx/seq/instrument-map.cpp b/engines/sci/sfx/seq/instrument-map.cpp index 8f9ee56371..40079e4d22 100644 --- a/engines/sci/sfx/seq/instrument-map.cpp +++ b/engines/sci/sfx/seq/instrument-map.cpp @@ -214,13 +214,13 @@ sfx_instrument_map_load_sci(byte *data, size_t size) { #define MIDI_CHANNELS_NR 0x10 // FIXME: Replace this ugly hack with simple subclassing once converting to C++ -typedef struct decorated_midi_writer { +struct decorated_midi_writer_t { MIDI_WRITER_BODY midi_writer_t *writer; sfx_patch_map_t patches[MIDI_CHANNELS_NR]; sfx_instrument_map_t *map; -} decorated_midi_writer_t; +}; static void diff --git a/engines/sci/sfx/seq/instrument-map.h b/engines/sci/sfx/seq/instrument-map.h index deb54fd1f6..95233f9099 100644 --- a/engines/sci/sfx/seq/instrument-map.h +++ b/engines/sci/sfx/seq/instrument-map.h @@ -51,12 +51,12 @@ namespace Sci { /* Maximum velocity (used for scaling) */ #define SFX_MAX_VELOCITY 128 -typedef struct { +struct sfx_patch_map_t { int patch; /* Native instrument, SFX_UNMAPPED or SFX_MAPPED_TO_RHYTHM */ int rhythm; /* Rhythm key when patch == SFX_MAPPED_TO_RHYTHM */ -} sfx_patch_map_t; +}; -typedef struct { +struct sfx_instrument_map_t { sfx_patch_map_t patch_map[SFX_INSTRUMENTS_NR]; /* Map patch nr to which native instrument or rhythm key */ int patch_key_shift[SFX_INSTRUMENTS_NR]; /* Shift patch key by how much? */ int patch_volume_adjust[SFX_INSTRUMENTS_NR]; /* Adjust controller 7 by how much? */ @@ -73,7 +73,7 @@ typedef struct { size_t initialisation_block_size; byte *initialisation_block; /* Initial MIDI commands to set up the device */ -} sfx_instrument_map_t; +}; sfx_instrument_map_t * sfx_instrument_map_new(int velocity_maps_nr); |