[Scummvm-cvs-logs] SF.net SVN: scummvm: [32267] scummvm/branches/gsoc2008-gui

Tanoku at users.sourceforge.net Tanoku at users.sourceforge.net
Sun May 25 13:20:28 CEST 2008


Revision: 32267
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32267&view=rev
Author:   Tanoku
Date:     2008-05-25 04:20:28 -0700 (Sun, 25 May 2008)

Log Message:
-----------
Interface Manager class

Modified Paths:
--------------
    scummvm/branches/gsoc2008-gui/dists/msvc9/scummvm.vcproj
    scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h

Added Paths:
-----------
    scummvm/branches/gsoc2008-gui/gui/InterfaceManager.cpp
    scummvm/branches/gsoc2008-gui/gui/InterfaceManager.h

Modified: scummvm/branches/gsoc2008-gui/dists/msvc9/scummvm.vcproj
===================================================================
--- scummvm/branches/gsoc2008-gui/dists/msvc9/scummvm.vcproj	2008-05-25 06:25:16 UTC (rev 32266)
+++ scummvm/branches/gsoc2008-gui/dists/msvc9/scummvm.vcproj	2008-05-25 11:20:28 UTC (rev 32267)
@@ -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"

Modified: scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h
===================================================================
--- scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h	2008-05-25 06:25:16 UTC (rev 32266)
+++ scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h	2008-05-25 11:20:28 UTC (rev 32267)
@@ -35,6 +35,24 @@
 
 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 @@
 			_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 */
 

Added: scummvm/branches/gsoc2008-gui/gui/InterfaceManager.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/InterfaceManager.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2008-gui/gui/InterfaceManager.cpp	2008-05-25 11:20:28 UTC (rev 32267)
@@ -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


Property changes on: scummvm/branches/gsoc2008-gui/gui/InterfaceManager.cpp
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Date Rev Author URL Id
Name: svn:eol-style
   + native

Added: scummvm/branches/gsoc2008-gui/gui/InterfaceManager.h
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/InterfaceManager.h	                        (rev 0)
+++ scummvm/branches/gsoc2008-gui/gui/InterfaceManager.h	2008-05-25 11:20:28 UTC (rev 32267)
@@ -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


Property changes on: scummvm/branches/gsoc2008-gui/gui/InterfaceManager.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Date Rev Author URL Id
Name: svn:eol-style
   + native


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