aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/savegame.cfsml7
-rw-r--r--engines/sci/engine/savegame.cpp82
2 files changed, 44 insertions, 45 deletions
diff --git a/engines/sci/engine/savegame.cfsml b/engines/sci/engine/savegame.cfsml
index 2b36303057..efb060b544 100644
--- a/engines/sci/engine/savegame.cfsml
+++ b/engines/sci/engine/savegame.cfsml
@@ -243,7 +243,6 @@ TYPE IntMapperPtr "IntMapper *" USING write_IntMapperPtr read_IntMapperPtr;
TYPE IntMapperNodePtr "IntMapper::Node *" USING write_IntMapperNodePtr read_IntMapperNodePtr;
TYPE songlib_t "songlib_t" USING write_songlib_t read_songlib_t;
TYPE song_tp "song_t *" USING write_song_tp read_song_tp;
-TYPE SongIterator "SongIterator" USING write_song_iterator_t read_song_iterator_t;
TYPE song_handle_t "song_handle_t" LIKE int;
TYPE SegManagerPtr "SegManager *" USING write_SegManagerPtr read_SegManagerPtr;
@@ -1025,16 +1024,16 @@ static void reconstruct_sounds(EngineState *s) {
while (seeker) {
SongIterator *base, *ff;
int oldstatus;
- SongIteratorMessage msg;
+ SongIterator::Message msg;
base = ff = build_iterator(s, seeker->resource_num, it_type, seeker->handle);
if (seeker->restore_behavior == RESTORE_BEHAVIOR_CONTINUE)
ff = new_fast_forward_iterator(base, seeker->restore_time);
ff->init();
- msg = SongIteratorMessage(seeker->handle, SIMSG_SET_LOOPS(seeker->loops));
+ msg = SongIterator::Message(seeker->handle, SIMSG_SET_LOOPS(seeker->loops));
songit_handle_message(&ff, msg);
- msg = SongIteratorMessage(seeker->handle, SIMSG_SET_HOLD(seeker->hold));
+ msg = SongIterator::Message(seeker->handle, SIMSG_SET_HOLD(seeker->hold));
songit_handle_message(&ff, msg);
oldstatus = seeker->status;
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 259e76ed24..6e92d1815e 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -4014,7 +4014,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 452 "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);
@@ -4031,7 +4031,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 464 "engines/sci/engine/savegame.cfsml"
+#line 463 "engines/sci/engine/savegame.cfsml"
seeker = seeker->next;
}
WSprintf(fh, "]\n");
@@ -4079,7 +4079,7 @@ int read_songlib_t(Common::SeekableReadStream *fh, songlib_t *songlib, const cha
}
}
// End of auto-generated CFSML data reader code
-#line 488 "engines/sci/engine/savegame.cfsml"
+#line 487 "engines/sci/engine/savegame.cfsml"
song_lib_add(*songlib, newsong);
}
l = fh->readLine(); // "]"
@@ -4094,7 +4094,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 498 "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);
@@ -4128,7 +4128,7 @@ int read_song_tp(Common::SeekableReadStream *fh, song_t **foo, const char *lastv
}
}
// End of auto-generated CFSML data reader code
-#line 508 "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;
@@ -4141,7 +4141,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 516 "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) {
@@ -4170,7 +4170,7 @@ int read_IntMapperPtr(Common::SeekableReadStream *fh, IntMapper **foo, const cha
}
}
// End of auto-generated CFSML data reader code
-#line 521 "engines/sci/engine/savegame.cfsml"
+#line 520 "engines/sci/engine/savegame.cfsml"
(*foo)->holes = NULL;
return 0;
}
@@ -4186,7 +4186,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 532 "engines/sci/engine/savegame.cfsml"
+#line 531 "engines/sci/engine/savegame.cfsml"
} else
WSprintf(fh, "L");
WSprintf(fh, "]");
@@ -4234,7 +4234,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 575 "engines/sci/engine/savegame.cfsml"
+#line 574 "engines/sci/engine/savegame.cfsml"
} else { // Nothing to write
WSprintf(fh, "\\null\\");
}
@@ -4270,7 +4270,7 @@ int read_menubar_tp(Common::SeekableReadStream *fh, menubar_t **foo, const char
}
}
// End of auto-generated CFSML data reader code
-#line 587 "engines/sci/engine/savegame.cfsml"
+#line 586 "engines/sci/engine/savegame.cfsml"
}
return *hiteof;
}
@@ -4310,7 +4310,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 622 "engines/sci/engine/savegame.cfsml"
+#line 621 "engines/sci/engine/savegame.cfsml"
switch (foo->type) {
case MEM_OBJ_SCRIPT:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4318,7 +4318,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 625 "engines/sci/engine/savegame.cfsml"
+#line 624 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_CLONES:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4326,7 +4326,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 628 "engines/sci/engine/savegame.cfsml"
+#line 627 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_LOCALS:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4334,7 +4334,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 631 "engines/sci/engine/savegame.cfsml"
+#line 630 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_SYS_STRINGS:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4342,7 +4342,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 634 "engines/sci/engine/savegame.cfsml"
+#line 633 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_STACK:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4350,7 +4350,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 637 "engines/sci/engine/savegame.cfsml"
+#line 636 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_HUNK:
break;
@@ -4362,7 +4362,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 644 "engines/sci/engine/savegame.cfsml"
+#line 643 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_NODES:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4370,7 +4370,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 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_DYNMEM:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4378,7 +4378,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 650 "engines/sci/engine/savegame.cfsml"
+#line 649 "engines/sci/engine/savegame.cfsml"
break;
default:
break;
@@ -4418,7 +4418,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 663 "engines/sci/engine/savegame.cfsml"
switch (foo->type) {
case MEM_OBJ_SCRIPT:
// Auto-generated CFSML data reader code
@@ -4447,7 +4447,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 666 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_CLONES:
// Auto-generated CFSML data reader code
@@ -4476,7 +4476,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 669 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_LOCALS:
// Auto-generated CFSML data reader code
@@ -4505,7 +4505,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 672 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_SYS_STRINGS:
// Auto-generated CFSML data reader code
@@ -4534,7 +4534,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 675 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_LISTS:
// Auto-generated CFSML data reader code
@@ -4563,7 +4563,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 678 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_NODES:
// Auto-generated CFSML data reader code
@@ -4592,7 +4592,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 682 "engines/sci/engine/savegame.cfsml"
+#line 681 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_STACK:
// Auto-generated CFSML data reader code
@@ -4621,7 +4621,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 685 "engines/sci/engine/savegame.cfsml"
+#line 684 "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:
@@ -4656,7 +4656,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 694 "engines/sci/engine/savegame.cfsml"
+#line 693 "engines/sci/engine/savegame.cfsml"
break;
default:
break;
@@ -4672,7 +4672,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 705 "engines/sci/engine/savegame.cfsml"
+#line 704 "engines/sci/engine/savegame.cfsml"
} else { // Nothing to write
WSprintf(fh, "\\null\\");
}
@@ -4707,7 +4707,7 @@ int read_MemObjPtr(Common::SeekableReadStream *fh, MemObject **foo, const char *
}
}
// End of auto-generated CFSML data reader code
-#line 716 "engines/sci/engine/savegame.cfsml"
+#line 715 "engines/sci/engine/savegame.cfsml"
return *hiteof;
}
return 0;
@@ -4721,7 +4721,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 725 "engines/sci/engine/savegame.cfsml"
+#line 724 "engines/sci/engine/savegame.cfsml"
}
int read_CommonString(Common::SeekableReadStream *fh, Common::String *string, const char *lastval, int *line, int *hiteof)
@@ -4756,7 +4756,7 @@ int read_CommonString(Common::SeekableReadStream *fh, Common::String *string, co
}
}
// End of auto-generated CFSML data reader code
-#line 732 "engines/sci/engine/savegame.cfsml"
+#line 731 "engines/sci/engine/savegame.cfsml"
if (*hiteof) return *hiteof;
*string = t;
free(t);
@@ -4769,13 +4769,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 740 "engines/sci/engine/savegame.cfsml"
+#line 739 "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 741 "engines/sci/engine/savegame.cfsml"
+#line 740 "engines/sci/engine/savegame.cfsml"
}
int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const char *lastval, int *line, int *hiteof) {
@@ -4806,7 +4806,7 @@ int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const c
}
}
// End of auto-generated CFSML data reader code
-#line 748 "engines/sci/engine/savegame.cfsml"
+#line 747 "engines/sci/engine/savegame.cfsml"
*foo = new SegManager(sci11);
token = _cfsml_get_identifier(fh, line, hiteof, &assignment);
// Auto-generated CFSML data reader code
@@ -4833,7 +4833,7 @@ int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const c
}
}
// End of auto-generated CFSML data reader code
-#line 751 "engines/sci/engine/savegame.cfsml"
+#line 750 "engines/sci/engine/savegame.cfsml"
return 0;
}
@@ -4883,13 +4883,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 796 "engines/sci/engine/savegame.cfsml"
+#line 795 "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 797 "engines/sci/engine/savegame.cfsml"
+#line 796 "engines/sci/engine/savegame.cfsml"
_gamestate_unfrob(s);
@@ -5197,7 +5197,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
}
}
// End of auto-generated CFSML data reader code
-#line 1073 "engines/sci/engine/savegame.cfsml"
+#line 1072 "engines/sci/engine/savegame.cfsml"
if (read_eof)
return false;
@@ -5253,7 +5253,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
}
}
// End of auto-generated CFSML data reader code
-#line 1097 "engines/sci/engine/savegame.cfsml"
+#line 1096 "engines/sci/engine/savegame.cfsml"
sfx_exit(&s->sound);
_gamestate_unfrob(retval);
@@ -5391,7 +5391,7 @@ bool get_savegame_metadata(Common::SeekableReadStream* stream, SavegameMetadata*
}
}
// End of auto-generated CFSML data reader code
-#line 1203 "engines/sci/engine/savegame.cfsml"
+#line 1202 "engines/sci/engine/savegame.cfsml"
if (read_eof)
return false;