aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/game.cpp6
-rw-r--r--engines/sci/engine/grammar.cpp71
-rw-r--r--engines/sci/engine/kernel_compat.h2
-rw-r--r--engines/sci/engine/kfile.cpp5
-rw-r--r--engines/sci/engine/kmovement.cpp2
-rw-r--r--engines/sci/engine/scriptconsole.cpp23
-rw-r--r--engines/sci/gfx/resource/sci_view_1.cpp1
-rw-r--r--engines/sci/include/gfx_resource.h4
-rw-r--r--engines/sci/include/kdebug.h4
-rw-r--r--engines/sci/include/kernel.h1
-rw-r--r--engines/sci/include/sci_memory.h10
-rw-r--r--engines/sci/scicore/resource.cpp2
-rw-r--r--engines/sci/scicore/tools.cpp8
-rw-r--r--engines/sci/sfx/core.cpp4
-rw-r--r--engines/sci/sfx/device.h3
-rw-r--r--engines/sci/sfx/mixer/soft.cpp11
-rw-r--r--engines/sci/sfx/player/realtime.cpp4
-rw-r--r--engines/sci/sfx/seq/instrument-map.cpp7
-rw-r--r--engines/sci/sfx/seq/map-mt32-to-gm.cpp16
-rw-r--r--engines/sci/sfx/softseq.h10
-rw-r--r--engines/sci/sfx/softseq/SN76496.cpp2
-rw-r--r--engines/sci/sfx/softseq/amiga.cpp2
-rw-r--r--engines/sci/sfx/softseq/fluidsynth.cpp2
-rw-r--r--engines/sci/sfx/softseq/mt32.cpp2
-rw-r--r--engines/sci/sfx/softseq/opl2.cpp2
-rw-r--r--engines/sci/sfx/softseq/pcspeaker.cpp2
-rw-r--r--engines/sci/sfx/softseq/softsequencers.cpp2
27 files changed, 59 insertions, 149 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 63d3fb9e94..553298e406 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -647,7 +647,7 @@ script_free_breakpoints(state_t *s)
int
game_init(state_t *s)
{
-#ifdef __GNUC__
+#ifdef __GNUC__XX
# warning "Fixme: Use new VM instantiation code all over the place"
#endif
reg_t game_obj; /* Address of the game object */
@@ -750,7 +750,7 @@ game_exit(state_t *s)
sciprintf("Freeing miscellaneous data...\n");
-#ifdef __GNUC__
+#ifdef __GNUC__XX
#warning "Free parser segment here"
#endif
if (send_calls_allocated) {
@@ -758,7 +758,7 @@ game_exit(state_t *s)
send_calls_allocated = 0;
}
-#ifdef __GNUC__
+#ifdef __GNUC__XX
#warning "Free scripts here"
#endif
diff --git a/engines/sci/engine/grammar.cpp b/engines/sci/engine/grammar.cpp
index 265286b72d..ae96990b10 100644
--- a/engines/sci/engine/grammar.cpp
+++ b/engines/sci/engine/grammar.cpp
@@ -104,59 +104,6 @@ _vfree(parse_rule_t *rule)
rule = NULL;
}
-#if 0
-// Unreferenced - removed
-
-static parse_rule_t *
-_vbuild(int id, int argc, ...)
-{
- va_list args;
- int i;
- parse_rule_t *rule = (parse_rule_t*)sci_malloc(sizeof(int) * (argc + 4));
-
- ++_allocd_rules;
- rule->id = id;
- rule->first_special = 0;
- rule->specials_nr = 0;
- rule->length = argc;
- va_start(args, argc);
- for (i = 0; i < argc; i++) {
- int v;
- rule->data[i] = v = va_arg(args, int);
- if ((v & TOKEN_TERMINAL)
- || !(v & TOKEN_NON_NT)) {
-
- ++rule->specials_nr;
-
- if (!rule->first_special)
- rule->first_special = i;
- }
- }
- va_end(args);
- return rule;
-}
-#endif
-
-#if 0
-// Unreferenced - removed
-static parse_rule_t *
-_vcat(int id, parse_rule_t *a, parse_rule_t *b)
-{
- parse_rule_t *rule = (parse_rule_t*)sci_malloc(sizeof(int) * (a->length + b->length + 4));
-
- rule->id = id;
- rule->length = a->length + b->length;
- rule->specials_nr = a->specials_nr + b->specials_nr;
- rule->first_special = a->first_special;
- ++_allocd_rules;
-
- memcpy(rule->data, a->data, sizeof(int) * a->length);
- memcpy(&(rule->data[a->length]), b->data, sizeof(int) * b->length);
-
- return rule;
-}
-#endif
-
static parse_rule_t *
_vdup(parse_rule_t *a)
{
@@ -204,24 +151,6 @@ _vinsert(parse_rule_t *turkey, parse_rule_t *stuffing)
return rule;
}
-#if 0
-// Unreferenced - removed
-static int
-_greibach_rule_p(parse_rule_t *rule)
-{
- int pos = rule->first_special;
- while (pos < rule->length
- && (rule->data[pos] & TOKEN_NON_NT)
- && !(rule->data[pos] & TOKEN_TERMINAL))
- ++pos;
-
- if (pos == rule->length)
- return 0;
-
- return (rule->data[pos] & TOKEN_TERMINAL);
-}
-#endif
-
static parse_rule_t *
_vbuild_rule(parse_tree_branch_t *branch)
{
diff --git a/engines/sci/engine/kernel_compat.h b/engines/sci/engine/kernel_compat.h
index 0a3468282a..a021064223 100644
--- a/engines/sci/engine/kernel_compat.h
+++ b/engines/sci/engine/kernel_compat.h
@@ -29,7 +29,7 @@
#ifndef _SCI_KERNEL_COMPAT_
#define _SCI_KERNEL_COMPAT_
-#ifdef __GNUC__
+#ifdef __GNUC__XX
#warning "Old kernel compatibility crap"
#endif
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 629a1a6f00..6af5cb7b86 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -577,7 +577,6 @@ kCheckFreeSpace(state_t *s, int funct_nr, int argc, reg_t *argv)
char *path = kernel_dereference_char_pointer(s, argv[0], 0);
char *testpath = (char*)sci_malloc(strlen(path) + 15);
char buf[1024];
- int i;
int fd;
int failed = 0;
int pathlen;
@@ -616,7 +615,7 @@ kCheckFreeSpace(state_t *s, int funct_nr, int argc, reg_t *argv)
}
memset(buf, 0, sizeof(buf));
- for (i = 0; i < 1024; i++) /* Check for 1 MB */
+ for (int i = 0; i < 1024; i++) /* Check for 1 MB */
if (write(fd, buf, 1024) < 1024)
failed = 1;
@@ -711,7 +710,7 @@ _savegame_index_struct_compare(const void *a, const void *b)
}
static void
-update_savegame_indices(char *gfname)
+update_savegame_indices(const char *gfname)
{
int i;
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 1d4ec81bfa..37ff5fb1f9 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -251,7 +251,7 @@ static enum {
UNINITIALIZED
} handle_movecnt = UNINITIALIZED;
-int parse_reg_t(state_t *s, char *str, reg_t *dest); /* In scriptconsole.c */
+int parse_reg_t(state_t *s, const char *str, reg_t *dest); /* In scriptconsole.c */
static int
checksum_bytes(byte *data, int size)
diff --git a/engines/sci/engine/scriptconsole.cpp b/engines/sci/engine/scriptconsole.cpp
index 04aaa47b87..4d3f431a34 100644
--- a/engines/sci/engine/scriptconsole.cpp
+++ b/engines/sci/engine/scriptconsole.cpp
@@ -350,10 +350,10 @@ clone_is_used(clone_table_t *t, int idx)
}
int
-parse_reg_t(state_t *s, char *str, reg_t *dest)
+parse_reg_t(state_t *s, const char *str, reg_t *dest)
{ /* Returns 0 on success */
int rel_offsetting = 0;
- char *offsetting = NULL;
+ const char *offsetting = NULL;
/* Non-NULL: Parse end of string for relative offsets */
char *endptr;
@@ -415,26 +415,27 @@ parse_reg_t(state_t *s, char *str, reg_t *dest)
} else if (*str == '?') {
int index = -1;
int times_found = 0;
- char *str_objname;
+ char *tmp;
+ const char *str_objname;
char *str_suffix;
char suffchar = 0; /* Supress spurious -Wall warning */
int i;
/* Parse obj by name */
- str_objname = strchr(str, '+');
+ tmp = strchr(str, '+');
str_suffix = strchr(str, '-');
- if (str_objname < str_suffix)
- str_suffix = str_objname;
+ if (tmp < str_suffix)
+ str_suffix = tmp;
if (str_suffix) {
suffchar = (*str_suffix);
*str_suffix = 0;
}
- str_objname = strchr(str, '.');
+ tmp = strchr(str, '.');
- if (str_objname) {
- *str_objname = 0;
- index = strtol(str_objname+1, &endptr, 16);
+ if (tmp) {
+ *tmp = 0;
+ index = strtol(tmp+1, &endptr, 16);
if (*endptr)
return -1;
}
@@ -1053,7 +1054,6 @@ c_list (state_t * s)
else if (!strcmp("words", cmd_params[0].str))
return c_list_words(s);
else if (strcmp ("restypes", cmd_params[0].str) == 0) {
- int i;
for (i = 0; i < sci_invalid_resource; i++)
sciprintf ("%s\n", sci_resource_types[i]);
}
@@ -1062,7 +1062,6 @@ c_list (state_t * s)
if (res == -1)
sciprintf ("Unknown resource type: '%s'\n", cmd_params[0].str);
else {
- int i;
for (i = 0; i < sci_max_resource_nr[s->resmgr->sci_version]; i++)
if (scir_test_resource (s->resmgr, res, i))
sciprintf ("%s.%03d\n", sci_resource_types[res], i);
diff --git a/engines/sci/gfx/resource/sci_view_1.cpp b/engines/sci/gfx/resource/sci_view_1.cpp
index 8302b4a0fa..d0dd660f2f 100644
--- a/engines/sci/gfx/resource/sci_view_1.cpp
+++ b/engines/sci/gfx/resource/sci_view_1.cpp
@@ -529,7 +529,6 @@ gfxr_draw_view11(int id, byte *resource, int size)
seeker = resource + header_size;
for (i = 0; i < view->loops_nr; i++)
{
- static char *truth[2] = {"not ",""};
int loop_offset = get_uint_16(seeker + V2_LOOP_OFFSET);
int cels = seeker[V2_CELS_NUM];
int mirrored = seeker[V2_IS_MIRROR];
diff --git a/engines/sci/include/gfx_resource.h b/engines/sci/include/gfx_resource.h
index 8632710556..b6c9385035 100644
--- a/engines/sci/include/gfx_resource.h
+++ b/engines/sci/include/gfx_resource.h
@@ -424,13 +424,13 @@ gfxr_endianness_adjust(gfx_pixmap_t *pixmap, gfx_mode_t *mode);
static inline int
-get_uint_16(byte *offset)
+get_uint_16(const byte *offset)
{
return ((unsigned int) offset[0] | (((unsigned int) offset[1]) << 8));
}
static inline int
-get_int_16(byte *offset)
+get_int_16(const byte *offset)
{
return ((int) offset[0] | (((int) offset[1]) << 8));
}
diff --git a/engines/sci/include/kdebug.h b/engines/sci/include/kdebug.h
index 9c69126e41..74db2365eb 100644
--- a/engines/sci/include/kdebug.h
+++ b/engines/sci/include/kdebug.h
@@ -67,7 +67,7 @@ struct _state;
#ifdef SCI_KERNEL_DEBUG
-#ifdef __GNUC__
+#ifdef __GNUC__XXX
#define SCIkdebug(arguments...) _SCIGNUkdebug(__PRETTY_FUNCTION__, ## arguments)
@@ -85,7 +85,7 @@ struct _state;
-#ifdef __GNUC__
+#ifdef __GNUC__XXX
#define SCIkwarn(arguments...) _SCIGNUkdebug(__PRETTY_FUNCTION__, ## arguments)
diff --git a/engines/sci/include/kernel.h b/engines/sci/include/kernel.h
index d34a884cd5..a58f0bfc9d 100644
--- a/engines/sci/include/kernel.h
+++ b/engines/sci/include/kernel.h
@@ -32,6 +32,7 @@
#include "sci/include/kdebug.h"
#include "sci/include/uinput.h"
#include "sci/include/event.h"
+#include "sci/include/vm.h"
#include "sci/include/console.h" /* sciprintf() */
#ifdef HAVE_FNMATCH_H
diff --git a/engines/sci/include/sci_memory.h b/engines/sci/include/sci_memory.h
index 4b02454e1d..ce66a75aa1 100644
--- a/engines/sci/include/sci_memory.h
+++ b/engines/sci/include/sci_memory.h
@@ -134,14 +134,14 @@ do {\
#define ALLOC_MEM(alloc_statement, size, filename, linenum, funcname)\
do {\
- if (size < 0)\
+ if (size == 0)\
{\
- PANIC_MEMORY(size, filename, linenum, funcname, "Cannot allocate negative bytes of memory!")\
- BREAKPOINT()\
+ PANIC_MEMORY(size, filename, linenum, funcname, "WARNING: allocating zero bytes of memory.")\
}\
- else if (size == 0)\
+ else if (!(size > 0))\
{\
- PANIC_MEMORY(size, filename, linenum, funcname, "WARNING: allocating zero bytes of memory.")\
+ PANIC_MEMORY(size, filename, linenum, funcname, "Cannot allocate negative bytes of memory!")\
+ BREAKPOINT()\
}\
\
alloc_statement; /* attempt to allocate the memory */\
diff --git a/engines/sci/scicore/resource.cpp b/engines/sci/scicore/resource.cpp
index 74cb850beb..cd4faf3518 100644
--- a/engines/sci/scicore/resource.cpp
+++ b/engines/sci/scicore/resource.cpp
@@ -441,7 +441,7 @@ scir_add_appropriate_sources(resource_mgr_t *mgr,
int allow_patches,
char *dir)
{
- char *trailing_slash = "";
+ const char *trailing_slash = "";
//char path_separator;
sci_dir_t dirent;
char *name;
diff --git a/engines/sci/scicore/tools.cpp b/engines/sci/scicore/tools.cpp
index bd2ec547d6..be2ddce3f4 100644
--- a/engines/sci/scicore/tools.cpp
+++ b/engines/sci/scicore/tools.cpp
@@ -63,18 +63,10 @@ void usleep (long usec);
} while (0);
#endif
-#if !defined(HAVE_FNMATCH) && !defined(_WIN32)
-# include <beos/fnmatch.h>
-#endif
-
#ifdef _DREAMCAST
# include <kos/thread.h>
#endif
-#ifdef __BEOS__
-# include <be/kernel/OS.h>
-#endif
-
#ifdef HAVE_MEMFROB
void *memfrob(void *s, size_t n);
#endif
diff --git a/engines/sci/sfx/core.cpp b/engines/sci/sfx/core.cpp
index 5555af4dfe..1516af3b21 100644
--- a/engines/sci/sfx/core.cpp
+++ b/engines/sci/sfx/core.cpp
@@ -863,8 +863,6 @@ static const int MIDI_cmdlen[16] = {0, 0, 0, 0, 0, 0, 0, 0,
static const song_handle_t midi_send_base = 0xffff0000;
-static song_handle_t midi_send_handle = 0xffff0000;
-
int
sfx_send_midi(sfx_state_t *self, song_handle_t handle, int channel,
int command, int arg1, int arg2)
@@ -875,7 +873,7 @@ sfx_send_midi(sfx_state_t *self, song_handle_t handle, int channel,
/* Yes, in that order. SCI channel mutes are actually done via
a counting semaphore. 0 means to decrement the counter, 1
to increment it. */
- static char *channel_state[] = {"ON","OFF"};
+ static const char *channel_state[] = {"ON","OFF"};
if (command == 0xb0 &&
arg1 == SCI_MIDI_CHANNEL_MUTE)
diff --git a/engines/sci/sfx/device.h b/engines/sci/sfx/device.h
index 49bc017c7b..19a17726a2 100644
--- a/engines/sci/sfx/device.h
+++ b/engines/sci/sfx/device.h
@@ -52,6 +52,9 @@ struct _midi_device {
*/
};
+// FIXME: This evil hack below is needed to create the
+// decorated_midi_writer struct in instrumen-map.c -- in C++, this can
+// be replaced by simple subclassing.
#define MIDI_WRITER_BODY \
char *name; /* Name description of the device */ \
\
diff --git a/engines/sci/sfx/mixer/soft.cpp b/engines/sci/sfx/mixer/soft.cpp
index d4ab7232bc..4d2d86947c 100644
--- a/engines/sci/sfx/mixer/soft.cpp
+++ b/engines/sci/sfx/mixer/soft.cpp
@@ -250,17 +250,6 @@ _mix_unsubscribe(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed)
BREAKPOINT();
}
-#if 0
-// Unreferenced - removed
-static void
-mix_unsubscribe(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed)
-{
- ACQUIRE_LOCK();
- _mix_unsubscribe(self, feed);
- RELEASE_LOCK();
-}
-#endif
-
static void
mix_exit(sfx_pcm_mixer_t *self)
{
diff --git a/engines/sci/sfx/player/realtime.cpp b/engines/sci/sfx/player/realtime.cpp
index d3fbae5800..a88056162c 100644
--- a/engines/sci/sfx/player/realtime.cpp
+++ b/engines/sci/sfx/player/realtime.cpp
@@ -159,7 +159,7 @@ rt_timer_callback(void)
}
static resource_t *
-find_patch(resource_mgr_t *resmgr, const char *seq, int patchfile)
+find_patch(resource_mgr_t *resmgr, const char *seq_name, int patchfile)
{
resource_t *res = NULL;
@@ -167,7 +167,7 @@ find_patch(resource_mgr_t *resmgr, const char *seq, int patchfile)
res = scir_find_resource(resmgr, sci_patch, patchfile, 0);
if (!res) {
fprintf(stderr, "[SFX] " __FILE__": patch.%03d requested by sequencer (%s), but not found\n",
- patchfile, seq);
+ patchfile, seq_name);
}
}
diff --git a/engines/sci/sfx/seq/instrument-map.cpp b/engines/sci/sfx/seq/instrument-map.cpp
index 0d829a0582..204ecfdc34 100644
--- a/engines/sci/sfx/seq/instrument-map.cpp
+++ b/engines/sci/sfx/seq/instrument-map.cpp
@@ -219,6 +219,7 @@ sfx_instrument_map_load_sci(byte *data, size_t size)
/* Output with the instrument map */
#define MIDI_CHANNELS_NR 0x10
+// FIXME: Replace this ugly hack with simple subclassing once converting to C++
typedef struct decorated_midi_writer {
MIDI_WRITER_BODY
@@ -271,7 +272,7 @@ close_decorated(decorated_midi_writer_t *self)
sfx_instrument_map_free(self->map);
self->map = NULL;
self->writer->close(self->writer);
- sci_free(self->name);
+ sci_free((void *)self->name);
self->name = NULL;
sci_free(self);
}
@@ -279,7 +280,7 @@ close_decorated(decorated_midi_writer_t *self)
#define BOUND_127(x) (((x) < 0)? 0 : (((x) > 0x7f)? 0x7f : (x)))
static int
-bound_hard_127(int i, char *descr)
+bound_hard_127(int i, const char *descr)
{
int r = BOUND_127(i);
if (r != i)
@@ -325,7 +326,7 @@ write_decorated(decorated_midi_writer_t *self, byte *buf, int len)
assert (len >= 1);
if (op == 0xC0 && chan != MIDI_RHYTHM_CHANNEL) { /* Program change */
- int patch = bound_hard_127(buf[1], "program change");
+ /*int*/ patch = bound_hard_127(buf[1], "program change");
int instrument = map->patch_map[patch].patch;
int bend_range = map->patch_bend_range[patch];
diff --git a/engines/sci/sfx/seq/map-mt32-to-gm.cpp b/engines/sci/sfx/seq/map-mt32-to-gm.cpp
index bcaf3556f1..b4c56f2602 100644
--- a/engines/sci/sfx/seq/map-mt32-to-gm.cpp
+++ b/engines/sci/sfx/seq/map-mt32-to-gm.cpp
@@ -37,7 +37,7 @@
#define DEBUG_MT32_TO_GM
-static char
+static const char
*GM_Instrument_Names[] = {
/*000*/ "Acoustic Grand Piano",
/*001*/ "Bright Acoustic Piano",
@@ -170,7 +170,7 @@ static char
};
/* The GM Percussion map is downwards compatible to the MT32 map, which is used in SCI */
-static char
+static const char
*GM_Percussion_Names[] = {
/*00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -232,7 +232,7 @@ static char
static struct {
- char *name;
+ const char *name;
gint8 gm_instr;
gint8 gm_rhythm_key;
} MT32_PresetTimbreMaps[] = {
@@ -367,7 +367,7 @@ static struct {
};
static struct {
- char *name;
+ const char *name;
gint8 gm_instr;
gint8 gm_rhythmkey;
} MT32_RhythmTimbreMaps[] = {
@@ -428,7 +428,7 @@ MT32_PresetRhythmKeymap[] = {
??? - I'm clueless?
R - Rhythm... */
static struct {
- char *name;
+ const char *name;
gint8 gm_instr;
gint8 gm_rhythm_key;
} MT32_MemoryTimbreMaps[] = {
@@ -562,11 +562,11 @@ static struct {
{"Wind2 MS", SFX_UNMAPPED, SFX_UNMAPPED}, /* ? (CoC) */
{"Woodpecker", 115, SFX_UNMAPPED}, /* ? (CB) */
{"WtrFall MS", SFX_UNMAPPED, SFX_UNMAPPED}, /* ? (CoC, HQ, iceMan) */
- {0, 0}
+ {0, 0, 0}
};
static gint8
-lookup_instrument(char *iname)
+lookup_instrument(const char *iname)
{
int i = 0;
@@ -579,7 +579,7 @@ lookup_instrument(char *iname)
}
static gint8
-lookup_rhythm_key(char *iname)
+lookup_rhythm_key(const char *iname)
{
int i = 0;
diff --git a/engines/sci/sfx/softseq.h b/engines/sci/sfx/softseq.h
index 6284aef8ec..d790f87229 100644
--- a/engines/sci/sfx/softseq.h
+++ b/engines/sci/sfx/softseq.h
@@ -42,11 +42,11 @@ typedef struct sfx_softseq {
const char *version;
int
- (*set_option)(struct sfx_softseq *self, char *name, char *value);
+ (*set_option)(struct sfx_softseq *self, const char *name, const char *value);
/* Sets an option for the sequencer
** Parameters: (sfx_softseq_t *) self: Self reference
- ** (char *) name: Name of the option to set
- ** (char *0 value: Value to set the option to
+ ** (const char *) name: Name of the option to set
+ ** (const char *) value: Value to set the option to
** Returns : (int) GFX_OK on success, or GFX_ERROR if not supported
*/
@@ -125,9 +125,9 @@ typedef struct sfx_softseq {
sfx_softseq_t *
-sfx_find_softseq(char *name);
+sfx_find_softseq(const char *name);
/* Finds a given or default software sequencer
-** Parameters: (char *) name: Name of the sequencer to look up, or NULL for default
+** Parameters: (const char *) name: Name of the sequencer to look up, or NULL for default
** Returns : (sfx_softseq_t *) The requested sequencer, or NULL if not found
*/
diff --git a/engines/sci/sfx/softseq/SN76496.cpp b/engines/sci/sfx/softseq/SN76496.cpp
index 6ecd72bf9e..0bacc295ea 100644
--- a/engines/sci/sfx/softseq/SN76496.cpp
+++ b/engines/sci/sfx/softseq/SN76496.cpp
@@ -48,7 +48,7 @@ extern sfx_softseq_t sfx_softseq_pcspeaker;
static int
-SN76496_set_option(sfx_softseq_t *self, char *name, char *value)
+SN76496_set_option(sfx_softseq_t *self, const char *name, const char *value)
{
return SFX_ERROR;
}
diff --git a/engines/sci/sfx/softseq/amiga.cpp b/engines/sci/sfx/softseq/amiga.cpp
index 8595899718..ca0d40b689 100644
--- a/engines/sci/sfx/softseq/amiga.cpp
+++ b/engines/sci/sfx/softseq/amiga.cpp
@@ -466,7 +466,7 @@ static instrument_t *read_instrument(FILE *file, int *id)
}
static int
-ami_set_option(sfx_softseq_t *self, char *name, char *value)
+ami_set_option(sfx_softseq_t *self, const char *name, const char *value)
{
return SFX_ERROR;
}
diff --git a/engines/sci/sfx/softseq/fluidsynth.cpp b/engines/sci/sfx/softseq/fluidsynth.cpp
index a44d75e5bd..750891d60c 100644
--- a/engines/sci/sfx/softseq/fluidsynth.cpp
+++ b/engines/sci/sfx/softseq/fluidsynth.cpp
@@ -229,7 +229,7 @@ fluidsynth_volume(sfx_softseq_t *self, int volume)
}
static int
-fluidsynth_set_option(sfx_softseq_t *self, char *name, char *value)
+fluidsynth_set_option(sfx_softseq_t *self, const char *name, const char *value)
{
return SFX_ERROR;
}
diff --git a/engines/sci/sfx/softseq/mt32.cpp b/engines/sci/sfx/softseq/mt32.cpp
index 6b37673c9e..3389a286e5 100644
--- a/engines/sci/sfx/softseq/mt32.cpp
+++ b/engines/sci/sfx/softseq/mt32.cpp
@@ -197,7 +197,7 @@ mt32_volume(sfx_softseq_t *self, int volume)
}
static int
-mt32_set_option(sfx_softseq_t *self, char *name, char *value)
+mt32_set_option(sfx_softseq_t *self, const char *name, const char *value)
{
return SFX_ERROR;
}
diff --git a/engines/sci/sfx/softseq/opl2.cpp b/engines/sci/sfx/softseq/opl2.cpp
index c19de1388a..dc1237ae66 100644
--- a/engines/sci/sfx/softseq/opl2.cpp
+++ b/engines/sci/sfx/softseq/opl2.cpp
@@ -682,7 +682,7 @@ opl2_volume(sfx_softseq_t *self, int volume)
}
int
-opl2_set_option(sfx_softseq_t *self, char *name, char *value)
+opl2_set_option(sfx_softseq_t *self, const char *name, const char *value)
{
return SFX_ERROR;
}
diff --git a/engines/sci/sfx/softseq/pcspeaker.cpp b/engines/sci/sfx/softseq/pcspeaker.cpp
index 727b1f9e5a..cde71ae62e 100644
--- a/engines/sci/sfx/softseq/pcspeaker.cpp
+++ b/engines/sci/sfx/softseq/pcspeaker.cpp
@@ -42,7 +42,7 @@ extern sfx_softseq_t sfx_softseq_pcspeaker;
static int
-sps_set_option(sfx_softseq_t *self, char *name, char *value)
+sps_set_option(sfx_softseq_t *self, const char *name, const char *value)
{
return SFX_ERROR;
}
diff --git a/engines/sci/sfx/softseq/softsequencers.cpp b/engines/sci/sfx/softseq/softsequencers.cpp
index d0f544190e..a63500ebd5 100644
--- a/engines/sci/sfx/softseq/softsequencers.cpp
+++ b/engines/sci/sfx/softseq/softsequencers.cpp
@@ -54,7 +54,7 @@ static sfx_softseq_t *sw_sequencers[] = {
sfx_softseq_t *
-sfx_find_softseq(char *name)
+sfx_find_softseq(const char *name)
{
if (!name)
return sw_sequencers[0];