diff options
| -rw-r--r-- | dists/msvc9/scummvm.vcproj | 15 | ||||
| -rw-r--r-- | graphics/VectorRenderer.h | 39 | ||||
| -rw-r--r-- | gui/InterfaceManager.cpp | 39 | ||||
| -rw-r--r-- | gui/InterfaceManager.h | 59 | 
4 files changed, 145 insertions, 7 deletions
diff --git a/dists/msvc9/scummvm.vcproj b/dists/msvc9/scummvm.vcproj index 4877c045e7..5667763fce 100644 --- a/dists/msvc9/scummvm.vcproj +++ b/dists/msvc9/scummvm.vcproj @@ -1081,6 +1081,14 @@  				>  			</File>  			<File +				RelativePath="..\..\gui\InterfaceManager.cpp" +				> +			</File> +			<File +				RelativePath="..\..\gui\InterfaceManager.h" +				> +			</File> +			<File  				RelativePath="..\..\gui\Key.cpp"  				>  			</File> @@ -1303,13 +1311,6 @@  			<File  				RelativePath="..\..\graphics\VectorRenderer.cpp"  				> -				<FileConfiguration -					Name="Debug|Win32" -					> -					<Tool -						Name="VCCLCompilerTool" -					/> -				</FileConfiguration>  			</File>  			<File  				RelativePath="..\..\graphics\VectorRenderer.h" diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h index a4ef4b81b1..23e5b18593 100644 --- a/graphics/VectorRenderer.h +++ b/graphics/VectorRenderer.h @@ -35,6 +35,24 @@ namespace Graphics {  void vector_renderer_test(OSystem *_system); +struct DrawStep { +	bool set_fg, set_bg, set_grad; + +	uint8 fg_r, fg_g, fg_b; +	uint8 bg_r, bg_g, bg_b; + +	uint8 grad_r1, grad_g1, grad_b1; +	uint8 grad_r2, grad_g2, grad_b2; + +	uint16 x, y, w, h, r; +	uint8 shadows, stroke, factor; + +	Graphics::VectorRenderer::FillMode fill_mode; + +	void (*drawing_call)(DrawStep *step); +}; + +  /**   * VectorRenderer: The core Vector Renderer Class   * @@ -245,6 +263,27 @@ public:  			_gradientFactor = factor;  	} +	void drawStep_CIRCLE(DrawStep *step) { +		drawCircle(step->x, step->y, step->r); +	} + +	void drawStep_SQUARE(DrawStep *step) { +		drawSquare(step->x, step->y, step->w, step->h); +	} + +	void drawStep_LINE(DrawStep *step) { +		drawLine(step->x, step->y, step->x + step->w, step->y + step->h); +	} + +	void drawStep_ROUNDEDSQ(DrawStep *step) { +		drawRoundedSquare(step->x, step->y, step->r, step->w, step->h); +	} + + +	virtual void drawStep(DrawStep *step) { + +	} +  protected:  	Surface *_activeSurface; /** Pointer to the surface currently being drawn */ diff --git a/gui/InterfaceManager.cpp b/gui/InterfaceManager.cpp new file mode 100644 index 0000000000..693b36e367 --- /dev/null +++ b/gui/InterfaceManager.cpp @@ -0,0 +1,39 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/util.h" +#include "graphics/surface.h" +#include "graphics/colormasks.h" +#include "common/system.h" +#include "common/events.h" + +#include "gui/InterfaceManager.h" +#include "graphics/VectorRenderer.h" + +namespace GUI { + + + +} // end of namespace GUI.
\ No newline at end of file diff --git a/gui/InterfaceManager.h b/gui/InterfaceManager.h new file mode 100644 index 0000000000..b65ae36477 --- /dev/null +++ b/gui/InterfaceManager.h @@ -0,0 +1,59 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef INTERFACE_MANAGER_H +#define INTERFACE_MANAGER_H + +#include "common/scummsys.h" +#include "graphics/surface.h" +#include "common/system.h" +#include "graphics/VectorRenderer.h" + +namespace GUI { + +class InterfaceManager { + +public: +	InterfaceManager() : _vectorRenderer(NULL) { +		_vectorRenderer = createRenderer(); +	} + +	~InterfaceManager() { +		delete _vectorRenderer; +	} + +protected: +	Graphics::VectorRenderer *createRenderer() { +		// TODO: Find out what pixel format we are using, +		// create the renderer accordingly +		return new VectorRendererSpec<uint16, ColorMasks<565> >; +	} + +	Graphics::VectorRenderer *_vectorRenderer; +}; + +} // end of namespace GUI. + +#endif
\ No newline at end of file  | 
