aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorEugene Sandulenko2009-02-24 20:11:10 +0000
committerEugene Sandulenko2009-02-24 20:11:10 +0000
commit241340a07ea138c6badd3727683097e863ef35f0 (patch)
tree98fb16113fbee1c1e9405196b19bb471c059af6a /engines/sci
parent7176a61a85c236116dcdf435315b1a0e1cb179a6 (diff)
downloadscummvm-rg350-241340a07ea138c6badd3727683097e863ef35f0.tar.gz
scummvm-rg350-241340a07ea138c6badd3727683097e863ef35f0.tar.bz2
scummvm-rg350-241340a07ea138c6badd3727683097e863ef35f0.zip
Fix compilation
svn-id: r38850
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/savegame.cpp1001
1 files changed, 500 insertions, 501 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 5c5980ff06..beff271865 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -230,14 +230,13 @@ RECORD synonym_t "synonym_t" {
// Auto-generated CFSML declaration and function block
-#line 736 "engines/sci/engine/savegame.cfsml"
+#line 735 "engines/sci/engine/savegame.cfsml"
#define CFSML_SUCCESS 0
#define CFSML_FAILURE 1
#line 102 "engines/sci/engine/savegame.cfsml"
#include <stdarg.h> // We need va_lists
-#include "sci/sci_memory.h"
#ifdef CFSML_DEBUG_MALLOC
/*
@@ -404,7 +403,7 @@ static char *_cfsml_get_identifier(Common::SeekableReadStream *fd, int *line, in
retval = (char *)sci_realloc(retval, mem += 1);
retval[pos] = 0; // Terminate string
-#line 281 "engines/sci/engine/savegame.cfsml"
+#line 280 "engines/sci/engine/savegame.cfsml"
return _cfsml_last_identifier_retrieved = retval;
}
@@ -447,143 +446,143 @@ static char *_cfsml_get_value(Common::SeekableReadStream *fd, int *line, int *hi
retval = (char *)sci_realloc(retval, mem += 1);
retval[pos] = 0; // Terminate string
-#line 333 "engines/sci/engine/savegame.cfsml"
+#line 332 "engines/sci/engine/savegame.cfsml"
return (_cfsml_last_value_retrieved = (char *)sci_realloc(retval, strlen(retval) + 1));
// Re-allocate; this value might be used for quite some while (if we are restoring a string)
}
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_sfx_state_t(Common::WriteStream *fh, sfx_state_t* save_struc);
static int _cfsml_read_sfx_state_t(Common::SeekableReadStream *fh, sfx_state_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_clone_entry_t(Common::WriteStream *fh, clone_entry_t* save_struc);
static int _cfsml_read_clone_entry_t(Common::SeekableReadStream *fh, clone_entry_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_object_t(Common::WriteStream *fh, object_t* save_struc);
static int _cfsml_read_object_t(Common::SeekableReadStream *fh, object_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_string(Common::WriteStream *fh, char ** save_struc);
static int _cfsml_read_string(Common::SeekableReadStream *fh, char ** save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_menubar_t(Common::WriteStream *fh, menubar_t* save_struc);
static int _cfsml_read_menubar_t(Common::SeekableReadStream *fh, menubar_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_size_t(Common::WriteStream *fh, size_t* save_struc);
static int _cfsml_read_size_t(Common::SeekableReadStream *fh, size_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_list_entry_t(Common::WriteStream *fh, list_entry_t* save_struc);
static int _cfsml_read_list_entry_t(Common::SeekableReadStream *fh, list_entry_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_SegManager(Common::WriteStream *fh, SegManager* save_struc);
static int _cfsml_read_SegManager(Common::SeekableReadStream *fh, SegManager* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_song_t(Common::WriteStream *fh, song_t* save_struc);
static int _cfsml_read_song_t(Common::SeekableReadStream *fh, song_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_menu_item_t(Common::WriteStream *fh, menu_item_t* save_struc);
static int _cfsml_read_menu_item_t(Common::SeekableReadStream *fh, menu_item_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_node_entry_t(Common::WriteStream *fh, node_entry_t* save_struc);
static int _cfsml_read_node_entry_t(Common::SeekableReadStream *fh, node_entry_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_seg_id_t(Common::WriteStream *fh, seg_id_t* save_struc);
static int _cfsml_read_seg_id_t(Common::SeekableReadStream *fh, seg_id_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_dynmem_t(Common::WriteStream *fh, dynmem_t* save_struc);
static int _cfsml_read_dynmem_t(Common::SeekableReadStream *fh, dynmem_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_local_variables_t(Common::WriteStream *fh, local_variables_t* save_struc);
static int _cfsml_read_local_variables_t(Common::SeekableReadStream *fh, local_variables_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_bool(Common::WriteStream *fh, bool* save_struc);
static int _cfsml_read_bool(Common::SeekableReadStream *fh, bool* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_node_table_t(Common::WriteStream *fh, node_table_t* save_struc);
static int _cfsml_read_node_table_t(Common::SeekableReadStream *fh, node_table_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_sys_strings_t(Common::WriteStream *fh, sys_strings_t* save_struc);
static int _cfsml_read_sys_strings_t(Common::SeekableReadStream *fh, sys_strings_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_byte(Common::WriteStream *fh, byte* save_struc);
static int _cfsml_read_byte(Common::SeekableReadStream *fh, byte* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_node_t(Common::WriteStream *fh, node_t* save_struc);
static int _cfsml_read_node_t(Common::SeekableReadStream *fh, node_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_list_table_t(Common::WriteStream *fh, list_table_t* save_struc);
static int _cfsml_read_list_table_t(Common::SeekableReadStream *fh, list_table_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_class_t(Common::WriteStream *fh, class_t* save_struc);
static int _cfsml_read_class_t(Common::SeekableReadStream *fh, class_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_song_handle_t(Common::WriteStream *fh, song_handle_t* save_struc);
static int _cfsml_read_song_handle_t(Common::SeekableReadStream *fh, song_handle_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_int(Common::WriteStream *fh, int* save_struc);
static int _cfsml_read_int(Common::SeekableReadStream *fh, int* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_EngineState(Common::WriteStream *fh, EngineState* save_struc);
static int _cfsml_read_EngineState(Common::SeekableReadStream *fh, EngineState* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_SavegameMetadata(Common::WriteStream *fh, SavegameMetadata* save_struc);
static int _cfsml_read_SavegameMetadata(Common::SeekableReadStream *fh, SavegameMetadata* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_IntMapper(Common::WriteStream *fh, IntMapper* save_struc);
static int _cfsml_read_IntMapper(Common::SeekableReadStream *fh, IntMapper* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_menu_t(Common::WriteStream *fh, menu_t* save_struc);
static int _cfsml_read_menu_t(Common::SeekableReadStream *fh, menu_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_clone_table_t(Common::WriteStream *fh, clone_table_t* save_struc);
static int _cfsml_read_clone_table_t(Common::SeekableReadStream *fh, clone_table_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_clone_t(Common::WriteStream *fh, clone_t* save_struc);
static int _cfsml_read_clone_t(Common::SeekableReadStream *fh, clone_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_list_t(Common::WriteStream *fh, list_t* save_struc);
static int _cfsml_read_list_t(Common::SeekableReadStream *fh, list_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_sys_string_t(Common::WriteStream *fh, sys_string_t* save_struc);
static int _cfsml_read_sys_string_t(Common::SeekableReadStream *fh, sys_string_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 383 "engines/sci/engine/savegame.cfsml"
+#line 382 "engines/sci/engine/savegame.cfsml"
static void _cfsml_write_script_t(Common::WriteStream *fh, script_t* save_struc);
static int _cfsml_read_script_t(Common::SeekableReadStream *fh, script_t* save_struc, const char *lastval, int *line, int *hiteof);
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_sfx_state_t(Common::WriteStream *fh, sfx_state_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "songlib = ");
write_songlib_t(fh, (songlib_t*) &(save_struc->songlib));
@@ -591,11 +590,11 @@ _cfsml_write_sfx_state_t(Common::WriteStream *fh, sfx_state_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_sfx_state_t(Common::SeekableReadStream *fh, sfx_state_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -628,13 +627,13 @@ _cfsml_read_sfx_state_t(Common::SeekableReadStream *fh, sfx_state_t* save_struc,
return CFSML_FAILURE;
}
if (!strcmp(token, "songlib")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_songlib_t(fh, (songlib_t*) &(save_struc->songlib), value, line, hiteof)) {
_cfsml_error("Token expected by read_songlib_t() for songlib at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("sfx_state_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -644,11 +643,11 @@ _cfsml_read_sfx_state_t(Common::SeekableReadStream *fh, sfx_state_t* save_struc,
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_clone_entry_t(Common::WriteStream *fh, clone_entry_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "next_free = ");
_cfsml_write_int(fh, (int*) &(save_struc->next_free));
@@ -659,11 +658,11 @@ _cfsml_write_clone_entry_t(Common::WriteStream *fh, clone_entry_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_clone_entry_t(Common::SeekableReadStream *fh, clone_entry_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -696,20 +695,20 @@ _cfsml_read_clone_entry_t(Common::SeekableReadStream *fh, clone_entry_t* save_st
return CFSML_FAILURE;
}
if (!strcmp(token, "next_free")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->next_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for next_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entry")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_clone_t(fh, (clone_t*) &(save_struc->entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_clone_t() for entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("clone_entry_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -719,11 +718,11 @@ _cfsml_read_clone_entry_t(Common::SeekableReadStream *fh, clone_entry_t* save_st
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_object_t(Common::WriteStream *fh, object_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "flags = ");
_cfsml_write_int(fh, (int*) &(save_struc->flags));
@@ -745,7 +744,7 @@ _cfsml_write_object_t(Common::WriteStream *fh, object_t* save_struc)
min = max = save_struc->variables_nr;
if (!save_struc->variables)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
write_reg_t(fh, &(save_struc->variables[i]));
@@ -756,11 +755,11 @@ _cfsml_write_object_t(Common::WriteStream *fh, object_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_object_t(Common::SeekableReadStream *fh, object_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -793,48 +792,48 @@ _cfsml_read_object_t(Common::SeekableReadStream *fh, object_t* save_struc, const
return CFSML_FAILURE;
}
if (!strcmp(token, "flags")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->flags), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for flags at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "pos")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->pos), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for pos at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variables_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->variables_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for variables_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variable_names_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->variable_names_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for variable_names_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "methods_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->methods_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for methods_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variables")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -850,11 +849,11 @@ _cfsml_read_object_t(Common::SeekableReadStream *fh, object_t* save_struc, const
_cfsml_register_pointer(save_struc->variables);
} else
save_struc->variables = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -872,7 +871,7 @@ _cfsml_read_object_t(Common::SeekableReadStream *fh, object_t* save_struc, const
} while (!done);
save_struc->variables_nr = max ; // Set array size accordingly
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("object_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -882,11 +881,11 @@ _cfsml_read_object_t(Common::SeekableReadStream *fh, object_t* save_struc, const
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_string(Common::WriteStream *fh, char ** save_struc)
{
-#line 402 "engines/sci/engine/savegame.cfsml"
+#line 401 "engines/sci/engine/savegame.cfsml"
if (!(*save_struc))
WSprintf(fh, "\\null\\");
else {
@@ -896,11 +895,11 @@ _cfsml_write_string(Common::WriteStream *fh, char ** save_struc)
}
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_string(Common::SeekableReadStream *fh, char ** save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 519 "engines/sci/engine/savegame.cfsml"
+#line 518 "engines/sci/engine/savegame.cfsml"
if (strcmp(lastval, "\\null\\")) { // null pointer?
unsigned int length = strlen(lastval);
@@ -925,18 +924,18 @@ _cfsml_read_string(Common::SeekableReadStream *fh, char ** save_struc, const cha
}
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_menubar_t(Common::WriteStream *fh, menubar_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "menus = ");
int min, max;
min = max = save_struc->menus_nr;
if (!save_struc->menus)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
_cfsml_write_menu_t(fh, &(save_struc->menus[i]));
@@ -947,11 +946,11 @@ _cfsml_write_menubar_t(Common::WriteStream *fh, menubar_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_menubar_t(Common::SeekableReadStream *fh, menubar_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -984,13 +983,13 @@ _cfsml_read_menubar_t(Common::SeekableReadStream *fh, menubar_t* save_struc, con
return CFSML_FAILURE;
}
if (!strcmp(token, "menus")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -1006,11 +1005,11 @@ _cfsml_read_menubar_t(Common::SeekableReadStream *fh, menubar_t* save_struc, con
_cfsml_register_pointer(save_struc->menus);
} else
save_struc->menus = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -1028,7 +1027,7 @@ _cfsml_read_menubar_t(Common::SeekableReadStream *fh, menubar_t* save_struc, con
} while (!done);
save_struc->menus_nr = max ; // Set array size accordingly
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("menubar_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1038,18 +1037,18 @@ _cfsml_read_menubar_t(Common::SeekableReadStream *fh, menubar_t* save_struc, con
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_size_t(Common::WriteStream *fh, size_t* save_struc)
{
WSprintf(fh, "%li", (long)*save_struc);
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_size_t(Common::SeekableReadStream *fh, size_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 506 "engines/sci/engine/savegame.cfsml"
+#line 505 "engines/sci/engine/savegame.cfsml"
char *token;
*save_struc = strtol(lastval, &token, 0);
@@ -1064,11 +1063,11 @@ _cfsml_read_size_t(Common::SeekableReadStream *fh, size_t* save_struc, const cha
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_list_entry_t(Common::WriteStream *fh, list_entry_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "next_free = ");
_cfsml_write_int(fh, (int*) &(save_struc->next_free));
@@ -1079,11 +1078,11 @@ _cfsml_write_list_entry_t(Common::WriteStream *fh, list_entry_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_list_entry_t(Common::SeekableReadStream *fh, list_entry_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -1116,20 +1115,20 @@ _cfsml_read_list_entry_t(Common::SeekableReadStream *fh, list_entry_t* save_stru
return CFSML_FAILURE;
}
if (!strcmp(token, "next_free")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->next_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for next_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entry")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_list_t(fh, (list_t*) &(save_struc->entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_list_t() for entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("list_entry_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1139,11 +1138,11 @@ _cfsml_read_list_entry_t(Common::SeekableReadStream *fh, list_entry_t* save_stru
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_SegManager(Common::WriteStream *fh, SegManager* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "id_seg_map = ");
write_IntMapperPtr(fh, (IntMapper **) &(save_struc->id_seg_map));
@@ -1153,7 +1152,7 @@ _cfsml_write_SegManager(Common::WriteStream *fh, SegManager* save_struc)
min = max = save_struc->heap_size;
if (!save_struc->heap)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
write_mem_obj_tp(fh, &(save_struc->heap[i]));
@@ -1188,11 +1187,11 @@ _cfsml_write_SegManager(Common::WriteStream *fh, SegManager* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_SegManager(Common::SeekableReadStream *fh, SegManager* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -1225,20 +1224,20 @@ _cfsml_read_SegManager(Common::SeekableReadStream *fh, SegManager* save_struc, c
return CFSML_FAILURE;
}
if (!strcmp(token, "id_seg_map")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_IntMapperPtr(fh, (IntMapper **) &(save_struc->id_seg_map), value, line, hiteof)) {
_cfsml_error("Token expected by read_IntMapperPtr() for id_seg_map at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "heap")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -1254,11 +1253,11 @@ _cfsml_read_SegManager(Common::SeekableReadStream *fh, SegManager* save_struc, c
_cfsml_register_pointer(save_struc->heap);
} else
save_struc->heap = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -1277,62 +1276,62 @@ _cfsml_read_SegManager(Common::SeekableReadStream *fh, SegManager* save_struc, c
save_struc->heap_size = max ; // Set array size accordingly
} else
if (!strcmp(token, "heap_size")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->heap_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for heap_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "reserved_id")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->reserved_id), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for reserved_id at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "exports_wide")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->exports_wide), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for exports_wide at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "gc_mark_bits")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->gc_mark_bits), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for gc_mark_bits at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "mem_allocated")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->mem_allocated), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_size_t() for mem_allocated at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "clones_seg_id")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_seg_id_t(fh, (seg_id_t*) &(save_struc->clones_seg_id), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_seg_id_t() for clones_seg_id at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "lists_seg_id")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_seg_id_t(fh, (seg_id_t*) &(save_struc->lists_seg_id), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_seg_id_t() for lists_seg_id at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "nodes_seg_id")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_seg_id_t(fh, (seg_id_t*) &(save_struc->nodes_seg_id), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_seg_id_t() for nodes_seg_id at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("SegManager: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1342,11 +1341,11 @@ _cfsml_read_SegManager(Common::SeekableReadStream *fh, SegManager* save_struc, c
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_song_t(Common::WriteStream *fh, song_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "handle = ");
_cfsml_write_song_handle_t(fh, (song_handle_t*) &(save_struc->handle));
@@ -1375,11 +1374,11 @@ _cfsml_write_song_t(Common::WriteStream *fh, song_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_song_t(Common::SeekableReadStream *fh, song_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -1412,62 +1411,62 @@ _cfsml_read_song_t(Common::SeekableReadStream *fh, song_t* save_struc, const cha
return CFSML_FAILURE;
}
if (!strcmp(token, "handle")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_song_handle_t(fh, (song_handle_t*) &(save_struc->handle), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_song_handle_t() for handle at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "resource_num")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->resource_num), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for resource_num at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "priority")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->priority), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for priority at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "status")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->status), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for status at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "restore_behavior")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->restore_behavior), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for restore_behavior at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "restore_time")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->restore_time), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for restore_time at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "loops")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->loops), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for loops at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "hold")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->hold), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for hold at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("song_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1477,11 +1476,11 @@ _cfsml_read_song_t(Common::SeekableReadStream *fh, song_t* save_struc, const cha
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_menu_item_t(Common::WriteStream *fh, menu_item_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "type = ");
_cfsml_write_int(fh, (int*) &(save_struc->type));
@@ -1498,7 +1497,7 @@ _cfsml_write_menu_item_t(Common::WriteStream *fh, menu_item_t* save_struc)
WSprintf(fh, "said = ");
int min, max;
min = max = MENU_SAID_SPEC_SIZE;
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
_cfsml_write_byte(fh, &(save_struc->said[i]));
@@ -1530,11 +1529,11 @@ _cfsml_write_menu_item_t(Common::WriteStream *fh, menu_item_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_menu_item_t(Common::SeekableReadStream *fh, menu_item_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -1567,35 +1566,35 @@ _cfsml_read_menu_item_t(Common::SeekableReadStream *fh, menu_item_t* save_struc,
return CFSML_FAILURE;
}
if (!strcmp(token, "type")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->type), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for type at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "keytext")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->keytext), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for keytext at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "keytext_size")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->keytext_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for keytext_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "flags")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->flags), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for flags at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "said")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
@@ -1603,11 +1602,11 @@ _cfsml_read_menu_item_t(Common::SeekableReadStream *fh, menu_item_t* save_struc,
int max,done,i;
// Prepare to restore static array
max = MENU_SAID_SPEC_SIZE;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -1625,55 +1624,55 @@ _cfsml_read_menu_item_t(Common::SeekableReadStream *fh, menu_item_t* save_struc,
} while (!done);
} else
if (!strcmp(token, "said_pos")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->said_pos), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for said_pos at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "text")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->text), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for text at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "text_pos")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->text_pos), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for text_pos at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "modifiers")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->modifiers), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for modifiers at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "key")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->key), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for key at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "enabled")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->enabled), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for enabled at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "tag")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->tag), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for tag at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("menu_item_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1683,11 +1682,11 @@ _cfsml_read_menu_item_t(Common::SeekableReadStream *fh, menu_item_t* save_struc,
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_node_entry_t(Common::WriteStream *fh, node_entry_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "next_free = ");
_cfsml_write_int(fh, (int*) &(save_struc->next_free));
@@ -1698,11 +1697,11 @@ _cfsml_write_node_entry_t(Common::WriteStream *fh, node_entry_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_node_entry_t(Common::SeekableReadStream *fh, node_entry_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -1735,20 +1734,20 @@ _cfsml_read_node_entry_t(Common::SeekableReadStream *fh, node_entry_t* save_stru
return CFSML_FAILURE;
}
if (!strcmp(token, "next_free")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->next_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for next_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entry")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_node_t(fh, (node_t*) &(save_struc->entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_node_t() for entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("node_entry_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1758,18 +1757,18 @@ _cfsml_read_node_entry_t(Common::SeekableReadStream *fh, node_entry_t* save_stru
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_seg_id_t(Common::WriteStream *fh, seg_id_t* save_struc)
{
WSprintf(fh, "%li", (long)*save_struc);
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_seg_id_t(Common::SeekableReadStream *fh, seg_id_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 506 "engines/sci/engine/savegame.cfsml"
+#line 505 "engines/sci/engine/savegame.cfsml"
char *token;
*save_struc = strtol(lastval, &token, 0);
@@ -1784,11 +1783,11 @@ _cfsml_read_seg_id_t(Common::SeekableReadStream *fh, seg_id_t* save_struc, const
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_dynmem_t(Common::WriteStream *fh, dynmem_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "size = ");
_cfsml_write_int(fh, (int*) &(save_struc->size));
@@ -1801,7 +1800,7 @@ _cfsml_write_dynmem_t(Common::WriteStream *fh, dynmem_t* save_struc)
min = max = save_struc->size;
if (!save_struc->buf)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
_cfsml_write_byte(fh, &(save_struc->buf[i]));
@@ -1812,11 +1811,11 @@ _cfsml_write_dynmem_t(Common::WriteStream *fh, dynmem_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_dynmem_t(Common::SeekableReadStream *fh, dynmem_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -1849,27 +1848,27 @@ _cfsml_read_dynmem_t(Common::SeekableReadStream *fh, dynmem_t* save_struc, const
return CFSML_FAILURE;
}
if (!strcmp(token, "size")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "description")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->description), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for description at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "buf")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -1885,11 +1884,11 @@ _cfsml_read_dynmem_t(Common::SeekableReadStream *fh, dynmem_t* save_struc, const
_cfsml_register_pointer(save_struc->buf);
} else
save_struc->buf = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -1907,7 +1906,7 @@ _cfsml_read_dynmem_t(Common::SeekableReadStream *fh, dynmem_t* save_struc, const
} while (!done);
save_struc->size = max ; // Set array size accordingly
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("dynmem_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1917,11 +1916,11 @@ _cfsml_read_dynmem_t(Common::SeekableReadStream *fh, dynmem_t* save_struc, const
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_local_variables_t(Common::WriteStream *fh, local_variables_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "script_id = ");
_cfsml_write_int(fh, (int*) &(save_struc->script_id));
@@ -1934,7 +1933,7 @@ _cfsml_write_local_variables_t(Common::WriteStream *fh, local_variables_t* save_
min = max = save_struc->nr;
if (!save_struc->locals)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
write_reg_t(fh, &(save_struc->locals[i]));
@@ -1945,11 +1944,11 @@ _cfsml_write_local_variables_t(Common::WriteStream *fh, local_variables_t* save_
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_local_variables_t(Common::SeekableReadStream *fh, local_variables_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -1982,27 +1981,27 @@ _cfsml_read_local_variables_t(Common::SeekableReadStream *fh, local_variables_t*
return CFSML_FAILURE;
}
if (!strcmp(token, "script_id")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->script_id), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for script_id at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "locals")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -2018,11 +2017,11 @@ _cfsml_read_local_variables_t(Common::SeekableReadStream *fh, local_variables_t*
_cfsml_register_pointer(save_struc->locals);
} else
save_struc->locals = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -2040,7 +2039,7 @@ _cfsml_read_local_variables_t(Common::SeekableReadStream *fh, local_variables_t*
} while (!done);
save_struc->nr = max ; // Set array size accordingly
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("local_variables_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2050,18 +2049,18 @@ _cfsml_read_local_variables_t(Common::SeekableReadStream *fh, local_variables_t*
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_bool(Common::WriteStream *fh, bool* save_struc)
{
WSprintf(fh, "%li", (long)*save_struc);
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_bool(Common::SeekableReadStream *fh, bool* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 506 "engines/sci/engine/savegame.cfsml"
+#line 505 "engines/sci/engine/savegame.cfsml"
char *token;
*save_struc = strtol(lastval, &token, 0);
@@ -2076,11 +2075,11 @@ _cfsml_read_bool(Common::SeekableReadStream *fh, bool* save_struc, const char *l
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_node_table_t(Common::WriteStream *fh, node_table_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "entries_nr = ");
_cfsml_write_int(fh, (int*) &(save_struc->entries_nr));
@@ -2099,7 +2098,7 @@ _cfsml_write_node_table_t(Common::WriteStream *fh, node_table_t* save_struc)
min = max = save_struc->entries_nr;
if (!save_struc->table)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
_cfsml_write_node_entry_t(fh, &(save_struc->table[i]));
@@ -2110,11 +2109,11 @@ _cfsml_write_node_table_t(Common::WriteStream *fh, node_table_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_node_table_t(Common::SeekableReadStream *fh, node_table_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -2147,41 +2146,41 @@ _cfsml_read_node_table_t(Common::SeekableReadStream *fh, node_table_t* save_stru
return CFSML_FAILURE;
}
if (!strcmp(token, "entries_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "first_free")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->first_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for first_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entries_used")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_used), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_used at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "max_entry")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->max_entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for max_entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "table")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -2197,11 +2196,11 @@ _cfsml_read_node_table_t(Common::SeekableReadStream *fh, node_table_t* save_stru
_cfsml_register_pointer(save_struc->table);
} else
save_struc->table = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -2219,7 +2218,7 @@ _cfsml_read_node_table_t(Common::SeekableReadStream *fh, node_table_t* save_stru
} while (!done);
save_struc->entries_nr = max ; // Set array size accordingly
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("node_table_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2229,16 +2228,16 @@ _cfsml_read_node_table_t(Common::SeekableReadStream *fh, node_table_t* save_stru
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_sys_strings_t(Common::WriteStream *fh, sys_strings_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "strings = ");
int min, max;
min = max = SYS_STRINGS_MAX;
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
_cfsml_write_sys_string_t(fh, &(save_struc->strings[i]));
@@ -2249,11 +2248,11 @@ _cfsml_write_sys_strings_t(Common::WriteStream *fh, sys_strings_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_sys_strings_t(Common::SeekableReadStream *fh, sys_strings_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -2286,7 +2285,7 @@ _cfsml_read_sys_strings_t(Common::SeekableReadStream *fh, sys_strings_t* save_st
return CFSML_FAILURE;
}
if (!strcmp(token, "strings")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
@@ -2294,11 +2293,11 @@ _cfsml_read_sys_strings_t(Common::SeekableReadStream *fh, sys_strings_t* save_st
int max,done,i;
// Prepare to restore static array
max = SYS_STRINGS_MAX;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -2315,7 +2314,7 @@ _cfsml_read_sys_strings_t(Common::SeekableReadStream *fh, sys_strings_t* save_st
done = 1;
} while (!done);
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("sys_strings_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2325,18 +2324,18 @@ _cfsml_read_sys_strings_t(Common::SeekableReadStream *fh, sys_strings_t* save_st
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_byte(Common::WriteStream *fh, byte* save_struc)
{
WSprintf(fh, "%li", (long)*save_struc);
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_byte(Common::SeekableReadStream *fh, byte* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 506 "engines/sci/engine/savegame.cfsml"
+#line 505 "engines/sci/engine/savegame.cfsml"
char *token;
*save_struc = strtol(lastval, &token, 0);
@@ -2351,11 +2350,11 @@ _cfsml_read_byte(Common::SeekableReadStream *fh, byte* save_struc, const char *l
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_node_t(Common::WriteStream *fh, node_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "pred = ");
write_reg_t(fh, (reg_t*) &(save_struc->pred));
@@ -2372,11 +2371,11 @@ _cfsml_write_node_t(Common::WriteStream *fh, node_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_node_t(Common::SeekableReadStream *fh, node_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -2409,34 +2408,34 @@ _cfsml_read_node_t(Common::SeekableReadStream *fh, node_t* save_struc, const cha
return CFSML_FAILURE;
}
if (!strcmp(token, "pred")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->pred), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for pred at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "succ")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->succ), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for succ at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "key")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->key), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for key at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "value")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->value), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for value at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("node_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2446,11 +2445,11 @@ _cfsml_read_node_t(Common::SeekableReadStream *fh, node_t* save_struc, const cha
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_list_table_t(Common::WriteStream *fh, list_table_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "entries_nr = ");
_cfsml_write_int(fh, (int*) &(save_struc->entries_nr));
@@ -2469,7 +2468,7 @@ _cfsml_write_list_table_t(Common::WriteStream *fh, list_table_t* save_struc)
min = max = save_struc->entries_nr;
if (!save_struc->table)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
_cfsml_write_list_entry_t(fh, &(save_struc->table[i]));
@@ -2480,11 +2479,11 @@ _cfsml_write_list_table_t(Common::WriteStream *fh, list_table_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_list_table_t(Common::SeekableReadStream *fh, list_table_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -2517,41 +2516,41 @@ _cfsml_read_list_table_t(Common::SeekableReadStream *fh, list_table_t* save_stru
return CFSML_FAILURE;
}
if (!strcmp(token, "entries_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "first_free")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->first_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for first_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entries_used")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_used), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_used at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "max_entry")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->max_entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for max_entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "table")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -2567,11 +2566,11 @@ _cfsml_read_list_table_t(Common::SeekableReadStream *fh, list_table_t* save_stru
_cfsml_register_pointer(save_struc->table);
} else
save_struc->table = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -2589,7 +2588,7 @@ _cfsml_read_list_table_t(Common::SeekableReadStream *fh, list_table_t* save_stru
} while (!done);
save_struc->entries_nr = max ; // Set array size accordingly
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("list_table_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2599,11 +2598,11 @@ _cfsml_read_list_table_t(Common::SeekableReadStream *fh, list_table_t* save_stru
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_class_t(Common::WriteStream *fh, class_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "script = ");
_cfsml_write_int(fh, (int*) &(save_struc->script));
@@ -2614,11 +2613,11 @@ _cfsml_write_class_t(Common::WriteStream *fh, class_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_class_t(Common::SeekableReadStream *fh, class_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -2651,20 +2650,20 @@ _cfsml_read_class_t(Common::SeekableReadStream *fh, class_t* save_struc, const c
return CFSML_FAILURE;
}
if (!strcmp(token, "script")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->script), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for script at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "reg")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->reg), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for reg at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("class_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2674,18 +2673,18 @@ _cfsml_read_class_t(Common::SeekableReadStream *fh, class_t* save_struc, const c
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_song_handle_t(Common::WriteStream *fh, song_handle_t* save_struc)
{
WSprintf(fh, "%li", (long)*save_struc);
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_song_handle_t(Common::SeekableReadStream *fh, song_handle_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 506 "engines/sci/engine/savegame.cfsml"
+#line 505 "engines/sci/engine/savegame.cfsml"
char *token;
*save_struc = strtol(lastval, &token, 0);
@@ -2700,18 +2699,18 @@ _cfsml_read_song_handle_t(Common::SeekableReadStream *fh, song_handle_t* save_st
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_int(Common::WriteStream *fh, int* save_struc)
{
WSprintf(fh, "%li", (long)*save_struc);
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_int(Common::SeekableReadStream *fh, int* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 506 "engines/sci/engine/savegame.cfsml"
+#line 505 "engines/sci/engine/savegame.cfsml"
char *token;
*save_struc = strtol(lastval, &token, 0);
@@ -2726,11 +2725,11 @@ _cfsml_read_int(Common::SeekableReadStream *fh, int* save_struc, const char *las
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_EngineState(Common::WriteStream *fh, EngineState* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "savegame_version = ");
_cfsml_write_int(fh, (int*) &(save_struc->savegame_version));
@@ -2761,7 +2760,7 @@ _cfsml_write_EngineState(Common::WriteStream *fh, EngineState* save_struc)
min = max = save_struc->classtable_size;
if (!save_struc->classtable)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
_cfsml_write_class_t(fh, &(save_struc->classtable[i]));
@@ -2775,11 +2774,11 @@ _cfsml_write_EngineState(Common::WriteStream *fh, EngineState* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_EngineState(Common::SeekableReadStream *fh, EngineState* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -2812,69 +2811,69 @@ _cfsml_read_EngineState(Common::SeekableReadStream *fh, EngineState* save_struc,
return CFSML_FAILURE;
}
if (!strcmp(token, "savegame_version")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->savegame_version), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for savegame_version at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "game_version")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->game_version), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for game_version at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "version")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_sci_version(fh, (sci_version_t*) &(save_struc->version), value, line, hiteof)) {
_cfsml_error("Token expected by read_sci_version() for version at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "menubar")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_menubar_tp(fh, (menubar_t **) &(save_struc->menubar), value, line, hiteof)) {
_cfsml_error("Token expected by read_menubar_tp() for menubar at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "status_bar_foreground")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->status_bar_foreground), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for status_bar_foreground at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "status_bar_background")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->status_bar_background), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for status_bar_background at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "seg_manager")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_SegManagerPtr(fh, (SegManager **) &(save_struc->seg_manager), value, line, hiteof)) {
_cfsml_error("Token expected by read_SegManagerPtr() for seg_manager at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "classtable_size")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->classtable_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for classtable_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "classtable")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -2890,11 +2889,11 @@ _cfsml_read_EngineState(Common::SeekableReadStream *fh, EngineState* save_struc,
_cfsml_register_pointer(save_struc->classtable);
} else
save_struc->classtable = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -2913,13 +2912,13 @@ _cfsml_read_EngineState(Common::SeekableReadStream *fh, EngineState* save_struc,
save_struc->classtable_size = max ; // Set array size accordingly
} else
if (!strcmp(token, "sound")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_sfx_state_t(fh, (sfx_state_t*) &(save_struc->sound), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_sfx_state_t() for sound at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("EngineState: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2929,11 +2928,11 @@ _cfsml_read_EngineState(Common::SeekableReadStream *fh, EngineState* save_struc,
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_SavegameMetadata(Common::WriteStream *fh, SavegameMetadata* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "savegame_name = ");
_cfsml_write_string(fh, (char **) &(save_struc->savegame_name));
@@ -2956,11 +2955,11 @@ _cfsml_write_SavegameMetadata(Common::WriteStream *fh, SavegameMetadata* save_st
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_SavegameMetadata(Common::SeekableReadStream *fh, SavegameMetadata* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -2993,48 +2992,48 @@ _cfsml_read_SavegameMetadata(Common::SeekableReadStream *fh, SavegameMetadata* s
return CFSML_FAILURE;
}
if (!strcmp(token, "savegame_name")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->savegame_name), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for savegame_name at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "savegame_version")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->savegame_version), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for savegame_version at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "game_version")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->game_version), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for game_version at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "version")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_sci_version(fh, (sci_version_t*) &(save_struc->version), value, line, hiteof)) {
_cfsml_error("Token expected by read_sci_version() for version at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "savegame_date")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->savegame_date), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for savegame_date at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "savegame_time")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->savegame_time), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for savegame_time at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("SavegameMetadata: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3044,11 +3043,11 @@ _cfsml_read_SavegameMetadata(Common::SeekableReadStream *fh, SavegameMetadata* s
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_IntMapper(Common::WriteStream *fh, IntMapper* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "base_value = ");
_cfsml_write_int(fh, (int*) &(save_struc->base_value));
@@ -3056,7 +3055,7 @@ _cfsml_write_IntMapper(Common::WriteStream *fh, IntMapper* save_struc)
WSprintf(fh, "nodes = ");
int min, max;
min = max = DCS_INT_HASH_MAX;
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
write_IntMapperNodePtr(fh, &(save_struc->nodes[i]));
@@ -3067,11 +3066,11 @@ _cfsml_write_IntMapper(Common::WriteStream *fh, IntMapper* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_IntMapper(Common::SeekableReadStream *fh, IntMapper* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -3104,14 +3103,14 @@ _cfsml_read_IntMapper(Common::SeekableReadStream *fh, IntMapper* save_struc, con
return CFSML_FAILURE;
}
if (!strcmp(token, "base_value")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->base_value), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for base_value at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "nodes")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
@@ -3119,11 +3118,11 @@ _cfsml_read_IntMapper(Common::SeekableReadStream *fh, IntMapper* save_struc, con
int max,done,i;
// Prepare to restore static array
max = DCS_INT_HASH_MAX;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -3140,7 +3139,7 @@ _cfsml_read_IntMapper(Common::SeekableReadStream *fh, IntMapper* save_struc, con
done = 1;
} while (!done);
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("IntMapper: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3150,11 +3149,11 @@ _cfsml_read_IntMapper(Common::SeekableReadStream *fh, IntMapper* save_struc, con
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_menu_t(Common::WriteStream *fh, menu_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "title = ");
_cfsml_write_string(fh, (char **) &(save_struc->title));
@@ -3170,7 +3169,7 @@ _cfsml_write_menu_t(Common::WriteStream *fh, menu_t* save_struc)
min = max = save_struc->items_nr;
if (!save_struc->items)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
_cfsml_write_menu_item_t(fh, &(save_struc->items[i]));
@@ -3181,11 +3180,11 @@ _cfsml_write_menu_t(Common::WriteStream *fh, menu_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_menu_t(Common::SeekableReadStream *fh, menu_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -3218,34 +3217,34 @@ _cfsml_read_menu_t(Common::SeekableReadStream *fh, menu_t* save_struc, const cha
return CFSML_FAILURE;
}
if (!strcmp(token, "title")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->title), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for title at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "title_width")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->title_width), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for title_width at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "width")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->width), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for width at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "items")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -3261,11 +3260,11 @@ _cfsml_read_menu_t(Common::SeekableReadStream *fh, menu_t* save_struc, const cha
_cfsml_register_pointer(save_struc->items);
} else
save_struc->items = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -3283,7 +3282,7 @@ _cfsml_read_menu_t(Common::SeekableReadStream *fh, menu_t* save_struc, const cha
} while (!done);
save_struc->items_nr = max ; // Set array size accordingly
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("menu_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3293,11 +3292,11 @@ _cfsml_read_menu_t(Common::SeekableReadStream *fh, menu_t* save_struc, const cha
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_clone_table_t(Common::WriteStream *fh, clone_table_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "entries_nr = ");
_cfsml_write_int(fh, (int*) &(save_struc->entries_nr));
@@ -3316,7 +3315,7 @@ _cfsml_write_clone_table_t(Common::WriteStream *fh, clone_table_t* save_struc)
min = max = save_struc->entries_nr;
if (!save_struc->table)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
_cfsml_write_clone_entry_t(fh, &(save_struc->table[i]));
@@ -3327,11 +3326,11 @@ _cfsml_write_clone_table_t(Common::WriteStream *fh, clone_table_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_clone_table_t(Common::SeekableReadStream *fh, clone_table_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -3364,41 +3363,41 @@ _cfsml_read_clone_table_t(Common::SeekableReadStream *fh, clone_table_t* save_st
return CFSML_FAILURE;
}
if (!strcmp(token, "entries_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "first_free")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->first_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for first_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entries_used")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_used), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_used at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "max_entry")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->max_entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for max_entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "table")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -3414,11 +3413,11 @@ _cfsml_read_clone_table_t(Common::SeekableReadStream *fh, clone_table_t* save_st
_cfsml_register_pointer(save_struc->table);
} else
save_struc->table = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -3436,7 +3435,7 @@ _cfsml_read_clone_table_t(Common::SeekableReadStream *fh, clone_table_t* save_st
} while (!done);
save_struc->entries_nr = max ; // Set array size accordingly
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("clone_table_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3446,11 +3445,11 @@ _cfsml_read_clone_table_t(Common::SeekableReadStream *fh, clone_table_t* save_st
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_clone_t(Common::WriteStream *fh, clone_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "flags = ");
_cfsml_write_int(fh, (int*) &(save_struc->flags));
@@ -3472,7 +3471,7 @@ _cfsml_write_clone_t(Common::WriteStream *fh, clone_t* save_struc)
min = max = save_struc->variables_nr;
if (!save_struc->variables)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
write_reg_t(fh, &(save_struc->variables[i]));
@@ -3483,11 +3482,11 @@ _cfsml_write_clone_t(Common::WriteStream *fh, clone_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_clone_t(Common::SeekableReadStream *fh, clone_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -3520,48 +3519,48 @@ _cfsml_read_clone_t(Common::SeekableReadStream *fh, clone_t* save_struc, const c
return CFSML_FAILURE;
}
if (!strcmp(token, "flags")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->flags), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for flags at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "pos")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->pos), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for pos at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variables_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->variables_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for variables_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variable_names_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->variable_names_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for variable_names_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "methods_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->methods_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for methods_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variables")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -3577,11 +3576,11 @@ _cfsml_read_clone_t(Common::SeekableReadStream *fh, clone_t* save_struc, const c
_cfsml_register_pointer(save_struc->variables);
} else
save_struc->variables = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -3599,7 +3598,7 @@ _cfsml_read_clone_t(Common::SeekableReadStream *fh, clone_t* save_struc, const c
} while (!done);
save_struc->variables_nr = max ; // Set array size accordingly
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("clone_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3609,11 +3608,11 @@ _cfsml_read_clone_t(Common::SeekableReadStream *fh, clone_t* save_struc, const c
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_list_t(Common::WriteStream *fh, list_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "first = ");
write_reg_t(fh, (reg_t*) &(save_struc->first));
@@ -3624,11 +3623,11 @@ _cfsml_write_list_t(Common::WriteStream *fh, list_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_list_t(Common::SeekableReadStream *fh, list_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -3661,20 +3660,20 @@ _cfsml_read_list_t(Common::SeekableReadStream *fh, list_t* save_struc, const cha
return CFSML_FAILURE;
}
if (!strcmp(token, "first")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->first), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for first at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "last")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->last), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for last at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("list_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3684,11 +3683,11 @@ _cfsml_read_list_t(Common::SeekableReadStream *fh, list_t* save_struc, const cha
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_sys_string_t(Common::WriteStream *fh, sys_string_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "name = ");
_cfsml_write_string(fh, (char **) &(save_struc->name));
@@ -3702,11 +3701,11 @@ _cfsml_write_sys_string_t(Common::WriteStream *fh, sys_string_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_sys_string_t(Common::SeekableReadStream *fh, sys_string_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -3739,27 +3738,27 @@ _cfsml_read_sys_string_t(Common::SeekableReadStream *fh, sys_string_t* save_stru
return CFSML_FAILURE;
}
if (!strcmp(token, "name")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->name), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for name at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "max_size")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->max_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for max_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "value")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->value), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for value at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("sys_string_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3769,11 +3768,11 @@ _cfsml_read_sys_string_t(Common::SeekableReadStream *fh, sys_string_t* save_stru
return CFSML_SUCCESS;
}
-#line 395 "engines/sci/engine/savegame.cfsml"
+#line 394 "engines/sci/engine/savegame.cfsml"
static void
_cfsml_write_script_t(Common::WriteStream *fh, script_t* save_struc)
{
-#line 412 "engines/sci/engine/savegame.cfsml"
+#line 411 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "{\n");
WSprintf(fh, "nr = ");
_cfsml_write_int(fh, (int*) &(save_struc->nr));
@@ -3810,7 +3809,7 @@ _cfsml_write_script_t(Common::WriteStream *fh, script_t* save_struc)
min = max = save_struc->objects_allocated;
if (!save_struc->objects)
min = max = 0; /* Don't write if it points to NULL */
-#line 439 "engines/sci/engine/savegame.cfsml"
+#line 438 "engines/sci/engine/savegame.cfsml"
WSprintf(fh, "[%d][\n", max);
for (int i = 0; i < min; i++) {
_cfsml_write_object_t(fh, &(save_struc->objects[i]));
@@ -3830,11 +3829,11 @@ _cfsml_write_script_t(Common::WriteStream *fh, script_t* save_struc)
WSprintf(fh, "}");
}
-#line 486 "engines/sci/engine/savegame.cfsml"
+#line 485 "engines/sci/engine/savegame.cfsml"
static int
_cfsml_read_script_t(Common::SeekableReadStream *fh, script_t* save_struc, const char *lastval, int *line, int *hiteof)
{
-#line 541 "engines/sci/engine/savegame.cfsml"
+#line 540 "engines/sci/engine/savegame.cfsml"
char *token;
int assignment, closed;
@@ -3867,83 +3866,83 @@ _cfsml_read_script_t(Common::SeekableReadStream *fh, script_t* save_struc, const
return CFSML_FAILURE;
}
if (!strcmp(token, "nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "buf_size")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->buf_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_size_t() for buf_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "script_size")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->script_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_size_t() for script_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "heap_size")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->heap_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_size_t() for heap_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "obj_indices")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (read_IntMapperPtr(fh, (IntMapper **) &(save_struc->obj_indices), value, line, hiteof)) {
_cfsml_error("Token expected by read_IntMapperPtr() for obj_indices at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "exports_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->exports_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for exports_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "synonyms_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->synonyms_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for synonyms_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "lockers")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->lockers), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for lockers at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "objects_allocated")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->objects_allocated), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for objects_allocated at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "objects_nr")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->objects_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for objects_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "objects")) {
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 603 "engines/sci/engine/savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
int max,done,i;
-#line 615 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
// Prepare to restore dynamic array
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -3959,11 +3958,11 @@ _cfsml_read_script_t(Common::SeekableReadStream *fh, script_t* save_struc, const
_cfsml_register_pointer(save_struc->objects);
} else
save_struc->objects = NULL;
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 638 "engines/sci/engine/savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
-#line 647 "engines/sci/engine/savegame.cfsml"
+#line 646 "engines/sci/engine/savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -3982,27 +3981,27 @@ _cfsml_read_script_t(Common::SeekableReadStream *fh, script_t* save_struc, const
save_struc->objects_allocated = max ; // Set array size accordingly
} else
if (!strcmp(token, "locals_offset")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->locals_offset), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for locals_offset at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "locals_segment")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->locals_segment), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for locals_segment at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "marked_as_deleted")) {
-#line 690 "engines/sci/engine/savegame.cfsml"
+#line 689 "engines/sci/engine/savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->marked_as_deleted), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for marked_as_deleted at line %d\n", *line);
return CFSML_FAILURE;
}
} else
-#line 699 "engines/sci/engine/savegame.cfsml"
+#line 698 "engines/sci/engine/savegame.cfsml"
{
_cfsml_error("script_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -4027,7 +4026,7 @@ void write_songlib_t(Common::WriteStream *fh, songlib_t *songlib) {
WSprintf(fh, "[\n");
while (seeker) {
seeker->restore_time = seeker->it->get_timepos(seeker->it);
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_song_t(fh, seeker);
WSprintf(fh, "\n");
@@ -4057,19 +4056,19 @@ int read_songlib_t(Common::SeekableReadStream *fh, songlib_t *songlib, const cha
song_lib_init(songlib);
for (i = 0; i < songcount; i++) {
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 778 "engines/sci/engine/savegame.cfsml"
+#line 777 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = lastval;
{
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = read_song_tp(fh, &newsong, _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4090,7 +4089,7 @@ int read_songlib_t(Common::SeekableReadStream *fh, songlib_t *songlib, const cha
}
void write_song_tp(Common::WriteStream *fh, song_t **foo) {
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_song_t(fh, *foo);
WSprintf(fh, "\n");
@@ -4106,19 +4105,19 @@ int read_song_tp(Common::SeekableReadStream *fh, song_t **foo, const char *lastv
*foo = (song_t*) malloc(sizeof(song_t));
token = _cfsml_get_identifier(fh, line, hiteof, &assignment);
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 778 "engines/sci/engine/savegame.cfsml"
+#line 777 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = token;
{
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_song_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4137,7 +4136,7 @@ int read_song_tp(Common::SeekableReadStream *fh, song_t **foo, const char *lastv
}
void write_IntMapperPtr(Common::WriteStream *fh, IntMapper **foo) {
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_IntMapper(fh, *foo);
WSprintf(fh, "\n");
@@ -4148,19 +4147,19 @@ void write_IntMapperPtr(Common::WriteStream *fh, IntMapper **foo) {
int read_IntMapperPtr(Common::SeekableReadStream *fh, IntMapper **foo, const char *lastval, int *line, int *hiteof) {
*foo = new IntMapper();
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 778 "engines/sci/engine/savegame.cfsml"
+#line 777 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = lastval;
{
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_IntMapper(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4182,7 +4181,7 @@ void write_IntMapperNodePtr(Common::WriteStream *fh, IntMapper::Node **foo) {
} else {
WSprintf(fh,"[\n%d=>%d\n", (*foo)->key, (*foo)->idx);
if ((*foo)->next) {
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
write_IntMapperNodePtr(fh, &((*foo)->next));
WSprintf(fh, "\n");
@@ -4230,7 +4229,7 @@ int read_IntMapperNodePtr(Common::SeekableReadStream *fh, IntMapper::Node **foo,
void write_menubar_tp(Common::WriteStream *fh, menubar_t **foo) {
if (*foo) {
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_menubar_t(fh, (*foo));
WSprintf(fh, "\n");
@@ -4248,19 +4247,19 @@ int read_menubar_tp(Common::SeekableReadStream *fh, menubar_t **foo, const char
} else {
*foo = (menubar_t *) sci_malloc(sizeof(menubar_t));
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 778 "engines/sci/engine/savegame.cfsml"
+#line 777 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = lastval;
{
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_menubar_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4304,7 +4303,7 @@ int mem_obj_string_to_enum(const char *str) {
void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) {
WSprintf(fh, "%s\n", mem_obj_string_names[foo->type].name);
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_int(fh, &foo->segmgr_id);
WSprintf(fh, "\n");
@@ -4312,7 +4311,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) {
#line 619 "engines/sci/engine/savegame.cfsml"
switch (foo->type) {
case MEM_OBJ_SCRIPT:
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_script_t(fh, &foo->data.script);
WSprintf(fh, "\n");
@@ -4320,7 +4319,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) {
#line 622 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_CLONES:
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_clone_table_t(fh, &foo->data.clones);
WSprintf(fh, "\n");
@@ -4328,7 +4327,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) {
#line 625 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_LOCALS:
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_local_variables_t(fh, &foo->data.locals);
WSprintf(fh, "\n");
@@ -4336,7 +4335,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) {
#line 628 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_SYS_STRINGS:
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_sys_strings_t(fh, &foo->data.sys_strings);
WSprintf(fh, "\n");
@@ -4344,7 +4343,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) {
#line 631 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_STACK:
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_int(fh, &foo->data.stack.nr);
WSprintf(fh, "\n");
@@ -4354,7 +4353,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) {
case MEM_OBJ_HUNK:
break;
case MEM_OBJ_LISTS:
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_list_table_t(fh, &foo->data.lists);
WSprintf(fh, "\n");
@@ -4362,7 +4361,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) {
#line 639 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_NODES:
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_node_table_t(fh, &foo->data.nodes);
WSprintf(fh, "\n");
@@ -4370,7 +4369,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) {
#line 642 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_DYNMEM:
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_dynmem_t(fh, &foo->data.dynmem);
WSprintf(fh, "\n");
@@ -4390,21 +4389,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l
}
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_int(fh, &foo->segmgr_id, _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4419,21 +4418,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l
switch (foo->type) {
case MEM_OBJ_SCRIPT:
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_script_t(fh, &foo->data.script, _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4448,21 +4447,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l
break;
case MEM_OBJ_CLONES:
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_clone_table_t(fh, &foo->data.clones, _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4477,21 +4476,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l
break;
case MEM_OBJ_LOCALS:
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_local_variables_t(fh, &foo->data.locals, _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4506,21 +4505,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l
break;
case MEM_OBJ_SYS_STRINGS:
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_sys_strings_t(fh, &foo->data.sys_strings, _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4535,21 +4534,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l
break;
case MEM_OBJ_LISTS:
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_list_table_t(fh, &foo->data.lists, _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4564,21 +4563,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l
break;
case MEM_OBJ_NODES:
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_node_table_t(fh, &foo->data.nodes, _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4593,21 +4592,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l
break;
case MEM_OBJ_STACK:
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_int(fh, &foo->data.stack.nr, _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4626,21 +4625,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l
break;
case MEM_OBJ_DYNMEM:
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_dynmem_t(fh, &foo->data.dynmem, _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4662,7 +4661,7 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l
void write_mem_obj_tp(Common::WriteStream *fh, mem_obj_t **foo) {
if (*foo) {
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
write_mem_obj_t(fh, (*foo));
WSprintf(fh, "\n");
@@ -4679,19 +4678,19 @@ int read_mem_obj_tp(Common::SeekableReadStream *fh, mem_obj_t **foo, const char
} else {
*foo = (mem_obj_t *)sci_malloc(sizeof(mem_obj_t));
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 778 "engines/sci/engine/savegame.cfsml"
+#line 777 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = lastval;
{
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = read_mem_obj_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4709,13 +4708,13 @@ int read_mem_obj_tp(Common::SeekableReadStream *fh, mem_obj_t **foo, const char
}
void write_SegManagerPtr(Common::WriteStream *fh, SegManager **foo) {
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_bool(fh, &((*foo)->isSci1_1));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
#line 716 "engines/sci/engine/savegame.cfsml"
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_SegManager(fh, *foo);
WSprintf(fh, "\n");
@@ -4728,19 +4727,19 @@ int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const c
int assignment;
bool sci11;
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 778 "engines/sci/engine/savegame.cfsml"
+#line 777 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = token;
{
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_bool(fh, (&sci11), _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4755,19 +4754,19 @@ int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const c
*foo = new SegManager(sci11);
token = _cfsml_get_identifier(fh, line, hiteof, &assignment);
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 778 "engines/sci/engine/savegame.cfsml"
+#line 777 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = token;
{
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_SegManager(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
*hiteof = _cfsml_error;
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -4825,13 +4824,13 @@ int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename
// Calculate the time spent with this game
s->game_time = g_system->getMillis() / 1000;
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_SavegameMetadata(fh, meta);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
#line 774 "engines/sci/engine/savegame.cfsml"
-#line 819 "engines/sci/engine/savegame.cfsml"
+#line 818 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_EngineState(fh, s);
WSprintf(fh, "\n");
@@ -5116,27 +5115,27 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
memset(meta, 0, sizeof(SavegameMetadata));
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 766 "engines/sci/engine/savegame.cfsml"
+#line 765 "engines/sci/engine/savegame.cfsml"
int _cfsml_line_ctr = 0;
-#line 771 "engines/sci/engine/savegame.cfsml"
+#line 770 "engines/sci/engine/savegame.cfsml"
struct _cfsml_pointer_refstruct **_cfsml_myptrrefptr = _cfsml_get_current_refpointer();
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(fh, &(_cfsml_line_ctr), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_SavegameMetadata(fh, meta, _cfsml_inp, &(_cfsml_line_ctr), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
read_eof = _cfsml_error;
-#line 798 "engines/sci/engine/savegame.cfsml"
+#line 797 "engines/sci/engine/savegame.cfsml"
_cfsml_free_pointer_references(_cfsml_myptrrefptr, _cfsml_error);
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -5171,27 +5170,27 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
retval->sound_volume = s->sound_volume;
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 766 "engines/sci/engine/savegame.cfsml"
+#line 765 "engines/sci/engine/savegame.cfsml"
int _cfsml_line_ctr = 0;
-#line 771 "engines/sci/engine/savegame.cfsml"
+#line 770 "engines/sci/engine/savegame.cfsml"
struct _cfsml_pointer_refstruct **_cfsml_myptrrefptr = _cfsml_get_current_refpointer();
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(fh, &(_cfsml_line_ctr), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_EngineState(fh, retval, _cfsml_inp, &(_cfsml_line_ctr), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
read_eof = _cfsml_error;
-#line 798 "engines/sci/engine/savegame.cfsml"
+#line 797 "engines/sci/engine/savegame.cfsml"
_cfsml_free_pointer_references(_cfsml_myptrrefptr, _cfsml_error);
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;
@@ -5291,27 +5290,27 @@ bool get_savegame_metadata(Common::SeekableReadStream* stream, SavegameMetadata*
int read_eof = 0;
// Auto-generated CFSML data reader code
-#line 763 "engines/sci/engine/savegame.cfsml"
+#line 762 "engines/sci/engine/savegame.cfsml"
{
-#line 766 "engines/sci/engine/savegame.cfsml"
+#line 765 "engines/sci/engine/savegame.cfsml"
int _cfsml_line_ctr = 0;
-#line 771 "engines/sci/engine/savegame.cfsml"
+#line 770 "engines/sci/engine/savegame.cfsml"
struct _cfsml_pointer_refstruct **_cfsml_myptrrefptr = _cfsml_get_current_refpointer();
-#line 774 "engines/sci/engine/savegame.cfsml"
+#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
-#line 782 "engines/sci/engine/savegame.cfsml"
+#line 781 "engines/sci/engine/savegame.cfsml"
const char *_cfsml_inp = _cfsml_get_identifier(stream, &(_cfsml_line_ctr), &_cfsml_eof, 0);
if (!_cfsml_inp) {
_cfsml_error = CFSML_FAILURE;
} else {
-#line 789 "engines/sci/engine/savegame.cfsml"
+#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_SavegameMetadata(stream, meta, _cfsml_inp, &(_cfsml_line_ctr), &_cfsml_eof);
}
-#line 794 "engines/sci/engine/savegame.cfsml"
+#line 793 "engines/sci/engine/savegame.cfsml"
read_eof = _cfsml_error;
-#line 798 "engines/sci/engine/savegame.cfsml"
+#line 797 "engines/sci/engine/savegame.cfsml"
_cfsml_free_pointer_references(_cfsml_myptrrefptr, _cfsml_error);
-#line 801 "engines/sci/engine/savegame.cfsml"
+#line 800 "engines/sci/engine/savegame.cfsml"
if (_cfsml_last_value_retrieved) {
free(_cfsml_last_value_retrieved);
_cfsml_last_value_retrieved = NULL;