From 4c95478ccb9b7d4dd6ad3aa6a1af432907fefefa Mon Sep 17 00:00:00 2001 From: Ludvig Strigeus Date: Mon, 15 Apr 2002 17:16:10 +0000 Subject: [PATCH] fixed colors in gui svn-id: r3944 --- gui.cpp | 21 ++++++++------------- gui.h | 10 +++++----- scummvm.cpp | 8 ++++---- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/gui.cpp b/gui.cpp index 93b93e34646..a31333d2e69 100644 --- a/gui.cpp +++ b/gui.cpp @@ -675,7 +675,7 @@ void Gui::handleCommand(int cmd) close(); return; case 9: /* options button */ - options(_s); + options(); draw(0, 100); return; default: @@ -822,14 +822,13 @@ void Gui::init(Scumm *s) _s = s; } -void Gui::loop(Scumm *s) +void Gui::loop() { - init(s); if (_active == 1) { _active++; draw(0, 200); // was 100 - _old_cursor_mode = s->_system->show_mouse(true); - s->pauseSounds(true); + _old_cursor_mode = _s->_system->show_mouse(true); + _s->pauseSounds(true); } _s->getKeyInput(0); @@ -876,9 +875,8 @@ void Gui::close() #endif } -void Gui::saveLoadDialog(Scumm *s) +void Gui::saveLoadDialog() { - init(s); _widgets[0] = save_load_dialog; _editString = -1; _cur_page = 0; @@ -886,27 +884,24 @@ void Gui::saveLoadDialog(Scumm *s) _dialog = SAVELOAD_DIALOG; } -void Gui::pause(Scumm *s) +void Gui::pause() { - init(s); _widgets[0] = pause_dialog; _cur_page = 0; _active = true; _dialog = PAUSE_DIALOG; } -void Gui::options(Scumm *s) +void Gui::options() { - init(s); _widgets[0] = options_dialog; _active = true; _cur_page = 0; _dialog = OPTIONS_DIALOG; } -void Gui::launcher(Scumm *s) +void Gui::launcher() { - init(s); _widgets[0] = launcher_dialog; _active = true; _cur_page = 0; diff --git a/gui.h b/gui.h index bbd964c7db4..8dcf0e5b5eb 100644 --- a/gui.h +++ b/gui.h @@ -88,7 +88,7 @@ public: int _editLen; bool valid_games[9]; char game_names[9][SAVEGAME_NAME_LEN]; - void loop(Scumm *s); + void loop(); void init(Scumm *s); void draw(int start, int end); void draw(int item) { draw(item,-1); } @@ -115,10 +115,10 @@ public: byte getDefaultColor(int color); // Dialogs - void saveLoadDialog(Scumm *s); - void pause(Scumm *s); - void options(Scumm *s); - void launcher(Scumm *s); + void saveLoadDialog(); + void pause(); + void options(); + void launcher(); void handleSoundDialogCommand(int cmd); void handleOptionsDialogCommand(int cmd); diff --git a/scummvm.cpp b/scummvm.cpp index 308824b24c8..549ef2e85d9 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -768,12 +768,12 @@ void Scumm::unkRoomFunc4(int a, int b, int c, int d, int e) void Scumm::pauseGame(bool user) { - ((Gui *)_gui)->pause(this); + ((Gui *)_gui)->pause(); } void Scumm::setOptions() { - ((Gui *)_gui)->options(this); + ((Gui *)_gui)->options(); } void Scumm::shutDown(int i) @@ -833,7 +833,7 @@ void Scumm::processKbd() && _currentRoom != 0) { if (_features & GF_AFTER_V7) runScript(_vars[VAR_UNK_SCRIPT], 0, 0, 0); - ((Gui *)_gui)->saveLoadDialog(this); + ((Gui *)_gui)->saveLoadDialog(); if (_features & GF_AFTER_V7) runScript(_vars[VAR_UNK_SCRIPT_2], 0, 0, 0); } else if (_lastKeyHit == _vars[VAR_TALKSTOP_KEY]) { @@ -1193,7 +1193,7 @@ void Scumm::mainRun() waitForTimer(delta * 15 + last_time - new_time); last_time = _system->get_msecs(); if (_gui->_active) { - _gui->loop(this); + _gui->loop(); delta = 5; } else { delta = scummLoop(delta);