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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Thu Feb 4 22:05:00 CET 2010


Revision: 47890
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47890&view=rev
Author:   m_kiewitz
Date:     2010-02-04 21:04:47 +0000 (Thu, 04 Feb 2010)

Log Message:
-----------
SCI: renaming Transitions to GfxTransitions

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/animate.cpp
    scummvm/trunk/engines/sci/graphics/animate.h
    scummvm/trunk/engines/sci/graphics/gui.cpp
    scummvm/trunk/engines/sci/graphics/gui.h
    scummvm/trunk/engines/sci/graphics/paint16.cpp
    scummvm/trunk/engines/sci/graphics/paint16.h
    scummvm/trunk/engines/sci/graphics/transitions.cpp
    scummvm/trunk/engines/sci/graphics/transitions.h

Modified: scummvm/trunk/engines/sci/graphics/animate.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/animate.cpp	2010-02-04 20:52:56 UTC (rev 47889)
+++ scummvm/trunk/engines/sci/graphics/animate.cpp	2010-02-04 21:04:47 UTC (rev 47890)
@@ -42,7 +42,7 @@
 
 namespace Sci {
 
-GfxAnimate::GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, Cursor *cursor, Transitions *transitions)
+GfxAnimate::GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, Cursor *cursor, GfxTransitions *transitions)
 	: _s(state), _cache(cache), _ports(ports), _paint16(paint16), _screen(screen), _palette(palette), _cursor(cursor), _transitions(transitions) {
 	init();
 }

Modified: scummvm/trunk/engines/sci/graphics/animate.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/animate.h	2010-02-04 20:52:56 UTC (rev 47889)
+++ scummvm/trunk/engines/sci/graphics/animate.h	2010-02-04 21:04:47 UTC (rev 47890)
@@ -77,12 +77,12 @@
 class GfxCache;
 class GfxPorts;
 class GfxPaint16;
-class Screen;
-class SciPalette;
-class Transitions;
+class GfxScreen;
+class GfxPalette;
+class GfxTransitions;
 class GfxAnimate {
 public:
-	GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, Cursor *cursor, Transitions *transitions);
+	GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, Cursor *cursor, GfxTransitions *transitions);
 	virtual ~GfxAnimate();
 
 	// FIXME: Don't store EngineState
@@ -119,7 +119,7 @@
 	GfxScreen *_screen;
 	GfxPalette *_palette;
 	Cursor *_cursor;
-	Transitions *_transitions;
+	GfxTransitions *_transitions;
 
 	uint16 _listCount;
 	AnimateEntry *_listData;

Modified: scummvm/trunk/engines/sci/graphics/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.cpp	2010-02-04 20:52:56 UTC (rev 47889)
+++ scummvm/trunk/engines/sci/graphics/gui.cpp	2010-02-04 21:04:47 UTC (rev 47890)
@@ -54,7 +54,7 @@
 	: _s(state), _screen(screen), _palette(palette), _cache(cache), _cursor(cursor), _ports(ports), _audio(audio) {
 
 	_compare = new GfxCompare(_s->_segMan, _s->_kernel, _cache, _screen);
-	_transitions = new Transitions(this, _screen, _palette, _s->resMan->isVGA());
+	_transitions = new GfxTransitions(this, _screen, _palette, _s->resMan->isVGA());
 	_paint16 = new GfxPaint16(_s->resMan, _s->_segMan, _s->_kernel, _cache, _ports, _screen, _palette, _transitions);
 	_s->_gfxPaint = _paint16;
 	_s->_gfxPaint16 = _paint16;

Modified: scummvm/trunk/engines/sci/graphics/gui.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.h	2010-02-04 20:52:56 UTC (rev 47889)
+++ scummvm/trunk/engines/sci/graphics/gui.h	2010-02-04 21:04:47 UTC (rev 47890)
@@ -41,7 +41,7 @@
 	SCI_CONTROLS_TYPE_DUMMY			= 10
 };
 
-class Screen;
+class GfxScreen;
 class GfxPalette;
 class Cursor;
 class GfxCache;
@@ -52,7 +52,7 @@
 class GfxControls;
 class GfxMenu;
 class GfxText16;
-class Transitions;
+class GfxTransitions;
 
 class SciGui {
 public:
@@ -132,7 +132,7 @@
 	GfxControls *_controls;
 	GfxMenu *_menu;
 	GfxText16 *_text16;
-	Transitions *_transitions;
+	GfxTransitions *_transitions;
 	int16 _palVaryId;
 	uint32 _palVaryStart;
 	uint32 _palVaryEnd;

Modified: scummvm/trunk/engines/sci/graphics/paint16.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.cpp	2010-02-04 20:52:56 UTC (rev 47889)
+++ scummvm/trunk/engines/sci/graphics/paint16.cpp	2010-02-04 21:04:47 UTC (rev 47890)
@@ -44,7 +44,7 @@
 
 namespace Sci {
 
-GfxPaint16::GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxScreen *screen, GfxPalette *palette, Transitions *transitions)
+GfxPaint16::GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions)
 	: _resMan(resMan), _segMan(segMan), _kernel(kernel), _cache(cache), _ports(ports), _screen(screen), _palette(palette), _transitions(transitions) {
 }
 

Modified: scummvm/trunk/engines/sci/graphics/paint16.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.h	2010-02-04 20:52:56 UTC (rev 47889)
+++ scummvm/trunk/engines/sci/graphics/paint16.h	2010-02-04 21:04:47 UTC (rev 47890)
@@ -34,15 +34,15 @@
 namespace Sci {
 
 class GfxPorts;
-class Screen;
-class SciPalette;
+class GfxScreen;
+class GfxPalette;
 class Font;
 class SciGuiPicture;
 class View;
 
 class GfxPaint16 : public GfxPaint {
 public:
-	GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxScreen *screen, GfxPalette *palette, Transitions *transitions);
+	GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions);
 	~GfxPaint16();
 
 	void init(GfxText16 *text16);
@@ -91,7 +91,7 @@
 	GfxScreen *_screen;
 	GfxPalette *_palette;
 	GfxText16 *_text16;
-	Transitions *_transitions;
+	GfxTransitions *_transitions;
 
 	// true means make EGA picture drawing visible
 	bool _EGAdrawingVisualize;

Modified: scummvm/trunk/engines/sci/graphics/transitions.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/transitions.cpp	2010-02-04 20:52:56 UTC (rev 47889)
+++ scummvm/trunk/engines/sci/graphics/transitions.cpp	2010-02-04 21:04:47 UTC (rev 47890)
@@ -37,17 +37,17 @@
 
 namespace Sci {
 
-Transitions::Transitions(SciGui *gui, GfxScreen *screen, GfxPalette *palette, bool isVGA)
+GfxTransitions::GfxTransitions(SciGui *gui, GfxScreen *screen, GfxPalette *palette, bool isVGA)
 	: _gui(gui), _screen(screen), _palette(palette), _isVGA(isVGA) {
 	init();
 }
 
-Transitions::~Transitions() {
+GfxTransitions::~GfxTransitions() {
 	delete[] _oldScreen;
 }
 
 // This table contains a mapping between oldIDs (prior SCI1LATE) and newIDs
-static const GuiTransitionTranslateEntry oldTransitionIDs[] = {
+static const GfxTransitionTranslateEntry oldTransitionIDs[] = {
 	{   0, SCI_TRANSITIONS_VERTICALROLL_FROMCENTER,		false },
 	{   1, SCI_TRANSITIONS_HORIZONTALROLL_FROMCENTER,	false },
 	{   2, SCI_TRANSITIONS_STRAIGHT_FROM_RIGHT,			false },
@@ -78,7 +78,7 @@
 };
 
 // this table defines the blackout-transition that needs to be done prior doing the actual transition
-static const GuiTransitionTranslateEntry blackoutTransitionIDs[] = {
+static const GfxTransitionTranslateEntry blackoutTransitionIDs[] = {
 	{ SCI_TRANSITIONS_VERTICALROLL_FROMCENTER,			SCI_TRANSITIONS_VERTICALROLL_TOCENTER,		true },
 	{ SCI_TRANSITIONS_HORIZONTALROLL_FROMCENTER,		SCI_TRANSITIONS_HORIZONTALROLL_TOCENTER,	true },
 	{ SCI_TRANSITIONS_STRAIGHT_FROM_RIGHT,				SCI_TRANSITIONS_STRAIGHT_FROM_LEFT,			true },
@@ -101,7 +101,7 @@
 	{ 255,												255,										true }
 };
 
-void Transitions::init() {
+void GfxTransitions::init() {
 	_oldScreen = new byte[_screen->getDisplayHeight() * _screen->getDisplayWidth()];
 
 	if (getSciVersion() >= SCI_VERSION_1_LATE)
@@ -114,14 +114,14 @@
 	_blackoutFlag = false;
 }
 
-void Transitions::setup(int16 number, bool blackoutFlag) {
+void GfxTransitions::setup(int16 number, bool blackoutFlag) {
 	if (number != -1) {
 		_number = number;
 		_blackoutFlag = blackoutFlag;
 	}
 }
 
-void Transitions::updateScreenAndWait(int msec) {
+void GfxTransitions::updateScreenAndWait(int msec) {
 	Common::Event ev;
 	g_system->updateScreen();
 	g_system->delayMillis(msec);
@@ -129,7 +129,7 @@
 }
 
 // will translate a number and return corresponding translationEntry
-const GuiTransitionTranslateEntry *Transitions::translateNumber (int16 number, const GuiTransitionTranslateEntry *tablePtr) {
+const GfxTransitionTranslateEntry *GfxTransitions::translateNumber (int16 number, const GfxTransitionTranslateEntry *tablePtr) {
 	while (1) {
 		if (tablePtr->orgId == 255)
 			return NULL;
@@ -139,8 +139,8 @@
 	}
 }
 
-void Transitions::doit(Common::Rect picRect) {
-	const GuiTransitionTranslateEntry *translationEntry = _translationTable;
+void GfxTransitions::doit(Common::Rect picRect) {
+	const GfxTransitionTranslateEntry *translationEntry = _translationTable;
 
 	_picRect = picRect;
 
@@ -182,7 +182,7 @@
 
 // This may get called twice, if blackoutFlag is set. It will get once called with blackoutFlag set and another time
 //  with no blackoutFlag.
-void Transitions::doTransition(int16 number, bool blackoutFlag) {
+void GfxTransitions::doTransition(int16 number, bool blackoutFlag) {
 	if (number != SCI_TRANSITIONS_FADEPALETTE) {
 		setNewPalette(blackoutFlag);
 	}
@@ -246,20 +246,20 @@
 	}
 }
 
-void Transitions::setNewPalette(bool blackoutFlag) {
+void GfxTransitions::setNewPalette(bool blackoutFlag) {
 	if (!blackoutFlag)
 		if (_isVGA)
 			_palette->setOnScreen();
 }
 
-void Transitions::setNewScreen(bool blackoutFlag) {
+void GfxTransitions::setNewScreen(bool blackoutFlag) {
 	if (!blackoutFlag) {
 		_screen->copyRectToScreen(_picRect);
 		g_system->updateScreen();
 	}
 }
 
-void Transitions::copyRectToScreen(const Common::Rect rect, bool blackoutFlag) {
+void GfxTransitions::copyRectToScreen(const Common::Rect rect, bool blackoutFlag) {
 	if (!blackoutFlag) {
 		_screen->copyRectToScreen(rect);
 	} else {
@@ -270,7 +270,7 @@
 }
 
 // Note: dont do too many steps in here, otherwise cpu will crap out because of the load
-void Transitions::fadeOut() {
+void GfxTransitions::fadeOut() {
 	byte oldPalette[4 * 256], workPalette[4 * 256];
 	int16 stepNr, colorNr;
 
@@ -288,7 +288,7 @@
 }
 
 // Note: dont do too many steps in here, otherwise cpu will crap out because of the load
-void Transitions::fadeIn() {
+void GfxTransitions::fadeIn() {
 	int16 stepNr;
 
 	for (stepNr = 0; stepNr <= 100; stepNr += 10) {
@@ -299,7 +299,7 @@
 
 // pixelates the new picture over the old one - works against the whole screen
 // TODO: it seems this needs to get applied on _picRect only if possible
-void Transitions::pixelation (bool blackoutFlag) {
+void GfxTransitions::pixelation (bool blackoutFlag) {
 	uint16 mask = 0x40, stepNr = 0;
 	Common::Rect pixelRect;
 
@@ -321,7 +321,7 @@
 
 // like pixelation but uses 8x8 blocks - works against the whole screen
 // TODO: it seems this needs to get applied on _picRect only if possible
-void Transitions::blocks(bool blackoutFlag) {
+void GfxTransitions::blocks(bool blackoutFlag) {
 	uint16 mask = 0x40, stepNr = 0;
 	Common::Rect blockRect;
 
@@ -342,7 +342,7 @@
 }
 
 // directly shows new screen starting up/down/left/right and going to the opposite direction - works on _picRect area only
-void Transitions::straight(int16 number, bool blackoutFlag) {
+void GfxTransitions::straight(int16 number, bool blackoutFlag) {
 	int16 stepNr = 0;
 	Common::Rect newScreenRect = _picRect;
 
@@ -394,7 +394,7 @@
 }
 
 // scroll old screen (up/down/left/right) and insert new screen that way - works on _picRect area only
-void Transitions::scroll(int16 number) {
+void GfxTransitions::scroll(int16 number) {
 	int16 screenWidth, screenHeight;
 	byte *oldScreenPtr;
 	int16 stepNr = 0;
@@ -471,7 +471,7 @@
 }
 
 // vertically displays new screen starting from center - works on _picRect area only
-void Transitions::verticalRollFromCenter(bool blackoutFlag) {
+void GfxTransitions::verticalRollFromCenter(bool blackoutFlag) {
 	Common::Rect leftRect = Common::Rect(_picRect.left + (_picRect.width() / 2) -1, _picRect.top, _picRect.left + (_picRect.width() / 2), _picRect.bottom);
 	Common::Rect rightRect = Common::Rect(leftRect.right, _picRect.top, leftRect.right + 1, _picRect.bottom);
 
@@ -487,7 +487,7 @@
 }
 
 // vertically displays new screen starting from edges - works on _picRect area only
-void Transitions::verticalRollToCenter(bool blackoutFlag) {
+void GfxTransitions::verticalRollToCenter(bool blackoutFlag) {
 	Common::Rect leftRect = Common::Rect(_picRect.left, _picRect.top, _picRect.left + 1, _picRect.bottom);
 	Common::Rect rightRect = Common::Rect(leftRect.right - 1, _picRect.top, leftRect.right, _picRect.bottom);
 
@@ -499,7 +499,7 @@
 }
 
 // horizontally displays new screen starting from center - works on _picRect area only
-void Transitions::horizontalRollFromCenter(bool blackoutFlag) {
+void GfxTransitions::horizontalRollFromCenter(bool blackoutFlag) {
 	Common::Rect upperRect = Common::Rect(_picRect.left, _picRect.top + (_picRect.height() / 2) - 1, _picRect.right, _picRect.top + (_picRect.height() / 2));
 	Common::Rect lowerRect = Common::Rect(upperRect.left, upperRect.bottom, upperRect.right, upperRect.bottom + 1);
 
@@ -515,7 +515,7 @@
 }
 
 // horizontally displays new screen starting from upper and lower edge - works on _picRect area only
-void Transitions::horizontalRollToCenter(bool blackoutFlag) {
+void GfxTransitions::horizontalRollToCenter(bool blackoutFlag) {
 	Common::Rect upperRect = Common::Rect(_picRect.left, _picRect.top, _picRect.right, _picRect.top + 1);
 	Common::Rect lowerRect = Common::Rect(upperRect.left, _picRect.bottom - 1, upperRect.right, _picRect.bottom);
 
@@ -528,7 +528,7 @@
 
 // diagonally displays new screen starting from center - works on _picRect area only
 //  assumes that height of rect is larger than width
-void Transitions::diagonalRollFromCenter(bool blackoutFlag) {
+void GfxTransitions::diagonalRollFromCenter(bool blackoutFlag) {
 	int16 halfHeight = _picRect.height() / 2;
 	Common::Rect upperRect(_picRect.left + halfHeight - 2, _picRect.top + halfHeight, _picRect.right - halfHeight + 1, _picRect.top + halfHeight + 1);
 	Common::Rect lowerRect(upperRect.left, upperRect.top, upperRect.right, upperRect.bottom);
@@ -558,7 +558,7 @@
 
 // diagonally displays new screen starting from edges - works on _picRect area only
 //  assumes that height of rect is larger than width
-void Transitions::diagonalRollToCenter(bool blackoutFlag) {
+void GfxTransitions::diagonalRollToCenter(bool blackoutFlag) {
 	Common::Rect upperRect(_picRect.left, _picRect.top, _picRect.right, _picRect.top + 1);
 	Common::Rect lowerRect(_picRect.left, _picRect.bottom - 1, _picRect.right, _picRect.bottom);
 	Common::Rect leftRect(_picRect.left, _picRect.top, _picRect.left + 1, _picRect.bottom);

Modified: scummvm/trunk/engines/sci/graphics/transitions.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/transitions.h	2010-02-04 20:52:56 UTC (rev 47889)
+++ scummvm/trunk/engines/sci/graphics/transitions.h	2010-02-04 21:04:47 UTC (rev 47890)
@@ -30,7 +30,7 @@
 
 namespace Sci {
 
-struct GuiTransitionTranslateEntry {
+struct GfxTransitionTranslateEntry {
 	int16 orgId;
 	int16 newId;
 	bool blackoutFlag;
@@ -60,17 +60,17 @@
 };
 
 class Screen;
-class Transitions {
+class GfxTransitions {
 public:
-	Transitions(SciGui *gui, GfxScreen *screen, GfxPalette *palette, bool isVGA);
-	~Transitions();
+	GfxTransitions(SciGui *gui, GfxScreen *screen, GfxPalette *palette, bool isVGA);
+	~GfxTransitions();
 
 	void setup(int16 number, bool blackoutFlag);
 	void doit(Common::Rect picRect);
 
 private:
 	void init();
-	const GuiTransitionTranslateEntry *translateNumber(int16 number, const GuiTransitionTranslateEntry *tablePtr);
+	const GfxTransitionTranslateEntry *translateNumber(int16 number, const GfxTransitionTranslateEntry *tablePtr);
 	void doTransition(int16 number, bool blackout);
 	void setNewPalette(bool blackoutFlag);
 	void setNewScreen(bool blackoutFlag);
@@ -94,7 +94,7 @@
 	GfxPalette *_palette;
 
 	bool _isVGA;
-	const GuiTransitionTranslateEntry *_translationTable;
+	const GfxTransitionTranslateEntry *_translationTable;
 	int16 _number;
 	bool _blackoutFlag;
 	Common::Rect _picRect;


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