Explorar o código

Removed SHAPE_CUSTOM from ScreenShape, please use ScreenMesh for custom shapes

Ivan Safrin %!s(int64=13) %!d(string=hai) anos
pai
achega
77811d37cb

+ 1 - 9
Core/Contents/Include/PolyScreenShape.h

@@ -36,7 +36,7 @@ namespace Polycode {
 			
 			/**
 			* Create a new shape of specified type and size/options.
-			* @param shapeType Type of shape to create. Currently the only options are ScreenShape::SHAPE_RECT and ScreenShape::SHAPE_CIRCLE. Pass ScreenShape::SHAPE_CUSTOM if you want to create a custom shape (@see addShapePoint())
+			* @param shapeType Type of shape to create. Currently the only options are ScreenShape::SHAPE_RECT and ScreenShape::SHAPE_CIRCLE.
 			* @param option1 Width option.
 			* @param option2 Height option.
 			* @param option3 Number of vertices for the the circle (defaults to 360). Unused for rectangle.
@@ -94,13 +94,6 @@ namespace Polycode {
 			void setShapeSize(Number newWidth, Number newHeight);		
 		
 			void buildShapeMesh();
-		
-			/** 
-			* Adds a point to the mesh.
-			* @param x Horizontal position of the point.
-			* @param y Vertical position of the point.
-			*/ 
-			void addShapePoint(Number x, Number y);
 			
 			/**
 			* Assignment operator
@@ -133,7 +126,6 @@ namespace Polycode {
 			Number option3;
 			Number option4;
 									
-			Polygon *customShapePoly;
 			int shapeType;
 			
 	};

+ 0 - 9
Core/Contents/Source/PolyScreenShape.cpp

@@ -128,11 +128,6 @@ void ScreenShape::buildShapeMesh() {
 			mesh->addPolygon(poly);
 			}
 		break;
-		case SHAPE_CUSTOM:
-			mesh->setMeshType(Mesh::TRIFAN_MESH);
-			customShapePoly = new Polygon();
-			mesh->addPolygon(customShapePoly);
-		break;	
 		default:
 		break;
 	}
@@ -179,10 +174,6 @@ void ScreenShape::setShapeSize(Number newWidth, Number newHeight) {
 	matrixDirty = true;
 }
 
-void ScreenShape::addShapePoint(Number x, Number y) {
-	customShapePoly->addVertex(x,y,0,0,0);
-}
-
 void ScreenShape::setGradient(Number r1, Number g1, Number b1, Number a1, Number r2, Number g2, Number b2, Number a2) {
 
 	mesh->useVertexColors = true;