[Scummvm-cvs-logs] CVS: scummvm gui.cpp,1.23,1.24 gui.h,1.11,1.12 scummvm.cpp,1.99,1.100 sdl.cpp,1.67,1.68

Vincent Hamm yazoo at users.sourceforge.net
Mon Mar 25 10:18:17 CET 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv11142

Modified Files:
	gui.cpp gui.h scummvm.cpp sdl.cpp 
Log Message:
Forced colors for V7 gui...(temporary hack). Now the gui colors are reseted every time it's opened

Index: gui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** gui.cpp	24 Mar 2002 17:49:46 -0000	1.23
--- gui.cpp	25 Mar 2002 18:17:40 -0000	1.24
***************
*** 631,635 ****
  		return;
  	case 9: /* options button */
! 		options();
  		draw(0, 100);
  		return;
--- 631,635 ----
  		return;
  	case 9: /* options button */
! 		options(_s);
  		draw(0, 100);
  		return;
***************
*** 773,777 ****
  void Gui::init(Scumm *s) {
  	_s = s;
! 	if (_s->_gameId && !(_s->_features & GF_SMALL_HEADER)) {
  		_bgcolor =  getDefaultColor(0);
  		_color = getDefaultColor(1);
--- 773,777 ----
  void Gui::init(Scumm *s) {
  	_s = s;
! 	if (_s->_gameId && !(_s->_features & GF_SMALL_HEADER) && !(_s->_features & GF_AFTER_V7)) {
  		_bgcolor =  getDefaultColor(0);
  		_color = getDefaultColor(1);
***************
*** 788,792 ****
  }
  
! void Gui::loop() {
  	if (_active==1) {
  		_active++;
--- 788,793 ----
  }
  
! void Gui::loop(Scumm *s) {
! 	init(s);
  	if (_active==1) {
  		_active++;
***************
*** 838,842 ****
  }
  
! void Gui::saveLoadDialog() {
  	_widgets[0] = save_load_dialog;
  	_editString = -1;
--- 839,844 ----
  }
  
! void Gui::saveLoadDialog(Scumm *s) {
! 	init(s);
  	_widgets[0] = save_load_dialog;
  	_editString = -1;
***************
*** 846,850 ****
  }
  
! void Gui::pause() {
  	_widgets[0] = pause_dialog;
  	_cur_page = 0;
--- 848,853 ----
  }
  
! void Gui::pause(Scumm *s) {
! 	init(s);
  	_widgets[0] = pause_dialog;
  	_cur_page = 0;
***************
*** 853,857 ****
  }
  
! void Gui::options() {
  	_widgets[0] = options_dialog;
  	_active = true;
--- 856,861 ----
  }
  
! void Gui::options(Scumm *s) {
! 	init(s);
  	_widgets[0] = options_dialog;
  	_active = true;
***************
*** 860,864 ****
  }
  
! void Gui::launcher() {
  	_widgets[0] = launcher_dialog;
  	_active = true;
--- 864,869 ----
  }
  
! void Gui::launcher(Scumm *s) {
! 	init(s);
  	_widgets[0] = launcher_dialog;
  	_active = true;

Index: gui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** gui.h	16 Mar 2002 18:03:28 -0000	1.11
--- gui.h	25 Mar 2002 18:17:40 -0000	1.12
***************
*** 114,118 ****
  	bool valid_games[9];
  	char game_names[9][SAVEGAME_NAME_LEN];
! 	void loop();
  	void init(Scumm *s);
  	void draw(int start, int end);
--- 114,118 ----
  	bool valid_games[9];
  	char game_names[9][SAVEGAME_NAME_LEN];
! 	void loop(Scumm *s);
  	void init(Scumm *s);
  	void draw(int start, int end);
***************
*** 141,148 ****
  
  	// Dialogs
! 	void saveLoadDialog();
! 	void pause();
! 	void options();
! 	void launcher();
  
  	void handleSoundDialogCommand(int cmd);
--- 141,148 ----
  
  	// Dialogs
! 	void saveLoadDialog(Scumm *s);
! 	void pause(Scumm *s);
! 	void options(Scumm *s);
! 	void launcher(Scumm *s);
  
  	void handleSoundDialogCommand(int cmd);

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.99
retrieving revision 1.100
diff -C2 -d -r1.99 -r1.100
*** scummvm.cpp	25 Mar 2002 17:45:55 -0000	1.99
--- scummvm.cpp	25 Mar 2002 18:17:40 -0000	1.100
***************
*** 735,743 ****
  
  void Scumm::pauseGame(bool user) {
! 	((Gui*)_gui)->pause();
  }
  
  void Scumm::setOptions() {
! 	((Gui*)_gui)->options();
  }
  
--- 735,743 ----
  
  void Scumm::pauseGame(bool user) {
! 	((Gui*)_gui)->pause(this);
  }
  
  void Scumm::setOptions() {
! 	((Gui*)_gui)->options(this);
  }
  
***************
*** 759,763 ****
  	
  	if (_virtual_mouse_y < 0)
! 		_virtual_mouse_y = -1;
  	if (_features & GF_OLD256) {
  		if (_virtual_mouse_y >= virtscr[0].height + virtscr[0].topline)
--- 759,763 ----
  	
  	if (_virtual_mouse_y < 0)
! 		_virtual_mouse_y =-1;
  	if (_features & GF_OLD256) {
  		if (_virtual_mouse_y >= virtscr[0].height + virtscr[0].topline)
***************
*** 796,800 ****
  		if ( _features & GF_AFTER_V7)
  			runScript(_vars[VAR_UNK_SCRIPT],0,0,0);
! 		((Gui*)_gui)->saveLoadDialog();
  		if ( _features & GF_AFTER_V7)
  			runScript(_vars[VAR_UNK_SCRIPT_2],0,0,0);
--- 796,800 ----
  		if ( _features & GF_AFTER_V7)
  			runScript(_vars[VAR_UNK_SCRIPT],0,0,0);
! 		((Gui*)_gui)->saveLoadDialog(this);
  		if ( _features & GF_AFTER_V7)
  			runScript(_vars[VAR_UNK_SCRIPT_2],0,0,0);

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** sdl.cpp	25 Mar 2002 17:45:55 -0000	1.67
--- sdl.cpp	25 Mar 2002 18:17:40 -0000	1.68
***************
*** 867,871 ****
  	last_time = SDL_GetTicks();
  
! 	gui.launcher();
  	do {
  		updateScreen(scumm);
--- 867,871 ----
  	last_time = SDL_GetTicks();
  
! 	gui.launcher(scumm);
  	do {
  		updateScreen(scumm);
***************
*** 876,880 ****
  
  		if (gui._active) {
! 			gui.loop();
  			delta = 5;
  		} else
--- 876,880 ----
  
  		if (gui._active) {
! 			gui.loop(scumm);
  			delta = 5;
  		} else
***************
*** 2004,2008 ****
  		last_time = SDL_GetTicks();
  		if (gui._active) { 
! 			gui.loop();
  			delta = 5;
  		}
--- 2004,2008 ----
  		last_time = SDL_GetTicks();
  		if (gui._active) { 
! 			gui.loop(scumm);
  			delta = 5;
  		}





More information about the Scummvm-git-logs mailing list