aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sfx
diff options
context:
space:
mode:
authorMax Horn2009-05-12 23:30:10 +0000
committerMax Horn2009-05-12 23:30:10 +0000
commit0255cd0213a219fba69860200a987a0d837493a0 (patch)
tree1dd1ce850fc46e468e1d00a0ed86f5686630b7be /engines/sci/sfx
parent8d8e9d3aaa717616c001083913d0c1e6fff2c580 (diff)
downloadscummvm-rg350-0255cd0213a219fba69860200a987a0d837493a0.tar.gz
scummvm-rg350-0255cd0213a219fba69860200a987a0d837493a0.tar.bz2
scummvm-rg350-0255cd0213a219fba69860200a987a0d837493a0.zip
SCI: Removed sci_memory.h/.cpp
svn-id: r40514
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r--engines/sci/sfx/iterator.cpp1
-rw-r--r--engines/sci/sfx/seq/instrument-map.cpp13
-rw-r--r--engines/sci/sfx/softseq/amiga.cpp7
-rw-r--r--engines/sci/sfx/songlib.cpp3
4 files changed, 10 insertions, 14 deletions
diff --git a/engines/sci/sfx/iterator.cpp b/engines/sci/sfx/iterator.cpp
index 3df36258ff..bb1bfad15a 100644
--- a/engines/sci/sfx/iterator.cpp
+++ b/engines/sci/sfx/iterator.cpp
@@ -30,7 +30,6 @@
#include "sci/sfx/iterator_internal.h"
#include "sci/sfx/player.h"
#include "sci/tools.h"
-#include "sci/sci_memory.h"
#include "sound/audiostream.h"
#include "sound/mixer.h"
diff --git a/engines/sci/sfx/seq/instrument-map.cpp b/engines/sci/sfx/seq/instrument-map.cpp
index f643a5b7be..14ce623f3e 100644
--- a/engines/sci/sfx/seq/instrument-map.cpp
+++ b/engines/sci/sfx/seq/instrument-map.cpp
@@ -25,14 +25,13 @@
#include "common/scummsys.h"
#include "sci/sfx/sci_midi.h"
-#include "sci/sci_memory.h"
#include "sci/sfx/seq/instrument-map.h"
#include "sci/sfx/core.h"
namespace Sci {
sfx_instrument_map_t *sfx_instrument_map_new(int velocity_maps_nr) {
- sfx_instrument_map_t *map = (sfx_instrument_map_t *)sci_malloc(sizeof(sfx_instrument_map_t));
+ sfx_instrument_map_t *map = (sfx_instrument_map_t *)malloc(sizeof(sfx_instrument_map_t));
int i;
map->initialisation_block_size = 0;
@@ -45,9 +44,9 @@ sfx_instrument_map_t *sfx_instrument_map_new(int velocity_maps_nr) {
map->velocity_map = NULL; /* Yes, this complicates control flow needlessly, but it avoids some of the pointless
** warnings that certain memory tools seem to find appropriate. */
else {
- map->velocity_map = (byte **)sci_malloc(sizeof(byte *) * velocity_maps_nr);
+ map->velocity_map = (byte **)malloc(sizeof(byte *) * velocity_maps_nr);
for (i = 0; i < velocity_maps_nr; ++i)
- map->velocity_map[i] = (byte *)sci_malloc(SFX_VELOCITIES_NR);
+ map->velocity_map[i] = (byte *)malloc(SFX_VELOCITIES_NR);
}
for (i = 0; i < SFX_INSTRUMENTS_NR; ++i)
map->velocity_map_index[i] = SFX_NO_VELOCITY_MAP;
@@ -170,7 +169,7 @@ sfx_instrument_map_t *sfx_instrument_map_load_sci(byte *data, size_t size) {
fprintf(stderr, "[instrument-map] Instrument larger than required by initialisation block: %d of %d\n", (int) size, PATCH_MIN_SIZE);
if (map->initialisation_block_size != 0) {
- map->initialisation_block = (byte *)sci_malloc(map->initialisation_block_size);
+ map->initialisation_block = (byte *)malloc(map->initialisation_block_size);
memcpy(map->initialisation_block, data + PATCH_INIT_DATA, map->initialisation_block_size);
}
}
@@ -480,9 +479,9 @@ midi_writer_t *sfx_mapped_writer(midi_writer_t *writer, sfx_instrument_map_t *ma
if (map == NULL)
return writer;
- retval = (decorated_midi_writer_t *)sci_malloc(sizeof(decorated_midi_writer_t));
+ retval = (decorated_midi_writer_t *)malloc(sizeof(decorated_midi_writer_t));
retval->writer = writer;
- retval->name = (char *)sci_malloc(strlen(writer->name) + strlen(NAME_SUFFIX) + 1);
+ retval->name = (char *)malloc(strlen(writer->name) + strlen(NAME_SUFFIX) + 1);
strcpy(retval->name, writer->name);
strcat(retval->name, NAME_SUFFIX);
diff --git a/engines/sci/sfx/softseq/amiga.cpp b/engines/sci/sfx/softseq/amiga.cpp
index acd9fc444f..11feaebd96 100644
--- a/engines/sci/sfx/softseq/amiga.cpp
+++ b/engines/sci/sfx/softseq/amiga.cpp
@@ -24,7 +24,6 @@
*/
#include "sci/tools.h"
-#include "sci/sci_memory.h"
#include "sci/sfx/softseq.h"
#include "common/file.h"
@@ -374,7 +373,7 @@ static instrument_t *read_instrument(Common::File &file, int *id) {
return NULL;
}
- instrument = (instrument_t *) sci_malloc(sizeof(instrument_t));
+ instrument = (instrument_t *) malloc(sizeof(instrument_t));
seg_size[0] = read_int16(header + 35) * 2;
seg_size[1] = read_int16(header + 41) * 2;
@@ -411,7 +410,7 @@ static instrument_t *read_instrument(Common::File &file, int *id) {
sciprintf(" Segment sizes: %i %i %i\n", seg_size[0], seg_size[1], seg_size[2]);
sciprintf(" Segment offsets: 0 %i %i\n", loop_offset, read_int32(header + 43));
#endif
- instrument->samples = (int8 *) sci_malloc(size + 1);
+ instrument->samples = (int8 *) malloc(size + 1);
if (file.read(instrument->samples, size) < (unsigned int)size) {
sciprintf("[sfx:seq:amiga] Error: failed to read instrument samples\n");
return NULL;
@@ -434,7 +433,7 @@ static instrument_t *read_instrument(Common::File &file, int *id) {
instrument->size = seg_size[0];
instrument->loop_size = seg_size[1];
- instrument->loop = (int8*)sci_malloc(instrument->loop_size + 1);
+ instrument->loop = (int8*)malloc(instrument->loop_size + 1);
memcpy(instrument->loop, instrument->samples + loop_offset, instrument->loop_size);
instrument->samples[instrument->size] = instrument->loop[0];
diff --git a/engines/sci/sfx/songlib.cpp b/engines/sci/sfx/songlib.cpp
index 5831457acb..9a11a60818 100644
--- a/engines/sci/sfx/songlib.cpp
+++ b/engines/sci/sfx/songlib.cpp
@@ -26,7 +26,6 @@
#include "sci/tools.h"
#include "sci/sfx/core.h"
#include "sci/sfx/iterator.h"
-#include "sci/sci_memory.h"
namespace Sci {
@@ -34,7 +33,7 @@ namespace Sci {
song_t *song_new(song_handle_t handle, SongIterator *it, int priority) {
song_t *retval;
- retval = (song_t*) sci_malloc(sizeof(song_t));
+ retval = (song_t*) malloc(sizeof(song_t));
#ifdef SATISFY_PURIFY
memset(retval, 0, sizeof(song_t));