Merge branch 'LAX1DUDE-main'

This commit is contained in:
ayunami2000 2022-01-23 21:37:13 -05:00
commit 432521daad
3 changed files with 12 additions and 1 deletions

Binary file not shown.

7
epkcompiler/readme.txt Normal file
View File

@ -0,0 +1,7 @@
Use this tool like this:
java -jar CompilePackage.jar <source directory> <output file>
To recompile the assets.epk file found in /javascript, make your changes to the game's resources in /lwjgl-rundir/resources and then run this command within this /epkcompiler directory:
java -jar CompilePackage.jar "../lwjgl-rundir/resources" "../javascript/assets.epk"

View File

@ -18,6 +18,10 @@ public class CompilePackage {
private static ArrayList<File> files = new ArrayList();
public static void main(String[] args) throws IOException, NoSuchAlgorithmException {
if(args.length != 2) {
System.out.print("Usage: java -jar CompilePackage.jar <input directory> <output file>");
return;
}
File root = new File(args[0]);
listDirectory(root);
ByteArrayOutputStream osb = new ByteArrayOutputStream();
@ -47,7 +51,7 @@ public class CompilePackage {
os.writeUTF(" end");
os.flush();
os.close();
FileOutputStream out = new FileOutputStream(new File("out.epk"));
FileOutputStream out = new FileOutputStream(new File(args[1]));
out.write(osb.toByteArray());
out.close();
}