aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-03-06 18:11:12 +0000
committerMax Horn2009-03-06 18:11:12 +0000
commit54e1256b0e6d4fdab26ae820b49e3e2faaff6240 (patch)
treeca688d0744dd4c5bc3f4d7d352ae0ce941e14f9f
parent763275f2699f0718d45e7732efe25434161f0c7c (diff)
downloadscummvm-rg350-54e1256b0e6d4fdab26ae820b49e3e2faaff6240.tar.gz
scummvm-rg350-54e1256b0e6d4fdab26ae820b49e3e2faaff6240.tar.bz2
scummvm-rg350-54e1256b0e6d4fdab26ae820b49e3e2faaff6240.zip
SCI: Reduce SFX header dependencies
svn-id: r39159
-rw-r--r--engines/sci/engine/ksound.cpp1
-rw-r--r--engines/sci/engine/savegame.cfsml1
-rw-r--r--engines/sci/engine/savegame.cpp83
-rw-r--r--engines/sci/engine/scriptdebug.cpp1
-rw-r--r--engines/sci/sfx/core.cpp4
-rw-r--r--engines/sci/sfx/core.h3
-rw-r--r--engines/sci/sfx/player.h8
-rw-r--r--engines/sci/sfx/player/polled.cpp3
-rw-r--r--engines/sci/sfx/player/realtime.cpp4
-rw-r--r--engines/sci/sfx/songlib.cpp1
-rw-r--r--engines/sci/sfx/songlib.h4
11 files changed, 61 insertions, 52 deletions
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index fbedf79504..855ef7fa57 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -25,6 +25,7 @@
#include "sci/engine/state.h"
#include "sci/sfx/player.h"
+#include "sci/sfx/iterator.h"
#include "sci/engine/kernel.h"
namespace Sci {
diff --git a/engines/sci/engine/savegame.cfsml b/engines/sci/engine/savegame.cfsml
index 0362108155..57eaedfebf 100644
--- a/engines/sci/engine/savegame.cfsml
+++ b/engines/sci/engine/savegame.cfsml
@@ -36,6 +36,7 @@
#include "sci/gfx/operations.h"
#include "sci/gfx/menubar.h"
#include "sci/sfx/core.h"
+#include "sci/sfx/iterator.h"
#include "sci/engine/state.h"
#include "sci/engine/intmap.h"
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 76fa7edb6b..68efd75fb1 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -36,6 +36,7 @@
#include "sci/gfx/operations.h"
#include "sci/gfx/menubar.h"
#include "sci/sfx/core.h"
+#include "sci/sfx/iterator.h"
#include "sci/engine/state.h"
#include "sci/engine/intmap.h"
@@ -4012,7 +4013,7 @@ _cfsml_read_Script(Common::SeekableReadStream *fh, Script* save_struc, const cha
// Auto-generated CFSML declaration and function block ends here
// Auto-generation performed by cfsml.pl 0.8.2
-#line 450 "engines/sci/engine/savegame.cfsml"
+#line 451 "engines/sci/engine/savegame.cfsml"
void write_songlib_t(Common::WriteStream *fh, songlib_t const *songlib) {
song_t *seeker = *(songlib->lib);
@@ -4029,7 +4030,7 @@ void write_songlib_t(Common::WriteStream *fh, songlib_t const *songlib) {
_cfsml_write_song_t(fh, seeker);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 462 "engines/sci/engine/savegame.cfsml"
+#line 463 "engines/sci/engine/savegame.cfsml"
seeker = seeker->next;
}
WSprintf(fh, "]\n");
@@ -4077,7 +4078,7 @@ int read_songlib_t(Common::SeekableReadStream *fh, songlib_t *songlib, const cha
}
}
// End of auto-generated CFSML data reader code
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 487 "engines/sci/engine/savegame.cfsml"
song_lib_add(*songlib, newsong);
}
l = fh->readLine(); // "]"
@@ -4092,7 +4093,7 @@ void write_song_tp(Common::WriteStream *fh, const song_t * const *foo) {
_cfsml_write_song_t(fh, *foo);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 496 "engines/sci/engine/savegame.cfsml"
+#line 497 "engines/sci/engine/savegame.cfsml"
}
SongIterator *build_iterator(EngineState *s, int song_nr, int type, songit_id_t id);
@@ -4126,7 +4127,7 @@ int read_song_tp(Common::SeekableReadStream *fh, song_t **foo, const char *lastv
}
}
// End of auto-generated CFSML data reader code
-#line 506 "engines/sci/engine/savegame.cfsml"
+#line 507 "engines/sci/engine/savegame.cfsml"
(*foo)->delay = 0;
(*foo)->it = NULL;
(*foo)->next_playing = (*foo)->next_stopping = (*foo)->next = NULL;
@@ -4139,7 +4140,7 @@ void write_IntMapperPtr(Common::WriteStream *fh, const IntMapper * const *foo) {
_cfsml_write_IntMapper(fh, *foo);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 514 "engines/sci/engine/savegame.cfsml"
+#line 515 "engines/sci/engine/savegame.cfsml"
}
int read_IntMapperPtr(Common::SeekableReadStream *fh, IntMapper **foo, const char *lastval, int *line, int *hiteof) {
@@ -4168,7 +4169,7 @@ int read_IntMapperPtr(Common::SeekableReadStream *fh, IntMapper **foo, const cha
}
}
// End of auto-generated CFSML data reader code
-#line 519 "engines/sci/engine/savegame.cfsml"
+#line 520 "engines/sci/engine/savegame.cfsml"
(*foo)->holes = NULL;
return 0;
}
@@ -4184,7 +4185,7 @@ void write_IntMapperNodePtr(Common::WriteStream *fh, const IntMapper::Node * con
write_IntMapperNodePtr(fh, &((*foo)->next));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 530 "engines/sci/engine/savegame.cfsml"
+#line 531 "engines/sci/engine/savegame.cfsml"
} else
WSprintf(fh, "L");
WSprintf(fh, "]");
@@ -4232,7 +4233,7 @@ void write_menubar_tp(Common::WriteStream *fh, const menubar_t * const *foo) {
_cfsml_write_menubar_t(fh, (*foo));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 573 "engines/sci/engine/savegame.cfsml"
+#line 574 "engines/sci/engine/savegame.cfsml"
} else { // Nothing to write
WSprintf(fh, "\\null\\");
}
@@ -4268,7 +4269,7 @@ int read_menubar_tp(Common::SeekableReadStream *fh, menubar_t **foo, const char
}
}
// End of auto-generated CFSML data reader code
-#line 585 "engines/sci/engine/savegame.cfsml"
+#line 586 "engines/sci/engine/savegame.cfsml"
}
return *hiteof;
}
@@ -4306,7 +4307,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_int(fh, &foo->segmgr_id);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 618 "engines/sci/engine/savegame.cfsml"
+#line 619 "engines/sci/engine/savegame.cfsml"
switch (foo->type) {
case MEM_OBJ_SCRIPT:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4314,7 +4315,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_Script(fh, &foo->data.script);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 621 "engines/sci/engine/savegame.cfsml"
+#line 622 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_CLONES:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4322,7 +4323,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_CloneTable(fh, &foo->data.clones);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 624 "engines/sci/engine/savegame.cfsml"
+#line 625 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_LOCALS:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4330,7 +4331,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_LocalVariables(fh, &foo->data.locals);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 627 "engines/sci/engine/savegame.cfsml"
+#line 628 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_SYS_STRINGS:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4338,7 +4339,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_SystemStrings(fh, &foo->data.sys_strings);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 630 "engines/sci/engine/savegame.cfsml"
+#line 631 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_STACK:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4346,7 +4347,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_int(fh, &foo->data.stack.nr);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 633 "engines/sci/engine/savegame.cfsml"
+#line 634 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_HUNK:
break;
@@ -4356,7 +4357,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_ListTable(fh, &foo->data.lists);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 638 "engines/sci/engine/savegame.cfsml"
+#line 639 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_NODES:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4364,7 +4365,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_NodeTable(fh, &foo->data.nodes);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 641 "engines/sci/engine/savegame.cfsml"
+#line 642 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_DYNMEM:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4372,7 +4373,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_DynMem(fh, &foo->data.dynmem);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 644 "engines/sci/engine/savegame.cfsml"
+#line 645 "engines/sci/engine/savegame.cfsml"
break;
default:
break;
@@ -4412,7 +4413,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 658 "engines/sci/engine/savegame.cfsml"
+#line 659 "engines/sci/engine/savegame.cfsml"
switch (foo->type) {
case MEM_OBJ_SCRIPT:
// Auto-generated CFSML data reader code
@@ -4441,7 +4442,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 661 "engines/sci/engine/savegame.cfsml"
+#line 662 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_CLONES:
// Auto-generated CFSML data reader code
@@ -4470,7 +4471,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 664 "engines/sci/engine/savegame.cfsml"
+#line 665 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_LOCALS:
// Auto-generated CFSML data reader code
@@ -4499,7 +4500,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 667 "engines/sci/engine/savegame.cfsml"
+#line 668 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_SYS_STRINGS:
// Auto-generated CFSML data reader code
@@ -4528,7 +4529,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 670 "engines/sci/engine/savegame.cfsml"
+#line 671 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_LISTS:
// Auto-generated CFSML data reader code
@@ -4557,7 +4558,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 673 "engines/sci/engine/savegame.cfsml"
+#line 674 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_NODES:
// Auto-generated CFSML data reader code
@@ -4586,7 +4587,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 676 "engines/sci/engine/savegame.cfsml"
+#line 677 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_STACK:
// Auto-generated CFSML data reader code
@@ -4615,7 +4616,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 679 "engines/sci/engine/savegame.cfsml"
+#line 680 "engines/sci/engine/savegame.cfsml"
foo->data.stack.entries = (reg_t *)sci_calloc(foo->data.stack.nr, sizeof(reg_t));
break;
case MEM_OBJ_HUNK:
@@ -4648,7 +4649,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 686 "engines/sci/engine/savegame.cfsml"
+#line 687 "engines/sci/engine/savegame.cfsml"
break;
default:
break;
@@ -4664,7 +4665,7 @@ void write_MemObjPtr(Common::WriteStream *fh, const MemObject * const *foo) {
write_MemObject(fh, (*foo));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 697 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
} else { // Nothing to write
WSprintf(fh, "\\null\\");
}
@@ -4699,7 +4700,7 @@ int read_MemObjPtr(Common::SeekableReadStream *fh, MemObject **foo, const char *
}
}
// End of auto-generated CFSML data reader code
-#line 708 "engines/sci/engine/savegame.cfsml"
+#line 709 "engines/sci/engine/savegame.cfsml"
return *hiteof;
}
return 0;
@@ -4713,7 +4714,7 @@ void write_CommonString(Common::WriteStream *fh, Common::String const *string)
_cfsml_write_string(fh, (&t));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 717 "engines/sci/engine/savegame.cfsml"
+#line 718 "engines/sci/engine/savegame.cfsml"
}
int read_CommonString(Common::SeekableReadStream *fh, Common::String *string, const char *lastval, int *line, int *hiteof)
@@ -4748,7 +4749,7 @@ int read_CommonString(Common::SeekableReadStream *fh, Common::String *string, co
}
}
// End of auto-generated CFSML data reader code
-#line 724 "engines/sci/engine/savegame.cfsml"
+#line 725 "engines/sci/engine/savegame.cfsml"
if (*hiteof) return *hiteof;
*string = t;
free(t);
@@ -4761,13 +4762,13 @@ void write_SegManagerPtr(Common::WriteStream *fh, const SegManager * const *foo)
_cfsml_write_bool(fh, &((*foo)->isSci1_1));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 732 "engines/sci/engine/savegame.cfsml"
+#line 733 "engines/sci/engine/savegame.cfsml"
#line 822 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_SegManager(fh, *foo);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 733 "engines/sci/engine/savegame.cfsml"
+#line 734 "engines/sci/engine/savegame.cfsml"
}
int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const char *lastval, int *line, int *hiteof) {
@@ -4798,7 +4799,7 @@ int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const c
}
}
// End of auto-generated CFSML data reader code
-#line 740 "engines/sci/engine/savegame.cfsml"
+#line 741 "engines/sci/engine/savegame.cfsml"
*foo = new SegManager(sci11);
token = _cfsml_get_identifier(fh, line, hiteof, &assignment);
// Auto-generated CFSML data reader code
@@ -4825,7 +4826,7 @@ int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const c
}
}
// End of auto-generated CFSML data reader code
-#line 743 "engines/sci/engine/savegame.cfsml"
+#line 744 "engines/sci/engine/savegame.cfsml"
return 0;
}
@@ -4875,13 +4876,13 @@ int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename
_cfsml_write_SavegameMetadata(fh, (&meta));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 788 "engines/sci/engine/savegame.cfsml"
+#line 789 "engines/sci/engine/savegame.cfsml"
#line 822 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_EngineState(fh, s);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 790 "engines/sci/engine/savegame.cfsml"
_gamestate_unfrob(s);
@@ -5189,7 +5190,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
}
}
// End of auto-generated CFSML data reader code
-#line 1065 "engines/sci/engine/savegame.cfsml"
+#line 1066 "engines/sci/engine/savegame.cfsml"
if (read_eof)
return false;
@@ -5245,7 +5246,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
}
}
// End of auto-generated CFSML data reader code
-#line 1089 "engines/sci/engine/savegame.cfsml"
+#line 1090 "engines/sci/engine/savegame.cfsml"
sfx_exit(&s->sound);
_gamestate_unfrob(retval);
@@ -5383,7 +5384,7 @@ bool get_savegame_metadata(Common::SeekableReadStream* stream, SavegameMetadata*
}
}
// End of auto-generated CFSML data reader code
-#line 1195 "engines/sci/engine/savegame.cfsml"
+#line 1196 "engines/sci/engine/savegame.cfsml"
if (read_eof)
return false;
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index ea10978db2..596fc3e459 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -36,6 +36,7 @@
#include "sci/scicore/resource.h"
#include "sci/scicore/sciconsole.h"
#include "sci/scicore/vocabulary.h"
+#include "sci/sfx/iterator.h"
#include "sci/sfx/sci_midi.h"
#include "common/util.h"
diff --git a/engines/sci/sfx/core.cpp b/engines/sci/sfx/core.cpp
index 01110bb32a..a427a5fd7f 100644
--- a/engines/sci/sfx/core.cpp
+++ b/engines/sci/sfx/core.cpp
@@ -26,6 +26,7 @@
/* Sound subsystem core: Event handler, sound player dispatching */
#include "sci/tools.h"
+#include "sci/sfx/core.h"
#include "sci/sfx/iterator_internal.h"
#include "sci/sfx/player.h"
#include "sci/sfx/sci_midi.h"
@@ -230,8 +231,7 @@ static void _update_single_song(sfx_state_t *self) {
if (!self->song)
sciprintf(" New song:");
else
- sciprintf(" pausing %08lx, now playing",
- self->song->handle);
+ sciprintf(" pausing %08lx, now playing", self->song->handle);
if (newsong)
sciprintf(" %08lx\n", newsong->handle);
diff --git a/engines/sci/sfx/core.h b/engines/sci/sfx/core.h
index 6517c6ba85..e7f8a8db07 100644
--- a/engines/sci/sfx/core.h
+++ b/engines/sci/sfx/core.h
@@ -29,13 +29,12 @@
#include "sci/sfx/sfx.h"
#include "sci/sfx/songlib.h"
-//#include "sci/sfx/iterator.h"
#include "sci/scicore/resource.h"
namespace Sci {
class SongIterator;
-
+struct fade_params_t;
#define SOUND_TICK 1000 / 60
/* Approximately 17 milliseconds */
diff --git a/engines/sci/sfx/player.h b/engines/sci/sfx/player.h
index bbb893c91e..98a2cc989f 100644
--- a/engines/sci/sfx/player.h
+++ b/engines/sci/sfx/player.h
@@ -28,14 +28,16 @@
#ifndef SCI_SFX_SFX_PLAYER_H
#define SCI_SFX_SFX_PLAYER_H
-#include "sci/sfx/core.h"
-#include "sci/sfx/iterator.h"
+//#include "sci/sfx/core.h"
#include "sci/scicore/resource.h"
#include "common/scummsys.h"
namespace Sci {
+struct SongIterator;
+struct SongIteratorMessage;
+
typedef void tell_synth_func(int buf_nr, byte *buf);
struct sfx_player_t {
@@ -79,7 +81,7 @@ struct sfx_player_t {
** Returns : (int) SFX_OK on success, SFX_ERROR on failure
*/
- int (*iterator_message)(SongIteratorMessage msg);
+ int (*iterator_message)(const SongIteratorMessage &msg);
/* Transmits a song iterator message to the active song
** Parameters: (SongIteratorMessage) msg: The message to transmit
** Returns : (int) SFX_OK on success, SFX_ERROR on failure
diff --git a/engines/sci/sfx/player/polled.cpp b/engines/sci/sfx/player/polled.cpp
index 8740736248..1df4b2a62a 100644
--- a/engines/sci/sfx/player/polled.cpp
+++ b/engines/sci/sfx/player/polled.cpp
@@ -29,6 +29,7 @@
#include "common/file.h"
#include "sci/sfx/player.h"
#include "sci/sfx/softseq.h"
+#include "sci/sfx/iterator.h"
#include "sound/audiostream.h"
#include "sound/mixer.h"
@@ -358,7 +359,7 @@ static int pp_stop() {
return SFX_OK;
}
-static int pp_send_iterator_message(SongIteratorMessage msg) {
+static int pp_send_iterator_message(const SongIteratorMessage &msg) {
if (!play_it)
return SFX_ERROR;
diff --git a/engines/sci/sfx/player/realtime.cpp b/engines/sci/sfx/player/realtime.cpp
index cfe3db1ed3..a3832ed51f 100644
--- a/engines/sci/sfx/player/realtime.cpp
+++ b/engines/sci/sfx/player/realtime.cpp
@@ -30,6 +30,8 @@
#include "sci/tools.h"
#include "sci/sfx/player.h"
#include "sci/sfx/sequencer.h"
+#include "sci/sfx/iterator.h"
+#include "sci/sfx/core.h"
#include "common/system.h"
@@ -220,7 +222,7 @@ static int rt_stop(void) {
return SFX_OK;
}
-static int rt_send_iterator_message(SongIteratorMessage msg) {
+static int rt_send_iterator_message(const SongIteratorMessage &msg) {
if (!play_it)
return SFX_ERROR;
diff --git a/engines/sci/sfx/songlib.cpp b/engines/sci/sfx/songlib.cpp
index 0c19f0dbcf..3d6f22612e 100644
--- a/engines/sci/sfx/songlib.cpp
+++ b/engines/sci/sfx/songlib.cpp
@@ -25,6 +25,7 @@
#include "sci/tools.h"
#include "sci/sfx/core.h"
+#include "sci/sfx/iterator.h"
#include "sci/sci_memory.h"
namespace Sci {
diff --git a/engines/sci/sfx/songlib.h b/engines/sci/sfx/songlib.h
index 8ce63c7eb8..490bd47770 100644
--- a/engines/sci/sfx/songlib.h
+++ b/engines/sci/sfx/songlib.h
@@ -30,10 +30,10 @@
#include "common/scummsys.h"
-#include "sci/sfx/iterator.h"
-
namespace Sci {
+class SongIterator;
+
#define SOUND_STATUS_STOPPED 0
#define SOUND_STATUS_PLAYING 1
#define SOUND_STATUS_SUSPENDED 2