Explorar el Código

Delete stuff I don't use

smelc hace 6 años
padre
commit
86074c871c

+ 97 - 0
.settings/org.eclipse.jdt.core.prefs

@@ -1,4 +1,13 @@
 eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
@@ -7,6 +16,94 @@ org.eclipse.jdt.core.compiler.compliance=1.7
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=info
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
 org.eclipse.jdt.core.compiler.source=1.7

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 753 - 774
squidlib/src/main/java/squidpony/squidgrid/gui/gdx/DefaultResources.java


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 29311 - 6057
squidlib/src/main/java/squidpony/squidgrid/gui/gdx/SColor.java


+ 0 - 168
squidlib/src/main/java/squidpony/squidgrid/gui/gdx/SquidColorCenter.java

@@ -1,168 +0,0 @@
-package squidpony.squidgrid.gui.gdx;
-
-import java.util.ArrayList;
-
-import com.badlogic.gdx.graphics.Color;
-
-import squidpony.IColorCenter;
-import squidpony.IFilter;
-import squidpony.squidmath.CoordPacker;
-import squidpony.squidmath.StatefulRNG;
-
-/**
- * A concrete implementation of {@link IColorCenter} for libgdx's
- * {@link com.badlogic.gdx.graphics.Color}. Supports filtering any colors that
- * this creates using a {@code Filter}, such as one from {@link Filters}.
- *
- * @author smelC
- * @author Tommy Ettinger
- * @see SColor Another way to obtain colors by using pre-allocated (and named)
- *      instances.
- */
-public class SquidColorCenter extends IColorCenter.Skeleton<Color> {
-
-	/**
-	 * A fresh filter-less color center.
-	 */
-	public SquidColorCenter() {
-		this(null);
-	}
-
-	/**
-	 * A fresh filtered color center.
-	 * 
-	 * @param filterEffect
-	 *            The filter to use.
-	 */
-	public SquidColorCenter(/* Nullable */IFilter<Color> filterEffect) {
-		super(filterEffect);
-	}
-
-	@Override
-	protected Color create(int red, int green, int blue, int opacity) {
-		if (filter == null)
-			/* No filtering */
-			return new Color(red / 255f, green / 255f, blue / 255f, opacity / 255f);
-		else
-			/* Some filtering */
-			return filter.alter(red / 255f, green / 255f, blue / 255f, opacity / 255f);
-	}
-
-	@Override
-	public Color filter(Color c) {
-		if (c == null)
-			return Color.CLEAR;
-		else
-			return super.filter(c);
-	}
-
-	public Color get(long c) {
-		return get((int) ((c >> 24) & 0xff), (int) ((c >> 16) & 0xff), (int) ((c >> 8) & 0xff), (int) (c & 0xff));
-	}
-
-	public Color get(float r, float g, float b, float a) {
-		return get(Math.round(255 * r), Math.round(255 * g), Math.round(255 * b), Math.round(255 * a));
-	}
-
-	@Override
-	public int getRed(Color c) {
-		return Math.round(c.r * 255f);
-	}
-
-	@Override
-	public int getGreen(Color c) {
-		return Math.round(c.g * 255f);
-	}
-
-	@Override
-	public int getBlue(Color c) {
-		return Math.round(c.b * 255f);
-	}
-
-	@Override
-	public int getAlpha(Color c) {
-		return Math.round(c.a * 255f);
-	}
-
-	public static int encode(Color color) {
-		if (color == null)
-			return 0;
-		return (Math.round(color.r * 255.0f) << 24) | (Math.round(color.g * 255.0f) << 16)
-				| (Math.round(color.b * 255.0f) << 8) | Math.round(color.a * 255.0f);
-	}
-
-	/**
-	 * Gets a modified copy of color as if it is lit with a colored light source.
-	 * 
-	 * @param color
-	 *            the color to shine the light on
-	 * @param light
-	 *            the color of the light source
-	 * @return a copy of the Color color that factors in the lighting of the Color
-	 *         light.
-	 */
-	public Color lightWith(Color color, Color light) {
-		return filter(color.cpy().mul(light));
-	}
-
-	/**
-	 * Gets a fully random color that is only required to be opaque.
-	 * 
-	 * @return a random Color
-	 */
-	public Color random() {
-		StatefulRNG rng = DefaultResources.getGuiRandom();
-		return get(rng.nextFloat(), rng.nextFloat(), rng.nextFloat(), 1f);
-	}
-
-	/**
-	 * Finds a gradient with the specified number of steps going from fromColor to
-	 * toColor, both included in the gradient. This does not typically take a direct
-	 * path on its way between fromColor and toColor, and is useful to generate a
-	 * wide variety of colors that can be confined to a rough amount of maximum
-	 * difference by choosing values for fromColor and toColor that are more
-	 * similar. <br>
-	 * Try using colors for fromColor and toColor that have different r, g, and b
-	 * values, such as gray and white, then compare to colors that don't differ on,
-	 * for example, r, such as bright red and pink. In the first case, red, green,
-	 * blue, and many other colors will be generated if there are enough steps; in
-	 * the second case, red will be at the same level in all generated colors (very
-	 * high, so no pure blue or pure green, but purple and yellow are possible).
-	 * This should help illustrate how this chooses how far to "zig-zag" off the
-	 * straight-line path.
-	 * 
-	 * @param fromColor
-	 *            the color to start with, included in the gradient
-	 * @param toColor
-	 *            the color to end on, included in the gradient
-	 * @param steps
-	 *            the number of elements to use in the gradient; ideally no greater
-	 *            than 345 to avoid duplicates
-	 * @return an ArrayList composed of the zig-zag steps from fromColor to toColor,
-	 *         with length equal to steps
-	 */
-	public ArrayList<Color> zigzagGradient(Color fromColor, Color toColor, int steps) {
-		ArrayList<Color> colors = new ArrayList<>((steps > 1) ? steps : 1);
-		colors.add(filter(fromColor));
-		if (steps < 2)
-			return colors;
-		float dr = toColor.r - fromColor.r, dg = toColor.g - fromColor.g, db = toColor.b - fromColor.b, a = fromColor.a,
-				cr, cg, cb;
-		int decoded;
-		for (float i = 1; i < steps; i++) {
-			// 345 happens to be the distance on our 3D Hilbert curve that corresponds to
-			// (7,7,7).
-			decoded = Math.round(345 * (i / (steps - 1)));
-			cr = (CoordPacker.hilbert3X[decoded] / 7f) * dr + fromColor.r;
-			cg = (CoordPacker.hilbert3Y[decoded] / 7f) * dg + fromColor.g;
-			cb = (CoordPacker.hilbert3Z[decoded] / 7f) * db + fromColor.b;
-			colors.add(get(cr, cg, cb, a));
-		}
-		return colors;
-	}
-
-	@Override
-	public String toString() {
-		return "SquidColorCenter{" + "filter=" + (filter == null ? "null" : filter.getClass().getSimpleName()) + '}';
-	}
-}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1581 - 1351
squidlib/src/main/java/squidpony/squidgrid/gui/gdx/TextCellFactory.java