diff options
author | Vincent Hamm | 2002-03-25 18:17:40 +0000 |
---|---|---|
committer | Vincent Hamm | 2002-03-25 18:17:40 +0000 |
commit | 13bf453232d27ad2cde9ce25ebeb14c2665a9385 (patch) | |
tree | 4f136d425534a6773a3f8c4bb51ea6b1f83fbc41 | |
parent | 8d08bdd5dc4cf3c0986cb51462fe03e3528343fe (diff) | |
download | scummvm-rg350-13bf453232d27ad2cde9ce25ebeb14c2665a9385.tar.gz scummvm-rg350-13bf453232d27ad2cde9ce25ebeb14c2665a9385.tar.bz2 scummvm-rg350-13bf453232d27ad2cde9ce25ebeb14c2665a9385.zip |
Forced colors for V7 gui...(temporary hack). Now the gui colors are reseted every time it's opened
svn-id: r3832
-rw-r--r-- | gui.cpp | 19 | ||||
-rw-r--r-- | gui.h | 10 | ||||
-rw-r--r-- | scummvm.cpp | 8 | ||||
-rw-r--r-- | sdl.cpp | 6 |
4 files changed, 24 insertions, 19 deletions
@@ -630,7 +630,7 @@ void Gui::handleCommand(int cmd) { close(); return; case 9: /* options button */ - options(); + options(_s); draw(0, 100); return; default: @@ -772,7 +772,7 @@ byte Gui::getDefaultColor(int color) { void Gui::init(Scumm *s) { _s = s; - if (_s->_gameId && !(_s->_features & GF_SMALL_HEADER)) { + if (_s->_gameId && !(_s->_features & GF_SMALL_HEADER) && !(_s->_features & GF_AFTER_V7)) { _bgcolor = getDefaultColor(0); _color = getDefaultColor(1); _textcolor = getDefaultColor(2); @@ -787,7 +787,8 @@ void Gui::init(Scumm *s) { } } -void Gui::loop() { +void Gui::loop(Scumm *s) { + init(s); if (_active==1) { _active++; draw(0,200); // was 100 @@ -837,7 +838,8 @@ void Gui::close() { #endif } -void Gui::saveLoadDialog() { +void Gui::saveLoadDialog(Scumm *s) { + init(s); _widgets[0] = save_load_dialog; _editString = -1; _cur_page = 0; @@ -845,21 +847,24 @@ void Gui::saveLoadDialog() { _dialog = SAVELOAD_DIALOG; } -void Gui::pause() { +void Gui::pause(Scumm *s) { + init(s); _widgets[0] = pause_dialog; _cur_page = 0; _active = true; _dialog = PAUSE_DIALOG; } -void Gui::options() { +void Gui::options(Scumm *s) { + init(s); _widgets[0] = options_dialog; _active = true; _cur_page = 0; _dialog = OPTIONS_DIALOG; } -void Gui::launcher() { +void Gui::launcher(Scumm *s) { + init(s); _widgets[0] = launcher_dialog; _active = true; _cur_page = 0; @@ -113,7 +113,7 @@ struct Gui { int _editLen; bool valid_games[9]; char game_names[9][SAVEGAME_NAME_LEN]; - void loop(); + void loop(Scumm *s); void init(Scumm *s); void draw(int start, int end); void draw(int item) { draw(item,-1); } @@ -140,10 +140,10 @@ struct Gui { byte getDefaultColor(int color); // Dialogs - void saveLoadDialog(); - void pause(); - void options(); - void launcher(); + void saveLoadDialog(Scumm *s); + void pause(Scumm *s); + void options(Scumm *s); + void launcher(Scumm *s); void handleSoundDialogCommand(int cmd); void handleOptionsDialogCommand(int cmd); diff --git a/scummvm.cpp b/scummvm.cpp index 235dae4c17..f2d8cbbc22 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -734,11 +734,11 @@ void Scumm::unkRoomFunc4(int a, int b, int c, int d, int e) { } void Scumm::pauseGame(bool user) { - ((Gui*)_gui)->pause(); + ((Gui*)_gui)->pause(this); } void Scumm::setOptions() { - ((Gui*)_gui)->options(); + ((Gui*)_gui)->options(this); } void Scumm::shutDown(int i) { @@ -758,7 +758,7 @@ void Scumm::processKbd() { _virtual_mouse_y-=16; if (_virtual_mouse_y < 0) - _virtual_mouse_y = -1; + _virtual_mouse_y =-1; if (_features & GF_OLD256) { if (_virtual_mouse_y >= virtscr[0].height + virtscr[0].topline) _virtual_mouse_y = -1; @@ -795,7 +795,7 @@ void Scumm::processKbd() { } else if (_lastKeyHit==_vars[VAR_SAVELOADDIALOG_KEY] && _currentRoom != 0) { if ( _features & GF_AFTER_V7) runScript(_vars[VAR_UNK_SCRIPT],0,0,0); - ((Gui*)_gui)->saveLoadDialog(); + ((Gui*)_gui)->saveLoadDialog(this); if ( _features & GF_AFTER_V7) runScript(_vars[VAR_UNK_SCRIPT_2],0,0,0); } else if (_lastKeyHit==_vars[VAR_TALKSTOP_KEY]) { @@ -866,7 +866,7 @@ void launcherLoop() { int delta = 0; last_time = SDL_GetTicks(); - gui.launcher(); + gui.launcher(scumm); do { updateScreen(scumm); @@ -875,7 +875,7 @@ void launcherLoop() { last_time = SDL_GetTicks(); if (gui._active) { - gui.loop(); + gui.loop(scumm); delta = 5; } else error("gui closed!"); @@ -2003,7 +2003,7 @@ int OSystem::waitTick(int delta) waitForTimer(scumm, delta * 15 + last_time - new_time); last_time = SDL_GetTicks(); if (gui._active) { - gui.loop(); + gui.loop(scumm); delta = 5; } }while(gui._active); |