diff --git a/.gitignore b/.gitignore
index 8e37d48b2..e5d2e38b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,5 @@
-.classpath
-.project
-project.properties
-proguard.cfg
-
# Built application files
*.apk
-*.ap_
# Files for the Dalvik VM
*.dex
@@ -13,10 +7,6 @@ proguard.cfg
# Java class files
*.class
-# Generated files
-bin/
-gen/
-
# Gradle files
.gradle/
build/
@@ -24,9 +14,6 @@ build/
# Local configuration file (sdk path, etc)
local.properties
-# Proguard folder generated by Eclipse
-proguard/
-
#intellij project files
*.iml
-*.idea
\ No newline at end of file
+*.idea
diff --git a/SPD-classes/build.gradle b/SPD-classes/build.gradle
new file mode 100644
index 000000000..29231771f
--- /dev/null
+++ b/SPD-classes/build.gradle
@@ -0,0 +1,6 @@
+apply plugin: 'com.android.library'
+
+android {
+ compileSdkVersion 23
+ buildToolsVersion "24.0.0"
+}
\ No newline at end of file
diff --git a/SPD-classes/src/main/AndroidManifest.xml b/SPD-classes/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..c85e822df
--- /dev/null
+++ b/SPD-classes/src/main/AndroidManifest.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
diff --git a/SPD-classes/src/main/java/com/watabou/glscripts/Script.java b/SPD-classes/src/main/java/com/watabou/glscripts/Script.java
new file mode 100644
index 000000000..e8ed81d46
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/glscripts/Script.java
@@ -0,0 +1,86 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.glscripts;
+
+import java.util.HashMap;
+
+import com.watabou.glwrap.Program;
+import com.watabou.glwrap.Shader;
+
+public class Script extends Program {
+
+ private static final HashMap,Script> all =
+ new HashMap, Script>();
+
+ private static Script curScript = null;
+ private static Class extends Script> curScriptClass = null;
+
+ @SuppressWarnings("unchecked")
+ public static T use( Class c ) {
+
+ if (c != curScriptClass) {
+
+ Script script = all.get( c );
+ if (script == null) {
+ try {
+ script = c.newInstance();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ all.put( c, script );
+ }
+
+ if (curScript != null) {
+ curScript.unuse();
+ }
+
+ curScript = script;
+ curScriptClass = c;
+ curScript.use();
+
+ }
+
+ return (T)curScript;
+ }
+
+ public static void reset() {
+ for (Script script:all.values()) {
+ script.delete();
+ }
+ all.clear();
+
+ curScript = null;
+ curScriptClass = null;
+ }
+
+ public void compile( String src ) {
+
+ String[] srcShaders = src.split( "//\n" );
+ attach( Shader.createCompiled( Shader.VERTEX, srcShaders[0] ) );
+ attach( Shader.createCompiled( Shader.FRAGMENT, srcShaders[1] ) );
+ link();
+
+ }
+
+ public void unuse() {
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/gltextures/Atlas.java b/SPD-classes/src/main/java/com/watabou/gltextures/Atlas.java
new file mode 100644
index 000000000..0ae2b4d72
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/gltextures/Atlas.java
@@ -0,0 +1,99 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.gltextures;
+
+import java.util.HashMap;
+
+import android.graphics.RectF;
+
+public class Atlas {
+
+ public SmartTexture tx;
+
+ protected HashMap namedFrames;
+
+ protected float uvLeft;
+ protected float uvTop;
+ protected float uvWidth;
+ protected float uvHeight;
+ protected int cols;
+
+ public Atlas( SmartTexture tx ) {
+
+ this.tx = tx;
+ tx.atlas = this;
+
+ namedFrames = new HashMap();
+ }
+
+ public void add( Object key, int left, int top, int right, int bottom ) {
+ add( key, uvRect( tx, left, top, right, bottom ) );
+ }
+
+ public void add( Object key, RectF rect ) {
+ namedFrames.put( key, rect );
+ }
+
+ public void grid( int width ) {
+ grid( width, tx.height );
+ }
+
+ public void grid( int width, int height ) {
+ grid( 0, 0, width, height, tx.width / width );
+ }
+
+ public void grid( int left, int top, int width, int height, int cols ) {
+ uvLeft = (float)left / tx.width;
+ uvTop = (float)top / tx.height;
+ uvWidth = (float)width / tx.width;
+ uvHeight= (float)height / tx.height;
+ this.cols = cols;
+ }
+
+ public RectF get( int index ) {
+ float x = index % cols;
+ float y = index / cols;
+ float l = uvLeft + x * uvWidth;
+ float t = uvTop + y * uvHeight;
+ return new RectF( l, t, l + uvWidth, t + uvHeight );
+ }
+
+ public RectF get( Object key ) {
+ return namedFrames.get( key );
+ }
+
+ public float width( RectF rect ) {
+ return rect.width() * tx.width;
+ }
+
+ public float height( RectF rect ) {
+ return rect.height() * tx.height;
+ }
+
+ public static RectF uvRect( SmartTexture tx, int left, int top, int right, int bottom ) {
+ return new RectF(
+ (float)left / tx.width,
+ (float)top / tx.height,
+ (float)right / tx.width,
+ (float)bottom / tx.height );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/gltextures/Gradient.java b/SPD-classes/src/main/java/com/watabou/gltextures/Gradient.java
new file mode 100644
index 000000000..f6cce8274
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/gltextures/Gradient.java
@@ -0,0 +1,42 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.gltextures;
+
+import android.graphics.Bitmap;
+
+public class Gradient extends SmartTexture {
+
+ public Gradient( int colors[] ) {
+
+ super( Bitmap.createBitmap( colors.length, 1, Bitmap.Config.ARGB_8888 ) );
+
+ for (int i=0; i < colors.length; i++) {
+ bitmap.setPixel( i, 0, colors[i] );
+ }
+ bitmap( bitmap );
+
+ filter( LINEAR, LINEAR );
+ wrap( CLAMP, CLAMP );
+
+ TextureCache.add( Gradient.class, this );
+ }
+}
\ No newline at end of file
diff --git a/SPD-classes/src/main/java/com/watabou/gltextures/SmartTexture.java b/SPD-classes/src/main/java/com/watabou/gltextures/SmartTexture.java
new file mode 100644
index 000000000..dab0dfdd4
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/gltextures/SmartTexture.java
@@ -0,0 +1,107 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.gltextures;
+
+import android.graphics.Bitmap;
+import android.graphics.RectF;
+
+import com.watabou.glwrap.Texture;
+
+public class SmartTexture extends Texture {
+
+ public int width;
+ public int height;
+
+ public int fModeMin;
+ public int fModeMax;
+
+ public int wModeH;
+ public int wModeV;
+
+ public Bitmap bitmap;
+
+ public Atlas atlas;
+
+ public SmartTexture( Bitmap bitmap ) {
+ this( bitmap, NEAREST, CLAMP, false );
+ }
+
+ public SmartTexture( Bitmap bitmap, int filtering, int wrapping, boolean premultiplied ) {
+
+ super();
+
+ bitmap( bitmap, premultiplied );
+ filter( filtering, filtering );
+ wrap( wrapping, wrapping );
+
+ }
+
+ @Override
+ public void filter(int minMode, int maxMode) {
+ super.filter( fModeMin = minMode, fModeMax = maxMode);
+ }
+
+ @Override
+ public void wrap( int s, int t ) {
+ super.wrap( wModeH = s, wModeV = t );
+ }
+
+ @Override
+ public void bitmap( Bitmap bitmap ) {
+ bitmap( bitmap, false );
+ }
+
+ public void bitmap( Bitmap bitmap, boolean premultiplied ) {
+ if (premultiplied) {
+ super.bitmap( bitmap );
+ } else {
+ handMade( bitmap, true );
+ }
+
+ this.bitmap = bitmap;
+ width = bitmap.getWidth();
+ height = bitmap.getHeight();
+ }
+
+ public void reload() {
+ id = new SmartTexture( bitmap, NEAREST, CLAMP, premultiplied ).id;
+ filter( fModeMin, fModeMax );
+ wrap( wModeH, wModeV );
+ }
+
+ @Override
+ public void delete() {
+
+ super.delete();
+
+ bitmap.recycle();
+ bitmap = null;
+ }
+
+ public RectF uvRect( int left, int top, int right, int bottom ) {
+ return new RectF(
+ (float)left / width,
+ (float)top / height,
+ (float)right / width,
+ (float)bottom / height );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/gltextures/TextureCache.java b/SPD-classes/src/main/java/com/watabou/gltextures/TextureCache.java
new file mode 100644
index 000000000..3bc649526
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/gltextures/TextureCache.java
@@ -0,0 +1,164 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.gltextures;
+
+import java.util.HashMap;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.graphics.LinearGradient;
+import android.graphics.Paint;
+import android.graphics.Shader.TileMode;
+
+import com.watabou.glwrap.Texture;
+
+public class TextureCache {
+
+ public static Context context;
+
+ private static HashMap all = new HashMap<>();
+
+ // No dithering, no scaling, 32 bits per pixel
+ private static BitmapFactory.Options bitmapOptions = new BitmapFactory.Options();
+ static {
+ bitmapOptions.inScaled = false;
+ bitmapOptions.inDither = false;
+ bitmapOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;
+ }
+
+ public static SmartTexture createSolid( int color ) {
+ final String key = "1x1:" + color;
+
+ if (all.containsKey( key )) {
+
+ return all.get( key );
+
+ } else {
+
+ Bitmap bmp = Bitmap.createBitmap( 1, 1, Bitmap.Config.ARGB_8888 );
+ bmp.eraseColor( color );
+
+ SmartTexture tx = new SmartTexture( bmp );
+ all.put( key, tx );
+
+ return tx;
+ }
+ }
+
+ public static SmartTexture createGradient( int width, int height, int... colors ) {
+
+ final String key = "" + width + "x" + height + ":" + colors;
+
+ if (all.containsKey( key )) {
+
+ return all.get( key );
+
+ } else {
+
+ Bitmap bmp = Bitmap.createBitmap( width, height, Bitmap.Config.ARGB_8888 );
+ Canvas canvas = new Canvas( bmp );
+ Paint paint = new Paint();
+ paint.setShader( new LinearGradient( 0, 0, 0, height, colors, null, TileMode.CLAMP ) );
+ canvas.drawPaint( paint );
+
+ SmartTexture tx = new SmartTexture( bmp );
+ all.put( key, tx );
+ return tx;
+ }
+
+ }
+
+ public static void add( Object key, SmartTexture tx ) {
+ all.put( key, tx );
+ }
+
+ public static SmartTexture get( Object src ) {
+
+ if (all.containsKey( src )) {
+
+ return all.get( src );
+
+ } else if (src instanceof SmartTexture) {
+
+ return (SmartTexture)src;
+
+ } else {
+
+ SmartTexture tx = new SmartTexture( getBitmap( src ) );
+ all.put( src, tx );
+ return tx;
+ }
+
+ }
+
+ public static void clear() {
+
+ for (Texture txt:all.values()) {
+ txt.delete();
+ }
+ all.clear();
+
+ }
+
+ public static void reload() {
+ for (SmartTexture tx:all.values()) {
+ tx.reload();
+ }
+ }
+
+ public static Bitmap getBitmap( Object src ) {
+
+ try {
+ if (src instanceof Integer){
+
+ return BitmapFactory.decodeResource(
+ context.getResources(), (Integer)src, bitmapOptions );
+
+ } else if (src instanceof String) {
+
+ return BitmapFactory.decodeStream(
+ context.getAssets().open( (String)src ), null, bitmapOptions );
+
+ } else if (src instanceof Bitmap) {
+
+ return (Bitmap)src;
+
+ } else {
+
+ return null;
+
+ }
+ } catch (Exception e) {
+
+ e.printStackTrace();
+ return null;
+
+ }
+ }
+
+ public static boolean contains( Object key ) {
+ return all.containsKey( key );
+ }
+
+}
diff --git a/SPD-classes/src/main/java/com/watabou/glwrap/Attribute.java b/SPD-classes/src/main/java/com/watabou/glwrap/Attribute.java
new file mode 100644
index 000000000..ea8ab4532
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/glwrap/Attribute.java
@@ -0,0 +1,51 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.glwrap;
+
+import java.nio.FloatBuffer;
+
+import android.opengl.GLES20;
+
+public class Attribute {
+
+ private int location;
+
+ public Attribute( int location ) {
+ this.location = location;
+ }
+
+ public int location() {
+ return location;
+ }
+
+ public void enable() {
+ GLES20.glEnableVertexAttribArray( location );
+ }
+
+ public void disable() {
+ GLES20.glDisableVertexAttribArray( location );
+ }
+
+ public void vertexPointer( int size, int stride, FloatBuffer ptr ) {
+ GLES20.glVertexAttribPointer( location, size, GLES20.GL_FLOAT, false, stride * Float.SIZE / 8, ptr );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/glwrap/Framebuffer.java b/SPD-classes/src/main/java/com/watabou/glwrap/Framebuffer.java
new file mode 100644
index 000000000..bb7a7ffd0
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/glwrap/Framebuffer.java
@@ -0,0 +1,69 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.glwrap;
+
+import android.opengl.GLES20;
+
+public class Framebuffer {
+
+ public static final int COLOR = GLES20.GL_COLOR_ATTACHMENT0;
+ public static final int DEPTH = GLES20.GL_DEPTH_ATTACHMENT;
+ public static final int STENCIL = GLES20.GL_STENCIL_ATTACHMENT;
+
+ public static final Framebuffer system = new Framebuffer( 0 );
+
+ private int id;
+
+ public Framebuffer() {
+ int[] buffers = new int[1];
+ GLES20.glGenBuffers( 1, buffers, 0 );
+ id = buffers[0];
+ }
+
+ private Framebuffer( int n ) {
+
+ }
+
+ public void bind() {
+ GLES20.glBindFramebuffer( GLES20.GL_FRAMEBUFFER, id );
+ }
+
+ public void delete() {
+ int[] buffers = {id};
+ GLES20.glDeleteFramebuffers( 1, buffers, 0 );
+ }
+
+ public void attach( int point, Texture tex ) {
+ bind();
+ GLES20.glFramebufferTexture2D( GLES20.GL_FRAMEBUFFER, point, GLES20.GL_TEXTURE_2D, tex.id, 0 );
+ }
+
+ public void attach( int point, Renderbuffer buffer ) {
+ bind();
+ GLES20.glFramebufferRenderbuffer( GLES20.GL_RENDERBUFFER, point, GLES20.GL_TEXTURE_2D, buffer.id() );
+ }
+
+ public boolean status() {
+ bind();
+ return GLES20.glCheckFramebufferStatus( GLES20.GL_FRAMEBUFFER ) == GLES20.GL_FRAMEBUFFER_COMPLETE;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/glwrap/Matrix.java b/SPD-classes/src/main/java/com/watabou/glwrap/Matrix.java
new file mode 100644
index 000000000..e34114741
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/glwrap/Matrix.java
@@ -0,0 +1,103 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.glwrap;
+
+public class Matrix {
+
+ public static final float G2RAD = 0.01745329251994329576923690768489f;
+
+ public static float[] clone( float[] m ) {
+
+ int n = m.length;
+ float[] res = new float[n];
+ do {
+ res[--n] = m[n];
+ } while (n > 0);
+
+ return res;
+ }
+
+ public static void copy( float[] src, float[] dst ) {
+
+ int n = src.length;
+ do {
+ dst[--n] = src[n];
+ } while (n > 0);
+
+ }
+
+ public static void setIdentity( float[] m ) {
+ for (int i=0 ; i < 16 ; i++) {
+ m[i] = 0f;
+ }
+ for (int i = 0; i < 16; i += 5) {
+ m[i] = 1f;
+ }
+ }
+
+ public static void rotate( float[] m, float a ) {
+ a *= G2RAD;
+ float sin = (float)Math.sin( a );
+ float cos = (float)Math.cos( a );
+ float m0 = m[0];
+ float m1 = m[1];
+ float m4 = m[4];
+ float m5 = m[5];
+ m[0] = m0 * cos + m4 * sin;
+ m[1] = m1 * cos + m5 * sin;
+ m[4] = -m0 * sin + m4 * cos;
+ m[5] = -m1 * sin + m5 * cos;
+ }
+
+ public static void skewX( float[] m, float a ) {
+ double t = Math.tan( a * G2RAD );
+ m[4] += -m[0] * t;
+ m[5] += -m[1] * t;
+ }
+
+ public static void skewY( float[] m, float a ) {
+ double t = Math.tan( a * G2RAD );
+ m[0] += m[4] * t;
+ m[1] += m[5] * t;
+ }
+
+ public static void scale( float[] m, float x, float y ) {
+ m[0] *= x;
+ m[1] *= x;
+ m[2] *= x;
+ m[3] *= x;
+ m[4] *= y;
+ m[5] *= y;
+ m[6] *= y;
+ m[7] *= y;
+ // android.opengl.Matrix.scaleM( m, 0, x, y, 1 );
+ }
+
+ public static void translate( float[] m, float x, float y ) {
+ m[12] += m[0] * x + m[4] * y;
+ m[13] += m[1] * x + m[5] * y;
+ }
+
+ public static void multiply( float[] left, float right[], float[] result ) {
+ android.opengl.Matrix.multiplyMM( result, 0, left, 0, right, 0 );
+ }
+}
\ No newline at end of file
diff --git a/SPD-classes/src/main/java/com/watabou/glwrap/Program.java b/SPD-classes/src/main/java/com/watabou/glwrap/Program.java
new file mode 100644
index 000000000..1a6899954
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/glwrap/Program.java
@@ -0,0 +1,76 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.glwrap;
+
+import android.opengl.GLES20;
+
+public class Program {
+
+ private int handle;
+
+ public Program() {
+ handle = GLES20.glCreateProgram();
+ }
+
+ public int handle() {
+ return handle;
+ }
+
+ public void attach( Shader shader ) {
+ GLES20.glAttachShader( handle, shader.handle() );
+ }
+
+ public void link() {
+ GLES20.glLinkProgram( handle );
+
+ int[] status = new int[1];
+ GLES20.glGetProgramiv( handle, GLES20.GL_LINK_STATUS, status, 0 );
+ if (status[0] == GLES20.GL_FALSE) {
+ throw new Error( GLES20.glGetProgramInfoLog( handle ) );
+ }
+ }
+
+ public Attribute attribute( String name ) {
+ return new Attribute( GLES20.glGetAttribLocation( handle, name ) );
+ }
+
+ public Uniform uniform( String name ) {
+ return new Uniform( GLES20.glGetUniformLocation( handle, name ) );
+ }
+
+ public void use() {
+ GLES20.glUseProgram( handle );
+ }
+
+ public void delete() {
+ GLES20.glDeleteProgram( handle );
+ }
+
+ public static Program create( Shader ...shaders ) {
+ Program program = new Program();
+ for (int i=0; i < shaders.length; i++) {
+ program.attach( shaders[i] );
+ }
+ program.link();
+ return program;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/glwrap/Quad.java b/SPD-classes/src/main/java/com/watabou/glwrap/Quad.java
new file mode 100644
index 000000000..40feeafc4
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/glwrap/Quad.java
@@ -0,0 +1,140 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.glwrap;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.FloatBuffer;
+import java.nio.ShortBuffer;
+
+public class Quad {
+
+ // 0---1
+ // | \ |
+ // 3---2
+ public static final short[] VALUES = {0, 1, 2, 0, 2, 3};
+
+ public static final int SIZE = VALUES.length;
+
+ private static ShortBuffer indices;
+ private static int indexSize = 0;
+
+ public static FloatBuffer create() {
+ return ByteBuffer.
+ allocateDirect( 16 * Float.SIZE / 8 ).
+ order( ByteOrder.nativeOrder() ).
+ asFloatBuffer();
+ }
+
+ public static FloatBuffer createSet( int size ) {
+ return ByteBuffer.
+ allocateDirect( size * 16 * Float.SIZE / 8 ).
+ order( ByteOrder.nativeOrder() ).
+ asFloatBuffer();
+ }
+
+ public static ShortBuffer getIndices( int size ) {
+
+ if (size > indexSize) {
+
+ // TODO: Optimize it!
+
+ indexSize = size;
+ indices = ByteBuffer.
+ allocateDirect( size * SIZE * Short.SIZE / 8 ).
+ order( ByteOrder.nativeOrder() ).
+ asShortBuffer();
+
+ short[] values = new short[size * 6];
+ int pos = 0;
+ int limit = size * 4;
+ for (int ofs=0; ofs < limit; ofs += 4) {
+ values[pos++] = (short)(ofs + 0);
+ values[pos++] = (short)(ofs + 1);
+ values[pos++] = (short)(ofs + 2);
+ values[pos++] = (short)(ofs + 0);
+ values[pos++] = (short)(ofs + 2);
+ values[pos++] = (short)(ofs + 3);
+ }
+
+ indices.put( values );
+ indices.position( 0 );
+ }
+
+ return indices;
+ }
+
+ public static void fill( float[] v,
+ float x1, float x2, float y1, float y2,
+ float u1, float u2, float v1, float v2 ) {
+
+ v[0] = x1;
+ v[1] = y1;
+ v[2] = u1;
+ v[3] = v1;
+
+ v[4] = x2;
+ v[5] = y1;
+ v[6] = u2;
+ v[7] = v1;
+
+ v[8] = x2;
+ v[9] = y2;
+ v[10]= u2;
+ v[11]= v2;
+
+ v[12]= x1;
+ v[13]= y2;
+ v[14]= u1;
+ v[15]= v2;
+ }
+
+ public static void fillXY( float[] v, float x1, float x2, float y1, float y2 ) {
+
+ v[0] = x1;
+ v[1] = y1;
+
+ v[4] = x2;
+ v[5] = y1;
+
+ v[8] = x2;
+ v[9] = y2;
+
+ v[12]= x1;
+ v[13]= y2;
+ }
+
+ public static void fillUV( float[] v, float u1, float u2, float v1, float v2 ) {
+
+ v[2] = u1;
+ v[3] = v1;
+
+ v[6] = u2;
+ v[7] = v1;
+
+ v[10]= u2;
+ v[11]= v2;
+
+ v[14]= u1;
+ v[15]= v2;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/glwrap/Renderbuffer.java b/SPD-classes/src/main/java/com/watabou/glwrap/Renderbuffer.java
new file mode 100644
index 000000000..47fb1b958
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/glwrap/Renderbuffer.java
@@ -0,0 +1,56 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.glwrap;
+
+import android.opengl.GLES20;
+
+public class Renderbuffer {
+
+ public static final int RGBA8 = GLES20.GL_RGBA; // ?
+ public static final int DEPTH16 = GLES20.GL_DEPTH_COMPONENT16;
+ public static final int STENCIL8 = GLES20.GL_STENCIL_INDEX8;
+
+ private int id;
+
+ public Renderbuffer() {
+ int[] buffers = new int[1];
+ GLES20.glGenRenderbuffers( 1, buffers, 0 );
+ id = buffers[0];
+ }
+
+ public int id() {
+ return id;
+ }
+
+ public void bind() {
+ GLES20.glBindRenderbuffer( GLES20.GL_RENDERBUFFER, id );
+ }
+
+ public void delete() {
+ int[] buffers = {id};
+ GLES20.glDeleteRenderbuffers( 1, buffers, 0 );
+ }
+
+ public void storage( int format, int width, int height ) {
+ GLES20.glRenderbufferStorage( GLES20.GL_RENDERBUFFER, format , width, height );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/glwrap/Shader.java b/SPD-classes/src/main/java/com/watabou/glwrap/Shader.java
new file mode 100644
index 000000000..a60feed85
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/glwrap/Shader.java
@@ -0,0 +1,65 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.glwrap;
+
+import android.opengl.GLES20;
+
+public class Shader {
+
+ public static final int VERTEX = GLES20.GL_VERTEX_SHADER;
+ public static final int FRAGMENT = GLES20.GL_FRAGMENT_SHADER;
+
+ private int handle;
+
+ public Shader( int type ) {
+ handle = GLES20.glCreateShader( type );
+ }
+
+ public int handle() {
+ return handle;
+ }
+
+ public void source( String src ) {
+ GLES20.glShaderSource( handle, src );
+ }
+
+ public void compile() {
+ GLES20.glCompileShader( handle );
+
+ int[] status = new int[1];
+ GLES20.glGetShaderiv( handle, GLES20.GL_COMPILE_STATUS, status, 0 );
+ if (status[0] == GLES20.GL_FALSE) {
+ throw new Error( GLES20.glGetShaderInfoLog( handle ) );
+ }
+ }
+
+ public void delete() {
+ GLES20.glDeleteShader( handle );
+ }
+
+ public static Shader createCompiled( int type, String src ) {
+ Shader shader = new Shader( type );
+ shader.source( src );
+ shader.compile();
+ return shader;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/glwrap/Texture.java b/SPD-classes/src/main/java/com/watabou/glwrap/Texture.java
new file mode 100644
index 000000000..2260636e2
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/glwrap/Texture.java
@@ -0,0 +1,183 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.glwrap;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.IntBuffer;
+
+import android.graphics.Bitmap;
+import android.opengl.GLES20;
+import android.opengl.GLUtils;
+
+public class Texture {
+
+ public static final int NEAREST = GLES20.GL_NEAREST;
+ public static final int LINEAR = GLES20.GL_LINEAR;
+
+ public static final int REPEAT = GLES20.GL_REPEAT;
+ public static final int MIRROR = GLES20.GL_MIRRORED_REPEAT;
+ public static final int CLAMP = GLES20.GL_CLAMP_TO_EDGE;
+
+ public int id;
+ private static int bound_id = 0; //id of the currently bound texture
+
+ public boolean premultiplied = false;
+
+ public Texture() {
+ int[] ids = new int[1];
+ GLES20.glGenTextures( 1, ids, 0 );
+ id = ids[0];
+
+ bind();
+ }
+
+ public static void activate( int index ) {
+ GLES20.glActiveTexture( GLES20.GL_TEXTURE0 + index );
+ }
+
+ public void bind() {
+ if (id != bound_id) {
+ GLES20.glBindTexture( GLES20.GL_TEXTURE_2D, id );
+ bound_id = id;
+ }
+ }
+
+ public void filter( int minMode, int maxMode ) {
+ bind();
+ GLES20.glTexParameterf( GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, minMode );
+ GLES20.glTexParameterf( GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, maxMode );
+ }
+
+ public void wrap( int s, int t ) {
+ bind();
+ GLES20.glTexParameterf( GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, s );
+ GLES20.glTexParameterf( GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, t );
+ }
+
+ public void delete() {
+ if (bound_id == id) bound_id = 0;
+ int[] ids = {id};
+ GLES20.glDeleteTextures( 1, ids, 0 );
+ }
+
+ public void bitmap( Bitmap bitmap ) {
+ bind();
+ GLUtils.texImage2D( GLES20.GL_TEXTURE_2D, 0, bitmap, 0 );
+
+ premultiplied = true;
+ }
+
+ public void pixels( int w, int h, int[] pixels ) {
+
+ bind();
+
+ IntBuffer imageBuffer = ByteBuffer.
+ allocateDirect( w * h * 4 ).
+ order( ByteOrder.nativeOrder() ).
+ asIntBuffer();
+ imageBuffer.put( pixels );
+ imageBuffer.position( 0 );
+
+ GLES20.glTexImage2D(
+ GLES20.GL_TEXTURE_2D,
+ 0,
+ GLES20.GL_RGBA,
+ w,
+ h,
+ 0,
+ GLES20.GL_RGBA,
+ GLES20.GL_UNSIGNED_BYTE,
+ imageBuffer );
+ }
+
+ public void pixels( int w, int h, byte[] pixels ) {
+
+ bind();
+
+ ByteBuffer imageBuffer = ByteBuffer.
+ allocateDirect( w * h ).
+ order( ByteOrder.nativeOrder() );
+ imageBuffer.put( pixels );
+ imageBuffer.position( 0 );
+
+ GLES20.glPixelStorei( GLES20.GL_UNPACK_ALIGNMENT, 1 );
+
+ GLES20.glTexImage2D(
+ GLES20.GL_TEXTURE_2D,
+ 0,
+ GLES20.GL_ALPHA,
+ w,
+ h,
+ 0,
+ GLES20.GL_ALPHA,
+ GLES20.GL_UNSIGNED_BYTE,
+ imageBuffer );
+ }
+
+ // If getConfig returns null (unsupported format?), GLUtils.texImage2D works
+ // incorrectly. In this case we need to load pixels manually
+ public void handMade( Bitmap bitmap, boolean recode ) {
+
+ int w = bitmap.getWidth();
+ int h = bitmap.getHeight();
+
+ int[] pixels = new int[w * h];
+ bitmap.getPixels( pixels, 0, w, 0, 0, w, h );
+
+ // recode - components reordering is needed
+ if (recode) {
+ for (int i=0; i < pixels.length; i++) {
+ int color = pixels[i];
+ int ag = color & 0xFF00FF00;
+ int r = (color >> 16) & 0xFF;
+ int b = color & 0xFF;
+ pixels[i] = ag | (b << 16) | r;
+ }
+ }
+
+ pixels( w, h, pixels );
+
+ premultiplied = false;
+ }
+
+ public static Texture create( Bitmap bmp ) {
+ Texture tex = new Texture();
+ tex.bitmap( bmp );
+
+ return tex;
+ }
+
+ public static Texture create( int width, int height, int[] pixels ) {
+ Texture tex = new Texture();
+ tex.pixels( width, height, pixels );
+
+ return tex;
+ }
+
+ public static Texture create( int width, int height, byte[] pixels ) {
+ Texture tex = new Texture();
+ tex.pixels( width, height, pixels );
+
+ return tex;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/glwrap/Uniform.java b/SPD-classes/src/main/java/com/watabou/glwrap/Uniform.java
new file mode 100644
index 000000000..f487c8651
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/glwrap/Uniform.java
@@ -0,0 +1,69 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.glwrap;
+
+import android.opengl.GLES20;
+
+public class Uniform {
+
+ private int location;
+
+ public Uniform( int location ) {
+ this.location = location;
+ }
+
+ public int location() {
+ return location;
+ }
+
+ public void enable() {
+ GLES20.glEnableVertexAttribArray( location );
+ }
+
+ public void disable() {
+ GLES20.glDisableVertexAttribArray( location );
+ }
+
+ public void value( int value ) {
+ GLES20.glUniform1i( location, value );
+ }
+
+ public void value1f( float value ) {
+ GLES20.glUniform1f( location, value );
+ }
+
+ public void value2f( float v1, float v2 ) {
+ GLES20.glUniform2f( location, v1, v2 );
+ }
+
+ public void value4f( float v1, float v2, float v3, float v4 ) {
+ GLES20.glUniform4f( location, v1, v2, v3, v4 );
+ }
+
+ public void valueM3( float[] value ) {
+ GLES20.glUniformMatrix3fv( location, 1, false, value, 0 );
+ }
+
+ public void valueM4( float[] value ) {
+ GLES20.glUniformMatrix4fv( location, 1, false, value, 0 );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/input/Keys.java b/SPD-classes/src/main/java/com/watabou/input/Keys.java
new file mode 100644
index 000000000..ee6c440f5
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/input/Keys.java
@@ -0,0 +1,65 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.input;
+
+import java.util.ArrayList;
+
+import com.watabou.utils.Signal;
+
+import android.view.KeyEvent;
+
+public class Keys {
+
+ public static final int BACK = KeyEvent.KEYCODE_BACK;
+ public static final int MENU = KeyEvent.KEYCODE_MENU;
+
+ public static Signal event = new Signal( true );
+
+ public static void processTouchEvents( ArrayList events ) {
+
+ int size = events.size();
+ for (int i=0; i < size; i++) {
+
+ KeyEvent e = events.get( i );
+
+ switch (e.getAction()) {
+ case KeyEvent.ACTION_DOWN:
+ event.dispatch( new Key( e.getKeyCode(), true ) );
+ break;
+ case KeyEvent.ACTION_UP:
+ event.dispatch( new Key( e.getKeyCode(), false ) );
+ break;
+ }
+ }
+ }
+
+ public static class Key {
+
+ public int code;
+ public boolean pressed;
+
+ public Key( int code, boolean pressed ) {
+ this.code = code;
+ this.pressed = pressed;
+ }
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/input/Touchscreen.java b/SPD-classes/src/main/java/com/watabou/input/Touchscreen.java
new file mode 100644
index 000000000..513bf6045
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/input/Touchscreen.java
@@ -0,0 +1,116 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.input;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import com.watabou.utils.PointF;
+import com.watabou.utils.Signal;
+
+import android.view.MotionEvent;
+
+public class Touchscreen {
+
+ public static Signal event = new Signal( true );
+
+ public static HashMap pointers = new HashMap();
+
+ public static float x;
+ public static float y;
+ public static boolean touched;
+
+ public static void processTouchEvents( ArrayList events ) {
+
+ int size = events.size();
+ for (int i=0; i < size; i++) {
+
+ MotionEvent e = events.get( i );
+ Touch touch;
+
+ switch (e.getAction() & MotionEvent.ACTION_MASK) {
+
+ case MotionEvent.ACTION_DOWN:
+ touched = true;
+ touch = new Touch( e, 0 );
+ pointers.put( e.getPointerId( 0 ), touch );
+ event.dispatch( touch );
+ break;
+
+ case MotionEvent.ACTION_POINTER_DOWN:
+ int index = e.getActionIndex();
+ touch = new Touch( e, index );
+ pointers.put( e.getPointerId( index ), touch );
+ event.dispatch( touch );
+ break;
+
+ case MotionEvent.ACTION_MOVE:
+ int count = e.getPointerCount();
+ for (int j=0; j < count; j++) {
+ pointers.get( e.getPointerId( j ) ).update( e, j );
+ }
+ event.dispatch( null );
+ break;
+
+ case MotionEvent.ACTION_POINTER_UP:
+ event.dispatch( pointers.remove( e.getPointerId( e.getActionIndex() ) ).up() );
+ break;
+
+ case MotionEvent.ACTION_UP:
+ touched = false;
+ event.dispatch( pointers.remove( e.getPointerId( 0 ) ).up() );
+ break;
+
+ }
+
+ e.recycle();
+ }
+ }
+
+ public static class Touch {
+
+ public PointF start;
+ public PointF current;
+ public boolean down;
+
+ public Touch( MotionEvent e, int index ) {
+
+ float x = e.getX( index );
+ float y = e.getY( index );
+
+ start = new PointF( x, y );
+ current = new PointF( x, y );
+
+ down = true;
+ }
+
+ public void update( MotionEvent e, int index ) {
+ current.set( e.getX( index ), e.getY( index ) );
+ }
+
+ public Touch up() {
+ down = false;
+ return this;
+ }
+ }
+
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/BitmapText.java b/SPD-classes/src/main/java/com/watabou/noosa/BitmapText.java
new file mode 100644
index 000000000..f1e5a7e38
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/BitmapText.java
@@ -0,0 +1,353 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import java.nio.FloatBuffer;
+
+import com.watabou.gltextures.SmartTexture;
+import com.watabou.gltextures.TextureCache;
+import com.watabou.glwrap.Matrix;
+import com.watabou.glwrap.Quad;
+
+import android.graphics.Bitmap;
+import android.graphics.RectF;
+
+public class BitmapText extends Visual {
+
+ protected String text;
+ protected Font font;
+
+ protected float[] vertices = new float[16];
+ protected FloatBuffer quads;
+
+ public int realLength;
+
+ protected boolean dirty = true;
+
+ public BitmapText() {
+ this( "", null );
+ }
+
+ public BitmapText( Font font ) {
+ this( "", font );
+ }
+
+ public BitmapText( String text, Font font ) {
+ super( 0, 0, 0, 0 );
+
+ this.text = text;
+ this.font = font;
+ }
+
+ @Override
+ public void destroy() {
+ text = null;
+ font = null;
+ vertices = null;
+ quads = null;
+ super.destroy();
+ }
+
+ @Override
+ protected void updateMatrix() {
+ // "origin" field is ignored
+ Matrix.setIdentity( matrix );
+ Matrix.translate( matrix, x, y );
+ Matrix.scale( matrix, scale.x, scale.y );
+ Matrix.rotate( matrix, angle );
+ }
+
+ @Override
+ public void draw() {
+
+ super.draw();
+
+ NoosaScript script = NoosaScript.get();
+
+ font.texture.bind();
+
+ if (dirty) {
+ updateVertices();
+ }
+
+ script.camera( camera() );
+
+ script.uModel.valueM4( matrix );
+ script.lighting(
+ rm, gm, bm, am,
+ ra, ga, ba, aa );
+ script.drawQuadSet( quads, realLength );
+
+ }
+
+ protected void updateVertices() {
+
+ width = 0;
+ height = 0;
+
+ if (text == null) {
+ text = "";
+ }
+
+ quads = Quad.createSet( text.length() );
+ realLength = 0;
+
+ int length = text.length();
+ for (int i=0; i < length; i++) {
+ RectF rect = font.get( text.charAt( i ) );
+
+ if (rect == null) {
+ rect=null;
+ }
+ float w = font.width( rect );
+ float h = font.height( rect );
+
+ vertices[0] = width;
+ vertices[1] = 0;
+
+ vertices[2] = rect.left;
+ vertices[3] = rect.top;
+
+ vertices[4] = width + w;
+ vertices[5] = 0;
+
+ vertices[6] = rect.right;
+ vertices[7] = rect.top;
+
+ vertices[8] = width + w;
+ vertices[9] = h;
+
+ vertices[10] = rect.right;
+ vertices[11] = rect.bottom;
+
+ vertices[12] = width;
+ vertices[13] = h;
+
+ vertices[14] = rect.left;
+ vertices[15] = rect.bottom;
+
+ quads.put( vertices );
+ realLength++;
+
+ width += w + font.tracking;
+ if (h > height) {
+ height = h;
+ }
+ }
+
+ if (length > 0) {
+ width -= font.tracking;
+ }
+
+ dirty = false;
+
+ }
+
+ public void measure() {
+
+ width = 0;
+ height = 0;
+
+ if (text == null) {
+ text = "";
+ }
+
+ int length = text.length();
+ for (int i=0; i < length; i++) {
+ RectF rect = font.get( text.charAt( i ) );
+
+ float w = font.width( rect );
+ float h = font.height( rect );
+
+ width += w + font.tracking;
+ if (h > height) {
+ height = h;
+ }
+ }
+
+ if (length > 0) {
+ width -= font.tracking;
+ }
+ }
+
+ public float baseLine() {
+ return font.baseLine * scale.y;
+ }
+
+ public Font font() {
+ return font;
+ }
+
+ public void font( Font value ) {
+ font = value;
+ }
+
+ public String text() {
+ return text;
+ }
+
+ public void text( String str ) {
+ text = str;
+ dirty = true;
+ }
+
+ public static class Font extends TextureFilm {
+
+ public static final String LATIN_FULL =
+ " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u007F";
+
+ public SmartTexture texture;
+
+ public float tracking = 0;
+ public float baseLine;
+
+ public float lineHeight;
+
+ protected Font( SmartTexture tx ) {
+ super( tx );
+
+ texture = tx;
+ }
+
+ public Font( SmartTexture tx, int width, String chars ) {
+ this( tx, width, tx.height, chars );
+ }
+
+ public Font( SmartTexture tx, int width, int height, String chars ) {
+ super( tx );
+
+ texture = tx;
+
+ int length = chars.length();
+
+ float uw = (float)width / tx.width;
+ float vh = (float)height / tx.height;
+
+ float left = 0;
+ float top = 0;
+ float bottom = vh;
+
+ for (int i=0; i < length; i++) {
+ RectF rect = new RectF( left, top, left += uw, bottom );
+ add( chars.charAt( i ), rect );
+ if (left >= 1) {
+ left = 0;
+ top = bottom;
+ bottom += vh;
+ }
+ }
+
+ lineHeight = baseLine = height;
+ }
+
+ protected void splitBy( Bitmap bitmap, int height, int color, String chars ) {
+
+ int length = chars.length();
+
+ int width = bitmap.getWidth();
+ float vHeight = (float)height / bitmap.getHeight();
+
+ int pos;
+ int line = 0;
+
+ spaceMeasuring:
+ for (pos=0; pos < width; pos++) {
+ for (int j=0; j < height; j++) {
+ if (bitmap.getPixel( pos, j ) != color) {
+ break spaceMeasuring;
+ }
+ }
+ }
+ add( ' ', new RectF( 0, 0, (float)pos / width, vHeight-0.01f ) );
+
+ int separator = pos;
+
+ for (int i=0; i < length; i++) {
+
+ char ch = chars.charAt( i );
+ if (ch == ' ') {
+ continue;
+ } else {
+
+ boolean found;
+
+ do{
+ if (separator >= width) {
+ line += height;
+ separator = 0;
+ }
+ found = false;
+ for (int j=line; j < line + height; j++) {
+ if (bitmap.getPixel( separator, j ) != color) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) separator++;
+ } while (!found);
+ int start = separator;
+
+ do {
+ if (++separator >= width) {
+ line += height;
+ separator = start = 0;
+ if (line + height >= bitmap.getHeight())
+ break;
+ }
+ found = true;
+ for (int j=line; j < line + height; j++) {
+ if (bitmap.getPixel( separator, j ) != color) {
+ found = false;
+ break;
+ }
+ }
+ } while (!found);
+
+ add( ch, new RectF( (float)start / width, (float)line / bitmap.getHeight(), (float)separator / width, (float)line / bitmap.getHeight() + vHeight) );
+ separator++;
+ }
+ }
+
+ lineHeight = baseLine = height( frames.get( chars.charAt( 0 ) ) );
+ }
+
+ public static Font colorMarked( Bitmap bmp, int color, String chars ) {
+ Font font = new Font( TextureCache.get( bmp ) );
+ font.splitBy( bmp, bmp.getHeight(), color, chars );
+ return font;
+ }
+
+ public static Font colorMarked( Bitmap bmp, int height, int color, String chars ) {
+ Font font = new Font( TextureCache.get( bmp ) );
+ font.splitBy( bmp, height, color, chars );
+ return font;
+ }
+
+ public RectF get( char ch ) {
+ if (frames.containsKey( ch )){
+ return super.get( ch );
+ } else {
+ return super.get( '?' );
+ }
+ }
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/BitmapTextMultiline.java b/SPD-classes/src/main/java/com/watabou/noosa/BitmapTextMultiline.java
new file mode 100644
index 000000000..c72930119
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/BitmapTextMultiline.java
@@ -0,0 +1,325 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import java.util.ArrayList;
+import java.util.regex.Pattern;
+
+import android.graphics.RectF;
+
+import com.watabou.glwrap.Quad;
+import com.watabou.utils.PointF;
+
+public class BitmapTextMultiline extends BitmapText {
+
+ public int maxWidth = Integer.MAX_VALUE;
+
+ protected static final Pattern PARAGRAPH = Pattern.compile( "\n" );
+ protected static final Pattern WORD = Pattern.compile( "\\s+" );
+
+ protected float spaceSize;
+
+ public int nLines = 0;
+
+ public boolean[] mask;
+
+ public BitmapTextMultiline( Font font ) {
+ this( "", font );
+ }
+
+ public BitmapTextMultiline( String text, Font font ) {
+ super( text, font );
+ spaceSize = font.width( font.get( ' ' ) );
+ }
+
+ @Override
+ protected void updateVertices() {
+
+ if (text == null) {
+ text = "";
+ }
+
+ quads = Quad.createSet( text.length() );
+ realLength = 0;
+
+ // This object controls lines breaking
+ SymbolWriter writer = new SymbolWriter();
+
+ // Word size
+ PointF metrics = new PointF();
+
+ String paragraphs[] = PARAGRAPH.split( text );
+
+ // Current character (used in masking)
+ int pos = 0;
+
+ for (int i=0; i < paragraphs.length; i++) {
+
+ String[] words = WORD.split( paragraphs[i] );
+
+ for (int j=0; j < words.length; j++) {
+
+ String word = words[j];
+ if (word.length() == 0) {
+ // This case is possible when there are
+ // several spaces coming along
+ continue;
+ }
+
+
+ getWordMetrics( word, metrics );
+ writer.addSymbol( metrics.x, metrics.y );
+
+ int length = word.length();
+ float shift = 0; // Position in pixels relative to the beginning of the word
+
+ for (int k=0; k < length; k++) {
+ RectF rect = font.get( word.charAt( k ) );
+
+ float w = font.width( rect );
+ float h = font.height( rect );
+
+ if (mask == null || mask[pos]) {
+ vertices[0] = writer.x + shift;
+ vertices[1] = writer.y;
+
+ vertices[2] = rect.left;
+ vertices[3] = rect.top;
+
+ vertices[4] = writer.x + shift + w;
+ vertices[5] = writer.y;
+
+ vertices[6] = rect.right;
+ vertices[7] = rect.top;
+
+ vertices[8] = writer.x + shift + w;
+ vertices[9] = writer.y + h;
+
+ vertices[10] = rect.right;
+ vertices[11] = rect.bottom;
+
+ vertices[12] = writer.x + shift;
+ vertices[13] = writer.y + h;
+
+ vertices[14] = rect.left;
+ vertices[15] = rect.bottom;
+
+ quads.put( vertices );
+ realLength++;
+ }
+
+ shift += w + font.tracking;
+
+ pos++;
+ }
+
+ writer.addSpace( spaceSize );
+ }
+
+ writer.newLine( 0, font.lineHeight );
+ }
+
+ nLines = writer.nLines();
+
+ dirty = false;
+ }
+
+ private void getWordMetrics( String word, PointF metrics ) {
+
+ float w = 0;
+ float h = 0;
+
+ int length = word.length();
+ for (int i=0; i < length; i++) {
+
+ RectF rect = font.get( word.charAt( i ) );
+ w += font.width( rect ) + (w > 0 ? font.tracking : 0);
+ h = Math.max( h, font.height( rect ) );
+ }
+
+ metrics.set( w, h );
+ }
+
+ @Override
+ public void measure() {
+
+ SymbolWriter writer = new SymbolWriter();
+
+ PointF metrics = new PointF();
+
+ String paragraphs[] = PARAGRAPH.split( text );
+
+ for (int i=0; i < paragraphs.length; i++) {
+
+ String[] words = WORD.split( paragraphs[i] );
+
+ for (int j=0; j < words.length; j++) {
+
+ if (j > 0) {
+ writer.addSpace( spaceSize );
+ }
+ String word = words[j];
+ if (word.length() == 0) {
+ continue;
+ }
+
+ getWordMetrics( word, metrics );
+ writer.addSymbol( metrics.x, metrics.y );
+ }
+
+ writer.newLine( 0, font.lineHeight );
+ }
+
+ width = writer.width;
+ height = writer.height;
+
+ nLines = writer.nLines();
+ }
+
+ @Override
+ public float baseLine() {
+ return (height - font.lineHeight + font.baseLine) * scale.y;
+ }
+
+ private class SymbolWriter {
+
+ public float width = 0;
+ public float height = 0;
+
+ public int nLines = 0;
+
+ public float lineWidth = 0;
+ public float lineHeight = 0;
+
+ public float x = 0;
+ public float y = 0;
+
+ public void addSymbol( float w, float h ) {
+ if (lineWidth > 0 && lineWidth + font.tracking + w > maxWidth / scale.x) {
+ newLine( w, h );
+ } else {
+
+ x = lineWidth;
+
+ lineWidth += (lineWidth > 0 ? font.tracking : 0) + w;
+ if (h > lineHeight) {
+ lineHeight = h;
+ }
+ }
+ }
+
+ public void addSpace( float w ) {
+ if (lineWidth > 0 && lineWidth + font.tracking + w > maxWidth / scale.x) {
+ newLine( 0, 0 );
+ } else {
+
+ x = lineWidth;
+ lineWidth += (lineWidth > 0 ? font.tracking : 0) + w;
+ }
+ }
+
+ public void newLine( float w, float h ) {
+
+ height += lineHeight;
+ if (width < lineWidth) {
+ width = lineWidth;
+ }
+
+ lineWidth = w;
+ lineHeight = h;
+
+ x = 0;
+ y = height;
+
+ nLines++;
+ }
+
+ public int nLines() {
+ return x == 0 ? nLines : nLines+1;
+ }
+ }
+
+ public class LineSplitter {
+
+ private ArrayList lines;
+
+ private StringBuilder curLine;
+ private float curLineWidth;
+
+ private PointF metrics = new PointF();
+
+ private void newLine( String str, float width ) {
+ BitmapText txt = new BitmapText( curLine.toString(), font );
+ txt.scale.set( scale.x );
+ lines.add( txt );
+
+ curLine = new StringBuilder( str );
+ curLineWidth = width;
+ }
+
+ private void append( String str, float width ) {
+ curLineWidth += (curLineWidth > 0 ? font.tracking : 0) + width;
+ curLine.append( str );
+ }
+
+ public ArrayList split() {
+
+ lines = new ArrayList<>();
+
+ curLine = new StringBuilder();
+ curLineWidth = 0;
+
+ String paragraphs[] = PARAGRAPH.split( text );
+
+ for (int i=0; i < paragraphs.length; i++) {
+
+ String[] words = WORD.split( paragraphs[i] );
+
+ for (int j=0; j < words.length; j++) {
+
+ String word = words[j];
+ if (word.length() == 0) {
+ continue;
+ }
+
+ getWordMetrics( word, metrics );
+
+ if (curLineWidth > 0 && curLineWidth + font.tracking + metrics.x > maxWidth / scale.x) {
+ newLine( word, metrics.x );
+ } else {
+ append( word, metrics.x );
+ }
+
+ if (curLineWidth > 0 && curLineWidth + font.tracking + spaceSize > maxWidth / scale.x) {
+ newLine( "", 0 );
+ } else {
+ append( " ", spaceSize );
+ }
+ }
+
+ newLine( "", 0 );
+ }
+
+ return lines;
+ }
+ }
+}
\ No newline at end of file
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/Camera.java b/SPD-classes/src/main/java/com/watabou/noosa/Camera.java
new file mode 100644
index 000000000..9dae939b9
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/Camera.java
@@ -0,0 +1,236 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import java.util.ArrayList;
+
+import com.watabou.glwrap.Matrix;
+import com.watabou.utils.Point;
+import com.watabou.utils.PointF;
+import com.watabou.utils.Random;
+
+public class Camera extends Gizmo {
+
+ protected static ArrayList all = new ArrayList();
+
+ protected static float invW2;
+ protected static float invH2;
+
+ public static Camera main;
+
+ public float zoom;
+
+ public int x;
+ public int y;
+ public int width;
+ public int height;
+
+ int screenWidth;
+ int screenHeight;
+
+ public float[] matrix;
+
+ public PointF scroll;
+ public Visual target;
+
+ private float shakeMagX = 10f;
+ private float shakeMagY = 10f;
+ private float shakeTime = 0f;
+ private float shakeDuration = 1f;
+
+ protected float shakeX;
+ protected float shakeY;
+
+ public static Camera reset() {
+ return reset( createFullscreen( 1 ) );
+ }
+
+ public static Camera reset( Camera newCamera ) {
+
+ invW2 = 2f / Game.width;
+ invH2 = 2f / Game.height;
+
+ int length = all.size();
+ for (int i=0; i < length; i++) {
+ all.get( i ).destroy();
+ }
+ all.clear();
+
+ return main = add( newCamera );
+ }
+
+ public static Camera add( Camera camera ) {
+ all.add( camera );
+ return camera;
+ }
+
+ public static Camera remove( Camera camera ) {
+ all.remove( camera );
+ return camera;
+ }
+
+ public static void updateAll() {
+ int length = all.size();
+ for (int i=0; i < length; i++) {
+ Camera c = all.get( i );
+ if (c.exists && c.active) {
+ c.update();
+ }
+ }
+ }
+
+ public static Camera createFullscreen( float zoom ) {
+ int w = (int)Math.ceil( Game.width / zoom );
+ int h = (int)Math.ceil( Game.height / zoom );
+ return new Camera(
+ (int)(Game.width - w * zoom) / 2,
+ (int)(Game.height - h * zoom) / 2,
+ w, h, zoom );
+ }
+
+ public Camera( int x, int y, int width, int height, float zoom ) {
+
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ this.zoom = zoom;
+
+ screenWidth = (int)(width * zoom);
+ screenHeight = (int)(height * zoom);
+
+ scroll = new PointF();
+
+ matrix = new float[16];
+ Matrix.setIdentity( matrix );
+ }
+
+ @Override
+ public void destroy() {
+ target = null;
+ matrix = null;
+ }
+
+ public void zoom( float value ) {
+ zoom( value,
+ scroll.x + width / 2,
+ scroll.y + height / 2 );
+ }
+
+ public void zoom( float value, float fx, float fy ) {
+
+ zoom = value;
+ width = (int)(screenWidth / zoom);
+ height = (int)(screenHeight / zoom);
+
+ focusOn( fx, fy );
+ }
+
+ public void resize( int width, int height ) {
+ this.width = width;
+ this.height = height;
+ screenWidth = (int)(width * zoom);
+ screenHeight = (int)(height * zoom);
+ }
+
+ @Override
+ public void update() {
+ super.update();
+
+ if (target != null) {
+ focusOn( target );
+ }
+
+ if ((shakeTime -= Game.elapsed) > 0) {
+ float damping = shakeTime / shakeDuration;
+ shakeX = Random.Float( -shakeMagX, +shakeMagX ) * damping;
+ shakeY = Random.Float( -shakeMagY, +shakeMagY ) * damping;
+ } else {
+ shakeX = 0;
+ shakeY = 0;
+ }
+
+ updateMatrix();
+ }
+
+ public PointF center() {
+ return new PointF( width / 2, height / 2 );
+ }
+
+ public boolean hitTest( float x, float y ) {
+ return x >= this.x && y >= this.y && x < this.x + screenWidth && y < this.y + screenHeight;
+ }
+
+ public void focusOn( float x, float y ) {
+ scroll.set( x - width / 2, y - height / 2 );
+ }
+
+ public void focusOn( PointF point ) {
+ focusOn( point.x, point.y );
+ }
+
+ public void focusOn( Visual visual ) {
+ focusOn( visual.center() );
+ }
+
+ public PointF screenToCamera( int x, int y ) {
+ return new PointF(
+ (x - this.x) / zoom + scroll.x,
+ (y - this.y) / zoom + scroll.y );
+ }
+
+ public Point cameraToScreen( float x, float y ) {
+ return new Point(
+ (int)((x - scroll.x) * zoom + this.x),
+ (int)((y - scroll.y) * zoom + this.y));
+ }
+
+ public float screenWidth() {
+ return width * zoom;
+ }
+
+ public float screenHeight() {
+ return height * zoom;
+ }
+
+ protected void updateMatrix() {
+
+ /* Matrix.setIdentity( matrix );
+ Matrix.translate( matrix, -1, +1 );
+ Matrix.scale( matrix, 2f / G.width, -2f / G.height );
+ Matrix.translate( matrix, x, y );
+ Matrix.scale( matrix, zoom, zoom );
+ Matrix.translate( matrix, scroll.x, scroll.y );*/
+
+ matrix[0] = +zoom * invW2;
+ matrix[5] = -zoom * invH2;
+
+ matrix[12] = -1 + x * invW2 - (scroll.x + shakeX) * matrix[0];
+ matrix[13] = +1 - y * invH2 - (scroll.y + shakeY) * matrix[5];
+
+ }
+
+ public void shake( float magnitude, float duration ) {
+ shakeMagX = shakeMagY = magnitude;
+ shakeTime = shakeDuration = duration;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/ColorBlock.java b/SPD-classes/src/main/java/com/watabou/noosa/ColorBlock.java
new file mode 100644
index 000000000..592638117
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/ColorBlock.java
@@ -0,0 +1,48 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import com.watabou.gltextures.TextureCache;
+
+public class ColorBlock extends Image implements Resizable {
+
+ public ColorBlock( float width, float height, int color ) {
+ super( TextureCache.createSolid( color ) );
+ scale.set( width, height );
+ origin.set( 0, 0 );
+ }
+
+ @Override
+ public void size( float width, float height ) {
+ scale.set( width, height );
+ }
+
+ @Override
+ public float width() {
+ return scale.x;
+ }
+
+ @Override
+ public float height() {
+ return scale.y;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/Game.java b/SPD-classes/src/main/java/com/watabou/noosa/Game.java
new file mode 100644
index 000000000..f9f4298c3
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/Game.java
@@ -0,0 +1,342 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import java.util.ArrayList;
+
+import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.opengles.GL10;
+
+import com.watabou.glscripts.Script;
+import com.watabou.gltextures.TextureCache;
+import com.watabou.input.Keys;
+import com.watabou.input.Touchscreen;
+import com.watabou.noosa.audio.Music;
+import com.watabou.noosa.audio.Sample;
+import com.watabou.utils.BitmapCache;
+import com.watabou.utils.SystemTime;
+
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.media.AudioManager;
+import android.opengl.GLES20;
+import android.opengl.GLSurfaceView;
+import android.os.Bundle;
+import android.os.Vibrator;
+import android.util.DisplayMetrics;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.SurfaceHolder;
+import android.view.View;
+
+public class Game extends Activity implements GLSurfaceView.Renderer, View.OnTouchListener {
+
+ public static Game instance;
+
+ // Actual size of the screen
+ public static int width;
+ public static int height;
+
+ // Density: mdpi=1, hdpi=1.5, xhdpi=2...
+ public static float density = 1;
+
+ public static String version;
+ public static int versionCode;
+
+ // Current scene
+ protected Scene scene;
+ // New scene we are going to switch to
+ protected Scene requestedScene;
+ // true if scene switch is requested
+ protected boolean requestedReset = true;
+ // callback to perform logic during scene change
+ protected SceneChangeCallback onChange;
+ // New scene class
+ protected Class extends Scene> sceneClass;
+
+ // Current time in milliseconds
+ protected long now;
+ // Milliseconds passed since previous update
+ protected long step;
+
+ public static float timeScale = 1f;
+ public static float elapsed = 0f;
+ public static float timeTotal = 0f;
+
+ protected GLSurfaceView view;
+ protected SurfaceHolder holder;
+
+ // Accumulated touch events
+ protected ArrayList motionEvents = new ArrayList();
+
+ // Accumulated key events
+ protected ArrayList keysEvents = new ArrayList();
+
+ public Game( Class extends Scene> c ) {
+ super();
+ sceneClass = c;
+ }
+
+ @Override
+ protected void onCreate( Bundle savedInstanceState ) {
+ super.onCreate( savedInstanceState );
+
+ BitmapCache.context = TextureCache.context = instance = this;
+
+ DisplayMetrics m = new DisplayMetrics();
+ getWindowManager().getDefaultDisplay().getMetrics( m );
+ density = m.density;
+
+ try {
+ version = getPackageManager().getPackageInfo( getPackageName(), 0 ).versionName;
+ } catch (NameNotFoundException e) {
+ version = "???";
+ }
+ try {
+ versionCode = getPackageManager().getPackageInfo( getPackageName(), 0 ).versionCode;
+ } catch (NameNotFoundException e) {
+ versionCode = 0;
+ }
+
+ setVolumeControlStream( AudioManager.STREAM_MUSIC );
+
+ view = new GLSurfaceView( this );
+ view.setEGLContextClientVersion( 2 );
+ view.setEGLConfigChooser( 5, 6, 5, 0, 0, 0 );
+ view.setRenderer( this );
+ view.setOnTouchListener( this );
+ setContentView( view );
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+
+ now = 0;
+ view.onResume();
+
+ Music.INSTANCE.resume();
+ Sample.INSTANCE.resume();
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+
+ if (scene != null) {
+ scene.pause();
+ }
+
+ view.onPause();
+ Script.reset();
+
+ Music.INSTANCE.pause();
+ Sample.INSTANCE.pause();
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ destroyGame();
+
+ Music.INSTANCE.mute();
+ Sample.INSTANCE.reset();
+ }
+
+ @SuppressLint({ "Recycle", "ClickableViewAccessibility" })
+ @Override
+ public boolean onTouch( View view, MotionEvent event ) {
+ synchronized (motionEvents) {
+ motionEvents.add( MotionEvent.obtain( event ) );
+ }
+ return true;
+ }
+
+ @Override
+ public boolean onKeyDown( int keyCode, KeyEvent event ) {
+
+ if (keyCode != Keys.BACK &&
+ keyCode != Keys.MENU) {
+ return false;
+ }
+
+ synchronized (motionEvents) {
+ keysEvents.add( event );
+ }
+ return true;
+ }
+
+ @Override
+ public boolean onKeyUp( int keyCode, KeyEvent event ) {
+
+ if (keyCode != Keys.BACK &&
+ keyCode != Keys.MENU) {
+ return false;
+ }
+
+ synchronized (motionEvents) {
+ keysEvents.add( event );
+ }
+ return true;
+ }
+
+ @Override
+ public void onDrawFrame( GL10 gl ) {
+
+ if (width == 0 || height == 0) {
+ return;
+ }
+
+ SystemTime.tick();
+ long rightNow = SystemTime.now;
+ step = (now == 0 ? 0 : rightNow - now);
+ now = rightNow;
+
+ step();
+
+ NoosaScript.get().resetCamera();
+ GLES20.glScissor( 0, 0, width, height );
+ GLES20.glClear( GLES20.GL_COLOR_BUFFER_BIT );
+ draw();
+ }
+
+ @Override
+ public void onSurfaceChanged( GL10 gl, int width, int height ) {
+
+ GLES20.glViewport(0, 0, width, height);
+
+ if (height != Game.height || width != Game.width) {
+
+ Game.width = width;
+ Game.height = height;
+
+ resetScene();
+ }
+ }
+
+ @Override
+ public void onSurfaceCreated( GL10 gl, EGLConfig config ) {
+ GLES20.glEnable( GL10.GL_BLEND );
+ // For premultiplied alpha:
+ // GLES20.glBlendFunc( GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA );
+ GLES20.glBlendFunc( GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA );
+
+ GLES20.glEnable( GL10.GL_SCISSOR_TEST );
+
+ TextureCache.reload();
+ RenderedText.reloadCache();
+ }
+
+ protected void destroyGame() {
+ if (scene != null) {
+ scene.destroy();
+ scene = null;
+ }
+
+ //instance = null;
+ }
+
+ public static void resetScene() {
+ switchScene( instance.sceneClass );
+ }
+
+ public static void switchScene(Class extends Scene> c) {
+ switchScene(c, null);
+ }
+
+ public static void switchScene(Class extends Scene> c, SceneChangeCallback callback) {
+ instance.sceneClass = c;
+ instance.requestedReset = true;
+ instance.onChange = callback;
+ }
+
+ public static Scene scene() {
+ return instance.scene;
+ }
+
+ protected void step() {
+
+ if (requestedReset) {
+ requestedReset = false;
+
+ try {
+ requestedScene = sceneClass.newInstance();
+ switchScene();
+ } catch (InstantiationException | IllegalAccessException e) {
+ e.printStackTrace();
+ }
+
+
+ }
+
+ update();
+ }
+
+ protected void draw() {
+ scene.draw();
+ }
+
+ protected void switchScene() {
+
+ Camera.reset();
+
+ if (scene != null) {
+ scene.destroy();
+ }
+ scene = requestedScene;
+ if (onChange != null) onChange.beforeCreate();
+ scene.create();
+ if (onChange != null) onChange.afterCreate();
+ onChange = null;
+
+ Game.elapsed = 0f;
+ Game.timeScale = 1f;
+ Game.timeTotal = 0f;
+ }
+
+ protected void update() {
+ Game.elapsed = Game.timeScale * step * 0.001f;
+ Game.timeTotal += Game.elapsed;
+
+ synchronized (motionEvents) {
+ Touchscreen.processTouchEvents( motionEvents );
+ motionEvents.clear();
+ }
+ synchronized (keysEvents) {
+ Keys.processTouchEvents( keysEvents );
+ keysEvents.clear();
+ }
+
+ scene.update();
+ Camera.updateAll();
+ }
+
+ public static void vibrate( int milliseconds ) {
+ ((Vibrator)instance.getSystemService( VIBRATOR_SERVICE )).vibrate( milliseconds );
+ }
+
+ public interface SceneChangeCallback{
+ void beforeCreate();
+ void afterCreate();
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/Gizmo.java b/SPD-classes/src/main/java/com/watabou/noosa/Gizmo.java
new file mode 100644
index 000000000..5b45f1187
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/Gizmo.java
@@ -0,0 +1,101 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+public class Gizmo {
+
+ public boolean exists;
+ public boolean alive;
+ public boolean active;
+ public boolean visible;
+
+ public Group parent;
+
+ public Camera camera;
+
+ public Gizmo() {
+ exists = true;
+ alive = true;
+ active = true;
+ visible = true;
+ }
+
+ public void destroy() {
+ parent = null;
+ }
+
+ public void update() {
+ }
+
+ public void draw() {
+ }
+
+ public void kill() {
+ alive = false;
+ exists = false;
+ }
+
+ // Not exactly opposite to "kill" method
+ public void revive() {
+ alive = true;
+ exists = true;
+ }
+
+ public Camera camera() {
+ if (camera != null) {
+ return camera;
+ } else if (parent != null) {
+ return parent.camera();
+ } else {
+ return null;
+ }
+ }
+
+ public boolean isVisible() {
+ if (parent == null) {
+ return visible;
+ } else {
+ return visible && parent.isVisible();
+ }
+ }
+
+ public boolean isActive() {
+ if (parent == null) {
+ return active;
+ } else {
+ return active && parent.isActive();
+ }
+ }
+
+ public void killAndErase() {
+ kill();
+ if (parent != null) {
+ parent.erase( this );
+ }
+ }
+
+ public void remove() {
+ if (parent != null) {
+ parent.remove( this );
+ }
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/Group.java b/SPD-classes/src/main/java/com/watabou/noosa/Group.java
new file mode 100644
index 000000000..49987f644
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/Group.java
@@ -0,0 +1,314 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import com.watabou.noosa.particles.Emitter;
+
+import java.util.ArrayList;
+
+public class Group extends Gizmo {
+
+ protected ArrayList members;
+
+ // Accessing it is a little faster,
+ // than calling members.getSize()
+ public int length;
+
+ public static boolean freezeEmitters = false;
+
+ public Group() {
+ members = new ArrayList();
+ length = 0;
+ }
+
+ @Override
+ public void destroy() {
+ super.destroy();
+ for (int i=0; i < length; i++) {
+ Gizmo g = members.get( i );
+ if (g != null) {
+ g.destroy();
+ }
+ }
+
+ members.clear();
+ members = null;
+ length = 0;
+ }
+
+ @Override
+ public void update() {
+ for (int i=0; i < length; i++) {
+ Gizmo g = members.get( i );
+ if (g != null && g.exists && g.active
+ //functionality for the freezing of emitters(particle effects), effects are given a second
+ //from load to get started so they aren't frozen before anything is generated.
+ && !(freezeEmitters && Game.timeTotal > 1f && g instanceof Emitter)) {
+ g.update();
+ }
+ }
+ }
+
+ @Override
+ public void draw() {
+ for (int i=0; i < length; i++) {
+ Gizmo g = members.get( i );
+ if (g != null && g.exists && g.visible) {
+ g.draw();
+ }
+ }
+ }
+
+ @Override
+ public void kill() {
+ // A killed group keeps all its members,
+ // but they get killed too
+ for (int i=0; i < length; i++) {
+ Gizmo g = members.get( i );
+ if (g != null && g.exists) {
+ g.kill();
+ }
+ }
+
+ super.kill();
+ }
+
+ public int indexOf( Gizmo g ) {
+ return members.indexOf( g );
+ }
+
+ public Gizmo add( Gizmo g ) {
+
+ if (g.parent == this) {
+ return g;
+ }
+
+ if (g.parent != null) {
+ g.parent.remove( g );
+ }
+
+ // Trying to find an empty space for a new member
+ for (int i=0; i < length; i++) {
+ if (members.get( i ) == null) {
+ members.set( i, g );
+ g.parent = this;
+ return g;
+ }
+ }
+
+ members.add( g );
+ g.parent = this;
+ length++;
+ return g;
+ }
+
+ public Gizmo addToFront( Gizmo g){
+
+ if (g.parent == this) {
+ return g;
+ }
+
+ if (g.parent != null) {
+ g.parent.remove( g );
+ }
+
+ // Trying to find an empty space for a new member
+ // starts from the front and never goes over a none-null element
+ for (int i=length-1; i >= 0; i--) {
+ if (members.get( i ) == null) {
+ if (i == 0 || members.get(i - 1) != null) {
+ members.set(i, g);
+ g.parent = this;
+ return g;
+ }
+ } else {
+ break;
+ }
+ }
+
+ members.add( g );
+ g.parent = this;
+ length++;
+ return g;
+ }
+
+ public Gizmo addToBack( Gizmo g ) {
+
+ if (g.parent == this) {
+ sendToBack( g );
+ return g;
+ }
+
+ if (g.parent != null) {
+ g.parent.remove( g );
+ }
+
+ if (members.get( 0 ) == null) {
+ members.set( 0, g );
+ g.parent = this;
+ return g;
+ }
+
+ members.add( 0, g );
+ g.parent = this;
+ length++;
+ return g;
+ }
+
+ public Gizmo recycle( Class extends Gizmo> c ) {
+
+ Gizmo g = getFirstAvailable( c );
+ if (g != null) {
+
+ return g;
+
+ } else if (c == null) {
+
+ return null;
+
+ } else {
+
+ try {
+ return add( c.newInstance() );
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ return null;
+ }
+
+ // Fast removal - replacing with null
+ public Gizmo erase( Gizmo g ) {
+ int index = members.indexOf( g );
+
+ if (index != -1) {
+ members.set( index, null );
+ g.parent = null;
+ return g;
+ } else {
+ return null;
+ }
+ }
+
+ // Real removal
+ public Gizmo remove( Gizmo g ) {
+ if (members.remove( g )) {
+ length--;
+ g.parent = null;
+ return g;
+ } else {
+ return null;
+ }
+ }
+
+ public Gizmo replace( Gizmo oldOne, Gizmo newOne ) {
+ int index = members.indexOf( oldOne );
+ if (index != -1) {
+ members.set( index, newOne );
+ newOne.parent = this;
+ oldOne.parent = null;
+ return newOne;
+ } else {
+ return null;
+ }
+ }
+
+ public Gizmo getFirstAvailable( Class extends Gizmo> c ) {
+
+ for (int i=0; i < length; i++) {
+ Gizmo g = members.get( i );
+ if (g != null && !g.exists && ((c == null) || g.getClass() == c)) {
+ return g;
+ }
+ }
+
+ return null;
+ }
+
+ public int countLiving() {
+
+ int count = 0;
+
+ for (int i=0; i < length; i++) {
+ Gizmo g = members.get( i );
+ if (g != null && g.exists && g.alive) {
+ count++;
+ }
+ }
+
+ return count;
+ }
+
+ public int countDead() {
+
+ int count = 0;
+
+ for (int i=0; i < length; i++) {
+ Gizmo g = members.get( i );
+ if (g != null && !g.alive) {
+ count++;
+ }
+ }
+
+ return count;
+ }
+
+ public Gizmo random() {
+ if (length > 0) {
+ return members.get( (int)(Math.random() * length) );
+ } else {
+ return null;
+ }
+ }
+
+ public void clear() {
+ for (int i=0; i < length; i++) {
+ Gizmo g = members.get( i );
+ if (g != null) {
+ g.parent = null;
+ }
+ }
+ members.clear();
+ length = 0;
+ }
+
+ public Gizmo bringToFront( Gizmo g ) {
+ if (members.contains( g )) {
+ members.remove( g );
+ members.add( g );
+ return g;
+ } else {
+ return null;
+ }
+ }
+
+ public Gizmo sendToBack( Gizmo g ) {
+ if (members.contains( g )) {
+ members.remove( g );
+ members.add( 0, g );
+ return g;
+ } else {
+ return null;
+ }
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/Image.java b/SPD-classes/src/main/java/com/watabou/noosa/Image.java
new file mode 100644
index 000000000..356449687
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/Image.java
@@ -0,0 +1,171 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import java.nio.FloatBuffer;
+
+import android.graphics.RectF;
+
+import com.watabou.gltextures.TextureCache;
+import com.watabou.gltextures.SmartTexture;
+import com.watabou.glwrap.Quad;
+
+public class Image extends Visual {
+
+ public SmartTexture texture;
+ protected RectF frame;
+
+ public boolean flipHorizontal;
+ public boolean flipVertical;
+
+ protected float[] vertices;
+ protected FloatBuffer verticesBuffer;
+
+ protected boolean dirty;
+
+ public Image() {
+ super( 0, 0, 0, 0 );
+
+ vertices = new float[16];
+ verticesBuffer = Quad.create();
+ }
+
+ public Image( Image src ) {
+ this();
+ copy( src );
+ }
+
+ public Image( Object tx ) {
+ this();
+ texture( tx );
+ }
+
+ public Image( Object tx, int left, int top, int width, int height ) {
+ this( tx );
+ frame( texture.uvRect( left, top, left + width, top + height ) );
+ }
+
+ public void texture( Object tx ) {
+ texture = tx instanceof SmartTexture ? (SmartTexture)tx : TextureCache.get( tx );
+ frame( new RectF( 0, 0, 1, 1 ) );
+ }
+
+ public void frame( RectF frame ) {
+ this.frame = frame;
+
+ width = frame.width() * texture.width;
+ height = frame.height() * texture.height;
+
+ updateFrame();
+ updateVertices();
+ }
+
+ public void frame( int left, int top, int width, int height ) {
+ frame( texture.uvRect( left, top, left + width, top + height ) );
+ }
+
+ public RectF frame() {
+ return new RectF( frame );
+ }
+
+ public void copy( Image other ) {
+ texture = other.texture;
+ frame = new RectF( other.frame );
+
+ width = other.width;
+ height = other.height;
+
+ updateFrame();
+ updateVertices();
+ }
+
+ protected void updateFrame() {
+
+ if (flipHorizontal) {
+ vertices[2] = frame.right;
+ vertices[6] = frame.left;
+ vertices[10] = frame.left;
+ vertices[14] = frame.right;
+ } else {
+ vertices[2] = frame.left;
+ vertices[6] = frame.right;
+ vertices[10] = frame.right;
+ vertices[14] = frame.left;
+ }
+
+ if (flipVertical) {
+ vertices[3] = frame.bottom;
+ vertices[7] = frame.bottom;
+ vertices[11] = frame.top;
+ vertices[15] = frame.top;
+ } else {
+ vertices[3] = frame.top;
+ vertices[7] = frame.top;
+ vertices[11] = frame.bottom;
+ vertices[15] = frame.bottom;
+ }
+
+ dirty = true;
+ }
+
+ protected void updateVertices() {
+
+ vertices[0] = 0;
+ vertices[1] = 0;
+
+ vertices[4] = width;
+ vertices[5] = 0;
+
+ vertices[8] = width;
+ vertices[9] = height;
+
+ vertices[12] = 0;
+ vertices[13] = height;
+
+ dirty = true;
+ }
+
+ @Override
+ public void draw() {
+
+ super.draw();
+
+ NoosaScript script = NoosaScript.get();
+
+ texture.bind();
+
+ script.camera( camera() );
+
+ script.uModel.valueM4( matrix );
+ script.lighting(
+ rm, gm, bm, am,
+ ra, ga, ba, aa );
+
+ if (dirty) {
+ verticesBuffer.position( 0 );
+ verticesBuffer.put( vertices );
+ dirty = false;
+ }
+ script.drawQuad( verticesBuffer );
+
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/MovieClip.java b/SPD-classes/src/main/java/com/watabou/noosa/MovieClip.java
new file mode 100644
index 000000000..fde2ac604
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/MovieClip.java
@@ -0,0 +1,143 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import android.graphics.RectF;
+
+public class MovieClip extends Image {
+
+ protected Animation curAnim;
+ protected int curFrame;
+ protected float frameTimer;
+ protected boolean finished;
+
+ public boolean paused = false;
+
+ public Listener listener;
+
+ public MovieClip() {
+ super();
+ }
+
+ public MovieClip( Object tx ) {
+ super( tx );
+ }
+
+ @Override
+ public void update() {
+ super.update();
+ if (!paused) {
+ updateAnimation();
+ }
+ }
+
+ public boolean looping(){
+ return curAnim != null && curAnim.looped;
+ }
+
+ protected void updateAnimation() {
+ if (curAnim != null && curAnim.delay > 0 && (curAnim.looped || !finished)) {
+
+ int lastFrame = curFrame;
+
+ frameTimer += Game.elapsed;
+ while (frameTimer > curAnim.delay) {
+ frameTimer -= curAnim.delay;
+ if (curFrame == curAnim.frames.length - 1) {
+ if (curAnim.looped) {
+ curFrame = 0;
+ }
+ finished = true;
+ if (listener != null) {
+ listener.onComplete( curAnim );
+ // This check can probably be removed
+ if (curAnim == null) {
+ return;
+ }
+ }
+
+ } else {
+ curFrame++;
+ }
+ }
+
+ if (curFrame != lastFrame) {
+ frame( curAnim.frames[curFrame] );
+ }
+
+ }
+ }
+
+ public void play( Animation anim ) {
+ play( anim, false );
+ }
+
+ public void play( Animation anim, boolean force ) {
+
+ if (!force && (curAnim != null) && (curAnim == anim) && (curAnim.looped || !finished)) {
+ return;
+ }
+
+ curAnim = anim;
+ curFrame = 0;
+ finished = false;
+
+ frameTimer = 0;
+
+ if (anim != null) {
+ frame( anim.frames[curFrame] );
+ }
+ }
+
+ public static class Animation {
+
+ public float delay;
+ public RectF[] frames;
+ public boolean looped;
+
+ public Animation( int fps, boolean looped ) {
+ this.delay = 1f / fps;
+ this.looped = looped;
+ }
+
+ public Animation frames( RectF... frames ) {
+ this.frames = frames;
+ return this;
+ }
+
+ public Animation frames( TextureFilm film, Object... frames ) {
+ this.frames = new RectF[frames.length];
+ for (int i=0; i < frames.length; i++) {
+ this.frames[i] = film.get( frames[i] );
+ }
+ return this;
+ }
+
+ public Animation clone() {
+ return new Animation( Math.round( 1 / delay ), looped ).frames( frames );
+ }
+ }
+
+ public interface Listener {
+ void onComplete( Animation anim );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/NinePatch.java b/SPD-classes/src/main/java/com/watabou/noosa/NinePatch.java
new file mode 100644
index 000000000..aaa369c98
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/NinePatch.java
@@ -0,0 +1,212 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import java.nio.FloatBuffer;
+
+import com.watabou.gltextures.SmartTexture;
+import com.watabou.gltextures.TextureCache;
+import com.watabou.glwrap.Quad;
+
+import android.graphics.RectF;
+
+public class NinePatch extends Visual {
+
+ public SmartTexture texture;
+
+ protected float[] vertices;
+ protected FloatBuffer verticesBuffer;
+
+ protected RectF outterF;
+ protected RectF innerF;
+
+ protected int marginLeft;
+ protected int marginRight;
+ protected int marginTop;
+ protected int marginBottom;
+
+ protected float nWidth;
+ protected float nHeight;
+
+ protected boolean flipHorizontal;
+ protected boolean flipVertical;
+
+ public NinePatch( Object tx, int margin ) {
+ this( tx, margin, margin, margin, margin );
+ }
+
+ public NinePatch( Object tx, int left, int top, int right, int bottom ) {
+ this( tx, 0, 0, 0, 0, left, top, right, bottom );
+ }
+
+ public NinePatch( Object tx, int x, int y, int w, int h, int margin ) {
+ this( tx, x, y, w, h, margin, margin, margin, margin );
+ }
+
+ public NinePatch( Object tx, int x, int y, int w, int h, int left, int top, int right, int bottom ) {
+ super( 0, 0, 0, 0 );
+
+ texture = TextureCache.get( tx );
+ w = w == 0 ? texture.width : w;
+ h = h == 0 ? texture.height : h;
+
+ nWidth = width = w;
+ nHeight = height = h;
+
+ vertices = new float[16];
+ verticesBuffer = Quad.createSet( 9 );
+
+ marginLeft = left;
+ marginRight = right;
+ marginTop = top;
+ marginBottom= bottom;
+
+ outterF = texture.uvRect( x, y, x + w, y + h );
+ innerF = texture.uvRect( x + left, y + top, x + w - right, y + h - bottom );
+
+ updateVertices();
+ }
+
+ protected void updateVertices() {
+
+ verticesBuffer.position( 0 );
+
+ float right = width - marginRight;
+ float bottom = height - marginBottom;
+
+ float outleft = flipHorizontal ? outterF.right : outterF.left;
+ float outright = flipHorizontal ? outterF.left : outterF.right;
+ float outtop = flipVertical ? outterF.bottom : outterF.top;
+ float outbottom = flipVertical ? outterF.top : outterF.bottom;
+
+ float inleft = flipHorizontal ? innerF.right : innerF.left;
+ float inright = flipHorizontal ? innerF.left : innerF.right;
+ float intop = flipVertical ? innerF.bottom : innerF.top;
+ float inbottom = flipVertical ? innerF.top : innerF.bottom;
+
+ Quad.fill( vertices,
+ 0, marginLeft, 0, marginTop, outleft, inleft, outtop, intop );
+ verticesBuffer.put( vertices );
+ Quad.fill( vertices,
+ marginLeft, right, 0, marginTop, inleft, inright, outtop, intop );
+ verticesBuffer.put( vertices );
+ Quad.fill( vertices,
+ right, width, 0, marginTop, inright, outright, outtop, intop );
+ verticesBuffer.put( vertices );
+
+ Quad.fill( vertices,
+ 0, marginLeft, marginTop, bottom, outleft, inleft, intop, inbottom );
+ verticesBuffer.put( vertices );
+ Quad.fill( vertices,
+ marginLeft, right, marginTop, bottom, inleft, inright, intop, inbottom );
+ verticesBuffer.put( vertices );
+ Quad.fill( vertices,
+ right, width, marginTop, bottom, inright, outright, intop, inbottom );
+ verticesBuffer.put( vertices );
+
+ Quad.fill( vertices,
+ 0, marginLeft, bottom, height, outleft, inleft, inbottom, outbottom );
+ verticesBuffer.put( vertices );
+ Quad.fill( vertices,
+ marginLeft, right, bottom, height, inleft, inright, inbottom, outbottom );
+ verticesBuffer.put( vertices );
+ Quad.fill( vertices,
+ right, width, bottom, height, inright, outright, inbottom, outbottom );
+ verticesBuffer.put( vertices );
+ }
+
+ public int marginLeft() {
+ return marginLeft;
+ }
+
+ public int marginRight() {
+ return marginRight;
+ }
+
+ public int marginTop() {
+ return marginTop;
+ }
+
+ public int marginBottom() {
+ return marginBottom;
+ }
+
+ public int marginHor() {
+ return marginLeft + marginRight;
+ }
+
+ public int marginVer() {
+ return marginTop + marginBottom;
+ }
+
+ public float innerWidth() {
+ return width - marginLeft - marginRight;
+ }
+
+ public float innerHeight() {
+ return height - marginTop - marginBottom;
+ }
+
+ public float innerRight() {
+ return width - marginRight;
+ }
+
+ public float innerBottom() {
+ return height - marginBottom;
+ }
+
+ public void flipHorizontal(boolean value) {
+ flipHorizontal = value;
+ updateVertices();
+ }
+
+ public void flipVertical(boolean value) {
+ flipVertical = value;
+ updateVertices();
+ }
+
+ public void size( float width, float height ) {
+ this.width = width;
+ this.height = height;
+ updateVertices();
+ }
+
+ @Override
+ public void draw() {
+
+ super.draw();
+
+ NoosaScript script = NoosaScript.get();
+
+ texture.bind();
+
+ script.camera( camera() );
+
+ script.uModel.valueM4( matrix );
+ script.lighting(
+ rm, gm, bm, am,
+ ra, ga, ba, aa );
+
+ script.drawQuadSet( verticesBuffer, 9 );
+
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/NoosaScript.java b/SPD-classes/src/main/java/com/watabou/noosa/NoosaScript.java
new file mode 100644
index 000000000..ad61143cf
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/NoosaScript.java
@@ -0,0 +1,171 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import java.nio.FloatBuffer;
+import java.nio.ShortBuffer;
+
+import android.opengl.GLES20;
+
+import com.watabou.glscripts.Script;
+import com.watabou.glwrap.Attribute;
+import com.watabou.glwrap.Quad;
+import com.watabou.glwrap.Uniform;
+
+public class NoosaScript extends Script {
+
+ public Uniform uCamera;
+ public Uniform uModel;
+ public Uniform uTex;
+ public Uniform uColorM;
+ public Uniform uColorA;
+ public Attribute aXY;
+ public Attribute aUV;
+
+ private Camera lastCamera;
+
+ public NoosaScript() {
+
+ super();
+ compile( shader() );
+
+ uCamera = uniform( "uCamera" );
+ uModel = uniform( "uModel" );
+ uTex = uniform( "uTex" );
+ uColorM = uniform( "uColorM" );
+ uColorA = uniform( "uColorA" );
+ aXY = attribute( "aXYZW" );
+ aUV = attribute( "aUV" );
+
+ }
+
+ @Override
+ public void use() {
+
+ super.use();
+
+ aXY.enable();
+ aUV.enable();
+
+ }
+
+ public void drawElements( FloatBuffer vertices, ShortBuffer indices, int size ) {
+
+ vertices.position( 0 );
+ aXY.vertexPointer( 2, 4, vertices );
+
+ vertices.position( 2 );
+ aUV.vertexPointer( 2, 4, vertices );
+
+ GLES20.glDrawElements( GLES20.GL_TRIANGLES, size, GLES20.GL_UNSIGNED_SHORT, indices );
+
+ }
+
+ public void drawQuad( FloatBuffer vertices ) {
+
+ vertices.position( 0 );
+ aXY.vertexPointer( 2, 4, vertices );
+
+ vertices.position( 2 );
+ aUV.vertexPointer( 2, 4, vertices );
+
+ GLES20.glDrawElements( GLES20.GL_TRIANGLES, Quad.SIZE, GLES20.GL_UNSIGNED_SHORT, Quad.getIndices( 1 ) );
+
+ }
+
+ public void drawQuadSet( FloatBuffer vertices, int size ) {
+
+ if (size == 0) {
+ return;
+ }
+
+ vertices.position( 0 );
+ aXY.vertexPointer( 2, 4, vertices );
+
+ vertices.position( 2 );
+ aUV.vertexPointer( 2, 4, vertices );
+
+ GLES20.glDrawElements(
+ GLES20.GL_TRIANGLES,
+ Quad.SIZE * size,
+ GLES20.GL_UNSIGNED_SHORT,
+ Quad.getIndices( size ) );
+
+ }
+
+ public void lighting( float rm, float gm, float bm, float am, float ra, float ga, float ba, float aa ) {
+ uColorM.value4f( rm, gm, bm, am );
+ uColorA.value4f( ra, ga, ba, aa );
+ }
+
+ public void resetCamera() {
+ lastCamera = null;
+ }
+
+ public void camera( Camera camera ) {
+ if (camera == null) {
+ camera = Camera.main;
+ }
+ if (camera != lastCamera && camera.matrix != null) {
+ lastCamera = camera;
+ uCamera.valueM4( camera.matrix );
+
+ GLES20.glScissor(
+ camera.x,
+ Game.height - camera.screenHeight - camera.y,
+ camera.screenWidth,
+ camera.screenHeight );
+ }
+ }
+
+ public static NoosaScript get() {
+ return Script.use( NoosaScript.class );
+ }
+
+
+ protected String shader() {
+ return SHADER;
+ }
+
+ private static final String SHADER =
+
+ "uniform mat4 uCamera;" +
+ "uniform mat4 uModel;" +
+ "attribute vec4 aXYZW;" +
+ "attribute vec2 aUV;" +
+ "varying vec2 vUV;" +
+ "void main() {" +
+ " gl_Position = uCamera * uModel * aXYZW;" +
+ " vUV = aUV;" +
+ "}" +
+
+ "//\n" +
+
+ "precision mediump float;" +
+ "varying vec2 vUV;" +
+ "uniform sampler2D uTex;" +
+ "uniform vec4 uColorM;" +
+ "uniform vec4 uColorA;" +
+ "void main() {" +
+ " gl_FragColor = texture2D( uTex, vUV ) * uColorM + uColorA;" +
+ "}";
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/PseudoPixel.java b/SPD-classes/src/main/java/com/watabou/noosa/PseudoPixel.java
new file mode 100644
index 000000000..20799005a
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/PseudoPixel.java
@@ -0,0 +1,48 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import com.watabou.gltextures.TextureCache;
+
+public class PseudoPixel extends Image {
+
+ public PseudoPixel() {
+ super( TextureCache.createSolid( 0xFFFFFFFF ) );
+ }
+
+ public PseudoPixel( float x, float y, int color ) {
+
+ this();
+
+ this.x = x;
+ this.y = y;
+ color( color );
+ }
+
+ public void size( float w, float h ) {
+ scale.set( w, h );
+ }
+
+ public void size( float value ) {
+ scale.set( value );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/RenderedText.java b/SPD-classes/src/main/java/com/watabou/noosa/RenderedText.java
new file mode 100644
index 000000000..7a35f8db3
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/RenderedText.java
@@ -0,0 +1,229 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.RectF;
+import android.graphics.Typeface;
+import com.watabou.gltextures.SmartTexture;
+import com.watabou.glwrap.Matrix;
+import com.watabou.glwrap.Texture;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class RenderedText extends Image {
+
+ private static Canvas canvas = new Canvas();
+ private static Paint painter = new Paint();
+
+ private static Typeface font;
+
+ //this is basically a LRU cache. capacity is determined by character count, not entry count.
+ //will attempt to clear oldest, not in use entires until there are 500 characters stored.
+ //FIXME: Caching based on words is very inefficient for every language but chinese.
+ private static LinkedHashMap textCache =
+ new LinkedHashMap(700, 0.75f, true){
+ private int cachedChars = 0;
+ private final int MAX_CACHED = 500;
+
+ @Override
+ public CachedText put(String key, CachedText value) {
+ cachedChars += value.length;
+ CachedText added = super.put(key, value);
+ runGC();
+ return added;
+ }
+
+ @Override
+ public CachedText remove(Object key) {
+ CachedText removed = super.remove(key);
+ if (removed != null) {
+ cachedChars-= removed.length;
+ removed.texture.delete();
+ }
+ return removed;
+ }
+
+ @Override
+ public void clear() {
+ super.clear();
+ cachedChars = 0;
+ }
+
+ private void runGC(){
+ Iterator> it = this.entrySet().iterator();
+ while (cachedChars > MAX_CACHED && it.hasNext()){
+ CachedText cached = it.next().getValue();
+ if (cached.activeTexts.isEmpty()) it.remove();
+ }
+ }
+ };
+
+ private int size;
+ private String text;
+ private CachedText cache;
+
+ public RenderedText( ){
+ text = null;
+ }
+
+ public RenderedText( int size ){
+ text = null;
+ this.size = size;
+ }
+
+ public RenderedText(String text, int size){
+ this.text = text;
+ this.size = size;
+
+ render();
+ }
+
+ public void text( String text ){
+ this.text = text;
+
+ render();
+ }
+
+ public String text(){
+ return text;
+ }
+
+ public void size( int size ){
+ this.size = size;
+ render();
+ }
+
+ public float baseLine(){
+ return size * scale.y;
+ }
+
+ private void render(){
+ if ( text == null || text.equals("") ) {
+ text = "";
+ width=height=0;
+ visible = false;
+ return;
+ } else {
+ visible = true;
+ }
+
+ if (cache != null)
+ cache.activeTexts.remove(this);
+
+ String key = "text:" + size + " " + text;
+ if (textCache.containsKey(key)){
+ cache = textCache.get(key);
+ texture = cache.texture;
+ frame(cache.rect);
+ cache.activeTexts.add(this);
+ } else {
+
+ painter.setTextSize(size);
+ painter.setAntiAlias(true);
+
+ if (font != null) {
+ painter.setTypeface(font);
+ } else {
+ painter.setTypeface(Typeface.DEFAULT);
+ }
+
+ //paint outer strokes
+ painter.setARGB(0xff, 0, 0, 0);
+ painter.setStyle(Paint.Style.STROKE);
+ painter.setStrokeWidth(size / 5f);
+
+ int right = (int)(painter.measureText(text)+ (size/5f));
+ int bottom = (int)(-painter.ascent() + painter.descent()+ (size/5f));
+
+ //bitmap has to be in a power of 2 for some devices (as we're using openGL methods to render to texture)
+ Bitmap bitmap = Bitmap.createBitmap(Integer.highestOneBit(right)*2, Integer.highestOneBit(bottom)*2, Bitmap.Config.ARGB_4444);
+ bitmap.eraseColor(0x00000000);
+
+ canvas.setBitmap(bitmap);
+ canvas.drawText(text, (size/10f), size, painter);
+
+ //paint inner text
+ painter.setARGB(0xff, 0xff, 0xff, 0xff);
+ painter.setStyle(Paint.Style.FILL);
+
+ canvas.drawText(text, (size/10f), size, painter);
+
+ texture = new SmartTexture(bitmap, Texture.NEAREST, Texture.CLAMP, true);
+
+ RectF rect = texture.uvRect(0, 0, right, bottom);
+ frame(rect);
+
+ cache = new CachedText();
+ cache.rect = rect;
+ cache.texture = texture;
+ cache.length = text.length();
+ cache.activeTexts = new HashSet<>();
+ cache.activeTexts.add(this);
+ textCache.put("text:" + size + " " + text, cache);
+ }
+ }
+
+ @Override
+ protected void updateMatrix() {
+ super.updateMatrix();
+ //the y value is set at the top of the character, not at the top of accents.
+ Matrix.translate( matrix, 0, -Math.round((baseLine()*0.15f)/scale.y) );
+ }
+
+ @Override
+ public void destroy() {
+ if (cache != null)
+ cache.activeTexts.remove(this);
+ super.destroy();
+ }
+
+ public static void clearCache(){
+ for (CachedText cached : textCache.values()){
+ cached.texture.delete();
+ }
+ textCache.clear();
+ }
+
+ public static void reloadCache(){
+ for (CachedText txt : textCache.values()){
+ txt.texture.reload();
+ }
+ }
+
+ public static void setFont(String asset){
+ font = Typeface.createFromAsset(Game.instance.getAssets(), asset);
+ clearCache();
+ }
+
+ private class CachedText{
+ public SmartTexture texture;
+ public RectF rect;
+ public int length;
+ public HashSet activeTexts;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/Resizable.java b/SPD-classes/src/main/java/com/watabou/noosa/Resizable.java
new file mode 100644
index 000000000..ee9ee99b7
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/Resizable.java
@@ -0,0 +1,30 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+public interface Resizable {
+
+ public void size( float width, float height );
+ public float width();
+ public float height();
+
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/Scene.java b/SPD-classes/src/main/java/com/watabou/noosa/Scene.java
new file mode 100644
index 000000000..2c5cb444c
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/Scene.java
@@ -0,0 +1,81 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import com.watabou.input.Keys;
+import com.watabou.utils.Signal;
+
+public class Scene extends Group {
+
+ private Signal.Listener keyListener;
+
+ public void create() {
+ Keys.event.add( keyListener = new Signal.Listener() {
+ @Override
+ public void onSignal( Keys.Key key ) {
+ if (Game.instance != null && key.pressed) {
+ switch (key.code) {
+ case Keys.BACK:
+ onBackPressed();
+ break;
+ case Keys.MENU:
+ onMenuPressed();
+ break;
+ }
+ }
+ }
+ } );
+ }
+
+ @Override
+ public void destroy() {
+ Keys.event.remove( keyListener );
+ super.destroy();
+ }
+
+ public void pause() {
+
+ }
+
+ public void resume() {
+
+ }
+
+ @Override
+ public void update() {
+ super.update();
+ }
+
+ @Override
+ public Camera camera() {
+ return Camera.main;
+ }
+
+ protected void onBackPressed() {
+ Game.instance.finish();
+ }
+
+ protected void onMenuPressed() {
+
+ }
+
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/SkinnedBlock.java b/SPD-classes/src/main/java/com/watabou/noosa/SkinnedBlock.java
new file mode 100644
index 000000000..9458b4923
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/SkinnedBlock.java
@@ -0,0 +1,130 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import com.watabou.glwrap.Texture;
+
+import android.graphics.RectF;
+
+public class SkinnedBlock extends Image {
+
+ protected float scaleX;
+ protected float scaleY;
+
+ protected float offsetX;
+ protected float offsetY;
+
+ public boolean autoAdjust = false;
+
+ public SkinnedBlock( float width, float height, Object tx ) {
+ super( tx );
+
+ texture.wrap( Texture.REPEAT, Texture.REPEAT );
+
+ size( width, height );
+ }
+
+ @Override
+ public void frame( RectF frame ) {
+ scaleX = 1;
+ scaleY = 1;
+
+ offsetX = 0;
+ offsetY = 0;
+
+ super.frame( new RectF( 0, 0, 1, 1 ) );
+ }
+
+ @Override
+ protected void updateFrame() {
+
+ if (autoAdjust) {
+ while (offsetX > texture.width) {
+ offsetX -= texture.width;
+ }
+ while (offsetX < -texture.width) {
+ offsetX += texture.width;
+ }
+ while (offsetY > texture.height) {
+ offsetY -= texture.height;
+ }
+ while (offsetY < -texture.height) {
+ offsetY += texture.height;
+ }
+ }
+
+ float tw = 1f / texture.width;
+ float th = 1f / texture.height;
+
+ float u0 = offsetX * tw;
+ float v0 = offsetY * th;
+ float u1 = u0 + width * tw / scaleX;
+ float v1 = v0 + height * th / scaleY;
+
+ vertices[2] = u0;
+ vertices[3] = v0;
+
+ vertices[6] = u1;
+ vertices[7] = v0;
+
+ vertices[10] = u1;
+ vertices[11] = v1;
+
+ vertices[14] = u0;
+ vertices[15] = v1;
+
+ dirty = true;
+ }
+
+ public void offsetTo( float x, float y ) {
+ offsetX = x;
+ offsetY = y;
+ updateFrame();
+ }
+
+ public void offset( float x, float y ) {
+ offsetX += x;
+ offsetY += y;
+ updateFrame();
+ }
+
+ public float offsetX() {
+ return offsetX;
+ }
+
+ public float offsetY() {
+ return offsetY;
+ }
+
+ public void scale( float x, float y ) {
+ scaleX = x;
+ scaleY = y;
+ updateFrame();
+ }
+
+ public void size( float w, float h ) {
+ this.width = w;
+ this.height = h;
+ updateFrame();
+ updateVertices();
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/TextureFilm.java b/SPD-classes/src/main/java/com/watabou/noosa/TextureFilm.java
new file mode 100644
index 000000000..206f0cabd
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/TextureFilm.java
@@ -0,0 +1,110 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import java.util.HashMap;
+
+import com.watabou.gltextures.SmartTexture;
+import com.watabou.gltextures.TextureCache;
+
+import android.graphics.RectF;
+
+public class TextureFilm {
+
+ private static final RectF FULL = new RectF( 0, 0, 1, 1 );
+
+ private int texWidth;
+ private int texHeight;
+
+ protected HashMap frames = new HashMap();
+
+ public TextureFilm( Object tx ) {
+
+ SmartTexture texture = TextureCache.get( tx );
+
+ texWidth = texture.width;
+ texHeight = texture.height;
+
+ add( null, FULL );
+ }
+
+ public TextureFilm( SmartTexture texture, int width ) {
+ this( texture, width, texture.height );
+ }
+
+ public TextureFilm( Object tx, int width, int height ) {
+
+ SmartTexture texture = TextureCache.get( tx );
+
+ texWidth = texture.width;
+ texHeight = texture.height;
+
+ float uw = (float)width / texWidth;
+ float vh = (float)height / texHeight;
+ int cols = texWidth / width;
+ int rows = texHeight / height;
+
+ for (int i=0; i < rows; i++) {
+ for (int j=0; j < cols; j++) {
+ RectF rect = new RectF( j * uw, i * vh, (j+1) * uw, (i+1) * vh );
+ add( i * cols + j, rect );
+ }
+ }
+ }
+
+ public TextureFilm( TextureFilm atlas, Object key, int width, int height ) {
+
+ texWidth = atlas.texWidth;
+ texHeight = atlas.texHeight;
+
+ RectF patch = atlas.get( key );
+
+ float uw = (float)width / texWidth;
+ float vh = (float)height / texHeight;
+ int cols = (int)(width( patch ) / width);
+ int rows = (int)(height( patch ) / height);
+
+ for (int i=0; i < rows; i++) {
+ for (int j=0; j < cols; j++) {
+ RectF rect = new RectF( j * uw, i * vh, (j+1) * uw, (i+1) * vh );
+ rect.offset( patch.left, patch.top );
+ add( i * cols + j, rect );
+ }
+ }
+ }
+
+ public void add( Object id, RectF rect ) {
+ frames.put( id, rect );
+ }
+
+ public RectF get( Object id ) {
+ return frames.get( id );
+ }
+
+ public float width( RectF frame ) {
+ return frame.width() * texWidth;
+ }
+
+ public float height( RectF frame ) {
+ return frame.height() * texHeight;
+ }
+}
\ No newline at end of file
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/Tilemap.java b/SPD-classes/src/main/java/com/watabou/noosa/Tilemap.java
new file mode 100644
index 000000000..f271fcc7e
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/Tilemap.java
@@ -0,0 +1,160 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import java.nio.FloatBuffer;
+
+import com.watabou.gltextures.SmartTexture;
+import com.watabou.gltextures.TextureCache;
+import com.watabou.glwrap.Quad;
+import com.watabou.utils.Rect;
+
+import android.graphics.RectF;
+
+public class Tilemap extends Visual {
+
+ protected SmartTexture texture;
+ protected TextureFilm tileset;
+
+ protected int[] data;
+ protected int mapWidth;
+ protected int mapHeight;
+ protected int size;
+
+ private float cellW;
+ private float cellH;
+
+ protected float[] vertices;
+ protected FloatBuffer quads;
+
+ public Rect updated;
+
+ public Tilemap( Object tx, TextureFilm tileset ) {
+
+ super( 0, 0, 0, 0 );
+
+ this.texture = TextureCache.get( tx );
+ this.tileset = tileset;
+
+ RectF r = tileset.get( 0 );
+ cellW = tileset.width( r );
+ cellH = tileset.height( r );
+
+ vertices = new float[16];
+
+ updated = new Rect();
+ }
+
+ public void map( int[] data, int cols ) {
+
+ this.data = data;
+
+ mapWidth = cols;
+ mapHeight = data.length / cols;
+ size = mapWidth * mapHeight;
+
+ width = cellW * mapWidth;
+ height = cellH * mapHeight;
+
+ quads = Quad.createSet( size );
+
+ updated.set( 0, 0, mapWidth, mapHeight );
+ }
+
+ protected void updateVertices() {
+
+ float y1 = cellH * updated.top;
+ float y2 = y1 + cellH;
+
+ for (int i=updated.top; i < updated.bottom; i++) {
+
+ float x1 = cellW * updated.left;
+ float x2 = x1 + cellW;
+
+ int pos = i * mapWidth + updated.left;
+ quads.position( 16 * pos );
+
+ for (int j=updated.left; j < updated.right; j++) {
+
+ RectF uv = tileset.get( data[pos++] );
+
+ vertices[0] = x1;
+ vertices[1] = y1;
+
+ vertices[2] = uv.left;
+ vertices[3] = uv.top;
+
+ vertices[4] = x2;
+ vertices[5] = y1;
+
+ vertices[6] = uv.right;
+ vertices[7] = uv.top;
+
+ vertices[8] = x2;
+ vertices[9] = y2;
+
+ vertices[10] = uv.right;
+ vertices[11] = uv.bottom;
+
+ vertices[12] = x1;
+ vertices[13] = y2;
+
+ vertices[14] = uv.left;
+ vertices[15] = uv.bottom;
+
+ quads.put( vertices );
+
+ x1 = x2;
+ x2 += cellW;
+
+ }
+
+ y1 = y2;
+ y2 += cellH;
+ }
+
+ updated.setEmpty();
+ }
+
+ @Override
+ public void draw() {
+
+ super.draw();
+
+ NoosaScript script = NoosaScript.get();
+
+ texture.bind();
+
+ script.uModel.valueM4( matrix );
+ script.lighting(
+ rm, gm, bm, am,
+ ra, ga, ba, aa );
+
+ if (!updated.isEmpty()) {
+ updateVertices();
+ }
+
+ script.camera( camera );
+ script.drawQuadSet( quads, size );
+
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/TouchArea.java b/SPD-classes/src/main/java/com/watabou/noosa/TouchArea.java
new file mode 100644
index 000000000..73ea93489
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/TouchArea.java
@@ -0,0 +1,121 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import com.watabou.input.Touchscreen;
+import com.watabou.input.Touchscreen.Touch;
+import com.watabou.utils.Signal;
+
+public class TouchArea extends Visual implements Signal.Listener {
+
+ // Its target can be toucharea itself
+ public Visual target;
+
+ protected Touchscreen.Touch touch = null;
+
+ //if true, this TouchArea will always block input, even when it is inactive
+ public boolean blockWhenInactive = false;
+
+ public TouchArea( Visual target ) {
+ super( 0, 0, 0, 0 );
+ this.target = target;
+
+ Touchscreen.event.add( this );
+ }
+
+ public TouchArea( float x, float y, float width, float height ) {
+ super( x, y, width, height );
+ this.target = this;
+
+ visible = false;
+
+ Touchscreen.event.add( this );
+ }
+
+ @Override
+ public void onSignal( Touch touch ) {
+
+ boolean hit = touch != null && target.overlapsScreenPoint( (int)touch.current.x, (int)touch.current.y );
+
+ if (!isActive()) {
+ if (hit && blockWhenInactive) Touchscreen.event.cancel();
+ return;
+ }
+
+ if (hit) {
+
+ if (touch.down || touch == this.touch) Touchscreen.event.cancel();
+
+ if (touch.down) {
+
+ if (this.touch == null) {
+ this.touch = touch;
+ }
+ onTouchDown( touch );
+
+ } else {
+
+ onTouchUp( touch );
+
+ if (this.touch == touch) {
+ this.touch = null;
+ onClick( touch );
+ }
+
+ }
+
+ } else {
+
+ if (touch == null && this.touch != null) {
+ onDrag( this.touch );
+ }
+
+ else if (this.touch != null && !touch.down) {
+ onTouchUp( touch );
+ this.touch = null;
+ }
+
+ }
+ }
+
+ protected void onTouchDown( Touch touch ) {
+ }
+
+ protected void onTouchUp( Touch touch ) {
+ }
+
+ protected void onClick( Touch touch ) {
+ }
+
+ protected void onDrag( Touch touch ) {
+ }
+
+ public void reset() {
+ touch = null;
+ }
+
+ @Override
+ public void destroy() {
+ Touchscreen.event.remove( this );
+ super.destroy();
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/Visual.java b/SPD-classes/src/main/java/com/watabou/noosa/Visual.java
new file mode 100644
index 000000000..31b942fee
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/Visual.java
@@ -0,0 +1,246 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa;
+
+import com.watabou.glwrap.Matrix;
+import com.watabou.utils.GameMath;
+import com.watabou.utils.Point;
+import com.watabou.utils.PointF;
+
+public class Visual extends Gizmo {
+
+ public float x;
+ public float y;
+ public float width;
+ public float height;
+
+ public PointF scale;
+ public PointF origin;
+
+ protected float[] matrix;
+
+ public float rm;
+ public float gm;
+ public float bm;
+ public float am;
+ public float ra;
+ public float ga;
+ public float ba;
+ public float aa;
+
+ public PointF speed;
+ public PointF acc;
+
+ public float angle;
+ public float angularSpeed;
+
+ public Visual( float x, float y, float width, float height ) {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+
+ scale = new PointF( 1, 1 );
+ origin = new PointF();
+
+ matrix = new float[16];
+
+ resetColor();
+
+ speed = new PointF();
+ acc = new PointF();
+ }
+
+ @Override
+ public void update() {
+ updateMotion();
+ }
+
+ @Override
+ public void draw() {
+ updateMatrix();
+ }
+
+ protected void updateMatrix() {
+ Matrix.setIdentity( matrix );
+ Matrix.translate( matrix, x, y );
+ Matrix.translate( matrix, origin.x, origin.y );
+ if (angle != 0) {
+ Matrix.rotate( matrix, angle );
+ }
+ if (scale.x != 1 || scale.y != 1) {
+ Matrix.scale( matrix, scale.x, scale.y );
+ }
+ Matrix.translate( matrix, -origin.x, -origin.y );
+ }
+
+ public PointF point() {
+ return new PointF( x, y );
+ }
+
+ public PointF point( PointF p ) {
+ x = p.x;
+ y = p.y;
+ return p;
+ }
+
+ public Point point( Point p ) {
+ x = p.x;
+ y = p.y;
+ return p;
+ }
+
+ public PointF center() {
+ return new PointF( x + width / 2, y + height / 2 );
+ }
+
+ public PointF center( PointF p ) {
+ x = p.x - width / 2;
+ y = p.y - height / 2;
+ return p;
+ }
+
+ public float width() {
+ return width * scale.x;
+ }
+
+ public float height() {
+ return height * scale.y;
+ }
+
+ protected void updateMotion() {
+
+ float elapsed = Game.elapsed;
+
+ float d = (GameMath.speed( speed.x, acc.x ) - speed.x) / 2;
+ speed.x += d;
+ x += speed.x * elapsed;
+ speed.x += d;
+
+ d = (GameMath.speed( speed.y, acc.y ) - speed.y) / 2;
+ speed.y += d;
+ y += speed.y * elapsed;
+ speed.y += d;
+
+ angle += angularSpeed * elapsed;
+ }
+
+ public void alpha( float value ) {
+ am = value;
+ aa = 0;
+ }
+
+ public float alpha() {
+ return am + aa;
+ }
+
+ public void invert() {
+ rm = gm = bm = -1f;
+ ra = ga = ba = +1f;
+ }
+
+ public void lightness( float value ) {
+ if (value < 0.5f) {
+ rm = gm = bm = value * 2f;
+ ra = ga = ba = 0;
+ } else {
+ rm = gm = bm = 2f - value * 2f;
+ ra = ga = ba = value * 2f - 1f;
+ }
+ }
+
+ public void brightness( float value ) {
+ rm = gm = bm = value;
+ }
+
+ public void tint( float r, float g, float b, float strength ) {
+ rm = gm = bm = 1f - strength;
+ ra = r * strength;
+ ga = g * strength;
+ ba = b * strength;
+ }
+
+ public void tint( int color, float strength ) {
+ rm = gm = bm = 1f - strength;
+ ra = ((color >> 16) & 0xFF) / 255f * strength;
+ ga = ((color >> 8) & 0xFF) / 255f * strength;
+ ba = (color & 0xFF) / 255f * strength;
+ }
+
+ //color must include an alpha component (e.g. 0x80FF0000 for red at 0.5 strength)
+ public void tint( int color ) {
+ tint( color & 0xFFFFFF, ((color >> 24) & 0xFF) / (float)0xFF);
+ }
+
+ public void color( float r, float g, float b ) {
+ rm = gm = bm = 0;
+ ra = r;
+ ga = g;
+ ba = b;
+ }
+
+ public void color( int color ) {
+ color( ((color >> 16) & 0xFF) / 255f, ((color >> 8) & 0xFF) / 255f, (color & 0xFF) / 255f );
+ }
+
+ public void hardlight( float r, float g, float b ) {
+ ra = ga = ba = 0;
+ rm = r;
+ gm = g;
+ bm = b;
+ }
+
+ public void hardlight( int color ) {
+ hardlight( (color >> 16) / 255f, ((color >> 8) & 0xFF) / 255f, (color & 0xFF) / 255f );
+ }
+
+ public void resetColor() {
+ rm = gm = bm = am = 1;
+ ra = ga = ba = aa = 0;
+ }
+
+ public boolean overlapsPoint( float x, float y ) {
+ return x >= this.x && x < this.x + width * scale.x && y >= this.y && y < this.y + height * scale.y;
+ }
+
+ public boolean overlapsScreenPoint( int x, int y ) {
+ Camera c = camera();
+
+ if (c == null) return false;
+
+ PointF p = c.screenToCamera( x, y );
+ return overlapsPoint( p.x, p.y );
+ }
+
+ // true if its bounding box intersects its camera's bounds
+ public boolean isVisible() {
+ Camera c = camera();
+
+ if (c == null) return false;
+
+ float cx = c.scroll.x;
+ float cy = c.scroll.y;
+ float w = width();
+ float h = height();
+ return x + w >= cx && y + h >= cy && x < cx + c.width && y < cy + c.height;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/audio/Music.java b/SPD-classes/src/main/java/com/watabou/noosa/audio/Music.java
new file mode 100644
index 000000000..b38d6581f
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/audio/Music.java
@@ -0,0 +1,141 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.audio;
+
+import java.io.IOException;
+
+import com.watabou.noosa.Game;
+
+import android.content.res.AssetFileDescriptor;
+import android.media.AudioManager;
+import android.media.MediaPlayer;
+
+public enum Music implements MediaPlayer.OnPreparedListener, MediaPlayer.OnErrorListener {
+
+ INSTANCE;
+
+ private MediaPlayer player;
+
+ private String lastPlayed;
+ private boolean looping;
+
+ private boolean enabled = true;
+
+ public void play( String assetName, boolean looping ) {
+
+ if (isPlaying() && lastPlayed.equals( assetName )) {
+ return;
+ }
+
+ stop();
+
+ lastPlayed = assetName;
+ this.looping = looping;
+
+ if (!enabled || assetName == null) {
+ return;
+ }
+
+ try {
+
+ AssetFileDescriptor afd = Game.instance.getAssets().openFd( assetName );
+
+ player = new MediaPlayer();
+ player.setAudioStreamType( AudioManager.STREAM_MUSIC );
+ player.setDataSource( afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength() );
+ player.setOnPreparedListener( this );
+ player.setOnErrorListener( this );
+ player.prepareAsync();
+
+ } catch (IOException e) {
+
+ player.release();
+ player = null;
+
+ }
+ }
+
+ public void mute() {
+ lastPlayed = null;
+ stop();
+ }
+
+ @Override
+ public void onPrepared( MediaPlayer player ) {
+ player.start();
+ player.setLooping(looping);
+ }
+
+ @Override
+ public boolean onError( MediaPlayer mp, int what, int extra ) {
+ if (player != null) {
+ player.release();
+ player = null;
+ }
+ return true;
+ }
+
+ public void pause() {
+ if (player != null) {
+ player.pause();
+ }
+ }
+
+ public void resume() {
+ if (player != null) {
+ player.start();
+ player.setLooping(looping);
+ }
+ }
+
+ public void stop() {
+ if (player != null) {
+ player.stop();
+ player.release();
+ player = null;
+ }
+ }
+
+ public void volume( float value ) {
+ if (player != null) {
+ player.setVolume( value, value );
+ }
+ }
+
+ public boolean isPlaying() {
+ return player != null && player.isPlaying();
+ }
+
+ public void enable( boolean value ) {
+ enabled = value;
+ if (isPlaying() && !value) {
+ stop();
+ } else
+ if (!isPlaying() && value) {
+ play( lastPlayed, looping );
+ }
+ }
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/audio/Sample.java b/SPD-classes/src/main/java/com/watabou/noosa/audio/Sample.java
new file mode 100644
index 000000000..cc9c66eb2
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/audio/Sample.java
@@ -0,0 +1,151 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.audio;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.LinkedList;
+
+import com.watabou.noosa.Game;
+
+import android.content.res.AssetFileDescriptor;
+import android.content.res.AssetManager;
+import android.media.AudioManager;
+import android.media.SoundPool;
+
+public enum Sample implements SoundPool.OnLoadCompleteListener {
+
+ INSTANCE;
+
+ public static final int MAX_STREAMS = 8;
+
+ protected SoundPool pool =
+ new SoundPool( MAX_STREAMS, AudioManager.STREAM_MUSIC, 0 );
+
+ protected HashMap ids =
+ new HashMap<>();
+
+ private boolean enabled = true;
+ private float volume = 1f;
+
+ private LinkedList loadingQueue = new LinkedList<>();
+
+ public void reset() {
+
+ ids.clear();
+ loadingQueue = new LinkedList<>();
+ pool.release();
+
+ pool = new SoundPool( MAX_STREAMS, AudioManager.STREAM_MUSIC, 0 );
+ pool.setOnLoadCompleteListener( this );
+
+ }
+
+ public void pause() {
+ if (pool != null) {
+ pool.autoPause();
+ }
+ }
+
+ public void resume() {
+ if (pool != null) {
+ pool.autoResume();
+ }
+ }
+
+ public void load( String... assets ) {
+
+ for (String asset : assets) {
+ loadingQueue.add( asset );
+ }
+ loadNext();
+ }
+
+ private void loadNext() {
+ final String asset = loadingQueue.poll();
+ if (asset != null) {
+ if (!ids.containsKey( asset )) {
+ try {
+ pool.setOnLoadCompleteListener( new SoundPool.OnLoadCompleteListener() {
+ @Override
+ public void onLoadComplete(SoundPool soundPool, int sampleId, int status) {
+ loadNext();
+ }
+ } );
+
+ AssetManager manager = Game.instance.getAssets();
+ AssetFileDescriptor fd = manager.openFd( asset );
+ int streamID = pool.load( fd, 1 ) ;
+ ids.put( asset, streamID );
+ fd.close();
+ } catch (IOException e) {
+ loadNext();
+ } catch (NullPointerException e) {
+ // Do nothing (stop loading sounds)
+ }
+ } else {
+ loadNext();
+ }
+ }
+ }
+
+ public void unload( Object src ) {
+
+ if (ids.containsKey( src )) {
+
+ pool.unload( ids.get( src ) );
+ ids.remove( src );
+ }
+ }
+
+ public int play( Object id ) {
+ return play( id, 1 );
+ }
+
+ public int play( Object id, float volume ) {
+ return play( id, volume, volume, 1 );
+ }
+
+ public int play( Object id, float leftVolume, float rightVolume, float rate ) {
+ if (enabled && ids.containsKey( id )) {
+ return pool.play( ids.get( id ), leftVolume*volume, rightVolume*volume, 0, 0, rate );
+ } else {
+ return -1;
+ }
+ }
+
+ public void enable( boolean value ) {
+ enabled = value;
+ }
+
+ public void volume( float value ) {
+ this.volume = value;
+ }
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public void onLoadComplete( SoundPool soundPool, int sampleId, int status ) {
+ }
+}
\ No newline at end of file
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/particles/BitmaskEmitter.java b/SPD-classes/src/main/java/com/watabou/noosa/particles/BitmaskEmitter.java
new file mode 100644
index 000000000..102c57ae8
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/particles/BitmaskEmitter.java
@@ -0,0 +1,66 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.particles;
+
+import android.graphics.RectF;
+
+import com.watabou.gltextures.SmartTexture;
+import com.watabou.noosa.Image;
+import com.watabou.noosa.particles.Emitter;
+import com.watabou.utils.Random;
+
+public class BitmaskEmitter extends Emitter {
+
+ // DON'T USE WITH COMPLETELY TRANSPARENT IMAGES!!!
+
+ private SmartTexture map;
+ private int mapW;
+ private int mapH;
+
+ public BitmaskEmitter( Image target ) {
+ super();
+
+ this.target = target;
+
+ map = target.texture;
+ mapW = map.bitmap.getWidth();
+ mapH = map.bitmap.getHeight();
+ }
+
+ @Override
+ protected void emit( int index ) {
+
+ RectF frame = ((Image)target).frame();
+ float ofsX = frame.left * mapW;
+ float ofsY = frame.top * mapH;
+
+ float x, y;
+ do {
+ x = Random.Float( frame.width() ) * mapW;
+ y = Random.Float( frame.height() ) * mapH;
+ } while ((map.bitmap.getPixel( (int)(x + ofsX), (int)(y + ofsY) ) & 0x000000FF) == 0);
+
+ factory.emit( this, index,
+ target.x + x * target.scale.x,
+ target.y + y * target.scale.y );
+ }
+}
\ No newline at end of file
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/particles/Emitter.java b/SPD-classes/src/main/java/com/watabou/noosa/particles/Emitter.java
new file mode 100644
index 000000000..a4bda2bd0
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/particles/Emitter.java
@@ -0,0 +1,169 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.particles;
+
+import javax.microedition.khronos.opengles.GL10;
+
+import android.opengl.GLES20;
+
+import com.watabou.noosa.Game;
+import com.watabou.noosa.Group;
+import com.watabou.noosa.Visual;
+import com.watabou.utils.PointF;
+import com.watabou.utils.Random;
+
+public class Emitter extends Group {
+
+ protected boolean lightMode = false;
+
+ public float x;
+ public float y;
+ public float width;
+ public float height;
+
+ protected Visual target;
+ public boolean fillTarget = true;
+
+ protected float interval;
+ protected int quantity;
+
+ public boolean on = false;
+
+ public boolean autoKill = true;
+
+ protected int count;
+ protected float time;
+
+ protected Factory factory;
+
+ public void pos( float x, float y ) {
+ pos( x, y, 0, 0 );
+ }
+
+ public void pos( PointF p ) {
+ pos( p.x, p.y, 0, 0 );
+ }
+
+ public void pos( float x, float y, float width, float height ) {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+
+ target = null;
+ }
+
+ public void pos( Visual target ) {
+ this.target = target;
+ }
+
+ public void pos( Visual target, float x, float y, float width, float height ) {
+ pos(x, y, width, height);
+ pos(target);
+ }
+
+ public void burst( Factory factory, int quantity ) {
+ start( factory, 0, quantity );
+ }
+
+ public void pour( Factory factory, float interval ) {
+ start( factory, interval, 0 );
+ }
+
+ public void start( Factory factory, float interval, int quantity ) {
+
+ this.factory = factory;
+ this.lightMode = factory.lightMode();
+
+ this.interval = interval;
+ this.quantity = quantity;
+
+ count = 0;
+ time = Random.Float( interval );
+
+ on = true;
+ }
+
+ @Override
+ public void update() {
+
+ if (on) {
+ time += Game.elapsed;
+ while (time > interval) {
+ time -= interval;
+ emit( count++ );
+ if (quantity > 0 && count >= quantity) {
+ on = false;
+ break;
+ }
+ }
+ } else if (autoKill && countLiving() == 0) {
+ kill();
+ }
+
+ super.update();
+ }
+
+ protected void emit( int index ) {
+ if (target == null) {
+ factory.emit(
+ this,
+ index,
+ x + Random.Float( width ),
+ y + Random.Float( height ) );
+ } else {
+ if (fillTarget) {
+ factory.emit(
+ this,
+ index,
+ target.x + Random.Float( target.width ),
+ target.y + Random.Float( target.height ) );
+ } else {
+ factory.emit(
+ this,
+ index,
+ target.x + x + Random.Float( width ),
+ target.y + y + Random.Float( height ) );
+ }
+ }
+ }
+
+ @Override
+ public void draw() {
+ if (lightMode) {
+ GLES20.glBlendFunc( GL10.GL_SRC_ALPHA, GL10.GL_ONE );
+ super.draw();
+ GLES20.glBlendFunc( GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA );
+ } else {
+ super.draw();
+ }
+ }
+
+ abstract public static class Factory {
+
+ abstract public void emit( Emitter emitter, int index, float x, float y );
+
+ public boolean lightMode() {
+ return false;
+ }
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/particles/PixelParticle.java b/SPD-classes/src/main/java/com/watabou/noosa/particles/PixelParticle.java
new file mode 100644
index 000000000..2ee15615f
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/particles/PixelParticle.java
@@ -0,0 +1,68 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.particles;
+
+import com.watabou.noosa.Game;
+import com.watabou.noosa.PseudoPixel;
+
+public class PixelParticle extends PseudoPixel {
+
+ protected float size;
+
+ protected float lifespan;
+ protected float left;
+
+ public PixelParticle() {
+ super();
+
+ origin.set( +0.5f );
+ }
+
+ public void reset( float x, float y, int color, float size, float lifespan ) {
+ revive();
+
+ this.x = x;
+ this.y = y;
+
+ color( color );
+ size( this.size = size );
+
+ this.left = this.lifespan = lifespan;
+ }
+
+ @Override
+ public void update() {
+ super.update();
+
+ if ((left -= Game.elapsed) <= 0) {
+ kill();
+ }
+ }
+
+ public static class Shrinking extends PixelParticle {
+ @Override
+ public void update() {
+ super.update();
+ size( size * left / lifespan );
+ }
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/tweeners/AlphaTweener.java b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/AlphaTweener.java
new file mode 100644
index 000000000..06cc33f09
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/AlphaTweener.java
@@ -0,0 +1,45 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.tweeners;
+
+import com.watabou.noosa.Visual;
+
+public class AlphaTweener extends Tweener {
+
+ public Visual image;
+
+ public float start;
+ public float delta;
+
+ public AlphaTweener( Visual image, float alpha, float time ) {
+ super( image, time );
+
+ this.image = image;
+ start = image.alpha();
+ delta = alpha - start;
+ }
+
+ @Override
+ protected void updateValues( float progress ) {
+ image.alpha( start + delta * progress );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/tweeners/CameraScrollTweener.java b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/CameraScrollTweener.java
new file mode 100644
index 000000000..fe62fbd9d
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/CameraScrollTweener.java
@@ -0,0 +1,46 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.tweeners;
+
+import com.watabou.noosa.Camera;
+import com.watabou.utils.PointF;
+
+public class CameraScrollTweener extends Tweener {
+
+ public Camera camera;
+
+ public PointF start;
+ public PointF end;
+
+ public CameraScrollTweener( Camera camera, PointF pos, float time ) {
+ super( camera, time );
+
+ this.camera = camera;
+ start = camera.scroll;
+ end = pos;
+ }
+
+ @Override
+ protected void updateValues( float progress ) {
+ camera.scroll = PointF.inter( start, end, progress );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/tweeners/Delayer.java b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/Delayer.java
new file mode 100644
index 000000000..83fa46457
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/Delayer.java
@@ -0,0 +1,37 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.tweeners;
+
+public class Delayer extends Tweener {
+
+ public Delayer() {
+ super( null, 0 );
+ }
+
+ public Delayer( float time ) {
+ super( null, time );
+ }
+
+ @Override
+ protected void updateValues( float progress ) {
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/tweeners/PosTweener.java b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/PosTweener.java
new file mode 100644
index 000000000..a56e76076
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/PosTweener.java
@@ -0,0 +1,46 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.tweeners;
+
+import com.watabou.noosa.Visual;
+import com.watabou.utils.PointF;
+
+public class PosTweener extends Tweener {
+
+ public Visual visual;
+
+ public PointF start;
+ public PointF end;
+
+ public PosTweener( Visual visual, PointF pos, float time ) {
+ super( visual, time );
+
+ this.visual = visual;
+ start = visual.point();
+ end = pos;
+ }
+
+ @Override
+ protected void updateValues( float progress ) {
+ visual.point( PointF.inter( start, end, progress ) );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/tweeners/ScaleTweener.java b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/ScaleTweener.java
new file mode 100644
index 000000000..54792cc34
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/ScaleTweener.java
@@ -0,0 +1,46 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.tweeners;
+
+import com.watabou.noosa.Visual;
+import com.watabou.utils.PointF;
+
+public class ScaleTweener extends Tweener {
+
+ public Visual visual;
+
+ public PointF start;
+ public PointF end;
+
+ public ScaleTweener( Visual visual, PointF scale, float time ) {
+ super( visual, time );
+
+ this.visual = visual;
+ start = visual.scale;
+ end = scale;
+ }
+
+ @Override
+ protected void updateValues( float progress ) {
+ visual.scale = PointF.inter( start, end, progress );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/tweeners/Tweener.java b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/Tweener.java
new file mode 100644
index 000000000..a97c92d93
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/tweeners/Tweener.java
@@ -0,0 +1,68 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.tweeners;
+
+import com.watabou.noosa.Game;
+import com.watabou.noosa.Gizmo;
+
+abstract public class Tweener extends Gizmo {
+
+ public Gizmo target;
+
+ public float interval;
+ public float elapsed;
+
+ public Listener listener;
+
+ public Tweener( Gizmo target, float interval ) {
+ super();
+
+ this.target = target;
+ this.interval = interval;
+
+ elapsed = 0;
+ }
+
+ @Override
+ public void update() {
+ elapsed += Game.elapsed;
+ if (elapsed >= interval) {
+ updateValues( 1 );
+ onComplete();
+ kill();
+ } else {
+ updateValues( elapsed / interval );
+ }
+ }
+
+ protected void onComplete() {
+ if (listener != null) {
+ listener.onComplete( this );
+ }
+ }
+
+ abstract protected void updateValues( float progress );
+
+ public static interface Listener {
+ void onComplete( Tweener tweener );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/ui/Button.java b/SPD-classes/src/main/java/com/watabou/noosa/ui/Button.java
new file mode 100644
index 000000000..d105d95ac
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/ui/Button.java
@@ -0,0 +1,100 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.ui;
+
+import com.watabou.input.Touchscreen.Touch;
+import com.watabou.noosa.Game;
+import com.watabou.noosa.TouchArea;
+
+public class Button extends Component {
+
+ public static float longClick = 1f;
+
+ protected TouchArea hotArea;
+
+ protected boolean pressed;
+ protected float pressTime;
+
+ protected boolean processed;
+
+ @Override
+ protected void createChildren() {
+ hotArea = new TouchArea( 0, 0, 0, 0 ) {
+ @Override
+ protected void onTouchDown(Touch touch) {
+ pressed = true;
+ pressTime = 0;
+ processed = false;
+ Button.this.onTouchDown();
+ };
+ @Override
+ protected void onTouchUp(Touch touch) {
+ pressed = false;
+ Button.this.onTouchUp();
+ };
+ @Override
+ protected void onClick( Touch touch ) {
+ if (!processed) {
+ Button.this.onClick();
+ }
+ };
+ };
+ add( hotArea );
+ }
+
+ @Override
+ public void update() {
+ super.update();
+
+ hotArea.active = visible;
+
+ if (pressed) {
+ if ((pressTime += Game.elapsed) >= longClick) {
+ pressed = false;
+ if (onLongClick()) {
+
+ hotArea.reset();
+ processed = true;
+ onTouchUp();
+
+ Game.vibrate( 50 );
+ }
+ }
+ }
+ }
+
+ protected void onTouchDown() {};
+ protected void onTouchUp() {};
+ protected void onClick() {};
+
+ protected boolean onLongClick() {
+ return false;
+ };
+
+ @Override
+ protected void layout() {
+ hotArea.x = x;
+ hotArea.y = y;
+ hotArea.width = width;
+ hotArea.height = height;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/ui/CheckBox.java b/SPD-classes/src/main/java/com/watabou/noosa/ui/CheckBox.java
new file mode 100644
index 000000000..fe2e7561c
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/ui/CheckBox.java
@@ -0,0 +1,51 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.ui;
+
+public class CheckBox extends Button {
+
+ protected boolean checked;
+
+ public boolean checked() {
+ return checked;
+ }
+
+ public void checked( boolean value ) {
+ if (checked != value) {
+ checked = value;
+ updateState();
+ }
+ }
+
+ protected void updateState() {
+
+ }
+
+ @Override
+ protected void onClick() {
+ checked( !checked );
+ onChange();
+ }
+
+ protected void onChange() {
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/noosa/ui/Component.java b/SPD-classes/src/main/java/com/watabou/noosa/ui/Component.java
new file mode 100644
index 000000000..50a2db243
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/noosa/ui/Component.java
@@ -0,0 +1,109 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.noosa.ui;
+
+import com.watabou.noosa.Group;
+
+public class Component extends Group {
+
+ protected float x;
+ protected float y;
+ protected float width;
+ protected float height;
+
+ public Component() {
+ super();
+ createChildren();
+ }
+
+ public Component setPos( float x, float y ) {
+ this.x = x;
+ this.y = y;
+ layout();
+
+ return this;
+ }
+
+ public Component setSize( float width, float height ) {
+ this.width = width;
+ this.height = height;
+ layout();
+
+ return this;
+ }
+
+ public Component setRect( float x, float y, float width, float height ) {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ layout();
+
+ return this;
+ }
+
+ public boolean inside( float x, float y ) {
+ return x >= this.x && y >= this.y && x < this.x + width && y < this.y + height;
+ }
+
+ public void fill( Component c ) {
+ setRect( c.x, c.y, c.width, c.height );
+ }
+
+ public float left() {
+ return x;
+ }
+
+ public float right() {
+ return x + width;
+ }
+
+ public float centerX() {
+ return x + width / 2;
+ }
+
+ public float top() {
+ return y;
+ }
+
+ public float bottom() {
+ return y + height;
+ }
+
+ public float centerY() {
+ return y + height / 2;
+ }
+
+ public float width() {
+ return width;
+ }
+
+ public float height() {
+ return height;
+ }
+
+ protected void createChildren() {
+ }
+
+ protected void layout() {
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/BitmapCache.java b/SPD-classes/src/main/java/com/watabou/utils/BitmapCache.java
new file mode 100644
index 000000000..795ae6631
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/BitmapCache.java
@@ -0,0 +1,125 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+
+public class BitmapCache {
+
+ private static final String DEFAULT = "__default";
+
+ private static HashMap layers = new HashMap();
+
+ private static BitmapFactory.Options opts = new BitmapFactory.Options();
+ static {
+ opts.inDither = false;
+ }
+
+ public static Context context;
+
+ public static Bitmap get( String assetName ) {
+ return get( DEFAULT, assetName );
+ }
+
+ public static Bitmap get( String layerName, String assetName ) {
+
+ Layer layer;
+ if (!layers.containsKey( layerName )) {
+ layer = new Layer();
+ layers.put( layerName, layer );
+ } else {
+ layer = layers.get( layerName );
+ }
+
+ if (layer.containsKey( assetName )) {
+ return layer.get( assetName );
+ } else {
+
+ try {
+ InputStream stream = context.getResources().getAssets().open( assetName );
+ Bitmap bmp = BitmapFactory.decodeStream( stream, null, opts );
+ layer.put( assetName, bmp );
+ return bmp;
+ } catch (IOException e) {
+ return null;
+ }
+
+ }
+ }
+
+ public static Bitmap get( int resID ) {
+ return get( DEFAULT, resID );
+ }
+
+ public static Bitmap get( String layerName, int resID ) {
+
+ Layer layer;
+ if (!layers.containsKey( layerName )) {
+ layer = new Layer();
+ layers.put( layerName, layer );
+ } else {
+ layer = layers.get( layerName );
+ }
+
+ if (layer.containsKey( resID )) {
+ return layer.get( resID );
+ } else {
+
+ Bitmap bmp = BitmapFactory.decodeResource( context.getResources(), resID );
+ layer.put( resID, bmp );
+ return bmp;
+
+ }
+ }
+
+ public static void clear( String layerName ) {
+ if (layers.containsKey( layerName )) {
+ layers.get( layerName ).clear();
+ layers.remove( layerName );
+ }
+ }
+
+ public static void clear() {
+ for (Layer layer:layers.values()) {
+ layer.clear();
+ }
+ layers.clear();
+ }
+
+ @SuppressWarnings("serial")
+ private static class Layer extends HashMap {
+
+ @Override
+ public void clear() {
+ for (Bitmap bmp:values()) {
+ bmp.recycle();
+ }
+ super.clear();
+ }
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/BitmapFilm.java b/SPD-classes/src/main/java/com/watabou/utils/BitmapFilm.java
new file mode 100644
index 000000000..47389194c
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/BitmapFilm.java
@@ -0,0 +1,63 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+import java.util.HashMap;
+
+import android.graphics.Bitmap;
+import android.graphics.Rect;
+
+public class BitmapFilm {
+
+ public Bitmap bitmap;
+
+ protected HashMap frames = new HashMap();
+
+ public BitmapFilm( Bitmap bitmap ) {
+ this.bitmap = bitmap;
+ add( null, new Rect( 0, 0, bitmap.getWidth(), bitmap.getHeight() ) );
+ }
+
+ public BitmapFilm( Bitmap bitmap, int width ) {
+ this( bitmap, width, bitmap.getHeight() );
+ }
+
+ public BitmapFilm( Bitmap bitmap, int width, int height ) {
+ this.bitmap = bitmap;
+ int cols = bitmap.getWidth() / width;
+ int rows = bitmap.getHeight() / height;
+ for (int i=0; i < rows; i++) {
+ for (int j=0; j < cols; j++) {
+ Rect rect = new Rect( j * width, i * height, (j+1) * width, (i+1) * height );
+ add( i * cols + j, rect );
+ }
+ }
+ }
+
+ public void add( Object id, Rect rect ) {
+ frames.put( id, rect );
+ }
+
+ public Rect get( Object id ) {
+ return frames.get( id );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/Bundlable.java b/SPD-classes/src/main/java/com/watabou/utils/Bundlable.java
new file mode 100644
index 000000000..171174c14
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/Bundlable.java
@@ -0,0 +1,29 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+public interface Bundlable {
+
+ void restoreFromBundle( Bundle bundle );
+ void storeInBundle( Bundle bundle );
+
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/Bundle.java b/SPD-classes/src/main/java/com/watabou/utils/Bundle.java
new file mode 100644
index 000000000..8b4fae64a
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/Bundle.java
@@ -0,0 +1,411 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PushbackInputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.GZIPOutputStream;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.json.JSONTokener;
+
+public class Bundle {
+
+ private static final String CLASS_NAME = "__className";
+
+ private static HashMap aliases = new HashMap();
+
+ private JSONObject data;
+
+ public Bundle() {
+ this( new JSONObject() );
+ }
+
+ public String toString() {
+ return data.toString();
+ }
+
+ private Bundle( JSONObject data ) {
+ this.data = data;
+ }
+
+ public boolean isNull() {
+ return data == null;
+ }
+
+ public boolean contains( String key ) {
+ return !data.isNull( key );
+ }
+
+ public boolean getBoolean( String key ) {
+ return data.optBoolean( key );
+ }
+
+ public int getInt( String key ) {
+ return data.optInt( key );
+ }
+
+ public float getFloat( String key ) {
+ return (float)data.optDouble( key, 0.0 );
+ }
+
+ public String getString( String key ) {
+ return data.optString( key );
+ }
+
+ public Class getClass( String key ) {
+ String clName = getString(key).replace("class ", "");;
+ if (clName != null){
+ if (aliases.containsKey( clName )) {
+ clName = aliases.get( clName );
+ }
+ try {
+ Class cl = Class.forName( clName );
+ return cl;
+ } catch (ClassNotFoundException e) {
+ return null;
+ }
+ }
+ return null;
+ }
+
+ public Bundle getBundle( String key ) {
+ return new Bundle( data.optJSONObject( key ) );
+ }
+
+ private Bundlable get() {
+ if (data == null) return null;
+ try {
+ String clName = getString( CLASS_NAME );
+ if (aliases.containsKey( clName )) {
+ clName = aliases.get( clName );
+ }
+
+ Class> cl = Class.forName( clName );
+ if (cl != null) {
+ Bundlable object = (Bundlable)cl.newInstance();
+ object.restoreFromBundle( this );
+ return object;
+ } else {
+ return null;
+ }
+ } catch (ClassNotFoundException e ) {
+ return null;
+ } catch (InstantiationException e ) {
+ return null;
+ } catch (IllegalAccessException e ) {
+ return null;
+ }
+ }
+
+ public Bundlable get( String key ) {
+ return getBundle( key ).get();
+ }
+
+ public > E getEnum( String key, Class enumClass ) {
+ try {
+ return Enum.valueOf( enumClass, data.getString( key ) );
+ } catch (JSONException e) {
+ return enumClass.getEnumConstants()[0];
+ }
+ }
+
+ public int[] getIntArray( String key ) {
+ try {
+ JSONArray array = data.getJSONArray( key );
+ int length = array.length();
+ int[] result = new int[length];
+ for (int i=0; i < length; i++) {
+ result[i] = array.getInt( i );
+ }
+ return result;
+ } catch (JSONException e) {
+ return null;
+ }
+ }
+
+ public boolean[] getBooleanArray( String key ) {
+ try {
+ JSONArray array = data.getJSONArray( key );
+ int length = array.length();
+ boolean[] result = new boolean[length];
+ for (int i=0; i < length; i++) {
+ result[i] = array.getBoolean( i );
+ }
+ return result;
+ } catch (JSONException e) {
+ return null;
+ }
+ }
+
+ public String[] getStringArray( String key ) {
+ try {
+ JSONArray array = data.getJSONArray( key );
+ int length = array.length();
+ String[] result = new String[length];
+ for (int i=0; i < length; i++) {
+ result[i] = array.getString( i );
+ }
+ return result;
+ } catch (JSONException e) {
+ return null;
+ }
+ }
+
+ public Class[] getClassArray( String key ) {
+ try {
+ JSONArray array = data.getJSONArray( key );
+ int length = array.length();
+ Class[] result = new Class[length];
+ for (int i=0; i < length; i++) {
+ String clName = array.getString( i ).replace("class ", "");
+ if (aliases.containsKey( clName )) {
+ clName = aliases.get( clName );
+ }
+ try {
+ Class cl = Class.forName( clName );
+ result[i] = cl;
+ } catch (ClassNotFoundException e) {
+ result[i] = null;
+ }
+ }
+ return result;
+ } catch (JSONException e) {
+ return null;
+ }
+ }
+
+ public Collection getCollection( String key ) {
+
+ ArrayList list = new ArrayList();
+
+ try {
+ JSONArray array = data.getJSONArray( key );
+ for (int i=0; i < array.length(); i++) {
+ Bundlable O = new Bundle( array.getJSONObject( i ) ).get();
+ if (O != null) list.add( O );
+ }
+ } catch (JSONException e) {
+
+ }
+
+ return list;
+ }
+
+ public void put( String key, boolean value ) {
+ try {
+ data.put( key, value );
+ } catch (JSONException e) {
+
+ }
+ }
+
+ public void put( String key, int value ) {
+ try {
+ data.put( key, value );
+ } catch (JSONException e) {
+
+ }
+ }
+
+ public void put( String key, float value ) {
+ try {
+ data.put( key, value );
+ } catch (JSONException e) {
+
+ }
+ }
+
+ public void put( String key, String value ) {
+ try {
+ data.put( key, value );
+ } catch (JSONException e) {
+
+ }
+ }
+
+ public void put( String key, Class value ){
+ try {
+ data.put( key, value );
+ } catch (JSONException e) {
+
+ }
+ }
+
+ public void put( String key, Bundle bundle ) {
+ try {
+ data.put( key, bundle.data );
+ } catch (JSONException e) {
+
+ }
+ }
+
+ public void put( String key, Bundlable object ) {
+ if (object != null) {
+ try {
+ Bundle bundle = new Bundle();
+ bundle.put( CLASS_NAME, object.getClass().getName() );
+ object.storeInBundle( bundle );
+ data.put( key, bundle.data );
+ } catch (JSONException e) {
+ }
+ }
+ }
+
+ public void put( String key, Enum> value ) {
+ if (value != null) {
+ try {
+ data.put( key, value.name() );
+ } catch (JSONException e) {
+ }
+ }
+ }
+
+ public void put( String key, int[] array ) {
+ try {
+ JSONArray jsonArray = new JSONArray();
+ for (int i=0; i < array.length; i++) {
+ jsonArray.put( i, array[i] );
+ }
+ data.put( key, jsonArray );
+ } catch (JSONException e) {
+
+ }
+ }
+
+ public void put( String key, boolean[] array ) {
+ try {
+ JSONArray jsonArray = new JSONArray();
+ for (int i=0; i < array.length; i++) {
+ jsonArray.put( i, array[i] );
+ }
+ data.put( key, jsonArray );
+ } catch (JSONException e) {
+
+ }
+ }
+
+ public void put( String key, String[] array ) {
+ try {
+ JSONArray jsonArray = new JSONArray();
+ for (int i=0; i < array.length; i++) {
+ jsonArray.put( i, array[i] );
+ }
+ data.put( key, jsonArray );
+ } catch (JSONException e) {
+
+ }
+ }
+
+ public void put( String key, Class[] array ){
+ try {
+ JSONArray jsonArray = new JSONArray();
+ for (int i=0; i < array.length; i++) {
+ jsonArray.put( i, array[i] );
+ }
+ data.put( key, jsonArray );
+ } catch (JSONException e) {
+
+ }
+ }
+
+ public void put( String key, Collection extends Bundlable> collection ) {
+ JSONArray array = new JSONArray();
+ for (Bundlable object : collection) {
+ if (object != null) {
+ Bundle bundle = new Bundle();
+ bundle.put(CLASS_NAME, object.getClass().getName());
+ object.storeInBundle(bundle);
+ array.put(bundle.data);
+ }
+ }
+ try {
+ data.put( key, array );
+ } catch (JSONException e) {
+
+ }
+ }
+
+ //useful to turn this off for save data debugging.
+ private static final boolean compressByDefault = true;
+
+ private static final int GZIP_BUFFER = 1024*4; //4 kb
+
+ public static Bundle read( InputStream stream ) throws IOException {
+
+ try {
+ BufferedReader reader;
+
+ //determines if we're reading a regular, or compressed file
+ PushbackInputStream pb = new PushbackInputStream( stream, 2 );
+ byte[] header = new byte[2];
+ pb.unread(header, 0, pb.read(header));
+ //GZIP header is 0x1f8b
+ if( header[ 0 ] == (byte) 0x1f && header[ 1 ] == (byte) 0x8b )
+ reader = new BufferedReader( new InputStreamReader( new GZIPInputStream( pb, GZIP_BUFFER ) ) );
+ else
+ reader = new BufferedReader( new InputStreamReader( pb ) );
+
+ JSONObject json = (JSONObject)new JSONTokener( reader.readLine() ).nextValue();
+ reader.close();
+
+ return new Bundle( json );
+ } catch (Exception e) {
+ throw new IOException();
+ }
+ }
+
+ public static boolean write( Bundle bundle, OutputStream stream ){
+ return write(bundle, stream, compressByDefault);
+ }
+
+ public static boolean write( Bundle bundle, OutputStream stream, boolean compressed ) {
+ try {
+ BufferedWriter writer;
+ if (compressed) writer = new BufferedWriter( new OutputStreamWriter( new GZIPOutputStream(stream, GZIP_BUFFER ) ) );
+ else writer = new BufferedWriter( new OutputStreamWriter( stream ) );
+
+ writer.write( bundle.data.toString() );
+ writer.close();
+
+ return true;
+ } catch (IOException e) {
+ return false;
+ }
+ }
+
+ public static void addAlias( Class> cl, String alias ) {
+ aliases.put( alias, cl.getName() );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/Callback.java b/SPD-classes/src/main/java/com/watabou/utils/Callback.java
new file mode 100644
index 000000000..211399c88
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/Callback.java
@@ -0,0 +1,28 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+public interface Callback {
+
+ void call();
+
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/ColorMath.java b/SPD-classes/src/main/java/com/watabou/utils/ColorMath.java
new file mode 100644
index 000000000..2dca44019
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/ColorMath.java
@@ -0,0 +1,65 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+public class ColorMath {
+
+ public static int interpolate( int A, int B, float p ) {
+
+ if (p <= 0) {
+ return A;
+ } else if (p >= 1) {
+ return B;
+ }
+
+ int ra = A >> 16;
+ int ga = (A >> 8) & 0xFF;
+ int ba = A & 0xFF;
+
+ int rb = B >> 16;
+ int gb = (B >> 8) & 0xFF;
+ int bb = B & 0xFF;
+
+ float p1 = 1 - p;
+
+ int r = (int)(p1 * ra + p * rb);
+ int g = (int)(p1 * ga + p * gb);
+ int b = (int)(p1 * ba + p * bb);
+
+ return (r << 16) + (g << 8) + b;
+ }
+
+ public static int interpolate( float p, int... colors ) {
+ if (p <= 0) {
+ return colors[0];
+ } else if (p >= 1) {
+ return colors[colors.length-1];
+ }
+ int segment = (int)(colors.length * p);
+ return interpolate( colors[segment], colors[segment+1], (p * (colors.length - 1)) % 1 );
+ }
+
+ public static int random( int a, int b ) {
+ return interpolate( a, b, Random.Float() );
+ }
+
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/GameMath.java b/SPD-classes/src/main/java/com/watabou/utils/GameMath.java
new file mode 100644
index 000000000..a2241feda
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/GameMath.java
@@ -0,0 +1,46 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+import com.watabou.noosa.Game;
+
+public class GameMath {
+
+ public static float speed( float speed, float acc ) {
+
+ if (acc != 0) {
+ speed += acc * Game.elapsed;
+ }
+
+ return speed;
+ }
+
+ public static float gate( float min, float value, float max ) {
+ if (value < min) {
+ return min;
+ } else if (value > max) {
+ return max;
+ } else {
+ return value;
+ }
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/Graph.java b/SPD-classes/src/main/java/com/watabou/utils/Graph.java
new file mode 100644
index 000000000..3da537229
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/Graph.java
@@ -0,0 +1,107 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+public class Graph {
+
+ public static void setPrice( List nodes, int value ) {
+ for (T node : nodes) {
+ node.price( value );
+ }
+ }
+
+ public static void buildDistanceMap( Collection nodes, Node focus ) {
+
+ for (T node : nodes) {
+ node.distance( Integer.MAX_VALUE );
+ }
+
+ LinkedList queue = new LinkedList();
+
+ focus.distance( 0 );
+ queue.add( focus );
+
+ while (!queue.isEmpty()) {
+
+ Node node = queue.poll();
+ int distance = node.distance();
+ int price = node.price();
+
+ for (Node edge : node.edges()) {
+ if (edge.distance() > distance + price) {
+ queue.add( edge );
+ edge.distance( distance + price );
+ }
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public static List buildPath( Collection nodes, T from, T to ) {
+
+ List path = new ArrayList();
+
+ T room = from;
+ while (room != to) {
+
+ int min = room.distance();
+ T next = null;
+
+ Collection extends Node> edges = room.edges();
+
+ for (Node edge : edges) {
+
+ int distance = edge.distance();
+ if (distance < min) {
+ min = distance;
+ next = (T)edge;
+ }
+ }
+
+ if (next == null) {
+ return null;
+ }
+
+ path.add( next );
+ room = next;
+ }
+
+ return path;
+ }
+
+ public interface Node {
+
+ int distance();
+ void distance( int value );
+
+ int price();
+ void price( int value );
+
+ Collection extends Node> edges();
+
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/Highlighter.java b/SPD-classes/src/main/java/com/watabou/utils/Highlighter.java
new file mode 100644
index 000000000..a1d81d41d
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/Highlighter.java
@@ -0,0 +1,81 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+package com.watabou.utils;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class Highlighter {
+
+ private static final Pattern HIGHLIGHTER = Pattern.compile( "_(.*?)_" );
+ private static final Pattern STRIPPER = Pattern.compile( "[ \n]" );
+
+ public String text;
+
+ public boolean[] mask;
+
+ public Highlighter( String text ) {
+
+ String stripped = STRIPPER.matcher( text ).replaceAll( "" );
+ mask = new boolean[stripped.length()];
+
+ Matcher m = HIGHLIGHTER.matcher( stripped );
+
+ int pos = 0;
+ int lastMatch = 0;
+
+ while (m.find()) {
+ pos += (m.start() - lastMatch);
+ int groupLen = m.group( 1 ).length();
+ for (int i=pos; i < pos + groupLen; i++) {
+ mask[i] = true;
+ }
+ pos += groupLen;
+ lastMatch = m.end();
+ }
+
+ m.reset( text );
+ StringBuffer sb = new StringBuffer();
+ while (m.find()) {
+ m.appendReplacement( sb, m.group( 1 ) );
+ }
+ m.appendTail( sb );
+
+ this.text = sb.toString();
+ }
+
+ public boolean[] inverted() {
+ boolean[] result = new boolean[mask.length];
+ for (int i=0; i < result.length; i++) {
+ result[i] = !mask[i];
+ }
+ return result;
+ }
+
+ public boolean isHighlighted() {
+ for (int i=0; i < mask.length; i++) {
+ if (mask[i]) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/SPD-classes/src/main/java/com/watabou/utils/PathFinder.java b/SPD-classes/src/main/java/com/watabou/utils/PathFinder.java
new file mode 100644
index 000000000..4474ae440
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/PathFinder.java
@@ -0,0 +1,340 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+import java.util.Arrays;
+import java.util.LinkedList;
+
+public class PathFinder {
+
+ public static int[] distance;
+
+ private static boolean[] goals;
+ private static int[] queue;
+
+ private static int size = 0;
+
+ private static int[] dir;
+
+ public static void setMapSize( int width, int height ) {
+
+ int size = width * height;
+
+ if (PathFinder.size != size) {
+
+ PathFinder.size = size;
+ distance = new int[size];
+ goals = new boolean[size];
+ queue = new int[size];
+
+ dir = new int[]{-1, +1, -width, +width, -width-1, -width+1, +width-1, +width+1};
+ }
+ }
+
+ public static Path find( int from, int to, boolean[] passable ) {
+
+ if (!buildDistanceMap( from, to, passable )) {
+ return null;
+ }
+
+ Path result = new Path();
+ int s = from;
+
+ // From the starting position we are moving downwards,
+ // until we reach the ending point
+ do {
+ int minD = distance[s];
+ int mins = s;
+
+ for (int i=0; i < dir.length; i++) {
+
+ int n = s + dir[i];
+
+ int thisD = distance[n];
+ if (thisD < minD) {
+ minD = thisD;
+ mins = n;
+ }
+ }
+ s = mins;
+ result.add( s );
+ } while (s != to);
+
+ return result;
+ }
+
+ public static int getStep( int from, int to, boolean[] passable ) {
+
+ if (!buildDistanceMap( from, to, passable )) {
+ return -1;
+ }
+
+ // From the starting position we are making one step downwards
+ int minD = distance[from];
+ int best = from;
+
+ int step, stepD;
+
+ for (int i=0; i < dir.length; i++) {
+
+ if ((stepD = distance[step = from + dir[i]]) < minD) {
+ minD = stepD;
+ best = step;
+ }
+ }
+
+ return best;
+ }
+
+ public static int getStepBack( int cur, int from, boolean[] passable ) {
+
+ int d = buildEscapeDistanceMap( cur, from, 2f, passable );
+ for (int i=0; i < size; i++) {
+ goals[i] = distance[i] == d;
+ }
+ if (!buildDistanceMap( cur, goals, passable )) {
+ return -1;
+ }
+
+ int s = cur;
+
+ // From the starting position we are making one step downwards
+ int minD = distance[s];
+ int mins = s;
+
+ for (int i=0; i < dir.length; i++) {
+
+ int n = s + dir[i];
+ int thisD = distance[n];
+
+ if (thisD < minD) {
+ minD = thisD;
+ mins = n;
+ }
+ }
+
+ return mins;
+ }
+
+ private static boolean buildDistanceMap( int from, int to, boolean[] passable ) {
+
+ if (from == to) {
+ return false;
+ }
+
+ Arrays.fill( distance, Integer.MAX_VALUE );
+
+ boolean pathFound = false;
+
+ int head = 0;
+ int tail = 0;
+
+ // Add to queue
+ queue[tail++] = to;
+ distance[to] = 0;
+
+ while (head < tail) {
+
+ // Remove from queue
+ int step = queue[head++];
+ if (step == from) {
+ pathFound = true;
+ break;
+ }
+ int nextDistance = distance[step] + 1;
+
+ for (int i=0; i < dir.length; i++) {
+
+ int n = step + dir[i];
+ if (n == from || (n >= 0 && n < size && passable[n] && (distance[n] > nextDistance))) {
+ // Add to queue
+ queue[tail++] = n;
+ distance[n] = nextDistance;
+ }
+
+ }
+ }
+
+ return pathFound;
+ }
+
+ public static void buildDistanceMap( int to, boolean[] passable, int limit ) {
+
+ Arrays.fill( distance, Integer.MAX_VALUE );
+
+ int head = 0;
+ int tail = 0;
+
+ // Add to queue
+ queue[tail++] = to;
+ distance[to] = 0;
+
+ while (head < tail) {
+
+ // Remove from queue
+ int step = queue[head++];
+
+ int nextDistance = distance[step] + 1;
+ if (nextDistance > limit) {
+ return;
+ }
+
+ for (int i=0; i < dir.length; i++) {
+
+ int n = step + dir[i];
+ if (n >= 0 && n < size && passable[n] && (distance[n] > nextDistance)) {
+ // Add to queue
+ queue[tail++] = n;
+ distance[n] = nextDistance;
+ }
+
+ }
+ }
+ }
+
+ private static boolean buildDistanceMap( int from, boolean[] to, boolean[] passable ) {
+
+ if (to[from]) {
+ return false;
+ }
+
+ Arrays.fill( distance, Integer.MAX_VALUE );
+
+ boolean pathFound = false;
+
+ int head = 0;
+ int tail = 0;
+
+ // Add to queue
+ for (int i=0; i < size; i++) {
+ if (to[i]) {
+ queue[tail++] = i;
+ distance[i] = 0;
+ }
+ }
+
+ while (head < tail) {
+
+ // Remove from queue
+ int step = queue[head++];
+ if (step == from) {
+ pathFound = true;
+ break;
+ }
+ int nextDistance = distance[step] + 1;
+
+ for (int i=0; i < dir.length; i++) {
+
+ int n = step + dir[i];
+ if (n == from || (n >= 0 && n < size && passable[n] && (distance[n] > nextDistance))) {
+ // Add to queue
+ queue[tail++] = n;
+ distance[n] = nextDistance;
+ }
+
+ }
+ }
+
+ return pathFound;
+ }
+
+ private static int buildEscapeDistanceMap( int cur, int from, float factor, boolean[] passable ) {
+
+ Arrays.fill( distance, Integer.MAX_VALUE );
+
+ int destDist = Integer.MAX_VALUE;
+
+ int head = 0;
+ int tail = 0;
+
+ // Add to queue
+ queue[tail++] = from;
+ distance[from] = 0;
+
+ int dist = 0;
+
+ while (head < tail) {
+
+ // Remove from queue
+ int step = queue[head++];
+ dist = distance[step];
+
+ if (dist > destDist) {
+ return destDist;
+ }
+
+ if (step == cur) {
+ destDist = (int)(dist * factor) + 1;
+ }
+
+ int nextDistance = dist + 1;
+
+ for (int i=0; i < dir.length; i++) {
+
+ int n = step + dir[i];
+ if (n >= 0 && n < size && passable[n] && distance[n] > nextDistance) {
+ // Add to queue
+ queue[tail++] = n;
+ distance[n] = nextDistance;
+ }
+
+ }
+ }
+
+ return dist;
+ }
+
+ @SuppressWarnings("unused")
+ private static void buildDistanceMap( int to, boolean[] passable ) {
+
+ Arrays.fill( distance, Integer.MAX_VALUE );
+
+ int head = 0;
+ int tail = 0;
+
+ // Add to queue
+ queue[tail++] = to;
+ distance[to] = 0;
+
+ while (head < tail) {
+
+ // Remove from queue
+ int step = queue[head++];
+ int nextDistance = distance[step] + 1;
+
+ for (int i=0; i < dir.length; i++) {
+
+ int n = step + dir[i];
+ if (n >= 0 && n < size && passable[n] && (distance[n] > nextDistance)) {
+ // Add to queue
+ queue[tail++] = n;
+ distance[n] = nextDistance;
+ }
+
+ }
+ }
+ }
+
+ @SuppressWarnings("serial")
+ public static class Path extends LinkedList {
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/Point.java b/SPD-classes/src/main/java/com/watabou/utils/Point.java
new file mode 100644
index 000000000..b6b55572c
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/Point.java
@@ -0,0 +1,85 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+public class Point {
+
+ public int x;
+ public int y;
+
+ public Point() {
+ }
+
+ public Point( int x, int y ) {
+ this.x = x;
+ this.y = y;
+ }
+
+ public Point( Point p ) {
+ this.x = p.x;
+ this.y = p.y;
+ }
+
+ public Point set( int x, int y ) {
+ this.x = x;
+ this.y = y;
+ return this;
+ }
+
+ public Point set( Point p ) {
+ x = p.x;
+ y = p.y;
+ return this;
+ }
+
+ public Point clone() {
+ return new Point( this );
+ }
+
+ public Point scale( float f ) {
+ this.x *= f;
+ this.y *= f;
+ return this;
+ }
+
+ public Point offset( int dx, int dy ) {
+ x += dx;
+ y += dy;
+ return this;
+ }
+
+ public Point offset( Point d ) {
+ x += d.x;
+ y += d.y;
+ return this;
+ }
+
+ @Override
+ public boolean equals( Object obj ) {
+ if (obj instanceof Point) {
+ Point p = (Point)obj;
+ return p.x == x && p.y == y;
+ } else {
+ return false;
+ }
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/PointF.java b/SPD-classes/src/main/java/com/watabou/utils/PointF.java
new file mode 100644
index 000000000..058113816
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/PointF.java
@@ -0,0 +1,154 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+import android.annotation.SuppressLint;
+import android.util.FloatMath;
+
+@SuppressLint("FloatMath")
+public class PointF {
+
+ public static final float PI = 3.1415926f;
+ public static final float PI2 = PI * 2;
+ public static final float G2R = PI / 180;
+
+ public float x;
+ public float y;
+
+ public PointF() {
+ }
+
+ public PointF( float x, float y ) {
+ this.x = x;
+ this.y = y;
+ }
+
+ public PointF( PointF p ) {
+ this.x = p.x;
+ this.y = p.y;
+ }
+
+ public PointF( Point p ) {
+ this.x = p.x;
+ this.y = p.y;
+ }
+
+ public PointF clone() {
+ return new PointF( this );
+ }
+
+ public PointF scale( float f ) {
+ this.x *= f;
+ this.y *= f;
+ return this;
+ }
+
+ public PointF invScale( float f ) {
+ this.x /= f;
+ this.y /= f;
+ return this;
+ }
+
+ public PointF set( float x, float y ) {
+ this.x = x;
+ this.y = y;
+ return this;
+ }
+
+ public PointF set( PointF p ) {
+ this.x = p.x;
+ this.y = p.y;
+ return this;
+ }
+
+ public PointF set( float v ) {
+ this.x = v;
+ this.y = v;
+ return this;
+ }
+
+ public PointF polar( float a, float l ) {
+ this.x = l * (float)Math.cos( a );
+ this.y = l * (float)Math.sin( a );
+ return this;
+ }
+
+ public PointF offset( float dx, float dy ) {
+ x += dx;
+ y += dy;
+ return this;
+ }
+
+ public PointF offset( PointF p ) {
+ x += p.x;
+ y += p.y;
+ return this;
+ }
+
+ public PointF negate() {
+ x = -x;
+ y = -y;
+ return this;
+ }
+
+ public PointF normalize() {
+ float l = length();
+ x /= l;
+ y /= l;
+ return this;
+ }
+
+ public Point floor() {
+ return new Point( (int)x, (int)y );
+ }
+
+ public float length() {
+ return (float)Math.sqrt( x * x + y * y );
+ }
+
+ public static PointF sum( PointF a, PointF b ) {
+ return new PointF( a.x + b.x, a.y + b.y );
+ }
+
+ public static PointF diff( PointF a, PointF b ) {
+ return new PointF( a.x - b.x, a.y - b.y );
+ }
+
+ public static PointF inter( PointF a, PointF b, float d ) {
+ return new PointF( a.x + (b.x - a.x) * d, a.y + (b.y - a.y) * d );
+ }
+
+ public static float distance( PointF a, PointF b ) {
+ float dx = a.x - b.x;
+ float dy = a.y - b.y;
+ return (float)Math.sqrt( dx * dx + dy * dy );
+ }
+
+ public static float angle( PointF start, PointF end ) {
+ return (float)Math.atan2( end.y - start.y, end.x - start.x );
+ }
+
+ @Override
+ public String toString() {
+ return "" + x + ", " + y;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/Random.java b/SPD-classes/src/main/java/com/watabou/utils/Random.java
new file mode 100644
index 000000000..b38714067
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/Random.java
@@ -0,0 +1,154 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+import java.util.Collection;
+import java.util.HashMap;
+
+public class Random {
+
+ public static float Float( float min, float max ) {
+ return (float)(min + Math.random() * (max - min));
+ }
+
+ public static float Float( float max ) {
+ return (float)(Math.random() * max);
+ }
+
+ public static float Float() {
+ return (float)Math.random();
+ }
+
+ public static int Int( int max ) {
+ return max > 0 ? (int)(Math.random() * max) : 0;
+ }
+
+ public static int Int( int min, int max ) {
+ return min + (int)(Math.random() * (max - min));
+ }
+
+ public static int IntRange( int min, int max ) {
+ return min + (int)(Math.random() * (max - min + 1));
+ }
+
+ public static int NormalIntRange( int min, int max ) {
+ return min + (int)((Math.random() + Math.random()) * (max - min + 1) / 2f);
+ }
+
+ public static int chances( float[] chances ) {
+
+ int length = chances.length;
+
+ float sum = 0;
+ for (int i=0; i < length; i++) {
+ sum += chances[i];
+ }
+
+ float value = Float( sum );
+ sum = 0;
+ for (int i=0; i < length; i++) {
+ sum += chances[i];
+ if (value < sum) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static K chances( HashMap chances ) {
+
+ int size = chances.size();
+
+ Object[] values = chances.keySet().toArray();
+ float[] probs = new float[size];
+ float sum = 0;
+ for (int i=0; i < size; i++) {
+ probs[i] = chances.get( values[i] );
+ sum += probs[i];
+ }
+
+ float value = Float( sum );
+
+ sum = probs[0];
+ for (int i=0; i < size; i++) {
+ if (value < sum) {
+ return (K)values[i];
+ }
+ sum += probs[i + 1];
+ }
+
+ return null;
+ }
+
+ public static int index( Collection> collection ) {
+ return (int)(Math.random() * collection.size());
+ }
+
+ @SafeVarargs
+ public static T oneOf( T... array ) {
+ return array[(int)(Math.random() * array.length)];
+ }
+
+ public static T element( T[] array ) {
+ return element( array, array.length );
+ }
+
+ public static T element( T[] array, int max ) {
+ return array[(int)(Math.random() * max)];
+ }
+
+ @SuppressWarnings("unchecked")
+ public static T element( Collection extends T> collection ) {
+ int size = collection.size();
+ return size > 0 ?
+ (T)collection.toArray()[Int( size )] :
+ null;
+ }
+
+ public static void shuffle( T[] array ) {
+ for (int i=0; i < array.length - 1; i++) {
+ int j = Int( i, array.length );
+ if (j != i) {
+ T t = array[i];
+ array[i] = array[j];
+ array[j] = t;
+ }
+ }
+ }
+
+ public static void shuffle( U[] u, V[]v ) {
+ for (int i=0; i < u.length - 1; i++) {
+ int j = Int( i, u.length );
+ if (j != i) {
+ U ut = u[i];
+ u[i] = u[j];
+ u[j] = ut;
+
+ V vt = v[i];
+ v[i] = v[j];
+ v[j] = vt;
+ }
+ }
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/Rect.java b/SPD-classes/src/main/java/com/watabou/utils/Rect.java
new file mode 100644
index 000000000..1f6af33fe
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/Rect.java
@@ -0,0 +1,132 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+import java.util.HashSet;
+
+public class Rect {
+
+ public int left;
+ public int top;
+ public int right;
+ public int bottom;
+
+ public Rect() {
+ this( 0, 0, 0, 0 );
+ }
+
+ public Rect( Rect rect ) {
+ this( rect.left, rect.top, rect.right, rect.bottom );
+ }
+
+ public Rect( int left, int top, int right, int bottom ) {
+ this.left = left;
+ this.top = top;
+ this.right = right;
+ this.bottom = bottom;
+ }
+
+ public int width() {
+ return right - left;
+ }
+
+ public int height() {
+ return bottom - top;
+ }
+
+ public int square() {
+ return (right - left) * (bottom - top);
+ }
+
+ public Rect set( int left, int top, int right, int bottom ) {
+ this.left = left;
+ this.top = top;
+ this.right = right;
+ this.bottom = bottom;
+ return this;
+ }
+
+ public Rect set( Rect rect ) {
+ return set( rect.left, rect.top, rect.right, rect.bottom );
+ }
+
+ public boolean isEmpty() {
+ return right <= left || bottom <= top;
+ }
+
+ public Rect setEmpty() {
+ left = right = top = bottom = 0;
+ return this;
+ }
+
+ public Rect intersect( Rect other ) {
+ Rect result = new Rect();
+ result.left = Math.max( left, other.left );
+ result.right = Math.min( right, other.right );
+ result.top = Math.max( top, other.top );
+ result.bottom = Math.min( bottom, other.bottom );
+ return result;
+ }
+
+ public Rect union( int x, int y ) {
+ if (isEmpty()) {
+ return set( x, y, x + 1, y + 1 );
+ } else {
+ if (x < left) {
+ left = x;
+ } else if (x >= right) {
+ right = x + 1;
+ }
+ if (y < top) {
+ top = y;
+ } else if (y >= bottom) {
+ bottom = y + 1;
+ }
+ return this;
+ }
+ }
+
+ public Rect union( Point p ) {
+ return union( p.x, p.y );
+ }
+
+ public boolean inside( Point p ) {
+ return p.x >= left && p.x < right && p.y >= top && p.y < bottom;
+ }
+
+ public Rect shrink( int d ) {
+ return new Rect( left + d, top + d, right - d, bottom - d );
+ }
+
+ public Rect shrink() {
+ return shrink( 1 );
+ }
+
+ public HashSet getPoints() {
+ HashSet points = new HashSet<>(square()*2);
+ for (int i = left; i <= right; i++)
+ for (int j = top; j <= bottom; j++)
+ points.add(new Point(i, j));
+ return points;
+ }
+
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/Signal.java b/SPD-classes/src/main/java/com/watabou/utils/Signal.java
new file mode 100644
index 000000000..9181cebe5
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/Signal.java
@@ -0,0 +1,96 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+import java.util.LinkedList;
+
+public class Signal {
+
+ private LinkedList> listeners = new LinkedList>();
+
+ private boolean canceled;
+
+ private boolean stackMode;
+
+ public Signal() {
+ this( false );
+ }
+
+ public Signal( boolean stackMode ) {
+ this.stackMode = stackMode;
+ }
+
+ public void add( Listener listener ) {
+ if (!listeners.contains( listener )) {
+ if (stackMode) {
+ listeners.addFirst( listener );
+ } else {
+ listeners.addLast( listener );
+ }
+ }
+ }
+
+ public void remove( Listener listener ) {
+ listeners.remove( listener );
+ }
+
+ public void removeAll() {
+ listeners.clear();
+ }
+
+ public void replace( Listener listener ) {
+ removeAll();
+ add( listener );
+ }
+
+ public int numListeners() {
+ return listeners.size();
+ }
+
+ public void dispatch( T t ) {
+
+ @SuppressWarnings("unchecked")
+ Listener[] list = listeners.toArray( new Listener[0] );
+
+ canceled = false;
+ for (int i=0; i < list.length; i++) {
+
+ Listener listener = list[i];
+
+ if (listeners.contains( listener )) {
+ listener.onSignal( t );
+ if (canceled) {
+ return;
+ }
+ }
+
+ }
+ }
+
+ public void cancel() {
+ canceled = true;
+ }
+
+ public static interface Listener {
+ public void onSignal( T t );
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/SparseArray.java b/SPD-classes/src/main/java/com/watabou/utils/SparseArray.java
new file mode 100644
index 000000000..f9478df51
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/SparseArray.java
@@ -0,0 +1,46 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SparseArray extends android.util.SparseArray {
+
+ public int[] keyArray() {
+ int size = size();
+ int[] array = new int[size];
+ for (int i=0; i < size; i++) {
+ array[i] = keyAt( i );
+ }
+ return array;
+ }
+
+ public List values() {
+ int size = size();
+ ArrayList list = new ArrayList( size );
+ for (int i=0; i < size; i++) {
+ list.add( i, valueAt( i ) );
+ }
+ return list;
+ }
+}
diff --git a/SPD-classes/src/main/java/com/watabou/utils/SystemTime.java b/SPD-classes/src/main/java/com/watabou/utils/SystemTime.java
new file mode 100644
index 000000000..1f724c57d
--- /dev/null
+++ b/SPD-classes/src/main/java/com/watabou/utils/SystemTime.java
@@ -0,0 +1,32 @@
+/*
+ * Pixel Dungeon
+ * Copyright (C) 2012-2015 Oleg Dolya
+ *
+ * Shattered Pixel Dungeon
+ * Copyright (C) 2014-2016 Evan Debenham
+ *
+ * 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 3 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, see
+ */
+
+package com.watabou.utils;
+
+public class SystemTime {
+
+ public static long now;
+
+ public static void tick() {
+ now = System.currentTimeMillis();
+ }
+}
+
diff --git a/SPD-classes/src/main/res/values/strings.xml b/SPD-classes/src/main/res/values/strings.xml
new file mode 100644
index 000000000..34db9ec1c
--- /dev/null
+++ b/SPD-classes/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ SPD-Classes
+
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 000000000..33b908c6d
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,14 @@
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:2.1.2'
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
diff --git a/core/build.gradle b/core/build.gradle
new file mode 100644
index 000000000..a72b45b44
--- /dev/null
+++ b/core/build.gradle
@@ -0,0 +1,17 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 23
+ buildToolsVersion "24.0.0"
+
+ buildTypes {
+ release {
+ minifyEnabled true
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile project(':SPD-classes')
+}
diff --git a/core/proguard-rules.pro b/core/proguard-rules.pro
new file mode 100644
index 000000000..59f622625
--- /dev/null
+++ b/core/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in C:\Program Files (x86)\Android\android-sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+-dontwarn **
+-keep class com.shatteredpixel.** { *; }
+-keep class com.watabou.** { *; }
\ No newline at end of file
diff --git a/AndroidManifest.xml b/core/src/main/AndroidManifest.xml
similarity index 100%
rename from AndroidManifest.xml
rename to core/src/main/AndroidManifest.xml
diff --git a/assets/amulet.png b/core/src/main/assets/amulet.png
similarity index 100%
rename from assets/amulet.png
rename to core/src/main/assets/amulet.png
diff --git a/assets/arcs1.png b/core/src/main/assets/arcs1.png
similarity index 100%
rename from assets/arcs1.png
rename to core/src/main/assets/arcs1.png
diff --git a/assets/arcs2.png b/core/src/main/assets/arcs2.png
similarity index 100%
rename from assets/arcs2.png
rename to core/src/main/assets/arcs2.png
diff --git a/assets/avatars.png b/core/src/main/assets/avatars.png
similarity index 100%
rename from assets/avatars.png
rename to core/src/main/assets/avatars.png
diff --git a/assets/badges.png b/core/src/main/assets/badges.png
similarity index 100%
rename from assets/badges.png
rename to core/src/main/assets/badges.png
diff --git a/assets/banners.png b/core/src/main/assets/banners.png
similarity index 100%
rename from assets/banners.png
rename to core/src/main/assets/banners.png
diff --git a/assets/bat.png b/core/src/main/assets/bat.png
similarity index 100%
rename from assets/bat.png
rename to core/src/main/assets/bat.png
diff --git a/assets/bee.png b/core/src/main/assets/bee.png
similarity index 100%
rename from assets/bee.png
rename to core/src/main/assets/bee.png
diff --git a/assets/blacksmith.png b/core/src/main/assets/blacksmith.png
similarity index 100%
rename from assets/blacksmith.png
rename to core/src/main/assets/blacksmith.png
diff --git a/assets/boss_hp.png b/core/src/main/assets/boss_hp.png
similarity index 100%
rename from assets/boss_hp.png
rename to core/src/main/assets/boss_hp.png
diff --git a/assets/brute.png b/core/src/main/assets/brute.png
similarity index 100%
rename from assets/brute.png
rename to core/src/main/assets/brute.png
diff --git a/assets/buffs.png b/core/src/main/assets/buffs.png
similarity index 100%
rename from assets/buffs.png
rename to core/src/main/assets/buffs.png
diff --git a/assets/burning_fist.png b/core/src/main/assets/burning_fist.png
similarity index 100%
rename from assets/burning_fist.png
rename to core/src/main/assets/burning_fist.png
diff --git a/assets/chrome.png b/core/src/main/assets/chrome.png
similarity index 100%
rename from assets/chrome.png
rename to core/src/main/assets/chrome.png
diff --git a/assets/consumable_icons.png b/core/src/main/assets/consumable_icons.png
similarity index 100%
rename from assets/consumable_icons.png
rename to core/src/main/assets/consumable_icons.png
diff --git a/assets/crab.png b/core/src/main/assets/crab.png
similarity index 100%
rename from assets/crab.png
rename to core/src/main/assets/crab.png
diff --git a/assets/custom_tiles/prison_exit.png b/core/src/main/assets/custom_tiles/prison_exit.png
similarity index 100%
rename from assets/custom_tiles/prison_exit.png
rename to core/src/main/assets/custom_tiles/prison_exit.png
diff --git a/assets/custom_tiles/prison_quests.png b/core/src/main/assets/custom_tiles/prison_quests.png
similarity index 100%
rename from assets/custom_tiles/prison_quests.png
rename to core/src/main/assets/custom_tiles/prison_quests.png
diff --git a/assets/custom_tiles/weak_floor.png b/core/src/main/assets/custom_tiles/weak_floor.png
similarity index 100%
rename from assets/custom_tiles/weak_floor.png
rename to core/src/main/assets/custom_tiles/weak_floor.png
diff --git a/assets/dashboard.png b/core/src/main/assets/dashboard.png
similarity index 100%
rename from assets/dashboard.png
rename to core/src/main/assets/dashboard.png
diff --git a/assets/demon.png b/core/src/main/assets/demon.png
similarity index 100%
rename from assets/demon.png
rename to core/src/main/assets/demon.png
diff --git a/assets/dm300.png b/core/src/main/assets/dm300.png
similarity index 100%
rename from assets/dm300.png
rename to core/src/main/assets/dm300.png
diff --git a/assets/effects.png b/core/src/main/assets/effects.png
similarity index 100%
rename from assets/effects.png
rename to core/src/main/assets/effects.png
diff --git a/assets/elemental.png b/core/src/main/assets/elemental.png
similarity index 100%
rename from assets/elemental.png
rename to core/src/main/assets/elemental.png
diff --git a/assets/exp_bar.png b/core/src/main/assets/exp_bar.png
similarity index 100%
rename from assets/exp_bar.png
rename to core/src/main/assets/exp_bar.png
diff --git a/assets/eye.png b/core/src/main/assets/eye.png
similarity index 100%
rename from assets/eye.png
rename to core/src/main/assets/eye.png
diff --git a/assets/fireball.png b/core/src/main/assets/fireball.png
similarity index 100%
rename from assets/fireball.png
rename to core/src/main/assets/fireball.png
diff --git a/assets/font.ttf b/core/src/main/assets/font.ttf
similarity index 100%
rename from assets/font.ttf
rename to core/src/main/assets/font.ttf
diff --git a/assets/font1x.png b/core/src/main/assets/font1x.png
similarity index 100%
rename from assets/font1x.png
rename to core/src/main/assets/font1x.png
diff --git a/assets/font2x.png b/core/src/main/assets/font2x.png
similarity index 100%
rename from assets/font2x.png
rename to core/src/main/assets/font2x.png
diff --git a/assets/game.mp3 b/core/src/main/assets/game.mp3
similarity index 100%
rename from assets/game.mp3
rename to core/src/main/assets/game.mp3
diff --git a/assets/ghost.png b/core/src/main/assets/ghost.png
similarity index 100%
rename from assets/ghost.png
rename to core/src/main/assets/ghost.png
diff --git a/assets/gnoll.png b/core/src/main/assets/gnoll.png
similarity index 100%
rename from assets/gnoll.png
rename to core/src/main/assets/gnoll.png
diff --git a/assets/golem.png b/core/src/main/assets/golem.png
similarity index 100%
rename from assets/golem.png
rename to core/src/main/assets/golem.png
diff --git a/assets/goo.png b/core/src/main/assets/goo.png
similarity index 100%
rename from assets/goo.png
rename to core/src/main/assets/goo.png
diff --git a/assets/guard.png b/core/src/main/assets/guard.png
similarity index 100%
rename from assets/guard.png
rename to core/src/main/assets/guard.png
diff --git a/assets/hp_bar.png b/core/src/main/assets/hp_bar.png
similarity index 100%
rename from assets/hp_bar.png
rename to core/src/main/assets/hp_bar.png
diff --git a/assets/icons.png b/core/src/main/assets/icons.png
similarity index 100%
rename from assets/icons.png
rename to core/src/main/assets/icons.png
diff --git a/assets/items.png b/core/src/main/assets/items.png
similarity index 100%
rename from assets/items.png
rename to core/src/main/assets/items.png
diff --git a/assets/king.png b/core/src/main/assets/king.png
similarity index 100%
rename from assets/king.png
rename to core/src/main/assets/king.png
diff --git a/assets/large_buffs.png b/core/src/main/assets/large_buffs.png
similarity index 100%
rename from assets/large_buffs.png
rename to core/src/main/assets/large_buffs.png
diff --git a/assets/larva.png b/core/src/main/assets/larva.png
similarity index 100%
rename from assets/larva.png
rename to core/src/main/assets/larva.png
diff --git a/assets/locked_badge.png b/core/src/main/assets/locked_badge.png
similarity index 100%
rename from assets/locked_badge.png
rename to core/src/main/assets/locked_badge.png
diff --git a/assets/mage.png b/core/src/main/assets/mage.png
similarity index 100%
rename from assets/mage.png
rename to core/src/main/assets/mage.png
diff --git a/assets/menu_button.png b/core/src/main/assets/menu_button.png
similarity index 100%
rename from assets/menu_button.png
rename to core/src/main/assets/menu_button.png
diff --git a/assets/mimic.png b/core/src/main/assets/mimic.png
similarity index 100%
rename from assets/mimic.png
rename to core/src/main/assets/mimic.png
diff --git a/assets/monk.png b/core/src/main/assets/monk.png
similarity index 100%
rename from assets/monk.png
rename to core/src/main/assets/monk.png
diff --git a/assets/pet.png b/core/src/main/assets/pet.png
similarity index 100%
rename from assets/pet.png
rename to core/src/main/assets/pet.png
diff --git a/assets/piranha.png b/core/src/main/assets/piranha.png
similarity index 100%
rename from assets/piranha.png
rename to core/src/main/assets/piranha.png
diff --git a/assets/pixel_font.png b/core/src/main/assets/pixel_font.png
similarity index 100%
rename from assets/pixel_font.png
rename to core/src/main/assets/pixel_font.png
diff --git a/assets/pixelfont.ttf b/core/src/main/assets/pixelfont.ttf
similarity index 100%
rename from assets/pixelfont.ttf
rename to core/src/main/assets/pixelfont.ttf
diff --git a/assets/plants.png b/core/src/main/assets/plants.png
similarity index 100%
rename from assets/plants.png
rename to core/src/main/assets/plants.png
diff --git a/assets/ranger.png b/core/src/main/assets/ranger.png
similarity index 100%
rename from assets/ranger.png
rename to core/src/main/assets/ranger.png
diff --git a/assets/rat.png b/core/src/main/assets/rat.png
similarity index 100%
rename from assets/rat.png
rename to core/src/main/assets/rat.png
diff --git a/assets/ratking.png b/core/src/main/assets/ratking.png
similarity index 100%
rename from assets/ratking.png
rename to core/src/main/assets/ratking.png
diff --git a/assets/rogue.png b/core/src/main/assets/rogue.png
similarity index 100%
rename from assets/rogue.png
rename to core/src/main/assets/rogue.png
diff --git a/assets/rot_heart.png b/core/src/main/assets/rot_heart.png
similarity index 100%
rename from assets/rot_heart.png
rename to core/src/main/assets/rot_heart.png
diff --git a/assets/rot_lasher.png b/core/src/main/assets/rot_lasher.png
similarity index 100%
rename from assets/rot_lasher.png
rename to core/src/main/assets/rot_lasher.png
diff --git a/assets/rotting_fist.png b/core/src/main/assets/rotting_fist.png
similarity index 100%
rename from assets/rotting_fist.png
rename to core/src/main/assets/rotting_fist.png
diff --git a/assets/scorpio.png b/core/src/main/assets/scorpio.png
similarity index 100%
rename from assets/scorpio.png
rename to core/src/main/assets/scorpio.png
diff --git a/assets/shadow.png b/core/src/main/assets/shadow.png
similarity index 100%
rename from assets/shadow.png
rename to core/src/main/assets/shadow.png
diff --git a/assets/shaman.png b/core/src/main/assets/shaman.png
similarity index 100%
rename from assets/shaman.png
rename to core/src/main/assets/shaman.png
diff --git a/assets/sheep.png b/core/src/main/assets/sheep.png
similarity index 100%
rename from assets/sheep.png
rename to core/src/main/assets/sheep.png
diff --git a/assets/shield_bar.png b/core/src/main/assets/shield_bar.png
similarity index 100%
rename from assets/shield_bar.png
rename to core/src/main/assets/shield_bar.png
diff --git a/assets/shopkeeper.png b/core/src/main/assets/shopkeeper.png
similarity index 100%
rename from assets/shopkeeper.png
rename to core/src/main/assets/shopkeeper.png
diff --git a/assets/skeleton.png b/core/src/main/assets/skeleton.png
similarity index 100%
rename from assets/skeleton.png
rename to core/src/main/assets/skeleton.png
diff --git a/assets/snd_alert.mp3 b/core/src/main/assets/snd_alert.mp3
similarity index 100%
rename from assets/snd_alert.mp3
rename to core/src/main/assets/snd_alert.mp3
diff --git a/assets/snd_badge.mp3 b/core/src/main/assets/snd_badge.mp3
similarity index 100%
rename from assets/snd_badge.mp3
rename to core/src/main/assets/snd_badge.mp3
diff --git a/assets/snd_beacon.mp3 b/core/src/main/assets/snd_beacon.mp3
similarity index 100%
rename from assets/snd_beacon.mp3
rename to core/src/main/assets/snd_beacon.mp3
diff --git a/assets/snd_bee.mp3 b/core/src/main/assets/snd_bee.mp3
similarity index 100%
rename from assets/snd_bee.mp3
rename to core/src/main/assets/snd_bee.mp3
diff --git a/assets/snd_blast.mp3 b/core/src/main/assets/snd_blast.mp3
similarity index 100%
rename from assets/snd_blast.mp3
rename to core/src/main/assets/snd_blast.mp3
diff --git a/assets/snd_bones.mp3 b/core/src/main/assets/snd_bones.mp3
similarity index 100%
rename from assets/snd_bones.mp3
rename to core/src/main/assets/snd_bones.mp3
diff --git a/assets/snd_boss.mp3 b/core/src/main/assets/snd_boss.mp3
similarity index 100%
rename from assets/snd_boss.mp3
rename to core/src/main/assets/snd_boss.mp3
diff --git a/assets/snd_burning.mp3 b/core/src/main/assets/snd_burning.mp3
similarity index 100%
rename from assets/snd_burning.mp3
rename to core/src/main/assets/snd_burning.mp3
diff --git a/assets/snd_challenge.mp3 b/core/src/main/assets/snd_challenge.mp3
similarity index 100%
rename from assets/snd_challenge.mp3
rename to core/src/main/assets/snd_challenge.mp3
diff --git a/assets/snd_charms.mp3 b/core/src/main/assets/snd_charms.mp3
similarity index 100%
rename from assets/snd_charms.mp3
rename to core/src/main/assets/snd_charms.mp3
diff --git a/assets/snd_click.mp3 b/core/src/main/assets/snd_click.mp3
similarity index 100%
rename from assets/snd_click.mp3
rename to core/src/main/assets/snd_click.mp3
diff --git a/assets/snd_cursed.mp3 b/core/src/main/assets/snd_cursed.mp3
similarity index 100%
rename from assets/snd_cursed.mp3
rename to core/src/main/assets/snd_cursed.mp3
diff --git a/assets/snd_death.mp3 b/core/src/main/assets/snd_death.mp3
similarity index 100%
rename from assets/snd_death.mp3
rename to core/src/main/assets/snd_death.mp3
diff --git a/assets/snd_degrade.mp3 b/core/src/main/assets/snd_degrade.mp3
similarity index 100%
rename from assets/snd_degrade.mp3
rename to core/src/main/assets/snd_degrade.mp3
diff --git a/assets/snd_descend.mp3 b/core/src/main/assets/snd_descend.mp3
similarity index 100%
rename from assets/snd_descend.mp3
rename to core/src/main/assets/snd_descend.mp3
diff --git a/assets/snd_dewdrop.mp3 b/core/src/main/assets/snd_dewdrop.mp3
similarity index 100%
rename from assets/snd_dewdrop.mp3
rename to core/src/main/assets/snd_dewdrop.mp3
diff --git a/assets/snd_door_open.mp3 b/core/src/main/assets/snd_door_open.mp3
similarity index 100%
rename from assets/snd_door_open.mp3
rename to core/src/main/assets/snd_door_open.mp3
diff --git a/assets/snd_drink.mp3 b/core/src/main/assets/snd_drink.mp3
similarity index 100%
rename from assets/snd_drink.mp3
rename to core/src/main/assets/snd_drink.mp3
diff --git a/assets/snd_eat.mp3 b/core/src/main/assets/snd_eat.mp3
similarity index 100%
rename from assets/snd_eat.mp3
rename to core/src/main/assets/snd_eat.mp3
diff --git a/assets/snd_evoke.mp3 b/core/src/main/assets/snd_evoke.mp3
similarity index 100%
rename from assets/snd_evoke.mp3
rename to core/src/main/assets/snd_evoke.mp3
diff --git a/assets/snd_falling.mp3 b/core/src/main/assets/snd_falling.mp3
similarity index 100%
rename from assets/snd_falling.mp3
rename to core/src/main/assets/snd_falling.mp3
diff --git a/assets/snd_ghost.mp3 b/core/src/main/assets/snd_ghost.mp3
similarity index 100%
rename from assets/snd_ghost.mp3
rename to core/src/main/assets/snd_ghost.mp3
diff --git a/assets/snd_gold.mp3 b/core/src/main/assets/snd_gold.mp3
similarity index 100%
rename from assets/snd_gold.mp3
rename to core/src/main/assets/snd_gold.mp3
diff --git a/assets/snd_hit.mp3 b/core/src/main/assets/snd_hit.mp3
similarity index 100%
rename from assets/snd_hit.mp3
rename to core/src/main/assets/snd_hit.mp3
diff --git a/assets/snd_item.mp3 b/core/src/main/assets/snd_item.mp3
similarity index 100%
rename from assets/snd_item.mp3
rename to core/src/main/assets/snd_item.mp3
diff --git a/assets/snd_levelup.mp3 b/core/src/main/assets/snd_levelup.mp3
similarity index 100%
rename from assets/snd_levelup.mp3
rename to core/src/main/assets/snd_levelup.mp3
diff --git a/assets/snd_lightning.mp3 b/core/src/main/assets/snd_lightning.mp3
similarity index 100%
rename from assets/snd_lightning.mp3
rename to core/src/main/assets/snd_lightning.mp3
diff --git a/assets/snd_lullaby.mp3 b/core/src/main/assets/snd_lullaby.mp3
similarity index 100%
rename from assets/snd_lullaby.mp3
rename to core/src/main/assets/snd_lullaby.mp3
diff --git a/assets/snd_mastery.mp3 b/core/src/main/assets/snd_mastery.mp3
similarity index 100%
rename from assets/snd_mastery.mp3
rename to core/src/main/assets/snd_mastery.mp3
diff --git a/assets/snd_meld.mp3 b/core/src/main/assets/snd_meld.mp3
similarity index 100%
rename from assets/snd_meld.mp3
rename to core/src/main/assets/snd_meld.mp3
diff --git a/assets/snd_mimic.mp3 b/core/src/main/assets/snd_mimic.mp3
similarity index 100%
rename from assets/snd_mimic.mp3
rename to core/src/main/assets/snd_mimic.mp3
diff --git a/assets/snd_miss.mp3 b/core/src/main/assets/snd_miss.mp3
similarity index 100%
rename from assets/snd_miss.mp3
rename to core/src/main/assets/snd_miss.mp3
diff --git a/assets/snd_plant.mp3 b/core/src/main/assets/snd_plant.mp3
similarity index 100%
rename from assets/snd_plant.mp3
rename to core/src/main/assets/snd_plant.mp3
diff --git a/assets/snd_puff.mp3 b/core/src/main/assets/snd_puff.mp3
similarity index 100%
rename from assets/snd_puff.mp3
rename to core/src/main/assets/snd_puff.mp3
diff --git a/assets/snd_ray.mp3 b/core/src/main/assets/snd_ray.mp3
similarity index 100%
rename from assets/snd_ray.mp3
rename to core/src/main/assets/snd_ray.mp3
diff --git a/assets/snd_read.mp3 b/core/src/main/assets/snd_read.mp3
similarity index 100%
rename from assets/snd_read.mp3
rename to core/src/main/assets/snd_read.mp3
diff --git a/assets/snd_rocks.mp3 b/core/src/main/assets/snd_rocks.mp3
similarity index 100%
rename from assets/snd_rocks.mp3
rename to core/src/main/assets/snd_rocks.mp3
diff --git a/assets/snd_secret.mp3 b/core/src/main/assets/snd_secret.mp3
similarity index 100%
rename from assets/snd_secret.mp3
rename to core/src/main/assets/snd_secret.mp3
diff --git a/assets/snd_shatter.mp3 b/core/src/main/assets/snd_shatter.mp3
similarity index 100%
rename from assets/snd_shatter.mp3
rename to core/src/main/assets/snd_shatter.mp3
diff --git a/assets/snd_step.mp3 b/core/src/main/assets/snd_step.mp3
similarity index 100%
rename from assets/snd_step.mp3
rename to core/src/main/assets/snd_step.mp3
diff --git a/assets/snd_teleport.mp3 b/core/src/main/assets/snd_teleport.mp3
similarity index 100%
rename from assets/snd_teleport.mp3
rename to core/src/main/assets/snd_teleport.mp3
diff --git a/assets/snd_tomb.mp3 b/core/src/main/assets/snd_tomb.mp3
similarity index 100%
rename from assets/snd_tomb.mp3
rename to core/src/main/assets/snd_tomb.mp3
diff --git a/assets/snd_trap.mp3 b/core/src/main/assets/snd_trap.mp3
similarity index 100%
rename from assets/snd_trap.mp3
rename to core/src/main/assets/snd_trap.mp3
diff --git a/assets/snd_unlock.mp3 b/core/src/main/assets/snd_unlock.mp3
similarity index 100%
rename from assets/snd_unlock.mp3
rename to core/src/main/assets/snd_unlock.mp3
diff --git a/assets/snd_water.mp3 b/core/src/main/assets/snd_water.mp3
similarity index 100%
rename from assets/snd_water.mp3
rename to core/src/main/assets/snd_water.mp3
diff --git a/assets/snd_zap.mp3 b/core/src/main/assets/snd_zap.mp3
similarity index 100%
rename from assets/snd_zap.mp3
rename to core/src/main/assets/snd_zap.mp3
diff --git a/assets/specks.png b/core/src/main/assets/specks.png
similarity index 100%
rename from assets/specks.png
rename to core/src/main/assets/specks.png
diff --git a/assets/spell_icons.png b/core/src/main/assets/spell_icons.png
similarity index 100%
rename from assets/spell_icons.png
rename to core/src/main/assets/spell_icons.png
diff --git a/assets/spinner.png b/core/src/main/assets/spinner.png
similarity index 100%
rename from assets/spinner.png
rename to core/src/main/assets/spinner.png
diff --git a/assets/statue.png b/core/src/main/assets/statue.png
similarity index 100%
rename from assets/statue.png
rename to core/src/main/assets/statue.png
diff --git a/assets/status_pane.png b/core/src/main/assets/status_pane.png
similarity index 100%
rename from assets/status_pane.png
rename to core/src/main/assets/status_pane.png
diff --git a/assets/succubus.png b/core/src/main/assets/succubus.png
similarity index 100%
rename from assets/succubus.png
rename to core/src/main/assets/succubus.png
diff --git a/assets/surface.mp3 b/core/src/main/assets/surface.mp3
similarity index 100%
rename from assets/surface.mp3
rename to core/src/main/assets/surface.mp3
diff --git a/assets/surface.png b/core/src/main/assets/surface.png
similarity index 100%
rename from assets/surface.png
rename to core/src/main/assets/surface.png
diff --git a/assets/swarm.png b/core/src/main/assets/swarm.png
similarity index 100%
rename from assets/swarm.png
rename to core/src/main/assets/swarm.png
diff --git a/assets/tengu.png b/core/src/main/assets/tengu.png
similarity index 100%
rename from assets/tengu.png
rename to core/src/main/assets/tengu.png
diff --git a/assets/theme.mp3 b/core/src/main/assets/theme.mp3
similarity index 100%
rename from assets/theme.mp3
rename to core/src/main/assets/theme.mp3
diff --git a/assets/thief.png b/core/src/main/assets/thief.png
similarity index 100%
rename from assets/thief.png
rename to core/src/main/assets/thief.png
diff --git a/assets/tiles0.png b/core/src/main/assets/tiles0.png
similarity index 100%
rename from assets/tiles0.png
rename to core/src/main/assets/tiles0.png
diff --git a/assets/tiles1.png b/core/src/main/assets/tiles1.png
similarity index 100%
rename from assets/tiles1.png
rename to core/src/main/assets/tiles1.png
diff --git a/assets/tiles2.png b/core/src/main/assets/tiles2.png
similarity index 100%
rename from assets/tiles2.png
rename to core/src/main/assets/tiles2.png
diff --git a/assets/tiles3.png b/core/src/main/assets/tiles3.png
similarity index 100%
rename from assets/tiles3.png
rename to core/src/main/assets/tiles3.png
diff --git a/assets/tiles4.png b/core/src/main/assets/tiles4.png
similarity index 100%
rename from assets/tiles4.png
rename to core/src/main/assets/tiles4.png
diff --git a/assets/toolbar.png b/core/src/main/assets/toolbar.png
similarity index 100%
rename from assets/toolbar.png
rename to core/src/main/assets/toolbar.png
diff --git a/assets/traps.png b/core/src/main/assets/traps.png
similarity index 100%
rename from assets/traps.png
rename to core/src/main/assets/traps.png
diff --git a/assets/undead.png b/core/src/main/assets/undead.png
similarity index 100%
rename from assets/undead.png
rename to core/src/main/assets/undead.png
diff --git a/assets/wandmaker.png b/core/src/main/assets/wandmaker.png
similarity index 100%
rename from assets/wandmaker.png
rename to core/src/main/assets/wandmaker.png
diff --git a/assets/warlock.png b/core/src/main/assets/warlock.png
similarity index 100%
rename from assets/warlock.png
rename to core/src/main/assets/warlock.png
diff --git a/assets/warrior.png b/core/src/main/assets/warrior.png
similarity index 100%
rename from assets/warrior.png
rename to core/src/main/assets/warrior.png
diff --git a/assets/water0.png b/core/src/main/assets/water0.png
similarity index 100%
rename from assets/water0.png
rename to core/src/main/assets/water0.png
diff --git a/assets/water1.png b/core/src/main/assets/water1.png
similarity index 100%
rename from assets/water1.png
rename to core/src/main/assets/water1.png
diff --git a/assets/water2.png b/core/src/main/assets/water2.png
similarity index 100%
rename from assets/water2.png
rename to core/src/main/assets/water2.png
diff --git a/assets/water3.png b/core/src/main/assets/water3.png
similarity index 100%
rename from assets/water3.png
rename to core/src/main/assets/water3.png
diff --git a/assets/water4.png b/core/src/main/assets/water4.png
similarity index 100%
rename from assets/water4.png
rename to core/src/main/assets/water4.png
diff --git a/assets/wraith.png b/core/src/main/assets/wraith.png
similarity index 100%
rename from assets/wraith.png
rename to core/src/main/assets/wraith.png
diff --git a/assets/yog.png b/core/src/main/assets/yog.png
similarity index 100%
rename from assets/yog.png
rename to core/src/main/assets/yog.png
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/Assets.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Badges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/Badges.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Bones.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/Bones.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Bones.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Challenges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Challenges.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/Challenges.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Challenges.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Chrome.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Chrome.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/Chrome.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Chrome.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/DungeonTilemap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/DungeonTilemap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/DungeonTilemap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/DungeonTilemap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/FogOfWar.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/FogOfWar.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/FogOfWar.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/FogOfWar.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Journal.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Journal.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/Journal.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Journal.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Preferences.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Preferences.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/Preferences.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Preferences.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/QuickSlot.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/QuickSlot.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/QuickSlot.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/QuickSlot.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Rankings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Rankings.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/Rankings.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Rankings.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Statistics.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/Statistics.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Blob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Blob.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Blob.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Blob.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Fire.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Fire.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Fire.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Fire.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/GooWarn.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/GooWarn.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/GooWarn.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/GooWarn.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ParalyticGas.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ParalyticGas.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ParalyticGas.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ParalyticGas.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Regrowth.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Regrowth.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Regrowth.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Regrowth.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StenchGas.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StenchGas.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StenchGas.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StenchGas.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ToxicGas.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ToxicGas.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ToxicGas.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ToxicGas.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/VenomGas.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/VenomGas.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/VenomGas.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/VenomGas.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfAwareness.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfAwareness.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfAwareness.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfAwareness.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfHealth.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfHealth.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfHealth.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfHealth.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Web.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Web.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Web.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Web.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Amok.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Amok.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Amok.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Amok.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Awareness.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Awareness.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Awareness.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Awareness.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Barkskin.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Barkskin.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Barkskin.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Barkskin.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bleeding.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bleeding.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bleeding.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bleeding.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bless.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bless.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bless.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bless.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Blindness.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Blindness.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Blindness.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Blindness.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Chill.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Chill.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Chill.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Chill.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Corruption.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Corruption.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Corruption.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Corruption.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Cripple.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Cripple.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Cripple.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Cripple.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/EarthImbue.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/EarthImbue.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/EarthImbue.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/EarthImbue.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FireImbue.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FireImbue.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FireImbue.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FireImbue.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FlavourBuff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FlavourBuff.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FlavourBuff.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FlavourBuff.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Fury.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Fury.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Fury.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Fury.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/GasesImmunity.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/GasesImmunity.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/GasesImmunity.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/GasesImmunity.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Invisibility.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Invisibility.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Invisibility.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Invisibility.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Levitation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Levitation.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Levitation.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Levitation.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Light.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Light.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Light.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Light.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/LockedFloor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/LockedFloor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/LockedFloor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/LockedFloor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MindVision.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MindVision.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MindVision.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MindVision.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Paralysis.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Paralysis.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Paralysis.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Paralysis.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/PinCushion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/PinCushion.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/PinCushion.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/PinCushion.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Poison.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Poison.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Poison.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Poison.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Recharging.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Recharging.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Recharging.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Recharging.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Roots.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Roots.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Roots.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Roots.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Sleep.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Sleep.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Sleep.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Sleep.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Slow.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Slow.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Slow.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Slow.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SoulMark.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SoulMark.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SoulMark.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SoulMark.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Speed.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Speed.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Speed.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Speed.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ToxicImbue.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ToxicImbue.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ToxicImbue.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ToxicImbue.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Venom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Venom.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Venom.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Venom.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Vertigo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Vertigo.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Vertigo.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Vertigo.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Weakness.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Weakness.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Weakness.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Weakness.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroAction.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroAction.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroAction.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroAction.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroSubClass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroSubClass.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroSubClass.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroSubClass.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Acidic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Acidic.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Acidic.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Acidic.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Albino.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Albino.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Albino.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Albino.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bandit.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bandit.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bandit.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bandit.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bat.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bat.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bat.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bat.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bestiary.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bestiary.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bestiary.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bestiary.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Brute.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Brute.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Brute.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Brute.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Crab.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Crab.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Crab.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Crab.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM300.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM300.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM300.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM300.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FetidRat.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FetidRat.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FetidRat.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FetidRat.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Gnoll.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Gnoll.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Gnoll.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Gnoll.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GreatCrab.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GreatCrab.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GreatCrab.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GreatCrab.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/King.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/King.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/King.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/King.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Monk.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Monk.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Monk.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Monk.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewbornElemental.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewbornElemental.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewbornElemental.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewbornElemental.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Rat.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Rat.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Rat.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Rat.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RotHeart.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RotHeart.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RotHeart.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RotHeart.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RotLasher.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RotLasher.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RotLasher.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RotLasher.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Senior.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Senior.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Senior.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Senior.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shielded.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shielded.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shielded.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shielded.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Skeleton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Skeleton.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Skeleton.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Skeleton.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Statue.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Statue.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Statue.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Statue.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Thief.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Thief.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Thief.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Thief.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Yog.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Yog.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Yog.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Yog.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/ImpShopkeeper.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/ImpShopkeeper.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/ImpShopkeeper.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/ImpShopkeeper.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/MirrorImage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/MirrorImage.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/MirrorImage.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/MirrorImage.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NPC.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NPC.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NPC.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NPC.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/RatKing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/RatKing.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/RatKing.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/RatKing.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Sheep.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Sheep.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Sheep.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Sheep.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Shopkeeper.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Shopkeeper.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Shopkeeper.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Shopkeeper.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/BadgeBanner.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/BadgeBanner.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/BadgeBanner.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/BadgeBanner.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/BannerSprites.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/BannerSprites.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/BannerSprites.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/BannerSprites.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Beam.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Beam.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Beam.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Beam.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/BlobEmitter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/BlobEmitter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/BlobEmitter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/BlobEmitter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/CellEmitter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/CellEmitter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/CellEmitter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/CellEmitter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Chains.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Chains.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Chains.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Chains.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/CheckedCell.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/CheckedCell.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/CheckedCell.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/CheckedCell.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/DarkBlock.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/DarkBlock.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/DarkBlock.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/DarkBlock.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Degradation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Degradation.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Degradation.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Degradation.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Effects.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Effects.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Effects.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Effects.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Enchanting.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Enchanting.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Enchanting.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Enchanting.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Fireball.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Fireball.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Fireball.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Fireball.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Flare.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Flare.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Flare.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Flare.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Halo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Halo.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Halo.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Halo.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/IceBlock.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/IceBlock.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/IceBlock.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/IceBlock.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Identification.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Identification.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Identification.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Identification.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Lightning.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Lightning.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Lightning.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Lightning.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/MagicMissile.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/MagicMissile.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/MagicMissile.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/MagicMissile.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Pushing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Pushing.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Pushing.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Pushing.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Ripple.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Ripple.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Ripple.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Ripple.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/ShadowBox.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/ShadowBox.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/ShadowBox.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/ShadowBox.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Speck.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Speck.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Speck.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Speck.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/SpellSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/SpellSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/SpellSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/SpellSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Splash.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Splash.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Splash.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Splash.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Surprise.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Surprise.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Surprise.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Surprise.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Swap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Swap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Swap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Swap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/TorchHalo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/TorchHalo.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/TorchHalo.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/TorchHalo.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/Wound.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Wound.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/Wound.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Wound.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/BlastParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/BlastParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/BlastParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/BlastParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/BloodParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/BloodParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/BloodParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/BloodParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/EarthParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/EarthParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/EarthParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/EarthParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ElmoParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ElmoParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ElmoParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ElmoParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/EnergyParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/EnergyParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/EnergyParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/EnergyParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/FlameParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/FlameParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/FlameParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/FlameParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/FlowParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/FlowParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/FlowParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/FlowParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/LeafParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/LeafParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/LeafParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/LeafParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/PoisonParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/PoisonParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/PoisonParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/PoisonParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/PurpleParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/PurpleParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/PurpleParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/PurpleParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/RainbowParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/RainbowParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/RainbowParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/RainbowParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SacrificialParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SacrificialParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SacrificialParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SacrificialParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ShadowParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ShadowParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ShadowParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ShadowParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ShaftParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ShaftParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ShaftParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/ShaftParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SmokeParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SmokeParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SmokeParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SmokeParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SnowParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SnowParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SnowParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SnowParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SparkParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SparkParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SparkParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SparkParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WebParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WebParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WebParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WebParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WindParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WindParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WindParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WindParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WoolParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WoolParticle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WoolParticle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/WoolParticle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Amulet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Amulet.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Amulet.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Amulet.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Ankh.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Ankh.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Ankh.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Ankh.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/ArmorKit.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/ArmorKit.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/ArmorKit.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/ArmorKit.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Bomb.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Bomb.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Bomb.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Bomb.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/BrokenSeal.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/BrokenSeal.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/BrokenSeal.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/BrokenSeal.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/DewVial.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/DewVial.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/DewVial.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/DewVial.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Dewdrop.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Dewdrop.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Dewdrop.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Dewdrop.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/EquipableItem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/EquipableItem.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/EquipableItem.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/EquipableItem.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Gold.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Gold.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Gold.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Gold.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Heap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Heap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Heap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Heap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Item.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Item.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/ItemStatusHandler.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/ItemStatusHandler.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/ItemStatusHandler.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/ItemStatusHandler.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/KindOfWeapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/KindOfWeapon.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/KindOfWeapon.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/KindOfWeapon.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/KindofMisc.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/KindofMisc.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/KindofMisc.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/KindofMisc.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/MerchantsBeacon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MerchantsBeacon.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/MerchantsBeacon.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MerchantsBeacon.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Stylus.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Stylus.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Stylus.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Stylus.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/TomeOfMastery.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/TomeOfMastery.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/TomeOfMastery.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/TomeOfMastery.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Torch.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Torch.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Torch.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Torch.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Weightstone.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Weightstone.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/Weightstone.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Weightstone.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClothArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClothArmor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClothArmor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClothArmor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/HuntressArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/HuntressArmor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/HuntressArmor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/HuntressArmor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/LeatherArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/LeatherArmor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/LeatherArmor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/LeatherArmor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/MageArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/MageArmor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/MageArmor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/MageArmor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/MailArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/MailArmor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/MailArmor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/MailArmor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/PlateArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/PlateArmor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/PlateArmor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/PlateArmor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/RogueArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/RogueArmor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/RogueArmor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/RogueArmor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ScaleArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/ScaleArmor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ScaleArmor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/ScaleArmor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/WarriorArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/WarriorArmor.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/WarriorArmor.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/WarriorArmor.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/AntiEntropy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/AntiEntropy.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/AntiEntropy.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/AntiEntropy.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Corrosion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Corrosion.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Corrosion.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Corrosion.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Displacement.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Displacement.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Displacement.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Displacement.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Metabolism.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Metabolism.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Metabolism.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Metabolism.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Multiplicity.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Multiplicity.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Multiplicity.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Multiplicity.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Stench.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Stench.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Stench.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Stench.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Camouflage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Camouflage.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Camouflage.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Camouflage.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Entanglement.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Entanglement.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Entanglement.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Entanglement.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Flow.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Flow.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Flow.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Flow.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Multiplicity.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Multiplicity.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Multiplicity.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Multiplicity.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Obfuscation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Obfuscation.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Obfuscation.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Obfuscation.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Potential.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Potential.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Potential.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Potential.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Repulsion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Repulsion.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Repulsion.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Repulsion.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Swiftness.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Swiftness.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Swiftness.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Swiftness.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/AlchemistsToolkit.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/AlchemistsToolkit.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/AlchemistsToolkit.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/AlchemistsToolkit.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CapeOfThorns.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CapeOfThorns.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CapeOfThorns.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CapeOfThorns.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HornOfPlenty.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HornOfPlenty.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HornOfPlenty.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HornOfPlenty.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/LloydsBeacon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/LloydsBeacon.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/LloydsBeacon.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/LloydsBeacon.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/bags/Bag.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/Bag.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/bags/Bag.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/Bag.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/bags/PotionBandolier.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/PotionBandolier.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/bags/PotionBandolier.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/PotionBandolier.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/bags/ScrollHolder.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/ScrollHolder.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/bags/ScrollHolder.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/ScrollHolder.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/bags/SeedPouch.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/SeedPouch.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/bags/SeedPouch.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/SeedPouch.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/bags/WandHolster.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/WandHolster.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/bags/WandHolster.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/WandHolster.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/food/Blandfruit.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Blandfruit.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/food/Blandfruit.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Blandfruit.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/food/ChargrilledMeat.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/ChargrilledMeat.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/food/ChargrilledMeat.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/ChargrilledMeat.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/food/Food.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Food.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/food/Food.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Food.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/food/FrozenCarpaccio.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/FrozenCarpaccio.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/food/FrozenCarpaccio.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/FrozenCarpaccio.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/food/MysteryMeat.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/MysteryMeat.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/food/MysteryMeat.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/MysteryMeat.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/food/OverpricedRation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/OverpricedRation.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/food/OverpricedRation.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/OverpricedRation.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/keys/GoldenKey.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/GoldenKey.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/keys/GoldenKey.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/GoldenKey.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/keys/IronKey.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/IronKey.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/keys/IronKey.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/IronKey.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/keys/Key.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/Key.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/keys/Key.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/Key.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/keys/SkeletonKey.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/SkeletonKey.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/keys/SkeletonKey.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/SkeletonKey.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfExperience.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfExperience.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfExperience.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfExperience.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfFrost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfFrost.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfFrost.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfFrost.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfInvisibility.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfInvisibility.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfInvisibility.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfInvisibility.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLevitation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLevitation.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLevitation.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLevitation.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLiquidFlame.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLiquidFlame.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLiquidFlame.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLiquidFlame.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMight.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMight.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMight.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMight.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMindVision.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMindVision.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMindVision.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMindVision.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfParalyticGas.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfParalyticGas.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfParalyticGas.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfParalyticGas.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfStrength.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfStrength.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfStrength.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfStrength.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfToxicGas.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfToxicGas.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfToxicGas.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfToxicGas.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/CeremonialCandle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/CeremonialCandle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/quest/CeremonialCandle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/CeremonialCandle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/CorpseDust.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/CorpseDust.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/quest/CorpseDust.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/CorpseDust.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/DarkGold.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/DarkGold.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/quest/DarkGold.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/DarkGold.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/DwarfToken.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/DwarfToken.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/quest/DwarfToken.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/DwarfToken.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/Embers.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Embers.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/quest/Embers.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Embers.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/RatSkull.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/RatSkull.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/quest/RatSkull.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/RatSkull.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfAccuracy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfAccuracy.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfAccuracy.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfAccuracy.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfElements.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfElements.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfElements.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfElements.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEvasion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEvasion.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEvasion.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEvasion.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfFuror.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfFuror.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfFuror.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfFuror.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfHaste.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfHaste.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfHaste.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfHaste.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMagic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMagic.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMagic.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMagic.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfSharpshooting.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfSharpshooting.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfSharpshooting.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfSharpshooting.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/InventoryScroll.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/InventoryScroll.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/InventoryScroll.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/InventoryScroll.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfIdentify.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfIdentify.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfIdentify.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfIdentify.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicMapping.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicMapping.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicMapping.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicMapping.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicalInfusion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicalInfusion.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicalInfusion.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicalInfusion.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMirrorImage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMirrorImage.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMirrorImage.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMirrorImage.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRecharging.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRecharging.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRecharging.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRecharging.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/DamageWand.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/DamageWand.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/DamageWand.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/DamageWand.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfDisintegration.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfDisintegration.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfDisintegration.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfDisintegration.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfTransfusion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfTransfusion.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfTransfusion.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfTransfusion.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfVenom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfVenom.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfVenom.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfVenom.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Annoying.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Annoying.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Annoying.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Annoying.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Displacing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Displacing.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Displacing.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Displacing.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Exhausting.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Exhausting.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Exhausting.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Exhausting.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Fragile.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Fragile.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Fragile.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Fragile.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Sacrificial.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Sacrificial.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Sacrificial.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Sacrificial.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Wayward.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Wayward.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Wayward.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Wayward.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blazing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blazing.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blazing.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blazing.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Chilling.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Chilling.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Chilling.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Chilling.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Dazzling.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Dazzling.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Dazzling.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Dazzling.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Eldritch.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Eldritch.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Eldritch.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Eldritch.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Grim.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Grim.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Grim.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Grim.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Projecting.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Projecting.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Projecting.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Projecting.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Shocking.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Shocking.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Shocking.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Shocking.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Stunning.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Stunning.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Stunning.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Stunning.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Unstable.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Unstable.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Unstable.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Unstable.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Venomous.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Venomous.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Venomous.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Venomous.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vorpal.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vorpal.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vorpal.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vorpal.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BattleAxe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BattleAxe.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BattleAxe.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BattleAxe.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Flail.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Flail.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Flail.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Flail.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Glaive.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Glaive.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Glaive.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Glaive.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greataxe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greataxe.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greataxe.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greataxe.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatshield.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatshield.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatshield.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatshield.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/HandAxe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/HandAxe.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/HandAxe.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/HandAxe.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Knuckles.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Knuckles.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Knuckles.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Knuckles.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Longsword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Longsword.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Longsword.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Longsword.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Mace.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Mace.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Mace.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Mace.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/NewShortsword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/NewShortsword.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/NewShortsword.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/NewShortsword.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Quarterstaff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Quarterstaff.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Quarterstaff.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Quarterstaff.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RoundShield.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RoundShield.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RoundShield.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RoundShield.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RunicBlade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RunicBlade.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RunicBlade.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RunicBlade.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Scimitar.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Scimitar.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Scimitar.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Scimitar.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Spear.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Spear.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Spear.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Spear.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sword.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sword.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sword.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarHammer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarHammer.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarHammer.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarHammer.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Whip.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Whip.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Whip.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Whip.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Boomerang.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Boomerang.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Boomerang.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Boomerang.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/CurareDart.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/CurareDart.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/CurareDart.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/CurareDart.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Dart.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Dart.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Dart.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Dart.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/IncendiaryDart.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/IncendiaryDart.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/IncendiaryDart.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/IncendiaryDart.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Javelin.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Javelin.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Javelin.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Javelin.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Shuriken.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Shuriken.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Shuriken.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Shuriken.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Tamahawk.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Tamahawk.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Tamahawk.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Tamahawk.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CityLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CityLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/CityLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CityLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/DeadEndLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/DeadEndLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/DeadEndLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/DeadEndLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/HallsLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/HallsLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/LastShopLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastShopLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/LastShopLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastShopLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/Patch.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Patch.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/Patch.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Patch.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/Room.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Room.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/Room.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Room.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerLevel.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerLevel.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerLevel.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/Terrain.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Terrain.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/Terrain.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Terrain.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/features/AlchemyPot.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/AlchemyPot.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/features/AlchemyPot.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/AlchemyPot.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/features/Door.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Door.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/features/Door.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Door.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/features/HighGrass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/HighGrass.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/features/HighGrass.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/HighGrass.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/features/Sign.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Sign.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/features/Sign.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Sign.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/AltarPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/AltarPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/AltarPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/AltarPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ArmoryPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ArmoryPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ArmoryPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ArmoryPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/BlacksmithPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/BlacksmithPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/BlacksmithPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/BlacksmithPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/BossExitPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/BossExitPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/BossExitPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/BossExitPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/CryptPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/CryptPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/CryptPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/CryptPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/EntrancePainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/EntrancePainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/EntrancePainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/EntrancePainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ExitPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ExitPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ExitPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ExitPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/GardenPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/GardenPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/GardenPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/GardenPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/LaboratoryPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/LaboratoryPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/LaboratoryPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/LaboratoryPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/LibraryPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/LibraryPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/LibraryPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/LibraryPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MagicWellPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MagicWellPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MagicWellPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MagicWellPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MassGravePainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MassGravePainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MassGravePainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MassGravePainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MazePainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MazePainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MazePainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/MazePainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/Painter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/Painter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/Painter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/Painter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PassagePainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PassagePainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PassagePainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PassagePainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PitPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PitPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PitPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PitPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PoolPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PoolPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PoolPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PoolPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RatKingPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RatKingPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RatKingPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RatKingPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RitualSitePainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RitualSitePainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RitualSitePainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RitualSitePainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RotGardenPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RotGardenPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RotGardenPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RotGardenPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ShopPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ShopPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ShopPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/ShopPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StandardPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StandardPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StandardPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StandardPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StatuePainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StatuePainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StatuePainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StatuePainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StoragePainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StoragePainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StoragePainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/StoragePainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TrapsPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TrapsPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TrapsPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TrapsPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TreasuryPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TreasuryPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TreasuryPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TreasuryPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TunnelPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TunnelPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TunnelPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/TunnelPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/VaultPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/VaultPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/VaultPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/VaultPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/WeakFloorPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/WeakFloorPainter.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/WeakFloorPainter.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/WeakFloorPainter.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/AlarmTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/AlarmTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/AlarmTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/AlarmTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/BlazingTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/BlazingTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/BlazingTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/BlazingTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ChillingTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ChillingTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ChillingTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ChillingTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ConfusionTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ConfusionTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ConfusionTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ConfusionTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/CursingTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/CursingTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/CursingTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/CursingTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DisarmingTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DisarmingTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DisarmingTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DisarmingTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DisintegrationTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DisintegrationTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DisintegrationTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DisintegrationTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ExplosiveTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ExplosiveTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ExplosiveTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ExplosiveTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FireTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FireTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FireTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FireTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FlashingTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FlashingTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FlashingTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FlashingTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FlockTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FlockTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FlockTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FlockTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FrostTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FrostTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FrostTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/FrostTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GrimTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GrimTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GrimTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GrimTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GrippingTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GrippingTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GrippingTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GrippingTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GuardianTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GuardianTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GuardianTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GuardianTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/LightningTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/LightningTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/LightningTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/LightningTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/OozeTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/OozeTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/OozeTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/OozeTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ParalyticTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ParalyticTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ParalyticTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ParalyticTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PitfallTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PitfallTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PitfallTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PitfallTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PoisonTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PoisonTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PoisonTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PoisonTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SummoningTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SummoningTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SummoningTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SummoningTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/TeleportationTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/TeleportationTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/TeleportationTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/TeleportationTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ToxicTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ToxicTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ToxicTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/ToxicTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/Trap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/Trap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/Trap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/Trap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/VenomTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/VenomTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/VenomTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/VenomTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WarpingTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WarpingTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WarpingTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WarpingTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WeakeningTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WeakeningTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WeakeningTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WeakeningTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WornTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WornTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WornTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/WornTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/mechanics/Ballistica.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/mechanics/Ballistica.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/mechanics/Ballistica.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/mechanics/Ballistica.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/mechanics/ShadowCaster.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/mechanics/ShadowCaster.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/mechanics/ShadowCaster.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/mechanics/ShadowCaster.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/Languages.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Languages.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/Languages.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Languages.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Blindweed.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Blindweed.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Blindweed.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Blindweed.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Earthroot.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Earthroot.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Earthroot.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Earthroot.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Firebloom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Firebloom.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Firebloom.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Firebloom.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Sorrowmoss.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Sorrowmoss.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Sorrowmoss.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Sorrowmoss.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Starflower.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Starflower.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Starflower.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Starflower.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Sungrass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Sungrass.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/plants/Sungrass.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Sungrass.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/CellSelector.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/CellSelector.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/CellSelector.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/CellSelector.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/IntroScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/IntroScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/IntroScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/IntroScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/AcidicSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/AcidicSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/AcidicSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/AcidicSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/AlbinoSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/AlbinoSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/AlbinoSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/AlbinoSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/BanditSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BanditSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/BanditSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BanditSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/BatSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BatSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/BatSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BatSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/BeeSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BeeSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/BeeSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BeeSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/BlacksmithSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BlacksmithSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/BlacksmithSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BlacksmithSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/BruteSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BruteSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/BruteSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BruteSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/BurningFistSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BurningFistSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/BurningFistSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BurningFistSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/CrabSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CrabSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/CrabSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CrabSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300Sprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300Sprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300Sprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300Sprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/DiscardedItemSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DiscardedItemSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/DiscardedItemSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DiscardedItemSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ElementalSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ElementalSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/ElementalSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ElementalSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/EyeSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/EyeSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/EyeSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/EyeSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/FetidRatSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FetidRatSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/FetidRatSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FetidRatSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GhostSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhostSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/GhostSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhostSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollTricksterSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollTricksterSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollTricksterSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollTricksterSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GolemSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GolemSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/GolemSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GolemSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GooSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GooSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/GooSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GooSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GreatCrabSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GreatCrabSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/GreatCrabSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GreatCrabSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GuardSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GuardSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/GuardSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GuardSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/HeroSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/HeroSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/HeroSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/HeroSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ImpSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ImpSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/ImpSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ImpSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/KingSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/KingSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/KingSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/KingSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/LarvaSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/LarvaSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/LarvaSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/LarvaSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/MimicSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MimicSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/MimicSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MimicSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/MirrorSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MirrorSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/MirrorSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MirrorSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/MissileSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MissileSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/MissileSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MissileSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/MobSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MobSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/MobSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MobSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/MonkSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MonkSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/MonkSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MonkSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/NewbornElementalSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/NewbornElementalSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/NewbornElementalSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/NewbornElementalSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/PiranhaSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/PiranhaSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/PiranhaSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/PiranhaSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/PlantSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/PlantSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/PlantSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/PlantSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/RatKingSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RatKingSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/RatKingSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RatKingSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/RatSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RatSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/RatSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RatSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/RotHeartSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RotHeartSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/RotHeartSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RotHeartSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/RotLasherSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RotLasherSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/RotLasherSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RotLasherSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/RottingFistSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RottingFistSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/RottingFistSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/RottingFistSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ScorpioSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ScorpioSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/ScorpioSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ScorpioSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/SeniorSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SeniorSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/SeniorSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SeniorSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ShamanSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ShamanSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/ShamanSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ShamanSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/SheepSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SheepSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/SheepSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SheepSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ShieldedSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ShieldedSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/ShieldedSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ShieldedSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ShopkeeperSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ShopkeeperSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/ShopkeeperSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ShopkeeperSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/SkeletonSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SkeletonSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/SkeletonSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SkeletonSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/SpinnerSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SpinnerSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/SpinnerSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SpinnerSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/StatueSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/StatueSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/StatueSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/StatueSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/SuccubusSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SuccubusSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/SuccubusSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SuccubusSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/SwarmSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SwarmSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/SwarmSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SwarmSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/TenguSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/TenguSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/TenguSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/TenguSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/ThiefSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ThiefSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/ThiefSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ThiefSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/TrapSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/TrapSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/TrapSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/TrapSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/UndeadSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/UndeadSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/UndeadSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/UndeadSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/WandmakerSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/WandmakerSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/WandmakerSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/WandmakerSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/WarlockSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/WarlockSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/WarlockSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/WarlockSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/WraithSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/WraithSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/WraithSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/WraithSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/YogSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/YogSprite.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/sprites/YogSprite.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/YogSprite.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Archs.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Archs.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/Archs.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Archs.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/AttackIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/AttackIndicator.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/AttackIndicator.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/AttackIndicator.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Banner.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Banner.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/Banner.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Banner.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/BossHealthBar.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BossHealthBar.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/BossHealthBar.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BossHealthBar.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/BusyIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BusyIndicator.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/BusyIndicator.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BusyIndicator.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ChangesButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ChangesButton.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/ChangesButton.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ChangesButton.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/CheckBox.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/CheckBox.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/CheckBox.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/CheckBox.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Compass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Compass.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/Compass.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Compass.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/CustomTileVisual.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/CustomTileVisual.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/CustomTileVisual.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/CustomTileVisual.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ExitButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ExitButton.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/ExitButton.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ExitButton.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/GameLog.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/GameLog.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/GameLog.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/GameLog.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/GoldIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/GoldIndicator.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/GoldIndicator.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/GoldIndicator.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/HealthBar.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HealthBar.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/HealthBar.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HealthBar.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/HealthIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HealthIndicator.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/HealthIndicator.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HealthIndicator.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/HighlightedText.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HighlightedText.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/HighlightedText.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HighlightedText.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/LanguageButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/LanguageButton.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/LanguageButton.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/LanguageButton.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/PrefsButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/PrefsButton.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/PrefsButton.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/PrefsButton.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextMultiline.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextMultiline.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextMultiline.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextMultiline.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ResumeIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ResumeIndicator.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/ResumeIndicator.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ResumeIndicator.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ScrollPane.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ScrollPane.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/ScrollPane.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ScrollPane.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/SimpleButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/SimpleButton.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/SimpleButton.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/SimpleButton.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Tag.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Tag.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/Tag.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Tag.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Window.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Window.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/ui/Window.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Window.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/utils/BArray.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/utils/BArray.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/utils/BArray.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/utils/BArray.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/utils/GLog.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/utils/GLog.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/utils/GLog.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/utils/GLog.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndCatalogs.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndCatalogs.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndCatalogs.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndCatalogs.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseWay.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseWay.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseWay.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseWay.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndClass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndClass.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndClass.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndClass.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndError.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndError.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndError.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndError.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndGame.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGame.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndGame.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGame.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndHardNotification.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHardNotification.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndHardNotification.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHardNotification.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoBuff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoBuff.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoBuff.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoBuff.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoPlant.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoPlant.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoPlant.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoPlant.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoTrap.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoTrap.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoTrap.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndLangs.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndLangs.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndLangs.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndLangs.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndList.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndList.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndList.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndList.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndMessage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndMessage.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndMessage.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndMessage.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndQuest.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndQuest.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndQuest.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndQuest.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndTitledMessage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTitledMessage.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndTitledMessage.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTitledMessage.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java
rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java
diff --git a/res/drawable-hdpi/ic_launcher.png b/core/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-hdpi/ic_launcher.png
rename to core/src/main/res/drawable-hdpi/ic_launcher.png
diff --git a/res/drawable-mdpi/ic_launcher.png b/core/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-mdpi/ic_launcher.png
rename to core/src/main/res/drawable-mdpi/ic_launcher.png
diff --git a/res/drawable-xhdpi/ic_launcher.png b/core/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-xhdpi/ic_launcher.png
rename to core/src/main/res/drawable-xhdpi/ic_launcher.png
diff --git a/res/drawable-xxhdpi/ic_launcher.png b/core/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_launcher.png
rename to core/src/main/res/drawable-xxhdpi/ic_launcher.png
diff --git a/res/drawable-xxxhdpi/ic_launcher.png b/core/src/main/res/drawable-xxxhdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-xxxhdpi/ic_launcher.png
rename to core/src/main/res/drawable-xxxhdpi/ic_launcher.png
diff --git a/res/values/strings.xml b/core/src/main/res/values/strings.xml
similarity index 100%
rename from res/values/strings.xml
rename to core/src/main/res/values/strings.xml
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_de.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_de.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_de.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_de.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_es.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_es.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_es.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_es.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_fi.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_fi.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_fi.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_fi.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_fr.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_fr.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_fr.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_fr.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_hu.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_hu.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_hu.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_hu.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_it.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_it.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_it.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_it.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_ko.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_ko.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_ko.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_ko.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_pl.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_pl.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_pl.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_pl.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_pt.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_pt.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_pt.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_pt.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_ru.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_ru.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_ru.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_ru.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_zh.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_zh.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_zh.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors_zh.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_de.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_de.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_de.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_de.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_es.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_es.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_es.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_es.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_fi.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_fi.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_fi.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_fi.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_fr.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_fr.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_fr.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_fr.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_hu.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_hu.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_hu.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_hu.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_it.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_it.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_it.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_it.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_ko.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_ko.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_ko.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_ko.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_pl.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_pl.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_pl.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_pl.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_pt.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_pt.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_pt.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_pt.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_ru.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_ru.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_ru.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_ru.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_zh.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_zh.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_zh.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items_zh.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_de.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_de.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_de.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_de.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_es.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_es.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_es.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_es.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_fi.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_fi.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_fi.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_fi.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_fr.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_fr.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_fr.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_fr.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_hu.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_hu.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_hu.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_hu.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_it.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_it.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_it.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_it.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_ko.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_ko.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_ko.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_ko.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_pl.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_pl.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_pl.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_pl.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_pt.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_pt.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_pt.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_pt.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_ru.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_ru.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_ru.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_ru.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_zh.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_zh.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_zh.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/levels/levels_zh.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_de.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_de.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_de.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_de.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_es.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_es.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_es.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_es.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_fi.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_fi.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_fi.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_fi.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_fr.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_fr.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_fr.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_fr.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_hu.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_hu.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_hu.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_hu.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_it.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_it.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_it.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_it.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_ko.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_ko.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_ko.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_ko.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_pl.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_pl.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_pl.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_pl.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_pt.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_pt.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_pt.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_pt.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_ru.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_ru.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_ru.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_ru.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_zh.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_zh.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_zh.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/misc/misc_zh.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_de.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_de.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_de.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_de.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_es.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_es.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_es.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_es.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_fi.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_fi.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_fi.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_fi.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_fr.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_fr.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_fr.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_fr.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_hu.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_hu.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_hu.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_hu.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_it.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_it.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_it.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_it.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_ko.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_ko.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_ko.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_ko.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_pl.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_pl.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_pl.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_pl.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_pt.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_pt.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_pt.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_pt.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_ru.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_ru.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_ru.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_ru.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_zh.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_zh.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_zh.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants_zh.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_de.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_de.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_de.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_de.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_es.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_es.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_es.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_es.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_fi.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_fi.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_fi.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_fi.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_fr.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_fr.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_fr.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_fr.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_hu.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_hu.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_hu.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_hu.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_it.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_it.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_it.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_it.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_ko.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_ko.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_ko.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_ko.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_pl.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_pl.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_pl.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_pl.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_pt.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_pt.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_pt.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_pt.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_ru.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_ru.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_ru.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_ru.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_zh.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_zh.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_zh.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/scenes/scenes_zh.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_de.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_de.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_de.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_de.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_es.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_es.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_es.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_es.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_fi.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_fi.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_fi.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_fi.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_fr.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_fr.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_fr.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_fr.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_hu.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_hu.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_hu.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_hu.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_it.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_it.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_it.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_it.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_ko.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_ko.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_ko.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_ko.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_pl.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_pl.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_pl.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_pl.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_pt.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_pt.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_pt.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_pt.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_ru.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_ru.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_ru.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_ru.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_zh.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_zh.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_zh.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/ui/ui_zh.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_de.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_de.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_de.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_de.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_es.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_es.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_es.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_es.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_fi.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_fi.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_fi.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_fi.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_fr.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_fr.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_fr.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_fr.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_hu.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_hu.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_hu.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_hu.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_it.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_it.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_it.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_it.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_ko.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_ko.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_ko.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_ko.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_pl.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_pl.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_pl.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_pl.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_pt.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_pt.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_pt.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_pt.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_ru.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_ru.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_ru.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_ru.properties
diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_zh.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_zh.properties
similarity index 100%
rename from src/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_zh.properties
rename to core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows_zh.properties
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 000000000..6ef41826c
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.daemon=true
+org.gradle.jvmargs=-Xms128m -Xmx1024m
+org.gradle.configureondemand=true
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 000000000..13372aef5
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 000000000..122a0dca2
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Dec 28 10:00:20 PST 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
diff --git a/gradlew b/gradlew
new file mode 100644
index 000000000..9d82f7891
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 000000000..8a0b282aa
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 000000000..26ac98a17
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':core', ':SPD-classes'