[Scummvm-cvs-logs] CVS: scummex wxwindows.cpp,1.27,1.28 wxwindows.h,1.14,1.15 image.cpp,1.19,1.20

Adrien Mercier yoshizf at users.sourceforge.net
Sun Sep 28 03:29:04 CEST 2003


Update of /cvsroot/scummvm/scummex
In directory sc8-pr-cvs1:/tmp/cvs-serv5069

Modified Files:
	wxwindows.cpp wxwindows.h image.cpp 
Log Message:
Allow to override the config scaler (why would we want to scale a palette?)

Index: wxwindows.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummex/wxwindows.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- wxwindows.cpp	28 Sep 2003 09:31:11 -0000	1.27
+++ wxwindows.cpp	28 Sep 2003 09:51:03 -0000	1.28
@@ -156,7 +156,7 @@
 	EVT_MENU(ID_Boxes, ImageWindow::boxesDrawOverlay)
 END_EVENT_TABLE()
 
-ImageWindow::ImageWindow(const wxString& title, const wxSize& size, int blockId, byte flags)
+ImageWindow::ImageWindow(const wxString& title, const wxSize& size, int blockId, byte flags, int scaleFactor)
 	: wxFrame(_gui->_mainWindow, -1, title, wxPoint(-1,-1), size, wxDEFAULT_FRAME_STYLE & (wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION))
 {
 	wxMenuBar *menuBar = new wxMenuBar;
@@ -181,9 +181,14 @@
 	}
 	
 	SetMenuBar(menuBar);
-	
-	_scaleFactor = 1;
-	_gui->readConfigValue("Scaler", &_scaleFactor);
+
+	if (scaleFactor == 0) {
+		_scaleFactor = 1;
+		_gui->readConfigValue("Scaler", &_scaleFactor);
+	} else {
+		_scaleFactor = scaleFactor;
+	}
+
 	SetClientSize(size.GetWidth() * _scaleFactor, size.GetHeight() * _scaleFactor);
 	_image = new wxImage(size.GetWidth() * _scaleFactor, size.GetHeight() * _scaleFactor);
 	_sbmp = NULL;

Index: wxwindows.h
===================================================================
RCS file: /cvsroot/scummvm/scummex/wxwindows.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- wxwindows.h	27 Sep 2003 15:55:45 -0000	1.14
+++ wxwindows.h	28 Sep 2003 09:51:07 -0000	1.15
@@ -106,7 +106,7 @@
 public:
 	int _scaleFactor;
 	
-	ImageWindow(const wxString& title, const wxSize& size, int blockId, byte flags = FLAG_NONE);
+	ImageWindow(const wxString& title, const wxSize& size, int blockId, byte flags = FLAG_NONE, int scaleFactor = 0);
 	void DrawImage();
 	void PutPixel(int x, int y, int red, int green, int blue);
 

Index: image.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummex/image.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- image.cpp	27 Sep 2003 14:56:11 -0000	1.19
+++ image.cpp	28 Sep 2003 09:51:07 -0000	1.20
@@ -70,7 +70,7 @@
 	unsigned int h;
 
 	if (_blockTable[id].image == NULL)
-		_image = _blockTable[id].image = new ImageWindow("Block Palette", wxSize(384, 384), id);
+		_image = _blockTable[id].image = new ImageWindow("Block Palette", wxSize(384, 384), id, FLAG_NONE, 1);
 	else
 		_image = _blockTable[id].image;
 





More information about the Scummvm-git-logs mailing list