aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-03-14 01:44:53 +0000
committerMax Horn2009-03-14 01:44:53 +0000
commit150b38ffb74344eea6177e38f09da2780b2e2638 (patch)
treed8c8ee72def9dde726296be315168d8083404234
parent0796c72e97e73a217214e4e905ac92d816e6afc9 (diff)
downloadscummvm-rg350-150b38ffb74344eea6177e38f09da2780b2e2638.tar.gz
scummvm-rg350-150b38ffb74344eea6177e38f09da2780b2e2638.tar.bz2
scummvm-rg350-150b38ffb74344eea6177e38f09da2780b2e2638.zip
SCI: Removed more dead code
svn-id: r39379
-rw-r--r--engines/sci/engine/savegame.cfsml11
-rw-r--r--engines/sci/engine/savegame.cpp93
2 files changed, 41 insertions, 63 deletions
diff --git a/engines/sci/engine/savegame.cfsml b/engines/sci/engine/savegame.cfsml
index a2e64c9a35..7e1e0e35be 100644
--- a/engines/sci/engine/savegame.cfsml
+++ b/engines/sci/engine/savegame.cfsml
@@ -48,8 +48,6 @@
namespace Sci {
-#define HUNK_TYPE_GFX_SNAPSHOT_STRING "g\n"
-
/* Missing:
** - SFXdriver
** - File input/output state (this is likely not to happen)
@@ -685,12 +683,6 @@ int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const c
return 0;
}
-// This function is called to undo some strange stuff done in preparation
-// to writing a gamestate to disk
-void _gamestate_unfrob(EngineState *s) {
-}
-
-
int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename) {
tm curTime;
g_system->getTimeAndDate(curTime);
@@ -728,8 +720,6 @@ int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename
%CFSMLWRITE SavegameMetadata (&meta) INTO fh;
%CFSMLWRITE EngineState s INTO fh;
- _gamestate_unfrob(s);
-
return 0;
}
@@ -1028,7 +1018,6 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
%CFSMLREAD-ATOMIC EngineState retval FROM fh ERRVAR read_eof;
sfx_exit(&s->sound);
- _gamestate_unfrob(retval);
// Set exec stack base to zero
retval->execution_stack_base = 0;
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index ab04e5475d..f922d8d2ac 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -48,8 +48,6 @@
namespace Sci {
-#define HUNK_TYPE_GFX_SNAPSHOT_STRING "g\n"
-
/* Missing:
** - SFXdriver
** - File input/output state (this is likely not to happen)
@@ -3949,7 +3947,7 @@ _cfsml_read_Script(Common::SeekableReadStream *fh, Script* save_struc, const cha
// Auto-generated CFSML declaration and function block ends here
// Auto-generation performed by cfsml.pl 0.8.2
-#line 386 "engines/sci/engine/savegame.cfsml"
+#line 384 "engines/sci/engine/savegame.cfsml"
void write_songlib_t(Common::WriteStream *fh, songlib_t const *songlib) {
song_t *seeker = *(songlib->lib);
@@ -3966,7 +3964,7 @@ void write_songlib_t(Common::WriteStream *fh, songlib_t const *songlib) {
_cfsml_write_song_t(fh, seeker);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 398 "engines/sci/engine/savegame.cfsml"
+#line 396 "engines/sci/engine/savegame.cfsml"
seeker = seeker->next;
}
WSprintf(fh, "]\n");
@@ -4014,7 +4012,7 @@ int read_songlib_t(Common::SeekableReadStream *fh, songlib_t *songlib, const cha
}
}
// End of auto-generated CFSML data reader code
-#line 422 "engines/sci/engine/savegame.cfsml"
+#line 420 "engines/sci/engine/savegame.cfsml"
song_lib_add(*songlib, newsong);
}
l = fh->readLine(); // "]"
@@ -4029,7 +4027,7 @@ void write_song_tp(Common::WriteStream *fh, const song_t * const *foo) {
_cfsml_write_song_t(fh, *foo);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 432 "engines/sci/engine/savegame.cfsml"
+#line 430 "engines/sci/engine/savegame.cfsml"
}
SongIterator *build_iterator(EngineState *s, int song_nr, int type, songit_id_t id);
@@ -4063,7 +4061,7 @@ int read_song_tp(Common::SeekableReadStream *fh, song_t **foo, const char *lastv
}
}
// End of auto-generated CFSML data reader code
-#line 442 "engines/sci/engine/savegame.cfsml"
+#line 440 "engines/sci/engine/savegame.cfsml"
(*foo)->_delay = 0;
(*foo)->it = NULL;
(*foo)->next_playing = (*foo)->next_stopping = (*foo)->next = NULL;
@@ -4076,7 +4074,7 @@ void write_IntMapperPtr(Common::WriteStream *fh, const IntMapper * const *foo) {
_cfsml_write_IntMapper(fh, *foo);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 450 "engines/sci/engine/savegame.cfsml"
+#line 448 "engines/sci/engine/savegame.cfsml"
}
int read_IntMapperPtr(Common::SeekableReadStream *fh, IntMapper **foo, const char *lastval, int *line, int *hiteof) {
@@ -4105,7 +4103,7 @@ int read_IntMapperPtr(Common::SeekableReadStream *fh, IntMapper **foo, const cha
}
}
// End of auto-generated CFSML data reader code
-#line 455 "engines/sci/engine/savegame.cfsml"
+#line 453 "engines/sci/engine/savegame.cfsml"
(*foo)->holes = NULL;
return 0;
}
@@ -4121,7 +4119,7 @@ void write_IntMapperNodePtr(Common::WriteStream *fh, const IntMapper::Node * con
write_IntMapperNodePtr(fh, &((*foo)->next));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 466 "engines/sci/engine/savegame.cfsml"
+#line 464 "engines/sci/engine/savegame.cfsml"
} else
WSprintf(fh, "L");
WSprintf(fh, "]");
@@ -4169,7 +4167,7 @@ void write_menubar_tp(Common::WriteStream *fh, const menubar_t * const *foo) {
_cfsml_write_menubar_t(fh, (*foo));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 509 "engines/sci/engine/savegame.cfsml"
+#line 507 "engines/sci/engine/savegame.cfsml"
} else { // Nothing to write
WSprintf(fh, "\\null\\");
}
@@ -4205,7 +4203,7 @@ int read_menubar_tp(Common::SeekableReadStream *fh, menubar_t **foo, const char
}
}
// End of auto-generated CFSML data reader code
-#line 521 "engines/sci/engine/savegame.cfsml"
+#line 519 "engines/sci/engine/savegame.cfsml"
}
return *hiteof;
}
@@ -4245,7 +4243,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_int(fh, &foo->segmgr_id);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 556 "engines/sci/engine/savegame.cfsml"
+#line 554 "engines/sci/engine/savegame.cfsml"
switch (foo->type) {
case MEM_OBJ_SCRIPT:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4253,7 +4251,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_Script(fh, &foo->data.script);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 559 "engines/sci/engine/savegame.cfsml"
+#line 557 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_CLONES:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4261,7 +4259,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_CloneTable(fh, &foo->data.clones);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 562 "engines/sci/engine/savegame.cfsml"
+#line 560 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_LOCALS:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4269,7 +4267,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_LocalVariables(fh, &foo->data.locals);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 565 "engines/sci/engine/savegame.cfsml"
+#line 563 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_SYS_STRINGS:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4277,7 +4275,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_SystemStrings(fh, &foo->data.sys_strings);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 568 "engines/sci/engine/savegame.cfsml"
+#line 566 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_STACK:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4285,7 +4283,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_int(fh, &foo->data.stack.nr);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 571 "engines/sci/engine/savegame.cfsml"
+#line 569 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_HUNK:
break;
@@ -4297,7 +4295,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_ListTable(fh, &foo->data.lists);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 578 "engines/sci/engine/savegame.cfsml"
+#line 576 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_NODES:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4305,7 +4303,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_NodeTable(fh, &foo->data.nodes);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 581 "engines/sci/engine/savegame.cfsml"
+#line 579 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_DYNMEM:
#line 822 "engines/sci/engine/savegame.cfsml"
@@ -4313,7 +4311,7 @@ void write_MemObject(Common::WriteStream *fh, MemObject const *foo) {
_cfsml_write_DynMem(fh, &foo->data.dynmem);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 584 "engines/sci/engine/savegame.cfsml"
+#line 582 "engines/sci/engine/savegame.cfsml"
break;
default:
break;
@@ -4353,7 +4351,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 598 "engines/sci/engine/savegame.cfsml"
+#line 596 "engines/sci/engine/savegame.cfsml"
switch (foo->type) {
case MEM_OBJ_SCRIPT:
// Auto-generated CFSML data reader code
@@ -4382,7 +4380,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 601 "engines/sci/engine/savegame.cfsml"
+#line 599 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_CLONES:
// Auto-generated CFSML data reader code
@@ -4411,7 +4409,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 604 "engines/sci/engine/savegame.cfsml"
+#line 602 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_LOCALS:
// Auto-generated CFSML data reader code
@@ -4440,7 +4438,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 607 "engines/sci/engine/savegame.cfsml"
+#line 605 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_SYS_STRINGS:
// Auto-generated CFSML data reader code
@@ -4469,7 +4467,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 610 "engines/sci/engine/savegame.cfsml"
+#line 608 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_LISTS:
// Auto-generated CFSML data reader code
@@ -4498,7 +4496,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 613 "engines/sci/engine/savegame.cfsml"
+#line 611 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_NODES:
// Auto-generated CFSML data reader code
@@ -4527,7 +4525,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 616 "engines/sci/engine/savegame.cfsml"
+#line 614 "engines/sci/engine/savegame.cfsml"
break;
case MEM_OBJ_STACK:
// Auto-generated CFSML data reader code
@@ -4556,7 +4554,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 619 "engines/sci/engine/savegame.cfsml"
+#line 617 "engines/sci/engine/savegame.cfsml"
foo->data.stack.entries = (reg_t *)sci_calloc(foo->data.stack.nr, sizeof(reg_t));
break;
case MEM_OBJ_HUNK:
@@ -4591,7 +4589,7 @@ int read_MemObject(Common::SeekableReadStream *fh, MemObject *foo, const char *l
}
}
// End of auto-generated CFSML data reader code
-#line 628 "engines/sci/engine/savegame.cfsml"
+#line 626 "engines/sci/engine/savegame.cfsml"
break;
default:
break;
@@ -4607,7 +4605,7 @@ void write_MemObjPtr(Common::WriteStream *fh, const MemObject * const *foo) {
write_MemObject(fh, (*foo));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 639 "engines/sci/engine/savegame.cfsml"
+#line 637 "engines/sci/engine/savegame.cfsml"
} else { // Nothing to write
WSprintf(fh, "\\null\\");
}
@@ -4642,7 +4640,7 @@ int read_MemObjPtr(Common::SeekableReadStream *fh, MemObject **foo, const char *
}
}
// End of auto-generated CFSML data reader code
-#line 650 "engines/sci/engine/savegame.cfsml"
+#line 648 "engines/sci/engine/savegame.cfsml"
return *hiteof;
}
return 0;
@@ -4656,7 +4654,7 @@ void write_CommonString(Common::WriteStream *fh, Common::String const *string)
_cfsml_write_string(fh, (&t));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 659 "engines/sci/engine/savegame.cfsml"
+#line 657 "engines/sci/engine/savegame.cfsml"
}
int read_CommonString(Common::SeekableReadStream *fh, Common::String *string, const char *lastval, int *line, int *hiteof)
@@ -4691,7 +4689,7 @@ int read_CommonString(Common::SeekableReadStream *fh, Common::String *string, co
}
}
// End of auto-generated CFSML data reader code
-#line 666 "engines/sci/engine/savegame.cfsml"
+#line 664 "engines/sci/engine/savegame.cfsml"
if (*hiteof) return *hiteof;
*string = t;
free(t);
@@ -4704,13 +4702,13 @@ void write_SegManagerPtr(Common::WriteStream *fh, const SegManager * const *foo)
_cfsml_write_bool(fh, &((*foo)->isSci1_1));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 674 "engines/sci/engine/savegame.cfsml"
+#line 672 "engines/sci/engine/savegame.cfsml"
#line 822 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_SegManager(fh, *foo);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 675 "engines/sci/engine/savegame.cfsml"
+#line 673 "engines/sci/engine/savegame.cfsml"
}
int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const char *lastval, int *line, int *hiteof) {
@@ -4741,7 +4739,7 @@ int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const c
}
}
// End of auto-generated CFSML data reader code
-#line 682 "engines/sci/engine/savegame.cfsml"
+#line 680 "engines/sci/engine/savegame.cfsml"
*foo = new SegManager(sci11);
token = _cfsml_get_identifier(fh, line, hiteof, &assignment);
// Auto-generated CFSML data reader code
@@ -4768,16 +4766,10 @@ int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const c
}
}
// End of auto-generated CFSML data reader code
-#line 685 "engines/sci/engine/savegame.cfsml"
+#line 683 "engines/sci/engine/savegame.cfsml"
return 0;
}
-// This function is called to undo some strange stuff done in preparation
-// to writing a gamestate to disk
-void _gamestate_unfrob(EngineState *s) {
-}
-
-
int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename) {
tm curTime;
g_system->getTimeAndDate(curTime);
@@ -4817,15 +4809,13 @@ int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename
_cfsml_write_SavegameMetadata(fh, (&meta));
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 729 "engines/sci/engine/savegame.cfsml"
+#line 721 "engines/sci/engine/savegame.cfsml"
#line 822 "engines/sci/engine/savegame.cfsml"
// Auto-generated CFSML data writer code
_cfsml_write_EngineState(fh, s);
WSprintf(fh, "\n");
// End of auto-generated CFSML data writer code
-#line 730 "engines/sci/engine/savegame.cfsml"
-
- _gamestate_unfrob(s);
+#line 722 "engines/sci/engine/savegame.cfsml"
return 0;
}
@@ -5130,7 +5120,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
}
}
// End of auto-generated CFSML data reader code
-#line 1005 "engines/sci/engine/savegame.cfsml"
+#line 995 "engines/sci/engine/savegame.cfsml"
if (read_eof)
return false;
@@ -5186,10 +5176,9 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
}
}
// End of auto-generated CFSML data reader code
-#line 1029 "engines/sci/engine/savegame.cfsml"
+#line 1019 "engines/sci/engine/savegame.cfsml"
sfx_exit(&s->sound);
- _gamestate_unfrob(retval);
// Set exec stack base to zero
retval->execution_stack_base = 0;
@@ -5324,7 +5313,7 @@ bool get_savegame_metadata(Common::SeekableReadStream* stream, SavegameMetadata*
}
}
// End of auto-generated CFSML data reader code
-#line 1135 "engines/sci/engine/savegame.cfsml"
+#line 1124 "engines/sci/engine/savegame.cfsml"
if (read_eof)
return false;