mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-19 16:57:20 +07:00
removed some unneccsary files
This commit is contained in:
parent
a73e0539c3
commit
e5e6be00ce
@ -1,7 +0,0 @@
|
||||
package gdx.diablo.engine.component;
|
||||
|
||||
public class LayerComponent {
|
||||
|
||||
private LayerComponent() {}
|
||||
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package gdx.diablo.engine.component;
|
||||
|
||||
public class ModeComponent {
|
||||
|
||||
private ModeComponent() {}
|
||||
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package gdx.diablo.engine.component;
|
||||
|
||||
public class PositionComponent {
|
||||
|
||||
private PositionComponent() {}
|
||||
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package gdx.diablo.engine.component;
|
||||
|
||||
public class VelocityComponent {
|
||||
|
||||
private VelocityComponent() {}
|
||||
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package gdx.diablo.engine.component;
|
||||
|
||||
public class WeaponClassComponent {
|
||||
|
||||
private WeaponClassComponent() {}
|
||||
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package gdx.diablo.engine.system;
|
||||
|
||||
public class MovementSystem {
|
||||
|
||||
private MovementSystem() {}
|
||||
|
||||
}
|
@ -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<WeaponClassComponent> wc = ComponentMapper.getFor(WeaponClassComponent.class);
|
||||
|
||||
public WeaponSystem() {
|
||||
super(Family.all(WeaponClassComponent.class).get());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processEntity(Entity entity, float delta) {
|
||||
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package gdx.diablo.net;
|
||||
|
||||
public class Codec {
|
||||
|
||||
private Codec() {}
|
||||
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package gdx.diablo.net;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
|
||||
public class ConnectPacket {
|
||||
ConnectPacket(DataInputStream in) {
|
||||
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package gdx.diablo.net;
|
||||
|
||||
public class Packet {
|
||||
|
||||
private Packet() {}
|
||||
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package gdx.diablo.net;
|
||||
|
||||
public class UploadD2SPacket {
|
||||
|
||||
private UploadD2SPacket() {}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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) {
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class GameLogonPacketTest {
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user