[Scummvm-cvs-logs] CVS: scummvm/gui console.cpp,1.20,1.21 console.h,1.12,1.13 newgui.cpp,1.39,1.40

James Brown ender at users.sourceforge.net
Fri Dec 27 20:52:02 CET 2002


Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv15544/gui

Modified Files:
	console.cpp console.h newgui.cpp 
Log Message:
Fix NewGui for higher resolutions (eg, CMI)


Index: console.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/console.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- console.cpp	16 Dec 2002 22:25:54 -0000	1.20
+++ console.cpp	28 Dec 2002 04:51:34 -0000	1.21
@@ -47,8 +47,8 @@
  * - add a scrollbar widget to allow scrolling in the history
  * - a *lot* of others things, this code is in no way complete and heavily under progress
  */
-ConsoleDialog::ConsoleDialog(NewGui *gui)
-	: Dialog(gui, 0, 0, 320, 12*kLineHeight+2)
+ConsoleDialog::ConsoleDialog(NewGui *gui, int _realWidth)
+	: Dialog(gui, 0, 0, _realWidth, 12*kLineHeight+2)
 {
 	_lineWidth = (_w - kScrollBarWidth - 2) / kCharWidth;
 	_linesPerPage = (_h - 2) / kLineHeight;

Index: console.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/console.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- console.h	25 Dec 2002 00:38:34 -0000	1.12
+++ console.h	28 Dec 2002 04:51:34 -0000	1.13
@@ -69,7 +69,7 @@
 	int _historyLine;
 
 public:
-	ConsoleDialog(NewGui *gui);
+	ConsoleDialog(NewGui *gui, int _realWidth);
 
 	void open();
 	void drawDialog();

Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- newgui.cpp	25 Dec 2002 00:48:13 -0000	1.39
+++ newgui.cpp	28 Dec 2002 04:51:34 -0000	1.40
@@ -213,15 +213,16 @@
 
 void NewGui::saveState()
 {
+	int sys_height = _system->get_height();
+	int sys_width = _system->get_width();
+
 	// Backup old cursor
 	_oldCursorMode = _system->show_mouse(true);
 	
 	_system->show_overlay();
 	// TODO - add getHeight & getWidth methods to OSystem.
-	_screen = new int16[320 * 240];
-	_screenPitch = 320;
-//	_screen = new int16[_system->get_width() * _system->get_height()];
-//	_screenPitch = _system->get_width();
+	_screen = new int16[sys_width * sys_height];
+	_screenPitch = sys_width;
 	_system->grab_overlay(_screen, _screenPitch);
 
 	_currentKeyDown.keycode = 0;





More information about the Scummvm-git-logs mailing list