aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2009-11-04 15:32:25 +0000
committerFilippos Karapetis2009-11-04 15:32:25 +0000
commit5daca46946a57b668dd85c8d5805e41380db22a9 (patch)
treef64120be587e5a6ffec4516a886b9b7962b9e075 /engines/sci
parent2aeb892e0626b91de6aeee4289f8117c1608a3f2 (diff)
downloadscummvm-rg350-5daca46946a57b668dd85c8d5805e41380db22a9.tar.gz
scummvm-rg350-5daca46946a57b668dd85c8d5805e41380db22a9.tar.bz2
scummvm-rg350-5daca46946a57b668dd85c8d5805e41380db22a9.zip
Removed unused variables and placed some more old code inside INCLUDE_OLDGFX defines
svn-id: r45668
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/game.cpp8
-rw-r--r--engines/sci/engine/savegame.cpp2
-rw-r--r--engines/sci/engine/state.cpp2
-rw-r--r--engines/sci/engine/state.h5
-rw-r--r--engines/sci/gui32/gui32.cpp4
5 files changed, 4 insertions, 17 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 6802888a3f..9e782decc2 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -277,20 +277,17 @@ int game_init_graphics(EngineState *s) {
return _reset_graphics_input(s);
}
-#endif
-
static void _free_graphics_input(EngineState *s) {
debug(2, "Freeing graphics");
-#ifdef INCLUDE_OLDGFX
delete s->visual;
s->wm_port = s->titlebar_port = s->picture_port = NULL;
s->visual = NULL;
s->dyn_views = NULL;
s->port = NULL;
-#endif
}
+#endif
int game_init_sound(EngineState *s, int sound_flags) {
if (getSciVersion() > SCI_VERSION_0_LATE)
@@ -391,7 +388,6 @@ int game_init(EngineState *s) {
#endif
s->successor = NULL; // No successor
- s->_statusBarText.clear(); // Status bar is blank
SystemString *str = &s->sys_strings->_strings[SYS_STRING_PARSER_BASE];
str->_name = "parser-base";
@@ -445,7 +441,9 @@ int game_exit(EngineState *s) {
delete s->_menubar;
+#ifdef INCLUDE_OLDGFX
_free_graphics_input(s);
+#endif
// Close all opened file handles
s->_fileHandles.clear();
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 6f3aee8539..42ef3f8e43 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -738,8 +738,6 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
// Copy some old data
retval->gfx_state = s->gfx_state;
- retval->sound_mute = s->sound_mute;
- retval->sound_volume = s->sound_volume;
retval->saveLoadWithSerializer(ser); // FIXME: Error handling?
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 7336bc71d6..927fa672de 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -38,8 +38,6 @@ EngineState::EngineState(ResourceManager *res, Kernel *kernel, Vocabulary *voc,
gfx_state = 0;
sfx_init_flags = 0;
- sound_volume = 0;
- sound_mute = 0;
restarting_flags = 0;
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index e368953aea..039b65a5b2 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -138,14 +138,9 @@ public:
AudioPlayer *_audio;
SfxState _sound; /**< sound subsystem */
int sfx_init_flags; /**< flags the sfx subsystem was initialised with */
- unsigned int sound_volume; /**< 0x0 -> 0xf Current volume of sound system */
- unsigned int sound_mute; /**< 0 = not, else == saved value */
byte restarting_flags; /**< Flags used for restarting */
- /** Text on the status bar, or NULL if the title bar is blank */
- Common::String _statusBarText;
-
#ifdef INCLUDE_OLDGFX
int *pic_priority_table; /**< 16 entries with priorities or NULL if not present */
byte pic_not_valid; /**< Is 0 if the background picture is "valid" */
diff --git a/engines/sci/gui32/gui32.cpp b/engines/sci/gui32/gui32.cpp
index 892f66932b..b93d6c1449 100644
--- a/engines/sci/gui32/gui32.cpp
+++ b/engines/sci/gui32/gui32.cpp
@@ -822,9 +822,7 @@ void SciGui32::drawStatus(const char *text, int16 colorPen, int16 colorBack) {
_s->titlebar_port->_bgcolor.visual = get_pic_color(_s, colorBack);
_s->titlebar_port->_bgcolor.mask = GFX_MASK_VISUAL;
- _s->_statusBarText = text;
-
- sciw_set_status_bar(_s, _s->titlebar_port, _s->_statusBarText, colorPen, colorBack);
+ sciw_set_status_bar(_s, _s->titlebar_port, text, colorPen, colorBack);
gfxop_update(_s->gfx_state);
}