From e5e6be00ce4952c46e8029fd021aac4251bd31e0 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Tue, 12 Feb 2019 02:25:40 -0800 Subject: [PATCH] removed some unneccsary files --- .../engine/component/LayerComponent.java | 7 --- .../engine/component/ModeComponent.java | 7 --- .../engine/component/PositionComponent.java | 7 --- .../engine/component/VelocityComponent.java | 7 --- .../component/WeaponClassComponent.java | 7 --- .../diablo/engine/system/MovementSystem.java | 7 --- .../gdx/diablo/engine/system/RenderSysem.java | 21 -------- core/src/gdx/diablo/net/Codec.java | 7 --- core/src/gdx/diablo/net/GameLogonPacket.java | 9 ---- core/src/gdx/diablo/net/Packet.java | 7 --- core/src/gdx/diablo/net/UploadD2SPacket.java | 7 --- .../diablo/net/d2gs/WalkToEntityPacket.java | 34 ------------- .../diablo/net/d2gs/WalkToLocationPacket.java | 34 ------------- .../screen/CharacterProviderScreen.java | 13 ----- .../gdx/diablo/net/GameLogonPacketTest.java | 5 -- .../net/d2gs/WalkToEntityPacketTest.java | 49 ------------------- .../net/d2gs/WalkToLocationPacketTest.java | 46 ----------------- 17 files changed, 274 deletions(-) delete mode 100644 core/src/gdx/diablo/engine/component/LayerComponent.java delete mode 100644 core/src/gdx/diablo/engine/component/ModeComponent.java delete mode 100644 core/src/gdx/diablo/engine/component/PositionComponent.java delete mode 100644 core/src/gdx/diablo/engine/component/VelocityComponent.java delete mode 100644 core/src/gdx/diablo/engine/component/WeaponClassComponent.java delete mode 100644 core/src/gdx/diablo/engine/system/MovementSystem.java delete mode 100644 core/src/gdx/diablo/engine/system/RenderSysem.java delete mode 100644 core/src/gdx/diablo/net/Codec.java delete mode 100644 core/src/gdx/diablo/net/GameLogonPacket.java delete mode 100644 core/src/gdx/diablo/net/Packet.java delete mode 100644 core/src/gdx/diablo/net/UploadD2SPacket.java delete mode 100644 core/src/gdx/diablo/net/d2gs/WalkToEntityPacket.java delete mode 100644 core/src/gdx/diablo/net/d2gs/WalkToLocationPacket.java delete mode 100644 core/src/gdx/diablo/screen/CharacterProviderScreen.java delete mode 100644 core/test/gdx/diablo/net/GameLogonPacketTest.java delete mode 100644 core/test/gdx/diablo/net/d2gs/WalkToEntityPacketTest.java delete mode 100644 core/test/gdx/diablo/net/d2gs/WalkToLocationPacketTest.java diff --git a/core/src/gdx/diablo/engine/component/LayerComponent.java b/core/src/gdx/diablo/engine/component/LayerComponent.java deleted file mode 100644 index eed33c93..00000000 --- a/core/src/gdx/diablo/engine/component/LayerComponent.java +++ /dev/null @@ -1,7 +0,0 @@ -package gdx.diablo.engine.component; - -public class LayerComponent { - - private LayerComponent() {} - -} diff --git a/core/src/gdx/diablo/engine/component/ModeComponent.java b/core/src/gdx/diablo/engine/component/ModeComponent.java deleted file mode 100644 index b22f927a..00000000 --- a/core/src/gdx/diablo/engine/component/ModeComponent.java +++ /dev/null @@ -1,7 +0,0 @@ -package gdx.diablo.engine.component; - -public class ModeComponent { - - private ModeComponent() {} - -} diff --git a/core/src/gdx/diablo/engine/component/PositionComponent.java b/core/src/gdx/diablo/engine/component/PositionComponent.java deleted file mode 100644 index 3d9f1f33..00000000 --- a/core/src/gdx/diablo/engine/component/PositionComponent.java +++ /dev/null @@ -1,7 +0,0 @@ -package gdx.diablo.engine.component; - -public class PositionComponent { - - private PositionComponent() {} - -} diff --git a/core/src/gdx/diablo/engine/component/VelocityComponent.java b/core/src/gdx/diablo/engine/component/VelocityComponent.java deleted file mode 100644 index 1b83a0ec..00000000 --- a/core/src/gdx/diablo/engine/component/VelocityComponent.java +++ /dev/null @@ -1,7 +0,0 @@ -package gdx.diablo.engine.component; - -public class VelocityComponent { - - private VelocityComponent() {} - -} diff --git a/core/src/gdx/diablo/engine/component/WeaponClassComponent.java b/core/src/gdx/diablo/engine/component/WeaponClassComponent.java deleted file mode 100644 index 90e90829..00000000 --- a/core/src/gdx/diablo/engine/component/WeaponClassComponent.java +++ /dev/null @@ -1,7 +0,0 @@ -package gdx.diablo.engine.component; - -public class WeaponClassComponent { - - private WeaponClassComponent() {} - -} diff --git a/core/src/gdx/diablo/engine/system/MovementSystem.java b/core/src/gdx/diablo/engine/system/MovementSystem.java deleted file mode 100644 index aa7d59ea..00000000 --- a/core/src/gdx/diablo/engine/system/MovementSystem.java +++ /dev/null @@ -1,7 +0,0 @@ -package gdx.diablo.engine.system; - -public class MovementSystem { - - private MovementSystem() {} - -} diff --git a/core/src/gdx/diablo/engine/system/RenderSysem.java b/core/src/gdx/diablo/engine/system/RenderSysem.java deleted file mode 100644 index 38243623..00000000 --- a/core/src/gdx/diablo/engine/system/RenderSysem.java +++ /dev/null @@ -1,21 +0,0 @@ -package gdx.diablo.engine.system; - -import com.badlogic.ashley.core.ComponentMapper; -import com.badlogic.ashley.core.Entity; -import com.badlogic.ashley.core.Family; -import com.badlogic.ashley.systems.IteratingSystem; - -import gdx.diablo.engine.component.WeaponClassComponent; - -public class WeaponSystem extends IteratingSystem { - private ComponentMapper wc = ComponentMapper.getFor(WeaponClassComponent.class); - - public WeaponSystem() { - super(Family.all(WeaponClassComponent.class).get()); - } - - @Override - protected void processEntity(Entity entity, float delta) { - - } -} diff --git a/core/src/gdx/diablo/net/Codec.java b/core/src/gdx/diablo/net/Codec.java deleted file mode 100644 index 699283a7..00000000 --- a/core/src/gdx/diablo/net/Codec.java +++ /dev/null @@ -1,7 +0,0 @@ -package gdx.diablo.net; - -public class Codec { - - private Codec() {} - -} diff --git a/core/src/gdx/diablo/net/GameLogonPacket.java b/core/src/gdx/diablo/net/GameLogonPacket.java deleted file mode 100644 index 5246a8dd..00000000 --- a/core/src/gdx/diablo/net/GameLogonPacket.java +++ /dev/null @@ -1,9 +0,0 @@ -package gdx.diablo.net; - -import java.io.DataInputStream; - -public class ConnectPacket { - ConnectPacket(DataInputStream in) { - - } -} diff --git a/core/src/gdx/diablo/net/Packet.java b/core/src/gdx/diablo/net/Packet.java deleted file mode 100644 index e82bcbd6..00000000 --- a/core/src/gdx/diablo/net/Packet.java +++ /dev/null @@ -1,7 +0,0 @@ -package gdx.diablo.net; - -public class Packet { - - private Packet() {} - -} diff --git a/core/src/gdx/diablo/net/UploadD2SPacket.java b/core/src/gdx/diablo/net/UploadD2SPacket.java deleted file mode 100644 index 63de2a5d..00000000 --- a/core/src/gdx/diablo/net/UploadD2SPacket.java +++ /dev/null @@ -1,7 +0,0 @@ -package gdx.diablo.net; - -public class UploadD2SPacket { - - private UploadD2SPacket() {} - -} diff --git a/core/src/gdx/diablo/net/d2gs/WalkToEntityPacket.java b/core/src/gdx/diablo/net/d2gs/WalkToEntityPacket.java deleted file mode 100644 index ae741f82..00000000 --- a/core/src/gdx/diablo/net/d2gs/WalkToEntityPacket.java +++ /dev/null @@ -1,34 +0,0 @@ -package gdx.diablo.net.d2gs; - -import com.google.common.io.LittleEndianDataInputStream; -import com.google.common.io.LittleEndianDataOutputStream; - -import java.io.IOException; - -import gdx.diablo.net.Codec; - -public class WalkToLocationPacket extends Codec { - static final int SIZE = 4; - - public int x; - public int y; - - WalkToLocationPacket() {} - - @Override - public void encode(LittleEndianDataOutputStream out) throws IOException { - out.writeShort(x); - out.writeShort(y); - } - - @Override - public void decode(LittleEndianDataInputStream in) throws IOException { - x = in.readUnsignedShort(); - y = in.readUnsignedShort(); - } - - @Override - public String toString() { - return x + ", " + y; - } -} diff --git a/core/src/gdx/diablo/net/d2gs/WalkToLocationPacket.java b/core/src/gdx/diablo/net/d2gs/WalkToLocationPacket.java deleted file mode 100644 index 7cc24b0a..00000000 --- a/core/src/gdx/diablo/net/d2gs/WalkToLocationPacket.java +++ /dev/null @@ -1,34 +0,0 @@ -package gdx.diablo.net.d2gs; - -import com.google.common.io.LittleEndianDataInputStream; -import com.google.common.io.LittleEndianDataOutputStream; - -import java.io.IOException; - -import gdx.diablo.net.Codec; - -public class MoveToLocationPacket extends Codec { - static final int SIZE = 4; - - public int x; - public int y; - - MoveToLocationPacket() {} - - @Override - public void encode(LittleEndianDataOutputStream out) throws IOException { - out.writeShort(x); - out.writeShort(y); - } - - @Override - public void decode(LittleEndianDataInputStream in) throws IOException { - x = in.readUnsignedShort(); - y = in.readUnsignedShort(); - } - - @Override - public String toString() { - return x + ", " + y; - } -} diff --git a/core/src/gdx/diablo/screen/CharacterProviderScreen.java b/core/src/gdx/diablo/screen/CharacterProviderScreen.java deleted file mode 100644 index b0e43535..00000000 --- a/core/src/gdx/diablo/screen/CharacterProviderScreen.java +++ /dev/null @@ -1,13 +0,0 @@ -package gdx.diablo.screen; - -import com.badlogic.gdx.ScreenAdapter; - -import gdx.diablo.entity3.Player; - -public abstract class CharacterScreenAdapter extends ScreenAdapter { - - public CharacterScreenAdapter(Player player) { - - } - -} diff --git a/core/test/gdx/diablo/net/GameLogonPacketTest.java b/core/test/gdx/diablo/net/GameLogonPacketTest.java deleted file mode 100644 index 548b9070..00000000 --- a/core/test/gdx/diablo/net/GameLogonPacketTest.java +++ /dev/null @@ -1,5 +0,0 @@ -import static org.junit.Assert.*; - -public class GameLogonPacketTest { - -} \ No newline at end of file diff --git a/core/test/gdx/diablo/net/d2gs/WalkToEntityPacketTest.java b/core/test/gdx/diablo/net/d2gs/WalkToEntityPacketTest.java deleted file mode 100644 index 187aef38..00000000 --- a/core/test/gdx/diablo/net/d2gs/WalkToEntityPacketTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package gdx.diablo.net.d2gs; - -import org.junit.Assert; -import org.junit.Test; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; - -import gdx.diablo.util.DebugUtils; - -public class WalkToLocationPacketTest { - private static final int X = 0xFF; - private static final int Y = 0xFFFF; - private static final byte[] BYTES = new byte[]{(byte) 0xFF, 0x00, (byte) 0xFF, (byte) 0xFF}; - - @Test - public void encode() { - WalkToLocationPacket packet = new WalkToLocationPacket() {{ - x = X; - y = Y; - }}; - - ByteArrayOutputStream out = new ByteArrayOutputStream(WalkToLocationPacket.SIZE); - try { - packet.encode(out); - } catch (Throwable t) { - System.err.println(t.getMessage()); - } - - byte[] bytes = out.toByteArray(); - System.out.println(packet + " -> " + DebugUtils.toByteArray(bytes)); - Assert.assertArrayEquals(BYTES, bytes); - } - - @Test - public void decode() { - WalkToLocationPacket packet = new WalkToLocationPacket(); - try { - ByteArrayInputStream in = new ByteArrayInputStream(BYTES); - packet.decode(in); - } catch (Throwable t) { - System.out.println(t.getMessage()); - } - - System.out.println(DebugUtils.toByteArray(BYTES) + " -> " + packet); - Assert.assertEquals(X, packet.x); - Assert.assertEquals(Y, packet.y); - } -} \ No newline at end of file diff --git a/core/test/gdx/diablo/net/d2gs/WalkToLocationPacketTest.java b/core/test/gdx/diablo/net/d2gs/WalkToLocationPacketTest.java deleted file mode 100644 index f4e3f5c5..00000000 --- a/core/test/gdx/diablo/net/d2gs/WalkToLocationPacketTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package gdx.diablo.net.d2gs; - -import org.junit.Assert; -import org.junit.Test; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; - -import gdx.diablo.util.DebugUtils; - -public class MoveToLocationPacketTest { - - @Test - public void encode() { - MoveToLocationPacket packet = new MoveToLocationPacket() {{ - x = 31; - y = 63; - }}; - - ByteArrayOutputStream out = new ByteArrayOutputStream(MoveToLocationPacket.SIZE); - try { - packet.encode(out); - } catch (Throwable t) { - System.err.println(t.getMessage()); - } - - byte[] bytes = out.toByteArray(); - System.out.println(DebugUtils.toByteArray(bytes)); - Assert.assertArrayEquals(new byte[]{0x1F, 0x00, 0x3F, 0x00}, bytes); - } - - @Test - public void decode() { - MoveToLocationPacket packet = new MoveToLocationPacket(); - try { - ByteArrayInputStream in = new ByteArrayInputStream(new byte[]{0x1F, 0x00, 0x3F, 0x00}); - packet.decode(in); - } catch (Throwable t) { - System.out.println(t.getMessage()); - } - - System.out.println(packet); - Assert.assertEquals(31, packet.x); - Assert.assertEquals(63, packet.y); - } -} \ No newline at end of file