[Scummvm-cvs-logs] SF.net SVN: scummvm:[44731] scummvm/trunk/engines/sci

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Wed Oct 7 14:52:21 CEST 2009


Revision: 44731
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44731&view=rev
Author:   m_kiewitz
Date:     2009-10-07 12:52:21 +0000 (Wed, 07 Oct 2009)

Log Message:
-----------
SCI: removed OSystem from SciGuiScreen

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gui/gui_screen.cpp
    scummvm/trunk/engines/sci/gui/gui_screen.h
    scummvm/trunk/engines/sci/sci.cpp

Modified: scummvm/trunk/engines/sci/gui/gui_screen.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_screen.cpp	2009-10-07 12:47:53 UTC (rev 44730)
+++ scummvm/trunk/engines/sci/gui/gui_screen.cpp	2009-10-07 12:52:21 UTC (rev 44731)
@@ -33,8 +33,8 @@
 
 namespace Sci {
 
-SciGuiScreen::SciGuiScreen(OSystem *system, int16 width, int16 height, int16 scaleFactor) : 
-	_system(system), _width(width), _height(height) {
+SciGuiScreen::SciGuiScreen(int16 width, int16 height, int16 scaleFactor) : 
+	_width(width), _height(height) {
 
 	int i;
 	uint16 base = 0;
@@ -73,7 +73,7 @@
 }
 
 void SciGuiScreen::copyToScreen() {
-	_system->copyRectToScreen(_displayScreen, _displayWidth, 0, 0, _displayWidth, _displayHeight);
+	g_system->copyRectToScreen(_displayScreen, _displayWidth, 0, 0, _displayWidth, _displayHeight);
 }
 
 byte SciGuiScreen::getDrawingMask(byte color, byte prio, byte control) {
@@ -205,7 +205,7 @@
 	// just copy palette to system
 	byte bpal[4 * 256];
 	// Get current palette, update it and put back
-	_system->grabPalette(bpal, 0, 256);
+	g_system->grabPalette(bpal, 0, 256);
 	for (int16 i = 0; i < 256; i++) {
 		if (!pal->colors[i].used)
 			continue;
@@ -214,7 +214,7 @@
 		bpal[i * 4 + 2] = pal->colors[i].b * pal->intensity[i] / 100;
 		bpal[i * 4 + 3] = 100;
 	}
-	_system->setPalette(bpal, 0, 256);
+	g_system->setPalette(bpal, 0, 256);
 }
 
 // Currently not really done, its supposed to be possible to only dither _visualScreen

Modified: scummvm/trunk/engines/sci/gui/gui_screen.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_screen.h	2009-10-07 12:47:53 UTC (rev 44730)
+++ scummvm/trunk/engines/sci/gui/gui_screen.h	2009-10-07 12:52:21 UTC (rev 44731)
@@ -41,7 +41,7 @@
 
 class SciGuiScreen {
 public:
-	SciGuiScreen(OSystem *system, int16 width = 320, int16 height = 200, int16 scaleFactor = 1);
+	SciGuiScreen(int16 width = 320, int16 height = 200, int16 scaleFactor = 1);
 	~SciGuiScreen();
 
 	byte *initScreen(uint16 pixelCount);
@@ -76,8 +76,6 @@
 	void restoreBitsScreen(Common::Rect rect, byte *&memoryPtr, byte *screen);
 	void saveBitsScreen(Common::Rect rect, byte *screen, byte *&memoryPtr);
 
-	OSystem *_system;
-
 	uint16 _baseTable[SCI_SCREEN_MAXHEIGHT];
 	uint16 _baseDisplayTable[SCI_SCREEN_MAXHEIGHT];
 

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2009-10-07 12:47:53 UTC (rev 44730)
+++ scummvm/trunk/engines/sci/sci.cpp	2009-10-07 12:52:21 UTC (rev 44731)
@@ -157,7 +157,7 @@
 	GfxState gfx_state;
 	_gamestate->gfx_state = &gfx_state;
 
-	SciGuiScreen *screen = new SciGuiScreen(_system);
+	SciGuiScreen *screen = new SciGuiScreen();
 	SciGuiPalette *palette = new SciGuiPalette(_gamestate, screen);
 	SciGuiCursor *cursor = new SciGuiCursor(_gamestate, palette);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list