aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/console.cpp24
-rw-r--r--engines/sci/console.h1
-rw-r--r--engines/sci/engine/game.cpp2
-rw-r--r--engines/sci/engine/kmenu.cpp21
-rw-r--r--engines/sci/engine/savegame.cpp4
-rw-r--r--engines/sci/engine/state.cpp3
-rw-r--r--engines/sci/engine/state.h2
-rw-r--r--engines/sci/gui/gui.cpp3
-rw-r--r--engines/sci/gui32/gui32.cpp2
9 files changed, 11 insertions, 51 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index d782ddb22d..e81b1a4120 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -124,7 +124,6 @@ Console::Console(SciEngine *vm) : GUI::Debugger() {
DCmd_Register("flush_visual", WRAP_METHOD(Console, cmdFlushPorts));
DCmd_Register("dynamic_views", WRAP_METHOD(Console, cmdDynamicViews));
DCmd_Register("dropped_views", WRAP_METHOD(Console, cmdDroppedViews));
- DCmd_Register("status_bar", WRAP_METHOD(Console, cmdStatusBarColors));
#ifdef GFXW_DEBUG_WIDGETS
DCmd_Register("print_widget", WRAP_METHOD(Console, cmdPrintWidget));
#endif
@@ -329,7 +328,6 @@ bool Console::cmdHelp(int argc, const char **argv) {
DebugPrintf(" flush_visual - Flushes dynamically allocated ports (for memory profiling)\n");
DebugPrintf(" dynamic_views - Lists active dynamic views\n");
DebugPrintf(" dropped_views - Lists dropped dynamic views\n");
- DebugPrintf(" status_bar - Sets the colors of the status bar\n");
#ifdef GFXW_DEBUG_WIDGETS
DebugPrintf(" print_widget - Shows active widgets (no params) or information on the specified widget indices\n");
#endif
@@ -1335,28 +1333,6 @@ bool Console::cmdPriorityBands(int argc, const char **argv) {
return true;
}
-bool Console::cmdStatusBarColors(int argc, const char **argv) {
- if (argc != 3) {
- DebugPrintf("Sets the colors of the status bar\n");
- DebugPrintf("Usage: %s <foreground color> <background color>\n", argv[0]);
- return true;
- }
-
-#ifdef INCLUDE_OLDGFX
- _vm->_gamestate->titlebar_port->_color = _vm->_gamestate->ega_colors[atoi(argv[1])];
- _vm->_gamestate->titlebar_port->_bgcolor = _vm->_gamestate->ega_colors[atoi(argv[2])];
-
- _vm->_gamestate->status_bar_foreground = atoi(argv[1]);
- _vm->_gamestate->status_bar_background = atoi(argv[2]);
-
- sciw_set_status_bar(_vm->_gamestate, _vm->_gamestate->titlebar_port, _vm->_gamestate->_statusBarText,
- _vm->_gamestate->status_bar_foreground, _vm->_gamestate->status_bar_background);
- gfxop_update(_vm->_gamestate->gfx_state);
-#endif
-
- return false;
-}
-
bool Console::cmdPrintSegmentTable(int argc, const char **argv) {
DebugPrintf("Segment table:\n");
diff --git a/engines/sci/console.h b/engines/sci/console.h
index 63feb3bef6..6aa1027fa2 100644
--- a/engines/sci/console.h
+++ b/engines/sci/console.h
@@ -102,7 +102,6 @@ private:
bool cmdFlushPorts(int argc, const char **argv);
bool cmdDynamicViews(int argc, const char **argv);
bool cmdDroppedViews(int argc, const char **argv);
- bool cmdStatusBarColors(int argc, const char **argv);
bool cmdPrintWidget(int argc, const char **argv);
// Segments
bool cmdPrintSegmentTable(int argc, const char **argv);
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index d6b9af8a90..8ec2026997 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -413,8 +413,6 @@ int game_init(EngineState *s) {
s->successor = NULL; // No successor
s->_statusBarText.clear(); // Status bar is blank
- s->status_bar_foreground = 0;
- s->status_bar_background = !s->resMan->isVGA() ? 15 : 255;
SystemString *str = &s->sys_strings->_strings[SYS_STRING_PARSER_BASE];
str->_name = "parser-base";
diff --git a/engines/sci/engine/kmenu.cpp b/engines/sci/engine/kmenu.cpp
index 6358bc4143..bfad83cf0a 100644
--- a/engines/sci/engine/kmenu.cpp
+++ b/engines/sci/engine/kmenu.cpp
@@ -79,8 +79,8 @@ reg_t kGetMenu(EngineState *s, int argc, reg_t *argv) {
reg_t kDrawStatus(EngineState *s, int argc, reg_t *argv) {
reg_t textReference = argv[0];
Common::String text;
- int16 colorPen = (argc > 1) ? argv[1].toSint16() : 0; // old code was: s->status_bar_foreground;
- int16 colorBack = (argc > 2) ? argv[2].toSint16() : s->resMan->isVGA() ? 255 : 15; // s->status_bar_background;
+ int16 colorPen = (argc > 1) ? argv[1].toSint16() : 0;
+ int16 colorBack = (argc > 2) ? argv[2].toSint16() : s->resMan->isVGA() ? 255 : 15;
if (!textReference.isNull()) {
// Sometimes this is called without giving text, if thats the case dont process it
@@ -215,9 +215,10 @@ reg_t kMenuSelect(EngineState *s, int argc, reg_t *argv) {
#ifdef INCLUDE_OLDGFX
sciw_set_menubar(s, s->titlebar_port, s->_menubar, menu_nr);
- FULL_REDRAW;
#endif
+ FULL_REDRAW;
+
old_item = -1;
old_menu = -1;
@@ -234,13 +235,6 @@ reg_t kMenuSelect(EngineState *s, int argc, reg_t *argv) {
case SCI_EVT_KEYBOARD:
switch (ev.data) {
- case '`':
-#ifdef INCLUDE_OLDGFX
- if (ev.buckybits & SCI_EVM_CTRL)
- s->visual->print(0);
-#endif
- break;
-
case SCI_K_ESC:
menu_mode = 0;
break;
@@ -338,15 +332,16 @@ reg_t kMenuSelect(EngineState *s, int argc, reg_t *argv) {
} /* while (menu_mode) */
+ // Clear the menu
#ifdef INCLUDE_OLDGFX
if (port) {
delete port;
port = NULL;
-
- sciw_set_status_bar(s, s->titlebar_port, s->_statusBarText, s->status_bar_foreground, s->status_bar_background);
- gfxop_update(s->gfx_state);
}
#endif
+
+ s->_gui->clearMenuBar();
+
FULL_REDRAW;
}
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 55af6791b3..5795299570 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -305,8 +305,8 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) {
assert(_menubar);
_menubar->saveLoadWithSerializer(s);
- s.syncAsSint32LE(status_bar_foreground);
- s.syncAsSint32LE(status_bar_background);
+ s.skip(4, VER(12), VER(12)); // obsolete: used to be status_bar_foreground
+ s.skip(4, VER(12), VER(12)); // obsolete: used to be status_bar_background
sync_SegManagerPtr(s, resMan, _segMan);
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index e362a14e6b..35d38e565e 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -43,9 +43,6 @@ EngineState::EngineState(ResourceManager *res, Kernel *kernel, Vocabulary *voc,
restarting_flags = 0;
- status_bar_foreground = 0;
- status_bar_background = 0;
-
#ifdef INCLUDE_OLDGFX
pic_priority_table = 0;
pic_not_valid = 0;
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 638342131c..715c74660a 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -145,8 +145,6 @@ public:
/** Text on the status bar, or NULL if the title bar is blank */
Common::String _statusBarText;
- int status_bar_foreground, status_bar_background;
-
#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/gui/gui.cpp b/engines/sci/gui/gui.cpp
index 6da8e53cb8..fa73d3510a 100644
--- a/engines/sci/gui/gui.cpp
+++ b/engines/sci/gui/gui.cpp
@@ -301,8 +301,7 @@ void SciGui::drawMenuBar() {
}
void SciGui::clearMenuBar() {
- // TODO: Implement menubar
- warning("TODO: clearMenuBar()");
+ drawStatus("", 0, 0);
}
void SciGui::drawPicture(GuiResourceId pictureId, int16 animationNr, bool animationBlackoutFlag, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo) {
diff --git a/engines/sci/gui32/gui32.cpp b/engines/sci/gui32/gui32.cpp
index f85917b083..46d3df98cb 100644
--- a/engines/sci/gui32/gui32.cpp
+++ b/engines/sci/gui32/gui32.cpp
@@ -805,8 +805,6 @@ 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->status_bar_foreground = colorPen;
- _s->status_bar_background = colorBack;
_s->_statusBarText = text;
sciw_set_status_bar(_s, _s->titlebar_port, _s->_statusBarText, colorPen, colorBack);